Prechádzať zdrojové kódy

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 rokov pred
rodič
commit
9d58d1bb3c

+ 0 - 1
pages/erp/deliveryfeedback/details.vue

@@ -378,7 +378,6 @@
 					{
 						imgUrl:[],
 					}
-					
 				],
 				feedbackFlag:1,
 				detailData:{},

+ 2 - 3
pages/erp/deliveryfeedback/list.vue

@@ -119,14 +119,13 @@
 			goDetail(val) {
 				if(val.tranType == "他运"){
 					uni.navigateTo({
-						url: '/pages/erp/deliveryfeedback/otherfeedback?id=' + val.id,
+						url: `/pages/erp/deliveryfeedback/otherfeedback?id=${val.id}&status=${val.feedbackStatus}`,
 					})
 				}else{
 					uni.navigateTo({
 					url: '/pages/erp/deliveryfeedback/details?id=' + val.id,
 				    })
-				}
-				
+				}	
 			}
 		}
 	}

+ 30 - 35
pages/erp/deliveryfeedback/otherfeedback.vue

@@ -30,7 +30,7 @@
 					</image>
 				</view>
 				<view class="add_css">
-					<view @click='add(1)' class="add">添加</view>
+					<view @click='add(1)' class="add" v-if="status == '执行中'">添加</view>
 				</view>
 			</view>
 			<view class="content" v-for="(v_item,index1) in sendCar">
@@ -85,7 +85,7 @@
 				<view class="c-row">
 					<view class="title">装车日期</view>
 					<view @click='show=true' class="con-list">{{v_item.loadingDate?v_item.loadingDate:"请选择装车日期"}}</view>
-					<u-picker v-model="show" mode="time" @confirm='dateChange($event,index1)' :params="params">
+					<u-picker v-model="show" mode="time" class="con-list" @confirm='dateChange($event,index1)' :params="params">
 					</u-picker>
 				</view>
 				<view class="flex">
@@ -158,7 +158,7 @@
 						@click="trainCar"></image>
 				</view>
 				<view class="add_css">
-					<view @click='add(2)' class="add">添加</view>
+					<view @click='add(2)' class="add" v-if="status == '执行中'">添加</view>
 				</view>
 			</view>
 			<view class="content" v-for="(item_add1,index) in huoYun">
@@ -247,7 +247,7 @@
 					</image>
 				</view>
 				<view class="add_css">
-					<view @click='add(3)' class="add">添加</view>
+					<view @click='add(3)' class="add" v-if="status == '执行中'">添加</view>
 				</view>
 			</view>
 			<view class="content" v-for="(item_add3,index) in looseShip">
@@ -316,15 +316,13 @@
 				</view>
 			</view>
 			<!-- 以上散船反馈 -->
-
-
 			<!-- 集装箱船反馈 -->
 			<view class="flex title_css">
 				<view class="head_css">集装箱船反馈({{containerList ? containerList : 0}})<image :src="containerUrl" class="open_css"
 						@click="containerchange"></image>
 				</view>
 				<view class="add_css">
-					<view @click='add(4)' class="add">添加</view>
+					<view @click='add(4)' class="add" v-if="status == '执行中'">添加</view>
 				</view>
 			</view>
 			<view class="content" v-for="(item_add4,index) in container">
@@ -395,7 +393,7 @@
 		</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>
+			<u-button @click='finishedgoods' type="success" class="btn2" :disabled="status != '执行中'">完货</u-button>
 		</view>
 	</view>
 </template>
@@ -410,6 +408,7 @@
 		data() {
 			return {
 				id: '',
+				status:"",
 				currentPage: 1,
 				pageSize: 10,
 				maxSize: 50 * 1024 * 1024,
@@ -448,24 +447,16 @@
 		},
 		onLoad(options) {
 			this.id = options.id
+			this.status = options.status
 		},
 		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
-			},
-		},
+		computed: {},
 		methods: {
+			qiehuan(){
+				this.show = !this.show
+			},
 			//汽运展开显示
 			openCar() {
 				this.carShow = !this.carShow
@@ -596,14 +587,14 @@
 						if (res.confirm) {
 							if (num == 1) {
 								that.sendCar.splice(index, 1)
-								if (this.shipList) {
-									that.count = Number(this.shipList) + 1
+								if (that.sendCarList) {
+									that.count = Number(that.sendCarList) 
 								} else {
-									that.count = 1
+									that.count = 0
 								}
 								for (var i = 0; i < that.sendCar.length; i++) {
 									if (that.count < 10) {
-										that.sendCar[i].tranCarNo = "C00" + that.count
+										that.sendCar[i].tranCarNo = "C00" + (that.count+1)
 									} else if (that.count < 100) {
 										that.sendCar[i].tranCarNo = "C0" + that.count
 									} else if (that.count < 1000) {
@@ -698,7 +689,7 @@
 						content: "确定保存反馈信息?",
 						success(res) {
 							if (res.confirm) {
-								that.huoYun[index].boxNo = "" + that.huoYun.boxNo1 + "," + that.huoYun.boxNo2
+								that.huoYun[index].boxNo = "" + that.huoYun[index].boxNo1 + "," + that.huoYun[index].boxNo2
 								_pro.tranCarInfoList2 = [that.huoYun[index]]
 								_pro.threeTranType = "火运"
 								that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
@@ -792,9 +783,6 @@
 						}
 					})
 				}
-				// 		}
-				// 	}
-				// })
 			},
 			getList() {
 				this.$api.doRequest('get', '/tranProcessInfo/getThreeTranProcess', {
@@ -802,11 +790,19 @@
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
-						this.sendCarList = this.detailData.tranCarInfoList1.length
-						this.count = this.detailData.tranCarInfoList1.length
-						this.trainCarList = this.detailData.tranCarInfoList2.length
-						this.shipList = this.detailData.tranCarInfoList3.length
-						this.containerList = this.detailData.tranCarInfoList4.length
+						if(this.detailData.tranCarInfoList1){
+							this.sendCarList = this.detailData.tranCarInfoList1.length
+						    this.count = this.detailData.tranCarInfoList1.length
+						}
+						if(this.detailData.tranCarInfoList2){
+							this.trainCarList = this.detailData.tranCarInfoList2.length
+							for(var i = 0 ; i < this.detailData.tranCarInfoList2.length; i++){
+								this.detailData.tranCarInfoList2[i].boxNo1=this.detailData.tranCarInfoList2[i].boxNo.split(",")[0]
+								this.detailData.tranCarInfoList2[i].boxNo2=this.detailData.tranCarInfoList2[i].boxNo.split(",")[1]
+							}	
+							}
+						if(this.detailData.tranCarInfoList3){this.shipList = this.detailData.tranCarInfoList3.length}
+						if(this.detailData.tranCarInfoList4){this.containerList = this.detailData.tranCarInfoList4.length}
 					}
 				})
 			},
@@ -1018,7 +1014,6 @@
 		}
 	}
 
-
 	.open_css {
 		width: 36rpx;
 		height: 20rpx;

+ 7 - 6
pages/erp/receivingfeedback/list.vue

@@ -11,7 +11,8 @@
 		<view class="content2">
 			<view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
 				<view style='padding:20px 5px 13px;border-bottom:1px solid #EEEEEE;' class="row">
-					<view style='font-size:14px;' class="left">{{item.processNo}}</view>
+					<view style='font-size:14px;' class="left" v-if="item.tranType != '他运'">{{item.processNo}}</view>
+					<view style='font-size:14px;' class="left" v-else>{{item.contractNo}}</view>
 					<view style='color:#22C572;'>{{item.tranType}}</view>
 				</view>
 				<view style='font-size:13px;' class="row">
@@ -26,12 +27,13 @@
 					<view style='flex:1;color:#9698A2;' class="left">收货</view>
 					<view style='flex:2;text-align:right;'>{{item.receive}}</view>
 				</view>
-				<view style='font-size:14px;' class="row">
-					<view style='flex:1;color:#9698A2;' class="left">运输周期</view>
+				<view style='font-size:14px;' class="row" v-if="item.tranType != '他运'">
+					<view style='flex:1;color:#9698A2;' class="left" >运输周期</view>
 					<view style='flex:2;text-align:right;'>{{item.deliveryDateStart}} ~ {{item.deliveryDateEnd}}</view>
 				</view>
 				<view style='font-size:14px;' class="row">
-					<view style='flex:1;color:#9698A2;' class="left">{{item.feedbackStatus}}</view>
+					<view style='flex:1;color:#9698A2;' class="left" v-if="item.tranType != '他运'">{{item.feedbackStatus}}</view>
+					<view style='flex:1;color:#9698A2;' class="left" v-else>{{item.receivingStatus}}</view>
 					<view style='flex:2;text-align:right;'>{{item.createDate}}</view>
 				</view>
 			</view>
@@ -95,7 +97,6 @@
 					pageSize: this.pageSize
 				}).then(res => {
 					if (res.data.code == 200) {
-						console.log(this.flag)
 						if(this.flag=='1'){
 							var data=res.data.data.records
 							this.dataList = this.dataList.concat(data)
@@ -119,7 +120,7 @@
 			goDetail(val) {
 				if(val.tranType == "他运"){
 					uni.navigateTo({
-					url: '/pages/erp/receivingfeedback/otherfeedback?id=' + val.id,
+					url: `/pages/erp/receivingfeedback/otherfeedback?id=${val.id}&status=${val.receivingStatus}` ,
 					})
 				}else{
 					uni.navigateTo({

+ 53 - 34
pages/erp/receivingfeedback/otherfeedback.vue

@@ -26,18 +26,12 @@
 			</view>
 			<!-- 汽运 -->
 			<view class="flex title_css">
-				<view class="head_css">汽运反馈({{sendCarList}})<image :src="carurl" class="open_css" @click="openCar"></image>
+				<view class="head_css">汽运反馈({{sendCarList?sendCarList:0}})<image :src="carurl" class="open_css" @click="openCar"></image>
 				</view>
 			</view>
 			
 			<view class="content" v-if="carShow" v-for="(item,index) in detailData.tranCarInfoList1">
-				<!-- 派车编号 -->
-				<view class="c-row">
-					<view class="title">派车编号</view>
-					<view class="con-list">
-						<input v-model='item.tranCarNo' placeholder="暂无" disabled name="input"></input>
-					</view>
-				</view>
+				
 				<!-- 车牌号 -->
 				<view class="c-row">
 					<view class="title">车牌号</view>
@@ -86,13 +80,14 @@
 					</view>
 				</view>
 				<view class="flex">
-					<u-button @click='pass(1,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button>
+					<!-- <u-button @click='pass(1,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
+					 <view class="btn" @click='pass(1,index)' v-if="item.status != '已送达'">保存</view>
 				</view>
 			</view>
 			<!-- 以上汽运 -->
 			<!-- 火运反馈 -->
 			<view class="flex title_css">
-				<view class="head_css">火运反馈({{trainCarList}})<image :src="trainCarurl" class="open_css"
+				<view class="head_css">火运反馈({{trainCarList?trainCarList:0}})<image :src="trainCarurl" class="open_css"
 						@click="trainCar"></image>
 				</view>
 			</view>
@@ -132,16 +127,16 @@
 					</view>
 				</view>
 				<view class="flex">
-					<u-button @click='pass(2,index)' v-if="item.status != '已送达'" type="success" hover-class='none'>保存</u-button>
+					<!-- <u-button @click='pass(2,index)' v-if="item.status != '已送达'" type="success" hover-class='none'>保存</u-button> -->
+				    <view class="btn" @click='pass(2,index)'v-if="item.status != '已送达'">保存</view>
 				</view>
 			</view>
 			<!-- 以上火运反馈 -->
 			<!-- 散船反馈 -->
 			<view class="flex title_css">
-				<view class="head_css">散船反馈({{shipList}})<image :src="shipurl" class="open_css" @click="shipping">
+				<view class="head_css">散船反馈({{shipList?shipList:0}})<image :src="shipurl" class="open_css" @click="shipping">
 					</image>
 				</view>
-				
 			</view>
 			<view class="content" v-if="shipShow" v-for="(item,index) in detailData.tranCarInfoList3">
 				<!-- 船名 -->
@@ -172,13 +167,14 @@
 					</view>
 				</view>
 				<view class="flex">
-					<u-button @click='pass(3,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button>
+					<!-- <u-button @click='pass(3,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
+				    <view class="btn" @click='pass(3,index)'v-if="item.status != '已送达'">保存</view>
 				</view>
 			</view>
 			<!-- 以上散船反馈 -->
 			<!-- 集装箱船反馈 -->
 			<view class="flex title_css">
-				<view class="head_css">集装箱船反馈({{containerList}})<image :src="containerUrl" class="open_css"
+				<view class="head_css">集装箱船反馈({{containerList?containerList:0}})<image :src="containerUrl" class="open_css"
 						@click="containerchange"></image>
 				</view>
 			</view>
@@ -211,12 +207,13 @@
 					</view>
 				</view>
 				<view class="flex">
-					<u-button @click='pass(4,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button>
+					<!-- <u-button @click='pass(4,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
+					<view class="btn" @click='pass(4,index)'v-if="item.status != '已送达'">保存</view>
 				</view>
 			</view>
 		</view>
 		<view style='padding:10px;' class='flex bottom-btn'>
-			<u-button @click='finishedgoods' type="success" class="btn2">完货</u-button>
+			<u-button @click='finishedgoods' type="success" class="btn2" :disabled="statusAll != '执行中'">完货</u-button>
 		</view>
 	</view>
 </template>
@@ -231,6 +228,7 @@
 		data() {
 			return {
 				id: '',
+				statusAll:"",
 				currentPage: 1,
 				pageSize: 10,
 				maxSize: 50 * 1024 * 1024,
@@ -268,23 +266,12 @@
 		},
 		onLoad(options) {
 			this.id = options.id
+		    this.statusAll = options.status
 		},
 		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
-			},
-		},
+		computed: {},
 		methods: {
 			//汽运展开显示
 			openCar() {
@@ -445,6 +432,30 @@
 			},
 			//保存
 			pass(num, index) {
+				if(num == 1){
+					if(!this.detailData.tranCarInfoList1[index].unloadNetWeight || this.detailData.tranCarInfoList1[index].unloadNetWeight == 0){
+						this.$api.msg("请输入卸车净重")
+						return
+					}	
+				}
+				if(num == 2){
+					if(!this.detailData.tranCarInfoList2[index].unloadNetWeight || this.detailData.tranCarInfoList2[index].unloadNetWeight == 0){
+						this.$api.msg("请输入卸车净重")
+						return
+					}	
+				}
+				if(num == 3){
+					if(!this.detailData.tranCarInfoList3[index].unloadNetWeight || this.detailData.tranCarInfoList3[index].unloadNetWeight == 0){
+						this.$api.msg("请输入卸船净重")
+						return
+					}	
+				}
+				if(num == 4){
+					if(!this.detailData.tranCarInfoList4[index].unloadNetWeight || this.detailData.tranCarInfoList4[index].unloadNetWeight == 0){
+						this.$api.msg("请输入卸船净重")
+						return
+					}	
+				}
 				var that = this
 				uni.showModal({
 					content: "确定保存反馈信息?",
@@ -509,10 +520,10 @@
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
-						this.sendCarList = this.detailData.tranCarInfoList1.length
-						this.trainCarList = this.detailData.tranCarInfoList2.length
-						this.shipList = this.detailData.tranCarInfoList3.length
-						this.containerList = this.detailData.tranCarInfoList4.length
+						if(this.detailData.tranCarInfoList1){this.sendCarList = this.detailData.tranCarInfoList1.length}
+						if(this.detailData.tranCarInfoList2){this.trainCarList = this.detailData.tranCarInfoList2.length}
+						if(this.detailData.tranCarInfoList3){this.shipList = this.detailData.tranCarInfoList3.length}
+						if(this.detailData.tranCarInfoList4){this.containerList = this.detailData.tranCarInfoList4.length}
 					}
 				})
 			},
@@ -688,6 +699,14 @@
 		text-align: right;
 		padding-right: 20rpx;
 	}
+	.btn{
+		padding: 10rpx 60rpx;
+		border-radius: 40rpx;
+		color: #FFFFFF;
+		line-height: 46rpx;
+		margin: 0 auto;
+		background-color: #5ac725;
+	}
 
 	.add_css {
 		width: 50%;

+ 2 - 2
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -65,10 +65,10 @@
 		</view>
 		<u-button class='submit' @click='submit'>提交</u-button>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
-			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
 			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 		<u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
-			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
 			showCancelButton='false' :content="content1" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 
 	</view>