tranManagementShippingFeedback.vue 37 KB

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