Selaa lähdekoodia

优化质检操作

sunyalong 3 kuukautta sitten
vanhempi
commit
1af2a3fde2

+ 2 - 2
TFT-PDA/manifest.json

@@ -2,8 +2,8 @@
     "name" : "TFT-PDA",
     "name" : "TFT-PDA",
     "appid" : "__UNI__62A10E1",
     "appid" : "__UNI__62A10E1",
     "description" : "",
     "description" : "",
-    "versionName" : "1.1.1",
-    "versionCode" : 111,
+    "versionName" : "1.1.5",
+    "versionCode" : 115,
     "transformPx" : false,
     "transformPx" : false,
     "app-plus" : {
     "app-plus" : {
         /* 5+App特有相关 */
         /* 5+App特有相关 */

+ 9 - 1
TFT-PDA/pages.json

@@ -281,7 +281,15 @@
             }
             }
             
             
         }
         }
-		
+		,{
+		    "path" : "pages/Inspect/TestPage001",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "测试页面",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
     ],
     ],
 	"globalStyle": {
 	"globalStyle": {
 		"navigationBarTextStyle": "white",
 		"navigationBarTextStyle": "white",

+ 29 - 4
TFT-PDA/pages/Inspect/FastOutStoreInspectOperate.vue

@@ -7,6 +7,7 @@
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料号:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料号:</text>
 			<text style="align-self: center;font-size: 35rpx;word-wrap: break-word;width: 200px;font-weight: bold;">{{deliverDtlMd.materialCode}}</text>
 			<text style="align-self: center;font-size: 35rpx;word-wrap: break-word;width: 200px;font-weight: bold;">{{deliverDtlMd.materialCode}}</text>
+			<text :class="deliverDtlMd.keyFlag ? 'keyFlagRed' : 'keyFlagGray'" style="align-self: center;">{{deliverDtlMd.keyFlag ? '★' : '■'}}</text>
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;margin-top: 5px;margin-bottom: 5px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;margin-top: 5px;margin-bottom: 5px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料名称:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料名称:</text>
@@ -30,7 +31,8 @@
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
-			<input class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
+			<input v-if="!deliverDtlMd.keyFlag" class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
+			<input v-if="deliverDtlMd.keyFlag" class="uni-input" disabled="true" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" />
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
 			<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
@@ -58,7 +60,12 @@
 		onLoad() {
 		onLoad() {
 			uni.$once('sendDeliverDtlData', (data) => {
 			uni.$once('sendDeliverDtlData', (data) => {
 				this.deliverDtlMd = data
 				this.deliverDtlMd = data
-				this.checkOkQty = data.sumQty - data.sumCheckQty
+				if(this.deliverDtlMd.keyFlag) {
+					this.checkOkQty = 1
+				}
+				else {
+					this.checkOkQty = data.sumQty - data.sumCheckQty
+				}
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
@@ -81,12 +88,16 @@
 				}
 				}
 				if((Number(this.checkOkQty) + Number(this.checkNgQty) + this.deliverDtlMd.sumCheckQty) > this.deliverDtlMd.sumQty) {
 				if((Number(this.checkOkQty) + Number(this.checkNgQty) + this.deliverDtlMd.sumCheckQty) > this.deliverDtlMd.sumQty) {
 					uni.showToast({
 					uni.showToast({
-						title: '质检合格数量+不合格数量 不能大于未质检数量。录入错误!',
+						title: '质检合格数量 + 质检不合格数量的总数不能大于改行校验单明细未质检数量! 请检查数量输入是否有误!!',
 						icon: 'none',
 						icon: 'none',
 						duration: 1000
 						duration: 1000
 					})
 					})
 					return;
 					return;
 				}
 				}
+				uni.showLoading({
+					title: "正在提交数据...",
+					mask: true,
+				})
 				let tmpMd = this.deliverDtlMd;
 				let tmpMd = this.deliverDtlMd;
 				tmpMd.DeliverNo = this.deliverNo;
 				tmpMd.DeliverNo = this.deliverNo;
 				tmpMd.MaterialSpec = this.materialSpecCode;
 				tmpMd.MaterialSpec = this.materialSpecCode;
@@ -105,11 +116,13 @@
 						uni.navigateBack({
 						uni.navigateBack({
 							url: '/pages/Inspect/FastOutStoreInspectDtl',
 							url: '/pages/Inspect/FastOutStoreInspectDtl',
 							success: () => {
 							success: () => {
+								uni.hideLoading()
 								uni.$emit('CallSapDeliverDtlQueryFunc',null);
 								uni.$emit('CallSapDeliverDtlQueryFunc',null);
 							}
 							}
 						});
 						});
 					}
 					}
 					else {
 					else {
+						uni.hideLoading()
 						uni.showToast({
 						uni.showToast({
 							title: '提交数据失败!' + retData.data.msg,
 							title: '提交数据失败!' + retData.data.msg,
 							icon: 'none',
 							icon: 'none',
@@ -118,6 +131,7 @@
 					}
 					}
 				}
 				}
 				else {
 				else {
+					uni.hideLoading()
 					uni.showToast({
 					uni.showToast({
 						title: '接口异常!' + retData.retMsg,
 						title: '接口异常!' + retData.retMsg,
 						icon: 'none',
 						icon: 'none',
@@ -149,7 +163,12 @@
 				setTimeout(() => {
 				setTimeout(() => {
 					this.foucusIndex = 0;
 					this.foucusIndex = 0;
 				}, 150)
 				}, 150)
-				this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
+				if(this.deliverDtlMd.keyFlag) {
+					this.checkOkQty = 1
+				}
+				else {
+					this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
+				}
 				this.checkNgQty = 0
 				this.checkNgQty = 0
 			}
 			}
 		}
 		}
@@ -158,4 +177,10 @@
 
 
 <style lang="scss">
 <style lang="scss">
 	@import '@/common/uni-nvue.css';
 	@import '@/common/uni-nvue.css';
+	.keyFlagRed {
+		color: red;
+	}
+	.keyFlagGray {
+		color: lightgray;
+	}
 </style>
 </style>

+ 57 - 0
TFT-PDA/pages/Inspect/TestPage001.vue

@@ -0,0 +1,57 @@
+<template>
+	<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
+		<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
+		<input v-if="!keyFlag" class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
+		<input v-if="keyFlag" class="uni-input" disabled="true" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" />
+	</view>
+	<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
+		<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
+		<input class="uni-input" type="number" style="margin-right: 5px;color: red;font-size: 40rpx;font-weight: bold;" v-model="checkNgQty" @input="onKeyInput" placeholder="请输不合格数量" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				keyFlag: true,
+				bnSnCode: '',
+				checkOkQty: 0,
+				checkNgQty: 0
+			}
+		},
+		onUnload() {
+			
+		},
+		onLoad() {
+			if(this.keyFlag) {
+				this.checkOkQty = 1
+			}
+		},
+		methods: {
+			onKeyInput(event) {
+				console.log(this.checkNgQty)
+				console.log(event)
+				if(this.keyFlag) {
+					if(Number(this.checkNgQty) > 1) {
+						uni.showToast({
+							title: '关键件的不合格数量不能大于1,录入错误!',
+							icon: 'none',
+							duration: 1000
+						})
+						return;
+					}
+					if(Number(this.checkNgQty) == 1) {
+						this.checkOkQty = 0
+					}
+					if(Number(this.checkNgQty) == 0) {
+						this.checkOkQty = 1
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 47 - 4
TFT-PDA/pages/Inspect/inspectOperate.vue

@@ -11,6 +11,7 @@
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料号:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料号:</text>
 			<text style="align-self: center;font-size: 35rpx;word-wrap: break-word;width: 200px;font-weight: bold;">{{deliverDtlMd.materialCode}}</text>
 			<text style="align-self: center;font-size: 35rpx;word-wrap: break-word;width: 200px;font-weight: bold;">{{deliverDtlMd.materialCode}}</text>
+			<text :class="deliverDtlMd.keyFlag ? 'keyFlagRed' : 'keyFlagGray'" style="align-self: center;">{{deliverDtlMd.keyFlag ? '★' : '■'}}</text>
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;margin-top: 5px;margin-bottom: 5px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;margin-top: 5px;margin-bottom: 5px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料名称:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;">物料名称:</text>
@@ -34,11 +35,12 @@
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
 			<text style="align-self: center;font-size: 35rpx;color: darkslategray;width: 230rpx;">合格数量:</text>
-			<input class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
+			<input v-if="!deliverDtlMd.keyFlag" class="uni-input" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" placeholder="请输合格数量" />
+			<input v-if="deliverDtlMd.keyFlag" class="uni-input" disabled="true" type="number" style="margin-right: 5px;color: blue;font-size: 40rpx;font-weight: bold;" v-model="checkOkQty" />
 		</view>
 		</view>
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 		<view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
 			<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
 			<text style="align-self: center;font-size: 35rpx;color: red;width: 230rpx;">不合格数量:</text>
-			<input class="uni-input" type="number" style="margin-right: 5px;color: red;font-size: 40rpx;font-weight: bold;" v-model="checkNgQty" placeholder="请输不合格数量" />
+			<input class="uni-input" type="number" style="margin-right: 5px;color: red;font-size: 40rpx;font-weight: bold;" v-model="checkNgQty" @input="onKeyInput" placeholder="请输不合格数量" />
 		</view>
 		</view>
 		<button type="primary" style="margin-top: 20px;" @click="resetCondition">重   置</button>
 		<button type="primary" style="margin-top: 20px;" @click="resetCondition">重   置</button>
 		<button type="primary" style="margin-top: 20px;" @click="submitResult">质检结果提交</button>
 		<button type="primary" style="margin-top: 20px;" @click="submitResult">质检结果提交</button>
@@ -62,7 +64,12 @@
 		onLoad() {
 		onLoad() {
 			uni.$once('sendDeliverDtlData', (data) => {
 			uni.$once('sendDeliverDtlData', (data) => {
 				this.deliverDtlMd = data
 				this.deliverDtlMd = data
-				this.checkOkQty = data.sumQty - data.sumCheckQty
+				if(this.deliverDtlMd.keyFlag) {
+					this.checkOkQty = 1
+				}
+				else {
+					this.checkOkQty = data.sumQty - data.sumCheckQty
+				}
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
@@ -92,6 +99,10 @@
 					})
 					})
 					return;
 					return;
 				}
 				}
+				uni.showLoading({
+					title: "正在提交数据...",
+					mask: true,
+				})
 				let tmpMd = this.deliverDtlMd;
 				let tmpMd = this.deliverDtlMd;
 				tmpMd.DeliverNo = this.deliverNo;
 				tmpMd.DeliverNo = this.deliverNo;
 				tmpMd.MaterialSpec = this.materialSpecCode;
 				tmpMd.MaterialSpec = this.materialSpecCode;
@@ -110,11 +121,13 @@
 						uni.navigateBack({
 						uni.navigateBack({
 							url: '/pages/Inspect/inspectDtlNew',
 							url: '/pages/Inspect/inspectDtlNew',
 							success: () => {
 							success: () => {
+								uni.hideLoading()
 								uni.$emit('CallSapDeliverDtlQueryFunc',null);
 								uni.$emit('CallSapDeliverDtlQueryFunc',null);
 							}
 							}
 						});
 						});
 					}
 					}
 					else {
 					else {
+						uni.hideLoading()
 						uni.showToast({
 						uni.showToast({
 							title: '提交数据失败!' + retData.data.msg,
 							title: '提交数据失败!' + retData.data.msg,
 							icon: 'none',
 							icon: 'none',
@@ -123,6 +136,7 @@
 					}
 					}
 				}
 				}
 				else {
 				else {
+					uni.hideLoading()
 					uni.showToast({
 					uni.showToast({
 						title: '接口异常!' + retData.retMsg,
 						title: '接口异常!' + retData.retMsg,
 						icon: 'none',
 						icon: 'none',
@@ -154,8 +168,31 @@
 				setTimeout(() => {
 				setTimeout(() => {
 					this.foucusIndex = 0;
 					this.foucusIndex = 0;
 				}, 150)
 				}, 150)
-				this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
+				if(this.deliverDtlMd.keyFlag) {
+					this.checkOkQty = 1
+				}
+				else {
+					this.checkOkQty = this.deliverDtlMd.sumQty - this.deliverDtlMd.sumCheckQty
+				}
 				this.checkNgQty = 0
 				this.checkNgQty = 0
+			},
+			onKeyInput(event) {
+				if(this.deliverDtlMd.keyFlag) {
+					if(Number(this.checkNgQty) > 1) {
+						uni.showToast({
+							title: '关键件的不合格数量不能大于1,录入错误!',
+							icon: 'none',
+							duration: 1000
+						})
+						return;
+					}
+					if(Number(this.checkNgQty) == 1) {
+						this.checkOkQty = 0
+					}
+					if(Number(this.checkNgQty) == 0) {
+						this.checkOkQty = 1
+					}
+				}
 			}
 			}
 		}
 		}
 	}
 	}
@@ -163,4 +200,10 @@
 
 
 <style lang="scss">
 <style lang="scss">
 	@import '@/common/uni-nvue.css';
 	@import '@/common/uni-nvue.css';
+	.keyFlagRed {
+		color: red;
+	}
+	.keyFlagGray {
+		color: lightgray;
+	}
 </style>
 </style>

+ 7 - 0
TFT-PDA/pages/Instore/instoreOperate.vue

@@ -77,6 +77,10 @@
 					})
 					})
 					return;
 					return;
 				}
 				}
+				uni.showLoading({
+					title: "正在提交数据...",
+					mask: true,
+				})
 				let tmpMd = this.deliverDtlMd;
 				let tmpMd = this.deliverDtlMd;
 				tmpMd.instoreQty = this.instoreNum;
 				tmpMd.instoreQty = this.instoreNum;
 				let parm = {
 				let parm = {
@@ -91,11 +95,13 @@
 						uni.navigateBack({
 						uni.navigateBack({
 							url: '/pages/Inspect/inspectDtl',
 							url: '/pages/Inspect/inspectDtl',
 							success: () => {
 							success: () => {
+								uni.hideLoading()
 								uni.$emit('addInstoreData',tmpMd);
 								uni.$emit('addInstoreData',tmpMd);
 							}
 							}
 						});
 						});
 					}
 					}
 					else {
 					else {
+						uni.hideLoading()
 						uni.showToast({
 						uni.showToast({
 							title: '提交数据失败!' + retData.data.msg,
 							title: '提交数据失败!' + retData.data.msg,
 							icon: 'none',
 							icon: 'none',
@@ -108,6 +114,7 @@
 					}
 					}
 				}
 				}
 				else {
 				else {
+					uni.hideLoading()
 					uni.showToast({
 					uni.showToast({
 						title: '接口异常!' + retData.retMsg,
 						title: '接口异常!' + retData.retMsg,
 						icon: 'none',
 						icon: 'none',

+ 9 - 0
TFT-PDA/pages/tabBar/inspect/inspect.nvue

@@ -20,6 +20,10 @@
         	<text class="uni-navigate-text-my">质检结果-快速出库</text>
         	<text class="uni-navigate-text-my">质检结果-快速出库</text>
         	<text class="uni-navigate-icon-my uni-icon">&#xe470;</text>
         	<text class="uni-navigate-icon-my uni-icon">&#xe470;</text>
         </view>
         </view>
+        <!-- <view class="uni-navigate-item-my" @click="TestTmp">
+        	<text class="uni-navigate-text-my">测试使用</text>
+        	<text class="uni-navigate-icon-my uni-icon">&#xe470;</text>
+        </view> -->
 		<!-- 以下代码用于测试选择相册图片和拍照图片。 建议不要删除。保留好。 -->
 		<!-- 以下代码用于测试选择相册图片和拍照图片。 建议不要删除。保留好。 -->
 		<!-- <view class="demo">
 		<!-- <view class="demo">
 			<block v-if="imageSrc">
 			<block v-if="imageSrc">
@@ -199,6 +203,11 @@
 				uni.previewImage({
 				uni.previewImage({
 					urls: res == 1 ? this.previewImagePath : this.previewImagePath1
 					urls: res == 1 ? this.previewImagePath : this.previewImagePath1
 				});
 				});
+			},
+			TestTmp() {
+				uni.navigateTo({
+					url:"/pages/Inspect/TestPage001",
+				})
 			}
 			}
 		}
 		}
 	}
 	}