gjy 3 éve
szülő
commit
d8878f9451

+ 6 - 2
pages/erpbusiness/add_quality_testing.vue

@@ -42,8 +42,10 @@
 			<view v-else class="c-row ">
 			<view v-else class="c-row ">
 				<view class="title">扣杂</view>
 				<view class="title">扣杂</view>
 				<view class="con-list">
 				<view class="con-list">
-					<input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
+					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
 						 name="input"></input>
 						 name="input"></input>
+					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
+						 	 name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="c-row ">
 			<view class="c-row ">
@@ -113,8 +115,10 @@
 			<view class="c-row ">
 			<view class="c-row ">
 				<view class="title">水分(%)</view>
 				<view class="title">水分(%)</view>
 				<view class="con-list">
 				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="请输入水分占比" @input="waterContentChange"
+					<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
 					 name="input"></input>
 					 name="input"></input>
+					 <input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
+					  name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="c-row ">
 			<view class="c-row ">

+ 32 - 6
pages/erpbusiness/edit_quality_testing.vue

@@ -37,8 +37,12 @@
 			<view v-else class="c-row ">
 			<view v-else class="c-row ">
 				<view class="title">扣杂</view>
 				<view class="title">扣杂</view>
 				<view class="con-list">
 				<view class="con-list">
-					<input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
-						 name="input"></input>
+					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
+						 	 name="input"></input>
+					<input v-if='flag==1||gridList.reBuckleMiscellaneous' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
+						 	 	 name="input"></input>
+					<input v-else value='未复检' disabled placeholder="复检扣杂" @input="waterContentChange"
+						name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="c-row ">
 			<view class="c-row ">
@@ -97,8 +101,12 @@
 			<view class="c-row ">
 			<view class="c-row ">
 				<view class="title">水分(%)</view>
 				<view class="title">水分(%)</view>
 				<view class="con-list">
 				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="请输入水分占比" @input="waterContentChange"
+					<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
 					 name="input"></input>
 					 name="input"></input>
+					 <input v-if='flag==1||gridList.reWaterContent' v-model='gridList.reWaterContent' placeholder="复检水分" @input="waterContentChange"
+					  name="input"></input>
+					  <input v-else value='未复检' disabled placeholder="复检水分"
+					  	name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="c-row ">
 			<view class="c-row ">
@@ -172,6 +180,7 @@
 				footprintList: [],
 				footprintList: [],
 				searchKeyWord:'',
 				searchKeyWord:'',
 				isVip: false,
 				isVip: false,
+				flag:0,
 				userInfoTmp: [],
 				userInfoTmp: [],
 				inputStatus: 'none',
 				inputStatus: 'none',
 				carInfo: [],
 				carInfo: [],
@@ -235,6 +244,7 @@
 		},
 		},
 		onLoad(options){
 		onLoad(options){
 			this.id=options.id
 			this.id=options.id
+			this.flag=options.flag
 			this.cangid=options.cangid
 			this.cangid=options.cangid
 			this.managementType=options.managementType
 			this.managementType=options.managementType
 		},
 		},
@@ -304,6 +314,10 @@
 				}
 				}
 			},
 			},
 			submit(){
 			submit(){
+				this.gridList.flag=this.flag
+				if(this.flag==2){
+					this.gridList.reInspector=this.userInfo.userName
+				}
 				var that = this
 				var that = this
 				if (!this.gridList.qualityNo) {
 				if (!this.gridList.qualityNo) {
 					this.$api.msg('编号不能为空')
 					this.$api.msg('编号不能为空')
@@ -337,18 +351,26 @@
 					this.$api.msg('货名不能为空')
 					this.$api.msg('货名不能为空')
 					return
 					return
 				}
 				}
-				if (this.gridList.buckleWeightRatio < 0 ||this.gridList.buckleWeightRatio > 2) {
+				if (this.gridList.paramType!=1&&this.gridList.buckleWeightRatio < 0 ||this.gridList.paramType!=1&&this.gridList.buckleWeightRatio > 2) {
 					this.$api.msg('扣重比输入错误')
 					this.$api.msg('扣重比输入错误')
 					return
 					return
 				}
 				}
 				if (
 				if (
-					String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
+					this.gridList.paramType!=1&&String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
 					String(this.gridList.buckleWeightRatio).length -
 					String(this.gridList.buckleWeightRatio).length -
 					(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) 
 					(String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) 
 					{
 					{
 						this.$api.msg('扣重比输入错误')
 						this.$api.msg('扣重比输入错误')
 						return
 						return
 				}
 				}
+				if (this.flag==0&&this.gridList.paramType==1&&this.gridList.buckleMiscellaneous < 0 ||this.flag==0&&this.gridList.paramType==1&&this.gridList.buckleMiscellaneous > 50) {
+					this.$api.msg('初检扣杂输入错误')
+					return
+				}
+				if (this.flag==1&&this.gridList.paramType==1&&this.gridList.reBuckleMiscellaneous < 0 ||this.flag==0&&this.gridList.paramType==1&&this.gridList.reBuckleMiscellaneous > 50) {
+					this.$api.msg('复检扣杂输入错误')
+					return
+				}
 				if (!this.gridList.type) {
 				if (!this.gridList.type) {
 					this.$api.msg('类型不能为空')
 					this.$api.msg('类型不能为空')
 					return
 					return
@@ -366,7 +388,11 @@
 					return
 					return
 				}
 				}
 				if (!this.gridList.waterContent) {
 				if (!this.gridList.waterContent) {
-					this.$api.msg('水分不能为空')
+					this.$api.msg('初检水分不能为空')
+					return
+				}
+				if (!this.gridList.reWaterContent) {
+					this.$api.msg('复检水分不能为空')
 					return
 					return
 				}
 				}
 				if (!this.gridList.mildewGrain) {
 				if (!this.gridList.mildewGrain) {

+ 9 - 4
pages/erpbusiness/quality_testing.vue

@@ -32,6 +32,9 @@
 						<view class="left status1" v-if="item.status=='已质检'">检</view>
 						<view class="left status1" v-if="item.status=='已质检'">检</view>
 						<view class="left status2" v-if="item.status=='已称皮重'">皮</view>
 						<view class="left status2" v-if="item.status=='已称皮重'">皮</view>
 						<view class="left status3" v-if="item.status=='已称毛重'">毛</view>
 						<view class="left status3" v-if="item.status=='已称毛重'">毛</view>
+						<view class="left status1" v-if="item.status=='已初检'">初</view>
+						<view class="left status2" v-if="item.status=='已复检'&&item.confirm!='1'">复</view>
+						<view class="left status3" v-if="item.confirm=='1'">确</view>
 						<view>
 						<view>
 							<view class="top-title">
 							<view class="top-title">
 								<view  v-if='managementType==1' >{{item.qualityNo}}</view>
 								<view  v-if='managementType==1' >{{item.qualityNo}}</view>
@@ -41,7 +44,7 @@
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="right">{{item.customer}}</view>
 					<view class="right">{{item.customer}}</view>
-					<view class='right'>{{item.qualityInspector}}</view>
+					<view class='right'>{{item.qualityInspector}} {{item.reInspector}}</view>
 				</view>
 				</view>
 				<view class="row2" >
 				<view class="row2" >
 					<view v-if='managementType==1'>{{item.customerName}}</view>
 					<view v-if='managementType==1'>{{item.customerName}}</view>
@@ -50,7 +53,9 @@
 				</view>
 				</view>
 				<view class="row3">
 				<view class="row3">
 					<view v-if='item.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
 					<view v-if='item.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
-						<view v-if='item.status!="已称皮重"&&managementType==1' @click.stop='edit(item)' class='button'>编辑</view>
+						<view v-if='item.status=="已初检"&&managementType==1' @click.stop='edit(item,0)' class='button'>初检</view>
+						<view v-if='item.confirm!="1"&&item.status=="已复检"&&managementType==1' @click.stop='edit(item,2)' class='button'>确认</view>
+						<view v-if='item.confirm!="1"&&managementType==1' @click.stop='edit(item,1)' class='button'>复检</view>
 						<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 						<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -304,9 +309,9 @@
 					uni.hideLoading()
 					uni.hideLoading()
 				})
 				})
 			},
 			},
-			edit(item){
+			edit(item,status){
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid
+					url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid+'&flag='+status
 				})
 				})
 			},
 			},
 			add(){
 			add(){