index.vue 50 KB

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