tranManagementTransporFeedback.vue 36 KB

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