Selaa lähdekoodia

前端 小程序sdy

zhongtianhaoyuan 3 vuotta sitten
vanhempi
commit
d50124d071

+ 16 - 16
pages/erpbusiness/add_quality_testing.vue

@@ -364,21 +364,21 @@
 			})
 		},
 		methods: {
-			confirmInfo() {
-				this.isShowAlert = true
-			},
-			alertBtn() {
-				// this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
-				// 	warehouseId: this.cangid,
-				// 	goodsName: this.gridList.goodsName
-				// }).then(res => {
-				// 	if(res.data.code=="200"){
-				// 		this.$api.msg('提交成功!')
-				// 	}else{
-				// 		this.$api.msg('提交失败')
-				// 	}
-				// })
-			},
+			// confirmInfo() {
+			// 	this.isShowAlert = true	
+			// },
+			// alertBtn() {
+			// 	this.$api.doRequest('get', '/qualityInspectionManagement/api/editQualityInspection', {
+			// 		id: this.id,
+			// 		flag:2
+			// 	}).then(res => {
+			// 		if(res.data.code=="200"){
+			// 			this.$api.msg('提交成功!')
+			// 		}else{
+			// 			this.$api.msg('提交失败')
+			// 		}
+			// 	})
+			// },
 			cancelClick() {
 				this.isShowAlert = false
 			},
@@ -809,7 +809,7 @@
 		.button {
 			background: #22C572;
 			width: 90%;
-			margin: 0 auto;
+			margin: 20rpx auto;
 			padding: 10px;
 			color: #fff;
 			text-align: center;

+ 30 - 6
pages/erpbusiness/edit_quality_testing.vue

@@ -166,8 +166,12 @@
 		</view>
 
 		<view class="footer">
+			<view @click='confirmInfo' class="button">确认初检信息</view>
 			<view @click='submit' class="button">提交</view>
 		</view>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 
@@ -242,7 +246,9 @@
 					},
 				],
 				cangid: '',
-				goodsList:[]
+				goodsList:[],
+				isShowAlert:false,
+				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
 			}
 		},
 		// #ifndef MP
@@ -309,6 +315,24 @@
 			this.gridList.gradeKey = this.gradeList[0].key
 		},
 		methods: {
+			confirmInfo() {
+				this.isShowAlert = true	
+			},
+			alertBtn() {
+				this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
+					id: this.id,
+					flag:2
+				}).then(res => {
+					if(res.data.code=="200"){
+						this.$api.msg('提交成功!')
+						setTimeout(function(){
+								uni.navigateBack({})
+						},1000)
+					}else{
+						this.$api.msg('提交失败')
+					}
+				})
+			},
 			waterContentChange() {
 				var that = this
 				if (this.gridList.goodsName && this.cangid) {
@@ -440,10 +464,10 @@
 					this.$api.msg('初检水分不能为空')
 					return
 				}
-				if (!this.gridList.reWaterContent) {
-					this.$api.msg('复检水分不能为空')
-					return
-				}
+				// if (!this.gridList.reWaterContent) {
+				// 	this.$api.msg('复检水分不能为空')
+				// 	return
+				// }
 				if (!this.gridList.mildewGrain) {
 					this.$api.msg('霉变粒不能为空')
 					return
@@ -637,7 +661,7 @@
 		.button {
 			background: #22C572;
 			width: 90%;
-			margin: 0 auto;
+			margin: 20rpx auto;
 			padding: 10px;
 			color: #fff;
 			text-align: center;

+ 17 - 6
pages/erpbusiness/examine_quality_testing.vue

@@ -104,6 +104,10 @@
 					{{gridList.dryGrainPrice}}
 				</view>
 			</view>
+			<view class="c-row-fj" v-if="statusShow == '已复检'">
+				<view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
+					<textarea class='textarea-style' v-model='gridList.reMemo' placeholder="暂无复检备注信息!" maxlength="300" disabled ></textarea>
+			</view>
 		</view>
 		<view style='margin-bottom:300rpx;'>
 			<view class='wrap'>
@@ -229,13 +233,10 @@
 						value: '等外'
 					},
 				],
-				cangid: ''
+				cangid: '',
+				statusShow:"",
 			}
 		},
-
-		onLoad() {
-
-		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
 			const index = e.index;
@@ -267,10 +268,11 @@
 			}
 		},
 		onLoad(options) {
-			console.log(options)
 			this.id = options.id
 			this.cangid = options.cangid
 			this.managementType = options.managementType
+			this.statusShow = options.statusShow
+			console.log(this.statusShow)
 		},
 		onShow() {
 			var that = this
@@ -497,4 +499,13 @@
 			border-radius: 30px;
 		}
 	}
+	.textarea-style{
+		border: 1px solid #EEEEEE;
+		width: 100%;
+		padding:20rpx;
+		border-radius: 20rpx;
+	}
+	.c-row-fj{
+		padding:20rpx
+	}
 </style>

+ 1 - 1
pages/erpbusiness/quality_testing.vue

@@ -269,7 +269,7 @@
 			examine(item) {
 				uni.navigateTo({
 					url: '/pages/erpbusiness/examine_quality_testing?id=' + item.id + '&managementType=' + this
-						.managementType + '&cangid=' + this.cangid
+						.managementType + '&cangid=' + this.cangid + '&statusShow=' + item.status
 				})
 			},
 			emptysearch() {