tranManagementFireReceivingFeedback.vue 34 KB

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