index.vue 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989
  1. <template>
  2. <div>
  3. <basic-container v-if="isShow">
  4. <avue-crud :option="option"
  5. :table-loading="loading"
  6. :data="data"
  7. :page.sync="page"
  8. id="out-table"
  9. :header-cell-class-name="headerClassName"
  10. :permission="permissionList"
  11. :before-open="beforeOpen"
  12. v-model="form"
  13. ref="crud"
  14. :search.sync="query"
  15. @row-update="rowUpdate"
  16. @row-save="rowSave"
  17. @row-del="rowDel"
  18. @search-change="searchChange"
  19. @search-reset="searchReset"
  20. @selection-change="selectionChange"
  21. @current-change="currentChange"
  22. @size-change="sizeChange"
  23. @refresh-change="refreshChange"
  24. @on-load="onLoad"
  25. @expand-change="expandChange"
  26. @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.11)"
  27. @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.11)" >
  28. <!--#region-->
  29. <!--<template slot="search" slot-scope="{row,size}">-->
  30. <!-- <el-form ref="form" :model="row" label-width="80px" :style="fold?'width: 100%':'width: 70%'">-->
  31. <!-- <el-row>-->
  32. <!-- <el-col :span="fold?6:8" >-->
  33. <!-- <el-form-item label="主单号">-->
  34. <!-- <el-input placeholder="请输入主单号" clearable-->
  35. <!-- size="small" style="width:100%" v-model="query.mblno">-->
  36. <!-- </el-input>-->
  37. <!-- </el-form-item>-->
  38. <!-- </el-col>-->
  39. <!-- <el-col :span="fold?6:8">-->
  40. <!-- <el-form-item label="委托人">-->
  41. <!-- &lt;!&ndash;<el-input placeholder="请输入委托人" clearable&ndash;&gt;-->
  42. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.corpCnName">&ndash;&gt;-->
  43. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  44. <!-- <search-query :datalist="corpData"-->
  45. <!-- :selectValue="query.corpCnName"-->
  46. <!-- :filterable="true"-->
  47. <!-- :clearable="true"-->
  48. <!-- :remote="true"-->
  49. <!-- :buttonIf="false"-->
  50. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  51. <!-- placeholder="请输入委托人"-->
  52. <!-- @remoteMethod="corpBcorpslistByType"-->
  53. <!-- @corpChange="corpChange($event,'corpCnName')"-->
  54. <!-- @corpFocus="corpBcorpslistByType" >-->
  55. <!-- </search-query>-->
  56. <!-- </el-form-item>-->
  57. <!-- </el-col>-->
  58. <!-- <el-col :span="fold?6:8" >-->
  59. <!-- <el-form-item label="业务号">-->
  60. <!-- <el-input placeholder="请输入业务号" clearable-->
  61. <!-- size="small" style="width:100%" v-model="query.billNo">-->
  62. <!-- </el-input>-->
  63. <!-- </el-form-item>-->
  64. <!-- </el-col>-->
  65. <!-- <el-col :span="6" v-show="fold">-->
  66. <!-- <el-form-item label="单据类型">-->
  67. <!-- <search-query-->
  68. <!-- :datalist="billTypeData"-->
  69. <!-- :selectValue="query.billType"-->
  70. <!-- :filterable="true"-->
  71. <!-- :clearable="true"-->
  72. <!-- :remote="true"-->
  73. <!-- :buttonIf="false"-->
  74. <!-- @corpChange="corpChange($event,'billType')">-->
  75. <!-- </search-query>-->
  76. <!-- </el-form-item>-->
  77. <!-- </el-col>-->
  78. <!-- <el-col :span="6" v-show="fold">-->
  79. <!-- <el-form-item label="分单号">-->
  80. <!-- <el-input placeholder="请输入分单号" clearable-->
  81. <!-- size="small" style="width:100%" v-model="query.hblno">-->
  82. <!-- </el-input>-->
  83. <!-- </el-form-item>-->
  84. <!-- </el-col>-->
  85. <!-- <el-col :span="6" v-show="fold">-->
  86. <!-- <el-form-item label="船名">-->
  87. <!-- <search-query :datalist="vesselData"-->
  88. <!-- :selectValue="query.vesselEnName"-->
  89. <!-- :filterable="true"-->
  90. <!-- :clearable="true"-->
  91. <!-- :remote="true"-->
  92. <!-- :buttonIf="false"-->
  93. <!-- :forParameter="{key:'id',label:'enName',value:'enName'}"-->
  94. <!-- placeholder="请输入船名"-->
  95. <!-- @remoteMethod="vesselBvesselsListfun"-->
  96. <!-- @corpChange="corpChange($event,'vesselEnName')"-->
  97. <!-- @corpFocus="vesselBvesselsListfun" >-->
  98. <!-- </search-query>-->
  99. <!-- </el-form-item>-->
  100. <!-- </el-col>-->
  101. <!-- <el-col :span="6" v-show="fold" >-->
  102. <!-- <el-form-item label="航次">-->
  103. <!-- <el-input placeholder="请输入航次" clearable-->
  104. <!-- size="small" style="width:100%" v-model="query.voyageNo">-->
  105. <!-- </el-input>-->
  106. <!-- </el-form-item>-->
  107. <!-- </el-col>-->
  108. <!-- <el-col :span="6" v-show="fold">-->
  109. <!-- <el-form-item label="船公司">-->
  110. <!-- <search-query :datalist="carrierData"-->
  111. <!-- :selectValue="query.carrierCnName"-->
  112. <!-- :filterable="true"-->
  113. <!-- :clearable="true"-->
  114. <!-- :remote="true"-->
  115. <!-- :buttonIf="false"-->
  116. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  117. <!-- placeholder="请输入船公司"-->
  118. <!-- @remoteMethod="carrierBcorpslistByTypefun"-->
  119. <!-- @corpChange="corpChange($event,'carrierCnName')"-->
  120. <!-- @corpFocus="carrierBcorpslistByTypefun" >-->
  121. <!-- </search-query>-->
  122. <!-- </el-form-item>-->
  123. <!-- </el-col>-->
  124. <!-- <el-col :span="6" v-show="fold">-->
  125. <!-- <el-form-item label="目的港">-->
  126. <!-- &lt;!&ndash;<el-input placeholder="请输入目的港" clearable&ndash;&gt;-->
  127. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.podCnName">&ndash;&gt;-->
  128. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  129. <!-- <search-query :datalist="podData"-->
  130. <!-- :selectValue="query.podEnName"-->
  131. <!-- :filterable="true"-->
  132. <!-- :clearable="true"-->
  133. <!-- :remote="true"-->
  134. <!-- :buttonIf="false"-->
  135. <!-- :forParameter="{key:'id',label:'enName',value:'enName'}"-->
  136. <!-- placeholder="请输入目的港"-->
  137. <!-- @remoteMethod="podBportsListfun"-->
  138. <!-- @corpChange="corpChange($event,'podEnName')"-->
  139. <!-- @corpFocus="podBportsListfun" >-->
  140. <!-- </search-query>-->
  141. <!-- </el-form-item>-->
  142. <!-- </el-col>-->
  143. <!-- <el-col :span="6" v-show="fold">-->
  144. <!-- <el-form-item label="航线">-->
  145. <!-- &lt;!&ndash;<el-input placeholder="请输入航线" clearable&ndash;&gt;-->
  146. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.lineCnName">&ndash;&gt;-->
  147. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  148. <!-- <search-query :datalist="lineData"-->
  149. <!-- :selectValue="query.lineCnName"-->
  150. <!-- :filterable="true"-->
  151. <!-- :clearable="true"-->
  152. <!-- :remote="true"-->
  153. <!-- :buttonIf="false"-->
  154. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  155. <!-- placeholder="请输入航线"-->
  156. <!-- @remoteMethod="lineBlinesListfun"-->
  157. <!-- @corpChange="corpChange($event,'lineCnName')"-->
  158. <!-- @corpFocus="lineBlinesListfun" >-->
  159. <!-- </search-query>-->
  160. <!-- </el-form-item>-->
  161. <!-- </el-col>-->
  162. <!-- <el-col :span="6" v-show="fold">-->
  163. <!-- <el-form-item label="场站">-->
  164. <!-- &lt;!&ndash;<el-input placeholder="请输入场站" clearable&ndash;&gt;-->
  165. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.cyCode">&ndash;&gt;-->
  166. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  167. <!-- <search-query :datalist="cyData"-->
  168. <!-- :selectValue="query.cyCnName"-->
  169. <!-- :filterable="true"-->
  170. <!-- :clearable="true"-->
  171. <!-- :remote="true"-->
  172. <!-- :buttonIf="false"-->
  173. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  174. <!-- placeholder="请输入场站"-->
  175. <!-- @remoteMethod="cyBcorpslistByType"-->
  176. <!-- @corpChange="corpChange($event,'cyCnName')"-->
  177. <!-- @corpFocus="cyBcorpslistByType" >-->
  178. <!-- </search-query>-->
  179. <!-- </el-form-item>-->
  180. <!-- </el-col>-->
  181. <!-- <el-col :span="6" v-show="fold">-->
  182. <!-- <el-form-item label="业务来源">-->
  183. <!-- <search-query-->
  184. <!-- :datalist="srcTypeData"-->
  185. <!-- :selectValue="query.srcType"-->
  186. <!-- :filterable="true"-->
  187. <!-- :clearable="true"-->
  188. <!-- :remote="true"-->
  189. <!-- :buttonIf="false"-->
  190. <!-- @corpChange="corpChange($event,'srcType')">-->
  191. <!-- </search-query>-->
  192. <!-- </el-form-item>-->
  193. <!-- </el-col>-->
  194. <!-- <el-col :span="6" v-show="fold">-->
  195. <!-- <el-form-item label="来源详情">-->
  196. <!-- <el-input placeholder="请输入来源详情" clearable-->
  197. <!-- size="small" style="width:100%" v-model="query.srcCnName">-->
  198. <!-- </el-input>-->
  199. <!-- </el-form-item>-->
  200. <!-- </el-col>-->
  201. <!-- <el-col :span="9" v-show="fold">-->
  202. <!-- <el-form-item label="ETD">-->
  203. <!-- <el-checkbox v-model="etdDisabled">-->
  204. <!-- <el-date-picker-->
  205. <!-- v-model="etdList"-->
  206. <!-- style="width: 100%"-->
  207. <!-- :disabled="!etdDisabled"-->
  208. <!-- size="small"-->
  209. <!-- type="datetimerange"-->
  210. <!-- range-separator="至"-->
  211. <!-- start-placeholder="开始日期"-->
  212. <!-- end-placeholder="结束日期"-->
  213. <!-- format="yyyy-MM-dd HH:mm"-->
  214. <!-- value-format="yyyy-MM-dd HH:mm"-->
  215. <!-- clearable>-->
  216. <!-- </el-date-picker>-->
  217. <!-- </el-checkbox>-->
  218. <!-- </el-form-item>-->
  219. <!-- </el-col>-->
  220. <!-- <el-col :span="9" v-show="fold">-->
  221. <!-- <el-form-item label="ETA">-->
  222. <!-- <el-checkbox v-model="etaDisabled">-->
  223. <!-- <el-date-picker-->
  224. <!-- v-model="etaList"-->
  225. <!-- style="width: 100%"-->
  226. <!-- :disabled="!etaDisabled"-->
  227. <!-- size="small"-->
  228. <!-- type="datetimerange"-->
  229. <!-- range-separator="至"-->
  230. <!-- start-placeholder="开始日期"-->
  231. <!-- end-placeholder="结束日期"-->
  232. <!-- format="yyyy-MM-dd HH:mm"-->
  233. <!-- value-format="yyyy-MM-dd HH:mm"-->
  234. <!-- clearable>-->
  235. <!-- </el-date-picker>-->
  236. <!-- </el-checkbox>-->
  237. <!-- </el-form-item>-->
  238. <!-- </el-col>-->
  239. <!-- <el-col :span="6" v-show="fold">-->
  240. <!-- <el-form-item label="创建部门">-->
  241. <!-- &lt;!&ndash;<el-input placeholder="请输入创建部门" clearable&ndash;&gt;-->
  242. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.createDeptName">&ndash;&gt;-->
  243. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  244. <!-- <tree-select v-model="query.createDeptName" filterable-->
  245. <!-- :data="createDeptData"-->
  246. <!-- :props="{label: 'title', children:'children' }"-->
  247. <!-- nodeKey="title"-->
  248. <!-- size="small"-->
  249. <!-- :multiple="false"-->
  250. <!-- placeholder="请选择创建部门"-->
  251. <!-- @focus="createDeptLzylistfun"-->
  252. <!-- @input="corpChange($event,'createDeptName')">-->
  253. <!-- </tree-select>-->
  254. <!-- </el-form-item>-->
  255. <!-- </el-col>-->
  256. <!-- <el-col :span="6" v-show="fold">-->
  257. <!-- <el-form-item label="订舱代理">-->
  258. <!-- &lt;!&ndash;<el-input placeholder="请输入订舱代理" clearable&ndash;&gt;-->
  259. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.bookingAgentCnName">&ndash;&gt;-->
  260. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  261. <!-- <search-query :datalist="bookingAgentData"-->
  262. <!-- :selectValue="query.bookingAgentCnName"-->
  263. <!-- :filterable="true"-->
  264. <!-- :clearable="true"-->
  265. <!-- :remote="true"-->
  266. <!-- :buttonIf="false"-->
  267. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  268. <!-- placeholder="请输入订舱代理"-->
  269. <!-- @remoteMethod="bookingAgentBcorpsListfun"-->
  270. <!-- @corpChange="corpChange($event,'bookingAgentCnName')"-->
  271. <!-- @corpFocus="bookingAgentBcorpsListfun">-->
  272. <!-- </search-query>-->
  273. <!-- </el-form-item>-->
  274. <!-- </el-col>-->
  275. <!-- <el-col :span="6" v-show="fold">-->
  276. <!-- <el-form-item label="签单方式">-->
  277. <!-- <search-query-->
  278. <!-- :datalist="issueTypeData"-->
  279. <!-- :selectValue="query.issueType"-->
  280. <!-- :filterable="true"-->
  281. <!-- :clearable="true"-->
  282. <!-- :remote="true"-->
  283. <!-- :buttonIf="false"-->
  284. <!-- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictValue'}"-->
  285. <!-- @corpChange="corpChange($event,'issueType')" >-->
  286. <!-- </search-query>-->
  287. <!-- </el-form-item>-->
  288. <!-- </el-col>-->
  289. <!-- <el-col :span="6" v-show="fold">-->
  290. <!-- <el-form-item label="收货人">-->
  291. <!-- &lt;!&ndash;<el-input placeholder="请输入收货人" clearable&ndash;&gt;-->
  292. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.hConsigneeCnName">&ndash;&gt;-->
  293. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  294. <!-- <search-query :datalist="hConsigneeData"-->
  295. <!-- :selectValue="query.hConsigneeCnName"-->
  296. <!-- :filterable="true"-->
  297. <!-- :clearable="true"-->
  298. <!-- :remote="true"-->
  299. <!-- :buttonIf="false"-->
  300. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  301. <!-- placeholder="请选择收货人"-->
  302. <!-- @remoteMethod="hConsigneeBcorpslistByType"-->
  303. <!-- @corpChange="corpChange($event,'hConsigneeCnName')"-->
  304. <!-- @corpFocus="hConsigneeBcorpslistByType" >-->
  305. <!-- </search-query>-->
  306. <!-- </el-form-item>-->
  307. <!-- </el-col>-->
  308. <!-- </el-row>-->
  309. <!-- </el-form>-->
  310. <!--</template>-->
  311. <!--<template slot="searchMenu" slot-scope="{row,size}">-->
  312. <!-- <el-button type="text" @click="shiftCollapsiable">-->
  313. <!-- <span>-->
  314. <!-- {{ fold ? '收起' : '展开' }}-->
  315. <!-- <i :class="fold ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>-->
  316. <!-- </span>-->
  317. <!-- </el-button>-->
  318. <!--</template>-->
  319. <!--#endregion-->
  320. <template slot="menuLeft">
  321. <el-button type="primary" size="small" @click="addbtnfun()">新建业务
  322. </el-button>
  323. <el-button type="primary"
  324. size="small"
  325. plain @click="CopyDocumentsfun">复制单据
  326. </el-button>
  327. <el-button type="success"
  328. size="small"
  329. plain
  330. @click="increaseMawb">分单->主单
  331. </el-button>
  332. <el-button type="warning"
  333. size="small"
  334. plain
  335. v-if="query.billStatus == 0"
  336. @click="Disembarkingfun">退 舱
  337. </el-button>
  338. <el-button type="primary"
  339. size="small"
  340. plain
  341. v-if="query.billStatus == 1"
  342. @click="revokeWithdrawalfun" >撤销退舱
  343. </el-button>
  344. <el-button type="danger"
  345. size="small"
  346. plain
  347. v-if="query.billStatus != 3"
  348. @click="handleDelete">删 除
  349. </el-button>
  350. <el-button type="warning"
  351. size="small"
  352. @click="outExport">导 出
  353. </el-button>
  354. <!--<el-dropdown style="line-height: 0">-->
  355. <!-- <el-button size="small" type="success" style="margin-right: 8px" :disabled="selectionList.length == 0" >-->
  356. <!-- 发送 EDI<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
  357. <!-- </el-button>-->
  358. <!-- <el-dropdown-menu slot="dropdown">-->
  359. <!-- <el-dropdown-item v-for="item in ediData" :key="item.id"-->
  360. <!-- @click.native="editypesSendingEdifun(item)" >{{item.cnName}}-->
  361. <!-- </el-dropdown-item>-->
  362. <!-- </el-dropdown-menu>-->
  363. <!--</el-dropdown>-->
  364. <div style="margin-top: 10px">
  365. <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
  366. <el-tab-pane label="接单" name="0">
  367. <span slot="label">接单</span>
  368. </el-tab-pane>
  369. <el-tab-pane label="退舱" name="1">
  370. <span slot="label" style="color: #d86363">退舱</span>
  371. </el-tab-pane>
  372. <el-tab-pane label="完成" name="3"></el-tab-pane>
  373. </el-tabs>
  374. </div>
  375. </template>
  376. <template slot-scope="scope" slot="menu">
  377. <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != scope.row.createUser:false"-->
  378. <el-button :type="scope.type" :size="scope.size" icon="el-icon-edit"
  379. @click.stop="rowCellfun(scope.row.id, scope.row)">编辑
  380. </el-button>
  381. </template>
  382. <template slot="expand" slot-scope="{row}" >
  383. <SplitList :typeMenu="true" :data="row.billsListAllData" :loading="SplitLoading" @corpfun="rowCellfun" ></SplitList>
  384. </template>
  385. <temolate slot="billStatus" slot-scope="{row}">
  386. <span v-if="row.billStatus == item.dictKey"
  387. v-for="(item,index) in billStatusData" :key="index"
  388. :style="{'color':item.colour}" >
  389. {{item.dictValue}}
  390. </span>
  391. </temolate>
  392. <template slot="accountStatus" slot-scope="{ row }">
  393. <span v-if="row.accountStatus == item.dictKey"
  394. v-for="(item,index) in accountStatusData" :key="index"
  395. :style="{'color':item.colour}" >
  396. {{item.dictValue}}
  397. </span>
  398. </template>
  399. <template slot="corpCnName" slot-scope="scope">
  400. <span
  401. style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
  402. @click.stop="rowCellfun(scope.row.id, scope.row)">
  403. {{ scope.row.corpCnName }}
  404. </span>
  405. </template>
  406. <template slot="billNo" slot-scope="scope">
  407. <span style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
  408. @click.stop="rowCellfun(scope.row.id, scope.row)" >
  409. {{scope.row.billNo}}
  410. </span>
  411. </template>
  412. <template slot="eta" slot-scope="scope">
  413. <span>{{scope.row.eta?scope.row.eta.slice(0,10):''}}</span>
  414. </template>
  415. <template slot="updateTime" slot-scope="scope">
  416. <span>{{scope.row.updateTime?scope.row.updateTime.slice(0,10):''}}</span>
  417. </template>
  418. </avue-crud>
  419. </basic-container>
  420. <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :key="datekey"></bills-details>
  421. <el-dialog
  422. title="主单列表"
  423. :visible.sync="dialogVisible"
  424. append-to-body
  425. width="60%"
  426. :before-close="handleClose">
  427. <avue-crud :option="mawbOption"
  428. :table-loading="mawbloading"
  429. :data="mawbData"
  430. :page.sync="mawbPage"
  431. :search="mawbQuery"
  432. ref="mawbOptionCrud"
  433. id="out-table"
  434. :header-cell-class-name="headerClassName"
  435. @search-change="mawbSearch"
  436. @size-change="mawbSizeChange"
  437. @current-change="mawbCurrentChange"
  438. @resetColumn="resetColumnTwo('mawbOptionCrud', 'mawbOption', 'mawbOptionBack', 309.7)"
  439. @saveColumn="saveColumnTwo('mawbOptionCrud', 'mawbOption', 'mawbOptionBack', 309.7)"
  440. >
  441. <template slot="radio" slot-scope="{row}">
  442. <el-radio v-model="dialogRadio" :label="row.id" @input="radioInput(row)"></el-radio>
  443. </template>
  444. </avue-crud>
  445. <span slot="footer" class="dialog-footer">
  446. <el-button @click="dialogVisible = false;dialogRadio = null">取 消</el-button>
  447. <el-button type="primary" @click="AddToMainOrder">确 定</el-button>
  448. </span>
  449. </el-dialog>
  450. </div>
  451. </template>
  452. <script>
  453. import {
  454. billsList,
  455. billsDetail,
  456. billsSubmit,
  457. billsRemove,
  458. billsIncreaseReinsurancePolicy, billsListAll, billsDisembarking, editypesSendingEdi, billsRevokeDisembarking
  459. } from "@/api/iosBasicData/bills";
  460. import {mapGetters} from "vuex";
  461. import billsDetails from "@/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue";
  462. import feesTemplateItems from "@/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue";
  463. import SplitList from "@/views/iosBasicData/OceanFreightImport/bills/assembly/SplitList.vue";
  464. import {getWorkDicts} from "@/api/system/dictbiz";
  465. import {dateFormat, defaultDate} from "@/util/date";
  466. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  467. import {editypesList} from "@/api/iosBasicData/editypes";
  468. import {getBvesselsList} from "@/api/iosBasicData/bvessels";
  469. import {getBcorpslistByType,getBcorpsDetail} from "@/api/iosBasicData/bcorps";
  470. import {bportsList} from "@/api/iosBasicData/bports";
  471. import {blinesList} from "@/api/iosBasicData/blines";
  472. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  473. import { getDeptTree } from "@/api/system/dept";
  474. import {getToken} from "@/util/auth";
  475. export default {
  476. components:{TreeSelect, SearchQuery, feesTemplateItems, billsDetails,SplitList},
  477. data() {
  478. return {
  479. datekey:Date.now(),
  480. ediData:[], // 获取的 edi 数据
  481. // 展开和收回
  482. fold:false,
  483. maxShow:3,
  484. corpData:[], //委托人
  485. hConsigneeData:[], // 收货人
  486. // 船名
  487. vesselData:[],
  488. // 船公司
  489. carrierData:[],
  490. // 目的港(卸货港)
  491. podData:[],
  492. // 航线
  493. lineData:[],
  494. // 场站
  495. cyData:[],
  496. // 订舱代理
  497. bookingAgentData:[],
  498. createDeptData:[], // 部门数据
  499. // 单据类型
  500. billTypeData:[
  501. {
  502. label: '直单',
  503. value: 'DD'
  504. }, {
  505. label: '主单',
  506. value: 'MM'
  507. },{
  508. label: '分单',
  509. value: 'MH'
  510. }
  511. ],
  512. // 业务来源
  513. srcTypeData:[
  514. {
  515. label:'公司',
  516. value:'OWN'
  517. },
  518. {
  519. label:'代理',
  520. value:'AGENT'
  521. },
  522. {
  523. label:'业务员',
  524. value:'SALES'
  525. }
  526. ],
  527. // 签单方式
  528. issueTypeData:[],
  529. isShow:true,
  530. detailData:{},
  531. dialogVisible:false, // 弹窗开启
  532. // ETD是否可以检索
  533. etdDisabled:false,
  534. // ETA是否可以检索
  535. etaDisabled:false,
  536. form: {},
  537. // 开船日期和到港日期
  538. etdList:[defaultDate(1)[0] + ' 00:00',defaultDate(1)[1] + ' 23:59'],
  539. etaList:[defaultDate(1)[0] + ' 00:00',defaultDate(1)[1] + ' 23:59'],
  540. // 表格的检索条件
  541. query: {
  542. billStatus:'0',
  543. },
  544. // 弹窗的搜索项
  545. mawbQuery:{
  546. billType:'MM',
  547. },
  548. loading: true,
  549. // 弹窗加载
  550. mawbloading:false,
  551. // 下拉的加载
  552. SplitLoading:false,
  553. page: {
  554. pageSize: 10,
  555. currentPage: 1,
  556. total: 0
  557. },
  558. // 弹窗分页
  559. mawbPage:{
  560. pageSize: 10,
  561. currentPage: 1,
  562. total: 0
  563. },
  564. selectionList: [],
  565. // 弹窗的选择数据
  566. dialogRadio:null,
  567. option:{},
  568. optionBack: {
  569. // selectable:(row,index)=>{
  570. // // 禁用主单
  571. // return row.billType != 'MM'
  572. // },
  573. expand: true,
  574. expandRowKeys:[],
  575. rowKey:'id',
  576. height:500,
  577. calcHeight: 30,
  578. tip: false,
  579. searchShow: true,
  580. searchMenuSpan: 6,
  581. searchLabelWidth:'100',
  582. border: true,
  583. index: true,
  584. selection: true,
  585. dialogClickModal: false,
  586. highlightCurrentRow:true, // 单选
  587. searchIcon: true,
  588. searchIndex: 3,
  589. stripe:true,
  590. addBtn:false,
  591. viewBtn:false,
  592. delBtn:false,
  593. editBtn:false,
  594. menuWidth:'auto',
  595. column: [
  596. {
  597. label: "单据类型",
  598. prop: "billType",
  599. type: 'select',
  600. search:true,
  601. span:6,
  602. searchOrder:4,
  603. dicData: [{
  604. label: '直单',
  605. value: 'DD'
  606. }, {
  607. label: '主单',
  608. value: 'MM'
  609. },{
  610. label: '分单',
  611. value: 'MH'
  612. }],
  613. overHidden:true,
  614. },
  615. {
  616. label: "单据编号",
  617. prop: "billNo",
  618. width:"160",
  619. overHidden:true,
  620. search:true,
  621. span:6,
  622. searchOrder:3,
  623. },
  624. {
  625. label: "所属团队",
  626. prop: "teamName",
  627. overHidden:true,
  628. },
  629. {
  630. label: "客户名",
  631. prop: "corpCnName",
  632. width:"160",
  633. overHidden:true,
  634. search:true,
  635. type:'select',
  636. dicData:[],
  637. filterable:true,
  638. remote:true,
  639. dicUrl:"/api/blade-los/bcorps/listByType?cnName={{key}}",
  640. props: {
  641. label: 'cnName',
  642. value: 'cnName',
  643. res:'data.records'
  644. },
  645. span:6,
  646. searchOrder:2,
  647. },
  648. {
  649. label: "客户英文",
  650. prop: "corpEnName",
  651. width:"160",
  652. overHidden:true,
  653. },
  654. {
  655. label: "船名",
  656. prop: "vesselCnName",
  657. overHidden:true,
  658. type:'select',
  659. dicData:[],
  660. filterable:true,
  661. remote:true,
  662. dicUrl:"/api/blade-los/bvessels/list?cnName={{key}}",
  663. props: {
  664. label: 'cnName',
  665. value: 'cnName',
  666. res:'data.records'
  667. },
  668. search:true,
  669. span:6,
  670. searchOrder:6,
  671. },
  672. {
  673. label: "航次",
  674. prop: "voyageNo",
  675. width: "80",
  676. overHidden: true,
  677. search:true,
  678. span:6,
  679. searchOrder:6,
  680. },
  681. {
  682. label: "MB/L NO",
  683. prop: "mblno",
  684. width: "80",
  685. overHidden: true,
  686. search:true,
  687. span:6,
  688. searchOrder:1,
  689. },
  690. {
  691. label: "HB/L NO",
  692. prop: "hblno",
  693. width: "80",
  694. overHidden: true,
  695. search:true,
  696. span:6,
  697. searchOrder:5,
  698. },
  699. {
  700. label: "开船日期",
  701. prop: "etd",
  702. searchProp:"etdList",
  703. type: "date",
  704. unlinkPanels: true,
  705. searchRange: true,
  706. overHidden: true,
  707. format: "yyyy-MM-dd",
  708. valueFormat: "yyyy-MM-dd HH:mm:ss",
  709. searchDefaultTime: ["00:00:00", "23:59:59"],
  710. search:true,
  711. span:6,
  712. searchOrder:14,
  713. },
  714. {
  715. label: "到港日期",
  716. prop: "eta",
  717. width: "80",
  718. overHidden: true,
  719. searchProp:"etaList",
  720. type: "date",
  721. unlinkPanels: true,
  722. searchRange: true,
  723. format: "yyyy-MM-dd",
  724. valueFormat: "yyyy-MM-dd HH:mm:ss",
  725. searchDefaultTime: ["00:00:00", "23:59:59"],
  726. search:true,
  727. span:6,
  728. searchOrder:15,
  729. },
  730. {
  731. label: "船公司",
  732. prop: "carrierCnName",
  733. overHidden:true,
  734. type:'select',
  735. dicData:[],
  736. filterable:true,
  737. remote:true,
  738. dicUrl:"/api/blade-los/bcorps/listByType?cnName={{key}}",
  739. props: {
  740. label: 'cnName',
  741. value: 'cnName',
  742. res:'data.records'
  743. },
  744. search:true,
  745. span:6,
  746. searchOrder:8,
  747. },
  748. {
  749. label: "装货港",
  750. prop: "polEnName",
  751. width:"120",
  752. overHidden:true,
  753. },
  754. {
  755. label: "目的港",
  756. prop: "podEnName",
  757. width:"120",
  758. overHidden:true,
  759. type:'select',
  760. dicData:[],
  761. filterable:true,
  762. remote:true,
  763. dicUrl:"/api/blade-los/bports/list?enName={{key}}",
  764. props: {
  765. label: 'enName',
  766. value: 'enName',
  767. res:'data.records'
  768. },
  769. search:true,
  770. span:6,
  771. searchOrder:9,
  772. },
  773. {
  774. label: "航线",
  775. prop: "lineCnName",
  776. width:"120",
  777. overHidden:true,
  778. type:'select',
  779. dicData:[],
  780. filterable:true,
  781. remote:true,
  782. dicUrl:"/api/blade-los/blines/list?cnName={{key}}",
  783. props: {
  784. label: 'cnName',
  785. value: 'cnName',
  786. res:'data.records'
  787. },
  788. search:true,
  789. span:6,
  790. searchOrder:10,
  791. },
  792. {
  793. label: "场站",
  794. prop: "cyCnName",
  795. width:"120",
  796. overHidden:true,
  797. type:'select',
  798. dicData:[],
  799. filterable:true,
  800. remote:true,
  801. dicUrl:"/api/blade-los/bcorps/listByType?cnName={{key}}",
  802. props: {
  803. label: 'cnName',
  804. value: 'cnName',
  805. res:'data.records'
  806. },
  807. search:true,
  808. span:6,
  809. searchOrder:11,
  810. },
  811. {
  812. label: "箱型/箱量",
  813. prop: "quantityCntrDescr",
  814. width:"120",
  815. overHidden:true,
  816. },
  817. {
  818. label: "业务来源",
  819. prop: "srcType",
  820. type: 'select',
  821. dicData: [
  822. {
  823. label:'公司',
  824. value:'OWN'
  825. },
  826. {
  827. label:'代理',
  828. value:'AGENT'
  829. },
  830. {
  831. label:'业务员',
  832. value:'SALES'
  833. }
  834. ],
  835. overHidden:true,
  836. search:true,
  837. span:6,
  838. searchOrder:12,
  839. },
  840. {
  841. label: "来源详情",
  842. prop: "srcCnName",
  843. width: "80",
  844. overHidden: true,
  845. search:true,
  846. span:6,
  847. searchOrder:13,
  848. },
  849. {
  850. label: "装箱方式",
  851. prop: "loadType",
  852. type: 'select',
  853. dicData: [{
  854. label: '整箱',
  855. value: 'FCL'
  856. }, {
  857. label: '拼箱',
  858. value: 'LCL'
  859. }],
  860. overHidden:true,
  861. },
  862. {
  863. label: "货物类别",
  864. prop: "cargoType",
  865. type: 'select',
  866. dicData: [{
  867. label: '普货',
  868. value: 'dry'
  869. }, {
  870. label: '危险品',
  871. value: 'danger'
  872. },{
  873. label: '冻柜',
  874. value: 'reefer'
  875. }],
  876. overHidden:true,
  877. },
  878. {
  879. label: "创建部门",
  880. prop: "createDeptName",
  881. width:"120",
  882. overHidden:true,
  883. type:'tree',
  884. dicData:[],
  885. dicUrl:"/api/blade-system/dept/tree",
  886. props: {
  887. label: 'title',
  888. value:'title',
  889. children:'children'
  890. },
  891. search:true,
  892. span:6,
  893. searchOrder:16,
  894. },
  895. {
  896. label: "订舱代理",
  897. prop: "bookingAgentCnName",
  898. width:"120",
  899. overHidden:true,
  900. type:'select',
  901. dicData:[],
  902. filterable:true,
  903. remote:true,
  904. dicUrl:"/api/blade-los/bcorps/listByType?cnName={{key}}",
  905. props: {
  906. label: 'cnName',
  907. value: 'cnName',
  908. res:'data.records'
  909. },
  910. search:true,
  911. span:6,
  912. searchOrder:16,
  913. },
  914. {
  915. label: "收货人",
  916. prop: "hConsigneeCnName",
  917. width:"120",
  918. overHidden:true,
  919. type:'select',
  920. dicData:[],
  921. filterable:true,
  922. remote:true,
  923. dicUrl:"/api/blade-los/bcorps/listByType?cnName={{key}}",
  924. props: {
  925. label: 'cnName',
  926. value: 'cnName',
  927. res:'data.records'
  928. },
  929. search:true,
  930. span:6,
  931. searchOrder:18,
  932. },
  933. {
  934. label: "签单方式",
  935. prop: "issueType",
  936. width:"120",
  937. overHidden:true,
  938. type:'select',
  939. dicData:[],
  940. dicUrl:"/api/blade-system/dict-biz/dictionary",
  941. props: {
  942. label: 'dictValue',
  943. value: 'dictValue',
  944. },
  945. search:true,
  946. span:6,
  947. searchOrder:17,
  948. },
  949. {
  950. label: "唛头",
  951. prop: "marks",
  952. width: "80",
  953. overHidden: true,
  954. },
  955. {
  956. label: "件数",
  957. prop: "quantity",
  958. overHidden:true,
  959. },
  960. {
  961. label: "毛重 (KGM)",
  962. prop: "grossWeight",
  963. width:"120",
  964. overHidden:true,
  965. },
  966. {
  967. label: "净重 (KGM)",
  968. prop: "netWeight",
  969. width:"120",
  970. overHidden:true,
  971. },
  972. {
  973. label: "体积 (CBM)",
  974. prop: "measurement",
  975. width:"120",
  976. overHidden:true,
  977. },
  978. {
  979. label: "TEU箱数",
  980. prop: "teu",
  981. width:"100",
  982. overHidden:true,
  983. },
  984. {
  985. label: "V20",
  986. prop: "quantityV20",
  987. width:"100",
  988. overHidden:true,
  989. },
  990. {
  991. label: "V40",
  992. prop: "quantityV40",
  993. width:"100",
  994. overHidden:true,
  995. },
  996. {
  997. label: "40HC",
  998. prop: "quantityV40hc",
  999. width:"100",
  1000. overHidden:true,
  1001. },
  1002. {
  1003. label: "V45",
  1004. prop: "quantityV45",
  1005. width:"100",
  1006. overHidden:true,
  1007. },
  1008. {
  1009. label: "V48",
  1010. prop: "quantityV48",
  1011. width:"100",
  1012. overHidden:true,
  1013. },
  1014. {
  1015. label: "需陆运",
  1016. prop: "isNeedLand",
  1017. type: 'select',
  1018. dicData: [{
  1019. label: '否',
  1020. value: 0
  1021. }, {
  1022. label: '是',
  1023. value: 1
  1024. }],
  1025. overHidden:true,
  1026. },
  1027. {
  1028. label: "需报关",
  1029. prop: "isNeedDeclare",
  1030. type: 'select',
  1031. dicData: [{
  1032. label: '否',
  1033. value: 0
  1034. }, {
  1035. label: '是',
  1036. value: 1
  1037. }],
  1038. overHidden:true,
  1039. },
  1040. {
  1041. label: "需三检",
  1042. prop: "isNeedIq",
  1043. type: 'select',
  1044. dicData: [{
  1045. label: '否',
  1046. value: 0
  1047. }, {
  1048. label: '是',
  1049. value: 1
  1050. }],
  1051. overHidden:true,
  1052. },
  1053. {
  1054. label: "应收(CNY)",
  1055. prop: "amountDr",
  1056. width: "160",
  1057. overHidden:true,
  1058. },
  1059. {
  1060. label: "应付(CNY)",
  1061. prop: "amountCr",
  1062. width: "160",
  1063. overHidden:true,
  1064. },
  1065. {
  1066. label: "利润(CNY)",
  1067. prop: "amountProfit",
  1068. width: "160",
  1069. overHidden:true,
  1070. },
  1071. {
  1072. // label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
  1073. label: "综合应付(USD)",
  1074. prop: "amountCrUsd",
  1075. width: "120",
  1076. overHidden:true,
  1077. },
  1078. {
  1079. label: "综合利润(USD)",
  1080. prop: "amountProfitUsd",
  1081. width: "120",
  1082. overHidden:true,
  1083. },
  1084. {
  1085. label: "合计应收(CNY )",
  1086. prop: "amountDrLoc",
  1087. width:"160",
  1088. overHidden:true,
  1089. },
  1090. {
  1091. label: "合计应付(CNY)",
  1092. prop: "amountCrLoc",
  1093. width:"160",
  1094. overHidden:true,
  1095. },
  1096. {
  1097. label: "合计利润(CNY)",
  1098. prop: "amountProfitLoc",
  1099. width:"160",
  1100. overHidden:true,
  1101. },
  1102. {
  1103. label: "应收对账状态",
  1104. prop: "checkDrStatusDescr",
  1105. width:"160",
  1106. overHidden:true,
  1107. },
  1108. {
  1109. label: "应付对账状态",
  1110. prop: "checkCrStatusDescr",
  1111. width:"160",
  1112. overHidden:true,
  1113. },
  1114. {
  1115. label: "应收结算状态",
  1116. prop: "stlDrStatusDescr",
  1117. width:"160",
  1118. overHidden:true,
  1119. },
  1120. {
  1121. label: "应付结算状态",
  1122. prop: "stlCrStatusDescr",
  1123. width:"160",
  1124. overHidden:true,
  1125. },
  1126. {
  1127. label: "销项发票状态",
  1128. prop: "invoiceDrStatusDescr",
  1129. width:"160",
  1130. overHidden:true,
  1131. },
  1132. {
  1133. label: "进项发票状态",
  1134. prop: "invoiceCrStatusDescr",
  1135. width:"160",
  1136. overHidden:true,
  1137. },
  1138. {
  1139. label: "创建人",
  1140. prop: "createUserName",
  1141. rules: [{
  1142. required: true,
  1143. message: "请输入创建人",
  1144. trigger: "blur"
  1145. }],
  1146. overHidden:true,
  1147. },
  1148. {
  1149. label: "创建时间",
  1150. prop: "createTime",
  1151. width:"160",
  1152. overHidden:true,
  1153. },
  1154. {
  1155. label: "更新人",
  1156. prop: "updateUserName",
  1157. overHidden:true,
  1158. },
  1159. {
  1160. label: "更新时间",
  1161. prop: "updateTime",
  1162. width:"160",
  1163. overHidden:true,
  1164. },
  1165. {
  1166. label: "edi发送状态",
  1167. prop: "ediStatus",
  1168. type:"select",
  1169. dicData: [
  1170. {
  1171. label: '未发送',
  1172. value: '0'
  1173. },{
  1174. label: '已发送',
  1175. value: '1'
  1176. }
  1177. ],
  1178. width: "100",
  1179. overHidden:true,
  1180. },
  1181. {
  1182. label: "业务状态",
  1183. prop: "billStatus",
  1184. type:"select",
  1185. dicData: [],
  1186. props: {
  1187. label: "dictValue",
  1188. value: "dictKey"
  1189. },
  1190. width: "100",
  1191. overHidden:true,
  1192. },
  1193. {
  1194. label: "财务状态",
  1195. prop: "accountStatus",
  1196. type:"select",
  1197. dicData: [],
  1198. props: {
  1199. label: "dictValue",
  1200. value: "dictKey"
  1201. },
  1202. width: "180",
  1203. overHidden:true,
  1204. },
  1205. {
  1206. label: "审核状态",
  1207. prop: "status",
  1208. type: 'select',
  1209. dicData: [],
  1210. props: {
  1211. label: "dictValue",
  1212. value: "dictKey"
  1213. },
  1214. overHidden:true,
  1215. },
  1216. {
  1217. label: "备注",
  1218. prop: "remarks",
  1219. overHidden:true,
  1220. },
  1221. ]
  1222. },
  1223. // 弹窗的配置
  1224. mawbOption:{},
  1225. mawbOptionBack:{
  1226. height:'450',
  1227. calcHeight: 30,
  1228. tip: false,
  1229. searchShow: true,
  1230. searchMenuSpan: 6,
  1231. border: true,
  1232. selection: false, // 多选
  1233. dialogClickModal: false,
  1234. stripe:true,
  1235. addBtn:false,
  1236. viewBtn:false,
  1237. delBtn:false,
  1238. editBtn:false,
  1239. menu:false,
  1240. menuWidth:'auto',
  1241. column: [
  1242. {
  1243. label: '',
  1244. prop: 'radio',
  1245. width: 35,
  1246. hide: false
  1247. },
  1248. {
  1249. label: "船名",
  1250. prop: "vesselCnName",
  1251. overHidden:true,
  1252. },
  1253. {
  1254. label: "航次",
  1255. prop: "voyageNo",
  1256. overHidden:true,
  1257. },
  1258. {
  1259. label: "MB/L NO",
  1260. prop: "mblno",
  1261. search:true,
  1262. overHidden:true,
  1263. },
  1264. {
  1265. label: "HB/L NO",
  1266. prop: "hblno",
  1267. search:true,
  1268. overHidden:true,
  1269. },
  1270. {
  1271. label: "开船日期",
  1272. prop: "etd",
  1273. overHidden:true,
  1274. },
  1275. {
  1276. label: "到港日期",
  1277. prop: "eta",
  1278. overHidden:true,
  1279. },
  1280. {
  1281. label: "装货港",
  1282. prop: "polCnName",
  1283. overHidden:true,
  1284. },
  1285. {
  1286. label: "卸货港",
  1287. prop: "podCnName",
  1288. width:"120",
  1289. overHidden:true,
  1290. },
  1291. {
  1292. label: "单据编号",
  1293. prop: "billNo",
  1294. width:"160",
  1295. overHidden:true,
  1296. },
  1297. {
  1298. label: "客户名",
  1299. prop: "corpCnName",
  1300. overHidden:true,
  1301. },
  1302. {
  1303. label: "客户英文",
  1304. prop: "corpEnName",
  1305. overHidden:true,
  1306. },
  1307. {
  1308. label: "件数",
  1309. prop: "quantity",
  1310. overHidden:true,
  1311. },
  1312. {
  1313. label: "包装单位",
  1314. prop: "packingUnit",
  1315. overHidden:true,
  1316. },
  1317. {
  1318. label: "毛重",
  1319. prop: "grossWeight",
  1320. overHidden:true,
  1321. },
  1322. {
  1323. label: "净重",
  1324. prop: "netWeight",
  1325. overHidden:true,
  1326. },
  1327. {
  1328. label: "体积",
  1329. prop: "measurement",
  1330. overHidden:true,
  1331. },
  1332. {
  1333. label: "单据日期",
  1334. prop: "billDate",
  1335. width:"150",
  1336. overHidden:true,
  1337. },
  1338. ]
  1339. },
  1340. data: [],
  1341. // 弹窗数据
  1342. mawbData:[],
  1343. // 业务状态数据
  1344. billStatusData:[],
  1345. // 财务状态
  1346. accountStatusData:[],
  1347. saberUserInfo:{}, // 当前登录人个人信息
  1348. };
  1349. },
  1350. computed: {
  1351. ...mapGetters(["permission"]),
  1352. permissionList() {
  1353. return {
  1354. addBtn: this.vaildData(this.permission.bills_add, false),
  1355. viewBtn: this.vaildData(this.permission.bills_view, false),
  1356. delBtn: this.vaildData(this.permission.bills_delete, false),
  1357. editBtn: this.vaildData(this.permission.bills_edit, false)
  1358. };
  1359. },
  1360. ids() {
  1361. let ids = [];
  1362. this.selectionList.forEach(ele => {
  1363. ids.push(ele.id);
  1364. });
  1365. return ids.join(",");
  1366. }
  1367. },
  1368. async created() {
  1369. // 获取当前登录人个人信息
  1370. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  1371. // 首页快捷跳转进来的
  1372. if(this.$route.query.home) {
  1373. this.addbtnfun()
  1374. }
  1375. if (this.$route.query.id) {
  1376. this.rowCellfun(this.$route.query.id)
  1377. }
  1378. this.option = await this.getColumnData(this.getColumnName(309.11), this.optionBack);
  1379. this.mawbOption = await this.getColumnData(this.getColumnName(309.7), this.mawbOptionBack); // 主单列表
  1380. this.billStatusWorkDictsfun() // 获取业务状态字典数据
  1381. this.accountStatusWorkDictsfun() // 获取财务状态字典数据
  1382. this.corpBcorpslistByType() // 获取客户名数据
  1383. this.vesselBvesselsListfun() // 获取船名数据
  1384. this.carrierBcorpslistByTypefun() // 获取船公司数据
  1385. this.podBportsListfun() // 获取目的港数据
  1386. this.lineBlinesListfun() // 获取航线数据
  1387. this.cyBcorpslistByType() // 获取场站数据
  1388. this.hConsigneeBcorpslistByType() // 获取收货人数据
  1389. this.createDeptLzylistfun() // 获取创建部门数据
  1390. this.bookingAgentBcorpsListfun() // 获取订舱代理数据
  1391. this.getWorkDictsfun() // 获取签单方式字典数据
  1392. this.statusWorkDictsfun() // 业务审核类型
  1393. this.editypesListfun() // edi 数据获取
  1394. },
  1395. methods: {
  1396. //导出
  1397. outExport() {
  1398. this.$confirm('是否导出当前所有数据?', '提示', {
  1399. confirmButtonText: '确定',
  1400. cancelButtonText: '取消',
  1401. type: 'warning'
  1402. }).then(() => {
  1403. let queryParams = {}
  1404. queryParams={
  1405. businessType:'SI',
  1406. seaType:'I',
  1407. ...this.query,
  1408. }
  1409. delete queryParams.billStatus
  1410. const routeData = this.$router.resolve({
  1411. path: '/api/blade-los/bills/exportBills', //跳转目标窗口的地址
  1412. query: {
  1413. 'Blade-Auth': getToken(),
  1414. ...queryParams, //括号内是要传递给新窗口的参数
  1415. }
  1416. })
  1417. window.open(routeData.href.slice(1, routeData.href.length));
  1418. })
  1419. },
  1420. // 发送EDI
  1421. editypesSendingEdifun(row){
  1422. row.billId = this.ids
  1423. editypesSendingEdi(row).then(res=>{
  1424. this.$message.success('发送EDI成功')
  1425. this.onLoad(this.page)
  1426. })
  1427. },
  1428. // 获取EDI列表数据
  1429. editypesListfun(){
  1430. editypesList(1,30,{type:'HYJK'}).then(res=>{
  1431. this.ediData = res.data.data.records
  1432. })
  1433. },
  1434. // 展开和收起
  1435. shiftCollapsiable(){
  1436. this.fold = !this.fold
  1437. if(this.fold) {
  1438. this.option.searchMenuSpan = 24
  1439. }else {
  1440. this.option.searchMenuSpan = 6
  1441. }
  1442. },
  1443. // 下拉的回调
  1444. corpChange(value,name) {
  1445. this.query[name] = value
  1446. },
  1447. // 获取签单方式字典数据
  1448. getWorkDictsfun(){
  1449. getWorkDicts('issue_type_F').then(res=>{
  1450. this.issueTypeData = res.data.data
  1451. this.findObject(this.option.column, "issueType").dicData = res.data.data
  1452. })
  1453. },
  1454. // tabs切换筛选
  1455. handleClick(tab, event){
  1456. this.onLoad(this.page, this.query);
  1457. },
  1458. // 获取委托人数据
  1459. corpBcorpslistByType(cnName){
  1460. getBcorpslistByType(1,10,{cnName,status: 0}).then(res=>{
  1461. this.corpData = res.data.data.records
  1462. this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
  1463. })
  1464. },
  1465. // 获取收货人数据
  1466. hConsigneeBcorpslistByType(cnName){
  1467. getBcorpslistByType(1,10,{cnName,status: 0}).then(res=>{
  1468. this.hConsigneeData = res.data.data.records
  1469. this.findObject(this.option.column, "hConsigneeCnName").dicData = res.data.data.records
  1470. })
  1471. },
  1472. // 获取船名
  1473. vesselBvesselsListfun(enName){
  1474. getBvesselsList(1,10,{enName,status: 0}).then(res=>{
  1475. this.vesselData = res.data.data.records
  1476. this.findObject(this.option.column, "vesselCnName").dicData = res.data.data.records
  1477. })
  1478. },
  1479. // 获取船公司数据
  1480. carrierBcorpslistByTypefun(cnName){
  1481. let corpTypeName = '船公司'
  1482. getBcorpslistByType(1,10,{cnName,status: 0,corpTypeName}).then(res=>{
  1483. this.carrierData = res.data.data.records
  1484. this.findObject(this.option.column, "carrierCnName").dicData = res.data.data.records
  1485. })
  1486. },
  1487. // 卸货港数据
  1488. podBportsListfun(enName){
  1489. bportsList(1,10,{enName,status: 0}).then(res=>{
  1490. this.podData = res.data.data.records
  1491. this.findObject(this.option.column, "podEnName").dicData = res.data.data.records
  1492. })
  1493. },
  1494. // 航线数据
  1495. lineBlinesListfun(cnName){
  1496. blinesList(1,10,{cnName,status: 0}).then(res=>{
  1497. this.lineData = res.data.data.records
  1498. this.findObject(this.option.column, "lineCnName").dicData = res.data.data.records
  1499. })
  1500. },
  1501. // 获取场站数据
  1502. cyBcorpslistByType(cnName){
  1503. let corpTypeName = '场站'
  1504. getBcorpslistByType(1,10,{cnName,status: 0,corpTypeName}).then(res=>{
  1505. this.cyData = res.data.data.records
  1506. this.findObject(this.option.column, "cyCnName").dicData = res.data.data.records
  1507. })
  1508. },
  1509. // 订舱代理
  1510. bookingAgentBcorpsListfun(cnName){
  1511. let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'
  1512. getBcorpslistByType(1,10,{cnName,status: 0,corpTypeName}).then(res=>{
  1513. this.bookingAgentData = res.data.data.records
  1514. this.findObject(this.option.column, "bookingAgentCnName").dicData = res.data.data.records
  1515. })
  1516. },
  1517. // 获取核算部分数据 // 机构管理接口
  1518. createDeptLzylistfun(){
  1519. getDeptTree().then(res=>{
  1520. this.createDeptData = res.data.data
  1521. this.findObject(this.option.column, "createDeptName").dicData = res.data.data;
  1522. })
  1523. },
  1524. // 获取业务状态字典数据
  1525. billStatusWorkDictsfun(){
  1526. getWorkDicts('bill_status').then(res=>{
  1527. this.findObject(this.option.column, "billStatus").dicData = res.data.data;
  1528. this.billStatusData = res.data.data
  1529. })
  1530. },
  1531. // 获取财务状态字典数据
  1532. accountStatusWorkDictsfun(){
  1533. getWorkDicts('account_status').then(res=>{
  1534. this.findObject(this.option.column, "accountStatus").dicData = res.data.data;
  1535. this.accountStatusData = res.data.data
  1536. })
  1537. },
  1538. // 获取业务审核状态
  1539. statusWorkDictsfun(){
  1540. getWorkDicts('audit_status_los').then(res=>{
  1541. this.findObject(this.option.column, "status").dicData = res.data.data;
  1542. })
  1543. },
  1544. // 添加到主单
  1545. increaseMawb(){
  1546. if (this.selectionList.length === 0) {
  1547. this.$message.warning("请选择至少一条数据");
  1548. return;
  1549. }
  1550. // 判断是否可以编辑别人业务 true 就没有权限
  1551. if (this.ModifyOthersfun()) return;
  1552. const obj = this.selectionList[0]
  1553. for (let item of this.selectionList) {
  1554. if (item.billType != 'MH') {
  1555. this.$message.warning("请选择分单");
  1556. return;
  1557. }
  1558. if (obj.placeReceiptId != item.placeReceiptId) {
  1559. // 收货地
  1560. this.$message.warning("请选择收货地相同的");
  1561. return
  1562. }
  1563. if (obj.polId != item.polId) {
  1564. // 装货港一样
  1565. this.$message.warning("请选择装货港相同的");
  1566. return
  1567. }
  1568. }
  1569. this.mawbQuery.placeReceiptName = obj.placeReceiptName
  1570. this.mawbQuery.polCnName = obj.polCnName
  1571. this.$nextTick(()=>{
  1572. this.dialogVisible = true
  1573. this.mawbOnLoad(this.mawbPage)
  1574. })
  1575. },
  1576. // 退舱
  1577. Disembarkingfun(){
  1578. if (this.selectionList.length === 0) {
  1579. this.$message.warning("请选择至少一条数据");
  1580. return;
  1581. }
  1582. // 判断是否可以编辑别人业务 true 就没有权限
  1583. if (this.ModifyOthersfun()) return;
  1584. this.billsDisembarkingfun(this.ids)
  1585. },
  1586. // 退舱接口
  1587. billsDisembarkingfun(ids){
  1588. billsDisembarking(ids).then(res=>{
  1589. this.$message({
  1590. type: "success",
  1591. message: "操作成功!"
  1592. });
  1593. this.onLoad(this.page)
  1594. })
  1595. },
  1596. // 撤销退仓
  1597. revokeWithdrawalfun(){
  1598. if (this.selectionList.length === 0) {
  1599. this.$message.warning("请选择至少一条数据");
  1600. return;
  1601. }
  1602. this.billsRevokeDisembarkingfun(this.ids)
  1603. },
  1604. // 撤销退舱接口
  1605. billsRevokeDisembarkingfun(ids){
  1606. billsRevokeDisembarking(ids).then(res=>{
  1607. this.$message({
  1608. type: "success",
  1609. message: "操作成功!"
  1610. });
  1611. this.onLoad(this.page)
  1612. })
  1613. },
  1614. // 下拉显示数据
  1615. async expandChange(row){
  1616. if (row.billType == 'MM') {
  1617. this.SplitLoading = true
  1618. const res = await billsListAll({masterId:row.id})
  1619. this.$set(row,'billsListAllData',res.data.data)
  1620. this.SplitLoading = false
  1621. }else {
  1622. this.$refs.crud.toggleRowExpansion(row,false)
  1623. }
  1624. },
  1625. // 弹窗单选
  1626. radioInput(row){
  1627. console.log(row,2134)
  1628. console.log(this.dialogRadio,2083)
  1629. },
  1630. // 弹窗确认
  1631. AddToMainOrder(){
  1632. if (!this.dialogRadio) {
  1633. this.$message.warning("请选择一条数据");
  1634. return
  1635. }
  1636. this.billsIncreaseReinsurancePolicyfun(this.ids,this.dialogRadio)
  1637. },
  1638. // 添加到主单接口
  1639. billsIncreaseReinsurancePolicyfun(ids,id){
  1640. billsIncreaseReinsurancePolicy(ids,id).then(res=>{
  1641. this.dialogRadio = null
  1642. this.$message({
  1643. type: "success",
  1644. message: "操作成功!"
  1645. });
  1646. this.dialogVisible = false
  1647. this.onLoad(this.page)
  1648. })
  1649. },
  1650. // 弹窗关闭
  1651. handleClose(done) {
  1652. this.$confirm('确认关闭?')
  1653. .then(_ => {
  1654. this.dialogRadio = null
  1655. done();
  1656. })
  1657. .catch(_ => {});
  1658. },
  1659. toAddEdit(){
  1660. this.datekey=Date.now()
  1661. },
  1662. // 详情的返回列表
  1663. goBack() {
  1664. // 初始化数据
  1665. // this.detailData = this.$options.data().detailData;
  1666. if (JSON.stringify(this.$route.query) != "{}") {
  1667. this.$router.$avueRouter.closeTag();
  1668. this.$router.push({
  1669. path: "/iosBasicData/OceanFreightImport/bills/index"
  1670. });
  1671. }
  1672. this.isShow = true;
  1673. this.onLoad(this.page, this.search);
  1674. },
  1675. // 新增弹窗开启
  1676. addbtnfun(){
  1677. this.detailData.seeDisabled = false
  1678. this.isShow = false
  1679. },
  1680. // 复制单据
  1681. CopyDocumentsfun(){
  1682. if (this.selectionList.length !== 1) {
  1683. this.$message.warning("请选择一条数据");
  1684. return;
  1685. }
  1686. this.detailData.seeDisabled = false
  1687. this.detailData.id = this.selectionList[0].id
  1688. this.isShow = false
  1689. this.$nextTick(()=>{
  1690. this.$refs.billsDetails.pageLoading = true
  1691. this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id)
  1692. })
  1693. },
  1694. // 编辑详情打开
  1695. rowCellfun(id,row) {
  1696. this.detailData = {
  1697. id:id
  1698. }
  1699. if (row) {
  1700. if (this.saberUserInfo.role_name.indexOf('admin') == -1?this.saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?this.saberUserInfo.user_id == row.createUser:true:true) {
  1701. this.detailData.seeDisabled = false
  1702. }else {
  1703. this.detailData.seeDisabled = true
  1704. }
  1705. }else {
  1706. this.detailData.seeDisabled = false
  1707. }
  1708. this.isShow = false
  1709. this.$nextTick(()=>{
  1710. this.$refs.billsDetails.pageLoading = true
  1711. this.$refs.billsDetails.billsDetailfun(id)
  1712. })
  1713. },
  1714. rowSave(row, done, loading) {
  1715. billsSubmit(row).then(() => {
  1716. this.onLoad(this.page);
  1717. this.$message({
  1718. type: "success",
  1719. message: "操作成功!"
  1720. });
  1721. done();
  1722. }, error => {
  1723. loading();
  1724. window.console.log(error);
  1725. });
  1726. },
  1727. rowUpdate(row, index, done, loading) {
  1728. billsSubmit(row).then(() => {
  1729. this.onLoad(this.page);
  1730. this.$message({
  1731. type: "success",
  1732. message: "操作成功!"
  1733. });
  1734. done();
  1735. }, error => {
  1736. loading();
  1737. console.log(error);
  1738. });
  1739. },
  1740. rowDel(row) {
  1741. this.$confirm("确定将选择数据删除?", {
  1742. confirmButtonText: "确定",
  1743. cancelButtonText: "取消",
  1744. type: "warning"
  1745. })
  1746. .then(() => {
  1747. return billsRemove(row.id);
  1748. })
  1749. .then(() => {
  1750. this.onLoad(this.page);
  1751. this.$message({
  1752. type: "success",
  1753. message: "操作成功!"
  1754. });
  1755. });
  1756. },
  1757. // 删除
  1758. handleDelete() {
  1759. if (this.selectionList.length === 0) {
  1760. this.$message.warning("请选择至少一条数据");
  1761. return;
  1762. }
  1763. // 判断是否可以编辑别人业务 true 就没有权限
  1764. if (this.ModifyOthersfun()) return;
  1765. // 已经提交请核的提示不让删除
  1766. let sumArr = []
  1767. const h = this.$createElement
  1768. for (let item of this.selectionList) {
  1769. if (item.status == 1) {
  1770. sumArr.push(h('p', `序号${item.$index + 1}的数据已经提交请核请勿删除`))
  1771. }
  1772. }
  1773. if(sumArr.length != 0) {
  1774. this.$confirm('提示', {
  1775. message:h('div', sumArr),
  1776. confirmButtonText: "确定",
  1777. cancelButtonText: "取消",
  1778. type: "warning"
  1779. })
  1780. return;
  1781. }
  1782. this.$confirm("确定将选择数据删除?", {
  1783. confirmButtonText: "确定",
  1784. cancelButtonText: "取消",
  1785. type: "warning"
  1786. })
  1787. .then(() => {
  1788. return billsRemove(this.ids);
  1789. })
  1790. .then(() => {
  1791. this.onLoad(this.page);
  1792. this.$message({
  1793. type: "success",
  1794. message: "操作成功!"
  1795. });
  1796. this.$refs.crud.toggleSelection();
  1797. });
  1798. },
  1799. // 判断是否可以编辑别人业务
  1800. ModifyOthersfun(){
  1801. let sumArr = []
  1802. const h = this.$createElement
  1803. // 判断是否有权限
  1804. if (this.saberUserInfo.role_name.indexOf('admin') != -1?this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1:false) return false
  1805. // 当前登录人和选择的创建人对比是不是一个人
  1806. for (let item of this.selectionList) {
  1807. if (this.saberUserInfo.user_id != item.createUser) {
  1808. sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
  1809. }
  1810. }
  1811. if(sumArr.length != 0) {
  1812. this.$confirm('提示', {
  1813. message:h('div', sumArr),
  1814. confirmButtonText: "确定",
  1815. cancelButtonText: "取消",
  1816. type: "warning"
  1817. }).catch(err=>{})
  1818. return true
  1819. }
  1820. },
  1821. beforeOpen(done, type) {
  1822. if (["edit", "view"].includes(type)) {
  1823. billsDetail(this.form.id).then(res => {
  1824. this.form = res.data.data;
  1825. });
  1826. }
  1827. done();
  1828. },
  1829. searchReset() {
  1830. this.query = {};
  1831. this.onLoad(this.page);
  1832. },
  1833. // 搜索
  1834. searchChange(params, done) {
  1835. this.query = params;
  1836. this.page.currentPage = 1;
  1837. // // 判断检索条件是否可以使用
  1838. // if(this.etdDisabled) {
  1839. // this.query.etdList = this.etdList
  1840. // }else {
  1841. // delete params.etdList
  1842. // }
  1843. // if(this.etaDisabled) {
  1844. // this.query.etaList = this.etaList
  1845. // }else {
  1846. // delete params.etaList
  1847. // }
  1848. this.onLoad(this.page, params);
  1849. done();
  1850. },
  1851. selectionChange(list) {
  1852. this.selectionList = list;
  1853. },
  1854. selectionClear() {
  1855. this.selectionList = [];
  1856. this.$refs.crud.toggleSelection();
  1857. },
  1858. currentChange(currentPage){
  1859. this.page.currentPage = currentPage;
  1860. },
  1861. sizeChange(pageSize){
  1862. this.page.pageSize = pageSize;
  1863. },
  1864. refreshChange() {
  1865. this.onLoad(this.page, this.query);
  1866. },
  1867. // 列表获取数据
  1868. onLoad(page, params = {}) {
  1869. this.loading = true;
  1870. billsList(page.currentPage, page.pageSize, {
  1871. ...Object.assign(params, this.query),
  1872. businessType:'SI',
  1873. seaType:'I',
  1874. status:this.query.billStatus == 3?3:undefined,
  1875. }).then(res => {
  1876. const data = res.data.data;
  1877. this.page.total = data.total;
  1878. this.data = data.records.map(item=>{
  1879. item.billsListAllData = []
  1880. item.billStatus = item.billStatus + ''
  1881. item.accountStatus = item.accountStatus + ''
  1882. item.status = item.status + ''
  1883. return item
  1884. })
  1885. this.loading = false;
  1886. this.selectionClear();
  1887. });
  1888. },
  1889. // 弹窗表格获取数据
  1890. mawbOnLoad(page, params = {}){
  1891. this.mawbloading = true;
  1892. billsList(page.currentPage, page.pageSize,
  1893. {...Object.assign(params, this.mawbQuery),businessType:'SI'}).then(res=>{
  1894. const data = res.data.data;
  1895. this.mawbPage.total = data.total;
  1896. this.mawbData = data.records;
  1897. this.mawbloading = false;
  1898. })
  1899. },
  1900. // 弹窗列表的分页
  1901. mawbSizeChange(val){
  1902. this.mawbPage.pageSize = val
  1903. this.mawbOnLoad(this.mawbPage,this.mawbQuery)
  1904. },
  1905. // 弹窗列表的分页
  1906. mawbCurrentChange(val){
  1907. this.mawbPage.currentPage = val
  1908. this.mawbOnLoad(this.mawbPage,this.mawbQuery)
  1909. },
  1910. // 弹窗的搜索
  1911. mawbSearch(params, done){
  1912. this.mawbQuery = params;
  1913. this.mawbPage.currentPage = 1;
  1914. this.mawbOnLoad(this.mawbPage,params)
  1915. done()
  1916. },
  1917. //自定义列保存
  1918. async saveColumnTwo(ref, option, optionBack, code) {
  1919. /**
  1920. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1921. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1922. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1923. */
  1924. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  1925. if (inSave) {
  1926. this.$message.success("保存成功");
  1927. //关闭窗口
  1928. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1929. }
  1930. },
  1931. //自定义列重置
  1932. async resetColumnTwo(ref, option, optionBack, code) {
  1933. this[option] = this[optionBack];
  1934. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  1935. if (inSave) {
  1936. this.$message.success("重置成功");
  1937. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1938. }
  1939. },
  1940. // 更改表格颜色
  1941. headerClassName(tab) {
  1942. //颜色间隔
  1943. let back = ""
  1944. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  1945. if (tab.columnIndex % 2 === 0) {
  1946. back = "back-one"
  1947. } else if (tab.columnIndex % 2 === 1) {
  1948. back = "back-two"
  1949. }
  1950. }
  1951. return back;
  1952. },
  1953. }
  1954. };
  1955. </script>
  1956. <style scoped>
  1957. ::v-deep#out-table .back-one {
  1958. background: #ecf5ff !important;
  1959. text-align: center;
  1960. }
  1961. ::v-deep#out-table .back-two {
  1962. background: #ecf5ff !important;
  1963. text-align: center;
  1964. }
  1965. /deep/ .el-col-md-8 {
  1966. width: 24.33333%;
  1967. }
  1968. ::v-deep.el-form-item {
  1969. margin-bottom: 0;
  1970. }
  1971. </style>