123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191 |
- <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>{{item.loadingDate}}</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>
|