tranManagementReceivingloading.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037
  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="global.uploadPath"
  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="global.uploadPath"
  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="箱号-1:" span="1" prop="caseNo">
  300. <span>{{ item.caseNo }}</span>
  301. </ws-form-item>
  302. <!--封号-->
  303. <ws-form-item label="封号-1:" span="1" prop="titleNo">
  304. <span>{{ item.titleNo }}</span>
  305. </ws-form-item>
  306. <!--箱号-->
  307. <ws-form-item label="箱号-2:" span="1" prop="caseNoOther">
  308. <span>{{ item.caseNoOther }}</span>
  309. </ws-form-item>
  310. <!--封号-->
  311. <ws-form-item label="封号-2:" span="1" prop="titleNoOther">
  312. <span>{{ item.titleNoOther }}</span>
  313. </ws-form-item>
  314. <!--单价 -->
  315. <ws-form-item label="单价(元/吨):" span="1" v-if="deptBudgetList.priceType!=null&&deptBudgetList.priceType=='随行就市'" prop="contractPrice">
  316. <ws-input
  317. v-model="item.contractPrice"
  318. placeholder="请输入单价"
  319. maxlength="20"
  320. size="small"
  321. />
  322. </ws-form-item>
  323. <div
  324. v-show="
  325. item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'
  326. "
  327. class="signStatus"
  328. >
  329. {{ item.signStatus }}
  330. </div>
  331. <div
  332. v-show="
  333. item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'
  334. "
  335. class="signStatus1"
  336. >
  337. {{ item.signStatus }}
  338. </div>
  339. </ws-info-table>
  340. </div>
  341. </div>
  342. <div style="text-align: right; color: #8890b1; font-size: 16px">
  343. 合计{{ total }}/{{ deptBudgetList.weight }}
  344. <!--阶段状态-->
  345. <span
  346. class="noservice"
  347. v-show="deptBudgetList.receivingStatus == '执行中'"
  348. >
  349. 未完货
  350. </span>
  351. <span
  352. class="service"
  353. v-show="deptBudgetList.receivingStatus == '已完货'"
  354. >{{ deptBudgetList.receivingStatus }}</span
  355. >
  356. </div>
  357. <div style="text-align: right; padding: 10px">
  358. <el-button
  359. class="bg-bottom-up"
  360. type="primary"
  361. size="small"
  362. @click="submit()"
  363. >提交</el-button
  364. >
  365. <el-button
  366. class="bg-bottom"
  367. type="primary"
  368. size="small"
  369. @click="finished(deptBudgetList)"
  370. >完货</el-button
  371. >
  372. </div>
  373. </ws-form>
  374. </div>
  375. </div>
  376. </template>
  377. <script>
  378. import Pagination from '@/components/Pagination'
  379. import WsUpload from '@/components/WsUpload'
  380. import {
  381. seeCat,
  382. packList,
  383. feedback,
  384. getbank,
  385. stateRec,
  386. } from '@/model/transport/index'
  387. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  388. import { dayjs, EventBus } from 'base-core-lib'
  389. export default {
  390. name: 'viewSpareMoney',
  391. components: {
  392. WsUpload,
  393. Pagination,
  394. },
  395. watch: {
  396. isShow(val) {
  397. this.showType = val
  398. },
  399. },
  400. data() {
  401. return {
  402. // 是否显示
  403. showType: true,
  404. deptBudgetTotal: 0,
  405. currentPage: 1,
  406. pageSize: 10,
  407. searchType: 1,
  408. startDate: null,
  409. endDate: null,
  410. carList: [],
  411. // 提交类型
  412. readonly: true,
  413. appendixIdsAdd: '',
  414. onChange: {},
  415. gradeList: [],
  416. rules: {
  417. netWeight: [
  418. {
  419. required: true,
  420. type: 'number',
  421. message: '请输入活动名称',
  422. trigger: 'blur',
  423. },
  424. ],
  425. },
  426. size: 10,
  427. compId: localStorage.getItem('ws-pf_compId'),
  428. deptCircularPage: {},
  429. packtypeList: {},
  430. date: {
  431. year: dayjs().format('YYYY'),
  432. month: dayjs().format('MM'),
  433. },
  434. contractList: [],
  435. deptBudgetList: {
  436. tranCarInfoList: [
  437. {
  438. unloadPoundImg: '',
  439. },
  440. ],
  441. },
  442. excelFreightspace: [],
  443. historyList: [],
  444. pickerBeginDateBefore: {
  445. disabledDate: (time) => {
  446. return time.getTime() > Date.now()
  447. },
  448. },
  449. accessoryTFs: false,
  450. }
  451. },
  452. activated() {
  453. this.deptBudgetList.id = this.$route.query.id
  454. this.getList()
  455. },
  456. computed: {
  457. total: function () {
  458. var maxStorage = 0
  459. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  460. maxStorage += Number(
  461. this.deptBudgetList.tranCarInfoList[i].unloadNetWeight
  462. )
  463. }
  464. return maxStorage.toFixed(2)
  465. },
  466. },
  467. mounted() {
  468. this.deptBudgetList.id = this.$route.query.id
  469. this.getList()
  470. },
  471. methods: {
  472. handleChange(file, fileList) {
  473. this.fileTemp = file.raw
  474. let fileName = file.raw.name
  475. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  476. // 判断上传文件格式
  477. if (this.fileTemp) {
  478. if (fileType == 'xlsx' || fileType == 'xls') {
  479. this.importf(this.fileTemp)
  480. } else {
  481. this.$message({
  482. type: 'warning',
  483. message: '附件格式错误,请删除后重新上传!',
  484. })
  485. }
  486. } else {
  487. this.$message({
  488. type: 'warning',
  489. message: '请上传附件!',
  490. })
  491. }
  492. },
  493. importf(obj) {
  494. this.excelFreightspace = []
  495. this.dialogVisible = true
  496. let _this = this
  497. let inputDOM = this.$refs.inputer // 通过DOM取文件数据
  498. this.file = event.currentTarget.files[0]
  499. var rABS = false //是否将文件读取为二进制字符串
  500. var f = this.file
  501. var reader = new FileReader()
  502. //if (!FileReader.prototype.readAsBinaryString) {
  503. FileReader.prototype.readAsBinaryString = function (f) {
  504. var binary = ''
  505. var rABS = false //是否将文件读取为二进制字符串
  506. var pt = this
  507. var wb //读取完成的数据
  508. var outdata
  509. var reader = new FileReader()
  510. reader.onload = function (e) {
  511. var bytes = new Uint8Array(reader.result)
  512. var length = bytes.byteLength
  513. for (var i = 0; i < length; i++) {
  514. binary += String.fromCharCode(bytes[i])
  515. }
  516. var XLSX = require('xlsx')
  517. if (rABS) {
  518. wb = XLSX.read(btoa(fixdata(binary)), {
  519. //手动转化
  520. type: 'base64',
  521. cellDates: true,
  522. })
  523. } else {
  524. wb = XLSX.read(binary, {
  525. type: 'binary',
  526. })
  527. }
  528. // outdata就是你想要的东西 excel导入的数据
  529. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
  530. // excel 数据再处理
  531. let arr = []
  532. outdata.map((v) => {
  533. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  534. let jsonString = JSON.stringify(v)
  535. .replace(/\//g, '')
  536. .replace(/\s/gi, '')
  537. console.log(jsonString)
  538. v = JSON.parse(jsonString)
  539. let obj = {}
  540. //xxx代表列名
  541. obj.caseNo = v.箱号
  542. obj.loadNetWeight = v.装车
  543. obj.titleNo = v.封号
  544. obj.driverPhone = v.司机电话
  545. obj.driver = v.司机姓名
  546. obj.unloadNetWeight = v.卸车净重
  547. obj.receiveDateEnd = v.卸车日期
  548. obj.status = v.状态
  549. obj.carNo = v.车牌号
  550. obj.unloadPoundImg = v.磅单
  551. console.log(obj)
  552. _this.excelFreightspace.push(obj)
  553. })
  554. // _this.freightspace.concat(arr)
  555. let _ispushData = true
  556. console.log(arr, _this.deptBudgetList.tranCarInfoList)
  557. for (let i = 0; i < _this.excelFreightspace.length; i++) {
  558. _ispushData = true
  559. for (let k = 0; k < _this.deptBudgetList.tranCarInfoList.length; k++) {
  560. if (
  561. _this.excelFreightspace[i].driverPhone ==
  562. _this.deptBudgetList.tranCarInfoList[k].driverPhone
  563. ) {
  564. _this.deptBudgetList.tranCarInfoList[k] = _this.excelFreightspace[i]
  565. _ispushData = false
  566. }
  567. }
  568. if (_ispushData) {
  569. _this.deptBudgetList.tranCarInfoList.push(_this.excelFreightspace[i])
  570. _ispushData = true
  571. }
  572. }
  573. _this.$forceUpdate();
  574. }
  575. reader.readAsArrayBuffer(f)
  576. }
  577. if (rABS) {
  578. reader.readAsArrayBuffer(f)
  579. } else {
  580. reader.readAsBinaryString(f)
  581. }
  582. console.log(reader)
  583. },
  584. //返回按钮
  585. revert() {
  586. this.$router.push({ path: 'tranManagementReceivingFeedback' })
  587. },
  588. del(index) {
  589. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  590. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  591. }
  592. },
  593. uploadSuccessHandle1(e, index) {
  594. this.deptBudgetList.tranCarInfoList[index].unloadPoundImg = e.data.url
  595. },
  596. selectwaterContent() {},
  597. //提交按钮
  598. submit() {
  599. for (var i = 0; i < this.freightspace.length; i++) {
  600. if (this.freightspace[i].unloadNetWeight == null) {
  601. this.$message({
  602. message: '卸车净重不能为空!',
  603. type: 'warning',
  604. })
  605. return
  606. }
  607. if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&!this.freightspace[i].contractPrice) {
  608. this.$message({
  609. message: '单价不能为空!',
  610. type: 'warning',
  611. })
  612. return
  613. }
  614. }
  615. this.$confirm(
  616. `所有车辆完成卸车任务后,请及时修改任务状态,确定提交卸车信息?`,
  617. {
  618. cancelButtonText: '取消',
  619. confirmButtonText: '确定',
  620. type: 'warning',
  621. }
  622. )
  623. .then(() => {
  624. this.$refs.deptBudgetList.validate((valid) => {
  625. if (valid) {
  626. // this.tranCarInfoList = this.freightspace
  627. this.tranCarInfoList = this.deptBudgetList.tranCarInfoList
  628. this.tranCarInfoList.driver = this.deptBudgetList.driver
  629. this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
  630. this.tranCarInfoList.carNo = this.deptBudgetList.carNo
  631. this.tranCarInfoList.loadNetWeight =
  632. this.deptBudgetList.loadNetWeight
  633. this.tranCarInfoList.tranType = this.tranType
  634. // this.tranCarInfoList.unloadPoundImg = this.deptBudgetList.tranCarInfoList.unloadPoundImg
  635. console.log(
  636. this.deptBudgetList.tranCarInfoList[0].unloadPoundImg,
  637. '图片'
  638. )
  639. this.tranCarInfoList.unloadNetWeight =
  640. this.deptBudgetList.unloadNetWeight
  641. for (var i = 0; i < this.tranCarInfoList.length; i++) {
  642. this.tranCarInfoList[i].id = this.freightspace[i].id
  643. if (this.tranCarInfoList[i].temporaryDriverFlag != 0) {
  644. this.tranCarInfoList[i].temporaryDriverFlag = 1
  645. this.tranCarInfoList[i].tranType = this.tranType
  646. }
  647. }
  648. console.log(this.tranCarInfoList, '12121212')
  649. var tranProcessInfo = {}
  650. tranProcessInfo.flag='1'
  651. tranProcessInfo.id = this.deptBudgetList.id
  652. tranProcessInfo.infoId = this.deptBudgetList.infoId
  653. tranProcessInfo.tranCarInfoList = this.tranCarInfoList
  654. feedback(tranProcessInfo)
  655. .toPromise()
  656. .then((response) => {
  657. this.$message.success('提交成功')
  658. this.deptBudgetList = {}
  659. this.freightspace = {}
  660. this.selectedOptions = ''
  661. this.$router.push({
  662. path: 'tranManagementReceivingFeedback',
  663. })
  664. })
  665. } else {
  666. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  667. return false
  668. }
  669. })
  670. })
  671. .catch(() => {
  672. return false
  673. })
  674. },
  675. //导入
  676. finished() {
  677. this.$confirm(`完货操作后,卸车信息不可修改,是否确定完货?`, {
  678. confirmButtonText: '确定',
  679. cancelButtonText: '取消',
  680. type: 'warning',
  681. })
  682. .then(() => {
  683. this.$refs.deptBudgetList.validate((valid) => {
  684. if (valid) {
  685. var tranProcessInfo = {}
  686. tranProcessInfo.id = this.deptBudgetList.id
  687. tranProcessInfo.weight = this.total
  688. stateRec(tranProcessInfo)
  689. .toPromise()
  690. .then((response) => {
  691. this.$message.success('完货成功')
  692. this.deptBudgetList = {}
  693. this.freightspace = {}
  694. this.selectedOptions = ''
  695. this.$router.push({
  696. path: 'tranManagementReceivingFeedback',
  697. })
  698. })
  699. } else {
  700. return false
  701. }
  702. })
  703. })
  704. .catch(() => {
  705. return false
  706. })
  707. },
  708. handleClose() {
  709. this.accessoryTFs = false
  710. },
  711. getList() {
  712. seeCat({ id: this.deptBudgetList.id })
  713. .toPromise()
  714. .then((response) => {
  715. this.deptBudgetList = response
  716. if (response.tranCarInfoList) {
  717. this.freightspace = response.tranCarInfoList
  718. }
  719. for (var i = 0; i < this.freightspace.length; i++) {
  720. if (!this.freightspace[i].loadNetWeight) {
  721. this.freightspace[i].loadNetWeight = 0
  722. }
  723. }
  724. })
  725. },
  726. carchange(val, index) {
  727. for (var i = 0; i < this.carList.length; i++) {
  728. if (this.carList[i].driverName == val) {
  729. this.deptBudgetList.tranCarInfoList[index].driverPhone =
  730. this.carList[i].driverPhone
  731. arrange({ id: this.carList[i].id })
  732. .toPromise()
  733. .then((response) => {
  734. this.deptBudgetList.tranCarInfoList[index].carNo =
  735. response.carNumber
  736. if (response.carLoad != null) {
  737. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  738. response.carLoad
  739. } else {
  740. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  741. }
  742. this.deptBudgetList.tranCarInfoList[index].carModel =
  743. response.carModel
  744. this.deptBudgetList.tranCarInfoList[index].carLength =
  745. response.carLength
  746. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  747. response.carLengthKey
  748. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  749. response.carModelKey
  750. })
  751. }
  752. }
  753. },
  754. },
  755. phonechange(val, index) {
  756. for (var i = 0; i < this.carList.length; i++) {
  757. if (this.carList[i].driverPhone == val) {
  758. this.deptBudgetList.tranCarInfoList[index].driver =
  759. this.carList[i].driver
  760. arrange({ id: this.carList[i].id })
  761. .toPromise()
  762. .then((response) => {
  763. this.deptBudgetList.tranCarInfoList[index].carNo =
  764. response.carNumber
  765. if (response.carLoad != null) {
  766. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  767. response.carLoad
  768. } else {
  769. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  770. }
  771. this.deptBudgetList.tranCarInfoList[index].carModel =
  772. response.carModel
  773. this.deptBudgetList.tranCarInfoList[index].carLength =
  774. response.carLength
  775. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  776. response.carLengthKey
  777. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  778. response.carModelKey
  779. })
  780. }
  781. }
  782. },
  783. selecttaskType(e) {
  784. for (var i = 0; i < this.taskTypeList.length; i++) {
  785. if (this.taskTypeList[i].value == e) {
  786. this.searchType = this.taskTypeList[i].type
  787. }
  788. }
  789. },
  790. }
  791. </script>
  792. <style lang="scss" scoped>
  793. /deep/.basicInformation {
  794. .ws-info-table {
  795. border: none;
  796. }
  797. .el-form-item {
  798. width: 33.3333%;
  799. border: none;
  800. height: 50px;
  801. .el-form-item__label {
  802. background: transparent;
  803. border: none;
  804. }
  805. .el-form-item__content {
  806. border: none;
  807. }
  808. }
  809. }
  810. .title {
  811. position: relative;
  812. padding-left: 10px;
  813. }
  814. .title::before {
  815. content: '';
  816. display: inline-block;
  817. width: 5px;
  818. height: 30px;
  819. background: #5473e8;
  820. position: absolute;
  821. left: 0;
  822. }
  823. .el-form {
  824. padding: 42px 5%;
  825. }
  826. .el-button--primary {
  827. background-color: #5878e8;
  828. border-color: #5878e8;
  829. }
  830. .el-col {
  831. background: #f6f7fc;
  832. }
  833. .bg-right {
  834. text-align: right;
  835. padding: 16px 20px;
  836. }
  837. .center {
  838. width: 90%;
  839. margin: 0 auto;
  840. }
  841. //表格文字
  842. /deep/.ws-info-table .el-form-item .el-form-item__label {
  843. text-align: left;
  844. font-size: 13px;
  845. font-weight: 400;
  846. color: #8890b1;
  847. line-height: 16px;
  848. }
  849. //蓝标
  850. .small-title {
  851. position: relative;
  852. padding: 10px;
  853. font-weight: 600;
  854. }
  855. .small-title::before {
  856. position: absolute;
  857. content: '';
  858. display: block;
  859. background: #5473e8;
  860. width: 4px;
  861. height: 14px;
  862. left: 0px;
  863. top: 13px;
  864. padding: 4px 2px;
  865. }
  866. .position {
  867. position: relative;
  868. }
  869. .position .zaizhong {
  870. width: 16%;
  871. }
  872. //减号
  873. .del {
  874. position: absolute;
  875. // right: -38px;
  876. top: 9px;
  877. cursor: pointer;
  878. right: 0;
  879. display: inline-block;
  880. font-size: 20px;
  881. width: 20px;
  882. height: 10px;
  883. line-height: 0px;
  884. }
  885. .driver .el-form-item {
  886. width: 16.63%;
  887. }
  888. /deep/.ws-info-table .el-form-item .el-form-item__content {
  889. background: #f5f7fa;
  890. border-radius: 4px;
  891. color: #8890b1;
  892. font-size: 14px;
  893. font-weight: 400;
  894. }
  895. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  896. width: 72px;
  897. }
  898. /deep/.liaison .ws-info-table .el-form-item {
  899. width: 15.66%;
  900. color: #8890b1;
  901. font-size: 14px;
  902. }
  903. /deep/.ws-info-table .el-form-item {
  904. border: none;
  905. height: 50px;
  906. }
  907. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  908. width: 53.46%;
  909. border: 0px solid #d8dce6;
  910. background: #f5f7fa;
  911. text-align: center;
  912. }
  913. /deep/.liaison {
  914. background: #f5f7fa;
  915. border-radius: 4px;
  916. border: 0px solid #d8dce6;
  917. }
  918. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  919. border: none;
  920. background: #f5f7fa;
  921. }
  922. .catNos {
  923. width: 100%;
  924. height: 30px;
  925. margin-top: 10px;
  926. margin-left: 20px;
  927. font-size: 14px;
  928. }
  929. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  930. // border: 0px solid #d8dce6;
  931. border-radius: 0px;
  932. border-left: none;
  933. border-bottom: none;
  934. border-top: none;
  935. }
  936. /deep/.liaison .ws-info-table {
  937. background: #f6f7fc;
  938. border-radius: 4px;
  939. border: 1px solid #d8dce6;
  940. margin-top: 20px;
  941. }
  942. //送达/未送达
  943. .noservice,
  944. .service,.serviced {
  945. display: inline-block;
  946. border-radius: 4px;
  947. border: 1px solid #d8dce6;
  948. padding: 2px;
  949. font-size: 12px;
  950. }
  951. .noservice {
  952. background: #c4cada;
  953. color: #ffffff;
  954. }
  955. .service {
  956. background: #e5f1f7;
  957. color: #50cad4;
  958. }
  959. .serviced {
  960. background: #e5f1f7;
  961. color: #5473E8;
  962. }
  963. //添加司机
  964. .add {
  965. width: 100px;
  966. height: 34px;
  967. background: #f6f7fb;
  968. border-radius: 17px;
  969. color: #5473e8;
  970. font-size: 14px;
  971. border: none;
  972. }
  973. .add img {
  974. display: inline-block;
  975. margin-top: 3px;
  976. margin-left: -12px;
  977. }
  978. .add .spans {
  979. display: table-caption;
  980. width: 56px;
  981. height: 20px;
  982. line-height: 18px;
  983. }
  984. .container {
  985. overflow: scroll;
  986. height: 93vh;
  987. }
  988. .line {
  989. height: 26px;
  990. margin-top: 6px;
  991. left: 2px;
  992. margin: 0 auto;
  993. }
  994. .signStatus {
  995. height: 25px;
  996. border-radius: 3px;
  997. border: 1px solid #5473e8;
  998. padding: 0 3px;
  999. margin-left: 30px;
  1000. color: #ffffff;
  1001. background: #c4cada;
  1002. line-height: 24px;
  1003. }
  1004. .signStatus1 {
  1005. height: 25px;
  1006. background: #e6ebff;
  1007. border-radius: 3px;
  1008. border: 1px solid #5473e8;
  1009. padding: 0 3px;
  1010. margin-left: 30px;
  1011. color: #5473e8;
  1012. line-height: 24px;
  1013. }
  1014. /deep/.ws-info-table.el-form-item .el-form-item__label {
  1015. // background-color: #eee;
  1016. // padding-right: 8px;
  1017. // padding-left: 8px;
  1018. font-size: 13px;
  1019. font-weight: bold;
  1020. // color: #333;
  1021. // overflow: hidden;
  1022. // height: 40px;
  1023. /* text-overflow: ellipsis; */
  1024. // white-space: nowrap;
  1025. // width: 120px;
  1026. // line-height: 40px;
  1027. }
  1028. .bg-bottom-preview{
  1029. margin: 0 8px;
  1030. }
  1031. </style>