tranManagementFireReceivingFeedback.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  1. //卸车反馈
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">火运卸车反馈</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <ws-form
  25. class="position"
  26. ref="deptBudgetList"
  27. :rules="rules"
  28. :model="deptBudgetList"
  29. >
  30. <div class="small-title" style="font-size: 16px">任务详情</div>
  31. <ws-info-table>
  32. <!--任务编号-->
  33. <ws-form-item label="任务编号" span="1" prop="processNo">
  34. {{ deptBudgetList.processNo }}
  35. </ws-form-item>
  36. <!--货名-->
  37. <ws-form-item label="货名" span="1" prop="goodsName">
  38. {{ deptBudgetList.goodsName }}
  39. </ws-form-item>
  40. <!--重量(吨)-->
  41. <ws-form-item label="重量(吨)" span="1" prop="weight">
  42. {{ deptBudgetList.weight }}
  43. </ws-form-item>
  44. <!--发货地址-->
  45. <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
  46. {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
  47. }}{{ deptBudgetList.sendArea }}
  48. </ws-form-item>
  49. <!--发货人-->
  50. <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
  51. {{ deptBudgetList.sender }}
  52. </ws-form-item>
  53. <!--发货人电话-->
  54. <ws-form-item
  55. label="发货人电话"
  56. span="1"
  57. prop="senderPhone"
  58. class="readonly"
  59. >
  60. {{ deptBudgetList.senderPhone }}
  61. </ws-form-item>
  62. <!--收货地址-->
  63. <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
  64. {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
  65. }}{{ deptBudgetList.receiveArea }}
  66. </ws-form-item>
  67. <!--收货人-->
  68. <ws-form-item label="收货人" span="1" prop="receiver">
  69. {{ deptBudgetList.receiver }}
  70. </ws-form-item>
  71. <!--收货人电话-->
  72. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
  73. {{ deptBudgetList.receiverPhone }}
  74. </ws-form-item>
  75. <!--发货日期-->
  76. <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
  77. {{ deptBudgetList.deliveryDateStart }}
  78. </ws-form-item>
  79. <!--最晚到货日期-->
  80. <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
  81. {{ deptBudgetList.deliveryDateEnd }}
  82. </ws-form-item>
  83. <!--合同编号-->
  84. <ws-form-item label="合同编号" span="1" prop="contractNo">
  85. {{ deptBudgetList.contractNo }}
  86. </ws-form-item>
  87. <!-- 运输方式 -->
  88. <ws-form-item label="运输方式" span="1" prop="tranType">
  89. {{ deptBudgetList.tranType }}
  90. </ws-form-item>
  91. </ws-info-table>
  92. <div class="small-title" style="font-size: 16px">联络员及车次</div>
  93. <div class="lianluoyuan">
  94. <ws-info-table>
  95. <!--姓名-->
  96. <ws-form-item label="姓名:" span="1" prop="driver">
  97. <span>{{ deptBudgetList.driver }}</span>
  98. </ws-form-item>
  99. <!--电话-->
  100. <ws-form-item label="电话:" span="1" prop="driverPhone">
  101. <span>{{ deptBudgetList.driverPhone }}</span>
  102. </ws-form-item>
  103. <!--发车日期-->
  104. <el-form-item label="发车日期:" span="1" prop="sendDateStart">
  105. <ws-date-picker
  106. v-model="deptBudgetList.sendDateStart"
  107. type="date"
  108. style="width: 150px"
  109. placeholder="请选择日期"
  110. value-format="yyyy-MM-dd"
  111. />
  112. </el-form-item>
  113. <!--到站日期-->
  114. <ws-form-item label="到站日期:" span="1" prop="receiveDateEnd">
  115. <span>{{ deptBudgetList.receiveDateEnd }}</span>
  116. </ws-form-item>
  117. <!--车型-->
  118. <ws-form-item label="车型:" span="1" prop="caeModel">
  119. <span>{{ deptBudgetList.carModel }}</span>
  120. </ws-form-item>
  121. </ws-info-table>
  122. </div>
  123. <div class="small-title" style="font-size: 16px">卸车详情</div>
  124. <div style="font-size: 16px; width: 100%; text-align: right;display:flex;justify-content:end;">
  125. <el-link
  126. href="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF/%E7%81%AB%E8%BF%90%E5%8D%B8%E8%BD%A6%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF.xlsx"
  127. style="margin-left: 8px"
  128. >
  129. <el-button type="primary">模板下载</el-button>
  130. </el-link>
  131. <el-upload
  132. style="margin-left: 8px"
  133. class="upload-demo inline-block margin-right-10"
  134. action=""
  135. :on-change="handleChange"
  136. :show-file-list="false"
  137. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  138. :auto-upload="false"
  139. >
  140. <el-button type="primary">导入</el-button>
  141. </el-upload>
  142. </div>
  143. <div class="liaison">
  144. <div
  145. style="width: 100%"
  146. class="flex position"
  147. v-for="(item, index) in this.freightspace"
  148. :key="index"
  149. >
  150. <ws-info-table>
  151. <!--车厢号-->
  152. <div class="catNos">车厢号-{{ index + 1 }}</div>
  153. <ws-form-item label="车厢号:" span="1" prop="boxNo">
  154. <span>{{ item.boxNo }}</span>
  155. </ws-form-item>
  156. <!--装车净重 -->
  157. <ws-form-item label="装车净重:" span="1" prop="loadNetWeight">
  158. <span>{{ item.loadNetWeight }}</span>
  159. </ws-form-item>
  160. <!--卸车净重-->
  161. <ws-form-item label="卸车净重:" span="1" prop="unloadNetWeight">
  162. <ws-input
  163. v-if="item.status == '未装车' || item.status == '已送达'"
  164. :disabled="readonly"
  165. v-model="item.unloadNetWeight"
  166. placeholder="请输入卸车净重"
  167. maxlength="20"
  168. size="small"
  169. />
  170. <ws-input
  171. v-else
  172. v-model="item.unloadNetWeight"
  173. placeholder="请输入卸车净重"
  174. maxlength="20"
  175. size="small"
  176. />
  177. </ws-form-item>
  178. <!--磅单-->
  179. <ws-form-item label="磅单:" span="1" prop="unloadPoundImg">
  180. <!-- slot-scope="scope" -->
  181. <template>
  182. <el-upload
  183. action="https://www.zthymaoyi.com/upload/admin"
  184. :show-file-list="false"
  185. :on-success="
  186. (res) => {
  187. uploadSuccessHandle1(res, index)
  188. }
  189. "
  190. class="avatar-uploader"
  191. accept=".jpg, .jpeg, .png, .gif"
  192. ><img
  193. width="18"
  194. height="20"
  195. style="vertical-align: text-top; position: relative"
  196. src="../../../public/img/fujian.png"
  197. alt=""
  198. />
  199. </el-upload>
  200. <span v-if="item.unloadPoundImg != null">1</span>
  201. <span v-if="item.unloadPoundImg == null">未上传</span>
  202. </template>
  203. </ws-form-item>
  204. <!--卸车日期-->
  205. <el-form-item
  206. label="卸车日期:"
  207. span="1"
  208. prop="unloadingDate"
  209. style="width: 22%"
  210. >
  211. <ws-date-picker
  212. v-if="item.status == '未装车' || item.status == '已送达'"
  213. :disabled="readonly"
  214. v-model="item.unloadingDate"
  215. type="date"
  216. style="width: 150px"
  217. placeholder="请选择日期"
  218. value-format="yyyy-MM-dd"
  219. />
  220. <ws-date-picker
  221. v-else
  222. v-model="item.unloadingDate"
  223. type="date"
  224. style="width: 150px"
  225. placeholder="请选择日期"
  226. value-format="yyyy-MM-dd"
  227. />
  228. </el-form-item>
  229. <!-- 提交 -->
  230. <span class="servicedout" v-show="item.status == '已送达'"
  231. >已卸车</span
  232. >
  233. <span class="noserviceout" v-show="item.status == '未装车'">{{
  234. item.status
  235. }}</span>
  236. <!-- <span
  237. style="text-align: right; padding: 10px"
  238. class="center"
  239. v-if="
  240. item.status == '' ||
  241. item.status == null ||
  242. item.status == '未送达' ||
  243. item.status == '已装车'
  244. "
  245. >
  246. <el-button
  247. class="bg-bottom"
  248. type="primary"
  249. size="small"
  250. @click="submit(deptBudgetList)"
  251. >提交</el-button
  252. >
  253. </span> -->
  254. <!-- <div
  255. v-show="
  256. item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'
  257. "
  258. class="signStatus"
  259. >
  260. {{ item.signStatus }}
  261. </div>
  262. <div
  263. v-show="
  264. item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'
  265. "
  266. class="signStatus1"
  267. >
  268. {{ item.signStatus }}
  269. </div> -->
  270. <span
  271. v-show="item.temporaryDriverFlag != 0"
  272. width="22"
  273. height="22"
  274. class="del"
  275. @click="del(index)"
  276. src="../../../public/img/del.png"
  277. alt=""
  278. >×</span
  279. >
  280. </ws-info-table>
  281. </div>
  282. </div>
  283. <div style="text-align: right; color: #8890b1; font-size: 16px">
  284. 合计(吨):{{ total }}/{{ deptBudgetList.weight }}
  285. <!--阶段状态-->
  286. <span
  287. class="noservice"
  288. v-show="deptBudgetList.feedbackStatus == '执行中'"
  289. >
  290. 未完货
  291. </span>
  292. <span
  293. class="service"
  294. v-show="deptBudgetList.feedbackStatus == '已完货'"
  295. >{{ deptBudgetList.feedbackStatus }}</span
  296. >
  297. </div>
  298. <!-- <el-button class="add bg-bottom" type="primary" size="small" @click="add">
  299. <img width="22" height="22" src="../../../public/img/add.png" alt="" />
  300. <div class="spans">添加临时用车</div></el-button
  301. > -->
  302. </ws-form>
  303. <!-- 完货 -->
  304. <div style="text-align: right; padding: 10px" class="wanhuo">
  305. <el-button
  306. style="text-align: right; padding: 10px; margin: 4px 0 0 20px"
  307. type="primary"
  308. @click="submit(deptBudgetList)"
  309. >
  310. 提交
  311. </el-button>
  312. <el-button
  313. class="bg-bottom"
  314. type="primary"
  315. size="small"
  316. @click="finished(deptBudgetList)"
  317. >完货</el-button
  318. >
  319. </div>
  320. </div>
  321. </template>
  322. <script>
  323. import { regionData } from 'element-china-area-data'
  324. import { seeCat, feedback, stateRec } from '@/model/transport/index'
  325. import WsUpload from '@/components/WsUpload'
  326. import mapDrag from '@/components/mapdrag/mapdrag'
  327. export default {
  328. name: 'viewSpareMoney',
  329. components: {
  330. WsUpload,
  331. mapDrag,
  332. },
  333. watch: {
  334. vesselId(val) {
  335. this.getVesselData()
  336. },
  337. isShow(val) {
  338. this.showType = val
  339. },
  340. },
  341. data() {
  342. return {
  343. deptBudgetList: {
  344. totalStorage: 0,
  345. },
  346. options_: regionData,
  347. heightData: '600px',
  348. zoom: 7,
  349. selectedOptions: [],
  350. center: [116.244694, 39.517344],
  351. window: '',
  352. radio: 1,
  353. personCharge: [],
  354. district: null,
  355. driverList: [],
  356. readonly: true,
  357. listDate: { country: '中国', level: 'country', city: '' },
  358. citylist: [],
  359. compId: sessionStorage.getItem('ws-pf_compId'),
  360. rules: {
  361. warehouseName: [
  362. {
  363. required: true,
  364. message: '请输入仓库名称',
  365. trigger: 'blur',
  366. },
  367. {
  368. min: 2,
  369. max: 20,
  370. message: '仓库名长度不符合要求,请输入2-20字符之内',
  371. trigger: 'blur',
  372. },
  373. ],
  374. },
  375. tranType: 2,
  376. size: 10,
  377. value1: '',
  378. unitList: [],
  379. freightspace1: [
  380. {
  381. accountTypeFlag: '1',
  382. payeeName: '',
  383. payeeNumberCard: '',
  384. compName: '',
  385. bankDeposit: '',
  386. addressUrlArray: [],
  387. bankCard: '',
  388. },
  389. ],
  390. freightspace: [
  391. {
  392. boxNo: '',
  393. unloadNetWeight: '',
  394. unloadPoundImg: null,
  395. unloadingDate: '',
  396. },
  397. // {loadPoundImg:{}},
  398. ],
  399. name: '',
  400. staffList: [],
  401. options: [],
  402. carModel: [],
  403. tranCarInfoList: {
  404. unloadPoundImg: '',
  405. },
  406. excelFreightspace:[],
  407. // tranCarList: {
  408. // driver: '',
  409. // driverPhone:'',
  410. // sendDateStart:'',
  411. // receiveDateEnd:'',
  412. // carModel:'',
  413. // },
  414. //上传
  415. accessoryTFs: false,
  416. fileList: [],
  417. appendixIdsAdd: '',
  418. }
  419. },
  420. activated() {
  421. this.deptBudgetList.id = this.$route.query.id
  422. this.getList()
  423. },
  424. computed: {
  425. totalStorage: function () {
  426. var maxStorage = 0
  427. for (var i = 0; i < this.freightspace.length; i++) {
  428. maxStorage += Number(this.freightspace[i].maxStorage)
  429. }
  430. return maxStorage
  431. },
  432. total: function () {
  433. if (this.deptBudgetList.tranCarInfoList != null) {
  434. var maxStorage = 0
  435. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  436. maxStorage += Number(
  437. this.deptBudgetList.tranCarInfoList[i].loadNetWeight
  438. )
  439. }
  440. return maxStorage
  441. } else {
  442. return 0
  443. }
  444. },
  445. },
  446. methods: {
  447. handleChange(file, fileList) {
  448. this.fileTemp = file.raw
  449. let fileName = file.raw.name
  450. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  451. // 判断上传文件格式
  452. if (this.fileTemp) {
  453. if (fileType == 'xlsx' || fileType == 'xls') {
  454. this.importf(this.fileTemp)
  455. } else {
  456. this.$message({
  457. type: 'warning',
  458. message: '附件格式错误,请删除后重新上传!',
  459. })
  460. }
  461. } else {
  462. this.$message({
  463. type: 'warning',
  464. message: '请上传附件!',
  465. })
  466. }
  467. },
  468. importf(obj) {
  469. this.excelFreightspace = []
  470. this.dialogVisible = true
  471. let _this = this
  472. let inputDOM = this.$refs.inputer // 通过DOM取文件数据
  473. this.file = event.currentTarget.files[0]
  474. var rABS = false //是否将文件读取为二进制字符串
  475. var f = this.file
  476. var reader = new FileReader()
  477. //if (!FileReader.prototype.readAsBinaryString) {
  478. FileReader.prototype.readAsBinaryString = function (f) {
  479. var binary = ''
  480. var rABS = false //是否将文件读取为二进制字符串
  481. var pt = this
  482. var wb //读取完成的数据
  483. var outdata
  484. var reader = new FileReader()
  485. reader.onload = function (e) {
  486. var bytes = new Uint8Array(reader.result)
  487. var length = bytes.byteLength
  488. for (var i = 0; i < length; i++) {
  489. binary += String.fromCharCode(bytes[i])
  490. }
  491. var XLSX = require('xlsx')
  492. if (rABS) {
  493. wb = XLSX.read(btoa(fixdata(binary)), {
  494. //手动转化
  495. type: 'base64',
  496. })
  497. } else {
  498. wb = XLSX.read(binary, {
  499. type: 'binary',
  500. })
  501. }
  502. // outdata就是你想要的东西 excel导入的数据
  503. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
  504. // excel 数据再处理
  505. let arr = []
  506. outdata.map((v) => {
  507. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  508. let jsonString = JSON.stringify(v)
  509. .replace(/\//g, '')
  510. .replace(/\s/gi, '')
  511. // let jsonString = JSON.stringify(v)
  512. console.log(jsonString)
  513. v = JSON.parse(jsonString)
  514. let obj = {}
  515. //xxx代表列名
  516. obj.boxNo = v.车厢号
  517. obj.loadNetWeight = v.装车净重
  518. obj.unloadNetWeight = v.卸车净重
  519. obj.unloadingDate = v.卸车日期
  520. obj.status = v.状态
  521. obj.unloadPoundImg = v.磅单
  522. console.log(obj)
  523. _this.excelFreightspace.push(obj)
  524. })
  525. // _this.freightspace.concat(arr)
  526. let _ispushData = true
  527. console.log(arr, _this.freightspace)
  528. for (let i = 0; i < _this.excelFreightspace.length; i++) {
  529. _ispushData = true
  530. for (let k = 0; k < _this.freightspace.length; k++) {
  531. if (
  532. _this.excelFreightspace[i].boxNo == _this.freightspace[k].boxNo
  533. ) {
  534. _this.freightspace[k] = _this.excelFreightspace[i]
  535. if (
  536. _this.excelFreightspace[i].unloadPoundImg.split(',').length > 0
  537. ) {
  538. _this.freightspace[k].imgCount =
  539. _this.excelFreightspace[i].unloadPoundImg.split(',').length
  540. }
  541. _ispushData = false
  542. }
  543. }
  544. if (_ispushData) {
  545. if (
  546. _this.excelFreightspace[i].unloadPoundImg.split(',').length > 0
  547. ) {
  548. _this.excelFreightspace[i].imgCount =
  549. _this.excelFreightspace[i].unloadPoundImg.split(',').length
  550. }
  551. _this.freightspace.push(_this.excelFreightspace[i])
  552. _ispushData = true
  553. }
  554. }
  555. _this.$forceUpdate();
  556. console.log(arr, _this.freightspace)
  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. marker: function (item) {
  568. this.deptBudgetList.warehousePositioning =
  569. item.lnglat.lat + ',' + item.lnglat.lng
  570. },
  571. // 关闭 dialog时 处理文件url 初始化upload组件
  572. handleClose() {
  573. this.dialogViewSpareMoney = false
  574. },
  575. add() {
  576. this.freightspace.push({
  577. driver: '',
  578. driverPhone: '',
  579. carNo: '',
  580. loadNetWeight: '',
  581. })
  582. },
  583. del(index) {
  584. if (this.freightspace.length > 1) {
  585. this.freightspace.splice(index, 1)
  586. }
  587. },
  588. //完货
  589. finished() {
  590. this.$confirm(`完货操作后,装车信息不可修改,是否确定完货?`, {
  591. confirmButtonText: '确定',
  592. cancelButtonText: '取消',
  593. type: 'warning',
  594. })
  595. .then(() => {
  596. this.$refs.deptBudgetList.validate((valid) => {
  597. if (valid) {
  598. var tranProcessInfo = {}
  599. tranProcessInfo.id = this.deptBudgetList.id
  600. stateRec(tranProcessInfo)
  601. .toPromise()
  602. .then((response) => {
  603. this.$message.success('完货成功')
  604. this.deptBudgetList = {}
  605. this.freightspace = {}
  606. this.selectedOptions = ''
  607. this.$router.push({
  608. path: 'tranManagementReceivingFeedback',
  609. })
  610. })
  611. } else {
  612. return false
  613. }
  614. })
  615. })
  616. .catch(() => {
  617. return false
  618. })
  619. },
  620. submit() {
  621. for (var i = 0; i < this.freightspace.length; i++) {
  622. if (this.freightspace[i].temporaryDriverFlag != 0) {
  623. if (!this.freightspace[i].driver) {
  624. this.$message({
  625. message: '司机姓名不能为空!',
  626. type: 'warning',
  627. })
  628. return
  629. }
  630. if (!this.freightspace[i].driverPhone) {
  631. this.$message({
  632. message: '司机电话不能为空!',
  633. type: 'warning',
  634. })
  635. return
  636. }
  637. if (!this.freightspace[i].carNo) {
  638. this.$message({
  639. message: '车牌号不能为空!',
  640. type: 'warning',
  641. })
  642. return
  643. }
  644. if (!this.freightspace[i].loadNetWeight) {
  645. this.$message({
  646. message: '装载净重不能为空!',
  647. type: 'warning',
  648. })
  649. return
  650. }
  651. }
  652. }
  653. this.$confirm(`提交成功后提醒司机及时签订运输合同,确定提交卸车信息?`, {
  654. confirmButtonText: '确定',
  655. cancelButtonText: '取消',
  656. type: 'warning',
  657. })
  658. .then(() => {
  659. this.$refs.deptBudgetList.validate((valid) => {
  660. if (valid) {
  661. // this.deptBudgetList.totalStorage = this.totalStorage
  662. // this.tranCarInfoList = this.freightspace
  663. // this.tranCarInfoList.driver = this.deptBudgetList.driver
  664. // this.tranCarInfoList.unloadingDate =
  665. // this.deptBudgetList.unloadingDate
  666. // this.tranCarInfoList[0].sendDateStart =
  667. // this.deptBudgetList.sendDateStart
  668. // this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
  669. // this.tranCarInfoList.tranCarNo = this.deptBudgetList.tranCarNo
  670. // this.tranCarInfoList.carNo = this.deptBudgetList.carNo
  671. // this.tranCarInfoList.unloadNetWeight =
  672. // this.deptBudgetList.unloadNetWeight
  673. // this.tranCarInfoList.tranType = this.tranType
  674. // this.tranCarInfoList.unloadPoundImg =
  675. // this.deptBudgetList.unloadPoundImg
  676. // // this.tranCarInfoList.boxNo = this.arr.toString()
  677. // for (var i = 0; i < this.tranCarInfoList.length; i++) {
  678. // this.tranCarInfoList[i].id = this.freightspace[i].id
  679. // if (this.tranCarInfoList[i].temporaryDriverFlag != 0) {
  680. // this.tranCarInfoList[i].temporaryDriverFlag = 1
  681. // this.tranCarInfoList[i].tranType = this.tranType
  682. // }
  683. // }
  684. var tranProcessInfo = {}
  685. tranProcessInfo.id = this.deptBudgetList.id
  686. tranProcessInfo.infoId = this.deptBudgetList.infoId
  687. tranProcessInfo.processNo = this.deptBudgetList.processNo
  688. tranProcessInfo.tranPrice = this.deptBudgetList.tranPrice
  689. tranProcessInfo.tranCarInfoList = this.freightspace
  690. // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
  691. feedback(tranProcessInfo)
  692. .toPromise()
  693. .then((response) => {
  694. this.$message.success('提交成功')
  695. this.deptBudgetList = {}
  696. this.freightspace = {}
  697. this.selectedOptions = ''
  698. this.$router.push({
  699. path: 'tranManagementReceivingFeedback',
  700. })
  701. })
  702. } else {
  703. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  704. return false
  705. }
  706. })
  707. })
  708. .catch(() => {
  709. return false
  710. })
  711. },
  712. revert() {
  713. this.$router.push({ path: 'tranManagementReceivingFeedback' })
  714. },
  715. getList() {
  716. seeCat({ id: this.deptBudgetList.id })
  717. .toPromise()
  718. .then((response) => {
  719. this.deptBudgetList = response
  720. // this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
  721. this.deptBudgetList.driver = response.tranCarInfoList[0].driver
  722. this.deptBudgetList.driverPhone =
  723. response.tranCarInfoList[0].driverPhone
  724. this.$set(
  725. this.deptBudgetList,
  726. 'sendDateStart',
  727. response.tranCarInfoList[0].sendDateStart
  728. )
  729. this.deptBudgetList.receiveDateEnd =
  730. response.tranCarInfoList[0].receiveDateEnd
  731. this.deptBudgetList.carModel = response.tranCarInfoList[0].carModel
  732. this.freightspace = response.tranCarInfoList
  733. for (var i = 0; i < this.freightspace.length; i++) {
  734. if (!this.freightspace[i].loadNetWeight) {
  735. this.freightspace[i].loadNetWeight = 0
  736. }
  737. }
  738. })
  739. },
  740. uploadSuccessHandle1(e, index) {
  741. this.freightspace[index].unloadPoundImg = e.url
  742. },
  743. },
  744. }
  745. </script>
  746. <style lang="scss" scoped>
  747. /deep/.totalStorage .el-input__inner {
  748. color: #afb5cb;
  749. background: #f5f7fa;
  750. }
  751. .small-title {
  752. position: relative;
  753. padding: 10px;
  754. font-weight: 600;
  755. }
  756. .small-title::before {
  757. position: absolute;
  758. content: '';
  759. display: block;
  760. background: #5473e8;
  761. width: 4px;
  762. height: 14px;
  763. left: 0px;
  764. top: 13px;
  765. }
  766. .position {
  767. position: relative;
  768. }
  769. .del {
  770. position: absolute;
  771. right: -38px;
  772. top: 14px;
  773. cursor: pointer;
  774. right: 0;
  775. display: inline-block;
  776. font-size: 26px;
  777. width: 26px;
  778. height: 10px;
  779. line-height: 0px;
  780. }
  781. .amap-page-container {
  782. width: 300px;
  783. height: 300px;
  784. }
  785. .el-form {
  786. padding: 0 10%;
  787. }
  788. /deep/.ws-info-table .el-form-item {
  789. border-right: 1px solid transparent;
  790. border-bottom: 1px solid transparent;
  791. }
  792. .readonly {
  793. position: relative;
  794. }
  795. .readonly:after {
  796. content: '*';
  797. color: #ff2727;
  798. position: absolute;
  799. right: 8px;
  800. z-index: 10;
  801. top: 21%;
  802. font-size: 20px;
  803. }
  804. .title {
  805. position: relative;
  806. }
  807. .title::before {
  808. content: '';
  809. display: inline-block;
  810. width: 5px;
  811. height: 30px;
  812. background: #5473e8;
  813. position: absolute;
  814. left: 0;
  815. }
  816. .el-button--primary {
  817. background-color: #5878e8;
  818. border-color: #5878e8;
  819. }
  820. .el-col {
  821. background: #f6f7fc;
  822. }
  823. /deep/.ws-info-table .el-form-item .el-form-item__content {
  824. padding: 0 25px;
  825. border-left: 1px solid transparent;
  826. background: #fff;
  827. }
  828. /deep/.ws-info-table .el-form-item .el-form-item__label {
  829. width: 100px;
  830. text-align: center;
  831. background: #fff;
  832. // border: 1px solid #cdd2dc;
  833. }
  834. .button-container {
  835. display: flex;
  836. flex-wrap: nowrap;
  837. justify-content: space-between;
  838. align-items: center;
  839. background-color: #fff;
  840. width: 100%;
  841. height: 50px;
  842. padding: 0 10px;
  843. & > div {
  844. margin-left: 10px;
  845. display: flex;
  846. flex-wrap: nowrap;
  847. flex-direction: row;
  848. & > span {
  849. line-height: 50px;
  850. }
  851. }
  852. /deep/.auditFlow-box {
  853. position: unset;
  854. margin-left: 10px;
  855. &/deep/.auditFlow-icon {
  856. width: auto;
  857. padding-right: 30px;
  858. }
  859. &/deep/.auditFlow-main {
  860. position: absolute;
  861. }
  862. }
  863. }
  864. .box-app {
  865. display: inline-block;
  866. float: left;
  867. margin-left: 30px;
  868. line-height: 50px;
  869. }
  870. /deep/.el-dialog {
  871. .el-form-item {
  872. margin-bottom: 0 !important;
  873. .el-input--medium {
  874. textarea {
  875. min-height: 100px !important;
  876. }
  877. }
  878. }
  879. }
  880. .collapse-bottom {
  881. margin-bottom: 20px;
  882. }
  883. .input-main .textarea .el-textarea__inner {
  884. width: 100%;
  885. z-index: 1;
  886. }
  887. .bg-left {
  888. padding-left: 30px;
  889. }
  890. .bg-right {
  891. padding-right: 10px;
  892. text-align: right;
  893. }
  894. .bg-bottom {
  895. margin: 15px 0px;
  896. }
  897. .wenzi {
  898. width: 900px;
  899. margin: 0 auto;
  900. }
  901. .wenzi h3 {
  902. display: inline-block;
  903. left: 10px;
  904. }
  905. .wenzi p {
  906. display: inline-block;
  907. }
  908. .center {
  909. width: 900px;
  910. margin: -70px auto;
  911. margin-right: 92px;
  912. }
  913. .wanhuo {
  914. width: 900px;
  915. margin: 0 auto;
  916. }
  917. .el-form-item {
  918. width: 50%;
  919. }
  920. .el-form-item__label {
  921. text-align: center;
  922. }
  923. .ce {
  924. width: 900px;
  925. margin: 0 auto;
  926. }
  927. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  928. /* height: 82px;*/
  929. /*}*/
  930. // 控制select为只读的时候显示样式
  931. .hide-sel {
  932. .el-input__inner {
  933. border: 0px;
  934. }
  935. .el-icon-arrow-up {
  936. display: none;
  937. }
  938. .el-textarea__inner {
  939. background-color: #fff !important;
  940. border: 0;
  941. }
  942. .el-date-editor {
  943. i {
  944. display: none;
  945. }
  946. }
  947. // .is-disabled {
  948. // .el-input__inner:hover {
  949. // background-color: #fff !important;
  950. // border: 0;
  951. // }
  952. // color: #606266;
  953. // .el-input__inner {
  954. // background-color: #fff !important;
  955. // border: 0;
  956. // color: #606266;
  957. // }
  958. // .el-textarea__inner {
  959. // background-color: #fff !important;
  960. // border: 0;
  961. // color: #606266;
  962. // }
  963. // }
  964. }
  965. // 控制select为只读的时候显示样式
  966. /deep/.ws-class-table-col {
  967. height: auto;
  968. padding: 0px 2px;
  969. /deep/.el-input__inner {
  970. padding: 0px 2px;
  971. }
  972. }
  973. // /deep/.is-disabled {
  974. // .el-input__prefix,
  975. // .el-input__suffix {
  976. // display: none;
  977. // }
  978. // .el-input__inner {
  979. // background-color: #fff;
  980. // border-color: #fff !important;
  981. // color: #000 !important;
  982. // font-size: 14px;
  983. // cursor: text;
  984. // padding: 0 !important;
  985. // }
  986. // }
  987. .winseaview-view {
  988. padding: 0 0 20px;
  989. }
  990. .container {
  991. overflow: scroll;
  992. height: 93vh;
  993. }
  994. .ws-info-table .el-form-item {
  995. width: 33.3333%;
  996. }
  997. .readonly:after {
  998. display: none;
  999. }
  1000. .el-textarea__inner {
  1001. display: none;
  1002. }
  1003. .el-form {
  1004. margin-top: 50px;
  1005. }
  1006. .readonly {
  1007. width: 16%;
  1008. }
  1009. //去边框
  1010. /deep/.el-form-item {
  1011. border-right: 0px;
  1012. border-bottom: 0px;
  1013. }
  1014. /deep/.ws-info-table {
  1015. border-left: 0px;
  1016. border-top: 0px;
  1017. }
  1018. .ws-info-table .el-form-item .el-form-item__content {
  1019. border: none;
  1020. }
  1021. /deep/.ws-info-table .el-form-item {
  1022. border: none;
  1023. height: 50px;
  1024. }
  1025. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1026. background: #f5f7fa;
  1027. border-radius: 4px;
  1028. border: 1px solid #d8dce6;
  1029. font-family: PingFangSC-Regular, PingFang SC;
  1030. margin-bottom: 5px;
  1031. background-color: #fff;
  1032. font-size: 14px;
  1033. font-weight: 400;
  1034. color: #8890b1;
  1035. line-height: 16px;
  1036. }
  1037. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1038. background-color: #fff;
  1039. font-size: 13px;
  1040. font-family: PingFangSC-Regular, PingFang SC;
  1041. font-weight: 400;
  1042. color: #8890b1;
  1043. line-height: 16px;
  1044. }
  1045. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1046. background: #f5f7fa;
  1047. border-radius: 4px;
  1048. border: 1px solid #d8dce6;
  1049. }
  1050. /deep/.flex .ws-info-table .el-form-item .el-form-item__content {
  1051. border: 0px;
  1052. }
  1053. .catNos {
  1054. width: 5%;
  1055. min-width: 60px;
  1056. height: 30px;
  1057. margin-top: 10px;
  1058. margin-left: 20px;
  1059. margin-right: -5px;
  1060. font-size: 14px;
  1061. }
  1062. .catNosCor {
  1063. color: #5473e8;
  1064. }
  1065. .add {
  1066. width: 130px;
  1067. height: 34px;
  1068. background: #f6f7fb;
  1069. border-radius: 17px;
  1070. color: #5473e8;
  1071. font-size: 14px;
  1072. border: none;
  1073. }
  1074. .add img {
  1075. display: inline-block;
  1076. margin-top: 3px;
  1077. margin-left: -30px;
  1078. }
  1079. .add .spans {
  1080. display: table-caption;
  1081. width: 56px;
  1082. height: 20px;
  1083. line-height: 18px;
  1084. }
  1085. .signStatus {
  1086. height: 25px;
  1087. border-radius: 3px;
  1088. border: 1px solid #5473e8;
  1089. padding: 0 3px;
  1090. color: #ffffff;
  1091. background: #c4cada;
  1092. line-height: 24px;
  1093. margin-left: 18px;
  1094. }
  1095. .signStatus1 {
  1096. height: 25px;
  1097. background: #e6ebff;
  1098. border-radius: 3px;
  1099. border: 1px solid #5473e8;
  1100. padding: 0 3px;
  1101. margin-left: 18px;
  1102. color: #5473e8;
  1103. line-height: 24px;
  1104. }
  1105. .line {
  1106. height: 26px;
  1107. margin-top: 6px;
  1108. left: 2px;
  1109. }
  1110. //卸车详情
  1111. /deep/.liaison .ws-info-table .el-form-item {
  1112. width: 15%;
  1113. }
  1114. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  1115. width: 50%;
  1116. min-width: 92px;
  1117. background: #f6f7fc;
  1118. }
  1119. /deep/.liaison .flex {
  1120. display: contents;
  1121. }
  1122. /deep/.liaison .ws-info-table {
  1123. background: #f6f7fc;
  1124. border-radius: 4px;
  1125. border: 1px solid #d8dce6;
  1126. margin-top: 20px;
  1127. }
  1128. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  1129. padding: 0px;
  1130. }
  1131. //联络员及车次
  1132. /deep/.lianluoyuan .ws-info-table .el-form-item {
  1133. width: 20%;
  1134. }
  1135. /deep/.lianluoyuan .ws-info-table .el-form-item .el-form-item__label {
  1136. width: 40%;
  1137. min-width: 92px;
  1138. background: #f6f7fc;
  1139. // padding-right: 28px;
  1140. margin-top: 5px;
  1141. }
  1142. /deep/.lianluoyuan .flex {
  1143. display: contents;
  1144. }
  1145. /deep/.lianluoyuan .ws-info-table {
  1146. background: #f6f7fc;
  1147. border-radius: 4px;
  1148. border: 1px solid #d8dce6;
  1149. margin-top: 20px;
  1150. }
  1151. /deep/.lianluoyuan .ws-info-table .el-form-item .el-form-item__content {
  1152. padding: 0px;
  1153. min-width: 110px;
  1154. margin-top: 5px;
  1155. }
  1156. //卸车状态
  1157. .noserviceout,
  1158. .noserviceout {
  1159. background: #c4cada;
  1160. color: #ffffff;
  1161. display: inline-block;
  1162. border-radius: 4px;
  1163. border: 1px solid #d8dce6;
  1164. padding: 2px;
  1165. font-size: 12px;
  1166. height: 23px;
  1167. margin-top: 11px;
  1168. margin-left: 53px;
  1169. }
  1170. .servicedout {
  1171. background: #e5f1f7;
  1172. color: #50cad4;
  1173. display: inline-block;
  1174. border-radius: 4px;
  1175. border: 1px solid #d8dce6;
  1176. padding: 2px;
  1177. font-size: 12px;
  1178. height: 23px;
  1179. margin-top: 11px;
  1180. margin-left: 53px;
  1181. }
  1182. /deep/.el-input--suffix .el-input__inner {
  1183. padding-right: 0;
  1184. }
  1185. //送达/未送达
  1186. .noservice,
  1187. .service {
  1188. display: inline-block;
  1189. border-radius: 4px;
  1190. border: 1px solid #d8dce6;
  1191. padding: 2px;
  1192. font-size: 12px;
  1193. }
  1194. .noservice {
  1195. background: #c4cada;
  1196. color: #ffffff;
  1197. }
  1198. .service {
  1199. background: #e5f1f7;
  1200. color: #50cad4;
  1201. }
  1202. </style>