tranManagementFireFeedback.vue 36 KB

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