detailPage.vue 40 KB

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