tranManagementFireFeedback.vue 35 KB

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