From 39d468b76e60c05ffcdf749f7ed1d3c443d542f8 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 30 四月 2026 17:13:05 +0800
Subject: [PATCH] 一堆需要求新增及更改

---
 项目代码/龙利得PDA/pages/stash/raworderboxing.vue |  438 +++++++++++++-----------------------------------------
 1 files changed, 104 insertions(+), 334 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/raworderboxing.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/raworderboxing.vue"
index 18d1f65..dbe1b1c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/raworderboxing.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/raworderboxing.vue"
@@ -2,144 +2,65 @@
 	<view>
 		<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
 		</uni-segmented-control>
-		<view class="content">
-			<view v-if="current === 0" class="headerstyle">
-				<view class="itemstyle">
-					<uni-forms label-width="180">
-						<uni-forms-item :label="label">
-						</uni-forms-item>
-						<uni-forms-item label="鎵樼洏鏉$爜:">
-							<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus"
-								v-model="barcode" @input="barcodeInput" />
-						</uni-forms-item>
-						<uni-forms-item label="鍐呯鏍囩:">
-							<uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="focus"
-								v-model="materSn" @input="snInput" />
-						</uni-forms-item>
-
-						<uni-forms-item :label="Testlabel" v-if="Test">
-							<uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput'
-								v-model="Initiallife" />
-						</uni-forms-item>
-
-						<!-- <uni-forms-item>
-							<checkbox checked="check">鏄惁婊$洏</checkbox>
-						</uni-forms-item> -->
-						<uni-forms-item>
-							<view style="display: flex;justify-content: space-around;margin-top: 2%;">
-								<button @click="reset" type="default" size="default"
-									style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
-								<button @click="submit" type="primary" size="default" style="width: 160rpx;">缁勭洏</button>
+		<view v-if="current === 0" class="headerstyle">
+			<view class="itemstyle">
+				<uni-forms label-width="180">
+					<uni-forms-item :label="label">
+					</uni-forms-item>
+					<uni-forms-item label="鎵樼洏鏉$爜:">
+						<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus"
+							v-model="barcode" @input="barcodeInput" />
+					</uni-forms-item>
+					<uni-forms-item label="澶栫鏍囩:">
+						<uni-easyinput type="text" placeholder="璇锋壂鎻忓绠辨爣绛�" ref='midInput' :focus="snFocus"
+							v-model="materSn" @input="snInput" />
+					</uni-forms-item>
+		
+					<!-- <uni-forms-item>
+						<checkbox checked="check">鏄惁婊$洏</checkbox>
+					</uni-forms-item> -->
+					<uni-forms-item>
+						<view style="display: flex;justify-content: space-around;margin-top: 2%;">
+							<button @click="reset" type="default" size="default"
+								style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
+							<button @click="submit" type="primary" size="default" style="width: 160rpx;">缁勭洏</button>
+						</view>
+					</uni-forms-item>
+				</uni-forms>
+				<uni-list>
+					<uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index">
+						<template v-slot:body>
+							<view class="uni-list-box">
+								<uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
+									@click="deleteList(index)">
+								</uni-icons>
+								<view class="uni-content">
+									<view class="uni-title-sub uni-ellipsis-2">鎴愬搧绠辩爜锛歿{item.barCode}}</view>
+									<view class="uni-note">鐢熶骇鍗曞彿锛歿{item.productOrderNo}}</view>
+									<view class="uni-note">鐗╂枡缂栫爜锛歿{item.materialCode}}</view>
+									<view class="uni-note">鏁伴噺锛歿{item.proQuantity}}</view>
+								</view>
 							</view>
-						</uni-forms-item>
-					</uni-forms>
-					<uni-list>
-						<!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
-							<template v-slot:body>
-								<view class="uni-list-box">
-									<view class="uni-content">
-										<view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栫爜锛歿{item.matCode}}</view>
-										<view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item> -->
-						<uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index">
-							<template v-slot:body>
-								<view class="uni-list-box">
-									<uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
-										@click="deleteList(index)">
-									</uni-icons>
-									<view class="uni-content">
-										<view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
-										<view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
-										<view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
-										<view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
-										<view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
-										<view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
+						</template>
+					</uni-list-item>
+				</uni-list>
 			</view>
-			<view v-if="current === 1" class="headerstyle">
-				<view class="itemstyle">
-					<uni-forms label-width="120">
-						<uni-forms-item label="鎵樼洏鏉$爜">
-							<uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
-								placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @input="inputChangebarcode" />
-						</uni-forms-item>
-						<uni-forms-item label="鍦板潃鏉$爜">
-							<uni-easyinput type="text" v-model="address" :disabled="addressdisabled"
-								placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' :focus="addressFocus" />
-						</uni-forms-item>
-						<uni-forms-item>
-							<button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
-						</uni-forms-item>
-					</uni-forms>
-				</view>
-			</view>
-			<view v-if="current === 2" class="headerstyle">
-				<view class="itemstyle">
-					<uni-list :border="true">
-						<uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="index">
-							<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.materielCode}}</view>
-										<view>鐗╂枡鍚嶇О锛歿{item.materielName}}</view>
-										<view>鐗╂枡瑙勬牸锛歿{item.materielSpec}}</view>
-										<!-- <view style="font-size: 18px;">鐗╂枡鍚嶇О锛歿{item.matName}}</view> -->
-										<view style="font-size: 18px;">鏁伴噺锛歿{item.orderQuantity+item.unit}}</view>
-										<view style="font-size: 18px;">缁勭洏鏁伴噺锛歿{item.receiptQuantity}}</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
-			</view>
-			<view v-if="current === 3" class="headerstyle">
-				<view class="itemstyle">
-					<uni-forms label-width="180">
-						<uni-forms-item label="鍐呯鏍囩:">
-							<uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="!pkfocus"
-								v-model="pkmaterSn" @input="pksnInput" />
-						</uni-forms-item>
-
-						<uni-forms-item>
-							<view style="display: flex;justify-content: space-around;margin-top: 2%;">
-								<button @click="resetInPk" type="default" size="default"
-									style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
-								<button @click="pksubmit" type="primary" size="default"
-									style="margin-top: 2%;">鍏ュ钩搴�</button>
-							</view>
-						</uni-forms-item>
-
-					</uni-forms>
-					<uni-list>
-						<uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index">
-							<template v-slot:body>
-								<view class="uni-list-box">
-									<uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
-										@click="pkdeleteList(index)">
-									</uni-icons>
-									<view class="uni-content">
-										<view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
-										<view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
-										<view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
-										<view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
-										<view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
-										<view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
+		</view>
+		<view v-if="current === 1" class="headerstyle">
+			<view class="itemstyle">
+				<uni-forms label-width="120">
+					<uni-forms-item label="鎵樼洏鏉$爜">
+						<uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
+							placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @input="inputChangebarcode" />
+					</uni-forms-item>
+					<uni-forms-item label="鍦板潃鏉$爜">
+						<uni-easyinput type="text" v-model="address"
+							placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' :focus="addressFocus" />
+					</uni-forms-item>
+					<uni-forms-item>
+						<button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
+					</uni-forms-item>
+				</uni-forms>
 			</view>
 		</view>
 		<u-toast ref="uToast" />
@@ -151,20 +72,15 @@
 	export default {
 		data() {
 			return {
-				items: ['缁勭洏', '鍏ュ簱', '鍗曟嵁淇℃伅'], //, '瑙g洏'
+				items: ['缁勭洏', '鍏ュ簱'], //, '瑙g洏'
 				current: 0,
-				matTotal: [],
 				matInfos: [],
-				orderNo: "",
 				label: "",
-				orderInfo: [],
 				focus: false,
-				pkfocus: false,
+				snFocus: false,
 				barcode: "",
 				materSn: "",
-				Initiallife: 1000,
 				sns: [],
-				pksns: [],
 				addressFocus: false,
 				inboundBarcode: "",
 				address: "",
@@ -174,40 +90,12 @@
 				value2: "",
 				matTotals: [],
 				warehouseId: "",
-				Test: false,
-				Testlabel: "",
-				Testplaceholder: "",
-				Testcheck: false,
-				pkmaterSn: "",
-				pkmatInfos: [],
-				addressdisabled: false
 			}
 		},
 		onShow() {},
 		onLoad(res) {
 			this.focus = false;
 			this.addressFocus = false;
-			this.orderNo = res.orderNo;
-			this.warehouseId = res.warehouseId;
-			if (this.warehouseId == 6) { //娴嬭瘯鏋朵粨搴撳尯ID
-				this.Test = true;
-				this.Testlabel = "鍒濆瀵垮懡:";
-				this.Testplaceholder = "璇疯緭鍏ュ垵濮嬪鍛�";
-			} else if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
-				this.Test = true;
-				this.Testlabel = "鏁伴噺:";
-				this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
-				this.Initiallife = 16;
-			} else if (this.warehouseId == 5) { //杈呮枡
-				this.items.push("鍏ュ钩搴�");
-				this.items[1] = "鍏ョ珛搴�";
-				this.address = "8005";
-			} else if (this.warehouseId == 3) { //杈呮枡
-				this.address = "1011";
-				this.addressdisabled = true;
-			}
-			this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
-			this.getData();
 		},
 		methods: {
 			// voiceSpeech(src) {
@@ -230,21 +118,6 @@
 					this.focus = false;
 				}
 			},
-			getData() {
-				var postData = {
-					MainData: {
-						orderNo: this.orderNo
-					},
-				}
-				this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => {
-					if (res.status) {
-						this.orderInfo = res.data;
-						if (this.orderInfo.length > 3) {
-							this.loadVisible = true;
-						}
-					}
-				})
-			},
 			onClickItem(e) {
 				this.focus = false;
 				this.addressFocus = false;
@@ -260,6 +133,7 @@
 					if (this.barcode.length > 0) {
 						// if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
 						this.focus = true;
+						this.snFocus=true;
 						// } else {
 						// 	this.$refs.uToast.show({
 						// 		title: "鎵爜閿欒,璇锋壂鎻忔墭鐩樼爜",
@@ -272,87 +146,61 @@
 			snInput() {
 				this.$nextTick(() => {
 					if (this.materSn != "") {
-						this.focus = false;
 						var matSn = this.materSn;
-						if (this.warehouseId == 11) {
-							matSn = matSn.replace(/,SC.*/, '');
-						}
 						//鏌ヨmatSn鏄惁瀛樺湪瀛楃
-						if(matSn.indexOf("POHA")>0){
-							this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
-								this.Testcheck = false;
-								if (res.status) {
-									this.sns.push(res.data.serialNumber);
-							
-									this.matInfos.push(res.data);
-									if (res.message) {
+						this.$u.post('/api/Task/CodeAnalysis?barcode=' + matSn, {}).then((res) => {
+							if (res.status) {
+								//鍒ゆ柇this.sns涓槸鍚﹀寘鍚玶es.data.barCode
+								if (this.sns.indexOf(res.data.barCode) != -1) {
+									this.$refs.uToast.show({
+										title: res.data.barCode+"璇峰嬁閲嶅鎵弿",
+										type: "error"
+									})
+									setTimeout(() => {
+										this.materSn = "";
+									}, 100);
+									return;
+								}
+								//鍒ゆ柇this.matInfos涓殑productOrderNo鍜宮aterialCode鏄惁涓巖es.data涓殑productOrderNo鍜宮aterialCode鐩稿悓
+								for (var i = 0; i < this.matInfos.length; i++) {
+									if (this.matInfos[i].productOrderNo != res.data.productOrderNo || this.matInfos[i].materialCode != res.data.materialCode) {
 										this.$refs.uToast.show({
-											title: res.message,
+											title: res.data.barCode+"鐢熶骇鍗曞彿鎴栫墿鏂欑紪鐮佷笌宸叉壂涓嶄竴鑷�",
 											type: "error"
 										})
-										// setTimeout(() => {
-										// 	this.voiceSpeech('../../static/fail.mp3');
-										// }, 100);
+										setTimeout(() => {
+											this.materSn = "";
+										}, 100);
 										return;
 									}
-									// setTimeout(() => {
-									// 	this.voiceSpeech('../../static/success.mp3');
-									// }, 100);
-								} else {
+								}
+								this.sns.push(res.data.barCode);
+								this.matInfos.push(res.data);
+								if (res.message) {
 									this.$refs.uToast.show({
 										title: res.message,
-										type: "error"
+										type: "success"
 									})
 									// setTimeout(() => {
 									// 	this.voiceSpeech('../../static/fail.mp3');
-									// }, 100);
-								}
-							})
-						}
-						setTimeout(() => {
-							this.materSn = "";
-						}, 100);
-					}
-				})
-			},
-			pksnInput() {
-				this.$nextTick(() => {
-					if (this.pkmaterSn != "") {
-						
-						var matSn = this.pkmaterSn;
-						
-						if(matSn.indexOf("POHA")>0){
-							this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
-								if (res.status) {
-									this.pksns.push(res.data.serialNumber);
-									this.pkmatInfos.push(res.data);
-									if (!res.status) {
-										this.$refs.uToast.show({
-											title: res.message,
-											type: "error"
-										})
-										// setTimeout(() => {
-										// 	this.voiceSpeech('../../static/fail.mp3');
-										// }, 100);
-										return;
-									}
-									// setTimeout(() => {
-									// 	this.voiceSpeech('../../static/success.mp3');
 									// }, 100);
 									return;
-								} else {
-									this.$refs.uToast.show({
-										title: res.message,
-										type: "error"
-									})
-									// 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.pkmaterSn = "";
+							this.materSn = "";
 						}, 100);
 					}
 				})
@@ -372,17 +220,10 @@
 					})
 					return;
 				}
-				var postData = {
-					MainData: {
-						"barcode": this.inboundBarcode,
-						"startPoint": this.address,
-						"warehouseId": this.warehouseId
-					}
-				}
-				this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
+				this.$u.post('/api/Task/DeviceRequestInboundTaskSimple?stationCode='+this.inboundBarcode+'&startPoint='+this.address,).then(res => {
 					if (res.status) {
 						this.inboundBarcode = "";
-						if (this.warehouseId != 5) this.address = "";
+						this.address = "";
 						setTimeout(() => {
 							this.addressFocus = false;
 							this.$refs.uToast.show({
@@ -421,44 +262,10 @@
 			},
 			reset() {
 				this.barcode = "";
+				this.snFocus=false;
 				this.matInfos = [];
 				this.sns = [];
 				this.materSn = "";
-				if (this.warehouseId = !6) {
-					this.Initiallife = 0;
-				}
-			},
-			resetInPk() {
-				this.pkmaterSn = "";
-				this.pkfocus = false;
-				this.pkmatInfos = [];
-				this.pksns = [];
-			},
-			pksubmit() {
-				if (this.pkmatInfos.length == 0) {
-					this.$refs.uToast.show({
-						title: "璇锋壂鎻忓唴绠辨爣绛�",
-						type: 'error'
-					})
-					return;
-				}
-				this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this
-					.pksns).then(res => {
-					if (res.status) {
-						this.$refs.uToast.show({
-							title: "鍏ュ簱鎴愬姛",
-							type: "success"
-						})
-						this.pkfocus = false;
-						this.pkmatInfos = [];
-						this.pksns = [];
-					} else {
-						this.$refs.uToast.show({
-							title: res.message,
-							type: "error"
-						})
-					}
-				})
 			},
 			submit() {
 				if (this.barcode == "") {
@@ -470,45 +277,12 @@
 				}
 				if (this.matInfos.length == 0) {
 					this.$refs.uToast.show({
-						title: "璇锋壂鎻忓唴绠辨爣绛�",
+						title: "璇锋壂鎻忓绠辨爣绛�",
 						type: 'error'
 					})
 					return;
 				}
-				if (this.Test) {
-					if (!this.Testcheck) {
-						this.Testcheck = true;
-						if (this.warehouseId == 2) {
-							this.$refs.uToast.show({
-								title: "璇风‘璁ゆ暟閲�",
-								type: 'error'
-							})
-						} else if (this.warehouseId == 6) {
-							this.$refs.uToast.show({
-								title: "璇风‘璁ゅ垵濮嬪鍛�",
-								type: 'error'
-							})
-						}
-						return;
-					}
-				}
-				if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
-					this.sn = this.sns[0];
-					for (var i = 0; i < this.Initiallife - 1; i++) {
-						this.sns.push(this.sn);
-					}
-				}
-				this.$u.post('/api/InboundOrder/MaterielGroup', {
-					MainData: {
-						"palletCode": this.barcode,
-						"orderNo": this.orderNo,
-						"initiallife": this.Initiallife,
-						// "isFull": this.check
-						"warehouseId": this.warehouseId
-					},
-					DelKeys: this.sns
-				}).then(res => {
-					this.Testcheck = false;
+				this.$u.post('/api/Task/BoxingInBound?type=1&stationCode='+this.barcode,this.sns).then(res => {
 					if (res.status) {
 						this.$refs.uToast.show({
 							title: "缁勭洏鎴愬姛",
@@ -518,10 +292,6 @@
 						this.barcode = "";
 						this.matInfos = [];
 						this.sns = [];
-						this.matTotal = [];
-						if (this.warehouseId != 6) { //娴嬭瘯鏋朵粨搴撳尯ID
-							this.Initiallife = "";
-						}
 					} else {
 						this.$refs.uToast.show({
 							title: res.message,

--
Gitblit v1.9.3