tranManagementFireReceivingFeedback.vue 34 KB

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