index.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357
  1. <template>
  2. <div>
  3. <basic-container v-if="key>0">
  4. <avue-crud
  5. :data="goodsList"
  6. :option="goodsOptionCrud"
  7. :table-loading="loading"
  8. :page.sync="page"
  9. ref="crud"
  10. @on-load="onLoad"
  11. @resetColumn="resetColumn"
  12. @saveColumn="saveColumn"
  13. @search-change="searchChange"
  14. @search-reset="query = {}"
  15. :search.sync="query"
  16. @search-criteria-switch="searchCriteriaSwitch"
  17. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  18. @row-update="rowSave">
  19. <template slot="plateNo" slot-scope="{row}">
  20. <span class="el-button--text" style="cursor: pointer"
  21. @click="openTrack(row)">{{ row.plateNo }}</span>
  22. </template>
  23. <template slot="menuLeft">
  24. <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
  25. </template>
  26. <template slot="corpShortNameSearch" slot-scope="{ row,index}">
  27. <crop-select
  28. v-model="row.corpId"
  29. :corpType="'KH'"
  30. :label="'shortName'"
  31. ></crop-select>
  32. </template>
  33. <template slot-scope="{row}" slot="fleetId">
  34. <span>{{ row.fleetName }}</span>
  35. </template>
  36. <template slot="billNo" slot-scope="{row,index}">
  37. <span v-if="roleName.indexOf('车队') !== -1" style="cursor: pointer">{{ row.billNo }}</span>
  38. <span class="el-button--text" v-else style="cursor: pointer" @click.stop="celJump(row,index)">{{row.billNo}}</span>
  39. </template>
  40. <template slot="corpShortName" slot-scope="{row,index}">
  41. <span class="el-button--text" style="cursor: pointer"
  42. @click.stop="celJump(row,index)">{{ row.corpShortName }}</span>
  43. </template>
  44. <template slot="dispatchNumber" slot-scope="{row,index}">
  45. <span class="el-button--text" style="cursor: pointer"
  46. @click.stop="celJump(row,index)">{{ row.dispatchNumber }}</span>
  47. </template>
  48. <template slot-scope="{row}" slot="fleetIdSearch">
  49. <crop-select
  50. v-model="row.fleetId"
  51. corpType="CD"
  52. ></crop-select>
  53. </template>
  54. <template slot-scope="{row,index}" slot="menu">
  55. <span v-if="row.extraAmountD>0">
  56. <el-button
  57. size="small"
  58. type="text"
  59. >{{ row.confirmStatus !== 0 ? '已确认' : '' }}
  60. </el-button>
  61. <el-button
  62. size="small"
  63. type="text"
  64. @click="incidentalConfirm(row)"
  65. >{{ row.confirmStatus == 0 ? '杂费确认' : '杂费取消' }}
  66. </el-button>
  67. </span>
  68. </template>
  69. <template slot="addressDetail" slot-scope="{ row,index}">
  70. <el-tooltip class="item" effect="dark" placement="top">
  71. <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
  72. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.addressDetail }}</div>
  73. </el-tooltip>
  74. </template>
  75. <template slot="unloadingPlace" slot-scope="{ row,index}">
  76. <el-tooltip class="item" effect="dark" placement="top">
  77. <div v-html="ToBreak(row.unloadingPlace)" slot="content"></div>
  78. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.unloadingPlace }}</div>
  79. </el-tooltip>
  80. </template>
  81. <template slot="extraAmountItemC" slot-scope="{ row,index}">
  82. <el-tooltip class="item" effect="dark" placement="top">
  83. <div v-html="ToBreak(row.extraAmountItemC)" slot="content"></div>
  84. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.extraAmountItemC }}</div>
  85. </el-tooltip>
  86. </template>
  87. <template slot="extraAmountItemD" slot-scope="{ row,index}">
  88. <el-tooltip class="item" effect="dark" placement="top">
  89. <div v-html="ToBreak(row.extraAmountItemD)" slot="content"></div>
  90. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.extraAmountItemD }}</div>
  91. </el-tooltip>
  92. </template>
  93. </avue-crud>
  94. <el-dialog
  95. title="杂费明细"
  96. :visible.sync="incidentalType"
  97. append-to-body
  98. width="50%">
  99. <avue-crud
  100. :data="collectionList"
  101. :option="collectionOption"
  102. ref="collection"
  103. @resetColumn="resetColumnCollection"
  104. @saveColumn="saveColumnCollection"
  105. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  106. @row-update="rowSave">
  107. <template slot-scope="{row,index}" slot="menu">
  108. <!-- <el-button-->
  109. <!-- type="text"-->
  110. <!-- size="small"-->
  111. <!-- :disabled="goodsForm.status === 1"-->
  112. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  113. <!-- @click="rowCell(row,index)"-->
  114. <!-- >{{ row.$cellEdit ? '保存' : '编辑' }}-->
  115. <!-- </el-button>-->
  116. <!-- <el-button type="text"-->
  117. <!-- icon="el-icon-delete"-->
  118. <!-- size="small"-->
  119. <!-- :disabled="goodsForm.status === 1"-->
  120. <!-- @click="$refs.collection.rowDel(row,index)"-->
  121. <!-- >删除-->
  122. <!-- </el-button>-->
  123. <el-button
  124. size="small"
  125. type="text"
  126. icon="el-icon-s-order"
  127. @click="annexOpen(row, index)"
  128. >附 件
  129. </el-button>
  130. </template>
  131. <template slot="menuLeft">
  132. <!-- <el-button-->
  133. <!-- type="primary"-->
  134. <!-- icon="el-icon-plus"-->
  135. <!-- :disabled="goodsForm.status !== 0"-->
  136. <!-- @click="addRowCollection"-->
  137. <!-- size="small">录入明细</el-button>-->
  138. </template>
  139. </avue-crud>
  140. <span slot="footer" class="dialog-footer">
  141. <el-button @click="incidentalType = false" size="small">取 消</el-button>
  142. <el-button type="primary" size="small" v-if="collectionList.length>0"
  143. @click="incidentalClick">{{ confirmStatus == 0 ? '杂费确认' : '杂费取消' }}</el-button>
  144. </span>
  145. </el-dialog>
  146. <el-dialog
  147. title="附件"
  148. :visible.sync="enclosure"
  149. append-to-body
  150. width="70%">
  151. <c-upload
  152. typeUpload="GZ"
  153. :basic="true"
  154. disabled
  155. deleteUrl="/api/blade-client/common-file/remove"
  156. :data="orderList"
  157. :enumerationValue="76"
  158. ></c-upload>
  159. <span slot="footer" class="dialog-footer">
  160. <el-button @click="enclosure = false" size="small">取 消</el-button>
  161. </span>
  162. </el-dialog>
  163. <track-playback :dialogVisible="dialogVisibleTwo" v-loading="loadingDialog" :parkingPoint="parkingPoint"
  164. :lineArr="lineArr"
  165. ref="playback"></track-playback>
  166. </basic-container>
  167. </div>
  168. </template>
  169. <script>
  170. import {
  171. acceptanceCollection,
  172. acceptanceDispatchCollection,
  173. confirmCompletion,
  174. fleetList,
  175. motorcadeDriver,
  176. fleetDriverSave,
  177. getAttachment,
  178. saveAttached,
  179. incidental,
  180. getFee,
  181. incidentalConfirm,
  182. cancelConfirm, standingBookCollection
  183. } from "@/api/landTransportation";
  184. import {getToken} from "@/util/auth";
  185. import {gaude} from "@/api/gaude";
  186. import {getSalesman} from "@/api/landTransportation/bulkCargo";
  187. export default {
  188. name: "index",
  189. data() {
  190. return {
  191. key: 0,
  192. form: {},
  193. enclosure: false,
  194. dialogVisibleTwo: false,
  195. loadingDialog: false,
  196. lineArr: [],
  197. parkingPoint: [],
  198. orderList: [],
  199. collectionOptionBackup: {
  200. align: 'center',
  201. menuAlign: 'center',
  202. refreshBtn: false,
  203. index: true,
  204. // menu:false,
  205. cancelBtn: false,
  206. editBtn: false,
  207. delBtn: false,
  208. cellBtn: false,
  209. addBtn: false,
  210. addRowBtn: false,
  211. showSummary: true,
  212. addBtnText: '录入明细',
  213. summaryText: "合计",
  214. sumColumnList: [{
  215. name: 'price',
  216. type: 'sum',
  217. decimals: 2
  218. }, {
  219. name: 'amount',
  220. type: 'sum',
  221. decimals: 2
  222. }, {
  223. name: 'quantity',
  224. type: 'sum',
  225. decimals: 0
  226. }],
  227. column: [
  228. {
  229. label: '费用名称',
  230. slot: true,
  231. prop: 'feeName'
  232. }, {
  233. label: '金额',
  234. cell: true,
  235. prop: 'amount'
  236. }, {
  237. label: '车号',
  238. prop: 'plateNo'
  239. }, {
  240. label: '备注',
  241. prop: 'remarks'
  242. }
  243. ]
  244. },
  245. collectionOption: {},
  246. collectionList: [],
  247. dialogVisible: false,
  248. loading: false,
  249. incidentalType: false,
  250. confirmStatus: 0,
  251. activeName: '',
  252. query: {},
  253. page: {
  254. pageSize: 10,
  255. currentPage: 1,
  256. total: 0,
  257. pageSizes: [10, 50, 100, 200, 300]
  258. },
  259. roleName: localStorage.getItem("roleName").split(','),
  260. goodsList: [],
  261. goodsOptionCrud: {},
  262. totalData: {},
  263. optionList: {},
  264. //客户
  265. optionListOne: {
  266. stripe: true,
  267. index: true,
  268. addBtn: false,
  269. delBtn: false,
  270. cellBtn: false,
  271. cancelBtn: false,
  272. editBtn: false,
  273. addRowBtn: false,
  274. refreshBtn: false,
  275. searchIcon: true,
  276. searchIndex: 2,
  277. searchSpan: 8,
  278. menuWidth: 140,
  279. menu: true,
  280. searchMenuPosition: "right",
  281. searchMenuSpan: 6,
  282. align: 'center',
  283. height: "auto",
  284. showSummary: true,
  285. summaryText: "合计",
  286. sumColumnList: [
  287. {
  288. name: 'landWeight',
  289. type: 'sum',
  290. decimals: 2
  291. }, {
  292. name: 'landAmountC',
  293. type: 'sum',
  294. decimals: 2
  295. }, {
  296. name: 'ctnQuantity',
  297. type: 'count'
  298. }, {
  299. name: 'oneFeeC',
  300. type: 'sum',
  301. decimals: 2
  302. }, {
  303. name: 'twoFeeC',
  304. type: 'sum',
  305. decimals: 2
  306. }, {
  307. name: 'threeFeeC',
  308. type: 'sum',
  309. decimals: 2
  310. }, {
  311. name: 'fourFeeC',
  312. type: 'sum',
  313. decimals: 2
  314. }, {
  315. name: 'fiveFeeC',
  316. type: 'sum',
  317. decimals: 2
  318. }, {
  319. name: 'oneFeeD',
  320. type: 'sum',
  321. decimals: 2
  322. }, {
  323. name: 'twoFeeD',
  324. type: 'sum',
  325. decimals: 2
  326. }, {
  327. name: 'threeFeeD',
  328. type: 'sum',
  329. decimals: 2
  330. }, {
  331. name: 'fourFeeD',
  332. type: 'sum',
  333. decimals: 2
  334. }, {
  335. name: 'fiveFeeD',
  336. type: 'sum',
  337. decimals: 2
  338. }, {
  339. name: 'profit',
  340. type: 'sum',
  341. decimals: 2
  342. }, {
  343. name: 'extraAmountC',
  344. type: 'sum',
  345. decimals: 2
  346. }, {
  347. name: 'landAmountD',
  348. type: 'sum',
  349. decimals: 2
  350. }, {
  351. name: 'extraAmountD',
  352. type: 'sum',
  353. decimals: 2
  354. }],
  355. column: [{
  356. label: '客户名称',
  357. prop: 'corpShortName',
  358. overHidden: true,
  359. index: 1,
  360. width: 100,
  361. search: true,
  362. }, {
  363. label: '货运日期',
  364. prop: 'arrivalTime',
  365. overHidden: true,
  366. type: "date",
  367. searchRange: true,
  368. defaultTime: ['00:00:00', '23:59:59'],
  369. format: "yyyy-MM-dd HH:mm",
  370. valueFormat: "yyyy-MM-dd HH:mm:ss",
  371. index: 2,
  372. width: 126,
  373. search: true,
  374. }, {
  375. label: '业务员',
  376. prop: 'salesmanName',
  377. index: 3,
  378. width: 70,
  379. searchProp: 'salesman',
  380. search: true,
  381. overHidden: true,
  382. filterable: true,
  383. type: "select",
  384. dicUrl: "/api/blade-user/userList?roleAlias=业务员",
  385. props: {
  386. label: "realName",
  387. value: "id"
  388. }
  389. }, {
  390. label: '物流运输',
  391. prop: 'dispatchDept',
  392. search: true,
  393. dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
  394. type: "select",
  395. props: {
  396. label: "deptName",
  397. value: "id"
  398. },
  399. overHidden: true,
  400. index: 4,
  401. width: 80
  402. }, {
  403. label: '运输调度',
  404. prop: 'dispatcherName',
  405. overHidden: true,
  406. index: 5,
  407. width: 70,
  408. }, {
  409. label: '派车单号',
  410. width: 80,
  411. index: 5,
  412. overHidden: true,
  413. search: true,
  414. prop: 'dispatchNumber'
  415. }, {
  416. label: '合同号',
  417. width: 90,
  418. index: 6,
  419. overHidden: true,
  420. search: true,
  421. prop: 'contractNo'
  422. }, {
  423. label: '装货地点',
  424. prop: 'addressDetail',
  425. index: 7,
  426. width: 132,
  427. }, {
  428. label: '卸货地点',
  429. prop: 'unloadingPlace',
  430. index: 8,
  431. width: 132,
  432. }, {
  433. label: '车型',
  434. width: 90,
  435. index: 9,
  436. prop: 'fleetVolum'
  437. }, {
  438. label: '车队',
  439. prop: 'fleetShortName',
  440. index: 10,
  441. width: 90,
  442. searchProp: 'fleetId',
  443. type: 'select',
  444. cascader: ['plateNo'],
  445. props: {
  446. label: "cname",
  447. value: "id"
  448. },
  449. filterable: true,
  450. search: true,
  451. overHidden: true,
  452. }, {
  453. label: '车号',
  454. prop: 'plateNo',
  455. index: 11,
  456. width: 90,
  457. overHidden: true,
  458. }, {
  459. label: '应收运费',
  460. overHidden: true,
  461. index: 12,
  462. width: 100,
  463. prop: 'landAmountD'
  464. }, {
  465. label: '应收杂费',
  466. prop: 'extraAmountD',
  467. index: 13,
  468. width: 100,
  469. overHidden: true,
  470. }, {
  471. label: '备注',
  472. prop: 'remarks',
  473. index: 14,
  474. width: 100,
  475. overHidden: true,
  476. }, {
  477. label: '应付杂费明细',
  478. width: 100,
  479. index: 15,
  480. overHidden: true,
  481. prop: 'extraAmountItemC'
  482. }]
  483. },
  484. //平台
  485. optionListTwo: {
  486. stripe: true,
  487. index: true,
  488. addBtn: false,
  489. delBtn: false,
  490. cellBtn: false,
  491. cancelBtn: false,
  492. editBtn: false,
  493. addRowBtn: false,
  494. refreshBtn: false,
  495. searchIcon: true,
  496. searchIndex: 2,
  497. searchSpan: 8,
  498. menuWidth: 140,
  499. menu: true,
  500. searchMenuPosition: "right",
  501. searchMenuSpan: 6,
  502. align: 'center',
  503. height: "auto",
  504. showSummary: true,
  505. summaryText: "合计",
  506. sumColumnList: [
  507. {
  508. name: 'landWeight',
  509. type: 'sum',
  510. decimals: 2
  511. }, {
  512. name: 'landAmountC',
  513. type: 'sum',
  514. decimals: 2
  515. }, {
  516. name: 'ctnQuantity',
  517. type: 'count'
  518. }, {
  519. name: 'oneFeeC',
  520. type: 'sum',
  521. decimals: 2
  522. }, {
  523. name: 'twoFeeC',
  524. type: 'sum',
  525. decimals: 2
  526. }, {
  527. name: 'threeFeeC',
  528. type: 'sum',
  529. decimals: 2
  530. }, {
  531. name: 'fourFeeC',
  532. type: 'sum',
  533. decimals: 2
  534. }, {
  535. name: 'fiveFeeC',
  536. type: 'sum',
  537. decimals: 2
  538. }, {
  539. name: 'oneFeeD',
  540. type: 'sum',
  541. decimals: 2
  542. }, {
  543. name: 'twoFeeD',
  544. type: 'sum',
  545. decimals: 2
  546. }, {
  547. name: 'threeFeeD',
  548. type: 'sum',
  549. decimals: 2
  550. }, {
  551. name: 'fourFeeD',
  552. type: 'sum',
  553. decimals: 2
  554. }, {
  555. name: 'fiveFeeD',
  556. type: 'sum',
  557. decimals: 2
  558. }, {
  559. name: 'profit',
  560. type: 'sum',
  561. decimals: 2
  562. }, {
  563. name: 'extraAmountC',
  564. type: 'sum',
  565. decimals: 2
  566. }, {
  567. name: 'landAmountD',
  568. type: 'sum',
  569. decimals: 2
  570. }, {
  571. name: 'extraAmountD',
  572. type: 'sum',
  573. decimals: 2
  574. }],
  575. column: [{
  576. label: '客户名称',
  577. prop: 'corpShortName',
  578. overHidden: true,
  579. index: 1,
  580. width: 100,
  581. search: true,
  582. }, {
  583. label: '货运日期',
  584. prop: 'arrivalTime',
  585. overHidden: true,
  586. type: "date",
  587. searchRange: true,
  588. defaultTime: ['00:00:00', '23:59:59'],
  589. format: "yyyy-MM-dd HH:mm",
  590. valueFormat: "yyyy-MM-dd HH:mm:ss",
  591. index: 2,
  592. width: 126,
  593. search: true,
  594. }, {
  595. label: '业务员',
  596. prop: 'salesmanName',
  597. index: 3,
  598. width: 70,
  599. searchProp: 'salesman',
  600. search: true,
  601. overHidden: true,
  602. filterable: true,
  603. type: "select",
  604. dicUrl: "/api/blade-user/userList?roleAlias=业务员",
  605. props: {
  606. label: "realName",
  607. value: "id"
  608. }
  609. }, {
  610. label: '运输调度',
  611. prop: 'dispatcherName',
  612. overHidden: true,
  613. index: 4,
  614. width: 70,
  615. }, {
  616. label: '派车单号',
  617. width: 80,
  618. index: 5,
  619. overHidden: true,
  620. search: true,
  621. prop: 'dispatchNumber'
  622. }, {
  623. label: '合同号',
  624. width: 90,
  625. index: 6,
  626. overHidden: true,
  627. search: true,
  628. prop: 'contractNo'
  629. }, {
  630. label: '装货地点',
  631. prop: 'addressDetail',
  632. index: 7,
  633. width: 132,
  634. }, {
  635. label: '卸货地点',
  636. prop: 'unloadingPlace',
  637. index: 8,
  638. width: 132,
  639. }, {
  640. label: '车型',
  641. width: 90,
  642. index: 9,
  643. prop: 'fleetVolum'
  644. }, {
  645. label: '车队',
  646. prop: 'fleetShortName',
  647. index: 10,
  648. width: 90,
  649. searchProp: 'fleetId',
  650. type: 'select',
  651. cascader: ['plateNo'],
  652. props: {
  653. label: "cname",
  654. value: "id"
  655. },
  656. filterable: true,
  657. search: true,
  658. overHidden: true,
  659. }, {
  660. label: '车号',
  661. prop: 'plateNo',
  662. index: 11,
  663. width: 90,
  664. overHidden: true,
  665. }, {
  666. label: '应收运费',
  667. overHidden: true,
  668. index: 12,
  669. width: 100,
  670. prop: 'landAmountD'
  671. }, {
  672. label: '应收杂费',
  673. prop: 'extraAmountD',
  674. index: 13,
  675. width: 100,
  676. overHidden: true,
  677. }, {
  678. label: '备注',
  679. prop: 'remarks',
  680. index: 14,
  681. width: 100,
  682. overHidden: true,
  683. }, {
  684. label: '应付运费',
  685. prop: 'landAmountC',
  686. index: 15,
  687. width: 100,
  688. overHidden: true,
  689. }, {
  690. label: '应付杂费',
  691. prop: 'extraAmountC',
  692. index: 16,
  693. width: 100,
  694. overHidden: true
  695. }, {
  696. label: '利润',
  697. width: 80,
  698. precision: 2,
  699. index: 17,
  700. type: 'number',
  701. prop: 'profit'
  702. }, {
  703. label: '应收杂费明细',
  704. width: 100,
  705. index: 17,
  706. prop: 'extraAmountItemD'
  707. }, {
  708. label: '应付杂费明细',
  709. width: 100,
  710. index: 18,
  711. overHidden: true,
  712. prop: 'extraAmountItemC'
  713. }]
  714. },
  715. //车队
  716. optionListThree: {
  717. stripe: true,
  718. index: true,
  719. addBtn: false,
  720. delBtn: false,
  721. cellBtn: false,
  722. cancelBtn: false,
  723. editBtn: false,
  724. addRowBtn: false,
  725. refreshBtn: false,
  726. searchIcon: true,
  727. searchIndex: 2,
  728. searchSpan: 8,
  729. menuWidth: 140,
  730. menu: true,
  731. searchMenuPosition: "right",
  732. searchMenuSpan: 6,
  733. align: 'center',
  734. height: "auto",
  735. showSummary: true,
  736. summaryText: "合计",
  737. sumColumnList: [
  738. {
  739. name: 'landWeight',
  740. type: 'sum',
  741. decimals: 2
  742. }, {
  743. name: 'landAmountC',
  744. type: 'sum',
  745. decimals: 2
  746. }, {
  747. name: 'ctnQuantity',
  748. type: 'count'
  749. }, {
  750. name: 'oneFeeC',
  751. type: 'sum',
  752. decimals: 2
  753. }, {
  754. name: 'twoFeeC',
  755. type: 'sum',
  756. decimals: 2
  757. }, {
  758. name: 'threeFeeC',
  759. type: 'sum',
  760. decimals: 2
  761. }, {
  762. name: 'fourFeeC',
  763. type: 'sum',
  764. decimals: 2
  765. }, {
  766. name: 'fiveFeeC',
  767. type: 'sum',
  768. decimals: 2
  769. }, {
  770. name: 'oneFeeD',
  771. type: 'sum',
  772. decimals: 2
  773. }, {
  774. name: 'twoFeeD',
  775. type: 'sum',
  776. decimals: 2
  777. }, {
  778. name: 'threeFeeD',
  779. type: 'sum',
  780. decimals: 2
  781. }, {
  782. name: 'fourFeeD',
  783. type: 'sum',
  784. decimals: 2
  785. }, {
  786. name: 'fiveFeeD',
  787. type: 'sum',
  788. decimals: 2
  789. }, {
  790. name: 'profit',
  791. type: 'sum',
  792. decimals: 2
  793. }, {
  794. name: 'extraAmountC',
  795. type: 'sum',
  796. decimals: 2
  797. }, {
  798. name: 'landAmountD',
  799. type: 'sum',
  800. decimals: 2
  801. }, {
  802. name: 'extraAmountD',
  803. type: 'sum',
  804. decimals: 2
  805. }],
  806. column: [{
  807. label: '货运日期',
  808. prop: 'arrivalTime',
  809. overHidden: true,
  810. type: "date",
  811. searchRange: true,
  812. defaultTime: ['00:00:00', '23:59:59'],
  813. format: "yyyy-MM-dd HH:mm",
  814. valueFormat: "yyyy-MM-dd HH:mm:ss",
  815. index: 1,
  816. width: 126,
  817. search: true,
  818. }, {
  819. label: '物流运输',
  820. prop: 'dispatchDept',
  821. search: true,
  822. dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
  823. type: "select",
  824. props: {
  825. label: "deptName",
  826. value: "id"
  827. },
  828. overHidden: true,
  829. index: 2,
  830. width: 80
  831. }, {
  832. label: '运输调度',
  833. prop: 'dispatcherName',
  834. overHidden: true,
  835. index: 3,
  836. width: 70,
  837. }, {
  838. label: '派车单号',
  839. width: 80,
  840. index: 4,
  841. overHidden: true,
  842. search: true,
  843. prop: 'dispatchNumber'
  844. }, {
  845. label: '合同号',
  846. width: 90,
  847. index: 5,
  848. overHidden: true,
  849. search: true,
  850. prop: 'contractNo'
  851. }, {
  852. label: '装货地点',
  853. prop: 'addressDetail',
  854. index: 6,
  855. width: 132,
  856. }, {
  857. label: '卸货地点',
  858. prop: 'unloadingPlace',
  859. index: 7,
  860. width: 132,
  861. }, {
  862. label: '车型',
  863. width: 90,
  864. index: 8,
  865. prop: 'fleetVolum'
  866. }, {
  867. label: '车队',
  868. prop: 'fleetShortName',
  869. index: 9,
  870. width: 90,
  871. searchProp: 'fleetId',
  872. type: 'select',
  873. cascader: ['plateNo'],
  874. props: {
  875. label: "cname",
  876. value: "id"
  877. },
  878. filterable: true,
  879. search: true,
  880. overHidden: true,
  881. }, {
  882. label: '车号',
  883. prop: 'plateNo',
  884. index: 10,
  885. width: 90,
  886. overHidden: true,
  887. }, {
  888. label: '应付运费',
  889. prop: 'landAmountC',
  890. index: 11,
  891. width: 100,
  892. overHidden: true,
  893. }, {
  894. label: '应付杂费',
  895. prop: 'extraAmountC',
  896. index: 12,
  897. width: 100,
  898. overHidden: true
  899. }, {
  900. label: '备注',
  901. prop: 'remarks',
  902. index: 13,
  903. width: 100,
  904. overHidden: true,
  905. }, {
  906. label: '应付杂费明细',
  907. width: 100,
  908. index: 14,
  909. overHidden: true,
  910. prop: 'extraAmountItemC'
  911. }]
  912. }
  913. }
  914. },
  915. async created() {
  916. if (this.roleName.indexOf('客户') !== -1) {
  917. this.optionList = this.optionListOne
  918. } else if (this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('admin') !== -1) {
  919. this.optionList = this.optionListTwo
  920. } else if (this.roleName.indexOf('车队') !== -1) {
  921. this.optionList = this.optionListThree
  922. } else {
  923. this.optionList = this.optionListOne
  924. }
  925. this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.3), this.optionList);
  926. this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
  927. getSalesman().then(res=>{
  928. this.findObject(this.goodsOptionCrud.column, "salesmanName").dicData = res.data.data
  929. })
  930. fleetList().then(res=>{
  931. this.findObject(this.option.column, "fleetShortName").dicData = res.data.data
  932. })
  933. this.key++
  934. this.calculateHu()
  935. },
  936. methods: {
  937. calculateHu() {
  938. let i = 0;
  939. this.goodsOptionCrud.column.forEach(item => {
  940. if (item.search === true) i++
  941. })
  942. if (i % 3 !== 0) {
  943. const num = 3 - Number(i % 3)
  944. this.goodsOptionCrud.searchMenuSpan = num * 8;
  945. this.goodsOptionCrud.searchMenuPosition = "right";
  946. }
  947. },
  948. openTrack(row) {
  949. gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
  950. this.lineArr = res.data.data.trackArray
  951. this.parkingPoint = res.data.data.parkArray
  952. this.dialogVisibleTwo = true
  953. this.loadingDialog = true
  954. let this_ = this
  955. setTimeout(function () {
  956. this_.$refs.playback.initMap();
  957. this_.loadingDialog = false
  958. }, 1500)
  959. })
  960. },
  961. //导出
  962. outExport() {
  963. this.$confirm('是否导出数据明细?', '提示', {
  964. confirmButtonText: '确定',
  965. cancelButtonText: '取消',
  966. type: 'warning'
  967. }).then(() => {
  968. let queryParams = this.query
  969. if (queryParams.arrivalTime) {
  970. queryParams.beginArrivalTime = queryParams.arrivalTime[0]
  971. queryParams.endArrivalTime = queryParams.arrivalTime[1]
  972. delete queryParams.arrivalTime
  973. }
  974. const routeData = this.$router.resolve({
  975. path: '/api/blade-land/order/acct-export', //跳转目标窗口的地址
  976. query: {
  977. ...queryParams //括号内是要传递给新窗口的参数
  978. }
  979. })
  980. window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
  981. }).catch(() => {
  982. this.$message({
  983. type: 'info',
  984. message: '已取消' //
  985. });
  986. })
  987. },
  988. //自定义列保存
  989. async saveColumnCollection() {
  990. /**
  991. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  992. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  993. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  994. */
  995. const inSave = await this.saveColumnData(this.getColumnName(88.2), this.collectionOption);
  996. if (inSave) {
  997. this.$message.success("保存成功");
  998. //关闭窗口
  999. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1000. }
  1001. },
  1002. //自定义列重置
  1003. async resetColumnCollection() {
  1004. this.collectionOption = this.collectionOptionBackup;
  1005. const inSave = await this.delColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
  1006. if (inSave) {
  1007. this.$message.success("重置成功");
  1008. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1009. }
  1010. },
  1011. //自定义列保存
  1012. async saveColumn() {
  1013. /**
  1014. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1015. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1016. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1017. */
  1018. const inSave = await this.saveColumnData(this.getColumnName(88.1), this.goodsOptionCrud);
  1019. if (inSave) {
  1020. this.$message.success("保存成功");
  1021. //关闭窗口
  1022. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  1023. }
  1024. },
  1025. //自定义列重置
  1026. async resetColumn() {
  1027. this.goodsOptionCrud = this.optionList;
  1028. const inSave = await this.delColumnData(this.getColumnName(88.1), this.optionList);
  1029. if (inSave) {
  1030. this.$message.success("重置成功");
  1031. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  1032. }
  1033. },
  1034. //行跳转
  1035. celJump(row, index) {
  1036. this.$router.push({
  1037. path: '/landTransportation/bulkCargo/index',
  1038. query: {id: '台账' + row.orderId},
  1039. });
  1040. },
  1041. // 获得高度
  1042. searchCriteriaSwitch(type) {
  1043. if (type) {
  1044. this.goodsOptionCrud.height = this.goodsOptionCrud.height - 90
  1045. } else {
  1046. this.goodsOptionCrud.height = this.goodsOptionCrud.height + 90
  1047. }
  1048. this.$refs.crud.getTableHeight()
  1049. },
  1050. //箱信息保存
  1051. rowSave(row, index, done, loading) {
  1052. done()
  1053. },
  1054. //箱信息选择车队
  1055. getfleetIdT(data, row) {
  1056. this.$set(row, 'fleetName', data.cname)
  1057. },
  1058. //搜索
  1059. searchChange(params, done) {
  1060. this.query = params;
  1061. this.onLoad(this.page, params)
  1062. done();
  1063. },
  1064. //切换订单状态
  1065. handleClick(tab) {
  1066. this.activeName = tab
  1067. this.onLoad(this.page)
  1068. },
  1069. //删除对象空值
  1070. removeProperty(obj) {
  1071. Object.keys(obj).forEach(item => {
  1072. if (obj[item] === '' || obj[item] === undefined || obj[item] === null || obj[item] === 'null') delete obj[item]
  1073. })
  1074. return obj
  1075. },
  1076. //查询
  1077. onLoad(page, params) {
  1078. motorcadeDriver(4).then(res => {
  1079. this.totalData = res.data.data
  1080. })
  1081. let queryParams = {
  1082. size: page.pageSize,
  1083. current: page.currentPage,
  1084. tag: '0',
  1085. shippingMode: '散货',
  1086. ...params ? params : this.query
  1087. }
  1088. if (queryParams.arrivalTime) {
  1089. queryParams.beginArrivalTime = queryParams.arrivalTime[0]
  1090. queryParams.endArrivalTime = queryParams.arrivalTime[1]
  1091. delete queryParams.arrivalTime
  1092. }
  1093. queryParams = this.removeProperty(queryParams)
  1094. this.loading = true;
  1095. if (this.loading) this.dialogVisibleTwo = false
  1096. standingBookCollection(queryParams).then(res => {
  1097. this.goodsList = res.data.data.records
  1098. this.page.total = res.data.data.total
  1099. this.goodsOptionCrud.height = window.innerHeight - 245;
  1100. }).finally(() => {
  1101. this.loading = false;
  1102. })
  1103. },
  1104. //箱信息保存
  1105. rowSaveT(row, index, done, loading) {
  1106. if (row.$cellEdit) {
  1107. fleetDriverSave(row).then(res => {
  1108. this.$message.success("保存成功");
  1109. })
  1110. }
  1111. this.$refs.crud.rowCell(row, index)
  1112. },
  1113. //箱信息派车
  1114. designate(row) {
  1115. this.$confirm('是否确定受理', '提示', {
  1116. confirmButtonText: '确定',
  1117. cancelButtonText: '取消',
  1118. type: 'warning'
  1119. }).then(() => {
  1120. acceptanceCollection(row).then(res => {
  1121. this.$message.success('操作成功');
  1122. this.onLoad(this.page)
  1123. })
  1124. }).catch(() => {
  1125. this.$message({
  1126. type: 'info',
  1127. message: '已取消'
  1128. });
  1129. });
  1130. },
  1131. //取消派车
  1132. cancelDesignate(row) {
  1133. this.$confirm('是否确定取消受理', '提示', {
  1134. confirmButtonText: '确定',
  1135. cancelButtonText: '取消',
  1136. type: 'warning'
  1137. }).then(() => {
  1138. acceptanceDispatchCollection({id: row.id}).then(res => {
  1139. this.$message.success('操作成功');
  1140. this.onLoad(this.page)
  1141. })
  1142. }).catch(() => {
  1143. this.$message({
  1144. type: 'info',
  1145. message: '已取消'
  1146. });
  1147. });
  1148. },
  1149. confirmCompletion(row) {
  1150. this.$confirm('是否确定完工', '提示', {
  1151. confirmButtonText: '确定',
  1152. cancelButtonText: '取消',
  1153. type: 'warning'
  1154. }).then(() => {
  1155. confirmCompletion({id: row.id}).then(res => {
  1156. this.$message.success('操作成功');
  1157. this.onLoad(this.page)
  1158. })
  1159. }).catch(() => {
  1160. this.$message({
  1161. type: 'info',
  1162. message: '已取消'
  1163. });
  1164. });
  1165. },
  1166. //打开附件
  1167. annexOpen(row, index) {
  1168. this.enclosure = true
  1169. this.formAnnex = row
  1170. getFee({id: row.id}).then(res => {
  1171. this.orderList = res.data.data
  1172. })
  1173. },
  1174. //保存
  1175. saveAnnex() {
  1176. saveAttached({
  1177. id: this.form.id,
  1178. fileList: this.orderList
  1179. }).then(res => {
  1180. this.annexOpen(this.form)
  1181. })
  1182. },
  1183. ToBreak(val) {
  1184. if (val) return val.replace(/\n/g, '<br/>')
  1185. },
  1186. incidentalConfirm(row) {
  1187. incidental({
  1188. itemId: row.itemId,
  1189. plateNo: row.plateNo,
  1190. type: '1'
  1191. }).then(res => {
  1192. this.collectionList = res.data.data
  1193. this.incidentalType = true
  1194. this.confirmStatus = row.confirmStatus
  1195. })
  1196. },
  1197. incidentalClick() {
  1198. if (this.confirmStatus == 0) {
  1199. incidentalConfirm({itemId: this.collectionList[0].itemId}).then(res => {
  1200. this.$message.success("确认成功");
  1201. this.onLoad(this.page)
  1202. })
  1203. } else {
  1204. cancelConfirm({itemId: this.collectionList[0].itemId}).then(res => {
  1205. this.$message.success("取消成功");
  1206. this.onLoad(this.page)
  1207. })
  1208. }
  1209. this.incidentalType = false
  1210. }
  1211. }
  1212. }
  1213. </script>
  1214. <style lang="scss" scoped>
  1215. .home-container {
  1216. padding: 0px 5px 5px 5px;
  1217. box-sizing: border-box;
  1218. height: 100%;
  1219. ::v-deep .el-card__body {
  1220. padding: 10px 15px;
  1221. font-size: 14px;
  1222. }
  1223. &__card {
  1224. width: 100%;
  1225. height: 100%;
  1226. }
  1227. .title {
  1228. display: flex;
  1229. justify-content: space-between;
  1230. .right {
  1231. display: flex;
  1232. align-items: center;
  1233. &_but {
  1234. margin-right: 10px;
  1235. border: 1px solid #409eff;
  1236. width: 80px;
  1237. border-radius: 3px;
  1238. display: flex;
  1239. &_left {
  1240. width: 40px;
  1241. text-align: center;
  1242. color: #409eff;
  1243. cursor: pointer;
  1244. }
  1245. &_right {
  1246. width: 40px;
  1247. text-align: center;
  1248. color: #409eff;
  1249. cursor: pointer;
  1250. }
  1251. &_active {
  1252. color: #fff;
  1253. background-color: #409eff;
  1254. }
  1255. }
  1256. }
  1257. }
  1258. }
  1259. .content {
  1260. display: flex;
  1261. justify-content: center;
  1262. align-items: center;
  1263. height: 6vh;
  1264. width: 80vw;
  1265. .divider {
  1266. display: block;
  1267. height: 0px;
  1268. width: 100%;
  1269. border-top: 1px dashed #dcdfe6;
  1270. }
  1271. &-item {
  1272. margin-left: 1vw;
  1273. .card {
  1274. width: 130px;
  1275. display: flex;
  1276. align-items: center;
  1277. &-title {
  1278. width: 40px;
  1279. height: 40px;
  1280. text-align: center;
  1281. border-radius: 50%;
  1282. font-size: 20px;
  1283. font-weight: 600;
  1284. display: flex;
  1285. justify-content: center;
  1286. align-items: center;
  1287. span {
  1288. line-height: 20px;
  1289. }
  1290. }
  1291. &-title1 {
  1292. color: #037fe1;
  1293. background-color: rgba(3, 127, 225, 0.15);
  1294. }
  1295. &-title2 {
  1296. color: #ffa21e;
  1297. background-color: rgba(255, 162, 30, 0.15);
  1298. }
  1299. &-title3 {
  1300. color: #fb5b60;
  1301. background-color: rgba(251, 91, 96, 0.15);
  1302. }
  1303. &-title4 {
  1304. color: #42bc6f;
  1305. background-color: rgba(66, 188, 111, 0.15);
  1306. }
  1307. &-title5 {
  1308. color: #14cde1;
  1309. background-color: rgba(52, 149, 161, 0.15);
  1310. }
  1311. &-title6 {
  1312. color: rgba(4, 66, 31, 0.63);
  1313. background-color: rgba(66, 188, 111, 0.15);
  1314. }
  1315. &-content {
  1316. padding-left: 1vw;
  1317. display: flex;
  1318. flex-direction: column;
  1319. &-num {
  1320. font-size: 20px;
  1321. font-weight: 600;
  1322. }
  1323. &-text {
  1324. color: #909399;
  1325. }
  1326. }
  1327. }
  1328. }
  1329. }
  1330. </style>