From 95e39ae7aecd6e1016c71cf5ae70a680d8f569bb Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 29 四月 2025 10:48:30 +0800
Subject: [PATCH] 上传最新代码

---
 代码管理/淮安PDA/pages/stash/receiveorderoutbound.vue |  155 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 95 insertions(+), 60 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
index ada9295..a24cf23 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
@@ -8,7 +8,7 @@
 					<uni-forms-item :label="label" style="margin-top: -20px;"></uni-forms-item>
 					<!-- <uni-forms-item label="鍗曟嵁绫诲瀷锛氱敓浜ч鏂欏崟" style="margin-top: -20px;"></uni-forms-item> -->
 					<uni-forms-item label="鍐呯鐮侊細" style="margin-top: -20px;">
-						<uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辩爜" ref='midInput' :focus="focus"
+						<uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辩爜" ref='midInput' :focus="!focus"
 							v-model="innerCode" @input="innercodeInput" />
 					</uni-forms-item>
 					<uni-forms-item :label="PurchaseOrderNo" style="margin-top: -20px;"></uni-forms-item>
@@ -22,20 +22,24 @@
 					</uni-forms-item>
 				</uni-forms>
 				<uni-forms-item>
-					<button @click="submit" type="primary" size="default" style="margin-top: 2%;">纭鏀惰揣</button>
+					<view class="uni-flex uni-row" style="justify-content: space-between;margin-top: 2%;height: 45px;width: 520rpx;margin: 0px auto;">
+						<view>
+							<button @click="resetReceive" type="default" size="default" style="width: 200rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
+						</view>
+						<view>
+							<button @click="submit" type="primary" size="default" style="width: 220rpx;">纭鏀惰揣</button>
+						</view>
+					</view>
 				</uni-forms-item>
 				<uni-forms-item>
-					<button @click="submit1" type="primary" size="default" style="margin-top: 2%;">瀹屾垚鏀惰揣</button>
+					<view style="margin-top: 2%;height: 45px;width: 520rpx;margin: 0px auto;">
+						<button @click="submit1" type="primary" size="default" style="margin-top: 2%;backgroundColor:#1AAD19;borderColor:#1AAD19">瀹屾垚鏀惰揣</button>
+					</view>
 				</uni-forms-item>
 			</view>
 		</view>
 		<view v-if="current === 1" class="headerstyle">
 			<view class="itemstyle">
-				<u-sticky>
-					<!-- <view style="background-color: #ffffff;">
-						<uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
-					</view> -->
-				</u-sticky>
 				<!-- <uni-forms label-width="180">
 					<uni-forms-item label="鍖哄煙">
 						<uni-data-select v-if="show" v-model="value" :localdata="range"></uni-data-select>
@@ -48,18 +52,18 @@
 					</uni-forms-item>
 				</uni-forms> -->
 				<uni-list :border="true">
-					<uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="item.dtlId">
+					<uni-list-item direction="column" v-for="item in orderinfoDetails" :key="item.id">
 						<template v-slot:body>
-							<view class="uni-list-box">
 								<view class="uni-content">
-									<view style="font-size: 18px;">鏀惰揣鍗曞彿锛歿{orderNo}}</view>
-									<view style="font-size: 18px;">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
-									<view style="font-size: 18px;">鐗╂枡缂栧彿锛歿{item.materielCode}}</view>
-									<view style="font-size: 18px;">鎵规鍙凤細{{item.lotNo}}</view>
-									<view style="font-size: 18px;">鏀惰揣鏁伴噺锛歿{item.receivedQuantity}}</view>
-									<view style="font-size: 18px;">鏄惁璐ㄦ锛歿{item.ifInspection==1?"鏄�":"鍚�"}}</view>
+									<view>鏀惰揣鍗曞彿锛歿{orderNo}}</view>
+									<view>閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
+									<view>鐗╂枡缂栧彿锛歿{item.materielCode}}</view>
+									<view>鐗╂枡鍚嶇О锛歿{item.materielName}}</view>
+									<view>鐗╂枡瑙勬牸锛歿{item.materielSpec}}</view>
+									<view>鎵规鍙凤細{{item.lotNo}}</view>
+									<view>鏀惰揣鏁伴噺锛歿{item.receivedQuantity}}</view>
+									<view>鏄惁璐ㄦ锛歿{item.ifInspection==1?"鏄�":"鍚�"}}</view>
 								</view>
-							</view>
 						</template>
 					</uni-list-item>
 				</uni-list>
@@ -182,6 +186,7 @@
 				current: 0,
 				orderNo: "",
 				orderInfo: [],
+				orderinfoDetails:[],
 				label: "",
 				innerCode: "",
 				PurchaseOrderNo: "閲囪喘鍗曞彿锛�",
@@ -198,7 +203,7 @@
 				remaindQty: "瀹為檯鏁伴噺锛�",
 				tagFocus: true,
 				numberFocus: false,
-				focus: true,
+				focus: false,
 				tag: "",
 				number: "",
 				tagmatCode: "鐗╂枡缂栫爜锛�",
@@ -225,6 +230,7 @@
 				endTypeRange: [],
 				sns: "",
 				receiveOrderId: 0,
+				warehouseId:""
 			}
 		},
 
@@ -240,6 +246,7 @@
 			this.orderNo = res.orderNo;
 			this.receiveOrderId = res.receiveOrderId;
 			this.label = "鏀惰揣鍗曞彿锛�" + this.orderNo;
+			this.warehouseId=res.warehouseId;
 			this.getData();
 		},
 		mounted() {
@@ -257,12 +264,25 @@
 				this.itemCode = itemCode;
 				this.$refs.inputDialog.open()
 			},
-			voiceSpeech(src) {
-				innerAudioContext.src = src; // '../../static/success.mp3';
-				innerAudioContext.play();
-			},
+			// voiceSpeech(src) {
+			// 	innerAudioContext.src = src; // '../../static/success.mp3';
+			// 	innerAudioContext.play();
+			// },
 			search() {
 				this.getData();
+			},
+			resetReceive(){
+				this.PurchaseOrderNo="閲囪喘鍗曞彿锛�";
+				this.matCode="鐗╂枡缂栫爜锛�";
+				this.LotNo="鐗╂枡鎵规锛�";
+				this.orderQty="璁㈠崟鏁伴噺锛�";
+				this.ProductionDate="鐢熶骇鏃ユ湡锛�";
+				this.EffectiveDate="鏈夋晥鏃ユ湡锛�";
+				this.Quantity="";
+				setTimeout(() => {
+					this.innerCode="";
+					this.focus=false;
+				}, 10);
 			},
 			releasebox() {
 				if (this.releasevalue.length == 0) {
@@ -370,15 +390,32 @@
 					})
 					return;
 				}
+				if(this.warehouseId==2){
+					//鏇挎崲鎸囧畾涓や釜瀛楃闂寸殑瀛楃
+					this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
+					  return p1 + this.Quantity + p3;
+					});
+				}
 				this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
 					.orderNo, {}).then(res => {
 					if (res.status) {
+						this.PurchaseOrderNo="閲囪喘鍗曞彿锛�";
+						this.matCode="鐗╂枡缂栫爜锛�";
+						this.LotNo="鐗╂枡鎵规锛�";
+						this.orderQty="璁㈠崟鏁伴噺锛�";
+						this.ProductionDate="鐢熶骇鏃ユ湡锛�";
+						this.EffectiveDate="鏈夋晥鏃ユ湡锛�";
+						this.Quantity="";
+						setTimeout(() => {
+							this.innerCode="";
+							this.focus=false;
+						}, 100);
+						this.orderInfo=[];
+						this.sns = "";
 						this.$refs.uToast.show({
 							title: "纭鏀惰揣鎴愬姛",
 							type: "success"
 						})
-						this.orderInfo=[];
-						this.sns = "";
 					} else {
 						this.$refs.uToast.show({
 							title: res.message,
@@ -453,6 +490,7 @@
 				})
 			},
 			onClickItem(e) {
+				console.log(1)
 				this.focus = false;
 				this.addressFocus = false;
 				if (this.current !== e.currentIndex) {
@@ -471,8 +509,8 @@
 				}
 				this.$u.post('/api/ReceiveOrderDetail/GetReceiveOrderInfos', postData).then((res) => {
 					if (res.status) {
-						this.orderInfo = res.data;
-						if (this.orderInfo.length > 3) {
+						this.orderinfoDetails = res.data;
+						if (this.orderinfoDetails.length > 3) {
 							this.loadVisible = true;
 						}
 					}
@@ -484,45 +522,42 @@
 						return;
 					}
 					var innerCode = this.innerCode;
-					setTimeout(() => {
-						this.innerCode = "";
-					}, 10);
-
-					this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + innerCode, {}).then((res) => {
-						if (res.status) {
-							this.sns = res.data.serialNumber;
-							// this.matInfos.splice(0, this.matInfos.length);
-							// this.matInfos.push(res.data);
-							this.matCode = "鐗╂枡缂栫爜锛�" + res.data.materielCode;
-							this.LotNo = "鐗╂枡鎵规锛�" + res.data.lotNo;
-							this.PurchaseOrderNo = "閲囪喘鍗曞彿锛�" + res.data.purchaseOrderNo;
-							this.EffectiveDate = "鏈夋晥鏃ユ湡锛�" + res.data.effectiveDate;
-							this.ProductionDate = "鐢熶骇鏃ユ湡锛�" + res.data.productionDate;
-							this.orderQty = "璁㈠崟鏁伴噺锛�" + res.data.quantity;
-							this.Quantity = res.data.quantity;
-							if (res.message) {
+					//灏唅nnerCode,SC鍚庨潰鐨勮繘琛屾浛鎹㈢┖
+					if(this.warehouseId==11){
+						innerCode=innerCode.replace(/,SC.*/, '');
+					}
+					
+					if(innerCode.indexOf("POHA")>0){
+						this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + innerCode, {}).then((res) => {
+							if (res.status) {
+								this.sns = res.data.serialNumber;
+								// this.matInfos.splice(0, this.matInfos.length);
+								// this.matInfos.push(res.data);
+								this.matCode = "鐗╂枡缂栫爜锛�" + res.data.materielCode;
+								this.LotNo = "鐗╂枡鎵规锛�" + res.data.lotNo;
+								this.PurchaseOrderNo = "閲囪喘鍗曞彿锛�" + res.data.purchaseOrderNo;
+								this.EffectiveDate = "鏈夋晥鏃ユ湡锛�" + res.data.effectiveDate;
+								this.ProductionDate = "鐢熶骇鏃ユ湡锛�" + res.data.productionDate;
+								this.orderQty = "璁㈠崟鏁伴噺锛�" + res.data.quantity;
+								this.Quantity = res.data.quantity;
+								// setTimeout(() => {
+								// 	this.voiceSpeech('../../static/success.mp3');
+								// }, 100);
+							} else {
 								this.$refs.uToast.show({
 									title: res.message,
 									type: "error"
 								})
-								setTimeout(() => {
-									this.voiceSpeech('../../static/fail.mp3');
-								}, 100);
-								return;
+								// setTimeout(() => {
+								// 	this.voiceSpeech('../../static/fail.mp3');
+								// }, 100);
 							}
-							setTimeout(() => {
-								this.voiceSpeech('../../static/success.mp3');
-							}, 100);
-						} else {
-							this.$refs.uToast.show({
-								title: res.message,
-								type: "error"
-							})
-							setTimeout(() => {
-								this.voiceSpeech('../../static/fail.mp3');
-							}, 100);
-						}
-					})
+						})
+					}
+					setTimeout(() => {
+						this.innerCode = "";
+						this.focus=true;
+					}, 100);
 				})
 			},
 			tagInput() {

--
Gitblit v1.9.3