From 52dbfd767f2485a1d615c5d9db50d648a1d8214a Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期二, 23 十二月 2025 23:56:58 +0800
Subject: [PATCH] 生产报工模糊查询
---
H5/Js/BarCfBefore.js | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/H5/Js/BarCfBefore.js b/H5/Js/BarCfBefore.js
index eb0c438..ced1062 100644
--- a/H5/Js/BarCfBefore.js
+++ b/H5/Js/BarCfBefore.js
@@ -10,7 +10,7 @@
formData: {
barcode: "",
itemNo: "",
- sumQuantity: 0
+ sumQuantity:0
},
itemInsFormData: {},
tableData: [],
@@ -66,7 +66,7 @@
//},
getScan() {
var that = this;
-
+
that.isLoading = true;
that.AxiosHttp("post", 'MesBarCF/GetBarInfoBefore', {
barcode: that.formData.barcode,
@@ -74,7 +74,7 @@
.then(function (res) {
var json = res;
if (json.status == 0) {
-
+
that.formData.sumQuantity = json.data.tbBillList.quantity;
that.formData.itemNo = json.data.tbMesItems.itemNo;
@@ -87,12 +87,10 @@
//that.barMessage = json.data.tbBillList.message;
//that.$refs.barcode.focus();
//that.formData.barcode = null;
- that.$playSound('success');
that.$refs.cfNum.focus();
}
else {
that.$toast.fail(json.message);
- that.$playSound('error');
that.$refs.barcode.focus();
that.formData.barcode = null;
}
@@ -102,7 +100,6 @@
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.$playSound('error');
console.log(error);
that.$refs.barcode.focus();
});
@@ -116,19 +113,16 @@
if (that.formData.cfNum * 1 <= 0) {
that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
- that.$playSound('error');
return;
}
- // ... existing code ...
+
if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) {
that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
- that.$playSound('error');
return;
}
- // ... existing code ...
+
if (that.formData.barcode.length * 1 <= 0) {
that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
- that.$playSound('error');
return;
}
that.isLoading = true;
@@ -146,7 +140,6 @@
that.$refs.barcode.focus();
that.formData.barcode = null;
that.formData.cfNum = null;
- that.$playSound('success');
that.$notify({ type: 'success', message: json.message });
}
else {
@@ -158,7 +151,6 @@
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.$playSound('error');
console.log(error);
});
},
--
Gitblit v1.9.3