From 644cbe3e4eba765affa25454d69fee6286bb6094 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 30 十月 2025 13:06:35 +0800
Subject: [PATCH] 1
---
项目代码/PDA/pages/task/Inbound.vue | 116 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 64 insertions(+), 52 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
index 06ed47d..821c4ee 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
@@ -37,29 +37,29 @@
<uni-easyinput type="text" placeholder="璇锋壂鎻忓绠辨爣绛�" ref='midInput' :focus="focus" v-model="materSn"
@input="snInput" />
</uni-forms-item>
- <uni-list>
- <!-- <uni-list-item direction="column" v-for="item in InBoundOrder" :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.orderNo}}</view>
- </view>
+ <view v-if="group.length" class="scan-result">
+ <uni-card v-for="(item, index) in group" :key="item.orderNo">
+ <view class="info-grid">
+ <view class="info-row">
+ <text class="label">璁㈠崟缂栫爜锛�</text>
+ <text>{{ item.orderNo }}</text>
</view>
- </template>
- </uni-list-item> -->
- <uni-list-item direction="column" v-for="(item,index) in InBoundOrder" :key="item.sn">
- <template v-slot:body>
- <view class="uni-list-box">
- <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
- @click="deleteList(item.orderNo)">
- </uni-icons>
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">璁㈠崟鍞竴缂栫爜锛歿{item.orderNo}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
+ <br>
+ <view class="info-row">
+ <text class="label">浠撳簱鍚嶇О锛�</text>
+ <text>{{ item.warehouseName }}</text>
+ </view><br>
+ <view class="info-row">
+ <text class="label">鐗╂枡缂栫爜锛�</text>
+ <text>{{ item.materialNo }}</text>
+ </view><br>
+ <uni-forms-item label="缁勭洏鏁伴噺">
+ <uni-easyinput v-model="item.quantity" type="number" />
+ </uni-forms-item>
+ </view>
+ <uni-icons type="trash" class="delete-icon" @click="removeScanItem(item.orderNo)" />
+ </uni-card>
+ </view>
</uni-forms>
<button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
</view>
@@ -92,15 +92,15 @@
istrue: false,
barcodefocus: false,
range: [],
+ group: [],
AreaId: 0,
+ quantity: "",
SourceAddress: "",
TargetAddress: "",
PalletCode1: "",
PalletCode2: "",
PalletCode3: "",
materSn: "",
- InBoundOrder: [],
- OrderNos: [],
items: ['鍏ュ簱', '缁勭洏', '瑙g洏'],
current: 0
}
@@ -132,7 +132,6 @@
"TargetAddress": this.TargetAddress,
"AreaId": this.AreaId,
}
- console.log(param);
this.$u.post('/api/Task/RequestInboundTaskAsync', param).then(res => {
if (res.status) {
this.$refs.luToast.show({
@@ -162,17 +161,16 @@
}
var param = {
"PalletCode": this.PalletCode2,
- "OrderNos": this.OrderNos
+ "groups": this.group
}
- this.$u.post('/api/BoxingInfo/AddBoxingInfo', param).then(res => {
+ this.$u.post('/api/BoxingInfo/AddGroupPlateAsync', param).then(res => {
if (res.status) {
this.$refs.luToast.show({
title: res.message,
type: "success"
})
this.PalletCode2 = "";
- this.InBoundOrder = [];
- this.OrderNos = [];
+ this.group = [];
this.barcodefocus = false;
} else {
this.$refs.luToast.show({
@@ -182,8 +180,8 @@
}
})
},
-
- SolvePlate(){
+
+ SolvePlate() {
if (this.PalletCode3.length <= 0) {
this.$refs.luToast.show({
title: "璇疯緭鍏ユ墭鐩樻潯鐮�",
@@ -194,7 +192,7 @@
var param = {
"PalletCode": this.PalletCode3,
}
- this.$u.post('/api/BoxingInfo/DeleteBoxingInfoAsync', param).then(res => {
+ this.$u.post('/api/StockInfo/DeleteGroupPlateAsync', param).then(res => {
if (res.status) {
this.$refs.luToast.show({
title: res.message,
@@ -223,16 +221,26 @@
var matObj = {
orderNo: this.materSn,
}
- var temp = this.InBoundOrder.find(x => x.orderNo == matObj.orderNo);
+ var temp = this.group.find(x => x.orderNo == matObj.orderNo);
if (!temp) {
- this.InBoundOrder.push(matObj);
- this.OrderNos.push(this.materSn);
- setTimeout(this.updateFocus, 200);
- setTimeout(() => {
- this.voiceSpeech('../../static/success.mp3');
- }, 100);
+ this.$u.post('/api/InboundOrder/GetInboundOrderInfo?orderNo=' + this.materSn, "").then(
+ res => {
+ if (res.status) {
+ this.group.push(res.data);
+ setTimeout(this.updateFocus, 200);
+ setTimeout(() => {
+ this.voiceSpeech('../../static/success.mp3');
+ }, 100);
+ } else {
+ this.$refs.luToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ })
+
} else {
- this.$refs.uToast.show({
+ this.$refs.luToast.show({
title: "鎵爜閲嶅",
type: "error"
})
@@ -244,20 +252,24 @@
})
},
- deleteList(res) {
- this.InBoundOrder.map((item, index) => {
- console.log(res, item);
- if (item.orderNo == res) {
- this.InBoundOrder.splice(index, 1);
- }
- })
- this.OrderNos.map((item, index) => {
- if (item == res) {
- this.OrderNos.splice(index, 1);
- }
+ inputChangebarcode() {
+ this.$nextTick(() => {
+ this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
+ res => {
+ if (res.status) {
+ this.group=res.data;
+ console.log(this.group);
+ setTimeout(this.updateFocus, 200);
+ setTimeout(() => {
+ this.voiceSpeech('../../static/success.mp3');
+ }, 100);
+ }
+ })
})
},
-
+ removeScanItem(orderNo) {
+ this.group = this.group.filter(item => item.orderNo !== orderNo);
+ }
}
}
</script>
--
Gitblit v1.9.3