index.vue 79 KB

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