detailPage.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. </div>
  14. <containerTitle title="委托信息" style="margin-top: 50px"></containerTitle>
  15. <basic-container>
  16. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  17. <template slot-scope="scope" slot="corpId">
  18. <crop-select
  19. v-model="goodsForm.corpId"
  20. disabled
  21. ></crop-select>
  22. </template>
  23. <template slot-scope="scope" slot="station">
  24. <port-info
  25. v-model="goodsForm.station"
  26. :disabled="goodsForm.status >= 1"
  27. />
  28. </template>
  29. <template slot-scope="scope" slot="agentId">
  30. <crop-select
  31. :disabled="goodsForm.status >= 1"
  32. v-model="goodsForm.agentId"
  33. ></crop-select>
  34. </template>
  35. <template slot-scope="scope" slot="polId">
  36. <port-info
  37. v-model="goodsForm.polId"
  38. :disabled="goodsForm.status >= 1"
  39. />
  40. </template>
  41. <template slot-scope="scope" slot="podId">
  42. <port-info
  43. v-model="goodsForm.podId"
  44. :disabled="goodsForm.status >= 1"
  45. />
  46. </template>
  47. </avue-form>
  48. </basic-container>
  49. <containerTitle title="其他信息"></containerTitle>
  50. <basic-container :showBtn="true" ref="other">
  51. <avue-form :option="goodsOptionFormTwo" v-model="goodsForm">
  52. <template slot-scope="scope" slot="corpId">
  53. <crop-select
  54. v-model="goodsForm.corpId"
  55. disabled
  56. ></crop-select>
  57. </template>
  58. <template slot-scope="scope" slot="station">
  59. <port-info
  60. v-model="goodsForm.station"
  61. :disabled="goodsForm.status >= 1"
  62. />
  63. </template>
  64. <template slot-scope="scope" slot="agentId">
  65. <crop-select
  66. :disabled="goodsForm.status >= 1"
  67. v-model="goodsForm.agentId"
  68. ></crop-select>
  69. </template>
  70. <template slot-scope="scope" slot="polId">
  71. <port-info
  72. v-model="goodsForm.polId"
  73. :disabled="goodsForm.status >= 1"
  74. />
  75. </template>
  76. <template slot-scope="scope" slot="podId">
  77. <port-info
  78. v-model="goodsForm.podId"
  79. :disabled="goodsForm.status >= 1"
  80. />
  81. </template>
  82. </avue-form>
  83. </basic-container>
  84. <containerTitle
  85. title="起止地信息"></containerTitle>
  86. <basic-container>
  87. <el-table
  88. ref="singleTable"
  89. :data="tableData"
  90. size="mini"
  91. :header-cell-style="{color:'#000',background:'#fafafa'}"
  92. style="width: 100%">
  93. <el-table-column
  94. property="date"
  95. align="center"
  96. width="40">
  97. <template slot-scope="scope">
  98. <span v-if="scope.$index == 0">
  99. <el-button type="primary" size="mini" circle>起</el-button>
  100. </span>
  101. <span v-else-if="scope.$index === tableData.length-1">
  102. <el-button type="success" size="mini" circle>止</el-button>
  103. </span>
  104. <span v-else>
  105. <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>
  106. <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
  107. <el-button type="danger" icon="el-icon-delete" size="mini" circle
  108. @click="deleteAddress(scope)"></el-button>
  109. </el-tooltip>
  110. </span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. type="index"
  115. label="序号"
  116. align="center"
  117. width="60">
  118. </el-table-column>
  119. <el-table-column
  120. property="corpName"
  121. label="货运地点"
  122. align="center"
  123. show-overflow-tooltip
  124. width="200">
  125. </el-table-column>
  126. <!-- <el-table-column-->
  127. <!-- property="province"-->
  128. <!-- label="省市区"-->
  129. <!-- align="center"-->
  130. <!-- width="280">-->
  131. <!-- <template slot-scope="scope">-->
  132. <!-- <el-cascader-->
  133. <!-- size="small"-->
  134. <!-- style="width: 100%;"-->
  135. <!-- v-model="scope.row.region"-->
  136. <!-- disabled-->
  137. <!-- :props="treeOption"></el-cascader>-->
  138. <!-- </template>-->
  139. <!-- </el-table-column>-->
  140. <el-table-column
  141. property="contacts"
  142. align="center"
  143. width="150"
  144. show-overflow-tooltip
  145. label="联系人">
  146. </el-table-column>
  147. <el-table-column
  148. property="tel"
  149. align="center"
  150. width="180"
  151. show-overflow-tooltip
  152. label="电话">
  153. </el-table-column>
  154. <el-table-column
  155. property="address"
  156. align="center"
  157. show-overflow-tooltip
  158. label="详细地址">
  159. </el-table-column>
  160. <el-table-column
  161. property="remarks"
  162. align="center"
  163. show-overflow-tooltip
  164. label="备注">
  165. </el-table-column>
  166. </el-table>
  167. </basic-container>
  168. <containerTitle title="车辆信息"></containerTitle>
  169. <basic-container>
  170. <avue-crud
  171. :data="entrustList"
  172. @selection-change="selectionChange"
  173. :option="entrustOptionTwoT"
  174. ref="crudBoxTwo"
  175. v-if="KeyBoxTwo>0"
  176. @resetColumn="resetColumnBoxTwo"
  177. @saveColumn="saveColumnBoxTwo"
  178. @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
  179. @row-update="rowSaveWell">
  180. <template slot="menuLeft" slot-scope="{size}">
  181. <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
  182. :disabled="selectionList.length === 0">批量调度
  183. </el-button>
  184. </template>
  185. <template slot-scope="{row}" slot="fleetId">
  186. <crop-select
  187. v-if="row.$cellEdit"
  188. v-model="row.fleetId"
  189. @getCorpData="(data)=>{getfleetIdT(data,row)}"
  190. corpType="CD"
  191. ></crop-select>
  192. <span v-else>{{ row.fleetName }}</span>
  193. </template>
  194. <template slot-scope="{row,index}" slot="menu">
  195. <el-button
  196. type="text"
  197. size="small"
  198. v-if="row.status===0"
  199. @click="rowSaveT(row,index)"
  200. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  201. </el-button>
  202. <el-button
  203. size="small"
  204. type="text"
  205. @click="designate(row, index)"
  206. v-if="row.status === 0"
  207. >调 度
  208. </el-button>
  209. <el-button
  210. size="small"
  211. type="text"
  212. @click="cancelDesignate(row, index)"
  213. v-if="row.status===1"
  214. >取消调度
  215. </el-button>
  216. <el-button
  217. size="small"
  218. type="text"
  219. @click="changeFleetT(row, index)"
  220. v-if="row.status===2||row.status===3"
  221. >变 更
  222. </el-button>
  223. <el-button
  224. size="small"
  225. type="text"
  226. @click="recordsOfChanges(row, index)"
  227. v-if="row.status > 1"
  228. >变更记录
  229. </el-button>
  230. </template>
  231. </avue-crud>
  232. </basic-container>
  233. <span>
  234. <!-- <containerTitle title="费用明细"></containerTitle>-->
  235. <!-- <basic-container>-->
  236. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  237. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  238. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  239. <!-- </el-tabs>-->
  240. <!-- <avue-crud-->
  241. <!-- v-if="activeIndex === '1'"-->
  242. <!-- :data="collectionList"-->
  243. <!-- :option="collectionOption"-->
  244. <!-- ref="collection"-->
  245. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  246. <!-- @row-update="rowSave"-->
  247. <!-- @row-del="makeDel">-->
  248. <!-- <template slot-scope="{row}" slot="corpId">-->
  249. <!-- <crop-select-->
  250. <!-- v-if="row.$cellEdit"-->
  251. <!-- v-model="row.corpId"-->
  252. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  253. <!-- ></crop-select>-->
  254. <!-- <span v-else>{{row.corpName}}</span>-->
  255. <!-- </template>-->
  256. <!-- <template slot-scope="{row}" slot="feeId">-->
  257. <!-- <breakdown-select-->
  258. <!-- v-if="row.$cellEdit"-->
  259. <!-- v-model="row.feeId"-->
  260. <!-- @selectValue="(value) => selectValue(value,row)"-->
  261. <!-- :configuration="breakConfiguration"-->
  262. <!-- >-->
  263. <!-- </breakdown-select>-->
  264. <!-- <span v-else>{{ row.feeName }}</span>-->
  265. <!-- </template>-->
  266. <!-- <template slot-scope="{row,index}" slot="menu">-->
  267. <!-- <el-button-->
  268. <!-- type="text"-->
  269. <!-- size="small"-->
  270. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  271. <!-- @click="rowCell(row,index)"-->
  272. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  273. <!-- <el-button type="text"-->
  274. <!-- icon="el-icon-delete"-->
  275. <!-- size="small"-->
  276. <!-- @click="$refs.collection.rowDel(row,index)"-->
  277. <!-- >删除</el-button>-->
  278. <!-- </template>-->
  279. <!-- <template slot="menuLeft">-->
  280. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  281. <!-- </template>-->
  282. <!-- </avue-crud>-->
  283. <!-- <avue-crud-->
  284. <!-- v-if="activeIndex === '2'"-->
  285. <!-- :data="paymentList"-->
  286. <!-- :option="paymentOption"-->
  287. <!-- ref="payment"-->
  288. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  289. <!-- @row-update="rowSave"-->
  290. <!-- @row-del="feeDel"-->
  291. <!-- >-->
  292. <!-- <template slot-scope="{row}" slot="corpId">-->
  293. <!-- <crop-select-->
  294. <!-- v-if="row.$cellEdit"-->
  295. <!-- v-model="row.corpId"-->
  296. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  297. <!-- ></crop-select>-->
  298. <!-- <span v-else>{{row.corpName}}</span>-->
  299. <!-- </template>-->
  300. <!-- <template slot-scope="{row}" slot="feeId">-->
  301. <!-- <breakdown-select-->
  302. <!-- v-if="row.$cellEdit"-->
  303. <!-- v-model="row.feeId"-->
  304. <!-- @selectValue="(value) => selectValue(value,row)"-->
  305. <!-- :configuration="breakConfiguration"-->
  306. <!-- >-->
  307. <!-- </breakdown-select>-->
  308. <!-- <span v-else>{{ row.feeName }}</span>-->
  309. <!-- </template>-->
  310. <!-- <template slot-scope="{row,index}" slot="menu">-->
  311. <!-- <el-button-->
  312. <!-- type="text"-->
  313. <!-- size="small"-->
  314. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  315. <!-- @click="paymentRowCell(row,index)"-->
  316. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  317. <!-- <el-button type="text"-->
  318. <!-- icon="el-icon-delete"-->
  319. <!-- size="small"-->
  320. <!-- @click="$refs.payment.rowDel(row,index)"-->
  321. <!-- >删除</el-button>-->
  322. <!-- </template>-->
  323. <!-- <template slot="menuLeft">-->
  324. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  325. <!-- </template>-->
  326. <!-- </avue-crud>-->
  327. <!-- </basic-container>-->
  328. </span>
  329. <containerTitle title="杂费明细"></containerTitle>
  330. <basic-container>
  331. <el-tabs v-model="activeIndex" @tab-click="handleSelect">
  332. <el-tab-pane label="应收" name="1"></el-tab-pane>
  333. <el-tab-pane label="应付" name="2"></el-tab-pane>
  334. </el-tabs>
  335. <avue-crud
  336. v-if="activeIndex === '1'"
  337. :data="collectionList"
  338. :key="key"
  339. :option="collectionOption"
  340. ref="collection"
  341. @resetColumn="resetColumnCollection"
  342. @saveColumn="saveColumnCollection"
  343. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  344. @row-update="rowSave"
  345. @row-del="makeDel">
  346. <template slot-scope="{row}" slot="corpId">
  347. <crop-select
  348. v-if="row.$cellEdit"
  349. v-model="row.corpId"
  350. @getCorpData="(data)=>{getfleetId(data,row)}"
  351. ></crop-select>
  352. <span v-else>{{ row.corpName }}</span>
  353. </template>
  354. <template slot="plateNoHeader" slot-scope="{column}">
  355. {{ column.label }}<span style="color:#F56C6C">*</span>
  356. </template>
  357. <template slot-scope="{row}" slot="feeId">
  358. <breakdown-select
  359. v-if="row.$cellEdit"
  360. v-model="row.feeId"
  361. @selectValue="(value) => selectValue(value,row)"
  362. :configuration="breakConfiguration"
  363. >
  364. </breakdown-select>
  365. <span v-else>{{ row.feeName }}</span>
  366. </template>
  367. <template slot-scope="{row,index}" slot="menu">
  368. <el-button
  369. type="text"
  370. size="small"
  371. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  372. @click="rowCell(row,index)"
  373. >{{ row.$cellEdit ? '保存' : '编辑' }}
  374. </el-button>
  375. <el-button type="text"
  376. icon="el-icon-delete"
  377. size="small"
  378. @click="$refs.collection.rowDel(row,index)"
  379. >删除
  380. </el-button>
  381. <el-button
  382. size="small"
  383. type="text"
  384. icon="el-icon-s-order"
  385. @click="annexOpen(row, index)"
  386. >附 件
  387. </el-button>
  388. </template>
  389. <template slot="menuLeft">
  390. <el-button type="primary" icon="el-icon-plus" @click="addRowCollection"
  391. size="small">录入明细
  392. </el-button>
  393. </template>
  394. </avue-crud>
  395. <avue-crud
  396. v-if="activeIndex === '2'"
  397. :data="paymentList"
  398. :option="paymentOption"
  399. ref="payment"
  400. @resetColumn="resetColumnPayment"
  401. @saveColumn="saveColumnPayment"
  402. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  403. @row-update="rowSave"
  404. @row-del="feeDel"
  405. >
  406. <template slot-scope="{row}" slot="corpId">
  407. <crop-select
  408. v-if="row.$cellEdit"
  409. v-model="row.corpId"
  410. @getCorpData="(data)=>{getfleetId(data,row)}"
  411. ></crop-select>
  412. <span v-else>{{ row.corpName }}</span>
  413. </template>
  414. <template slot-scope="{row}" slot="feeId">
  415. <breakdown-select
  416. v-if="row.$cellEdit"
  417. v-model="row.feeId"
  418. @selectValue="(value) => selectValue(value,row)"
  419. :configuration="breakConfiguration"
  420. >
  421. </breakdown-select>
  422. <span v-else>{{ row.feeName }}</span>
  423. </template>
  424. <template slot-scope="{row,index}" slot="menu">
  425. <el-button
  426. type="text"
  427. size="small"
  428. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  429. @click="paymentRowCell(row,index)"
  430. >{{ row.$cellEdit ? '保存' : '编辑' }}
  431. </el-button>
  432. <el-button type="text"
  433. icon="el-icon-delete"
  434. size="small"
  435. :disabled="goodsForm.status === 1"
  436. @click="$refs.payment.rowDel(row,index)"
  437. >删除
  438. </el-button>
  439. <el-button
  440. size="small"
  441. type="text"
  442. icon="el-icon-s-order"
  443. @click="annexOpen(row, index)"
  444. >附 件
  445. </el-button>
  446. </template>
  447. <template slot="menuLeft">
  448. <el-button type="primary" icon="el-icon-plus" @click="addRowPayment"
  449. size="small">录入明细
  450. </el-button>
  451. </template>
  452. </avue-crud>
  453. </basic-container>
  454. <containerTitle title="上传附件"></containerTitle>
  455. <c-upload
  456. typeUpload="CD"
  457. :data="orderFilesList"
  458. disabled
  459. deleteUrl="/api/blade-client/common-file/remove"
  460. :enumerationValue="86.2"
  461. ></c-upload>
  462. <el-dialog
  463. title="批量调度"
  464. :visible.sync="dialogVisible"
  465. append-to-body
  466. width="70%">
  467. <avue-form :option="option" v-model="form" ref="form">
  468. <template slot="fleetId">
  469. <crop-select
  470. v-model="form.fleetId"
  471. corpType="CD"
  472. ></crop-select>
  473. </template>
  474. </avue-form>
  475. <span slot="footer" class="dialog-footer">
  476. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  477. <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
  478. </span>
  479. </el-dialog>
  480. <el-dialog
  481. title="变更"
  482. :visible.sync="dialogChange"
  483. append-to-body
  484. width="70%">
  485. <avue-form :option="optionData" v-model="formData" ref="saveForm">
  486. <template slot="fleetId">
  487. <crop-select
  488. v-model="formData.fleetId"
  489. corpType="CD"
  490. @getCorpData="getCorpData"
  491. ></crop-select>
  492. </template>
  493. </avue-form>
  494. <span slot="footer" class="dialog-footer">
  495. <el-button @click="dialogChange = false" size="small">关 闭</el-button>
  496. <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
  497. </span>
  498. </el-dialog>
  499. <el-dialog
  500. title="变更记录"
  501. :visible.sync="dialogRecord"
  502. append-to-body
  503. width="70%">
  504. <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
  505. <span slot="footer" class="dialog-footer">
  506. <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
  507. </span>
  508. </el-dialog>
  509. <el-dialog
  510. title="附件"
  511. :visible.sync="enclosure"
  512. append-to-body
  513. width="70%">
  514. <c-upload
  515. typeUpload="GZ"
  516. :basic="true"
  517. deleteUrl="/api/blade-client/common-file/remove"
  518. :data="orderList"
  519. :enumerationValue="76"
  520. ></c-upload>
  521. <span slot="footer" class="dialog-footer">
  522. <el-button @click="enclosure = false" size="small">取 消</el-button>
  523. <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
  524. </span>
  525. </el-dialog>
  526. </div>
  527. </template>
  528. <script>
  529. import {getLazyTree} from "@/api/base/region";
  530. import {
  531. saveDelegationList,
  532. detailDelegationList,
  533. removeCollection,
  534. dispatchCollection,
  535. queryVehicle,
  536. cancelDispatchCollection,
  537. dispatchBatch,
  538. fleetDriverSave,
  539. recordingDetails,
  540. changeFleet,
  541. incidentalSubmit, saveFile, getFee
  542. } from "@/api/landTransportation";
  543. import website from "@/config/website";
  544. import {getDeptTree} from "@/api/system/dept";
  545. export default {
  546. props: {
  547. id: {
  548. type: String
  549. }
  550. },
  551. data() {
  552. return {
  553. formData: {},
  554. enclosure:false,
  555. formAnnex: {},
  556. key:0,
  557. formDataList: {},
  558. orderList:[],
  559. dialogChange: false,
  560. optionData: {
  561. span: 12,
  562. menuBtn: false,
  563. column: [{
  564. label: "车队",
  565. prop: "fleetId",
  566. }, {
  567. label: "应付陆运费",
  568. prop: "landAmountC",
  569. precision: 2,
  570. controls: false,
  571. type: 'number',
  572. }, {
  573. label: '应收场站费',
  574. width: 100,
  575. precision: 2,
  576. controls: false,
  577. type: 'number',
  578. prop: 'oneFeeD'
  579. }, {
  580. label: '应收港杂费',
  581. width: 100,
  582. precision: 2,
  583. controls: false,
  584. type: 'number',
  585. prop: 'twoFeeD'
  586. }, {
  587. label: '应收扣款',
  588. width: 100,
  589. precision: 2,
  590. controls: false,
  591. type: 'number',
  592. prop: 'threeFeeD'
  593. }, {
  594. label: '应收待时费',
  595. width: 100,
  596. precision: 2,
  597. controls: false,
  598. type: 'number',
  599. prop: 'fourFeeD'
  600. }, {
  601. label: '应收其他',
  602. width: 100,
  603. precision: 2,
  604. type: 'number',
  605. controls: false,
  606. prop: 'fiveFeeD'
  607. }, {
  608. label: '应收费用备注',
  609. width: 245,
  610. prop: 'feeRemarksD'
  611. }]
  612. },
  613. form: {},
  614. dataRecord: [],
  615. dialogRecord: false,
  616. optionRecord: {
  617. stripe: true,
  618. refreshBtn: false,
  619. columnBtn: false,
  620. menu: false,
  621. addBtn: false,
  622. align: 'center',
  623. column: [
  624. {
  625. label: '变更内容',
  626. prop: 'content'
  627. }, {
  628. label: '变更人',
  629. prop: 'changeUserName'
  630. }, {
  631. label: '变更时间',
  632. prop: 'changeTime'
  633. }
  634. ]
  635. },
  636. option: {
  637. span: 12,
  638. menuBtn: false,
  639. column: [{
  640. label: "车队",
  641. prop: "fleetId",
  642. rules: [{
  643. required: true,
  644. message: " ",
  645. trigger: "blur"
  646. }]
  647. }, {
  648. label: "应付陆运费",
  649. prop: "landAmountC",
  650. precision: 2,
  651. controls: false,
  652. type: 'number',
  653. }]
  654. },
  655. activeIndex: '1',
  656. dialogVisible: false,
  657. goodsForm: {},
  658. orderFilesList: [],
  659. selectionList: [],
  660. roleName: localStorage.getItem("roleName").split(',')[0],
  661. breakConfiguration: {
  662. multipleChoices: false,
  663. multiple: false,
  664. disabled: false,
  665. searchShow: true,
  666. collapseTags: false,
  667. clearable: true,
  668. placeholder: '请点击右边按钮选择',
  669. dicData: []
  670. },
  671. advantageProjectData: [],
  672. treeOption: {
  673. label: 'title',
  674. value: 'id',
  675. lazy: true,
  676. lazyLoad(node, resolve) {
  677. const parentId = node.level === 0 ? '00' : node.data.id;
  678. getLazyTree(parentId).then(res => {
  679. resolve(
  680. res.data.data.map(item => {
  681. return {
  682. ...item,
  683. leaf: !item.hasChildren
  684. };
  685. })
  686. );
  687. });
  688. }
  689. },
  690. tableData: [],
  691. entrustListT: [],
  692. KeyBoxTwo: 0,
  693. entrustOptionTwoTBackup: {
  694. selectable: (row, index) => {
  695. return row.status === 0
  696. },
  697. align: 'center',
  698. menuAlign: 'center',
  699. index: true,
  700. cellBtn: false,
  701. refreshBtn: false,
  702. selection: true,
  703. selectionWidth: 55,
  704. tip: false,
  705. addBtn: false,
  706. cancelBtn: false,
  707. editBtn: false,
  708. addRowBtn: false,
  709. delBtn: false,
  710. showSummary: true,
  711. // editBtn:false,
  712. summaryText: "合计",
  713. sumColumnList: [
  714. {
  715. name: 'landWeight',
  716. type: 'sum',
  717. decimals: 2
  718. }, {
  719. name: 'landAmountC',
  720. type: 'sum',
  721. decimals: 2
  722. }, {
  723. name: 'landAmountD',
  724. type: 'sum',
  725. decimals: 2
  726. }, {
  727. name: 'oneFeeD',
  728. type: 'sum',
  729. decimals: 2
  730. }, {
  731. name: 'twoFeeD',
  732. type: 'sum',
  733. decimals: 2
  734. }, {
  735. name: 'threeFeeD',
  736. type: 'sum',
  737. decimals: 2
  738. }, {
  739. name: 'fourFeeD',
  740. type: 'sum',
  741. decimals: 2
  742. }, {
  743. name: 'fiveFeeD',
  744. type: 'sum',
  745. decimals: 2
  746. }, {
  747. name: 'oneFeeC',
  748. type: 'sum',
  749. decimals: 2
  750. }, {
  751. name: 'twoFeeC',
  752. type: 'sum',
  753. decimals: 2
  754. }, {
  755. name: 'threeFeeC',
  756. type: 'sum',
  757. decimals: 2
  758. }, {
  759. name: 'fourFeeC',
  760. type: 'sum',
  761. decimals: 2
  762. }, {
  763. name: 'fiveFeeC',
  764. type: 'sum',
  765. decimals: 2
  766. }, {
  767. name: 'landAmountD',
  768. type: 'sum',
  769. decimals: 2
  770. }, {
  771. name: 'ctnQuantity',
  772. type: 'sum',
  773. decimals: 0
  774. }],
  775. column: [{
  776. label: '货运日期',
  777. type: "datetime",
  778. cell: true,
  779. format: 'yyyy-MM-dd HH:mm:ss',
  780. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  781. width: 200,
  782. index: 1,
  783. prop: 'arrivalTime'
  784. }, {
  785. label: '实际到厂时间',
  786. prop: 'realArrivalTime',
  787. overHidden: true,
  788. type: "date",
  789. searchRange: true,
  790. defaultTime: ['00:00:00', '23:59:59'],
  791. format: "yyyy-MM-dd HH:mm:ss",
  792. valueFormat: "yyyy-MM-dd HH:mm:ss",
  793. index: 2,
  794. width: 140,
  795. }, {
  796. label: '尺寸箱型',
  797. width: 100,
  798. slot: true,
  799. index: 3,
  800. prop: 'ctnType'
  801. }, {
  802. label: '箱量',
  803. width: 50,
  804. index: 4,
  805. prop: 'ctnQuantity'
  806. }, {
  807. label: '车队',
  808. width: 200,
  809. index: 5,
  810. prop: 'fleetId'
  811. }, {
  812. label: '货物名称',
  813. overHidden: true,
  814. width: 160,
  815. index: 6,
  816. prop: 'goods'
  817. }, {
  818. label: '件数',
  819. width: 100,
  820. overHidden: true,
  821. controls: false,
  822. cell: true,
  823. index: 7,
  824. prop: 'quantity',
  825. type: 'number',
  826. precision: 0
  827. }
  828. // , {
  829. // label: '包装',
  830. // width: 100,
  831. // overHidden: true,
  832. // cell: true,
  833. // prop: 'packing',
  834. // type: 'select',
  835. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
  836. // props: {
  837. // label: "dictValue",
  838. // value: "dictValue"
  839. // },
  840. // }
  841. , {
  842. label: '重量',
  843. width: 160,
  844. prop: 'landWeight',
  845. controls: false,
  846. precision: 2,
  847. index: 8,
  848. type: 'number'
  849. }, {
  850. label: '尺码',
  851. width: 100,
  852. overHidden: true,
  853. cell: true,
  854. index: 9,
  855. prop: 'size',
  856. }, {
  857. label: '车号',
  858. width: 150,
  859. index: 10,
  860. prop: 'plateNo'
  861. }, {
  862. label: '司机',
  863. width: 115,
  864. index: 11,
  865. prop: 'driverName'
  866. }, {
  867. label: '电话',
  868. width: 160,
  869. index: 12,
  870. prop: 'tel'
  871. }, {
  872. label: '单柜运费',
  873. index: 13,
  874. prop: 'landAmountD'
  875. },
  876. {
  877. label: '状态',
  878. width: 100,
  879. index: 14,
  880. type: 'select',
  881. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  882. props: {
  883. label: "dictValue",
  884. value: "dictKey"
  885. },
  886. dataType: "string",
  887. prop: 'status'
  888. }, {
  889. label: '应付陆运费',
  890. cell: true,
  891. index: 15,
  892. prop: 'landAmountC'
  893. }, {
  894. label: '委托备注',
  895. width: 245,
  896. index: 16,
  897. prop: 'remarks'
  898. }, {
  899. label: '车队备注',
  900. width: 245,
  901. index: 17,
  902. prop: 'fleetRemarks'
  903. }, {
  904. label: '司机备注',
  905. width: 245,
  906. index: 18,
  907. prop: 'driverRemarks'
  908. }, {
  909. label: '应收场站费',
  910. width: 100,
  911. precision: 2,
  912. index: 19,
  913. controls: false,
  914. cell: true,
  915. type: 'number',
  916. prop: 'oneFeeD'
  917. }, {
  918. label: '应收港杂费',
  919. width: 100,
  920. precision: 2,
  921. cell: true,
  922. index: 20,
  923. controls: false,
  924. type: 'number',
  925. prop: 'twoFeeD'
  926. }, {
  927. label: '应收扣款',
  928. width: 100,
  929. index: 21,
  930. precision: 2,
  931. cell: true,
  932. controls: false,
  933. type: 'number',
  934. prop: 'threeFeeD'
  935. }, {
  936. label: '应收待时费',
  937. width: 100,
  938. precision: 2,
  939. index: 22,
  940. cell: true,
  941. controls: false,
  942. type: 'number',
  943. prop: 'fourFeeD'
  944. }, {
  945. label: '应收其他',
  946. width: 100,
  947. index: 23,
  948. precision: 2,
  949. cell: true,
  950. type: 'number',
  951. controls: false,
  952. prop: 'fiveFeeD'
  953. }, {
  954. label: '应收费用备注',
  955. width: 245,
  956. index: 24,
  957. cell: true,
  958. prop: 'feeRemarksD'
  959. }, {
  960. label: '应付场站费',
  961. width: 100,
  962. index: 25,
  963. precision: 2,
  964. cell: true,
  965. controls: false,
  966. type: 'number',
  967. prop: 'oneFeeC'
  968. }, {
  969. label: '应付港杂费',
  970. width: 100,
  971. precision: 2,
  972. index: 26,
  973. cell: true,
  974. controls: false,
  975. type: 'number',
  976. prop: 'twoFeeC'
  977. }, {
  978. label: '应付扣款',
  979. width: 100,
  980. index: 27,
  981. precision: 2,
  982. controls: false,
  983. type: 'number',
  984. cell: true,
  985. prop: 'threeFeeC'
  986. }, {
  987. label: '应付待时费',
  988. width: 100,
  989. precision: 2,
  990. index: 28,
  991. controls: false,
  992. cell: true,
  993. type: 'number',
  994. prop: 'fourFeeC'
  995. }, {
  996. label: '应付其他',
  997. width: 100,
  998. precision: 2,
  999. index: 29,
  1000. type: 'number',
  1001. cell: true,
  1002. controls: false,
  1003. prop: 'fiveFeeC'
  1004. }, {
  1005. label: '应付费用备注',
  1006. width: 245,
  1007. index: 30,
  1008. cell: true,
  1009. prop: 'feeRemarksC'
  1010. }
  1011. ]
  1012. },
  1013. entrustOptionTwoT: {},
  1014. entrustList: [],
  1015. goodsOptionForm: {
  1016. menuBtn: false,
  1017. disabled: true,
  1018. span: 8,
  1019. column: [{
  1020. label: '公司名称',
  1021. formslot: true,
  1022. prop: 'corpId',
  1023. rules: [{
  1024. required: true,
  1025. message: " ",
  1026. trigger: "change"
  1027. }],
  1028. }, {
  1029. label: '所属部门',
  1030. prop: 'salesmanDept',
  1031. type: "tree",
  1032. filter: false,
  1033. dicData: [],
  1034. props: {
  1035. label: "title"
  1036. }
  1037. }, {
  1038. label: '业务员',
  1039. prop: 'salesman',
  1040. type: "select",
  1041. dicUrl: "/api/blade-user/userList",
  1042. props: {
  1043. label: "realName",
  1044. value: "id"
  1045. },
  1046. rules: [{
  1047. required: true,
  1048. message: " ",
  1049. trigger: "blur"
  1050. }]
  1051. }, {
  1052. label: '委托日期',
  1053. prop: 'bsDate',
  1054. type: "datetime",
  1055. format: 'yyyy-MM-dd HH:mm:ss',
  1056. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1057. }, {
  1058. label: '票据号',
  1059. prop: 'receiptNo'
  1060. }, {
  1061. label: '联系电话',
  1062. prop: 'tel'
  1063. }, {
  1064. label: '提单号',
  1065. prop: 'billNo',
  1066. rules: [{
  1067. required: true,
  1068. message: " ",
  1069. trigger: "blur"
  1070. }],
  1071. }, {
  1072. label: '场站',
  1073. prop: 'station',
  1074. rules: [{
  1075. required: true,
  1076. message: " ",
  1077. trigger: "blur"
  1078. }],
  1079. },
  1080. // {
  1081. // label: '货运日期',
  1082. // type: "datetime",
  1083. // format: 'yyyy-MM-dd HH:mm:ss',
  1084. // valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1085. // prop: 'arrivalTime',
  1086. // rules: [{
  1087. // required: true,
  1088. // message: " ",
  1089. // trigger: "blur"
  1090. // }],
  1091. // },
  1092. {
  1093. label: '备注',
  1094. span: 24,
  1095. minRows: 2,
  1096. prop: 'remarks',
  1097. type: 'textarea'
  1098. }]
  1099. },
  1100. goodsOptionFormTwo: {
  1101. menuBtn: false,
  1102. disabled: true,
  1103. span: 8,
  1104. column: [
  1105. // {
  1106. // label: '所属公司',
  1107. // formslot: true,
  1108. // prop: 'belongCompany',
  1109. // rules: [{
  1110. // required: false,
  1111. // message: " ",
  1112. // trigger: "blur"
  1113. // }],
  1114. // },
  1115. {
  1116. label: '船名航次',
  1117. prop: 'factory',
  1118. rules: [{
  1119. required: false,
  1120. message: " ",
  1121. trigger: "blur"
  1122. }],
  1123. }
  1124. // , {
  1125. // label: '货物名称',
  1126. // prop: 'goods',
  1127. // rules: [{
  1128. // required: false,
  1129. // message: " ",
  1130. // trigger: "blur"
  1131. // }],
  1132. // }
  1133. , {
  1134. label: '开船日期',
  1135. prop: 'etd',
  1136. type: 'date'
  1137. }, {
  1138. label: '预配箱量',
  1139. prop: 'expectCtnQty',
  1140. type: 'date'
  1141. }, {
  1142. label: '起运港',
  1143. prop: 'polId'
  1144. }, {
  1145. label: '目的港',
  1146. prop: 'podId'
  1147. }, {
  1148. label: '截港日期',
  1149. prop: 'etc',
  1150. type: 'date'
  1151. }, {
  1152. label: '截单日期',
  1153. prop: 'siCutoffDate',
  1154. type: 'date'
  1155. }, {
  1156. label: '订舱代理',
  1157. prop: 'agentId'
  1158. }]
  1159. },
  1160. entrustOptionTwo: {
  1161. align: 'center',
  1162. menuAlign: 'center',
  1163. addBtnText: '录入箱信息',
  1164. index: true,
  1165. cellBtn: true,
  1166. addBtn: false,
  1167. addRowBtn: true,
  1168. showSummary: true,
  1169. summaryText: "合计",
  1170. sumColumnList: [
  1171. {
  1172. name: 'landWeight',
  1173. type: 'sum',
  1174. decimals: 2
  1175. }, {
  1176. name: 'landAmountD',
  1177. type: 'sum',
  1178. decimals: 2
  1179. }, {
  1180. name: 'ctnQuantity',
  1181. type: 'sum',
  1182. decimals: 7
  1183. }],
  1184. column: [{
  1185. label: '尺寸箱型',
  1186. cell: true,
  1187. prop: 'ctnType',
  1188. type: 'select',
  1189. width: 100,
  1190. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  1191. props: {
  1192. label: "dictValue",
  1193. value: "dictKey"
  1194. }
  1195. }, {
  1196. label: '箱量',
  1197. cell: true,
  1198. prop: 'ctnQuantity',
  1199. controls: false,
  1200. precision: 0,
  1201. width: 100,
  1202. type: 'number'
  1203. }, {
  1204. label: '总重量(吨)',
  1205. cell: true,
  1206. prop: 'landWeight',
  1207. controls: false,
  1208. width: 200,
  1209. precision: 2,
  1210. type: 'number'
  1211. }, {
  1212. label: '单柜运费',
  1213. cell: true,
  1214. prop: 'landAmountD',
  1215. controls: false,
  1216. width: 200,
  1217. precision: 2,
  1218. type: 'number'
  1219. }, {
  1220. label: '备注',
  1221. cell: true,
  1222. width: 200,
  1223. prop: 'remarks'
  1224. }
  1225. ]
  1226. },
  1227. collectionList: [],
  1228. collectionOption:{},
  1229. collectionOptionBackup: {
  1230. align: 'center',
  1231. menuAlign: 'center',
  1232. index: true,
  1233. cancelBtn: false,
  1234. editBtn: false,
  1235. delBtn: false,
  1236. cellBtn: false,
  1237. addBtn: false,
  1238. addRowBtn: false,
  1239. showSummary: true,
  1240. addBtnText: '录入明细',
  1241. summaryText: "合计",
  1242. sumColumnList: [{
  1243. name: 'price',
  1244. type: 'sum',
  1245. decimals: 2
  1246. }, {
  1247. name: 'amount',
  1248. type: 'sum',
  1249. decimals: 2
  1250. }, {
  1251. name: 'quantity',
  1252. type: 'sum',
  1253. decimals: 1
  1254. }],
  1255. column: [{
  1256. label: '客户名称',
  1257. slot: true,
  1258. prop: 'corpId'
  1259. }, {
  1260. label: '费用名称',
  1261. slot: true,
  1262. prop: 'feeId'
  1263. }, {
  1264. label: '计价单位',
  1265. cell: true,
  1266. prop: 'unit',
  1267. type: "select",
  1268. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1269. props: {
  1270. label: "dictValue",
  1271. value: "dictKey"
  1272. }
  1273. }, {
  1274. label: '数量',
  1275. cell: true,
  1276. prop: 'quantity'
  1277. }, {
  1278. label: '单价',
  1279. cell: true,
  1280. prop: 'price'
  1281. }, {
  1282. label: '金额',
  1283. cell: true,
  1284. prop: 'amount'
  1285. }, {
  1286. label: '税率',
  1287. cell: true,
  1288. prop: 'taxRate'
  1289. }, {
  1290. label: '币别',
  1291. cell: true,
  1292. prop: 'currency',
  1293. type: "select",
  1294. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1295. props: {
  1296. label: "dictValue",
  1297. value: "dictKey"
  1298. },
  1299. }, {
  1300. label: '车号',
  1301. cell: true,
  1302. prop: 'plateNo',
  1303. type: "select",
  1304. props: {
  1305. label: "label",
  1306. value: "label"
  1307. },
  1308. }
  1309. ]
  1310. },
  1311. paymentList: [],
  1312. paymentOption:{},
  1313. paymentOptionBackup:{
  1314. align: 'center',
  1315. menuAlign: 'center',
  1316. index: true,
  1317. cancelBtn: false,
  1318. editBtn: false,
  1319. delBtn: false,
  1320. cellBtn: false,
  1321. addBtn: false,
  1322. addRowBtn: false,
  1323. showSummary: true,
  1324. addBtnText: '录入明细',
  1325. summaryText: "合计",
  1326. sumColumnList: [{
  1327. name: 'price',
  1328. type: 'sum',
  1329. decimals: 2
  1330. }, {
  1331. name: 'amount',
  1332. type: 'sum',
  1333. decimals: 2
  1334. }, {
  1335. name: 'quantity',
  1336. type: 'sum',
  1337. decimals: 1
  1338. }],
  1339. column: [{
  1340. label: '客户名称',
  1341. slot: true,
  1342. prop: 'corpId'
  1343. }, {
  1344. label: '费用名称',
  1345. slot: true,
  1346. prop: 'feeId'
  1347. }, {
  1348. label: '计价单位',
  1349. cell: true,
  1350. prop: 'unit',
  1351. type: "select",
  1352. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1353. props: {
  1354. label: "dictValue",
  1355. value: "dictKey"
  1356. }
  1357. }, {
  1358. label: '数量',
  1359. cell: true,
  1360. prop: 'quantity'
  1361. }, {
  1362. label: '单价',
  1363. cell: true,
  1364. prop: 'price'
  1365. }, {
  1366. label: '金额',
  1367. cell: true,
  1368. prop: 'amount'
  1369. }, {
  1370. label: '税率(默认6)',
  1371. cell: true,
  1372. prop: 'taxRate'
  1373. }, {
  1374. label: '币别(默认RMB)',
  1375. cell: true,
  1376. prop: 'currency',
  1377. type: "select",
  1378. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1379. props: {
  1380. label: "dictValue",
  1381. value: "dictKey"
  1382. },
  1383. }, {
  1384. label: '车号',
  1385. cell: true,
  1386. prop: 'plateNo',
  1387. type: "select",
  1388. props: {
  1389. label: "label",
  1390. value: "label"
  1391. },
  1392. }
  1393. ]
  1394. }
  1395. };
  1396. },
  1397. async created() {
  1398. this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1399. this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1400. this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1401. this.KeyBoxTwo++
  1402. if (this.id) {
  1403. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1404. this.goodsForm = res.data.data
  1405. this.tableData = res.data.data.orderAddressList
  1406. this.entrustList = res.data.data.orderItemList
  1407. this.goodsList = res.data.data.orderItemList
  1408. this.orderFilesList = res.data.data.fileList
  1409. if (res.data.data.orderFeeList.length > 0) {
  1410. res.data.data.orderFeeList.forEach(item => {
  1411. if (item.type == 1) {
  1412. this.collectionList.push(item)
  1413. } else {
  1414. this.paymentList.push(item)
  1415. }
  1416. })
  1417. }
  1418. delete this.goodsForm.orderAddressList
  1419. delete this.goodsForm.orderItemList
  1420. delete this.goodsForm.orderFeeList
  1421. // this.tableData.forEach(item => {
  1422. // if (item.region) item.region = item.region.split(',')
  1423. // })
  1424. })
  1425. }
  1426. queryVehicle({orderId: this.id}).then(res => {
  1427. const column = this.findObject(this.collectionOption.column, "plateNo");
  1428. const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
  1429. column.dicData = columnTwo.dicData = []
  1430. res.data.data.forEach(item => {
  1431. column.dicData.push({label: item})
  1432. columnTwo.dicData.push({label: item})
  1433. })
  1434. this.key++
  1435. });
  1436. this.$refs.other.show = false
  1437. // 非租户模式默认加载管理组数据
  1438. if (!website.tenantMode) {
  1439. this.initData(website.tenantId);
  1440. } else {
  1441. this.initData();
  1442. }
  1443. },
  1444. methods: {
  1445. //自定义列保存
  1446. async saveColumnBoxTwo() {
  1447. /**
  1448. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1449. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1450. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1451. */
  1452. const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
  1453. if (inSave) {
  1454. this.$message.success("保存成功");
  1455. //关闭窗口
  1456. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1457. }
  1458. },
  1459. //自定义列重置
  1460. async resetColumnBoxTwo() {
  1461. this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
  1462. const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1463. if (inSave) {
  1464. this.$message.success("重置成功");
  1465. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1466. }
  1467. },
  1468. //自定义列保存
  1469. async saveColumnCollection() {
  1470. /**
  1471. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1472. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1473. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1474. */
  1475. const inSave = await this.saveColumnData(this.getColumnName(85.4), this.collectionOption);
  1476. if (inSave) {
  1477. this.$message.success("保存成功");
  1478. //关闭窗口
  1479. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1480. }
  1481. },
  1482. //自定义列重置
  1483. async resetColumnCollection() {
  1484. this.collectionOption = this.collectionOptionBackup;
  1485. const inSave = await this.delColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
  1486. if (inSave) {
  1487. this.$message.success("重置成功");
  1488. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1489. }
  1490. },
  1491. //自定义列保存
  1492. async saveColumnPayment() {
  1493. /**
  1494. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1495. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1496. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1497. */
  1498. const inSave = await this.saveColumnData(this.getColumnName(86.5), this.paymentOption);
  1499. if (inSave) {
  1500. this.$message.success("保存成功");
  1501. //关闭窗口
  1502. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1503. }
  1504. },
  1505. //自定义列重置
  1506. async resetColumnPayment() {
  1507. this.paymentOption = this.paymentOptionBackup;
  1508. const inSave = await this.delColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1509. if (inSave) {
  1510. this.$message.success("重置成功");
  1511. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1512. }
  1513. },
  1514. //打开附件
  1515. annexOpen(row, index){
  1516. this.enclosure = true
  1517. this.formAnnex = row
  1518. getFee({id:row.id}).then(res=>{
  1519. this.orderList = res.data.data
  1520. })
  1521. },
  1522. //保存
  1523. saveAnnex(){
  1524. saveFile({
  1525. id:this.formAnnex.id,
  1526. fileList:this.orderList
  1527. }).then(res=>{
  1528. this.$message.success("保存成功");
  1529. this.annexOpen(this.formAnnex)
  1530. })
  1531. },
  1532. getCorpData(val) {
  1533. this.formData.fleetName = val.cname
  1534. },
  1535. confirmChange() {
  1536. changeFleet({
  1537. ...this.formData,
  1538. id: this.formDataList.id,
  1539. orderId: this.goodsForm.id,
  1540. originalFleetName: this.formDataList.fleetName
  1541. }).then(res => {
  1542. this.$refs.saveForm.resetForm()
  1543. this.entrustList = res.data.data
  1544. this.dialogChange = false
  1545. this.$message.success("变更成功");
  1546. })
  1547. },
  1548. //查询业务部门
  1549. initData(tenantId) {
  1550. getDeptTree(tenantId).then(res => {
  1551. const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
  1552. column.dicData = res.data.data;
  1553. });
  1554. },
  1555. //多选触发
  1556. selectionChange(list) {
  1557. this.selectionList = list
  1558. },
  1559. //批量调度
  1560. batchScheduling() {
  1561. this.form = {}
  1562. this.dialogVisible = true
  1563. },
  1564. //提交调度
  1565. saveScheduling() {
  1566. this.$refs['form'].validate((valid, done) => {
  1567. done()
  1568. if (valid) {
  1569. let data = []
  1570. this.$confirm('是否确认调度?', '提示', {
  1571. confirmButtonText: '确定',
  1572. cancelButtonText: '取消',
  1573. type: 'warning'
  1574. }).then(() => {
  1575. this.selectionList.forEach(item => data.push(item.id))
  1576. dispatchBatch({
  1577. ...this.form,
  1578. idList: data,
  1579. orderId: this.goodsForm.id
  1580. }).then(res => {
  1581. this.entrustList = res.data.data
  1582. this.dialogVisible = false
  1583. })
  1584. }).catch(() => {
  1585. this.$message({
  1586. type: 'info',
  1587. message: '已取消'
  1588. });
  1589. });
  1590. } else {
  1591. return false
  1592. }
  1593. })
  1594. },
  1595. //刷新数据
  1596. refreshData() {
  1597. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1598. this.goodsForm = res.data.data
  1599. this.tableData = res.data.data.orderAddressList
  1600. this.entrustList = res.data.data.orderItemList
  1601. this.goodsList = res.data.data.orderItemList
  1602. this.orderFilesList = res.data.data.fileList
  1603. if (res.data.data.orderFeeList.length > 0) {
  1604. res.data.data.orderFeeList.forEach(item => {
  1605. if (item.type == 1) {
  1606. this.collectionList.push(item)
  1607. } else {
  1608. this.paymentList.push(item)
  1609. }
  1610. })
  1611. }
  1612. delete this.goodsForm.orderAddressList
  1613. delete this.goodsForm.orderItemList
  1614. delete this.goodsForm.orderFeeList
  1615. // this.tableData.forEach(item => {
  1616. // if (item.region) item.region = item.region.split(',')
  1617. // })
  1618. })
  1619. },
  1620. //切换收付费
  1621. handleSelect(tab, event) {
  1622. this.activeIndex = tab.name
  1623. },
  1624. //箱信息保存
  1625. rowSaveT(row, index, done, loading) {
  1626. if (row.$cellEdit) {
  1627. fleetDriverSave(row).then(res => {
  1628. this.$message.success("保存成功");
  1629. })
  1630. }
  1631. this.$refs.crudBoxTwo.rowCell(row, index)
  1632. },
  1633. rowSaveWell(row, index, done, loading) {
  1634. done()
  1635. },
  1636. //箱信息调度
  1637. designate(row, index) {
  1638. if (row.fleetId) {
  1639. this.$confirm('是否确定调度', '提示', {
  1640. confirmButtonText: '确定',
  1641. cancelButtonText: '取消',
  1642. type: 'warning'
  1643. }).then(() => {
  1644. dispatchCollection(row).then(res => {
  1645. this.$message.success('操作成功');
  1646. this.entrustList[index].status = res.data.data.status
  1647. })
  1648. }).catch(() => {
  1649. this.$message({
  1650. type: 'info',
  1651. message: '已取消'
  1652. });
  1653. });
  1654. } else {
  1655. this.$message.warning('请选择车队');
  1656. }
  1657. },
  1658. //变更车队
  1659. changeFleetT(row, index) {
  1660. this.formDataList = row
  1661. this.dialogChange = true
  1662. this.formData = {}
  1663. },
  1664. //打开变更记录
  1665. recordsOfChanges(row, index) {
  1666. this.dialogRecord = true
  1667. recordingDetails({itemId: row.id, kind: 2}).then(res => {
  1668. this.dataRecord = res.data.data
  1669. })
  1670. },
  1671. //取消调度
  1672. cancelDesignate(row, index) {
  1673. this.$confirm('是否确定取消调度', '提示', {
  1674. confirmButtonText: '确定',
  1675. cancelButtonText: '取消',
  1676. type: 'warning'
  1677. }).then(() => {
  1678. cancelDispatchCollection({id: row.id}).then(res => {
  1679. this.$message.success('操作成功');
  1680. this.entrustList[index].status = res.data.data.status
  1681. })
  1682. }).catch(() => {
  1683. this.$message({
  1684. type: 'info',
  1685. message: '已取消'
  1686. });
  1687. });
  1688. },
  1689. //箱信息选择车队
  1690. getfleetIdT(data, row) {
  1691. this.$set(row, 'fleetName', data.cname)
  1692. },
  1693. //地址新增
  1694. addAddress() {
  1695. this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
  1696. },
  1697. //返回主列表
  1698. backToList() {
  1699. this.$emit('backToList')
  1700. },
  1701. //删除途径地址
  1702. deleteAddress(scope) {
  1703. this.tableData.splice(scope.$index, 1);
  1704. },
  1705. //箱信息保存
  1706. rowSave(row, index, done, loading) {
  1707. row.$cellEdit = false
  1708. done()
  1709. },
  1710. rowCell(row, index) {
  1711. if (row.$cellEdit) {
  1712. if (row.plateNo){
  1713. incidentalSubmit(row).then(res=>{
  1714. this.$refs.collection.rowCell(row, index)
  1715. row = res.data.data
  1716. this.$message.success("保存成功");
  1717. })
  1718. }else {
  1719. this.$message.error("请选择车号");
  1720. }
  1721. }else {
  1722. this.$refs.collection.rowCell(row, index)
  1723. }
  1724. },
  1725. paymentRowCell(row, index) {
  1726. if (row.$cellEdit) {
  1727. incidentalSubmit(row).then(res=>{
  1728. row = res.data.data
  1729. this.$message.success("保存成功");
  1730. })
  1731. }
  1732. this.$refs.payment.rowCell(row, index)
  1733. },
  1734. //箱信息移除
  1735. rowDel(row, index) {
  1736. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1737. confirmButtonText: '确定',
  1738. cancelButtonText: '取消',
  1739. type: 'warning'
  1740. }).then(() => {
  1741. this.entrustList.splice(index, 1);
  1742. }).catch(() => {
  1743. this.$message({
  1744. type: 'info',
  1745. message: '已取消删除'
  1746. });
  1747. });
  1748. },
  1749. //保存
  1750. editCustomer() {
  1751. let data = JSON.parse(JSON.stringify(this.tableData))
  1752. // data.forEach(item => {
  1753. // if (item.region.length !== 0) item.region = item.region.join(',')
  1754. // })
  1755. saveDelegationList({
  1756. ...this.goodsForm,
  1757. kind: '2',
  1758. orderAddressList: data,
  1759. orderItemList: this.entrustList,
  1760. orderFeeList: this.collectionList.concat(this.paymentList)
  1761. }).then(res => {
  1762. this.$message.success('保存成功');
  1763. })
  1764. },
  1765. //收费新增
  1766. addRowCollection() {
  1767. this.$refs.collection.rowCellAdd({
  1768. currency: '1',
  1769. type: '1',
  1770. orderId:this.id,
  1771. $cellEdit: true
  1772. });
  1773. },
  1774. //付费新增
  1775. addRowPayment() {
  1776. this.$refs.payment.rowCellAdd({
  1777. currency: '1',
  1778. type: '2',
  1779. orderId:this.id,
  1780. $cellEdit: true
  1781. });
  1782. },
  1783. //选择费用
  1784. selectValue(value, row) {
  1785. this.$set(row, 'feeName', value.cname)
  1786. },
  1787. //选择客户信息触发
  1788. getfleetId(data, row) {
  1789. this.$set(row, 'corpName', data.cname)
  1790. },
  1791. //收款信息移除
  1792. makeDel(row, index) {
  1793. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1794. confirmButtonText: '确定',
  1795. cancelButtonText: '取消',
  1796. type: 'warning'
  1797. }).then(() => {
  1798. if (row.id) removeCollection(row.id)
  1799. this.collectionList.splice(index, 1);
  1800. }).catch(() => {
  1801. this.$message({
  1802. type: 'info',
  1803. message: '已取消删除'
  1804. });
  1805. });
  1806. },
  1807. //付款信息移除
  1808. feeDel(row, index) {
  1809. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1810. confirmButtonText: '确定',
  1811. cancelButtonText: '取消',
  1812. type: 'warning'
  1813. }).then(() => {
  1814. if (row.id) removeCollection(row.id)
  1815. this.paymentList.splice(index, 1);
  1816. }).catch(() => {
  1817. this.$message({
  1818. type: 'info',
  1819. message: '已取消删除'
  1820. });
  1821. });
  1822. },
  1823. //自定义表头
  1824. renderHeader(h) {
  1825. return (
  1826. <div>
  1827. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  1828. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  1829. style="margin-right: 1.25rem;"></el-button>
  1830. </el-tooltip>
  1831. </div>
  1832. )
  1833. }
  1834. }
  1835. }
  1836. </script>
  1837. <style scoped lang="scss">
  1838. ::v-deep .el-form-item {
  1839. margin-bottom: 8px;
  1840. }
  1841. ::v-deep .el-form-item__content {
  1842. line-height: 32px;
  1843. }
  1844. ::v-deep .el-card__body {
  1845. padding: 10px 15px;
  1846. font-size: 14px;
  1847. }
  1848. </style>