tranManagementUnShippingFeedback.vue 36 KB

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