index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972
  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:{},
  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]
  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. filterable: true,
  321. // overHidden: true,
  322. prop: 'fleetId',
  323. type: 'select',
  324. dicUrl: "/api/blade-client/corpsdesc/fleetList",
  325. cascader: ['plateNo'],
  326. props: {
  327. label: "cname",
  328. value: "id"
  329. }
  330. },{
  331. label: '车号',
  332. width: 82,
  333. prop: 'plateNo',
  334. filterable: true,
  335. overHidden: true,
  336. index:8,
  337. type: 'select',
  338. search: true,
  339. dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
  340. props: {
  341. label: "plateNo",
  342. value: "plateNo"
  343. }
  344. }, {
  345. label: '司机',
  346. width: 77,
  347. index:9,
  348. search: true,
  349. overHidden: true,
  350. filterable: true,
  351. prop: 'driverId',
  352. type: 'select',
  353. dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
  354. props: {
  355. label: "name",
  356. value: "id"
  357. },
  358. }, {
  359. label: '电话',
  360. width: 124,
  361. index:10,
  362. overHidden: true,
  363. search: true,
  364. prop: 'tel'
  365. }, {
  366. label: '平台号',
  367. width: 100,
  368. index: 11,
  369. search: true,
  370. overHidden: true,
  371. prop: 'orderNo'
  372. }, {
  373. label: '箱号',
  374. cell: true,
  375. width: 140,
  376. index: 12,
  377. overHidden: true,
  378. search: true,
  379. prop: 'ctnNo'
  380. },{
  381. label: '实际到厂时间',
  382. prop: 'realArrivalTime',
  383. overHidden: true,
  384. type: "date",
  385. searchRange: true,
  386. defaultTime: ['00:00:00', '23:59:59'],
  387. format: "yyyy-MM-dd HH:mm:ss",
  388. valueFormat: "yyyy-MM-dd HH:mm:ss",
  389. index: 14,
  390. width: 132
  391. },{
  392. label: '受理日期',
  393. type: "datetime",
  394. format: 'yyyy-MM-dd HH:mm',
  395. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  396. width: 132,
  397. index: 13,
  398. prop: 'acceptTime'
  399. },{
  400. label: '提箱时间',
  401. type: "datetime",
  402. format: 'yyyy-MM-dd HH:mm',
  403. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  404. width: 132,
  405. index: 13,
  406. prop: 'borrowTime'
  407. },{
  408. label: '完工日期',
  409. prop: 'finishedTime',
  410. overHidden: true,
  411. type: "date",
  412. searchRange: true,
  413. defaultTime: ['00:00:00', '23:59:59'],
  414. format: "yyyy-MM-dd HH:mm",
  415. valueFormat: "yyyy-MM-dd HH:mm:ss",
  416. index:16,
  417. width: 132,
  418. // search: true,
  419. },{
  420. label: '货物名称',
  421. overHidden: true,
  422. width: 100,
  423. search: true,
  424. index: 17,
  425. prop: 'goods'
  426. }, {
  427. label: '件数',
  428. width: 75,
  429. search: true,
  430. index: 18,
  431. overHidden: true,
  432. controls: false,
  433. cell: true,
  434. prop: 'quantity',
  435. type: 'number',
  436. precision:0
  437. }, {
  438. label: '重量(吨)',
  439. width: 75,
  440. prop: 'landWeight',
  441. controls: false,
  442. overHidden: true,
  443. index: 19,
  444. precision: 2,
  445. type: 'number'
  446. },{
  447. label: '尺码',
  448. width: 75,
  449. // search: true,
  450. index:20,
  451. overHidden: true,
  452. cell: true,
  453. prop: 'size',
  454. }, {
  455. label: '应付陆运费',
  456. overHidden: true,
  457. index: 21,
  458. width: 68,
  459. prop: 'landAmountC'
  460. }, {
  461. label: '委托备注',
  462. overHidden: true,
  463. width: 238,
  464. index: 22,
  465. prop: 'remarks'
  466. }, {
  467. label: '车队备注',
  468. overHidden: true,
  469. width: 238,
  470. index: 23,
  471. prop: 'fleetRemarks'
  472. }, {
  473. label: '司机备注',
  474. overHidden: true,
  475. cell: true,
  476. width: 238,
  477. index: 24,
  478. prop: 'driverRemarks'
  479. },
  480. // {
  481. // label: '场站费',
  482. // width: 100,
  483. // precision: 2,
  484. // cell: true,
  485. // index: 25,
  486. // controls: false,
  487. // type: 'number',
  488. // prop: 'oneFeeC'
  489. // }, {
  490. // label: '港杂费',
  491. // width: 100,
  492. // precision: 2,
  493. // cell: true,
  494. // index: 26,
  495. // controls: false,
  496. // type: 'number',
  497. // prop: 'twoFeeC'
  498. // }, {
  499. // label: '扣款',
  500. // width: 100,
  501. // precision: 2,
  502. // cell: true,
  503. // index: 27,
  504. // controls: false,
  505. // type: 'number',
  506. // prop: 'threeFeeC'
  507. // }, {
  508. // label: '待时费',
  509. // width: 100,
  510. // index: 28,
  511. // precision: 2,
  512. // cell: true,
  513. // controls: false,
  514. // type: 'number',
  515. // prop: 'fourFeeC'
  516. // }, {
  517. // label: '其他',
  518. // width: 100,
  519. // precision: 2,
  520. // index: 29,
  521. // cell: true,
  522. // type: 'number',
  523. // controls: false,
  524. // prop: 'fiveFeeC'
  525. // }, {
  526. // label: '费用备注',
  527. // width: 245,
  528. // index: 30,
  529. // cell: true,
  530. // prop: 'feeRemarksC'
  531. // },
  532. {
  533. label: '制单日期',
  534. overHidden: true,
  535. prop: 'createTime',
  536. type: "date",
  537. searchRange: true,
  538. defaultTime: ['00:00:00', '23:59:59'],
  539. format: "yyyy-MM-dd HH:mm",
  540. valueFormat: "yyyy-MM-dd HH:mm:ss",
  541. index: 31,
  542. width: 100,
  543. search: true,
  544. },{
  545. label: '船名航次',
  546. prop: 'factory',
  547. overHidden: true,
  548. index: 32,
  549. width: 120,
  550. search: true,
  551. },{
  552. label: '状态',
  553. width: 100,
  554. type: 'select',
  555. index:33,
  556. overHidden: true,
  557. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  558. props: {
  559. label: "dictValue",
  560. value: "dictKey"
  561. },
  562. dataType: "string",
  563. prop: 'status'
  564. }
  565. ],
  566. },
  567. totalData:{},
  568. driverTimer:null
  569. }
  570. },
  571. async created() {
  572. this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88), this.optionList);
  573. this.query = {
  574. arrivalTime: [defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
  575. }
  576. this.key++
  577. let i = 0;
  578. this.goodsOptionCrud.column.forEach(item => {
  579. if (item.search) i++
  580. })
  581. if (i % 3 !== 0) {
  582. const num = 3 - Number(i % 3)
  583. this.goodsOptionCrud.searchMenuSpan = num * 8;
  584. this.goodsOptionCrud.searchMenuPosition = "right";
  585. }
  586. businessStatisticsFrequency().then(res=> {
  587. let this_ = this
  588. this_.driverTimer = setInterval(function () {
  589. motorcadeDriver({
  590. tag:4,
  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. if (inSave) {
  611. this.$message.success("保存成功");
  612. //关闭窗口
  613. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  614. }
  615. },
  616. //自定义列重置
  617. async resetColumn() {
  618. this.goodsOptionCrud = this.optionList;
  619. const inSave = await this.delColumnData(this.getColumnName(88), this.optionList);
  620. if (inSave) {
  621. this.$message.success("重置成功");
  622. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  623. }
  624. },
  625. // 获得高度
  626. searchCriteriaSwitch(type) {
  627. if (type) {
  628. this.goodsOptionCrud.height = this.goodsOptionCrud.height - 230
  629. } else {
  630. this.goodsOptionCrud.height = this.goodsOptionCrud.height + 230
  631. }
  632. this.$refs.crud.getTableHeight()
  633. },
  634. //箱信息保存
  635. rowSave(row, index, done, loading) {
  636. done()
  637. },
  638. //箱信息选择车队
  639. getfleetIdT(data, row) {
  640. this.$set(row, 'fleetName', data.cname)
  641. },
  642. //搜索
  643. searchChange(params, done) {
  644. let data = params
  645. if (params.arrivalTime) {
  646. data.beginArrivalTime = params.arrivalTime[0]
  647. data.endArrivalTime = params.arrivalTime[1]
  648. }
  649. if (params.createTime) {
  650. data.beginCrateTime = params.createTime[0]
  651. data.endCrateTime = params.createTime[1]
  652. }
  653. delete data.arrivalTime
  654. delete data.createTime
  655. this.query = data;
  656. this.onLoad(this.page, params)
  657. done();
  658. },
  659. //切换订单状态
  660. handleClick(tab) {
  661. this.activeName = tab
  662. this.onLoad(this.page)
  663. },
  664. //查询
  665. onLoad(page, params={}) {
  666. let queryParams = {
  667. size: page.pageSize,
  668. current: page.currentPage,
  669. tag: '4',
  670. status:this.activeName,
  671. ...params,
  672. ...Object.assign(params, this.query)
  673. }
  674. if (queryParams.arrivalTime) {
  675. queryParams.beginArrivalTime = queryParams.arrivalTime[0]
  676. queryParams.endArrivalTime = queryParams.arrivalTime[1]
  677. }
  678. delete queryParams.arrivalTime
  679. this.screen = queryParams
  680. motorcadeDriver({
  681. tag:4,
  682. ...queryParams
  683. }).then(res=>{
  684. this.totalData = res.data.data
  685. })
  686. this.loading = true;
  687. driverQueryCollection(queryParams).then(res => {
  688. this.goodsList = res.data.data.records
  689. this.page.total = res.data.data.total
  690. this.goodsOptionCrud.height = window.innerHeight - 345;
  691. }).finally(() => {
  692. this.loading = false;
  693. })
  694. },
  695. //箱信息保存
  696. rowSaveT(row, index, done, loading) {
  697. if (row.$cellEdit){
  698. fleetDriverSave(row).then(res=>{
  699. this.$message.success("保存成功");
  700. })
  701. }
  702. this.$refs.crud.rowCell(row, index)
  703. },
  704. //箱信息派车
  705. designate(row) {
  706. this.$confirm('是否确定受理', '提示', {
  707. confirmButtonText: '确定',
  708. cancelButtonText: '取消',
  709. type: 'warning'
  710. }).then(() => {
  711. acceptanceCollection(row).then(res => {
  712. this.$message.success('操作成功');
  713. this.onLoad(this.page)
  714. })
  715. }).catch(() => {
  716. this.$message({
  717. type: 'info',
  718. message: '已取消'
  719. });
  720. });
  721. },
  722. //取消派车
  723. cancelDesignate(row) {
  724. this.$confirm('是否确定取消受理', '提示', {
  725. confirmButtonText: '确定',
  726. cancelButtonText: '取消',
  727. type: 'warning'
  728. }).then(() => {
  729. acceptanceDispatchCollection({id: row.id}).then(res => {
  730. this.$message.success('操作成功');
  731. this.onLoad(this.page)
  732. })
  733. }).catch(() => {
  734. this.$message({
  735. type: 'info',
  736. message: '已取消'
  737. });
  738. });
  739. },
  740. confirmCompletion(row) {
  741. if (row.realArrivalTime){
  742. this.$confirm('是否确定完工', '提示', {
  743. confirmButtonText: '确定',
  744. cancelButtonText: '取消',
  745. type: 'warning'
  746. }).then(() => {
  747. confirmCompletion({id: row.id}).then(res => {
  748. this.$message.success('操作成功');
  749. this.onLoad(this.page)
  750. })
  751. }).catch(() => {
  752. this.$message({
  753. type: 'info',
  754. message: '已取消'
  755. });
  756. });
  757. }else {
  758. this.$message({
  759. type: 'warning',
  760. message: '无实际到厂时间!'
  761. });
  762. }
  763. },
  764. suitcase(row){
  765. this.$confirm('是否确定提箱', '提示', {
  766. confirmButtonText: '确定',
  767. cancelButtonText: '取消',
  768. type: 'warning'
  769. }).then(() => {
  770. borrow({id: row.id}).then(res => {
  771. this.$message.success('操作成功');
  772. this.onLoad(this.page)
  773. })
  774. }).catch(() => {
  775. this.$message({
  776. type: 'info',
  777. message: '已取消'
  778. });
  779. });
  780. },
  781. confirmArrival(row) {
  782. this.$confirm('是否确定到厂', '提示', {
  783. confirmButtonText: '确定',
  784. cancelButtonText: '取消',
  785. type: 'warning'
  786. }).then(() => {
  787. arrival({id: row.id}).then(res => {
  788. this.$message.success('操作成功');
  789. this.onLoad(this.page)
  790. })
  791. }).catch(() => {
  792. this.$message({
  793. type: 'info',
  794. message: '已取消'
  795. });
  796. });
  797. },
  798. //打开附件
  799. annexOpen(row, index){
  800. this.loadingTwo = false
  801. this.dialogVisible = true
  802. this.form = row
  803. getAttachment({id:row.id}).then(res=>{
  804. this.orderList = res.data.data
  805. })
  806. },
  807. //保存
  808. saveAnnex(){
  809. this.loadingTwo = true
  810. saveAttached({
  811. id:this.form.id,
  812. fileList:this.orderList
  813. }).then(res=>{
  814. this.annexOpen(this.form)
  815. })
  816. },
  817. ToBreak (val) {
  818. if (val)return val.replace(/\n/g, '<br/>')
  819. }
  820. }
  821. }
  822. </script>
  823. <style lang="scss" scoped>
  824. .selected{
  825. color: #1e9fff !important;
  826. }
  827. .home-container {
  828. padding: 0px 5px 5px 5px;
  829. box-sizing: border-box;
  830. height: 100%;
  831. ::v-deep .el-card__body {
  832. padding: 10px 15px;
  833. font-size: 14px;
  834. }
  835. &__card {
  836. width: 100%;
  837. height: 100%;
  838. }
  839. .title {
  840. display: flex;
  841. justify-content: space-between;
  842. .right {
  843. display: flex;
  844. align-items: center;
  845. &_but {
  846. margin-right: 10px;
  847. border: 1px solid #409eff;
  848. width: 80px;
  849. border-radius: 3px;
  850. display: flex;
  851. &_left {
  852. width: 40px;
  853. text-align: center;
  854. color: #409eff;
  855. cursor: pointer;
  856. }
  857. &_right {
  858. width: 40px;
  859. text-align: center;
  860. color: #409eff;
  861. cursor: pointer;
  862. }
  863. &_active {
  864. color: #fff;
  865. background-color: #409eff;
  866. }
  867. }
  868. }
  869. }
  870. }
  871. .content {
  872. display: flex;
  873. justify-content: center;
  874. align-items: center;
  875. height: 6vh;
  876. width: 80vw;
  877. .divider {
  878. display: block;
  879. height: 0px;
  880. width: 100%;
  881. border-top: 1px dashed #dcdfe6;
  882. }
  883. &-item {
  884. margin-left: 1vw;
  885. .card {
  886. width: 130px;
  887. display: flex;
  888. align-items: center;
  889. &-title {
  890. width: 40px;
  891. height: 40px;
  892. text-align: center;
  893. border-radius: 50%;
  894. font-size: 20px;
  895. font-weight: 600;
  896. display: flex;
  897. justify-content: center;
  898. align-items: center;
  899. span {
  900. line-height: 20px;
  901. }
  902. }
  903. &-title1 {
  904. color: #037fe1;
  905. background-color: rgba(3, 127, 225, 0.15);
  906. }
  907. &-title2 {
  908. color: #ffa21e;
  909. background-color: rgba(255, 162, 30, 0.15);
  910. }
  911. &-title3 {
  912. color: #fb5b60;
  913. background-color: rgba(251, 91, 96, 0.15);
  914. }
  915. &-title4 {
  916. color: #42bc6f;
  917. background-color: rgba(66, 188, 111, 0.15);
  918. }
  919. &-title5 {
  920. color: #14cde1;
  921. background-color: rgba(52, 149, 161, 0.15);
  922. }
  923. &-title6 {
  924. color: rgba(4, 66, 31, 0.63);
  925. background-color: rgba(66, 188, 111, 0.15);
  926. }
  927. &-content {
  928. padding-left: 1vw;
  929. display: flex;
  930. flex-direction: column;
  931. &-num {
  932. font-size: 20px;
  933. font-weight: 600;
  934. }
  935. &-text {
  936. color: #909399;
  937. }
  938. }
  939. }
  940. }
  941. }
  942. </style>