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