123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059 |
- <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
- },
- },
- 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>
|