1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057 |
- <template>
- <view class="wrap">
- <view>
- <view style='margin-left:10px;'>任务详情</view>
- <view class="content">
- <view class="row">
- <view class="left">任务编号</view>
- <view>{{detailData.processNo}}</view>
- </view>
- <view class="row">
- <view class="left">货名</view>
- <view>{{detailData.goodsName}}</view>
- </view>
- <view class="row">
- <view class="left">重量</view>
- <view>{{detailData.weight}}</view>
- </view>
- <view class="row">
- <view class="left">发货地址</view>
- <view>{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}</view>
- </view>
- <view class="row">
- <view class="left">发货人</view>
- <view>{{detailData.sender}}</view>
- </view>
- <view class="row">
- <view class="left">发货人电话</view>
- <view>{{detailData.senderPhone}}</view>
- </view>
- <view class="row">
- <view class="left">收货地址</view>
- <view>{{detailData.receivePrivate}}{{detailData.receiveCity}}{{detailData.receiveArea}}</view>
- </view>
- <view class="row">
- <view class="left">收货人</view>
- <view>{{detailData.receiver}}</view>
- </view>
- <view class="row">
- <view class="left">收货人电话</view>
- <view>{{detailData.receiverPhone}}</view>
- </view>
- <view class="row">
- <view class="left">发货日期</view>
- <view>{{detailData.deliveryDateStart}}</view>
- </view>
- <view class="row">
- <view class="left">最晚到货日期</view>
- <view>{{detailData.deliveryDateEnd}}</view>
- </view>
- <view class="row">
- <view class="left">合同编号</view>
- <view>{{detailData.contractNo}}</view>
- </view>
- <view class="row">
- <view class="left">运输方式</view>
- <view>{{detailData.tranType}}</view>
- </view>
- </view>
- </view>
-
- <view>
- <view v-if='detailData.tranType=="火运"' style='margin-left:10px;'>联络员及车次</view>
- <view v-if='detailData.tranType=="火运"' class="content">
- <view class="row">
- <view class="left">姓名</view>
- <view>{{detailData.driver}}</view>
- </view>
- <view class="row">
- <view class="left">电话</view>
- <view>{{detailData.driverPhone}}</view>
- </view>
- <view class="row">
- <view class="left">发车日期</view>
- <view>
- <view @click='show1=true'>{{detailData.sendDateStart}}</view>
- <u-picker v-model="show1" mode="time" @confirm='dateChange($event)' :params="params">
- </u-picker>
- </view>
- </view>
- <view class="row">
- <view class="left">预计到站日期</view>
- <view>
- <view>{{detailData.receiveDateEnd}}</view>
- </view>
- </view>
- <view class="row">
- <view class="left">车型</view>
- <view>
- <view>{{detailData.carModel}}</view>
- </view>
- </view>
- </view>
- </view>
-
- <view v-if='detailData.tranType=="船运"' class="content">
- <view class="row">
- <view class="left">姓名</view>
- <view>{{detailData.driver}}</view>
- </view>
- <view class="row">
- <view class="left">电话</view>
- <view>{{detailData.driverPhone}}</view>
- </view>
- <view class="row">
- <view class="left">发船日期</view>
- <view>
- <view @click='show1=true'>{{detailData.sendDateStart}}</view>
- <u-picker :mask-close-able='false' v-model="show1" mode="time" @confirm='dateChange($event)' :params="params">
- </u-picker>
- </view>
- </view>
- <view class="row">
- <view class="left">预计到港日期</view>
- <view>
- <view>{{detailData.receiveDateEnd}}</view>
- </view>
- </view>
- <view class="row">
- <view class="left">船名</view>
- <view>
- <view>{{detailData.shipName}}</view>
- </view>
- </view>
- <view class="row">
- <view class="left">航次</view>
- <view>
- <view>{{detailData.shipNo}}</view>
- </view>
- </view>
- <view class="row">
- <view class="left">类型</view>
- <view>
- <view>{{detailData.shipType}}</view>
- </view>
- </view>
- <view v-if="detailData.shipType == '集装箱'" class="row">
- <view class="left">数量</view>
- <view>
- <view>{{detailData.boxNumber}}</view>
- </view>
- </view>
- </view>
- <view v-if='detailData.tranType=="火运"'>
- <view style='margin-left:10px;'>装车详情</view>
- <view v-for='(item,index) in freightspace' class="content">
- <view class="row">
- <view class="left">车厢-{{index+1}}</view>
- <view v-if="item.status == '' ||item.status == null ||item.status == '未装车'">未装车</view>
- <view v-if="item.status == '已装车' ||item.status == '已送达'">已装车</view>
- </view>
- <view class="row">
- <view class="left">车厢号</view>
- <view>{{item.boxNo}}</view>
- </view>
- <view class="row">
- <view class="left">装车净重</view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.loadNetWeight' class="right-bottom"
- placeholder="输入毛重"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">磅单</view>
- <view v-if="item.status == '已装车' || item.status == '已送达'" v-for="(items,count) in item.imgUrl">
- <view class="pound_list1">
- <image v-if="items.url" @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;margin: 0rpx;' :src="items.url" mode=""></image>
- <view v-else>暂无图片</view>
- </view>
- </view>
- <view v-if="item.status == '未装车'" class="pound_list">
- <!-- <image v-if="item.loadPoundImg" @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;' :src="item.loadPoundImg" mode=""></image> -->
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="item.imgUrl"
- :size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
- @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
- </view>
- </view>
- <view class="row">
- <view class="left">装车日期</view>
- <view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadingDate}}</view>
- <view v-else @click='train(index)'>{{item.loadingDate?item.loadingDate:'请选择日期'}}</view>
- <u-picker :mask-close-able='false' v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,item)' :params="params">
- </u-picker>
- </view>
- </view>
- <view style='text-align:right;' v-if="item.status == '已装车' || item.status == '已送达'">{{item.status}}</view>
- <u-button v-else @click='submit(index,2)' type="success">保存</u-button>
- </view>
- </view>
- <view v-if='detailData.tranType=="汽运"'>
- <view style='margin-left:10px;'>装车详情</view>
- <view v-for='(item,index) in freightspace' class="content">
- <view class="row">
- <view class="left">司机-{{index+1}}</view>
- <view>{{item.status}}</view>
- </view>
- <view class="row">
- <view class="left">姓名</view>
- <view>{{item.driver}}</view>
- </view>
- <view class="row">
- <view class="left">司机电话</view>
- <view>{{item.driverPhone}}</view>
- </view>
- <view class="row">
- <view class="left">车牌号</view>
- <view>{{item.carNo}}</view>
- </view>
- <view class="row">
- <view class="left">装车净重</view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.loadNetWeight' class="right-bottom"
- placeholder="输入毛重"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">装车日期</view>
- <view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadingDate}}</view>
- <view v-else @click='train(index)'>{{item.loadingDate?item.loadingDate:'请选择日期'}}</view>
- <u-picker :mask-close-able='false' v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,index)' :params="params">
- </u-picker>
- </view>
- </view>
- <view class="row">
- <view class="left">磅单</view>
- <view v-if="item.loadPoundImg">
- <image style='width:100px;height:100px;' @click='shadeshow(item.loadPoundImg)' :src="item.loadPoundImg" mode=""></image>
- </view>
- <view v-else class="pound_list">
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="item.imgUrl"
- :size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
- @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
- </view>
- </view>
- <view class="row">
- <view class="left">箱号</view>
- <view>{{item.caseNo}}</view>
- </view>
- <view class="row">
- <view class="left">封号</view>
- <view>{{item.titleNo}}</view>
- </view>
- <view v-if="item.signStatus == '未签合同'">未签合同</view>
- <view v-if="item.signStatus == '已签合同'">已签合同</view>
- <u-button v-if="item.status != '已装车' && item.status != '已送达'" @click='submit(index,1)' type="success">保存</u-button>
- </view>
- </view>
- <view v-if='detailData.tranType=="船运"'>
- <view style='margin-left:10px;'>装船详情</view>
- <view v-for='(item,index) in freightspace' class="content">
- <view v-if="item.shipType == '集装箱'" class="row">
- <view class="left">集装箱-{{index+1}}</view>
- <view v-if="item.status == '未装车'">未装船</view>
- <view v-if="item.status == '已装车'">未卸船</view>
- <view v-if="item.status == '已送达'">已卸船</view>
- </view>
- <view v-if="item.shipType == '散船'" class="row">
- <view class="left">仓位号-{{index+1}}</view>
- <view v-if="item.status == '未装车'">未装船</view>
- <view v-if="item.status == '已装车'">未卸船</view>
- <view v-if="item.status == '已送达'">已卸船</view>
- </view>
- <view v-if="item.shipType == '集装箱'" class="row">
- <view class="left">箱号</view>
- <view style='text-align:right;'>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.caseNo}}</view>
- <input v-else placeholder="请输入箱号" v-model='item.caseNo' type="text">
- </view>
- </view>
- <view v-if="item.shipType == '集装箱'" class="row">
- <view class="left">封号</view>
- <view style='text-align:right;'>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.titleNo}}</view>
- <input v-else placeholder="请输入封号" v-model='item.titleNo' type="text">
- </view>
- </view>
- <view v-if="item.shipType == '散船'" class="row">
- <view class="left">仓位号</view>
- <view>
- <view>{{item.binNumber}}</view>
- </view>
- </view>
- <view v-if="item.shipType == '散船'" class="row">
- <view class="left">计划重量</view>
- <view>
- <view>{{item.positionWeight}}</view>
- </view>
- </view>
- <view class="row">
- <view class="left">装船净重</view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.loadNetWeight' class="right-bottom"
- placeholder="输入毛重"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">装船日期</view>
- <view>
- <view v-if="item.status == '已装车' || item.status == '已送达'">{{item.loadingDate}}</view>
- <view v-else @click='train(index)'>{{item.loadingDate?item.loadingDate:'请选择日期'}}</view>
- <u-picker :mask-close-able='false' v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,index)' :params="params">
- </u-picker>
- </view>
- </view>
- <!-- <view style='text-align:right;' v-if="item.status == '已装车'">未装船</view>
- <view style='text-align:right;' v-else-if="item.status == '已送达'">已装船</view> -->
- <u-button v-if="item.status == '未装车'" @click='submit(index,3)' type="success">保存</u-button>
- </view>
- <view class="row">
- <view style='margin-left:10px;' class="left">运单</view>
- <view v-if="pictureTotal.length>0">
- <image v-for='item in pictureTotal' @click='shadeshow(item)' style='width:100px;height:100px;margin:5px;' :src="item" mode=""></image>
- </view>
- <view >
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
- :size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError" @on-remove="onRemove"
- @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
- </view>
- </view>
- </view>
- <view>合计吨:{{ total }}/{{ detailData.weight }}
- <text style='margin-left:10px;'
- class="noservice"
- v-show="detailData.receivingStatus == '执行中'">未完货</text>
- <text
- class="service"
- v-show="detailData.receivingStatus == '已完货'">{{ detailData.receivingStatus }}</text>
- </view>
- <view style='padding:10px;' class='flex bottom-btn'>
- <u-button @click='pass' type="error" class="btn1" hover-class='none'>提交</u-button>
- <u-button @click='finishedgoods' type="success" class="btn2">完货</u-button>
- </view>
- <view @click='imgShow=false' v-if="imgShow" class="shade">
- <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
- </view>
- </view>
- </template>
- <script>
- import upload from '@/components/upload.vue';
- import helper from '@/common/helper.js';
- export default {
- components: {
- upload
- },
- data() {
- return {
- id:'',
- show1: false,
- show2: false,
- currentPage: 1,
- pageSize: 10,
- show1:false,
- positionId: "",
- binNumber: "",
- maxSize: 50 * 1024 * 1024,
- status: '执行中',
- positionName: '',
- pictureTotal:[],
- statusList: [
- {name:'执行中',value:1},
- {name:'已完货',value:2},
- {name:'全部任务',value:3},
- ],
- params: {
- year: true,
- month: true,
- day: true,
- },
- imgUrl:[],
- unloadPoundImg:'',
- action: this.$uploadUrl,
- freightspace:[
- {
- imgUrl:[],
- }
- ],
- feedbackFlag:1,
- detailData:{},
- allWarehouse: [],
- showTime: '',
- index:0,
- imgShow:false,
- url:''
- }
- },
- onLoad(options) {
- this.id = options.id
- },
- onShow() {
- this.getList()
- },
- computed: {
- total: function () {
- var maxStorage = 0
- if(this.detailData.tranCarInfoList){
- for (var i = 0; i < this.detailData.tranCarInfoList.length; i++) {
- maxStorage += Number(this.detailData.tranCarInfoList[i].loadNetWeight)
- }
- }
- return maxStorage.toFixed(2)
- },
- },
- methods: {
- shadeshow(url){
- this.imgShow=true
- this.url=url
- },
- datecancel(){
- this.freightspace[this.index].show2=true
- this.$forceUpdate();
- },
- getImgUrl1(res1,res2,res3,res4){
- console.log(res1,res2,res3,res4)
- if (this.freightspace[0].loadPoundImg) {
- this.freightspace[0].loadPoundImg += ',' + res1
- } else {
- this.freightspace[0].loadPoundImg = res1
- }
- },
- submit(index,status){
- var that = this
- if(this.detailData.tranType=='火运'){
- if (!this.freightspace[index].loadNetWeight) {
- this.$api.msg('装车净重不能为空!')
- return
- }
- if (
- this.freightspace[index].loadNetWeight < 0 ||
- this.freightspace[index].loadNetWeight > 10000
- ) {
- this.$api.msg('装车净重输入错误!')
- return
- }
- if (!this.freightspace[index].loadingDate) {
- this.$api.msg('装车日期不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag=0
- tranProcessInfo.id=that.freightspace[index].id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processId = that.detailData.id
- tranProcessInfo.driver = that.detailData.driver
- tranProcessInfo.driverPhone = that.detailData.driverPhone
- tranProcessInfo.tranCarNo = that.detailData.tranCarNo
- tranProcessInfo.carNo = that.detailData.carNo
- tranProcessInfo.loadNetWeight = that.freightspace[index].loadNetWeight
- tranProcessInfo.loadingDate = that.freightspace[index].loadingDate
- tranProcessInfo.loadPoundImg = that.freightspace[index].loadPoundImg
- tranProcessInfo.tranType = status
- tranProcessInfo.contractNo = that.detailData.contractNo
- that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- that.$api.msg('保存成功')
- that.detailData = {}
- that.freightspace = {}
- uni.navigateBack({})
- }
- })
- // }
- // }
- // })
- }else if(this.detailData.tranType=='船运'){
- if (this.freightspace[index].shipType == '集装箱'&&!this.freightspace[index].caseNo) {
- this.$api.msg('箱号不能为空!')
- return
- }
- if (
- this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].caseNo.length > 15 ||
- this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].caseNo.length < 1) {
- this.$api.msg('箱号输入错误!')
- return
- }
- if (this.freightspace[index].shipType == '集装箱'&&!this.freightspace[index].titleNo) {
- this.$api.msg('封号不能为空!')
- return
- }
- if (
- this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].titleNo.length > 15 ||
- this.freightspace[index].shipType == '集装箱'&&this.freightspace[index].titleNo.length < 1
- ) {
- this.$api.msg('封号输入错误!')
- return
- }
- if (!this.freightspace[index].loadNetWeight) {
- this.$api.msg('装船净重不能为空!')
- return
- }
- if (
- this.freightspace[index].loadNetWeight < 0 ||
- this.freightspace[index].loadNetWeight > 10000
- ) {
- this.$api.msg('装船净重输入错误!')
- return
- }
- if (!this.freightspace[index].loadingDate) {
- this.$api.msg('装船日期不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag=0
- tranProcessInfo.id=that.freightspace[index].id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processId = that.detailData.id
- tranProcessInfo.driver = that.detailData.driver
- tranProcessInfo.driverPhone = that.detailData.driverPhone
- tranProcessInfo.tranCarNo = that.detailData.tranCarNo
- tranProcessInfo.caseNo = that.freightspace[index].caseNo
- tranProcessInfo.titleNo = that.freightspace[index].titleNo
- tranProcessInfo.loadNetWeight = that.freightspace[index].loadNetWeight
- tranProcessInfo.loadingDate = that.freightspace[index].loadingDate
- tranProcessInfo.loadPoundImg = that.freightspace[index].loadPoundImg
- tranProcessInfo.tranType = status
- tranProcessInfo.contractNo = that.detailData.contractNo
- that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- that.$api.msg('保存成功')
- that.detailData = {}
- that.freightspace = {}
- uni.navigateBack({})
- }
- })
- }else if(this.detailData.tranType=='汽运'){
- if (!this.freightspace[index].driver) {
- that.$api.msg('司机姓名不能为空!')
- return
- }
- if (!this.freightspace[index].driverPhone) {
- that.$api.msg('司机电话不能为空!')
- return
- }
- if (!this.freightspace[index].carNo) {
- that.$api.msg('车牌号不能为空!')
- return
- }
- if (!this.freightspace[index].loadNetWeight) {
- that.$api.msg('装载净重不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag=0
- tranProcessInfo.id=that.freightspace[index].id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processId = that.detailData.id
- tranProcessInfo.driver = that.detailData.driver
- tranProcessInfo.driverPhone = that.detailData.driverPhone
- tranProcessInfo.tranCarNo = that.detailData.tranCarNo
- tranProcessInfo.carNo = that.freightspace[index].carNo
- tranProcessInfo.caseNo = that.freightspace[index].caseNo
- tranProcessInfo.titleNo = that.freightspace[index].titleNo
- tranProcessInfo.loadNetWeight = that.freightspace[index].loadNetWeight
- tranProcessInfo.sendDateStart = that.freightspace[index].sendDateStart
- tranProcessInfo.loadPoundImg = that.freightspace[index].loadPoundImg
- tranProcessInfo.tranType = status
- tranProcessInfo.contractNo = that.detailData.contractNo
- that.$api.doRequest('post', '/tranCarInfo/api/feedbackTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- that.$api.msg('保存成功')
- that.detailData = {}
- that.freightspace = {}
- uni.navigateBack({})
- }
- })
- }
- },
- finishedgoods(){
- var that = this
- if(this.detailData.tranType=='火运'){
- uni.showModal({
- content: "完货操作后,装车信息不可修改,是否确定完货?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- that.tranCarInfoList = that.freightspace
- that.tranCarInfoList.driver = that.detailData.driver
- that.tranCarInfoList.driverPhone = that.detailData.driverPhone
- that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
- that.tranCarInfoList.carNo = that.detailData.carNo
- that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
- that.tranCarInfoList.loadNetWeight = that.detailData.loadNetWeight
- that.tranCarInfoList.tranType = that.tranType
- that.tranCarInfoList.loadPoundImg = that.detailData.loadPoundImg
- // this.tranCarInfoList.boxNo = this.arr.toString()
- for (var i = 0; i < that.tranCarInfoList.length; i++) {
- that.tranCarInfoList[i].id = that.freightspace[i].id
- if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
- that.tranCarInfoList[i].temporaryDriverFlag = 1
- that.tranCarInfoList[i].tranType = that.tranType
- }
- }
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processNo = that.detailData.processNo
- tranProcessInfo.tranPrice = that.detailData.tranPrice
- tranProcessInfo.tranCarInfoList = that.tranCarInfoList
- that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('完货成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }
- })
- }
- }
- })
- }else if(this.detailData.tranType=='船运'){
- uni.showModal({
- content: "完货操作后,装船信息不可修改,是否确定完货?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('完货成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }
- })
- }
- }
- })
- }else if(this.detailData.tranType=='汽运'){
- uni.showModal({
- content: "完货操作后,装车信息不可修改,是否确定完货?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('完货成功')
- that.detailData = {}
- that.freightspace = {}
- uni.navigateBack({})
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }
- })
- }
- }
- })
- }
- },
- pass(){
-
- var that = this
- if(this.detailData.tranType=='火运'){
- for(var i=0;i<this.freightspace.length;i++){
- if (!this.freightspace[i].loadNetWeight) {
- this.$api.msg('装车净重不能为空!')
- return
- }
- if (
- this.freightspace[i].loadNetWeight < 0 ||
- this.freightspace[i].loadNetWeight > 10000
- ) {
- this.$api.msg('装车净重输入错误!')
- return
- }
- if (!this.freightspace[i].loadingDate) {
- this.$api.msg('装车日期不能为空!')
- return
- }
- }
- uni.showModal({
- content: "提交成功后提醒司机及时签订运输合同,确定提交装车信息?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- that.tranCarInfoList = that.freightspace
- that.tranCarInfoList.driver = that.detailData.driver
- that.tranCarInfoList.driverPhone = that.detailData.driverPhone
- that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
- that.tranCarInfoList.carNo = that.detailData.carNo
- that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
- that.tranCarInfoList.loadNetWeight = that.detailData.loadNetWeight
- that.tranCarInfoList.tranType = that.tranType
- that.tranCarInfoList.loadPoundImg = that.detailData.loadPoundImg
- // this.tranCarInfoList.boxNo = this.arr.toString()
- for (var i = 0; i < that.tranCarInfoList.length; i++) {
- that.tranCarInfoList[i].id = that.freightspace[i].id
- if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
- that.tranCarInfoList[i].temporaryDriverFlag = 1
- that.tranCarInfoList[i].tranType = that.tranType
- }
- }
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processNo = that.detailData.processNo
- tranProcessInfo.tranPrice = that.detailData.tranPrice
- tranProcessInfo.tranCarInfoList = that.tranCarInfoList
- that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('提交成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }
- })
- }
- }
- })
- }else if(this.detailData.tranType=='船运'){
- for(var i=0;i<this.freightspace.length;i++){
- if (this.freightspace[i].loadNetWeight&&this.freightspace[i].loadNetWeight < 0 ||this.freightspace[i].loadNetWeight&&this.freightspace[i].loadNetWeight > 10000) {
- this.$api.msg('装船净重输入错误!')
- return
- }
- }
- uni.showModal({
- content: "提交成功后装船信息不可修改,是否确定提交?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- that.tranCarInfoList = that.freightspace
- that.tranCarInfoList[0].sendDateStart = that.detailData.sendDateStart
- for (var i = 0; i < that.tranCarInfoList.length; i++) {
- that.tranCarInfoList[i].id = that.freightspace[i].id
- }
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processNo = that.detailData.processNo
- tranProcessInfo.tranCarInfoList = that.tranCarInfoList
- that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('提交成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }else{
- uni.hideLoading()
- that.$api.msg('系统异常,请联系管理员')
- }
- })
- }
- }
- })
- }else if(this.detailData.tranType=='汽运'){
- uni.showModal({
- content: "提交成功后提醒司机及时签订运输合同,确定提交装车信息?",
- success(res) {
- if (res.confirm) {
- uni.showLoading({title: '加载中'});
- that.tranCarInfoList = that.freightspace
- that.tranCarInfoList.driver = that.detailData.driver
- that.tranCarInfoList.driverPhone = that.detailData.driverPhone
- that.tranCarInfoList.tranCarNo = that.detailData.tranCarNo
- that.tranCarInfoList.carNo = that.detailData.carNo
- that.tranCarInfoList.loadNetWeight = that.detailData.loadNetWeight
- that.tranCarInfoList.tranType = that.tranType
- that.tranCarInfoList.loadPoundImg = that.detailData.loadPoundImg
- // this.tranCarInfoList.boxNo = this.arr.toString()
- for (var i = 0; i < that.tranCarInfoList.length; i++) {
- that.tranCarInfoList[i].id = that.freightspace[i].id
- if (that.tranCarInfoList[i].temporaryDriverFlag != 0) {
- that.tranCarInfoList[i].temporaryDriverFlag = 1
- that.tranCarInfoList[i].tranType = that.tranType
- }
- }
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.infoId = that.detailData.infoId
- tranProcessInfo.processNo = that.detailData.processNo
- tranProcessInfo.tranPrice = that.detailData.tranPrice
- tranProcessInfo.tranCarInfoList = that.tranCarInfoList
- that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- that.$api.msg('提交成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000);
- }else{
- uni.hideLoading()
- that.$api.msg('系统异常,请联系管理员')
- }
- })
- }
- }
- })
- }
- },
- getList() {
- this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
- id:this.id
- }).then(res => {
- if (res.data.code == 200) {
- this.detailData = res.data.data
- if(res.data.data.tranType=='火运'){
- if(res.data.data.tranCarInfoList.length>0){
- if(res.data.data.tranCarInfoList[0].driver){
- this.detailData.driver = res.data.data.tranCarInfoList[0].driver
- }
- this.detailData.driverPhone =res.data.data.tranCarInfoList[0].driverPhone
- this.$set(this.detailData,'sendDateStart',res.data.data.tranCarInfoList[0].sendDateStart)
- this.detailData.receiveDateEnd =
- res.data.data.tranCarInfoList[0].receiveDateEnd
- this.detailData.carModel = res.data.data.tranCarInfoList[0].carModel
- this.freightspace=res.data.data.tranCarInfoList
- for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
- this.imgUrl = []
- res.data.data.tranCarInfoList[i].show2=false
- let imgs = res.data.data.tranCarInfoList[i].loadPoundImg.split(",")
- for(let j = 0 ; j < imgs.length ; j++){
- this.imgUrl.push({url:imgs[j]})
- }
- this.freightspace[i].imgUrl = this.imgUrl
- }
- }
- }else if(res.data.data.tranType=='汽运'){
- for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
- res.data.data.tranCarInfoList[i].show2=false
- }
- this.freightspace=res.data.data.tranCarInfoList
-
- }else if(res.data.data.tranType=='船运'){
- if (res.data.data.tranCarInfoList.length > 0) {
- for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
- res.data.data.tranCarInfoList[i].show2=false
- }
- this.detailData.driver = res.data.data.tranCarInfoList[0].driver
- this.detailData.driverPhone =
- res.data.data.tranCarInfoList[0].driverPhone
- this.$set(
- this.detailData,
- 'sendDateStart',
- res.data.data.tranCarInfoList[0].sendDateStart
- )
- this.detailData.receiveDateEnd =
- res.data.data.tranCarInfoList[0].receiveDateEnd
- this.detailData.shipName = res.data.data.tranCarInfoList[0].shipName
- this.detailData.shipNo = res.data.data.tranCarInfoList[0].shipNo
- this.detailData.shipType = res.data.data.tranCarInfoList[0].shipType
- this.detailData.boxNumber = res.data.data.tranCarInfoList[0].boxNumber
- //上传附件计数
- if(this.detailData.tranCarInfoList[0].loadPoundImg){
- this.pictureTotal = this.detailData.tranCarInfoList[0].loadPoundImg.split(",")
- }
- this.freightspace = res.data.data.tranCarInfoList
- }
-
- }
-
- }
- })
- },
- getImgUrl(res1,res2,res3,res4) {
- this.freightspace[res4].loadPoundImg=res1
- // this.detailData.addressUrl = res
- // console.log(res)
- // console.log('------------res-----------')
- },
- setImgUrl(val){
- for(let i = 0;i<freightspace.length;i++){
-
- }
- },
- filterFileType(index, lists) {
- if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
- lists.splice(index, 1);
- // 当前文件不支持
- uni.showModal({
- title: '暂不支持当前图片类型',
- showCancel: false
- });
- } else {
- this.isAdd = false;
- }
- },
- dateChange(e) {
- this.detailData.sendDateStart = e.year + "-" + e.month + "-" + e.day
- },
- train(index){
- console.log(index)
-
- this.freightspace[index].show2=true
- this.$forceUpdate();
- this.index=index
- },
- dateChange1(e){
- this.$set(this.freightspace[this.index],'loadingDate',e.year + "-" + e.month + "-" + e.day)
- },
- dateChange2(e){
- this.$set(this.freightspace[this.index],'sendDateStart',e.year + "-" + e.month + "-" + e.day)
- },
- statuschange(e) {
- this.status = this.statusList[e[0]].name
- this.getList()
- },
- goDetail(val) {
- uni.navigateTo({
- url: '/pages/erp/deliveryfeedback/details?data=' + JSON.stringify(val),
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- uni-page-body {
- overflow: hidden;
- }
- .content{
- margin:10px 0;
- }
- .wrap {
- margin: 10rpx;
- padding: 20rpx 20rpx 300rpx 20rpx;
-
- .top {
- display: flex;
- margin-bottom: 20rpx;
-
- .top-left {
- margin-right: 20rpx;
- }
- }
- }
- .bottom-btn {
- width: 100%;
- position: fixed;
- bottom:0;
- display: flex;
- z-index: 2;
- left: 0;
- background-color: #f8f8f8;
- flex-direction: column;
- .btn1,.btn2{
- width: 100%;
- margin-bottom: 26rpx;
- border-radius: 90rpx;
- }
- .btn1{
- background: white;
- color: #00C265;
- }
- }
- .content,
- .content1,
- .content2 {
- border-radius: 20rpx;
- background: white;
- padding: 20rpx;
-
- .title {
- font-size: 28rpx;
- font-weight: 600;
- color: #333333;
- }
-
- .row {
- display: flex;
- justify-content: space-between;
- // border-bottom: 1px solid #EEEEEE;
- padding: 21rpx 0;
-
- .right,
- input {
- font-size: 28rpx;
- color: #333333;
- }
- }
-
- .row-bottom {
-
- // border: 0;
- .right-bottom {
- width: 280rpx;
- text-align: right;
- }
- }
- }
-
- .content1 {
- margin-top: 20rpx;
- }
-
- .content2 {
- margin-top: 10px;
- // display: flex;
- align-items: center;
-
- .left {
- margin-right: 20px;
- }
- }
-
- .submit {
- width: 40%;
- background: #22C572;
- border-radius: 10rpx;
- }
-
- .edit-btn {
- background: #22C572;
- width: 100rpx;
- height: 50rpx;
- margin: 0;
- color: white;
- }
-
- .has-btn {
- align-items: center;
- }
-
- // .bottom-btn {
- // padding: 30rpx;
- // background: #FFFFFF;
- // width: 92%;
- // position: fixed;
- // bottom: 0rpx;
- // display: flex;
- // z-index: 9999;
- // }
- .shade{
- background:#000;
- position:fixed;
- top:0;left:0;
- width:100%;height:100%;
- z-index:10000;
- }
- .pound_list{
- width: 452rpx;
- display: flex;
- justify-content: flex-end;
- text-align: right;
- }
- </style>
|