From 82a24ec670ac3d8dc7ed0b10b1885d79b39d473a Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 19 二月 2025 08:29:59 +0800
Subject: [PATCH] 1.缓存更新
---
H5/Js/cprk.js | 104 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 77 insertions(+), 27 deletions(-)
diff --git a/H5/Js/cprk.js b/H5/Js/cprk.js
index ef4bcbd..1b9f066 100644
--- a/H5/Js/cprk.js
+++ b/H5/Js/cprk.js
@@ -51,14 +51,22 @@
var json = res;
if (json.status == 0) {
//that.formData.sectionCode = json.data.tbBillList;
- that.$refs.barcode.focus();
+
+
+ if (that.formData.barcode == "" || that.formData.barcode == null) {
+ that.$refs.barcode.focus();
+ that.isLoading = false;
+ } else {
+ that.getScan();
+ }
}
else {
that.$toast.fail(json.message);
that.formData.sectionCode = null;
that.$refs.sectionCode.focus();
+ that.isLoading = false;
}
- that.isLoading = false;
+
})
.catch(function (error) {
@@ -69,11 +77,11 @@
that.$refs.sectionCode.focus();
});
},
- getScan() {
+ getBarInfo() {
var that = this;
that.isLoading = true;
- that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', {
+ that.AxiosHttp("post", 'MesCprk/GetBarInfo', {
sectionCode: that.formData.sectionCode,
userName: that.userInfo.loginAccount,
barcode: that.formData.barcode,
@@ -81,23 +89,26 @@
.then(function (res) {
var json = res;
if (json.status == 0) {
- that.formData.itemNo = json.data.tbBillList.itemNo;
- that.formData.sumQuantity = json.data.tbBillList.sumQuantity;
-
- that.itemInsFormData = json.data.tbBillList.itemIns;
- that.itemTableData = json.data.tbBillList.itemInDetails;
- that.tableData = json.data.tbBillList.invItemInCDetails;
- that.barMessage = json.data.tbBillList.message;
- that.$refs.barcode.focus();
- that.formData.barcode = null;
+ that.formData.itemNo = json.data.tbMesItems.itemNo;
+ that.formData.itemName = json.data.tbMesItems.itemName;
+ that.formData.itemModel = json.data.tbMesItems.itemModel;
+ that.formData.barQuantity = json.data.tbBillList.quantity;
+ that.formData.DAA001 = json.data.tbBillList.billNo;
+ //that.formData.sumQuantity = json.data.tbMesItems.quantity;
+ if (that.formData.sectionCode == "" || that.formData.sectionCode == null) {
+ that.$refs.sectionCode.focus();
+ that.isLoading = false;
+ } else {
+ that.getScan();
+ }
}
else {
that.$toast.fail(json.message);
that.$refs.barcode.focus();
that.formData.barcode = null;
+ that.isLoading = false;
}
- that.$notify({ type: 'success', message: json.message });
- that.isLoading = false;
+
})
.catch(function (error) {
that.isLoading = false;
@@ -106,33 +117,36 @@
that.$refs.barcode.focus();
});
},
- getChaiFen() {
+ getScan() {
var that = this;
- if (that.modeInfo.daa001.length <= 0) {
- that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+
+ if (that.formData.sectionCode.length * 1 <= 0) {
+ that.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖锛�");
return;
}
- if (that.scanInfo.splitNum * 1 <= 0) {
- that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
- return;
- }
- if (that.scanInfo.barcode.length * 1 <= 0) {
+ if (that.formData.barcode.length * 1 <= 0) {
that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
return;
}
that.isLoading = true;
- that.AxiosHttp("post", 'Womdaa/ScanCode', {
- daa001: that.modeInfo.daa001,
+ that.AxiosHttp("post", 'MesCprk/CPRK', {
userName: that.userInfo.loginAccount,
- barcode: that.modeInfo.barcode,
+ sectionCode: that.formData.sectionCode,
+ barcode: that.formData.barcode,
}, false)
.then(function (res) {
var json = res;
if (json.status == 0) {
- // that.modeInfo = json.data.tbBillList;
+ // that.modeInfo = json.data.tbBillList;
+ that.$refs.barcode.focus();
+ that.formData.barcode = null;
+ that.formData.cfNum = null;
+ that.$notify({ type: 'success', message: json.message });
}
else {
that.$toast.fail(json.message);
+ that.$refs.barcode.focus();
+ that.formData.barcode = null;
}
that.isLoading = false;
})
@@ -142,6 +156,42 @@
console.log(error);
});
},
+ //getChaiFen() {
+ // var that = this;
+ // if (that.modeInfo.daa001.length <= 0) {
+ // that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+ // return;
+ // }
+ // if (that.scanInfo.splitNum * 1 <= 0) {
+ // that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
+ // return;
+ // }
+ // if (that.scanInfo.barcode.length * 1 <= 0) {
+ // that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+ // return;
+ // }
+ // that.isLoading = true;
+ // that.AxiosHttp("post", 'Womdaa/ScanCode', {
+ // daa001: that.modeInfo.daa001,
+ // userName: that.userInfo.loginAccount,
+ // barcode: that.modeInfo.barcode,
+ // }, false)
+ // .then(function (res) {
+ // var json = res;
+ // if (json.status == 0) {
+ // // that.modeInfo = json.data.tbBillList;
+ // }
+ // else {
+ // that.$toast.fail(json.message);
+ // }
+ // that.isLoading = false;
+ // })
+ // .catch(function (error) {
+ // that.isLoading = false;
+ // that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ // console.log(error);
+ // });
+ //},
cleraCode() {
this.formData.sectionCode = null;
},
--
Gitblit v1.9.3