details.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. <template>
  2. <view class="wrap">
  3. <view>
  4. <view style='margin-left:10px;'>任务详情</view>
  5. <view class="content">
  6. <view class="row">
  7. <view class="left">任务编号</view>
  8. <view>{{detailData.processNo}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="left">货名</view>
  12. <view>{{detailData.goodsName}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="left">重量</view>
  16. <view>{{detailData.weight}}</view>
  17. </view>
  18. <view class="row">
  19. <view class="left">发货地址</view>
  20. <view>{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}</view>
  21. </view>
  22. <view class="row">
  23. <view class="left">发货人</view>
  24. <view>{{detailData.sender}}</view>
  25. </view>
  26. <view class="row">
  27. <view class="left">发货人电话</view>
  28. <view>{{detailData.senderPhone}}</view>
  29. </view>
  30. <view class="row">
  31. <view class="left">收货地址</view>
  32. <view>{{detailData.receivePrivate}}{{detailData.receiveCity}}{{detailData.receiveArea}}</view>
  33. </view>
  34. <view class="row">
  35. <view class="left">收货人</view>
  36. <view>{{detailData.receiver}}</view>
  37. </view>
  38. <view class="row">
  39. <view class="left">收货人电话</view>
  40. <view>{{detailData.receiverPhone}}</view>
  41. </view>
  42. <view class="row">
  43. <view class="left">发货日期</view>
  44. <view>{{detailData.deliveryDateStart}}</view>
  45. </view>
  46. <view class="row">
  47. <view class="left">最晚到货日期</view>
  48. <view>{{detailData.deliveryDateEnd}}</view>
  49. </view>
  50. <view class="row">
  51. <view class="left">合同编号</view>
  52. <view>{{detailData.contractNo}}</view>
  53. </view>
  54. <view class="row">
  55. <view class="left">运输方式</view>
  56. <view>{{detailData.tranType}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view>
  61. <view v-if='detailData.tranType=="火运"' style='margin-left:10px;'>联络员及车次</view>
  62. <view v-if='detailData.tranType=="火运"' class="content">
  63. <view class="row">
  64. <view class="left">姓名</view>
  65. <view>{{detailData.driver}}</view>
  66. </view>
  67. <view class="row">
  68. <view class="left">电话</view>
  69. <view>{{detailData.driverPhone}}</view>
  70. </view>
  71. <view class="row">
  72. <view class="left">发车日期</view>
  73. <view>
  74. <view @click='show1=true'>{{detailData.sendDateStart}}</view>
  75. <u-picker v-model="show1" mode="time" @confirm='dateChange($event)' :params="params">
  76. </u-picker>
  77. </view>
  78. </view>
  79. <view class="row">
  80. <view class="left">预计到站日期</view>
  81. <view>
  82. <view>{{detailData.receiveDateEnd}}</view>
  83. </view>
  84. </view>
  85. <view class="row">
  86. <view class="left">车型</view>
  87. <view>
  88. <view>{{detailData.carModel}}</view>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view v-if='detailData.tranType=="船运"' class="content">
  94. <view class="row">
  95. <view class="left">姓名</view>
  96. <view>{{detailData.driver}}</view>
  97. </view>
  98. <view class="row">
  99. <view class="left">电话</view>
  100. <view>{{detailData.driverPhone}}</view>
  101. </view>
  102. <view class="row">
  103. <view class="left">发船日期</view>
  104. <view>
  105. <view @click='show1=true'>{{detailData.sendDateStart}}</view>
  106. <u-picker v-model="show1" mode="time" @confirm='dateChange($event)' :params="params">
  107. </u-picker>
  108. </view>
  109. </view>
  110. <view class="row">
  111. <view class="left">预计到港日期</view>
  112. <view>
  113. <view>{{detailData.receiveDateEnd}}</view>
  114. </view>
  115. </view>
  116. <view class="row">
  117. <view class="left">船名</view>
  118. <view>
  119. <view>{{detailData.shipName}}</view>
  120. </view>
  121. </view>
  122. <view class="row">
  123. <view class="left">航次</view>
  124. <view>
  125. <view>{{detailData.shipNo}}</view>
  126. </view>
  127. </view>
  128. <view class="row">
  129. <view class="left">类型</view>
  130. <view>
  131. <view>{{detailData.shipType}}</view>
  132. </view>
  133. </view>
  134. <view v-if="detailData.shipType == '集装箱'" class="row">
  135. <view class="left">数量</view>
  136. <view>
  137. <view>{{detailData.boxNumber}}</view>
  138. </view>
  139. </view>
  140. </view>
  141. <view v-if='detailData.tranType=="火运"'>
  142. <view style='margin-left:10px;'>卸车详情</view>
  143. <view v-for='(item,index) in freightspace' class="content">
  144. <view class="row">
  145. <view class="left">车厢号-{{index+1}}</view>
  146. <view>{{item.boxNo}}</view>
  147. </view>
  148. <view class="row">
  149. <view class="left">装车净重</view>
  150. <view>{{item.loadNetWeight}}</view>
  151. </view>
  152. <view class="row">
  153. <view class="left">卸车净重</view>
  154. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
  155. <view style='text-align:right;' v-else>
  156. <input v-model='item.unloadNetWeight' class="right-bottom"
  157. placeholder="输入毛重"></input>
  158. </view>
  159. </view>
  160. <view class="row">
  161. <view class="left">磅单</view>
  162. <view v-if="item.status == '未装车' || item.status == '已送达'">
  163. <image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
  164. <view v-else>暂无图片</view>
  165. </view>
  166. <view v-else class="pound_list">
  167. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
  168. :size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
  169. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  170. </view>
  171. </view>
  172. <view class="row">
  173. <view class="left">卸车日期</view>
  174. <view>
  175. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadingDate}}</view>
  176. <view v-else @click='train(index)'>{{item.unloadingDate?item.unloadingDate:'请选择日期'}}</view>
  177. <u-picker v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,item)' :params="params">
  178. </u-picker>
  179. </view>
  180. </view>
  181. <view style='text-align:right;' v-if="item.status == '已装车' || item.status == '已送达'">{{item.status}}</view>
  182. <u-button v-else @click='submit(index,2)' type="success">保存</u-button>
  183. </view>
  184. </view>
  185. <view v-if='detailData.tranType=="汽运"'>
  186. <view style='margin-left:10px;'>卸车详情</view>
  187. <view v-for='(item,index) in freightspace' class="content">
  188. <view class="row">
  189. <view class="left">司机-{{index+1}}</view>
  190. <view v-if="item.status == '未装车'">未装车</view>
  191. <view v-if="item.status == '已装车'">未卸车</view>
  192. <view v-if="item.status == '已送达'">已卸车</view>
  193. </view>
  194. <view class="row">
  195. <view class="left">姓名</view>
  196. <view>{{item.driver}}</view>
  197. </view>
  198. <view class="row">
  199. <view class="left">司机电话</view>
  200. <view>{{item.driverPhone}}</view>
  201. </view>
  202. <view class="row">
  203. <view class="left">车牌号</view>
  204. <view>{{item.carNo}}</view>
  205. </view>
  206. <view class="row">
  207. <view class="left">装车净重</view>
  208. <view>{{item.loadNetWeight}}</view>
  209. </view>
  210. <view class="row">
  211. <view class="left">卸车净重</view>
  212. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
  213. <view style='text-align:right;' v-else>
  214. <input v-model='item.unloadNetWeight' class="right-bottom"
  215. placeholder="输入卸车净重"></input>
  216. </view>
  217. </view>
  218. <view class="row">
  219. <view class="left">卸车日期</view>
  220. <view>
  221. <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.receiveDateEnd}}</view>
  222. <view v-else @click='train(index)'>{{item.receiveDateEnd?item.receiveDateEnd:'请选择日期'}}</view>
  223. <u-picker v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange2($event,index)' :params="params">
  224. </u-picker>
  225. </view>
  226. </view>
  227. <view class="row">
  228. <view class="left">磅单</view>
  229. <view v-if="item.status == '未装车' || item.status == '已送达'">
  230. <image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
  231. <view v-else>暂无图片</view>
  232. </view>
  233. <view v-else class="pound_list">
  234. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
  235. :size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
  236. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  237. </view>
  238. </view>
  239. <view class="row">
  240. <view class="left">箱号</view>
  241. <view>{{item.caseNo}}</view>
  242. </view>
  243. <view class="row">
  244. <view class="left">封号</view>
  245. <view>{{item.titleNo}}</view>
  246. </view>
  247. <view v-if="item.signStatus == '未签合同'">未签合同</view>
  248. <view v-if="item.signStatus == '已签合同'">已签合同</view>
  249. <u-button v-if="item.status != '未装车' && item.status != '已送达'" @click='submit(index,1)' type="success">保存</u-button>
  250. </view>
  251. </view>
  252. <view v-if='detailData.tranType=="船运"'>
  253. <view style='margin-left:10px;'>卸船详情</view>
  254. <view v-for='(item,index) in freightspace' class="content">
  255. <view v-if="item.shipType == '集装箱'" class="row">
  256. <view class="left">集装箱-{{index+1}}</view>
  257. <view v-if="item.status == '未装车'">未装船</view>
  258. <view v-if="item.status == '已装车'">未卸船</view>
  259. <view v-if="item.status == '已送达'">已卸船</view>
  260. </view>
  261. <view v-if="item.shipType == '散船'" class="row">
  262. <view class="left">仓位号-{{index+1}}</view>
  263. <view v-if="item.status == '未装车'">未装船</view>
  264. <view v-if="item.status == '已装车'">未卸船</view>
  265. <view v-if="item.status == '已送达'">已卸船</view>
  266. </view>
  267. <view v-if="item.shipType == '集装箱'" class="row">
  268. <view class="left">箱号</view>
  269. <view style='text-align:right;'>
  270. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.caseNo}}</view>
  271. <input v-else placeholder="请输入箱号" v-model='item.caseNo' type="text">
  272. </view>
  273. </view>
  274. <view v-if="item.shipType == '集装箱'" class="row">
  275. <view class="left">封号</view>
  276. <view style='text-align:right;'>
  277. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.titleNo}}</view>
  278. <input v-else placeholder="请输入封号" v-model='item.titleNo' type="text">
  279. </view>
  280. </view>
  281. <view v-if="item.shipType == '散船'" class="row">
  282. <view class="left">仓位号</view>
  283. <view>
  284. <view>{{item.binNumber}}</view>
  285. </view>
  286. </view>
  287. <view v-if="item.shipType == '散船'" class="row">
  288. <view class="left">计划重量</view>
  289. <view>
  290. <view>{{item.positionWeight}}</view>
  291. </view>
  292. </view>
  293. <view class="row">
  294. <view class="left">装船净重</view>
  295. <view>{{item.loadNetWeight}}</view>
  296. </view>
  297. <view class="row">
  298. <view class="left">卸船净重</view>
  299. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
  300. <view style='text-align:right;' v-else>
  301. <input v-model='item.unloadNetWeight' class="right-bottom"
  302. placeholder="输入卸船净重"></input>
  303. </view>
  304. </view>
  305. <view class="row">
  306. <view class="left">卸船日期</view>
  307. <view>
  308. <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadingDate}}</view>
  309. <view v-else @click='train(index)'>{{item.unloadingDate?item.unloadingDate:'请选择日期'}}</view>
  310. <u-picker v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,index)' :params="params">
  311. </u-picker>
  312. </view>
  313. </view>
  314. <view style='text-align:right;' v-if="item.status == '未装车' || item.status == '已送达'">{{item.status}}</view>
  315. <u-button v-else @click='submit(index,3)' type="success">保存</u-button>
  316. </view>
  317. <view class="row">
  318. <view style='margin-left:10px;' class="left">运单</view>
  319. <view v-if="pictureTotal.length>0">
  320. <image v-for='item in pictureTotal' @click='shadeshow(item)' style='width:100px;height:100px;' :src="item" mode=""></image>
  321. </view>
  322. <view v-else>
  323. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
  324. :size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError" @on-remove="onRemove"
  325. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  326. </view>
  327. </view>
  328. </view>
  329. <view>合计吨:{{ total }}/{{ detailData.weight }}
  330. <text style='margin-left:10px;'
  331. class="noservice"
  332. v-show="detailData.receivingStatus == '执行中'">未完货</text>
  333. <text
  334. class="service"
  335. v-show="detailData.receivingStatus == '已完货'">{{ detailData.receivingStatus }}</text>
  336. </view>
  337. <view style='padding:10px;' class='flex bottom-btn'>
  338. <u-button @click='pass' type="error" class="btn1" hover-class='none'>提交</u-button>
  339. <u-button @click='finishedgoods' type="success" class="btn2">完货</u-button>
  340. </view>
  341. <view @click='imgShow=false' v-if="imgShow" class="shade">
  342. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  343. </view>
  344. </view>
  345. </template>
  346. <script>
  347. import upload from '@/components/upload.vue';
  348. import helper from '@/common/helper.js';
  349. export default {
  350. components: {
  351. upload
  352. },
  353. data() {
  354. return {
  355. id:'',
  356. show1: false,
  357. show2: false,
  358. currentPage: 1,
  359. pageSize: 10,
  360. show1:false,
  361. positionId: "",
  362. binNumber: "",
  363. maxSize: 50 * 1024 * 1024,
  364. status: '执行中',
  365. positionName: '',
  366. statusList: [
  367. {name:'执行中',value:1},
  368. {name:'已完货',value:2},
  369. {name:'全部任务',value:3},
  370. ],
  371. params: {
  372. year: true,
  373. month: true,
  374. day: true,
  375. },
  376. imgUrl:[],
  377. unloadPoundImg:'',
  378. action: this.$uploadUrl,
  379. freightspace:[],
  380. feedbackFlag:1,
  381. detailData:{},
  382. allWarehouse: [],
  383. pictureTotal:[],
  384. showTime: '',
  385. index:0,
  386. imgShow:false,
  387. url:''
  388. }
  389. },
  390. onLoad(options) {
  391. this.id = options.id
  392. },
  393. onShow() {
  394. this.getList()
  395. },
  396. computed: {
  397. total: function () {
  398. var maxStorage = 0
  399. if(this.detailData.tranCarInfoList){
  400. for (var i = 0; i < this.detailData.tranCarInfoList.length; i++) {
  401. maxStorage += Number(
  402. this.detailData.tranCarInfoList[i].unloadNetWeight
  403. )
  404. }
  405. }
  406. return maxStorage
  407. },
  408. },
  409. methods: {
  410. shadeshow(url){
  411. this.imgShow=true
  412. this.url=url
  413. },
  414. datecancel(){
  415. this.freightspace[this.index].show2 = true
  416. this.$forceUpdate();
  417. },
  418. submit(index,status){
  419. var that = this
  420. if(this.detailData.tranType=='火运'){
  421. if (!this.freightspace[index].unloadNetWeight) {
  422. this.$api.msg('卸车净重不能为空!')
  423. return
  424. }
  425. if (
  426. this.freightspace[index].unloadNetWeight < 0 ||
  427. this.freightspace[index].unloadNetWeight > 10000
  428. ) {
  429. this.$api.msg('卸车净重输入错误!')
  430. return
  431. }
  432. if (!this.freightspace[index].unloadNetWeight) {
  433. this.$api.msg('卸车日期不能为空!')
  434. return
  435. }
  436. var tranProcessInfo = {}
  437. tranProcessInfo.flag=0
  438. tranProcessInfo.id=that.freightspace[index].id
  439. tranProcessInfo.infoId = that.detailData.infoId
  440. tranProcessInfo.processId = that.detailData.id
  441. tranProcessInfo.driver = that.detailData.driver
  442. tranProcessInfo.driverPhone = that.detailData.driverPhone
  443. tranProcessInfo.tranCarNo = that.detailData.tranCarNo
  444. tranProcessInfo.carNo = that.detailData.carNo
  445. tranProcessInfo.unloadNetWeight = that.freightspace[index].unloadNetWeight
  446. tranProcessInfo.unloadingDate = that.freightspace[index].unloadingDate
  447. tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
  448. tranProcessInfo.tranType = status
  449. tranProcessInfo.contractNo = that.detailData.contractNo
  450. that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
  451. if (res.data.code == 200) {
  452. that.$api.msg('保存成功')
  453. that.detailData = {}
  454. that.freightspace = {}
  455. uni.navigateBack({})
  456. }
  457. })
  458. // }
  459. // }
  460. // })
  461. }else if(this.detailData.tranType=='船运'){
  462. if (this.freightspace[index].shipType == '集装箱'&&!this.freightspace[index].caseNo) {
  463. this.$api.msg('箱号不能为空!')
  464. return
  465. }
  466. if (
  467. this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].caseNo.length > 15 ||
  468. this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].caseNo.length < 1) {
  469. this.$api.msg('箱号输入错误!')
  470. return
  471. }
  472. if (this.freightspace[index].shipType == '集装箱'&&!this.freightspace[index].titleNo) {
  473. this.$api.msg('封号不能为空!')
  474. return
  475. }
  476. if (
  477. this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].titleNo.length > 15 ||
  478. this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].titleNo.length < 1
  479. ) {
  480. this.$api.msg('封号输入错误!')
  481. return
  482. }
  483. if (!this.freightspace[index].unloadNetWeight) {
  484. this.$api.msg('卸船净重不能为空!')
  485. return
  486. }
  487. if (
  488. this.freightspace[index].unloadNetWeight < 0 ||
  489. this.freightspace[index].unloadNetWeight > 10000
  490. ) {
  491. this.$api.msg('卸船净重输入错误!')
  492. return
  493. }
  494. if (!this.freightspace[index].unloadingDate) {
  495. this.$api.msg('卸船日期不能为空!')
  496. return
  497. }
  498. var tranProcessInfo = {}
  499. tranProcessInfo.flag=0
  500. tranProcessInfo.id=that.freightspace[index].id
  501. tranProcessInfo.infoId = that.detailData.infoId
  502. tranProcessInfo.processId = that.detailData.id
  503. tranProcessInfo.driver = that.detailData.driver
  504. tranProcessInfo.driverPhone = that.detailData.driverPhone
  505. tranProcessInfo.tranCarNo = that.detailData.tranCarNo
  506. tranProcessInfo.caseNo = that.freightspace[index].caseNo
  507. tranProcessInfo.titleNo = that.freightspace[index].titleNo
  508. tranProcessInfo.unloadNetWeight = that.freightspace[index].unloadNetWeight
  509. tranProcessInfo.unloadingDate = that.freightspace[index].unloadingDate
  510. tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
  511. tranProcessInfo.tranType = status
  512. tranProcessInfo.contractNo = that.detailData.contractNo
  513. that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
  514. if (res.data.code == 200) {
  515. that.$api.msg('保存成功')
  516. that.detailData = {}
  517. that.freightspace = {}
  518. uni.navigateBack({})
  519. }
  520. })
  521. }else if(this.detailData.tranType=='汽运'){
  522. if (!this.freightspace[index].driver) {
  523. that.$api.msg('司机姓名不能为空!')
  524. return
  525. }
  526. if (!this.freightspace[index].driverPhone) {
  527. that.$api.msg('司机电话不能为空!')
  528. return
  529. }
  530. if (!this.freightspace[index].carNo) {
  531. that.$api.msg('车牌号不能为空!')
  532. return
  533. }
  534. if (!this.freightspace[index].unloadNetWeight) {
  535. that.$api.msg('卸重不能为空!')
  536. return
  537. }
  538. var tranProcessInfo = {}
  539. tranProcessInfo.flag=0
  540. tranProcessInfo.id=that.freightspace[index].id
  541. tranProcessInfo.infoId = that.detailData.infoId
  542. tranProcessInfo.processId = that.detailData.id
  543. tranProcessInfo.driver = that.detailData.driver
  544. tranProcessInfo.driverPhone = that.detailData.driverPhone
  545. tranProcessInfo.tranCarNo = that.detailData.tranCarNo
  546. tranProcessInfo.carNo = that.freightspace[index].carNo
  547. tranProcessInfo.caseNo = that.freightspace[index].caseNo
  548. tranProcessInfo.titleNo = that.freightspace[index].titleNo
  549. tranProcessInfo.unloadNetWeight = that.freightspace[index].unloadNetWeight
  550. tranProcessInfo.receiveDateEnd = that.freightspace[index].receiveDateEnd
  551. tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
  552. tranProcessInfo.tranType = status
  553. tranProcessInfo.contractNo = that.detailData.contractNo
  554. that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
  555. if (res.data.code == 200) {
  556. that.$api.msg('保存成功')
  557. that.detailData = {}
  558. that.freightspace = {}
  559. uni.navigateBack()
  560. }
  561. })
  562. }
  563. },
  564. finishedgoods(){
  565. var that = this
  566. if(this.detailData.tranType=='火运'){
  567. uni.showModal({
  568. content: "完货操作后,装车信息不可修改,是否确定完货?",
  569. success(res) {
  570. if (res.confirm) {
  571. that.tranCarInfoList = that.freightspace
  572. that.tranCarInfoList.driver = that.detailData.driver
  573. that.tranCarInfoList.driverPhone = that.detailData.driverPhone
  574. that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
  575. that.tranCarInfoList.carNo = that.detailData.carNo
  576. that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
  577. that.tranCarInfoList.loadNetWeight = that.detailData.loadNetWeight
  578. that.tranCarInfoList.tranType = that.tranType
  579. that.tranCarInfoList.unloadPoundImg = that.detailData.unloadPoundImg
  580. // this.tranCarInfoList.boxNo = this.arr.toString()
  581. for (var i = 0; i < that.tranCarInfoList.length; i++) {
  582. that.tranCarInfoList[i].id = that.freightspace[i].id
  583. if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
  584. that.tranCarInfoList[i].temporaryDriverFlag = 1
  585. that.tranCarInfoList[i].tranType = that.tranType
  586. }
  587. }
  588. var tranProcessInfo = {}
  589. tranProcessInfo.id = that.detailData.id
  590. tranProcessInfo.weight = that.total
  591. tranProcessInfo.infoId = that.detailData.infoId
  592. tranProcessInfo.processNo = that.detailData.processNo
  593. tranProcessInfo.tranPrice = that.detailData.tranPrice
  594. tranProcessInfo.tranCarInfoList = that.tranCarInfoList
  595. that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
  596. if (res.data.code == 200) {
  597. that.$api.msg('提交成功')
  598. that.detailData = {}
  599. that.freightspace = {}
  600. setTimeout(function(){
  601. uni.navigateBack()
  602. },1000)
  603. }
  604. })
  605. }
  606. }
  607. })
  608. }else if(this.detailData.tranType=='船运'){
  609. uni.showModal({
  610. content: "完货操作后,装船信息不可修改,是否确定完货?",
  611. success(res) {
  612. if (res.confirm) {
  613. var tranProcessInfo = {}
  614. tranProcessInfo.id = that.detailData.id
  615. tranProcessInfo.weight = that.total
  616. that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
  617. if (res.data.code == 200) {
  618. that.$api.msg('提交成功')
  619. that.detailData = {}
  620. that.freightspace = {}
  621. setTimeout(function(){
  622. uni.navigateBack()
  623. },1000)
  624. }
  625. })
  626. }
  627. }
  628. })
  629. }else if(this.detailData.tranType=='汽运'){
  630. uni.showModal({
  631. content: "完货操作后,装车信息不可修改,是否确定完货?",
  632. success(res) {
  633. if (res.confirm) {
  634. var tranProcessInfo = {}
  635. tranProcessInfo.id = that.detailData.id
  636. tranProcessInfo.weight = that.total
  637. that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
  638. if (res.data.code == 200) {
  639. that.$api.msg('提交成功')
  640. that.detailData = {}
  641. that.freightspace = {}
  642. setTimeout(function(){
  643. uni.navigateBack()
  644. },1000)
  645. }
  646. })
  647. }
  648. }
  649. })
  650. }
  651. },
  652. pass(){
  653. var that = this
  654. if(this.detailData.tranType=='火运'){
  655. // for(var i=0;i<this.freightspace.length;i++){
  656. // if (!this.freightspace[i].unloadPoundImg) {
  657. // this.$api.msg('卸车净重不能为空!')
  658. // return
  659. // }
  660. // if (
  661. // this.freightspace[i].unloadPoundImg < 0 ||
  662. // this.freightspace[i].unloadPoundImg > 10000
  663. // ) {
  664. // this.$api.msg('装车净重输入错误!')
  665. // return
  666. // }
  667. // if (!this.freightspace[i].unloadingDate) {
  668. // this.$api.msg('装车日期不能为空!')
  669. // return
  670. // }
  671. // }
  672. uni.showModal({
  673. content: "提交成功后提醒司机及时签订运输合同,确定提交卸车信息?",
  674. success(res) {
  675. if (res.confirm) {
  676. that.tranCarInfoList = that.freightspace
  677. that.tranCarInfoList.driver = that.detailData.driver
  678. that.tranCarInfoList.driverPhone = that.detailData.driverPhone
  679. that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
  680. that.tranCarInfoList.carNo = that.detailData.carNo
  681. that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
  682. that.tranCarInfoList.unloadNetWeight = that.detailData.unloadNetWeight
  683. that.tranCarInfoList.tranType = that.tranType
  684. that.tranCarInfoList.loadPoundImg = that.detailData.loadPoundImg
  685. // this.tranCarInfoList.boxNo = this.arr.toString()
  686. for (var i = 0; i < that.tranCarInfoList.length; i++) {
  687. that.tranCarInfoList[i].id = that.freightspace[i].id
  688. if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
  689. that.tranCarInfoList[i].temporaryDriverFlag = 1
  690. that.tranCarInfoList[i].tranType = that.tranType
  691. }
  692. }
  693. var tranProcessInfo = {}
  694. tranProcessInfo.id = that.detailData.id
  695. tranProcessInfo.infoId = that.detailData.infoId
  696. tranProcessInfo.processNo = that.detailData.processNo
  697. tranProcessInfo.tranPrice = that.detailData.tranPrice
  698. tranProcessInfo.tranCarInfoList = that.tranCarInfoList
  699. that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
  700. if (res.data.code == 200) {
  701. that.$api.msg('提交成功')
  702. that.detailData = {}
  703. that.freightspace = {}
  704. setTimeout(function(){
  705. uni.navigateBack()
  706. },1000)
  707. }
  708. })
  709. }
  710. }
  711. })
  712. }else if(this.detailData.tranType=='船运'){
  713. for(var i=0;i<this.freightspace.length;i++){
  714. if (this.freightspace[i].loadNetWeight&&this.freightspace[i].loadNetWeight < 0 ||this.freightspace[i].loadNetWeight&&this.freightspace[i].loadNetWeight > 10000) {
  715. this.$api.msg('装船净重输入错误!')
  716. return
  717. }
  718. }
  719. uni.showModal({
  720. content: "提交成功后装船信息不可修改,是否确定提交?",
  721. success(res) {
  722. if (res.confirm) {
  723. that.tranCarInfoList = that.freightspace
  724. that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
  725. for (var i = 0; i < that.tranCarInfoList.length; i++) {
  726. that.tranCarInfoList[i].id = that.freightspace[i].id
  727. }
  728. var tranProcessInfo = {}
  729. tranProcessInfo.id = that.detailData.id
  730. tranProcessInfo.infoId = that.detailData.infoId
  731. tranProcessInfo.processNo = that.detailData.processNo
  732. tranProcessInfo.tranCarInfoList = that.tranCarInfoList
  733. that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
  734. if (res.data.code == 200) {
  735. that.$api.msg('提交成功')
  736. that.detailData = {}
  737. that.freightspace = {}
  738. setTimeout(function(){
  739. uni.navigateBack()
  740. },1000)
  741. }
  742. })
  743. }
  744. }
  745. })
  746. }else if(this.detailData.tranType=='汽运'){
  747. uni.showModal({
  748. content: "所有车辆完成卸车任务后,请及时修改任务状态,确定提交卸车信息?",
  749. success(res) {
  750. if (res.confirm) {
  751. that.tranCarInfoList = that.freightspace
  752. that.tranCarInfoList.driver = that.detailData.driver
  753. that.tranCarInfoList.driverPhone = that.detailData.driverPhone
  754. that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
  755. that.tranCarInfoList.carNo = that.detailData.carNo
  756. that.tranCarInfoList.unloadNetWeight = that.detailData.unloadNetWeight
  757. that.tranCarInfoList.tranType = that.tranType
  758. that.tranCarInfoList.unloadPoundImg = that.detailData.unloadPoundImg
  759. // this.tranCarInfoList.boxNo = this.arr.toString()
  760. for (var i = 0; i < that.tranCarInfoList.length; i++) {
  761. that.tranCarInfoList[i].id = that.freightspace[i].id
  762. if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
  763. that.tranCarInfoList[i].temporaryDriverFlag = 1
  764. that.tranCarInfoList[i].tranType = that.tranType
  765. }
  766. }
  767. var tranProcessInfo = {}
  768. tranProcessInfo.id = that.detailData.id
  769. tranProcessInfo.infoId = that.detailData.infoId
  770. tranProcessInfo.processNo = that.detailData.processNo
  771. tranProcessInfo.tranPrice = that.detailData.tranPrice
  772. tranProcessInfo.tranCarInfoList = that.tranCarInfoList
  773. that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
  774. if (res.data.code == 200) {
  775. that.$api.msg('提交成功')
  776. that.detailData = {}
  777. that.freightspace = {}
  778. setTimeout(function(){
  779. uni.navigateBack()
  780. },1000)
  781. }
  782. })
  783. }
  784. }
  785. })
  786. }
  787. },
  788. getList() {
  789. this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
  790. id:this.id
  791. }).then(res => {
  792. if (res.data.code == 200) {
  793. this.detailData = res.data.data
  794. if(res.data.data.tranType=='火运'){
  795. if(res.data.data.tranCarInfoList.length>0){
  796. if(res.data.data.tranCarInfoList[0].driver){
  797. this.detailData.driver = res.data.data.tranCarInfoList[0].driver
  798. }
  799. for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
  800. res.data.data.tranCarInfoList[i].show2=false
  801. }
  802. this.detailData.driverPhone =res.data.data.tranCarInfoList[0].driverPhone
  803. this.$set(this.detailData,'sendDateStart',res.data.data.tranCarInfoList[0].sendDateStart)
  804. this.detailData.receiveDateEnd =
  805. res.data.data.tranCarInfoList[0].receiveDateEnd
  806. this.detailData.carModel = res.data.data.tranCarInfoList[0].carModel
  807. this.freightspace=res.data.data.tranCarInfoList
  808. }
  809. }else if(res.data.data.tranType=='汽运'){
  810. for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
  811. res.data.data.tranCarInfoList[i].show2=false
  812. this.imgUrl.push({url:res.data.data.tranCarInfoList[i].unloadPoundImg.split(",")[i]})
  813. }
  814. this.freightspace=res.data.data.tranCarInfoList
  815. }else if(res.data.data.tranType=='船运'){
  816. if (res.data.data.tranCarInfoList.length > 0) {
  817. for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
  818. res.data.data.tranCarInfoList[i].show2=false
  819. }
  820. this.detailData.driver = res.data.data.tranCarInfoList[0].driver
  821. this.detailData.driverPhone =
  822. res.data.data.tranCarInfoList[0].driverPhone
  823. this.$set(
  824. this.detailData,
  825. 'sendDateStart',
  826. res.data.data.tranCarInfoList[0].sendDateStart
  827. )
  828. this.detailData.receiveDateEnd =
  829. res.data.data.tranCarInfoList[0].receiveDateEnd
  830. this.detailData.shipName = res.data.data.tranCarInfoList[0].shipName
  831. this.detailData.shipNo = res.data.data.tranCarInfoList[0].shipNo
  832. this.detailData.shipType = res.data.data.tranCarInfoList[0].shipType
  833. this.detailData.boxNumber = res.data.data.tranCarInfoList[0].boxNumber
  834. //上传附件计数
  835. if(this.detailData.tranCarInfoList[0].unloadPoundImg){
  836. this.pictureTotal = this.detailData.tranCarInfoList[0].unloadPoundImg.split(",")
  837. }
  838. this.freightspace = res.data.data.tranCarInfoList
  839. }
  840. }
  841. }
  842. })
  843. },
  844. getImgUrl(res1,res2,res3,res4) {
  845. // debugger
  846. this.freightspace[res4].unloadPoundImg=res1
  847. // this.detailData.addressUrl = res
  848. // console.log(res)
  849. // console.log('------------res-----------')
  850. },
  851. getImgUrl1(res1,res2,res3,res4){
  852. console.log(res1,res2,res3,res4)
  853. if (this.freightspace[0].unloadPoundImg) {
  854. this.freightspace[0].unloadPoundImg += ',' + res1
  855. } else {
  856. this.freightspace[0].unloadPoundImg = res1
  857. }
  858. },
  859. setImgUrl(val){
  860. // debugger
  861. for(let i = 0;i<freightspace.length;i++){
  862. }
  863. },
  864. filterFileType(index, lists) {
  865. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  866. lists.splice(index, 1);
  867. // 当前文件不支持
  868. uni.showModal({
  869. title: '暂不支持当前图片类型',
  870. showCancel: false
  871. });
  872. } else {
  873. this.isAdd = false;
  874. }
  875. },
  876. dateChange(e) {
  877. this.detailData.sendDateStart = e.year + "-" + e.month + "-" + e.day
  878. },
  879. train(index){
  880. console.log(index)
  881. // debugger
  882. this.freightspace[index].show2 = true
  883. this.$forceUpdate();
  884. this.index=index
  885. },
  886. dateChange1(e){
  887. this.$set(this.freightspace[this.index],'unloadingDate',e.year + "-" + e.month + "-" + e.day)
  888. },
  889. dateChange2(e){
  890. this.$set(this.freightspace[this.index],'receiveDateEnd',e.year + "-" + e.month + "-" + e.day)
  891. },
  892. statuschange(e) {
  893. this.status = this.statusList[e[0]].name
  894. this.getList()
  895. },
  896. goDetail(val) {
  897. uni.navigateTo({
  898. url: '/pages/erp/deliveryfeedback/details?id=' + val.id,
  899. })
  900. }
  901. }
  902. }
  903. </script>
  904. <style scoped lang="scss">
  905. uni-page-body {
  906. overflow: hidden;
  907. }
  908. .content{
  909. margin:10px 0;
  910. }
  911. .wrap {
  912. margin: 10rpx;
  913. padding: 20rpx 20rpx 240rpx 20rpx;
  914. .top {
  915. display: flex;
  916. margin-bottom: 20rpx;
  917. .top-left {
  918. margin-right: 20rpx;
  919. }
  920. }
  921. }
  922. .bottom-btn {
  923. width: 100%;
  924. position: fixed;
  925. bottom:0;
  926. display: flex;
  927. z-index: 2;
  928. left: 0;
  929. background-color: #f8f8f8;
  930. flex-direction: column;
  931. .btn1,.btn2{
  932. width: 100%;
  933. margin-bottom: 26rpx;
  934. border-radius: 90rpx;
  935. }
  936. .btn1{
  937. background: white;
  938. color: #00C265;
  939. }
  940. }
  941. .content,
  942. .content1,
  943. .content2 {
  944. border-radius: 20rpx;
  945. background: white;
  946. padding: 20rpx;
  947. .title {
  948. font-size: 28rpx;
  949. font-weight: 600;
  950. color: #333333;
  951. }
  952. .row {
  953. display: flex;
  954. justify-content: space-between;
  955. // border-bottom: 1px solid #EEEEEE;
  956. padding: 21rpx 0;
  957. .right,
  958. input {
  959. font-size: 28rpx;
  960. color: #333333;
  961. }
  962. }
  963. .row-bottom {
  964. // border: 0;
  965. .right-bottom {
  966. width: 280rpx;
  967. text-align: right;
  968. }
  969. }
  970. }
  971. .content1 {
  972. margin-top: 20rpx;
  973. }
  974. .content2 {
  975. margin-top: 10px;
  976. // display: flex;
  977. align-items: center;
  978. .left {
  979. margin-right: 20px;
  980. width: 300rpx;
  981. }
  982. }
  983. // .left {
  984. // margin-right: 20px;
  985. // width: 300rpx;
  986. // }
  987. .pound_list{
  988. width: 452rpx;
  989. display: flex;
  990. justify-content: flex-end;
  991. text-align: right;
  992. }
  993. .submit {
  994. width: 40%;
  995. background: #22C572;
  996. border-radius: 10rpx;
  997. }
  998. .edit-btn {
  999. background: #22C572;
  1000. width: 100rpx;
  1001. height: 50rpx;
  1002. margin: 0;
  1003. color: white;
  1004. }
  1005. .has-btn {
  1006. align-items: center;
  1007. }
  1008. .shade{
  1009. background:#000;
  1010. position:fixed;
  1011. top:0;left:0;
  1012. width:100%;height:100%;
  1013. z-index:10000;
  1014. }
  1015. // .bottom-btn {
  1016. // padding: 30rpx;
  1017. // background: #FFFFFF;
  1018. // width: 92%;
  1019. // position: fixed;
  1020. // bottom: 0rpx;
  1021. // display: flex;
  1022. // z-index: 9999;
  1023. // }
  1024. </style>