index.vue 26 KB

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