detailPage.vue 41 KB

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