12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187 |
- <template>
- <view class="wrap">
- <view>
- <view class='flex' style='margin-left:10px;justify-content: space-between;align-items: center;'>
- <view>任务详情</view>
- <view>
- <u-search placeholder="输入车牌号" bg-color='#F2F6FA ' shape='square' v-model="carNo" @change='carchange' @custom='search' @clear='clearsearch' :show-action="true"></u-search></view>
- </view>
- <view class='flex' style='margin-left:10px;align-items: center;'>
- <view :class='status1=="0"?"active":""' class='statusitem' @click='statuschange1("0")'>全部</view>
- <view :class='status1=="2"?"active":""' class='statusitem' @click='statuschange1("2")'>未装车</view>
- <view :class='status1=="1"?"active":""' class='statusitem' @click='statuschange1("1")'>已装车</view>
- <view :class='status1=="3"?"active":""' class='statusitem' @click='statuschange1("3")'>已送达</view>
- </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 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 style='text-align:right;' v-if="item.status == '未装车'">{{item.status}}</view>
- <view style='text-align:right;' v-else-if="item.status == '已送达'">已卸车</view>
- </view>
- <view class="row">
- <view class="left">车厢号</view>
- <view>{{item.boxNo}}</view>
- </view>
- <view class="row">
- <view class="left">装车净重</view>
- <view>{{item.loadNetWeight}}</view>
- </view>
- <view class="row">
- <view class="left">卸车净重</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.unloadNetWeight' class="right-bottom"
- placeholder="输入卸车净重"></input>
- </view>
- </view>
- <view v-if="detailData.priceType!=null&&detailData.priceType=='随行就市'" class="row">
- <view class="left">单价(元/吨)</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.contractPrice}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.contractPrice' class="right-bottom"
- placeholder="输入单价"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">磅单</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">
- <image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
- <view v-else>暂无图片</view>
- </view>
- <view v-else class="pound_list">
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
- :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.unloadingDate}}</view>
- <view v-else @click='train(index)'>{{item.unloadingDate?item.unloadingDate:'请选择日期'}}</view>
- <u-picker v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange1($event,item)' :params="params">
- </u-picker>
- </view>
- </view>
- <u-button v-if="item.status == '已装车'" @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 v-if="item.status == '未装车'">未装车</view>
- <view v-if="item.status == '已装车'">未卸车</view>
- <view v-if="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>{{item.loadNetWeight}}</view>
- </view>
- <view class="row">
- <view class="left">卸车净重</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.unloadNetWeight' class="right-bottom"
- placeholder="输入卸车净重"></input>
- </view>
- </view>
- <view v-if="detailData.priceType!=null&&detailData.priceType=='随行就市'" class="row">
- <view class="left">单价(元/吨)</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.contractPrice}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.contractPrice' class="right-bottom"
- placeholder="输入单价"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">卸车日期</view>
- <view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.receiveDateEnd}}</view>
- <view v-else @click='train(index)'>{{item.receiveDateEnd?item.receiveDateEnd:'请选择日期'}}</view>
- <u-picker v-model="item.show2" mode="time" @cancel='datecancel()' @confirm='dateChange2($event,index)' :params="params">
- </u-picker>
- </view>
- </view>
- <view class="row">
- <view class="left">磅单</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">
- <image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
- <view v-else>暂无图片</view>
- </view>
- <view v-else class="pound_list">
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
- :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>{{item.loadNetWeight}}</view>
- </view>
- <view class="row">
- <view class="left">卸船净重</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.unloadNetWeight' class="right-bottom"
- placeholder="输入卸船净重"></input>
- </view>
- </view>
- <view v-if="detailData.priceType!=null&&detailData.priceType=='随行就市'" class="row">
- <view class="left">单价(元/吨)</view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.contractPrice}}</view>
- <view style='text-align:right;' v-else>
- <input v-model='item.contractPrice' class="right-bottom"
- placeholder="输入单价"></input>
- </view>
- </view>
- <view class="row">
- <view class="left">卸船日期</view>
- <view>
- <view v-if="item.status == '未装车' || item.status == '已送达'">{{item.unloadingDate}}</view>
- <view v-else @click='train(index)'>{{item.unloadingDate?item.unloadingDate:'请选择日期'}}</view>
- <u-picker 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 == '未装车' || item.status == '已送达'">{{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;' :src="item" mode=""></image>
- </view>
- <view v-else>
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
- :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,
- carNo:'',
- currentPage: 1,
- pageSize: 10,
- show1:false,
- positionId: "",
- binNumber: "",
- maxSize: 50 * 1024 * 1024,
- status: '执行中',
- status1:'0',
- positionName: '',
- statusList: [
- {name:'执行中',value:1},
- {name:'已完货',value:2},
- {name:'全部任务',value:3},
- ],
- params: {
- year: true,
- month: true,
- day: true,
- },
- imgUrl:[],
- unloadPoundImg:'',
- action: this.$uploadUrl,
- freightspace:[],
- feedbackFlag:1,
- detailData:{},
- allWarehouse: [],
- pictureTotal:[],
- showTime: '',
- index:0,
- imgShow:false,
- url:''
- }
- },
- onLoad(options) {
- this.id = options.id
- this.getList()
- },
- onShow() {
- },
- 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].unloadNetWeight
- )
- }
- }
- return maxStorage
- },
- },
- methods: {
- search(e){
- this.getList()
- },
- clearsearch(){
-
- },
- carchange(){
- if(this.carNo==''){
- this.freightspace=this.detailData.tranCarInfoList
- }
- },
- statuschange1(status){
- this.status1=status
- if(status==0){
- if(this.carNo==''){
- this.freightspace=this.detailData.tranCarInfoList
- }else{
- this.freightspace=this.detailData.carInfoList
- }
-
- }else if(status==1){
- if(this.carNo==''){
- var arr=this.detailData.tranCarInfoList
- }else{
- var arr=this.detailData.carInfoList
- }
- this.freightspace=arr.filter((item)=>{return item.status=='已装车'})
- }else if(status==2){
- if(this.carNo==''){
- var arr=this.detailData.tranCarInfoList
- }else{
- var arr=this.detailData.carInfoList
- }
- this.freightspace=arr.filter((item)=>{return item.status=='未装车'})
- }
- else if(status==3){
- if(this.carNo==''){
- var arr=this.detailData.tranCarInfoList
- }else{
- var arr=this.detailData.carInfoList
- }
- this.freightspace=arr.filter((item)=>{return item.status=='已送达'})
- }
- if(this.detailData.tranType=="汽运"){
- for (var i = 0; i < this.freightspace.length; i++) {
- this.imgUrl[i]=[]
- this.freightspace[i].show2=false
- if(this.freightspace[i].unloadPoundImg){
- if(this.freightspace[i].unloadPoundImg){
- var arr1=this.freightspace[i].unloadPoundImg.split(",")
- for (var q = 0; q < arr1.length; q++) {
- if(arr1[q]!=''){
- this.imgUrl[i].push({url:arr1[q]})
- }
- }
- }
- }
- }
- }
-
- },
- shadeshow(url){
- this.imgShow=true
- this.url=url
- },
- datecancel(){
- this.freightspace[this.index].show2 = true
- this.$forceUpdate();
- },
- submit(index,status){
- var that = this
- if(this.detailData.tranType=='火运'){
- if (!this.freightspace[index].unloadNetWeight) {
- this.$api.msg('卸车净重不能为空!')
- return
- }
- if (
- this.freightspace[index].unloadNetWeight < 0 ||
- this.freightspace[index].unloadNetWeight > 10000
- ) {
- this.$api.msg('卸车净重输入错误!')
- return
- }
- if (!this.freightspace[index].unloadNetWeight) {
- this.$api.msg('卸车日期不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag='1'
- 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.unloadNetWeight = that.freightspace[index].unloadNetWeight
- tranProcessInfo.unloadingDate = that.freightspace[index].unloadingDate
- tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
- 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].unloadNetWeight) {
- this.$api.msg('卸船净重不能为空!')
- return
- }
- if (
- this.freightspace[index].unloadNetWeight < 0 ||
- this.freightspace[index].unloadNetWeight > 10000
- ) {
- this.$api.msg('卸船净重输入错误!')
- return
- }
- if (!this.freightspace[index].unloadingDate) {
- this.$api.msg('卸船日期不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag='1'
- 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.unloadNetWeight = that.freightspace[index].unloadNetWeight
- tranProcessInfo.unloadingDate = that.freightspace[index].unloadingDate
- tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
- 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].unloadNetWeight) {
- that.$api.msg('卸重不能为空!')
- return
- }
- var tranProcessInfo = {}
- tranProcessInfo.flag='1'
- 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.unloadNetWeight = that.freightspace[index].unloadNetWeight
- tranProcessInfo.receiveDateEnd = that.freightspace[index].receiveDateEnd
- tranProcessInfo.unloadPoundImg = that.freightspace[index].unloadPoundImg
- tranProcessInfo.contractPrice = that.freightspace[index].contractPrice
- 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) {
- 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.unloadPoundImg = that.detailData.unloadPoundImg
- // 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.weight = that.total
- 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) {
- 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) {
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.weight = that.total
- that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- 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) {
- var tranProcessInfo = {}
- tranProcessInfo.id = that.detailData.id
- tranProcessInfo.weight = that.total
- that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- that.$api.msg('提交成功')
- that.detailData = {}
- that.freightspace = {}
- 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].unloadPoundImg) {
- // this.$api.msg('卸车净重不能为空!')
- // return
- // }
- // if (
- // this.freightspace[i].unloadPoundImg < 0 ||
- // this.freightspace[i].unloadPoundImg > 10000
- // ) {
- // this.$api.msg('装车净重输入错误!')
- // return
- // }
- // if (!this.freightspace[i].unloadingDate) {
- // this.$api.msg('装车日期不能为空!')
- // return
- // }
- // }
- uni.showModal({
- content: "提交成功后提醒司机及时签订运输合同,确定提交卸车信息?",
- success(res) {
- if (res.confirm) {
- 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.unloadNetWeight = that.detailData.unloadNetWeight
- 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.flag = 1
- 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) {
- 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) {
- 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.flag = 1
- tranProcessInfo.processNo = that.detailData.processNo
- tranProcessInfo.tranCarInfoList = that.tranCarInfoList
- that.$api.doRequest('post', '/tranProcessInfo/api/insertTranCar', tranProcessInfo).then(res => {
- if (res.data.code == 200) {
- 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) {
- 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.unloadNetWeight = that.detailData.unloadNetWeight
- that.tranCarInfoList.tranType = that.tranType
- that.tranCarInfoList.unloadPoundImg = that.detailData.unloadPoundImg
- // 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.flag = 1
- 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) {
- that.$api.msg('提交成功')
- that.detailData = {}
- that.freightspace = {}
- setTimeout(function(){
- uni.navigateBack()
- },1000)
-
- }
- })
- }
- }
- })
- }
- },
- getList() {
- this.imgUrl=[]
- uni.showLoading({
- title:'加载中'
- })
- this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
- id:this.id,
- carNo:this.carNo,
- }).then(res => {
- if (res.data.code == 200) {
- uni.hideLoading()
- 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
- }
- for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
- res.data.data.tranCarInfoList[i].show2=false
- }
- 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
- if(this.carNo){
- this.freightspace=res.data.data.carInfoList
- }else{
- this.freightspace=res.data.data.tranCarInfoList
- }
- }
- }else if(res.data.data.tranType=='汽运'){
- var arr=this.carNo?res.data.data.carInfoList:res.data.data.tranCarInfoList
- for (var i = 0; i < arr.length; i++) {
- this.imgUrl[i]=[]
- arr[i].show2=false
- if(arr[i].unloadPoundImg){
- if(arr[i].unloadPoundImg){
- var arr1=arr[i].unloadPoundImg.split(",")
- for (var q = 0; q < arr1.length; q++) {
- if(arr1[q]!=''){
- this.imgUrl[i].push({url:arr1[q]})
- }
- }
- }
- }
- }
- if(this.carNo){
- this.freightspace=res.data.data.carInfoList
- }else{
- 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].unloadPoundImg){
- this.pictureTotal = this.detailData.tranCarInfoList[0].unloadPoundImg.split(",")
- }
- if(this.carNo){
- this.freightspace=res.data.data.carInfoList
- }else{
- this.freightspace=res.data.data.tranCarInfoList
- }
- }
- }
-
- }
- console.log(this.imgUrl)
- })
- },
- getImgUrl(res1,res2,res3,res4) {
- this.freightspace[res4].unloadPoundImg=res1
-
- // this.detailData.addressUrl = res
- // console.log(res)
- // console.log('------------res-----------')
- },
- getImgUrl1(res1,res2,res3,res4){
- console.log(res1,res2,res3,res4)
- if (this.freightspace[0].unloadPoundImg) {
- this.freightspace[0].unloadPoundImg += ',' + res1
- } else {
- this.freightspace[0].unloadPoundImg = res1
- }
- },
- 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],'unloadingDate',e.year + "-" + e.month + "-" + e.day)
- },
- dateChange2(e){
- this.$set(this.freightspace[this.index],'receiveDateEnd',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?id=' + val.id,
- })
- }
- }
- }
- </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: 11;
- 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;
- width: 300rpx;
- }
- }
- // .left {
- // margin-right: 20px;
- // width: 300rpx;
- // }
- .pound_list{
- width: 452rpx;
- display: flex;
- justify-content: flex-end;
- text-align: right;
- }
- .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;
- }
- .shade{
- background:#000;
- position:fixed;
- top:0;left:0;
- width:100%;height:100%;
- z-index:10000;
- }
- // .bottom-btn {
- // padding: 30rpx;
- // background: #FFFFFF;
- // width: 92%;
- // position: fixed;
- // bottom: 0rpx;
- // display: flex;
- // z-index: 9999;
- // }
- .statusitem{
- padding:10rpx;
- }
- .statusitem.active{
- background:#19be6b;
- color:#fff;
- }
- </style>
|