index.vue 25 KB

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