tranManagementFireFeedback.vue 32 KB

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