detailPage.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  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
  15. title="起止地信息"
  16. style="margin-top: 50px"></containerTitle>
  17. <basic-container>
  18. <el-table
  19. ref="singleTable"
  20. :data="tableData"
  21. size="mini"
  22. :header-cell-style="{color:'#000',background:'#fafafa'}"
  23. style="width: 100%">
  24. <el-table-column
  25. property="date"
  26. align="center"
  27. width="40">
  28. <template slot-scope="scope">
  29. <span v-if="scope.$index == 0">
  30. <el-button type="primary" size="mini" circle>起</el-button>
  31. </span>
  32. <span v-else-if="scope.$index === tableData.length-1">
  33. <el-button type="success" size="mini" circle>止</el-button>
  34. </span>
  35. <span v-else>
  36. <el-button v-if="goodsForm.status === 1" type="warning" size="mini" circle>途</el-button>
  37. <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
  38. <el-button type="danger" icon="el-icon-delete" size="mini" circle
  39. @click="deleteAddress(scope)"></el-button>
  40. </el-tooltip>
  41. </span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column
  45. type="index"
  46. label="序号"
  47. align="center"
  48. width="60">
  49. </el-table-column>
  50. <el-table-column
  51. property="corpName"
  52. label="发货工厂"
  53. align="center"
  54. show-overflow-tooltip
  55. width="280">
  56. </el-table-column>
  57. <el-table-column
  58. property="province"
  59. label="省市区"
  60. align="center"
  61. width="280">
  62. <template slot-scope="scope">
  63. <el-cascader
  64. size="small"
  65. style="width: 100%;"
  66. v-model="scope.row.region"
  67. disabled
  68. :props="treeOption"></el-cascader>
  69. </template>
  70. </el-table-column>
  71. <el-table-column
  72. property="address"
  73. align="center"
  74. show-overflow-tooltip
  75. label="详细地址">
  76. <!-- <template slot-scope="scope">-->
  77. <!-- <el-input v-model="scope.row.address" size="small" placeholder="请输入内容"></el-input>-->
  78. <!-- </template>-->
  79. </el-table-column>
  80. </el-table>
  81. </basic-container>
  82. <containerTitle title="委托信息"></containerTitle>
  83. <basic-container>
  84. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  85. <template slot-scope="scope" slot="corpId">
  86. <crop-select
  87. v-model="goodsForm.corpId"
  88. disabled
  89. ></crop-select>
  90. </template>
  91. <template slot-scope="scope" slot="agentId">
  92. <crop-select
  93. :disabled="goodsForm.status === 1"
  94. v-model="goodsForm.agentId"
  95. ></crop-select>
  96. </template>
  97. <template slot-scope="scope" slot="polId">
  98. <port-info
  99. v-model="goodsForm.polId"
  100. :disabled="goodsForm.status === 1"
  101. />
  102. </template>
  103. <template slot-scope="scope" slot="podId">
  104. <port-info
  105. v-model="goodsForm.polId"
  106. :disabled="goodsForm.status === 1"
  107. />
  108. </template>
  109. </avue-form>
  110. </basic-container>
  111. <containerTitle title="车辆信息"></containerTitle>
  112. <basic-container>
  113. <avue-crud
  114. :data="entrustList"
  115. @selection-change="selectionChange"
  116. :option="entrustOptionTwoT"
  117. ref="crudBoxTwo"
  118. v-if="KeyBoxTwo>0"
  119. @resetColumn="resetColumnBoxTwo"
  120. @saveColumn="saveColumnBoxTwo"
  121. @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
  122. @row-update="rowSaveWell">
  123. <template slot="menuLeft" slot-scope="{size}">
  124. <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
  125. :disabled="selectionList.length === 0">批量调度
  126. </el-button>
  127. </template>
  128. <template slot-scope="{row}" slot="fleetId">
  129. <crop-select
  130. v-if="row.$cellEdit"
  131. v-model="row.fleetId"
  132. @getCorpData="(data)=>{getfleetIdT(data,row)}"
  133. corpType="CD"
  134. ></crop-select>
  135. <span v-else>{{ row.fleetName }}</span>
  136. </template>
  137. <template slot-scope="{row,index}" slot="menu">
  138. <el-button
  139. type="text"
  140. size="small"
  141. v-if="row.status===0"
  142. @click="rowSaveT(row,index)"
  143. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  144. </el-button>
  145. <el-button
  146. size="small"
  147. type="text"
  148. @click="designate(row, index)"
  149. v-if="row.status === 0"
  150. >调 度
  151. </el-button>
  152. <el-button
  153. size="small"
  154. type="text"
  155. @click="cancelDesignate(row, index)"
  156. v-if="row.status===1"
  157. >取消调度
  158. </el-button>
  159. <el-button
  160. size="small"
  161. type="text"
  162. @click="changeFleetT(row, index)"
  163. v-if="row.status===2||row.status===3"
  164. >变 更
  165. </el-button>
  166. <el-button
  167. size="small"
  168. type="text"
  169. @click="recordsOfChanges(row, index)"
  170. v-if="row.status > 1"
  171. >变更记录
  172. </el-button>
  173. </template>
  174. </avue-crud>
  175. </basic-container>
  176. <span>
  177. <!-- <containerTitle title="费用明细"></containerTitle>-->
  178. <!-- <basic-container>-->
  179. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  180. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  181. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  182. <!-- </el-tabs>-->
  183. <!-- <avue-crud-->
  184. <!-- v-if="activeIndex === '1'"-->
  185. <!-- :data="collectionList"-->
  186. <!-- :option="collectionOption"-->
  187. <!-- ref="collection"-->
  188. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  189. <!-- @row-update="rowSave"-->
  190. <!-- @row-del="makeDel">-->
  191. <!-- <template slot-scope="{row}" slot="corpId">-->
  192. <!-- <crop-select-->
  193. <!-- v-if="row.$cellEdit"-->
  194. <!-- v-model="row.corpId"-->
  195. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  196. <!-- ></crop-select>-->
  197. <!-- <span v-else>{{row.corpName}}</span>-->
  198. <!-- </template>-->
  199. <!-- <template slot-scope="{row}" slot="feeId">-->
  200. <!-- <breakdown-select-->
  201. <!-- v-if="row.$cellEdit"-->
  202. <!-- v-model="row.feeId"-->
  203. <!-- @selectValue="(value) => selectValue(value,row)"-->
  204. <!-- :configuration="breakConfiguration"-->
  205. <!-- >-->
  206. <!-- </breakdown-select>-->
  207. <!-- <span v-else>{{ row.feeName }}</span>-->
  208. <!-- </template>-->
  209. <!-- <template slot-scope="{row,index}" slot="menu">-->
  210. <!-- <el-button-->
  211. <!-- type="text"-->
  212. <!-- size="small"-->
  213. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  214. <!-- @click="rowCell(row,index)"-->
  215. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  216. <!-- <el-button type="text"-->
  217. <!-- icon="el-icon-delete"-->
  218. <!-- size="small"-->
  219. <!-- @click="$refs.collection.rowDel(row,index)"-->
  220. <!-- >删除</el-button>-->
  221. <!-- </template>-->
  222. <!-- <template slot="menuLeft">-->
  223. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  224. <!-- </template>-->
  225. <!-- </avue-crud>-->
  226. <!-- <avue-crud-->
  227. <!-- v-if="activeIndex === '2'"-->
  228. <!-- :data="paymentList"-->
  229. <!-- :option="paymentOption"-->
  230. <!-- ref="payment"-->
  231. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  232. <!-- @row-update="rowSave"-->
  233. <!-- @row-del="feeDel"-->
  234. <!-- >-->
  235. <!-- <template slot-scope="{row}" slot="corpId">-->
  236. <!-- <crop-select-->
  237. <!-- v-if="row.$cellEdit"-->
  238. <!-- v-model="row.corpId"-->
  239. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  240. <!-- ></crop-select>-->
  241. <!-- <span v-else>{{row.corpName}}</span>-->
  242. <!-- </template>-->
  243. <!-- <template slot-scope="{row}" slot="feeId">-->
  244. <!-- <breakdown-select-->
  245. <!-- v-if="row.$cellEdit"-->
  246. <!-- v-model="row.feeId"-->
  247. <!-- @selectValue="(value) => selectValue(value,row)"-->
  248. <!-- :configuration="breakConfiguration"-->
  249. <!-- >-->
  250. <!-- </breakdown-select>-->
  251. <!-- <span v-else>{{ row.feeName }}</span>-->
  252. <!-- </template>-->
  253. <!-- <template slot-scope="{row,index}" slot="menu">-->
  254. <!-- <el-button-->
  255. <!-- type="text"-->
  256. <!-- size="small"-->
  257. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  258. <!-- @click="paymentRowCell(row,index)"-->
  259. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  260. <!-- <el-button type="text"-->
  261. <!-- icon="el-icon-delete"-->
  262. <!-- size="small"-->
  263. <!-- @click="$refs.payment.rowDel(row,index)"-->
  264. <!-- >删除</el-button>-->
  265. <!-- </template>-->
  266. <!-- <template slot="menuLeft">-->
  267. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  268. <!-- </template>-->
  269. <!-- </avue-crud>-->
  270. <!-- </basic-container>-->
  271. </span>
  272. <containerTitle title="上传附件"></containerTitle>
  273. <c-upload
  274. typeUpload="CD"
  275. :data="orderFilesList"
  276. disabled
  277. deleteUrl="/api/blade-client/common-file/remove"
  278. :enumerationValue="86.2"
  279. ></c-upload>
  280. <el-dialog
  281. title="批量调度"
  282. :visible.sync="dialogVisible"
  283. append-to-body
  284. width="70%">
  285. <avue-form :option="option" v-model="form" ref="form">
  286. <template slot="fleetId">
  287. <crop-select
  288. v-model="form.fleetId"
  289. corpType="CD"
  290. ></crop-select>
  291. </template>
  292. </avue-form>
  293. <span slot="footer" class="dialog-footer">
  294. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  295. <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
  296. </span>
  297. </el-dialog>
  298. <el-dialog
  299. title="变更"
  300. :visible.sync="dialogChange"
  301. append-to-body
  302. width="70%">
  303. <avue-form :option="optionData" v-model="formData" ref="saveForm">
  304. <template slot="fleetId">
  305. <crop-select
  306. v-model="formData.fleetId"
  307. corpType="CD"
  308. @getCorpData="getCorpData"
  309. ></crop-select>
  310. </template>
  311. </avue-form>
  312. <span slot="footer" class="dialog-footer">
  313. <el-button @click="dialogChange = false" size="small">关 闭</el-button>
  314. <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
  315. </span>
  316. </el-dialog>
  317. <el-dialog
  318. title="变更记录"
  319. :visible.sync="dialogRecord"
  320. append-to-body
  321. width="70%">
  322. <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
  323. <span slot="footer" class="dialog-footer">
  324. <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
  325. </span>
  326. </el-dialog>
  327. </div>
  328. </template>
  329. <script>
  330. import {getLazyTree} from "@/api/base/region";
  331. import {
  332. saveDelegationList,
  333. detailDelegationList,
  334. removeCollection,
  335. dispatchCollection,
  336. cancelDispatchCollection, dispatchBatch, fleetDriverSave, recordingDetails, changeFleet
  337. } from "@/api/landTransportation";
  338. export default {
  339. props: {
  340. id: {
  341. type: String
  342. }
  343. },
  344. data() {
  345. return {
  346. formData:{},
  347. formDataList:{},
  348. dialogChange:false,
  349. optionData:{
  350. span:12,
  351. menuBtn:false,
  352. column:[{
  353. label: "车队",
  354. prop: "fleetId",
  355. },{
  356. label: "应付陆运费",
  357. prop: "landAmountC",
  358. precision: 2,
  359. controls: false,
  360. type: 'number',
  361. },{
  362. label: '应收场站费',
  363. width: 100,
  364. precision: 2,
  365. controls: false,
  366. type: 'number',
  367. prop: 'oneFeeD'
  368. }, {
  369. label: '应收港杂费',
  370. width: 100,
  371. precision: 2,
  372. controls: false,
  373. type: 'number',
  374. prop: 'twoFeeD'
  375. }, {
  376. label: '应收扣款',
  377. width: 100,
  378. precision: 2,
  379. controls: false,
  380. type: 'number',
  381. prop: 'threeFeeD'
  382. }, {
  383. label: '应收待时费',
  384. width: 100,
  385. precision: 2,
  386. controls: false,
  387. type: 'number',
  388. prop: 'fourFeeD'
  389. }, {
  390. label: '应收其他',
  391. width: 100,
  392. precision: 2,
  393. type: 'number',
  394. controls: false,
  395. prop: 'fiveFeeD'
  396. }, {
  397. label: '应收费用备注',
  398. width: 245,
  399. prop: 'feeRemarksD'
  400. }]
  401. },
  402. form:{},
  403. dataRecord:[],
  404. dialogRecord:false,
  405. optionRecord:{
  406. stripe:true,
  407. refreshBtn:false,
  408. columnBtn:false,
  409. menu:false,
  410. addBtn:false,
  411. align:'center',
  412. column:[
  413. {
  414. label:'变更内容',
  415. prop:'content'
  416. }, {
  417. label:'变更人',
  418. prop:'changeUserName'
  419. }, {
  420. label:'变更时间',
  421. prop:'changeTime'
  422. }
  423. ]
  424. },
  425. option: {
  426. span:12,
  427. menuBtn:false,
  428. column: [{
  429. label: "车队",
  430. prop: "fleetId",
  431. rules: [{
  432. required: true,
  433. message: " ",
  434. trigger: "blur"
  435. }]
  436. },{
  437. label: "应付陆运费",
  438. prop: "landAmountC",
  439. precision: 2,
  440. controls: false,
  441. type: 'number',
  442. }]
  443. },
  444. activeIndex: '1',
  445. dialogVisible: false,
  446. goodsForm: {},
  447. orderFilesList: [],
  448. selectionList: [],
  449. roleName: localStorage.getItem("roleName").split(',')[0],
  450. breakConfiguration: {
  451. multipleChoices: false,
  452. multiple: false,
  453. disabled: false,
  454. searchShow: true,
  455. collapseTags: false,
  456. clearable: true,
  457. placeholder: '请点击右边按钮选择',
  458. dicData: []
  459. },
  460. advantageProjectData: [],
  461. treeOption: {
  462. label: 'title',
  463. value: 'id',
  464. lazy: true,
  465. lazyLoad(node, resolve) {
  466. const parentId = node.level === 0 ? '00' : node.data.id;
  467. getLazyTree(parentId).then(res => {
  468. resolve(
  469. res.data.data.map(item => {
  470. return {
  471. ...item,
  472. leaf: !item.hasChildren
  473. };
  474. })
  475. );
  476. });
  477. }
  478. },
  479. tableData: [],
  480. entrustListT: [],
  481. KeyBoxTwo:0,
  482. entrustOptionTwoTBackup: {
  483. selectable: (row, index) => {
  484. return row.status === 0
  485. },
  486. align: 'center',
  487. menuAlign: 'center',
  488. index: true,
  489. cellBtn: false,
  490. refreshBtn: false,
  491. selection: true,
  492. selectionWidth:55,
  493. tip: false,
  494. addBtn: false,
  495. cancelBtn: false,
  496. editBtn: false,
  497. addRowBtn: false,
  498. delBtn: false,
  499. showSummary: true,
  500. // editBtn:false,
  501. summaryText: "合计",
  502. sumColumnList: [
  503. {
  504. name: 'landWeight',
  505. type: 'sum',
  506. decimals: 2
  507. }, {
  508. name: 'landAmountC',
  509. type: 'sum',
  510. decimals: 2
  511. }, {
  512. name: 'landAmountD',
  513. type: 'sum',
  514. decimals: 2
  515. }, {
  516. name: 'oneFeeD',
  517. type: 'sum',
  518. decimals: 2
  519. }, {
  520. name: 'twoFeeD',
  521. type: 'sum',
  522. decimals: 2
  523. }, {
  524. name: 'threeFeeD',
  525. type: 'sum',
  526. decimals: 2
  527. }, {
  528. name: 'fourFeeD',
  529. type: 'sum',
  530. decimals: 2
  531. }, {
  532. name: 'fiveFeeD',
  533. type: 'sum',
  534. decimals: 2
  535. }, {
  536. name: 'oneFeeC',
  537. type: 'sum',
  538. decimals: 2
  539. }, {
  540. name: 'twoFeeC',
  541. type: 'sum',
  542. decimals: 2
  543. }, {
  544. name: 'threeFeeC',
  545. type: 'sum',
  546. decimals: 2
  547. }, {
  548. name: 'fourFeeC',
  549. type: 'sum',
  550. decimals: 2
  551. }, {
  552. name: 'fiveFeeC',
  553. type: 'sum',
  554. decimals: 2
  555. }, {
  556. name: 'landAmountD',
  557. type: 'sum',
  558. decimals: 2
  559. }, {
  560. name: 'ctnQuantity',
  561. type: 'sum',
  562. decimals: 0
  563. }],
  564. column: [
  565. {
  566. label: '状态',
  567. width: 100,
  568. type: 'select',
  569. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  570. props: {
  571. label: "dictValue",
  572. value: "dictKey"
  573. },
  574. dataType: "string",
  575. prop: 'status'
  576. }, {
  577. label: '车队',
  578. width: 200,
  579. prop: 'fleetId'
  580. }, {
  581. label: '应付陆运费',
  582. cell: true,
  583. prop: 'landAmountC'
  584. }, {
  585. label: '尺寸箱型',
  586. width: 100,
  587. slot: true,
  588. prop: 'ctnType'
  589. }, {
  590. label: '箱量',
  591. width: 50,
  592. prop: 'ctnQuantity'
  593. }, {
  594. label: '重量',
  595. width: 160,
  596. prop: 'landWeight',
  597. controls: false,
  598. precision: 2,
  599. type: 'number'
  600. }, {
  601. label: '车号',
  602. width: 150,
  603. prop: 'plateNo'
  604. }, {
  605. label: '司机',
  606. width: 115,
  607. prop: 'driverName'
  608. }, {
  609. label: '电话',
  610. width: 160,
  611. prop: 'tel'
  612. }, {
  613. label: '单柜运费',
  614. prop: 'landAmountD'
  615. }, {
  616. label: '委托备注',
  617. width: 245,
  618. prop: 'remarks'
  619. }, {
  620. label: '车队备注',
  621. width: 245,
  622. prop: 'fleetRemarks'
  623. }, {
  624. label: '司机备注',
  625. width: 245,
  626. prop: 'driverRemarks'
  627. }, {
  628. label: '应收场站费',
  629. width: 100,
  630. precision: 2,
  631. controls: false,
  632. type: 'number',
  633. prop: 'oneFeeD'
  634. }, {
  635. label: '应收港杂费',
  636. width: 100,
  637. precision: 2,
  638. controls: false,
  639. type: 'number',
  640. prop: 'twoFeeD'
  641. }, {
  642. label: '应收扣款',
  643. width: 100,
  644. precision: 2,
  645. controls: false,
  646. type: 'number',
  647. prop: 'threeFeeD'
  648. }, {
  649. label: '应收待时费',
  650. width: 100,
  651. precision: 2,
  652. controls: false,
  653. type: 'number',
  654. prop: 'fourFeeD'
  655. }, {
  656. label: '应收其他',
  657. width: 100,
  658. precision: 2,
  659. type: 'number',
  660. controls: false,
  661. prop: 'fiveFeeD'
  662. }, {
  663. label: '应收费用备注',
  664. width: 245,
  665. prop: 'feeRemarksD'
  666. }, {
  667. label: '应付场站费',
  668. width: 100,
  669. precision: 2,
  670. controls: false,
  671. type: 'number',
  672. prop: 'oneFeeC'
  673. }, {
  674. label: '应付港杂费',
  675. width: 100,
  676. precision: 2,
  677. controls: false,
  678. type: 'number',
  679. prop: 'twoFeeC'
  680. }, {
  681. label: '应付扣款',
  682. width: 100,
  683. precision: 2,
  684. controls: false,
  685. type: 'number',
  686. prop: 'threeFeeC'
  687. }, {
  688. label: '应付待时费',
  689. width: 100,
  690. precision: 2,
  691. controls: false,
  692. type: 'number',
  693. prop: 'fourFeeC'
  694. }, {
  695. label: '应付其他',
  696. width: 100,
  697. precision: 2,
  698. type: 'number',
  699. controls: false,
  700. prop: 'fiveFeeC'
  701. }, {
  702. label: '应付费用备注',
  703. width: 245,
  704. prop: 'feeRemarksC'
  705. }
  706. ]
  707. },
  708. entrustOptionTwoT:{},
  709. entrustList: [],
  710. goodsOptionForm: {
  711. menuBtn: false,
  712. disabled: true,
  713. span: 8,
  714. column: [{
  715. label: '客户名称',
  716. formslot: true,
  717. prop: 'corpId'
  718. }, {
  719. label: '所属公司',
  720. formslot: true,
  721. prop: 'belongCompany',
  722. rules: [{
  723. required: true,
  724. message: " ",
  725. trigger: "blur"
  726. }],
  727. }, {
  728. label: '订单号',
  729. prop: 'orderNo',
  730. disabled: true
  731. }, {
  732. label: '提单号',
  733. prop: 'billNo'
  734. }, {
  735. label: '场站',
  736. prop: 'station'
  737. }, {
  738. label: '到厂时间',
  739. type: "datetime",
  740. format: 'yyyy-MM-dd HH:mm:ss',
  741. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  742. prop: 'arrivalTime'
  743. }, {
  744. label: '船名航次',
  745. prop: 'factory'
  746. }, {
  747. label: '货物名称',
  748. prop: 'goods'
  749. }, {
  750. label: '订舱代理',
  751. prop: 'agentId'
  752. }, {
  753. label: '起运港',
  754. prop: 'polId'
  755. }, {
  756. label: '目的港',
  757. prop: 'podId'
  758. }, {
  759. label: '开船日期',
  760. prop: 'etd',
  761. type: 'date'
  762. }, {
  763. label: '截关日期',
  764. prop: 'etc',
  765. type: 'date'
  766. }, {
  767. label: '截单日期',
  768. prop: 'siCutoffDate',
  769. type: 'date'
  770. }, {
  771. label: '备注',
  772. prop: 'remarks'
  773. }
  774. ]
  775. },
  776. entrustOptionTwo: {
  777. align: 'center',
  778. menuAlign: 'center',
  779. addBtnText: '录入箱信息',
  780. index: true,
  781. cellBtn: true,
  782. addBtn: false,
  783. addRowBtn: true,
  784. showSummary: true,
  785. summaryText: "合计",
  786. sumColumnList: [
  787. {
  788. name: 'landWeight',
  789. type: 'sum',
  790. decimals: 2
  791. }, {
  792. name: 'landAmountD',
  793. type: 'sum',
  794. decimals: 2
  795. }, {
  796. name: 'ctnQuantity',
  797. type: 'sum',
  798. decimals: 7
  799. }],
  800. column: [{
  801. label: '尺寸箱型',
  802. cell: true,
  803. prop: 'ctnType',
  804. type: 'select',
  805. width: 100,
  806. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  807. props: {
  808. label: "dictValue",
  809. value: "dictKey"
  810. }
  811. }, {
  812. label: '箱量',
  813. cell: true,
  814. prop: 'ctnQuantity',
  815. controls: false,
  816. precision: 0,
  817. width: 100,
  818. type: 'number'
  819. }, {
  820. label: '总重量(吨)',
  821. cell: true,
  822. prop: 'landWeight',
  823. controls: false,
  824. width: 200,
  825. precision: 2,
  826. type: 'number'
  827. }, {
  828. label: '单柜运费',
  829. cell: true,
  830. prop: 'landAmountD',
  831. controls: false,
  832. width: 200,
  833. precision: 2,
  834. type: 'number'
  835. }, {
  836. label: '备注',
  837. cell: true,
  838. prop: 'remarks'
  839. }
  840. ]
  841. },
  842. collectionList: [],
  843. collectionOption: {
  844. align: 'center',
  845. menuAlign: 'center',
  846. index: true,
  847. cancelBtn: false,
  848. editBtn: false,
  849. delBtn: false,
  850. cellBtn: false,
  851. addBtn: false,
  852. addRowBtn: false,
  853. showSummary: true,
  854. addBtnText: '录入明细',
  855. summaryText: "合计",
  856. sumColumnList: [{
  857. name: 'price',
  858. type: 'sum',
  859. decimals: 2
  860. }, {
  861. name: 'amount',
  862. type: 'sum',
  863. decimals: 2
  864. }, {
  865. name: 'quantity',
  866. type: 'sum',
  867. decimals: 1
  868. }],
  869. column: [{
  870. label: '客户名称',
  871. slot: true,
  872. prop: 'corpId'
  873. }, {
  874. label: '费用名称',
  875. slot: true,
  876. prop: 'feeId'
  877. }, {
  878. label: '计价单位',
  879. cell: true,
  880. prop: 'unit',
  881. type: "select",
  882. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  883. props: {
  884. label: "dictValue",
  885. value: "dictKey"
  886. }
  887. }, {
  888. label: '数量',
  889. cell: true,
  890. prop: 'quantity'
  891. }, {
  892. label: '单价',
  893. cell: true,
  894. prop: 'price'
  895. }, {
  896. label: '金额',
  897. cell: true,
  898. prop: 'amount'
  899. }, {
  900. label: '税率(默认6)',
  901. cell: true,
  902. prop: 'taxRate'
  903. }, {
  904. label: '币别',
  905. cell: true,
  906. prop: 'currency',
  907. type: "select",
  908. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  909. props: {
  910. label: "dictValue",
  911. value: "dictKey"
  912. },
  913. }
  914. ]
  915. },
  916. paymentList: [],
  917. paymentOption: {
  918. align: 'center',
  919. menuAlign: 'center',
  920. index: true,
  921. cancelBtn: false,
  922. editBtn: false,
  923. delBtn: false,
  924. cellBtn: false,
  925. addBtn: false,
  926. addRowBtn: false,
  927. showSummary: true,
  928. addBtnText: '录入明细',
  929. summaryText: "合计",
  930. sumColumnList: [{
  931. name: 'price',
  932. type: 'sum',
  933. decimals: 2
  934. }, {
  935. name: 'amount',
  936. type: 'sum',
  937. decimals: 2
  938. }, {
  939. name: 'quantity',
  940. type: 'sum',
  941. decimals: 1
  942. }],
  943. column: [{
  944. label: '客户名称',
  945. slot: true,
  946. prop: 'corpId'
  947. }, {
  948. label: '费用名称',
  949. slot: true,
  950. prop: 'feeId'
  951. }, {
  952. label: '计价单位',
  953. cell: true,
  954. prop: 'unit',
  955. type: "select",
  956. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  957. props: {
  958. label: "dictValue",
  959. value: "dictKey"
  960. }
  961. }, {
  962. label: '数量',
  963. cell: true,
  964. prop: 'quantity'
  965. }, {
  966. label: '单价',
  967. cell: true,
  968. prop: 'price'
  969. }, {
  970. label: '金额',
  971. cell: true,
  972. prop: 'amount'
  973. }, {
  974. label: '税率(默认6)',
  975. cell: true,
  976. prop: 'taxRate'
  977. }, {
  978. label: '币别(默认RMB)',
  979. cell: true,
  980. prop: 'currency',
  981. type: "select",
  982. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  983. props: {
  984. label: "dictValue",
  985. value: "dictKey"
  986. },
  987. }
  988. ]
  989. }
  990. };
  991. },
  992. async created() {
  993. this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  994. this.KeyBoxTwo++
  995. if (this.id) {
  996. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  997. this.goodsForm = res.data.data
  998. this.tableData = res.data.data.orderAddressList
  999. this.entrustList = res.data.data.orderItemList
  1000. this.goodsList = res.data.data.orderItemList
  1001. this.orderFilesList = res.data.data.fileList
  1002. if (res.data.data.orderFeeList.length > 0) {
  1003. res.data.data.orderFeeList.forEach(item => {
  1004. if (item.type == 1) {
  1005. this.collectionList.push(item)
  1006. } else {
  1007. this.paymentList.push(item)
  1008. }
  1009. })
  1010. }
  1011. delete this.goodsForm.orderAddressList
  1012. delete this.goodsForm.orderItemList
  1013. delete this.goodsForm.orderFeeList
  1014. this.tableData.forEach(item => {
  1015. if (item.region) item.region = item.region.split(',')
  1016. })
  1017. })
  1018. }
  1019. },
  1020. methods: {
  1021. //自定义列保存
  1022. async saveColumnBoxTwo() {
  1023. /**
  1024. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1025. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1026. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1027. */
  1028. const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
  1029. if (inSave) {
  1030. this.$message.success("保存成功");
  1031. //关闭窗口
  1032. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1033. }
  1034. },
  1035. //自定义列重置
  1036. async resetColumnBoxTwo() {
  1037. this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
  1038. const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1039. if (inSave) {
  1040. this.$message.success("重置成功");
  1041. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1042. }
  1043. },
  1044. getCorpData(val){
  1045. this.formData.fleetName = val.cname
  1046. },
  1047. confirmChange(){
  1048. console.log(this.form.id)
  1049. changeFleet({
  1050. ...this.formData,
  1051. id: this.formDataList.id,
  1052. orderId:this.goodsForm.id,
  1053. originalFleetName:this.formDataList.fleetName
  1054. }).then(res=>{
  1055. this.$refs.saveForm.resetForm()
  1056. this.entrustList = res.data.data
  1057. this.dialogChange = false
  1058. this.$message.success("变更成功");
  1059. })
  1060. },
  1061. //多选触发
  1062. selectionChange(list) {
  1063. this.selectionList = list
  1064. },
  1065. //批量调度
  1066. batchScheduling() {
  1067. this.form = {}
  1068. this.dialogVisible = true
  1069. },
  1070. //提交调度
  1071. saveScheduling() {
  1072. this.$refs['form'].validate((valid, done) => {
  1073. done()
  1074. if (valid){
  1075. let data = []
  1076. this.$confirm('是否确认调度?', '提示', {
  1077. confirmButtonText: '确定',
  1078. cancelButtonText: '取消',
  1079. type: 'warning'
  1080. }).then(() => {
  1081. this.selectionList.forEach(item=>data.push(item.id))
  1082. dispatchBatch({
  1083. ...this.form,
  1084. idList:data,
  1085. orderId:this.goodsForm.id
  1086. }).then(res=>{
  1087. this.entrustList = res.data.data
  1088. this.dialogVisible = false
  1089. })
  1090. }).catch(() => {
  1091. this.$message({
  1092. type: 'info',
  1093. message: '已取消'
  1094. });
  1095. });
  1096. }else {
  1097. return false
  1098. }
  1099. })
  1100. },
  1101. //刷新数据
  1102. refreshData() {
  1103. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1104. this.goodsForm = res.data.data
  1105. this.tableData = res.data.data.orderAddressList
  1106. this.entrustList = res.data.data.orderItemList
  1107. this.goodsList = res.data.data.orderItemList
  1108. this.orderFilesList = res.data.data.fileList
  1109. if (res.data.data.orderFeeList.length > 0) {
  1110. res.data.data.orderFeeList.forEach(item => {
  1111. if (item.type == 1) {
  1112. this.collectionList.push(item)
  1113. } else {
  1114. this.paymentList.push(item)
  1115. }
  1116. })
  1117. }
  1118. delete this.goodsForm.orderAddressList
  1119. delete this.goodsForm.orderItemList
  1120. delete this.goodsForm.orderFeeList
  1121. this.tableData.forEach(item => {
  1122. if (item.region) item.region = item.region.split(',')
  1123. })
  1124. })
  1125. },
  1126. //切换收付费
  1127. handleSelect(tab, event) {
  1128. this.activeIndex = tab.name
  1129. },
  1130. //箱信息保存
  1131. rowSaveT(row, index, done, loading) {
  1132. if (row.$cellEdit) {
  1133. fleetDriverSave(row).then(res => {
  1134. this.$message.success("保存成功");
  1135. })
  1136. }
  1137. this.$refs.crudBoxTwo.rowCell(row, index)
  1138. },
  1139. rowSaveWell(row, index, done, loading) {
  1140. done()
  1141. },
  1142. //箱信息调度
  1143. designate(row, index) {
  1144. if (row.fleetId) {
  1145. this.$confirm('是否确定调度', '提示', {
  1146. confirmButtonText: '确定',
  1147. cancelButtonText: '取消',
  1148. type: 'warning'
  1149. }).then(() => {
  1150. dispatchCollection(row).then(res => {
  1151. this.$message.success('操作成功');
  1152. this.entrustList[index].status = res.data.data.status
  1153. })
  1154. }).catch(() => {
  1155. this.$message({
  1156. type: 'info',
  1157. message: '已取消'
  1158. });
  1159. });
  1160. } else {
  1161. this.$message.warning('请选择车队');
  1162. }
  1163. },
  1164. //变更车队
  1165. changeFleetT(row, index){
  1166. this.formDataList = row
  1167. this.dialogChange = true
  1168. this.formData = {}
  1169. },
  1170. //打开变更记录
  1171. recordsOfChanges(row, index){
  1172. this.dialogRecord = true
  1173. recordingDetails({itemId:row.id,kind:2}).then(res=>{
  1174. this.dataRecord = res.data.data
  1175. })
  1176. },
  1177. //取消调度
  1178. cancelDesignate(row, index) {
  1179. this.$confirm('是否确定取消调度', '提示', {
  1180. confirmButtonText: '确定',
  1181. cancelButtonText: '取消',
  1182. type: 'warning'
  1183. }).then(() => {
  1184. cancelDispatchCollection({id: row.id}).then(res => {
  1185. this.$message.success('操作成功');
  1186. this.entrustList[index].status = res.data.data.status
  1187. })
  1188. }).catch(() => {
  1189. this.$message({
  1190. type: 'info',
  1191. message: '已取消'
  1192. });
  1193. });
  1194. },
  1195. //箱信息选择车队
  1196. getfleetIdT(data, row) {
  1197. this.$set(row, 'fleetName', data.cname)
  1198. },
  1199. //地址新增
  1200. addAddress() {
  1201. this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
  1202. },
  1203. //返回主列表
  1204. backToList() {
  1205. this.$emit('backToList')
  1206. },
  1207. //删除途径地址
  1208. deleteAddress(scope) {
  1209. this.tableData.splice(scope.$index, 1);
  1210. },
  1211. //箱信息保存
  1212. rowSave(row, index, done, loading) {
  1213. row.$cellEdit = false
  1214. done()
  1215. },
  1216. rowCell(row, index) {
  1217. this.$refs.collection.rowCell(row, index)
  1218. },
  1219. paymentRowCell(row, index) {
  1220. this.$refs.payment.rowCell(row, index)
  1221. },
  1222. //箱信息移除
  1223. rowDel(row, index) {
  1224. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1225. confirmButtonText: '确定',
  1226. cancelButtonText: '取消',
  1227. type: 'warning'
  1228. }).then(() => {
  1229. this.entrustList.splice(index, 1);
  1230. }).catch(() => {
  1231. this.$message({
  1232. type: 'info',
  1233. message: '已取消删除'
  1234. });
  1235. });
  1236. },
  1237. //保存
  1238. editCustomer() {
  1239. let data = JSON.parse(JSON.stringify(this.tableData))
  1240. data.forEach(item => {
  1241. if (item.region.length !== 0) item.region = item.region.join(',')
  1242. })
  1243. saveDelegationList({
  1244. ...this.goodsForm,
  1245. kind: '2',
  1246. orderAddressList: data,
  1247. orderItemList: this.entrustList,
  1248. orderFeeList: this.collectionList.concat(this.paymentList)
  1249. }).then(res => {
  1250. this.$message.success('保存成功');
  1251. })
  1252. },
  1253. //收费新增
  1254. addRowCollection() {
  1255. this.$refs.collection.rowCellAdd({
  1256. currency: '1',
  1257. type: '1',
  1258. $cellEdit: true
  1259. });
  1260. },
  1261. //付费新增
  1262. addRowPayment() {
  1263. this.$refs.payment.rowCellAdd({
  1264. currency: '1',
  1265. type: '2',
  1266. $cellEdit: true
  1267. });
  1268. },
  1269. //选择费用
  1270. selectValue(value, row) {
  1271. this.$set(row, 'feeName', value.cname)
  1272. },
  1273. //选择客户信息触发
  1274. getfleetId(data, row) {
  1275. this.$set(row, 'corpName', data.cname)
  1276. },
  1277. //收款信息移除
  1278. makeDel(row, index) {
  1279. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1280. confirmButtonText: '确定',
  1281. cancelButtonText: '取消',
  1282. type: 'warning'
  1283. }).then(() => {
  1284. if (row.id) removeCollection(row.id)
  1285. this.collectionList.splice(index, 1);
  1286. }).catch(() => {
  1287. this.$message({
  1288. type: 'info',
  1289. message: '已取消删除'
  1290. });
  1291. });
  1292. },
  1293. //付款信息移除
  1294. feeDel(row, index) {
  1295. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1296. confirmButtonText: '确定',
  1297. cancelButtonText: '取消',
  1298. type: 'warning'
  1299. }).then(() => {
  1300. if (row.id) removeCollection(row.id)
  1301. this.paymentList.splice(index, 1);
  1302. }).catch(() => {
  1303. this.$message({
  1304. type: 'info',
  1305. message: '已取消删除'
  1306. });
  1307. });
  1308. },
  1309. //自定义表头
  1310. renderHeader(h) {
  1311. return (
  1312. <div>
  1313. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  1314. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  1315. style="margin-right: 1.25rem;"></el-button>
  1316. </el-tooltip>
  1317. </div>
  1318. )
  1319. }
  1320. }
  1321. }
  1322. </script>
  1323. <style scoped>
  1324. </style>