index.vue 47 KB

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