tranManagementUnShippingFeedback.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322
  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: localStorage.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.toFixed(2)
  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.toFixed(2)
  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.flag='1'
  770. tranProcessInfo.id = this.deptBudgetList.id
  771. tranProcessInfo.infoId = this.deptBudgetList.infoId
  772. tranProcessInfo.processNo = this.deptBudgetList.processNo
  773. tranProcessInfo.tranCarInfoList = this.freightspace
  774. feedback(tranProcessInfo)
  775. .toPromise()
  776. .then((response) => {
  777. this.$message.success('提交成功')
  778. this.deptBudgetList = {}
  779. this.freightspace = {}
  780. this.selectedOptions = ''
  781. this.$router.push({
  782. path: 'tranManagementReceivingFeedback',
  783. })
  784. })
  785. } else {
  786. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  787. return false
  788. }
  789. })
  790. })
  791. .catch(() => {
  792. return false
  793. })
  794. },
  795. resetForm(deptBudgetList) {
  796. this.$refs[deptBudgetList].resetFields()
  797. },
  798. getList() {
  799. seeCat({ id: this.deptBudgetList.id })
  800. .toPromise()
  801. .then((response) => {
  802. this.deptBudgetList = response
  803. if(response.tranCarInfoList.length > 0){
  804. this.deptBudgetList.driver = response.tranCarInfoList[0].driver
  805. this.deptBudgetList.driverPhone =
  806. response.tranCarInfoList[0].driverPhone
  807. this.$set(
  808. this.deptBudgetList,
  809. 'sendDateStart',
  810. response.tranCarInfoList[0].sendDateStart
  811. )
  812. this.deptBudgetList.receiveDateEnd =
  813. response.tranCarInfoList[0].receiveDateEnd
  814. this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
  815. this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
  816. this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
  817. this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
  818. //上传附件计数
  819. if (this.deptBudgetList.tranCarInfoList[0].unloadPoundImg) {
  820. this.pictureTotal =
  821. this.deptBudgetList.tranCarInfoList[0].unloadPoundImg.split(
  822. ','
  823. ).length
  824. }
  825. this.freightspace = response.tranCarInfoList
  826. }
  827. for (var i = 0; i < this.freightspace.length; i++) {
  828. if (!this.freightspace[i].loadNetWeight) {
  829. this.freightspace[i].loadNetWeight = 0
  830. }
  831. }
  832. })
  833. //司机姓名下拉
  834. getstaff({ compId: localStorage.getItem('ws-pf_compId') })
  835. .toPromise()
  836. .then((response) => {
  837. this.options = response
  838. this.staffList = response
  839. }),
  840. //车型
  841. packList({ constId: 'TRAN5' })
  842. .toPromise()
  843. .then((response) => {
  844. this.carModel = response
  845. })
  846. },
  847. handleExamine() {},
  848. approve() {},
  849. selectChapterTwo(e) {
  850. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  851. if (this.ChapterTwoList[i].constValue == e) {
  852. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  853. }
  854. }
  855. },
  856. selectunitList(e) {
  857. for (var i = 0; i < this.unitList.length; i++) {
  858. if (this.unitList[i].constValue == e) {
  859. this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
  860. }
  861. }
  862. },
  863. selectgrade(e) {
  864. for (var i = 0; i < this.gradeList.length; i++) {
  865. if (this.gradeList[i].constValue == e) {
  866. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  867. }
  868. }
  869. },
  870. selectgoodsName(e) {
  871. for (var i = 0; i < this.goodnameList.length; i++) {
  872. if (this.goodnameList[i].constValue == e) {
  873. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  874. }
  875. }
  876. },
  877. selectpackingMethod(e) {
  878. for (var i = 0; i < this.packtypeList.length; i++) {
  879. if (this.packtypeList[i].constValue == e) {
  880. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  881. }
  882. }
  883. },
  884. uploadSuccessHandle1(e, index) {
  885. this.pictureTotal++
  886. if (this.deptBudgetList.tranCarInfoList[0].unloadPoundImg) {
  887. this.deptBudgetList.tranCarInfoList[0].unloadPoundImg += ',' + e.url
  888. } else {
  889. this.deptBudgetList.tranCarInfoList[0].unloadPoundImg = e.url
  890. }
  891. feedback(this.deptBudgetList)
  892. .toPromise()
  893. .then((response) => {})
  894. },
  895. },
  896. }
  897. </script>
  898. <style lang="scss" scoped>
  899. /deep/.totalStorage .el-input__inner {
  900. color: #afb5cb;
  901. background: #f5f7fa;
  902. }
  903. .small-title {
  904. position: relative;
  905. padding: 10px;
  906. font-weight: 600;
  907. }
  908. .small-title::before {
  909. position: absolute;
  910. content: '';
  911. display: block;
  912. background: #5473e8;
  913. width: 4px;
  914. height: 14px;
  915. left: 0px;
  916. top: 13px;
  917. }
  918. .position {
  919. position: relative;
  920. }
  921. .del {
  922. position: absolute;
  923. right: -38px;
  924. top: 14px;
  925. cursor: pointer;
  926. right: 0;
  927. display: inline-block;
  928. font-size: 26px;
  929. width: 26px;
  930. height: 10px;
  931. line-height: 0px;
  932. }
  933. .amap-page-container {
  934. width: 300px;
  935. height: 300px;
  936. }
  937. .el-form {
  938. padding: 0 15%;
  939. }
  940. /deep/.ws-info-table .el-form-item {
  941. border-right: 1px solid transparent;
  942. border-bottom: 1px solid transparent;
  943. }
  944. .readonly {
  945. position: relative;
  946. }
  947. .readonly:after {
  948. content: '*';
  949. color: #ff2727;
  950. position: absolute;
  951. right: 8px;
  952. z-index: 10;
  953. top: 21%;
  954. font-size: 20px;
  955. }
  956. .title {
  957. position: relative;
  958. }
  959. .title::before {
  960. content: '';
  961. display: inline-block;
  962. width: 5px;
  963. height: 30px;
  964. background: #5473e8;
  965. position: absolute;
  966. left: 0;
  967. }
  968. .el-button--primary {
  969. background-color: #5878e8;
  970. border-color: #5878e8;
  971. }
  972. .el-col {
  973. background: #f6f7fc;
  974. }
  975. /deep/.ws-info-table .el-form-item .el-form-item__content {
  976. padding: 0 25px;
  977. border-left: 1px solid transparent;
  978. background: #fff;
  979. }
  980. /deep/.ws-info-table .el-form-item .el-form-item__label {
  981. width: 100px;
  982. text-align: center;
  983. background: #fff;
  984. // border: 1px solid #cdd2dc;
  985. }
  986. .button-container {
  987. display: flex;
  988. flex-wrap: nowrap;
  989. justify-content: space-between;
  990. align-items: center;
  991. background-color: #fff;
  992. width: 100%;
  993. height: 50px;
  994. padding: 0 10px;
  995. & > div {
  996. margin-left: 10px;
  997. display: flex;
  998. flex-wrap: nowrap;
  999. flex-direction: row;
  1000. & > span {
  1001. line-height: 50px;
  1002. }
  1003. }
  1004. /deep/.auditFlow-box {
  1005. position: unset;
  1006. margin-left: 10px;
  1007. &/deep/.auditFlow-icon {
  1008. width: auto;
  1009. padding-right: 30px;
  1010. }
  1011. &/deep/.auditFlow-main {
  1012. position: absolute;
  1013. }
  1014. }
  1015. }
  1016. .box-app {
  1017. display: inline-block;
  1018. float: left;
  1019. margin-left: 30px;
  1020. line-height: 50px;
  1021. }
  1022. /deep/.el-dialog {
  1023. .el-form-item {
  1024. margin-bottom: 0 !important;
  1025. .el-input--medium {
  1026. textarea {
  1027. min-height: 100px !important;
  1028. }
  1029. }
  1030. }
  1031. }
  1032. .collapse-bottom {
  1033. margin-bottom: 20px;
  1034. }
  1035. .input-main .textarea .el-textarea__inner {
  1036. width: 100%;
  1037. z-index: 1;
  1038. }
  1039. .bg-left {
  1040. padding-left: 30px;
  1041. }
  1042. .bg-right {
  1043. padding-right: 10px;
  1044. text-align: right;
  1045. }
  1046. .bg-bottom {
  1047. margin: 15px 0px;
  1048. }
  1049. .wenzi {
  1050. width: 900px;
  1051. margin: 0 auto;
  1052. }
  1053. .wenzi h3 {
  1054. display: inline-block;
  1055. left: 10px;
  1056. }
  1057. .wenzi p {
  1058. display: inline-block;
  1059. }
  1060. .center {
  1061. width: 900px;
  1062. margin: 0 auto;
  1063. }
  1064. .el-form-item {
  1065. width: 50%;
  1066. }
  1067. .el-form-item__label {
  1068. text-align: center;
  1069. }
  1070. .ce {
  1071. width: 900px;
  1072. margin: 0 auto;
  1073. }
  1074. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1075. /* height: 82px;*/
  1076. /*}*/
  1077. // 控制select为只读的时候显示样式
  1078. .hide-sel {
  1079. .el-input__inner {
  1080. border: 0px;
  1081. }
  1082. .el-icon-arrow-up {
  1083. display: none;
  1084. }
  1085. .el-textarea__inner {
  1086. background-color: #fff !important;
  1087. border: 0;
  1088. }
  1089. .el-date-editor {
  1090. i {
  1091. display: none;
  1092. }
  1093. }
  1094. // .is-disabled {
  1095. // .el-input__inner:hover {
  1096. // background-color: #fff !important;
  1097. // border: 0;
  1098. // }
  1099. // color: #606266;
  1100. // .el-input__inner {
  1101. // background-color: #fff !important;
  1102. // border: 0;
  1103. // color: #606266;
  1104. // }
  1105. // .el-textarea__inner {
  1106. // background-color: #fff !important;
  1107. // border: 0;
  1108. // color: #606266;
  1109. // }
  1110. // }
  1111. }
  1112. // 控制select为只读的时候显示样式
  1113. /deep/.ws-class-table-col {
  1114. height: auto;
  1115. padding: 0px 2px;
  1116. /deep/.el-input__inner {
  1117. padding: 0px 2px;
  1118. }
  1119. }
  1120. // /deep/.is-disabled {
  1121. // .el-input__prefix,
  1122. // .el-input__suffix {
  1123. // display: none;
  1124. // }
  1125. // .el-input__inner {
  1126. // background-color: #fff;
  1127. // border-color: #fff !important;
  1128. // color: #000 !important;
  1129. // font-size: 14px;
  1130. // cursor: text;
  1131. // padding: 0 !important;
  1132. // }
  1133. // }
  1134. .winseaview-view {
  1135. padding: 0 0 20px;
  1136. }
  1137. .container {
  1138. overflow: scroll;
  1139. height: 93vh;
  1140. }
  1141. .ws-info-table .el-form-item {
  1142. width: 33.3333%;
  1143. }
  1144. .readonly:after {
  1145. display: none;
  1146. }
  1147. .el-textarea__inner {
  1148. display: none;
  1149. }
  1150. .el-form {
  1151. margin-top: 50px;
  1152. }
  1153. .readonly {
  1154. width: 16%;
  1155. }
  1156. //去边框
  1157. /deep/.el-form-item {
  1158. border-right: 0px;
  1159. border-bottom: 0px;
  1160. }
  1161. /deep/.ws-info-table {
  1162. border-left: 0px;
  1163. border-top: 0px;
  1164. }
  1165. .ws-info-table .el-form-item .el-form-item__content {
  1166. border: none;
  1167. }
  1168. /deep/.ws-info-table .el-form-item {
  1169. border: none;
  1170. height: 50px;
  1171. }
  1172. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1173. background: #f5f7fa;
  1174. border-radius: 4px;
  1175. border: 1px solid #d8dce6;
  1176. font-family: PingFangSC-Regular, PingFang SC;
  1177. margin-bottom: 5px;
  1178. background-color: #fff;
  1179. font-size: 14px;
  1180. font-weight: 400;
  1181. color: #8890b1;
  1182. line-height: 16px;
  1183. }
  1184. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1185. background-color: #fff;
  1186. font-size: 13px;
  1187. font-family: PingFangSC-Regular, PingFang SC;
  1188. font-weight: 400;
  1189. color: #8890b1;
  1190. line-height: 16px;
  1191. }
  1192. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1193. background: #f5f7fa;
  1194. border-radius: 4px;
  1195. border: 1px solid #d8dce6;
  1196. }
  1197. /deep/.flex .ws-info-table .el-form-item .el-form-item__content {
  1198. border: 0px;
  1199. }
  1200. //联络员及车次
  1201. /deep/.liaison .ws-info-table .el-form-item {
  1202. width: 20%;
  1203. }
  1204. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  1205. width: 50%;
  1206. background: #f6f7fc;
  1207. }
  1208. /deep/.liaison .flex {
  1209. display: contents;
  1210. }
  1211. /deep/.liaison .ws-info-table {
  1212. background: #f6f7fc;
  1213. border-radius: 4px;
  1214. border: 1px solid #d8dce6;
  1215. margin-top: 20px;
  1216. }
  1217. .catNos {
  1218. width: 100%;
  1219. height: 30px;
  1220. margin-top: 10px;
  1221. margin-left: 20px;
  1222. font-size: 14px;
  1223. }
  1224. .catNosCor {
  1225. color: #5473e8;
  1226. }
  1227. .add {
  1228. width: 130px;
  1229. height: 34px;
  1230. background: #f6f7fb;
  1231. border-radius: 17px;
  1232. color: #5473e8;
  1233. font-size: 14px;
  1234. border: none;
  1235. }
  1236. .add img {
  1237. display: inline-block;
  1238. margin-top: 3px;
  1239. margin-left: -30px;
  1240. }
  1241. .add .spans {
  1242. display: table-caption;
  1243. width: 56px;
  1244. height: 20px;
  1245. line-height: 18px;
  1246. }
  1247. .signStatus {
  1248. height: 25px;
  1249. border-radius: 3px;
  1250. border: 1px solid #5473e8;
  1251. padding: 0 3px;
  1252. color: #ffffff;
  1253. background: #c4cada;
  1254. line-height: 24px;
  1255. margin-left: 18px;
  1256. }
  1257. .signStatus1 {
  1258. height: 25px;
  1259. background: #e6ebff;
  1260. border-radius: 3px;
  1261. border: 1px solid #5473e8;
  1262. padding: 0 3px;
  1263. margin-left: 18px;
  1264. color: #5473e8;
  1265. line-height: 24px;
  1266. }
  1267. .line {
  1268. height: 26px;
  1269. margin-top: 6px;
  1270. left: 2px;
  1271. }
  1272. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  1273. padding: 0px;
  1274. }
  1275. //送达/未送达
  1276. .noservice,
  1277. .service {
  1278. display: inline-block;
  1279. border-radius: 4px;
  1280. border: 1px solid #d8dce6;
  1281. padding: 2px;
  1282. font-size: 12px;
  1283. }
  1284. .noservice {
  1285. background: #c4cada;
  1286. color: #ffffff;
  1287. }
  1288. .service {
  1289. background: #e5f1f7;
  1290. color: #50cad4;
  1291. }
  1292. .serviced {
  1293. display: inline-block;
  1294. border-radius: 4px;
  1295. border: 1px solid #d8dce6;
  1296. padding: 2px;
  1297. font-size: 12px;
  1298. background: #e5f1f7;
  1299. color: #2c81cf;
  1300. }
  1301. .center1 {
  1302. width: 100px;
  1303. margin: 0 auto;
  1304. margin-top: -2%;
  1305. }
  1306. .tupian {
  1307. margin-left: 14%;
  1308. margin-top: -7%;
  1309. }
  1310. </style>