index.vue 25 KB

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