tranManagementShippingFeedback.vue 36 KB

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