tranManagementUnShippingFeedback.vue 35 KB

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