tranManagementReceivingloading.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. // 汽车卸车
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">汽运卸车反馈</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  14. >
  15. <img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt
  21. />返回
  22. </el-button>
  23. </el-col>
  24. </el-row>
  25. <div class="center">
  26. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  27. <div class="basicInformation">
  28. <div class="small-title" style="font-size: 16px">任务详情</div>
  29. <ws-info-table>
  30. <!-- 任务编号 -->
  31. <ws-form-item label="任务编号" span="1" prop="processNo">{{
  32. deptBudgetList.processNo
  33. }}</ws-form-item>
  34. <!-- 货名 -->
  35. <ws-form-item label="货名" span="1">{{
  36. deptBudgetList.goodsName
  37. }}</ws-form-item>
  38. <!--重量(吨)-->
  39. <ws-form-item
  40. label="重量(吨)"
  41. span="1"
  42. prop="tare"
  43. class="readonly"
  44. >{{ deptBudgetList.weight }}</ws-form-item
  45. >
  46. <!--发货地址-->
  47. <ws-form-item label="发货地址" span="1" prop="netWeight">
  48. {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
  49. }}{{ deptBudgetList.sendArea
  50. }}{{ deptBudgetList.sendDetailedAddress }}
  51. </ws-form-item>
  52. <!--发货人-->
  53. <ws-form-item label="发货人" span="1" prop="agent">{{
  54. deptBudgetList.sender
  55. }}</ws-form-item>
  56. <!--发货人电话-->
  57. <ws-form-item label="发货人电话" span="1" prop="agent">{{
  58. deptBudgetList.senderPhone
  59. }}</ws-form-item>
  60. <!--收货地址-->
  61. <ws-form-item label="收货地址" span="1" prop="netWeight">
  62. {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
  63. }}{{ deptBudgetList.receiveArea
  64. }}{{ deptBudgetList.receiveDetailedAddress }}
  65. </ws-form-item>
  66. <!--收货人-->
  67. <ws-form-item label="收货人" span="1" prop="receiver">{{
  68. deptBudgetList.receiver
  69. }}</ws-form-item>
  70. <!--收货人电话-->
  71. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">{{
  72. deptBudgetList.receiverPhone
  73. }}</ws-form-item>
  74. <!--发货日期-->
  75. <ws-form-item
  76. label="发货日期"
  77. span="1"
  78. prop="inOutDate"
  79. class="deliverydate"
  80. >{{ deptBudgetList.deliveryDateStart }}</ws-form-item
  81. >
  82. <!--最晚发货日期-->
  83. <ws-form-item
  84. label="最晚发货日期"
  85. span="1"
  86. prop="inOutDate"
  87. class="deliverydate"
  88. >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item
  89. >
  90. <!--合同编号-->
  91. <ws-form-item label="合同编号" span="1" prop="contractNo">{{
  92. deptBudgetList.contractNo
  93. }}</ws-form-item>
  94. <ws-form-item label="运输方式" span="1" prop="contractNo">{{
  95. deptBudgetList.tranType
  96. }}</ws-form-item>
  97. </ws-info-table>
  98. <div
  99. class="small-title"
  100. style="font-size: 16px; width: 50%; float: left"
  101. >
  102. 卸车详情
  103. </div>
  104. <!-- 导入 -->
  105. <div style="font-size: 16px; width: 100%; text-align: right;display:flex;justify-content:end;">
  106. <!-- <el-upload style="margin-left: 8px;"
  107. class=""
  108. action="https://www.zthymaoyi.com/upload/admin"
  109. :show-file-list="false"
  110. :on-success="
  111. (res, file) => {
  112. uploadSuccessHandle(res)
  113. }
  114. "
  115. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  116. >
  117. <el-button type="primary">导入</el-button>
  118. </el-upload> -->
  119. <el-link
  120. href="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF/%E6%B1%BD%E8%BF%90%E5%8D%B8%E8%BD%A6%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF.xlsx"
  121. style="margin-left: 8px;">
  122. <el-button type="primary">模板下载</el-button>
  123. </el-link>
  124. <el-upload
  125. style="margin-left: 8px"
  126. class="upload-demo inline-block margin-right-10"
  127. action=""
  128. :on-change="handleChange"
  129. :show-file-list="false"
  130. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  131. :auto-upload="false"
  132. >
  133. <el-button type="primary">导入</el-button>
  134. </el-upload>
  135. </div>
  136. <div
  137. class="driver position liaison"
  138. v-for="(item, index) in deptBudgetList.tranCarInfoList"
  139. :key="index"
  140. >
  141. <ws-info-table>
  142. <div class="catNos" v-show="item.temporaryDriverFlag == 0">
  143. 司机-{{ index + 1 }}
  144. <span class="noservice" v-show="item.status == '未装车'">{{
  145. item.status
  146. }}</span>
  147. <span class="service" v-show="item.status == '已装车'">
  148. 未卸车
  149. </span>
  150. <span class="serviced" v-show="item.status == '已送达'">
  151. 已卸车
  152. </span>
  153. </div>
  154. <div
  155. class="catNos catNosCor"
  156. v-show="item.temporaryDriverFlag != 0"
  157. >
  158. 司机-{{ index + 1 }}(临)
  159. </div>
  160. <!--姓名-->
  161. <ws-form-item
  162. label="姓名:"
  163. span="1"
  164. prop="driver"
  165. v-show="item.temporaryDriverFlag == 0"
  166. >
  167. <span v-show="item.temporaryDriverFlag == 0">{{
  168. item.driver
  169. }}</span>
  170. </ws-form-item>
  171. <!-- 姓名 -->
  172. <ws-form-item
  173. label="姓名:"
  174. span="1"
  175. prop="driver"
  176. v-show="item.temporaryDriverFlag != 0"
  177. >
  178. <span v-show="item.temporaryDriverFlag != 0">{{
  179. item.driver
  180. }}</span>
  181. </ws-form-item>
  182. <!-- 电话 -->
  183. <ws-form-item
  184. label="司机电话:"
  185. span="1"
  186. prop="driverPhone"
  187. style="width: 200px"
  188. >
  189. <span v-show="item.temporaryDriverFlag != 0">{{
  190. item.driverPhone
  191. }}</span>
  192. <span v-show="item.temporaryDriverFlag == 0">{{
  193. item.driverPhone
  194. }}</span>
  195. </ws-form-item>
  196. <!--车牌号-->
  197. <ws-form-item label="车牌号:" span="1" prop="carNo">
  198. <span v-show="item.temporaryDriverFlag != 0">{{
  199. item.carNo
  200. }}</span>
  201. <span v-show="item.temporaryDriverFlag == 0">{{
  202. item.carNo
  203. }}</span>
  204. </ws-form-item>
  205. <!--装车净重-->
  206. <ws-form-item
  207. label="装车(吨):"
  208. span="1"
  209. prop="loadNetWeight"
  210. style="width: 150px"
  211. >{{ item.loadNetWeight }}</ws-form-item
  212. >
  213. <!--卸车净重(吨)-->
  214. <ws-form-item
  215. label="卸车净重(吨):"
  216. span="1"
  217. prop="unloadNetWeight"
  218. >
  219. <ws-input
  220. v-if="item.status == '已送达' || item.status == '未装车'"
  221. v-model="item.unloadNetWeight"
  222. placeholder="请输入卸车净重"
  223. maxlength="20"
  224. :disabled="readonly"
  225. size="small"
  226. />
  227. <ws-input
  228. v-else
  229. v-model="item.unloadNetWeight"
  230. placeholder="请输入卸车净重"
  231. maxlength="20"
  232. size="small"
  233. />
  234. </ws-form-item>
  235. <!--卸车日期-->
  236. <ws-form-item
  237. label="卸车日期:"
  238. span="1"
  239. prop="receiveDateEnd"
  240. style="width: 340px"
  241. >
  242. <ws-date-picker
  243. v-model="item.receiveDateEnd"
  244. v-if="item.status == '已送达' || item.status == '未装车'"
  245. :disabled="readonly"
  246. type="date"
  247. value-format="yyyy-MM-dd"
  248. />
  249. <ws-date-picker
  250. v-model="item.receiveDateEnd"
  251. v-else
  252. type="date"
  253. placeholder="请选择日期"
  254. value-format="yyyy-MM-dd"
  255. />
  256. </ws-form-item>
  257. <!--磅单-->
  258. <ws-form-item label="磅单:" span="1" prop="unloadPoundImg">
  259. <template>
  260. <el-upload
  261. action="https://www.zthymaoyi.com/upload/admin"
  262. :show-file-list="false"
  263. :on-success="
  264. (res) => {
  265. uploadSuccessHandle1(res, index)
  266. }
  267. "
  268. class="avatar-uploader"
  269. accept=".jpg, .jpeg, .png, .gif"
  270. >
  271. <img
  272. width="18"
  273. height="20"
  274. style="vertical-align: text-top; position: relative"
  275. src="../../../public/img/fujian.png"
  276. alt
  277. />
  278. </el-upload>
  279. <span
  280. v-if="
  281. deptBudgetList.tranCarInfoList[index].unloadPoundImg !=
  282. null
  283. "
  284. >1</span
  285. >
  286. <span
  287. v-if="
  288. deptBudgetList.tranCarInfoList[index].unloadPoundImg ==
  289. null
  290. "
  291. >未上传</span
  292. >
  293. <el-button v-if="deptBudgetList.tranCarInfoList[index].unloadPoundImg !=null"
  294. class="bg-bottom-preview" type="primary" size="small" :data-img="deptBudgetList.tranCarInfoList[index].unloadPoundImg" @click="$imgPreview">
  295. <span style="margin-left: -7px;">预览</span></el-button>
  296. </template>
  297. </ws-form-item>
  298. <!--箱号-->
  299. <ws-form-item label="箱号:" span="1" prop="caseNo">
  300. <span>{{ item.caseNo }}</span>
  301. </ws-form-item>
  302. <!--封号-->
  303. <ws-form-item label="封号:" span="1" prop="titleNo">
  304. <span>{{ item.titleNo }}</span>
  305. </ws-form-item>
  306. <div
  307. v-show="
  308. item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'
  309. "
  310. class="signStatus"
  311. >
  312. {{ item.signStatus }}
  313. </div>
  314. <div
  315. v-show="
  316. item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'
  317. "
  318. class="signStatus1"
  319. >
  320. {{ item.signStatus }}
  321. </div>
  322. </ws-info-table>
  323. </div>
  324. </div>
  325. <div style="text-align: right; color: #8890b1; font-size: 16px">
  326. 合计{{ total }}/{{ deptBudgetList.weight }}
  327. <!--阶段状态-->
  328. <span
  329. class="noservice"
  330. v-show="deptBudgetList.receivingStatus == '执行中'"
  331. >
  332. 未完货
  333. </span>
  334. <span
  335. class="service"
  336. v-show="deptBudgetList.receivingStatus == '已完货'"
  337. >{{ deptBudgetList.receivingStatus }}</span
  338. >
  339. </div>
  340. <div style="text-align: right; padding: 10px">
  341. <el-button
  342. class="bg-bottom-up"
  343. type="primary"
  344. size="small"
  345. @click="submit()"
  346. >提交</el-button
  347. >
  348. <el-button
  349. class="bg-bottom"
  350. type="primary"
  351. size="small"
  352. @click="finished(deptBudgetList)"
  353. >完货</el-button
  354. >
  355. </div>
  356. </ws-form>
  357. </div>
  358. </div>
  359. </template>
  360. <script>
  361. import Pagination from '@/components/Pagination'
  362. import WsUpload from '@/components/WsUpload'
  363. import {
  364. seeCat,
  365. packList,
  366. feedback,
  367. getbank,
  368. stateRec,
  369. } from '@/model/transport/index'
  370. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  371. import { dayjs, EventBus } from 'base-core-lib'
  372. export default {
  373. name: 'viewSpareMoney',
  374. components: {
  375. WsUpload,
  376. Pagination,
  377. },
  378. watch: {
  379. isShow(val) {
  380. this.showType = val
  381. },
  382. },
  383. data() {
  384. return {
  385. // 是否显示
  386. showType: true,
  387. deptBudgetTotal: 0,
  388. currentPage: 1,
  389. pageSize: 10,
  390. searchType: 1,
  391. startDate: null,
  392. endDate: null,
  393. carList: [],
  394. // 提交类型
  395. readonly: true,
  396. appendixIdsAdd: '',
  397. onChange: {},
  398. gradeList: [],
  399. rules: {
  400. netWeight: [
  401. {
  402. required: true,
  403. type: 'number',
  404. message: '请输入活动名称',
  405. trigger: 'blur',
  406. },
  407. ],
  408. },
  409. size: 10,
  410. compId: sessionStorage.getItem('ws-pf_compId'),
  411. deptCircularPage: {},
  412. packtypeList: {},
  413. date: {
  414. year: dayjs().format('YYYY'),
  415. month: dayjs().format('MM'),
  416. },
  417. contractList: [],
  418. deptBudgetList: {
  419. tranCarInfoList: [
  420. {
  421. unloadPoundImg: '',
  422. },
  423. ],
  424. },
  425. excelFreightspace: [],
  426. historyList: [],
  427. pickerBeginDateBefore: {
  428. disabledDate: (time) => {
  429. return time.getTime() > Date.now()
  430. },
  431. },
  432. accessoryTFs: false,
  433. }
  434. },
  435. activated() {
  436. this.deptBudgetList.id = this.$route.query.id
  437. this.getList()
  438. },
  439. computed: {
  440. total: function () {
  441. var maxStorage = 0
  442. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  443. maxStorage += Number(
  444. this.deptBudgetList.tranCarInfoList[i].unloadNetWeight
  445. )
  446. }
  447. return maxStorage
  448. },
  449. },
  450. mounted() {
  451. this.deptBudgetList.id = this.$route.query.id
  452. this.getList()
  453. },
  454. methods: {
  455. handleChange(file, fileList) {
  456. this.fileTemp = file.raw
  457. let fileName = file.raw.name
  458. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  459. // 判断上传文件格式
  460. if (this.fileTemp) {
  461. if (fileType == 'xlsx' || fileType == 'xls') {
  462. this.importf(this.fileTemp)
  463. } else {
  464. this.$message({
  465. type: 'warning',
  466. message: '附件格式错误,请删除后重新上传!',
  467. })
  468. }
  469. } else {
  470. this.$message({
  471. type: 'warning',
  472. message: '请上传附件!',
  473. })
  474. }
  475. },
  476. importf(obj) {
  477. this.excelFreightspace = []
  478. this.dialogVisible = true
  479. let _this = this
  480. let inputDOM = this.$refs.inputer // 通过DOM取文件数据
  481. this.file = event.currentTarget.files[0]
  482. var rABS = false //是否将文件读取为二进制字符串
  483. var f = this.file
  484. var reader = new FileReader()
  485. //if (!FileReader.prototype.readAsBinaryString) {
  486. FileReader.prototype.readAsBinaryString = function (f) {
  487. var binary = ''
  488. var rABS = false //是否将文件读取为二进制字符串
  489. var pt = this
  490. var wb //读取完成的数据
  491. var outdata
  492. var reader = new FileReader()
  493. reader.onload = function (e) {
  494. var bytes = new Uint8Array(reader.result)
  495. var length = bytes.byteLength
  496. for (var i = 0; i < length; i++) {
  497. binary += String.fromCharCode(bytes[i])
  498. }
  499. var XLSX = require('xlsx')
  500. if (rABS) {
  501. wb = XLSX.read(btoa(fixdata(binary)), {
  502. //手动转化
  503. type: 'base64',
  504. cellDates: true,
  505. })
  506. } else {
  507. wb = XLSX.read(binary, {
  508. type: 'binary',
  509. })
  510. }
  511. // outdata就是你想要的东西 excel导入的数据
  512. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
  513. // excel 数据再处理
  514. let arr = []
  515. outdata.map((v) => {
  516. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  517. let jsonString = JSON.stringify(v)
  518. .replace(/\//g, '')
  519. .replace(/\s/gi, '')
  520. console.log(jsonString)
  521. v = JSON.parse(jsonString)
  522. let obj = {}
  523. //xxx代表列名
  524. obj.caseNo = v.箱号
  525. obj.loadNetWeight = v.装车
  526. obj.titleNo = v.封号
  527. obj.driverPhone = v.司机电话
  528. obj.driver = v.司机姓名
  529. obj.unloadNetWeight = v.卸车净重
  530. obj.receiveDateEnd = v.卸车日期
  531. obj.status = v.状态
  532. obj.carNo = v.车牌号
  533. obj.unloadPoundImg = v.磅单
  534. console.log(obj)
  535. _this.excelFreightspace.push(obj)
  536. })
  537. // _this.freightspace.concat(arr)
  538. let _ispushData = true
  539. console.log(arr, _this.deptBudgetList.tranCarInfoList)
  540. for (let i = 0; i < _this.excelFreightspace.length; i++) {
  541. _ispushData = true
  542. for (let k = 0; k < _this.deptBudgetList.tranCarInfoList.length; k++) {
  543. if (
  544. _this.excelFreightspace[i].driverPhone ==
  545. _this.deptBudgetList.tranCarInfoList[k].driverPhone
  546. ) {
  547. _this.deptBudgetList.tranCarInfoList[k] = _this.excelFreightspace[i]
  548. _ispushData = false
  549. }
  550. }
  551. if (_ispushData) {
  552. _this.deptBudgetList.tranCarInfoList.push(_this.excelFreightspace[i])
  553. _ispushData = true
  554. }
  555. }
  556. _this.$forceUpdate();
  557. }
  558. reader.readAsArrayBuffer(f)
  559. }
  560. if (rABS) {
  561. reader.readAsArrayBuffer(f)
  562. } else {
  563. reader.readAsBinaryString(f)
  564. }
  565. console.log(reader)
  566. },
  567. //返回按钮
  568. revert() {
  569. this.$router.push({ path: 'tranManagementReceivingFeedback' })
  570. },
  571. del(index) {
  572. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  573. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  574. }
  575. },
  576. uploadSuccessHandle1(e, index) {
  577. this.deptBudgetList.tranCarInfoList[index].unloadPoundImg = e.url
  578. },
  579. selectwaterContent() {},
  580. //提交按钮
  581. submit() {
  582. for (var i = 0; i < this.freightspace.length; i++) {
  583. if (this.freightspace[i].unloadNetWeight == null) {
  584. this.$message({
  585. message: '卸重不能为空!',
  586. type: 'warning',
  587. })
  588. return
  589. }
  590. }
  591. this.$confirm(
  592. `所有车辆完成卸车任务后,请及时修改任务状态,确定提交卸车信息?`,
  593. {
  594. cancelButtonText: '取消',
  595. confirmButtonText: '确定',
  596. type: 'warning',
  597. }
  598. )
  599. .then(() => {
  600. this.$refs.deptBudgetList.validate((valid) => {
  601. if (valid) {
  602. // this.tranCarInfoList = this.freightspace
  603. this.tranCarInfoList = this.deptBudgetList.tranCarInfoList
  604. this.tranCarInfoList.driver = this.deptBudgetList.driver
  605. this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
  606. this.tranCarInfoList.carNo = this.deptBudgetList.carNo
  607. this.tranCarInfoList.loadNetWeight =
  608. this.deptBudgetList.loadNetWeight
  609. this.tranCarInfoList.tranType = this.tranType
  610. // this.tranCarInfoList.unloadPoundImg = this.deptBudgetList.tranCarInfoList.unloadPoundImg
  611. console.log(
  612. this.deptBudgetList.tranCarInfoList[0].unloadPoundImg,
  613. '图片'
  614. )
  615. this.tranCarInfoList.unloadNetWeight =
  616. this.deptBudgetList.unloadNetWeight
  617. for (var i = 0; i < this.tranCarInfoList.length; i++) {
  618. this.tranCarInfoList[i].id = this.freightspace[i].id
  619. if (this.tranCarInfoList[i].temporaryDriverFlag != 0) {
  620. this.tranCarInfoList[i].temporaryDriverFlag = 1
  621. this.tranCarInfoList[i].tranType = this.tranType
  622. }
  623. }
  624. console.log(this.tranCarInfoList, '12121212')
  625. var tranProcessInfo = {}
  626. tranProcessInfo.id = this.deptBudgetList.id
  627. tranProcessInfo.infoId = this.deptBudgetList.infoId
  628. tranProcessInfo.tranCarInfoList = this.tranCarInfoList
  629. feedback(tranProcessInfo)
  630. .toPromise()
  631. .then((response) => {
  632. this.$message.success('提交成功')
  633. this.deptBudgetList = {}
  634. this.freightspace = {}
  635. this.selectedOptions = ''
  636. this.$router.push({
  637. path: 'tranManagementReceivingFeedback',
  638. })
  639. })
  640. } else {
  641. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  642. return false
  643. }
  644. })
  645. })
  646. .catch(() => {
  647. return false
  648. })
  649. },
  650. //导入
  651. finished() {
  652. this.$confirm(`完货操作后,卸车信息不可修改,是否确定完货?`, {
  653. confirmButtonText: '确定',
  654. cancelButtonText: '取消',
  655. type: 'warning',
  656. })
  657. .then(() => {
  658. this.$refs.deptBudgetList.validate((valid) => {
  659. if (valid) {
  660. var tranProcessInfo = {}
  661. tranProcessInfo.id = this.deptBudgetList.id
  662. tranProcessInfo.weight = this.total
  663. stateRec(tranProcessInfo)
  664. .toPromise()
  665. .then((response) => {
  666. this.$message.success('完货成功')
  667. this.deptBudgetList = {}
  668. this.freightspace = {}
  669. this.selectedOptions = ''
  670. this.$router.push({
  671. path: 'tranManagementReceivingFeedback',
  672. })
  673. })
  674. } else {
  675. return false
  676. }
  677. })
  678. })
  679. .catch(() => {
  680. return false
  681. })
  682. },
  683. handleClose() {
  684. this.accessoryTFs = false
  685. },
  686. getList() {
  687. seeCat({ id: this.deptBudgetList.id })
  688. .toPromise()
  689. .then((response) => {
  690. this.deptBudgetList = response
  691. if (response.tranCarInfoList) {
  692. this.freightspace = response.tranCarInfoList
  693. }
  694. for (var i = 0; i < this.freightspace.length; i++) {
  695. if (!this.freightspace[i].loadNetWeight) {
  696. this.freightspace[i].loadNetWeight = 0
  697. }
  698. }
  699. })
  700. },
  701. carchange(val, index) {
  702. for (var i = 0; i < this.carList.length; i++) {
  703. if (this.carList[i].driverName == val) {
  704. this.deptBudgetList.tranCarInfoList[index].driverPhone =
  705. this.carList[i].driverPhone
  706. arrange({ id: this.carList[i].id })
  707. .toPromise()
  708. .then((response) => {
  709. this.deptBudgetList.tranCarInfoList[index].carNo =
  710. response.carNumber
  711. if (response.carLoad != null) {
  712. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  713. response.carLoad
  714. } else {
  715. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  716. }
  717. this.deptBudgetList.tranCarInfoList[index].carModel =
  718. response.carModel
  719. this.deptBudgetList.tranCarInfoList[index].carLength =
  720. response.carLength
  721. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  722. response.carLengthKey
  723. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  724. response.carModelKey
  725. })
  726. }
  727. }
  728. },
  729. },
  730. phonechange(val, index) {
  731. for (var i = 0; i < this.carList.length; i++) {
  732. if (this.carList[i].driverPhone == val) {
  733. this.deptBudgetList.tranCarInfoList[index].driver =
  734. this.carList[i].driver
  735. arrange({ id: this.carList[i].id })
  736. .toPromise()
  737. .then((response) => {
  738. this.deptBudgetList.tranCarInfoList[index].carNo =
  739. response.carNumber
  740. if (response.carLoad != null) {
  741. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  742. response.carLoad
  743. } else {
  744. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  745. }
  746. this.deptBudgetList.tranCarInfoList[index].carModel =
  747. response.carModel
  748. this.deptBudgetList.tranCarInfoList[index].carLength =
  749. response.carLength
  750. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  751. response.carLengthKey
  752. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  753. response.carModelKey
  754. })
  755. }
  756. }
  757. },
  758. selecttaskType(e) {
  759. for (var i = 0; i < this.taskTypeList.length; i++) {
  760. if (this.taskTypeList[i].value == e) {
  761. this.searchType = this.taskTypeList[i].type
  762. }
  763. }
  764. },
  765. }
  766. </script>
  767. <style lang="scss" scoped>
  768. /deep/.basicInformation {
  769. .ws-info-table {
  770. border: none;
  771. }
  772. .el-form-item {
  773. width: 33.3333%;
  774. border: none;
  775. height: 50px;
  776. .el-form-item__label {
  777. background: transparent;
  778. border: none;
  779. }
  780. .el-form-item__content {
  781. border: none;
  782. }
  783. }
  784. }
  785. .title {
  786. position: relative;
  787. padding-left: 10px;
  788. }
  789. .title::before {
  790. content: '';
  791. display: inline-block;
  792. width: 5px;
  793. height: 30px;
  794. background: #5473e8;
  795. position: absolute;
  796. left: 0;
  797. }
  798. .el-form {
  799. padding: 0 5%;
  800. }
  801. .el-button--primary {
  802. background-color: #5878e8;
  803. border-color: #5878e8;
  804. }
  805. .el-col {
  806. background: #f6f7fc;
  807. }
  808. .bg-right {
  809. text-align: right;
  810. padding: 16px 20px;
  811. }
  812. .center {
  813. width: 90%;
  814. margin: 0 auto;
  815. }
  816. //表格文字
  817. /deep/.ws-info-table .el-form-item .el-form-item__label {
  818. text-align: left;
  819. font-size: 13px;
  820. font-weight: 400;
  821. color: #8890b1;
  822. line-height: 16px;
  823. }
  824. //蓝标
  825. .small-title {
  826. position: relative;
  827. padding: 10px;
  828. font-weight: 600;
  829. }
  830. .small-title::before {
  831. position: absolute;
  832. content: '';
  833. display: block;
  834. background: #5473e8;
  835. width: 4px;
  836. height: 14px;
  837. left: 0px;
  838. top: 13px;
  839. padding: 4px 2px;
  840. }
  841. .position {
  842. position: relative;
  843. }
  844. .position .zaizhong {
  845. width: 16%;
  846. }
  847. //减号
  848. .del {
  849. position: absolute;
  850. // right: -38px;
  851. top: 9px;
  852. cursor: pointer;
  853. right: 0;
  854. display: inline-block;
  855. font-size: 20px;
  856. width: 20px;
  857. height: 10px;
  858. line-height: 0px;
  859. }
  860. .driver .el-form-item {
  861. width: 16.63%;
  862. }
  863. /deep/.ws-info-table .el-form-item .el-form-item__content {
  864. background: #f5f7fa;
  865. border-radius: 4px;
  866. color: #8890b1;
  867. font-size: 14px;
  868. font-weight: 400;
  869. }
  870. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  871. width: 72px;
  872. }
  873. /deep/.liaison .ws-info-table .el-form-item {
  874. width: 15.66%;
  875. color: #8890b1;
  876. font-size: 14px;
  877. }
  878. /deep/.ws-info-table .el-form-item {
  879. border: none;
  880. height: 50px;
  881. }
  882. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  883. width: 53.46%;
  884. border: 0px solid #d8dce6;
  885. background: #f5f7fa;
  886. text-align: center;
  887. }
  888. /deep/.liaison {
  889. background: #f5f7fa;
  890. border-radius: 4px;
  891. border: 0px solid #d8dce6;
  892. }
  893. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  894. border: none;
  895. background: #f5f7fa;
  896. }
  897. .catNos {
  898. width: 100%;
  899. height: 30px;
  900. margin-top: 10px;
  901. margin-left: 20px;
  902. font-size: 14px;
  903. }
  904. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  905. // border: 0px solid #d8dce6;
  906. border-radius: 0px;
  907. border-left: none;
  908. border-bottom: none;
  909. border-top: none;
  910. }
  911. /deep/.liaison .ws-info-table {
  912. background: #f6f7fc;
  913. border-radius: 4px;
  914. border: 1px solid #d8dce6;
  915. margin-top: 20px;
  916. }
  917. //送达/未送达
  918. .noservice,
  919. .service {
  920. display: inline-block;
  921. border-radius: 4px;
  922. border: 1px solid #d8dce6;
  923. padding: 2px;
  924. font-size: 12px;
  925. }
  926. .noservice {
  927. background: #c4cada;
  928. color: #ffffff;
  929. }
  930. .serviced {
  931. background: #e5f1f7;
  932. color: #50cad4;
  933. }
  934. //添加司机
  935. .add {
  936. width: 100px;
  937. height: 34px;
  938. background: #f6f7fb;
  939. border-radius: 17px;
  940. color: #5473e8;
  941. font-size: 14px;
  942. border: none;
  943. }
  944. .add img {
  945. display: inline-block;
  946. margin-top: 3px;
  947. margin-left: -12px;
  948. }
  949. .add .spans {
  950. display: table-caption;
  951. width: 56px;
  952. height: 20px;
  953. line-height: 18px;
  954. }
  955. .container {
  956. overflow: scroll;
  957. height: 93vh;
  958. }
  959. .line {
  960. height: 26px;
  961. margin-top: 6px;
  962. left: 2px;
  963. margin: 0 auto;
  964. }
  965. .signStatus {
  966. height: 25px;
  967. border-radius: 3px;
  968. border: 1px solid #5473e8;
  969. padding: 0 3px;
  970. margin-left: 30px;
  971. color: #ffffff;
  972. background: #c4cada;
  973. line-height: 24px;
  974. }
  975. .signStatus1 {
  976. height: 25px;
  977. background: #e6ebff;
  978. border-radius: 3px;
  979. border: 1px solid #5473e8;
  980. padding: 0 3px;
  981. margin-left: 30px;
  982. color: #5473e8;
  983. line-height: 24px;
  984. }
  985. /deep/.ws-info-table.el-form-item .el-form-item__label {
  986. // background-color: #eee;
  987. // padding-right: 8px;
  988. // padding-left: 8px;
  989. font-size: 13px;
  990. font-weight: bold;
  991. // color: #333;
  992. // overflow: hidden;
  993. // height: 40px;
  994. /* text-overflow: ellipsis; */
  995. // white-space: nowrap;
  996. // width: 120px;
  997. // line-height: 40px;
  998. }
  999. .bg-bottom-preview{
  1000. margin: 0 8px;
  1001. }
  1002. </style>