From 56827df8730c172c6c654fb78fed073ef8d694cb Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 23 十月 2025 19:22:39 +0800
Subject: [PATCH] 优化入库单处理
---
新建文件夹/PDA/pages/stash/raworderboxing.vue | 103 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 79 insertions(+), 24 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/raworderboxing.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/raworderboxing.vue"
index 5463f45..e1ac0c7 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/raworderboxing.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/raworderboxing.vue"
@@ -37,7 +37,8 @@
<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: 200rpx;">纭鍏ュ簱</button>
+ <button @click="submit" type="primary" size="default"
+ style="width: 200rpx;">纭鍏ュ簱</button>
</view>
</uni-forms-item>
</uni-forms>
@@ -135,13 +136,13 @@
matTotal: [],
matInfos: [],
orderNo: "",
- batchNo:"",
- orderqty:"",
- Inqty:"",
- goods_no:"",
- batch_num:"",
- order_qty:"",
- order_Inqty:"",
+ batchNo: "",
+ orderqty: 0,
+ Inqty: 0,
+ goods_no: "",
+ batch_num: "",
+ order_qty: "",
+ order_Inqty: "",
label: "",
orderInfo: [],
focus: false,
@@ -174,15 +175,15 @@
this.focus = false;
this.addressFocus = false;
this.orderNo = res.orderNo;
- this.Inqty=res.order_Inqty;
- this.orderqty=res.order_qty;
- this.batchNo=res.batchNo;
+ this.Inqty = res.order_Inqty;
+ this.orderqty = res.order_qty;
+ this.batchNo = res.batchNo;
this.warehouseId = res.warehouseId;
this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
- this.batch_num="鎵规鍙凤細"+res.batchNo;
- this.order_qty="鍗曟嵁鏁伴噺锛�"+res.order_qty;
- this.order_Inqty="宸插叆搴撴暟閲忥細"+this.Inqty;
- this.goods_no="鐗╂枡缂栧彿锛�"+res.goods_no;
+ this.batch_num = "鎵规鍙凤細" + res.batchNo;
+ this.order_qty = "鍗曟嵁鏁伴噺锛�" + res.order_qty;
+ this.order_Inqty = "宸插叆搴撴暟閲忥細" + this.Inqty;
+ this.goods_no = "鐗╂枡缂栧彿锛�" + res.goods_no;
this.getData();
},
methods: {
@@ -254,12 +255,12 @@
matSn = matSn.replace(/,SC.*/, '');
}
//鏌ヨmatSn鏄惁瀛樺湪瀛楃
- if(matSn.indexOf("POHA")>0){
+ 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.$refs.uToast.show({
@@ -294,10 +295,10 @@
pksnInput() {
this.$nextTick(() => {
if (this.pkmaterSn != "") {
-
+
var matSn = this.pkmaterSn;
-
- if(matSn.indexOf("POHA")>0){
+
+ if (matSn.indexOf("POHA") > 0) {
this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
if (res.status) {
this.pksns.push(res.data.serialNumber);
@@ -451,6 +452,9 @@
})
return;
}
+ uni.showLoading({
+ title: '鎻愪氦涓�...'
+ });
this.$u.post('/api/CabinOrder/FeedbackIn', {
MainData: {
"LocationCode": this.barcode,
@@ -461,23 +465,74 @@
},
DelKeys: this.sns
}).then(res => {
+ uni.hideLoading();
this.Testcheck = false;
if (res.status) {
this.$refs.uToast.show({
title: "鍏ュ簱鎴愬姛",
type: "success"
})
- this.Inqty=res.message;
- this.order_Inqty="宸插叆搴撴暟閲忥細"+this.Inqty;
- this.barcode="";
- this.materSn="";
+ this.Inqty = parseInt(res.message);
+ this.order_Inqty = "宸插叆搴撴暟閲忥細" + this.Inqty;
+ this.barcode = "";
+ this.materSn = "";
+ if (this.Inqty == this.orderqty) {
+ uni.setStorageSync('isLoaded', true);
+ this.handleInboundComplete();
+ }
} else {
this.$refs.uToast.show({
title: res.message,
type: "error"
})
}
+ }).catch(err => {
+ uni.hideLoading();
+ this.$refs.uToast.show({
+ title: "缃戠粶閿欒锛岃閲嶈瘯",
+ type: "error"
+ })
})
+ },
+ // 鏂板鏂规硶澶勭悊鍏ュ簱瀹屾垚閫昏緫
+ handleInboundComplete() {
+ // 鏄剧ず瀹屾垚鎻愮ず
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: '鍏ュ簱宸插畬鎴愶紝鏄惁杩斿洖棣栭〉锛�',
+ // success: (res) => {
+ // if (res.confirm) {
+ // // 鐢ㄦ埛鐐瑰嚮纭畾
+ // setTimeout(() => {
+ // // uni.redirectTo({
+ // // url: '/pages/stash/inboundorder?warehouseId='+this.warehouseId // 鏇挎崲涓轰綘鐨勭洰鏍囬〉闈㈣矾寰�
+ // // });
+ // uni.navigateBack({
+ // delta: 2
+ // });
+ // }, 500);
+ // } else {
+ // // 鐢ㄦ埛鐐瑰嚮鍙栨秷锛屽彲浠ュ仠鐣欏湪褰撳墠椤甸潰
+ // // 鎴栬�呮墽琛屽叾浠栨搷浣�
+ // }
+ // }
+ // });
+
+ // 鎴栬�呯洿鎺ヨ烦杞紙涓嶈闂敤鎴凤級
+ setTimeout(() => {
+ // 鏂瑰紡2锛氳烦杞埌鎸囧畾椤甸潰
+ // uni.redirectTo({
+ // url: '/pages/order/list' // 鏇挎崲涓轰綘鐨勭洰鏍囬〉闈㈣矾寰�
+ // });
+ // 鏂瑰紡3锛氳烦杞埌棣栭〉
+ // uni.switchTab({
+ // url: '/pages/index/index'
+ // });
+ // 鏂瑰紡1锛氫娇鐢╱ni.navigateBack杩斿洖涓婁竴椤�
+ uni.navigateBack({
+ delta: 2
+ });
+ }, 600);
}
}
}
--
Gitblit v1.9.3