index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. <template>
  2. <div>
  3. <basic-container>
  4. <div class="home-container">
  5. <div style="display: flex;justify-content: center;">
  6. <div class="content">
  7. <div class="content-item" @click="handleClick('')">
  8. <div class="card">
  9. <div class="card-title card-title1">
  10. <span>
  11. </span>
  12. </div>
  13. <div class="card-content">
  14. <span class="card-content-num" :class="!activeName?'selected':''">{{ totalData.all }}</span>
  15. <span class="card-content-text" :class="!activeName?'selected':''">全部</span>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="divider"/>
  20. <div class="content-item" @click="handleClick('2')">
  21. <div class="card">
  22. <div class="card-title card-title4">
  23. <span>
  24. </span>
  25. </div>
  26. <div class="card-content">
  27. <span class="card-content-num" :class="activeName === '2'?'selected':''">{{ totalData.two }}</span>
  28. <span class="card-content-text" :class="activeName === '2'?'selected':''">未受理</span>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="divider"/>
  33. <div class="content-item" @click="handleClick('3')">
  34. <div class="card">
  35. <div class="card-title card-title5">
  36. <span>
  37. </span>
  38. </div>
  39. <div class="card-content">
  40. <span class="card-content-num" :class="activeName === '3'?'selected':''">{{ totalData.three }}</span>
  41. <span class="card-content-text" :class="activeName === '3'?'selected':''">未完工</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="divider"/>
  46. <div class="content-item" @click="handleClick('4')">
  47. <div class="card">
  48. <div class="card-title card-title6">
  49. <span>
  50. </span>
  51. </div>
  52. <div class="card-content">
  53. <span class="card-content-num" :class="activeName === '4'?'selected':''">{{ totalData.four }}</span>
  54. <span class="card-content-text" :class="activeName === '4'?'selected':''">已完工</span>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </basic-container>
  62. <basic-container v-if="key>0">
  63. <avue-crud
  64. :data="goodsList"
  65. :option="goodsOptionCrud"
  66. :table-loading="loading"
  67. :page.sync="page"
  68. ref="crud"
  69. :search.sync="query"
  70. @on-load="onLoad"
  71. @resetColumn="resetColumn"
  72. @saveColumn="saveColumn"
  73. @search-reset="query={};activeName=''"
  74. @search-change="searchChange"
  75. @search-criteria-switch="searchCriteriaSwitch"
  76. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  77. @row-update="rowSave">
  78. <template slot-scope="{row}" slot="fleetId">
  79. <span>{{ row.fleetName }}</span>
  80. </template>
  81. <!-- <template slot-scope="{row}" slot="fleetIdSearch">-->
  82. <!-- <crop-select-->
  83. <!-- v-model="row.fleetId"-->
  84. <!-- corpType="CD"-->
  85. <!-- ></crop-select>-->
  86. <!-- </template>-->
  87. <template slot-scope="{row,index}" slot="menu">
  88. <el-button
  89. type="text"
  90. size="small"
  91. v-if="row.status === 2"
  92. @click="rowSaveT(row,index)"
  93. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  94. </el-button>
  95. <el-button
  96. size="small"
  97. type="text"
  98. style="color: #ffa21e;"
  99. @click="designate(row, index)"
  100. v-if="row.status===2"
  101. >受 理
  102. </el-button>
  103. <el-button
  104. size="small"
  105. type="text"
  106. style="color: #ffa21e;"
  107. @click="cancelDesignate(row, index)"
  108. v-if="row.status===6"
  109. >取消受理
  110. </el-button>
  111. <el-button
  112. size="small"
  113. type="text"
  114. style="color: #F56C6C;"
  115. @click="confirmArrival(row, index)"
  116. v-if="row.status === 5"
  117. >确认到厂
  118. </el-button>
  119. <el-button
  120. size="small"
  121. type="text"
  122. style="color: #14cde1;"
  123. @click="confirmCompletion(row, index)"
  124. v-if="row.status === 3"
  125. >确认完工
  126. </el-button>
  127. <el-button
  128. size="small"
  129. type="text"
  130. style="color: rgba(231,90,15,0.63);"
  131. @click="suitcase(row, index)"
  132. v-if="row.status === 6"
  133. >提箱
  134. </el-button>
  135. <el-button
  136. size="small"
  137. type="text"
  138. @click="annexOpen(row, index)"
  139. >附 件
  140. </el-button>
  141. </template>
  142. <template slot="addressDetail" slot-scope="{ row,index}">
  143. <el-tooltip class="item" effect="dark" placement="top">
  144. <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
  145. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
  146. </el-tooltip>
  147. </template>
  148. </avue-crud>
  149. <el-dialog
  150. title="附件"
  151. :visible.sync="dialogVisible"
  152. append-to-body
  153. width="70%">
  154. <c-upload
  155. typeUpload="GZ"
  156. :basic="true"
  157. deleteUrl="/api/blade-client/common-file/remove"
  158. :data="orderList"
  159. :enumerationValue="76"
  160. ></c-upload>
  161. <span slot="footer" class="dialog-footer">
  162. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  163. <el-button type="primary" @click="saveAnnex" size="small" :loading="loadingTwo" :disabled="form.status===4">保 存</el-button>
  164. </span>
  165. </el-dialog>
  166. </basic-container>
  167. </div>
  168. </template>
  169. <script>
  170. import {
  171. driverQueryCollection,
  172. acceptanceCollection,
  173. acceptanceDispatchCollection,
  174. confirmCompletion,
  175. fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached, arrival,borrow
  176. } from "@/api/landTransportation";
  177. import {businessStatisticsFrequency} from "@/api/wel";
  178. import {defaultDate} from "@/util/date";
  179. export default {
  180. name: "index",
  181. data() {
  182. return {
  183. key:0,
  184. form: {},
  185. orderList:[],
  186. query:{arrivalTime: [defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']},
  187. dialogVisible: false,
  188. loadingTwo: false,
  189. loading: false,
  190. activeName:'2',
  191. screen:{},
  192. page: {
  193. pageSize: 10,
  194. currentPage: 1,
  195. total: 0,
  196. pageSizes: [10, 50, 100, 200, 300, 500, 1000]
  197. },
  198. roleName: localStorage.getItem("roleName").split(',')[0],
  199. goodsList: [],
  200. goodsOptionCrud:{},
  201. optionList: {
  202. stripe:true,
  203. index: true,
  204. addBtn: false,
  205. delBtn: false,
  206. cellBtn: false,
  207. menuWidth:150,
  208. cancelBtn: false,
  209. editBtn: false,
  210. addRowBtn: false,
  211. searchIcon: true,
  212. searchIndex: 2,
  213. searchSpan: 8,
  214. searchMenuPosition: "right",
  215. searchMenuSpan: 6,
  216. align: 'center',
  217. height: "auto",
  218. showSummary: true,
  219. summaryText: "合计",
  220. sumColumnList: [
  221. {
  222. name: 'landWeight',
  223. type: 'sum',
  224. decimals: 2
  225. }, {
  226. name: 'landAmountC',
  227. type: 'sum',
  228. decimals: 2
  229. }, {
  230. name: 'ctnQuantity',
  231. type: 'count'
  232. },{
  233. name: 'oneFeeC',
  234. type: 'sum',
  235. decimals: 2
  236. },{
  237. name: 'twoFeeC',
  238. type: 'sum',
  239. decimals: 2
  240. },{
  241. name: 'threeFeeC',
  242. type: 'sum',
  243. decimals: 2
  244. },{
  245. name: 'fourFeeC',
  246. type: 'sum',
  247. decimals: 2
  248. },{
  249. name: 'fiveFeeC',
  250. type: 'sum',
  251. decimals: 2
  252. }],
  253. column: [{
  254. label: '货运日期',
  255. prop: 'arrivalTime',
  256. overHidden: true,
  257. type: "date",
  258. searchRange: true,
  259. defaultTime: ['00:00:00', '23:59:59'],
  260. format: "yyyy-MM-dd HH:mm",
  261. valueFormat: "yyyy-MM-dd HH:mm:ss",
  262. index: 1,
  263. width: 119,
  264. search: true,
  265. }, {
  266. label: '物流运输',
  267. prop: 'dispatchDeptName',
  268. overHidden: true,
  269. index: 1,
  270. width: 82,
  271. }, {
  272. label: '运输调度',
  273. prop: 'dispatcherName',
  274. overHidden: true,
  275. index: 1,
  276. width: 70,
  277. },{
  278. label: '货运地点',
  279. index: 2,
  280. width: 138,
  281. search: true,
  282. prop: 'addressDetail'
  283. },{
  284. label: '提单号',
  285. width: 140,
  286. index:3,
  287. search: true,
  288. overHidden: true,
  289. prop: 'billNo'
  290. }, {
  291. label: '场站',
  292. prop: 'station',
  293. overHidden: true,
  294. index: 4,
  295. width: 68,
  296. search: true,
  297. },{
  298. label: '车型',
  299. width: 68,
  300. search: true,
  301. index: 5,
  302. overHidden: true,
  303. prop: 'ctnType',
  304. type: 'select',
  305. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  306. props: {
  307. label: "dictValue",
  308. value: "dictValue"
  309. },
  310. }, {
  311. label: '车量',
  312. width: 58,
  313. index: 6,
  314. prop: 'ctnQuantity'
  315. }, {
  316. label: '车队',
  317. width: 90,
  318. search: true,
  319. index:7,
  320. overHidden: true,
  321. filterable: true,
  322. // overHidden: true,
  323. prop: 'fleetId',
  324. type: 'select',
  325. dicUrl: "/api/blade-client/corpsdesc/fleetList",
  326. cascader: ['plateNo'],
  327. props: {
  328. label: "cname",
  329. value: "id"
  330. }
  331. },{
  332. label: '车号',
  333. width: 82,
  334. prop: 'plateNo',
  335. filterable: true,
  336. overHidden: true,
  337. index:8,
  338. type: 'select',
  339. search: true,
  340. dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
  341. props: {
  342. label: "plateNo",
  343. value: "plateNo"
  344. }
  345. }, {
  346. label: '司机',
  347. width: 77,
  348. index:9,
  349. search: true,
  350. overHidden: true,
  351. filterable: true,
  352. prop: 'driverId',
  353. type: 'select',
  354. dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
  355. props: {
  356. label: "name",
  357. value: "id"
  358. },
  359. }, {
  360. label: '电话',
  361. width: 124,
  362. index:10,
  363. overHidden: true,
  364. search: true,
  365. prop: 'tel'
  366. }, {
  367. label: '平台号',
  368. width: 100,
  369. index: 11,
  370. search: true,
  371. overHidden: true,
  372. prop: 'orderNo'
  373. }, {
  374. label: '箱号',
  375. cell: true,
  376. width: 140,
  377. index: 12,
  378. overHidden: true,
  379. search: true,
  380. prop: 'ctnNo'
  381. },{
  382. label: '实际到厂时间',
  383. prop: 'realArrivalTime',
  384. overHidden: true,
  385. type: "date",
  386. searchRange: true,
  387. defaultTime: ['00:00:00', '23:59:59'],
  388. format: "yyyy-MM-dd HH:mm:ss",
  389. valueFormat: "yyyy-MM-dd HH:mm:ss",
  390. index: 14,
  391. width: 132
  392. },{
  393. label: '受理日期',
  394. type: "datetime",
  395. format: 'yyyy-MM-dd HH:mm',
  396. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  397. width: 132,
  398. index: 13,
  399. prop: 'acceptTime'
  400. },{
  401. label: '提箱时间',
  402. type: "datetime",
  403. format: 'yyyy-MM-dd HH:mm',
  404. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  405. width: 132,
  406. index: 13,
  407. prop: 'borrowTime'
  408. },{
  409. label: '完工日期',
  410. prop: 'finishedTime',
  411. overHidden: true,
  412. type: "date",
  413. searchRange: true,
  414. defaultTime: ['00:00:00', '23:59:59'],
  415. format: "yyyy-MM-dd HH:mm",
  416. valueFormat: "yyyy-MM-dd HH:mm:ss",
  417. index:16,
  418. width: 132,
  419. // search: true,
  420. },{
  421. label: '货物名称',
  422. overHidden: true,
  423. width: 100,
  424. search: true,
  425. index: 10,
  426. prop: 'goods'
  427. }, {
  428. label: '件数',
  429. width: 75,
  430. search: true,
  431. index: 18,
  432. overHidden: true,
  433. controls: false,
  434. cell: true,
  435. prop: 'quantity',
  436. type: 'number',
  437. precision:0
  438. }, {
  439. label: '重量(吨)',
  440. width: 75,
  441. prop: 'landWeight',
  442. controls: false,
  443. overHidden: true,
  444. index: 19,
  445. precision: 2,
  446. type: 'number'
  447. },{
  448. label: '尺码',
  449. width: 75,
  450. // search: true,
  451. index:20,
  452. overHidden: true,
  453. cell: true,
  454. prop: 'size',
  455. }, {
  456. label: '应付陆运费',
  457. overHidden: true,
  458. index: 21,
  459. width: 68,
  460. prop: 'landAmountC'
  461. }, {
  462. label: '委托备注',
  463. overHidden: true,
  464. width: 238,
  465. index: 22,
  466. prop: 'remarks'
  467. }, {
  468. label: '车队备注',
  469. overHidden: true,
  470. width: 238,
  471. index: 23,
  472. prop: 'fleetRemarks'
  473. }, {
  474. label: '司机备注',
  475. overHidden: true,
  476. cell: true,
  477. width: 238,
  478. index: 24,
  479. prop: 'driverRemarks'
  480. },
  481. // {
  482. // label: '场站费',
  483. // width: 100,
  484. // precision: 2,
  485. // cell: true,
  486. // index: 25,
  487. // controls: false,
  488. // type: 'number',
  489. // prop: 'oneFeeC'
  490. // }, {
  491. // label: '港杂费',
  492. // width: 100,
  493. // precision: 2,
  494. // cell: true,
  495. // index: 26,
  496. // controls: false,
  497. // type: 'number',
  498. // prop: 'twoFeeC'
  499. // }, {
  500. // label: '扣款',
  501. // width: 100,
  502. // precision: 2,
  503. // cell: true,
  504. // index: 27,
  505. // controls: false,
  506. // type: 'number',
  507. // prop: 'threeFeeC'
  508. // }, {
  509. // label: '待时费',
  510. // width: 100,
  511. // index: 28,
  512. // precision: 2,
  513. // cell: true,
  514. // controls: false,
  515. // type: 'number',
  516. // prop: 'fourFeeC'
  517. // }, {
  518. // label: '其他',
  519. // width: 100,
  520. // precision: 2,
  521. // index: 29,
  522. // cell: true,
  523. // type: 'number',
  524. // controls: false,
  525. // prop: 'fiveFeeC'
  526. // }, {
  527. // label: '费用备注',
  528. // width: 245,
  529. // index: 30,
  530. // cell: true,
  531. // prop: 'feeRemarksC'
  532. // },
  533. {
  534. label: '制单日期',
  535. overHidden: true,
  536. prop: 'createTime',
  537. type: "date",
  538. searchRange: true,
  539. defaultTime: ['00:00:00', '23:59:59'],
  540. format: "yyyy-MM-dd HH:mm",
  541. valueFormat: "yyyy-MM-dd HH:mm:ss",
  542. index: 31,
  543. width: 100,
  544. search: true,
  545. },{
  546. label: '船名航次',
  547. prop: 'factory',
  548. overHidden: true,
  549. index: 32,
  550. width: 120,
  551. search: true,
  552. },{
  553. label: '状态',
  554. width: 100,
  555. type: 'select',
  556. index:33,
  557. overHidden: true,
  558. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  559. props: {
  560. label: "dictValue",
  561. value: "dictKey"
  562. },
  563. dataType: "string",
  564. prop: 'status'
  565. }
  566. ],
  567. },
  568. totalData:{},
  569. driverTimer:null
  570. }
  571. },
  572. async created() {
  573. // this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88), this.optionList);
  574. this.goodsOptionCrud = this.optionList
  575. this.key++
  576. let i = 0;
  577. this.goodsOptionCrud.column.forEach(item => {
  578. if (item.search) i++
  579. })
  580. if (i % 3 !== 0) {
  581. const num = 3 - Number(i % 3)
  582. this.goodsOptionCrud.searchMenuSpan = num * 8;
  583. this.goodsOptionCrud.searchMenuPosition = "right";
  584. }
  585. businessStatisticsFrequency().then(res=> {
  586. let this_ = this
  587. this_.driverTimer = setInterval(function () {
  588. motorcadeDriver({
  589. tag:4,
  590. shippingMode:'大件',
  591. ...this_.screen
  592. }).then(res => {
  593. this_.totalData = res.data.data
  594. })
  595. }, Number(res.data.data[0].dictKey) * 1000)
  596. })
  597. },
  598. beforeDestroy() {
  599. clearInterval(this.driverTimer); //关闭
  600. },
  601. methods: {
  602. //自定义列保存
  603. async saveColumn() {
  604. /**
  605. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  606. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  607. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  608. */
  609. // const inSave = await this.saveColumnData(this.getColumnName(88), this.goodsOptionCrud);
  610. const inSave = this.goodsOptionCrud
  611. if (inSave) {
  612. this.$message.success("保存成功");
  613. //关闭窗口
  614. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  615. }
  616. },
  617. //自定义列重置
  618. async resetColumn() {
  619. this.goodsOptionCrud = this.optionList;
  620. // const inSave = await this.delColumnData(this.getColumnName(88), this.optionList);
  621. const inSave = this.optionList
  622. if (inSave) {
  623. this.$message.success("重置成功");
  624. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  625. }
  626. },
  627. // 获得高度
  628. searchCriteriaSwitch(type) {
  629. if (type) {
  630. this.goodsOptionCrud.height = this.goodsOptionCrud.height - 230
  631. } else {
  632. this.goodsOptionCrud.height = this.goodsOptionCrud.height + 230
  633. }
  634. this.$refs.crud.getTableHeight()
  635. },
  636. //箱信息保存
  637. rowSave(row, index, done, loading) {
  638. done()
  639. },
  640. //箱信息选择车队
  641. getfleetIdT(data, row) {
  642. this.$set(row, 'fleetName', data.cname)
  643. },
  644. //搜索
  645. searchChange(params, done) {
  646. let data = params
  647. if (params.arrivalTime) {
  648. data.beginArrivalTime = params.arrivalTime[0]
  649. data.endArrivalTime = params.arrivalTime[1]
  650. }
  651. if (params.createTime) {
  652. data.beginCrateTime = params.createTime[0]
  653. data.endCrateTime = params.createTime[1]
  654. }
  655. delete data.arrivalTime
  656. delete data.createTime
  657. this.query = data;
  658. this.onLoad(this.page, params)
  659. done();
  660. },
  661. //切换订单状态
  662. handleClick(tab) {
  663. this.activeName = tab
  664. this.onLoad(this.page)
  665. },
  666. //查询
  667. onLoad(page, params={}) {
  668. let queryParams = {
  669. size: page.pageSize,
  670. current: page.currentPage,
  671. tag: '4',
  672. status:this.activeName,
  673. shippingMode:'大件',
  674. ...params,
  675. ...Object.assign(params, this.query)
  676. }
  677. if (queryParams.arrivalTime) {
  678. queryParams.beginArrivalTime = queryParams.arrivalTime[0]
  679. queryParams.endArrivalTime = queryParams.arrivalTime[1]
  680. }
  681. delete queryParams.arrivalTime
  682. this.screen = queryParams
  683. motorcadeDriver({
  684. tag:4,
  685. ...queryParams
  686. }).then(res=>{
  687. this.totalData = res.data.data
  688. })
  689. this.loading = true;
  690. driverQueryCollection(queryParams).then(res => {
  691. this.goodsList = res.data.data.records
  692. this.page.total = res.data.data.total
  693. this.goodsOptionCrud.height = window.innerHeight - 345;
  694. }).finally(() => {
  695. this.loading = false;
  696. })
  697. },
  698. //箱信息保存
  699. rowSaveT(row, index, done, loading) {
  700. if (row.$cellEdit){
  701. fleetDriverSave(row).then(res=>{
  702. this.$message.success("保存成功");
  703. })
  704. }
  705. this.$refs.crud.rowCell(row, index)
  706. },
  707. //箱信息派车
  708. designate(row) {
  709. this.$confirm('是否确定受理', '提示', {
  710. confirmButtonText: '确定',
  711. cancelButtonText: '取消',
  712. type: 'warning'
  713. }).then(() => {
  714. acceptanceCollection(row).then(res => {
  715. this.$message.success('操作成功');
  716. this.onLoad(this.page)
  717. })
  718. }).catch(() => {
  719. this.$message({
  720. type: 'info',
  721. message: '已取消'
  722. });
  723. });
  724. },
  725. //取消派车
  726. cancelDesignate(row) {
  727. this.$confirm('是否确定取消受理', '提示', {
  728. confirmButtonText: '确定',
  729. cancelButtonText: '取消',
  730. type: 'warning'
  731. }).then(() => {
  732. acceptanceDispatchCollection({id: row.id}).then(res => {
  733. this.$message.success('操作成功');
  734. this.onLoad(this.page)
  735. })
  736. }).catch(() => {
  737. this.$message({
  738. type: 'info',
  739. message: '已取消'
  740. });
  741. });
  742. },
  743. confirmCompletion(row) {
  744. if (row.realArrivalTime){
  745. this.$confirm('是否确定完工', '提示', {
  746. confirmButtonText: '确定',
  747. cancelButtonText: '取消',
  748. type: 'warning'
  749. }).then(() => {
  750. confirmCompletion({id: row.id}).then(res => {
  751. this.$message.success('操作成功');
  752. this.onLoad(this.page)
  753. })
  754. }).catch(() => {
  755. this.$message({
  756. type: 'info',
  757. message: '已取消'
  758. });
  759. });
  760. }else {
  761. this.$message({
  762. type: 'warning',
  763. message: '无实际到厂时间!'
  764. });
  765. }
  766. },
  767. suitcase(row){
  768. this.$confirm('是否确定提箱', '提示', {
  769. confirmButtonText: '确定',
  770. cancelButtonText: '取消',
  771. type: 'warning'
  772. }).then(() => {
  773. borrow({id: row.id}).then(res => {
  774. this.$message.success('操作成功');
  775. this.onLoad(this.page)
  776. })
  777. }).catch(() => {
  778. this.$message({
  779. type: 'info',
  780. message: '已取消'
  781. });
  782. });
  783. },
  784. confirmArrival(row) {
  785. this.$confirm('是否确定到厂', '提示', {
  786. confirmButtonText: '确定',
  787. cancelButtonText: '取消',
  788. type: 'warning'
  789. }).then(() => {
  790. arrival({id: row.id}).then(res => {
  791. this.$message.success('操作成功');
  792. this.onLoad(this.page)
  793. })
  794. }).catch(() => {
  795. this.$message({
  796. type: 'info',
  797. message: '已取消'
  798. });
  799. });
  800. },
  801. //打开附件
  802. annexOpen(row, index){
  803. this.loadingTwo = false
  804. this.dialogVisible = true
  805. this.form = row
  806. getAttachment({id:row.id}).then(res=>{
  807. this.orderList = res.data.data
  808. })
  809. },
  810. //保存
  811. saveAnnex(){
  812. this.loadingTwo = true
  813. saveAttached({
  814. id:this.form.id,
  815. fileList:this.orderList
  816. }).then(res=>{
  817. this.annexOpen(this.form)
  818. })
  819. },
  820. ToBreak (val) {
  821. if (val)return val.replace(/\n/g, '<br/>')
  822. }
  823. }
  824. }
  825. </script>
  826. <style lang="scss" scoped>
  827. .selected{
  828. color: #1e9fff !important;
  829. }
  830. .home-container {
  831. padding: 0px 5px 5px 5px;
  832. box-sizing: border-box;
  833. height: 100%;
  834. ::v-deep .el-card__body {
  835. padding: 10px 15px;
  836. font-size: 14px;
  837. }
  838. &__card {
  839. width: 100%;
  840. height: 100%;
  841. }
  842. .title {
  843. display: flex;
  844. justify-content: space-between;
  845. .right {
  846. display: flex;
  847. align-items: center;
  848. &_but {
  849. margin-right: 10px;
  850. border: 1px solid #409eff;
  851. width: 80px;
  852. border-radius: 3px;
  853. display: flex;
  854. &_left {
  855. width: 40px;
  856. text-align: center;
  857. color: #409eff;
  858. cursor: pointer;
  859. }
  860. &_right {
  861. width: 40px;
  862. text-align: center;
  863. color: #409eff;
  864. cursor: pointer;
  865. }
  866. &_active {
  867. color: #fff;
  868. background-color: #409eff;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. .content {
  875. display: flex;
  876. justify-content: center;
  877. align-items: center;
  878. height: 6vh;
  879. width: 80vw;
  880. .divider {
  881. display: block;
  882. height: 0px;
  883. width: 100%;
  884. border-top: 1px dashed #dcdfe6;
  885. }
  886. &-item {
  887. margin-left: 1vw;
  888. .card {
  889. width: 130px;
  890. display: flex;
  891. align-items: center;
  892. &-title {
  893. width: 40px;
  894. height: 40px;
  895. text-align: center;
  896. border-radius: 50%;
  897. font-size: 20px;
  898. font-weight: 600;
  899. display: flex;
  900. justify-content: center;
  901. align-items: center;
  902. span {
  903. line-height: 20px;
  904. }
  905. }
  906. &-title1 {
  907. color: #037fe1;
  908. background-color: rgba(3, 127, 225, 0.15);
  909. }
  910. &-title2 {
  911. color: #ffa21e;
  912. background-color: rgba(255, 162, 30, 0.15);
  913. }
  914. &-title3 {
  915. color: #fb5b60;
  916. background-color: rgba(251, 91, 96, 0.15);
  917. }
  918. &-title4 {
  919. color: #42bc6f;
  920. background-color: rgba(66, 188, 111, 0.15);
  921. }
  922. &-title5 {
  923. color: #14cde1;
  924. background-color: rgba(52, 149, 161, 0.15);
  925. }
  926. &-title6 {
  927. color: rgba(4, 66, 31, 0.63);
  928. background-color: rgba(66, 188, 111, 0.15);
  929. }
  930. &-content {
  931. padding-left: 1vw;
  932. display: flex;
  933. flex-direction: column;
  934. &-num {
  935. font-size: 20px;
  936. font-weight: 600;
  937. }
  938. &-text {
  939. color: #909399;
  940. }
  941. }
  942. }
  943. }
  944. }
  945. </style>