From ca984aadc78f3dcc5e13bfa4900e61396034bbb5 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 18 二月 2025 10:37:03 +0800
Subject: [PATCH] 1.其他入库触发事件方法调整。 2.采购入库触发事件方法调整。 3.采购退货界面优化。 4.生产退料优化
---
H5/Js/PurchaseReturn.js | 36 +++++++++++
H5/Js/Qtrk.js | 2
H5/Qtrk.aspx | 8 +-
H5/PurchaseReturn.aspx | 8 ++
H5/PurchaseInventory.aspx | 9 ++-
H5/Js/PurchaseInventory.js | 1
H5/Js/Sctl.js | 59 +++++++++++++++----
H5/Sctl.aspx | 14 +++-
8 files changed, 112 insertions(+), 25 deletions(-)
diff --git a/H5/Js/PurchaseInventory.js b/H5/Js/PurchaseInventory.js
index 708276f..f535e6e 100644
--- a/H5/Js/PurchaseInventory.js
+++ b/H5/Js/PurchaseInventory.js
@@ -51,6 +51,7 @@
var json = res;
if (json.status == 0) {
that.formData.sectionName = json.data.tbBillList;
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
diff --git a/H5/Js/PurchaseReturn.js b/H5/Js/PurchaseReturn.js
index 409bdfa..b2618f8 100644
--- a/H5/Js/PurchaseReturn.js
+++ b/H5/Js/PurchaseReturn.js
@@ -35,6 +35,8 @@
loginGuid: this.GetLoginInfor().loginGuid,
loginAccount: this.GetLoginInfor().loginAccount,
};
+ that.beginload();
+ //that.show = false;
},
methods: {
getItemOutNo() {
@@ -51,6 +53,29 @@
return { name: s.billNo }
});
that.show = true;
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+
+ },
+ beginload() {
+ var that = this;
+
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesCgthSq/GetMesCgthSq', {
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.itemOutNoList = json.data.tbBillList;
}
else {
that.$toast.fail(json.message);
@@ -110,6 +135,11 @@
getItem() {
var that = this;
that.isLoading = true;
+
+ let itemOut = this.itemOutNoList.filter(it => it.billNo == that.scanFormData.itemOutNo);
+
+ this.invItemOutId = itemOut[0].id;
+
that.AxiosHttp("post", 'MesCgthSq/GetSumItem', {
id: that.invItemOutId,
billNo: that.scanFormData.itemOutNo,
@@ -121,7 +151,8 @@
that.tableData = json.data.tbBillList.sumItem;
that.scanFormData.itemNo = json.data.tbBillList.itemNo
//that.scanFormData.quantity = json.data.tbBillList.quantity
- console.log(json);
+ //console.log(json);
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
@@ -180,10 +211,13 @@
//}
that.scanFormData.quantity = json.data.tbBillList.barcodeNum
that.getItem();
+ that.$refs.barcode.focus();
+ that.scanFormData.barcode = null;
}
else {
that.$toast.fail(json.message);
that.$refs.barcode.focus();
+ that.scanFormData.barcode = null;
}
that.$notify({ type: 'success', message: json.message });
that.isLoading = false;
diff --git a/H5/Js/Qtrk.js b/H5/Js/Qtrk.js
index 5ba8212..3728adc 100644
--- a/H5/Js/Qtrk.js
+++ b/H5/Js/Qtrk.js
@@ -83,6 +83,8 @@
var json = res;
if (json.status == 0) {
that.ItemBlDetail = json.data.tbBillList;
+ that.$refs.sectionCode.focus();
+ that.sectionCode = null;
}
else {
that.$toast.fail(json.message);
diff --git a/H5/Js/Sctl.js b/H5/Js/Sctl.js
index 1fbdba5..8c28a5d 100644
--- a/H5/Js/Sctl.js
+++ b/H5/Js/Sctl.js
@@ -35,7 +35,7 @@
var that = this;
that.isLoading = true;
that.AxiosHttp("post", 'MesItemTbl/GetSCTLBillNo', {
- type: "鐢熶骇閫�鏂�"
+ type: "鐢熶骇閫�鏂欑敵璇�"
}, false)
.then(function (res) {
var json = res;
@@ -59,11 +59,11 @@
console.log(error);
});
},
- onClick(index, title) {
- this.$toast(`${index} ${title}`);
- this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
+ //onClick(index, title) {
+ // this.$toast(`${index} ${title}`);
+ // this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
- },
+ //},
onSelect(item) {
// 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
// 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
@@ -82,23 +82,30 @@
var json = res;
if (json.status == 0) {
that.ItemTblDetail = json.data.tbBillList;
+ that.$refs.sectionCode.focus();
}
else {
that.$toast.fail(json.message);
+ that.$refs.billNo.focus();
+ that.ItemTblDetail = null;
+ that.billNo = null;
}
that.isLoading = false;
})
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$refs.billNo.focus();
+ that.ItemTblDetail = null;
+ that.billNo = null;
console.log(error);
});
},
- getDepot(value) {
- if (!value) {
- return;
- }
- this.depotSectionCode = value;
+ getDepot() {
+ //if (!value) {
+ // return;
+ //}
+ //this.depotSectionCode = value;
var that = this;
that.isLoading = true;
that.AxiosHttp("post", 'MesItemTbl/SctlScanDepots', {
@@ -108,24 +115,52 @@
var json = res;
if (json.status == 0) {
that.depot = json.data.tbBillList;
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
+ that.$refs.sectionCode.focus();
+ that.depotSectionCode = null;
}
that.isLoading = false;
})
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$refs.sectionCode.focus();
+ that.depotSectionCode = null;
console.log(error);
});
},
- getBarcode(value) {
+ getBarcode() {
- this.barcode = value;
+ //this.barcode = value;
var that = this;
that.isLoading = true;
+
+ if (!that.billNo) {
+ this.$toast.fail("鐢宠鍗曞彿涓嶈兘涓虹┖");
+ that.$refs.billNo.focus();
+ that.isLoading = false;
+ return;
+ }
+
+ if (!that.depotSectionCode) {
+ this.$toast.fail("搴撲綅缂栧彿涓嶈兘涓虹┖");
+ that.$refs.sectionCode.focus();
+ that.depotSectionCode = null;
+ that.isLoading = false;
+ return;
+ }
+
+ if (!that.barcode) {
+ this.$toast.fail("鏉$爜缂栧彿涓嶈兘涓虹┖");
+ that.$refs.barcode.focus();
+ that.barcode = null;
+ that.isLoading = false;
+ return;
+ }
if (!that.userInfo.loginAccount) {
this.$toast.fail(json.message);
diff --git a/H5/PurchaseInventory.aspx b/H5/PurchaseInventory.aspx
index 6fef555..152592d 100644
--- a/H5/PurchaseInventory.aspx
+++ b/H5/PurchaseInventory.aspx
@@ -24,7 +24,9 @@
placeholder="璇锋壂鐮�"
:right-icon-size="19"
v-focus.noKeyboard
- @change="getModel" autofocus="true"
+ @keyup.enter.native="getModel"
+ <%--@change="getModel" --%>
+ autofocus="true"
></van-field>
<van-field
ref="barcode"
@@ -34,7 +36,8 @@
placeholder="璇锋壂鐮�"
:right-icon-size="19"
v-focus.noKeyboard
- @change="getScan"
+ @keyup.enter.native="getScan"
+ <%--@change="getScan"--%>
></van-field>
<van-field
v-model="formData.itemNo"
@@ -168,5 +171,5 @@
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/PurchaseInventory.js?<%=1232 %>"></script>
+ <script src="Js/PurchaseInventory.js?<%=1233 %>"></script>
</asp:Content>
diff --git a/H5/PurchaseReturn.aspx b/H5/PurchaseReturn.aspx
index 0a11b87..3bbf037 100644
--- a/H5/PurchaseReturn.aspx
+++ b/H5/PurchaseReturn.aspx
@@ -23,6 +23,7 @@
placeholder="閫夋嫨閫�璐у崟鍙�"
:right-icon-size="19"
v-model="scanFormData.itemOutNo"
+ @keyup.enter.native="getItem"
v-focus.noKeyboard
><template #button>
<van-button size="small" type="info" plain @click="getItemOutNo" >閫夋嫨</van-button>
@@ -35,7 +36,8 @@
placeholder="璇锋壂鎻忕墿鏂欐潯鐮�"
:right-icon-size="19"
v-focus.noKeyboard
- @change="SaveBarCodes"
+ @keyup.enter.native="SaveBarCodes"
+ <%--@change="SaveBarCodes"--%>
></van-field>
<van-field
v-model="scanFormData.itemNo"
@@ -171,8 +173,10 @@
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
<comloading v-if="isLoading"></comloading>
+
+
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/PurchaseReturn.js?<%=12 %>"></script>
+ <script src="Js/PurchaseReturn.js?<%=127 %>"></script>
</asp:Content>
diff --git a/H5/Qtrk.aspx b/H5/Qtrk.aspx
index 01afdb4..7dcf868 100644
--- a/H5/Qtrk.aspx
+++ b/H5/Qtrk.aspx
@@ -23,6 +23,7 @@
placeholder="閫夋嫨/鎵嬪綍"
:right-icon-size="19"
v-model="billNo"
+ @keyup.enter.native="GetMesItemBlDetailByBillNo"
v-focus.noKeyboard
><template #button>
<van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
@@ -33,7 +34,8 @@
label="搴撲綅缂栫爜"
clearable
v-model="sectionCode"
- @change="getSectionCode"
+ @keyup.enter.native="getSectionCode"
+ <%--@change="getSectionCode"--%>
:right-icon-size="19"
placeholder="搴撲綅缂栫爜"
></van-field>
@@ -43,7 +45,7 @@
label="鐗╂枡鏉$爜"
clearable
placeholder="璇锋壂鐮�"
- @change="getBarcode"
+ @keyup.enter.native="getBarcode"
:right-icon-size="19"
v-model="barcode"
v-focus.noKeyboard
@@ -89,5 +91,5 @@
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Qtrk.js?<%=1238 %>"></script>
+ <script src="Js/Qtrk.js?<%=1239 %>"></script>
</asp:Content>
diff --git a/H5/Sctl.aspx b/H5/Sctl.aspx
index 9513b9f..1dc9004 100644
--- a/H5/Sctl.aspx
+++ b/H5/Sctl.aspx
@@ -17,33 +17,39 @@
<div>
<van-cell-group>
<van-field
+ ref="billNo"
value=""
label="閫�鏂欏崟鍙�"
clearable
placeholder="璇锋壂鐮�"
:right-icon-size="19"
v-model="billNo"
+ @keyup.enter.native="getMesItemTblDetailByBillNo"
v-focus.noKeyboard
><template #button>
<van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
</template></van-field>
<van-field
+ ref="sectionCode"
value=""
label="搴撲綅缂栧彿"
v-model="depotSectionCode"
clearable
:right-icon-size="19"
- @input="getDepot"
+ @keyup.enter.native ="getDepot"
+ <%--@input="getDepot"--%>
placeholder="璇锋壂鐮佸簱浣嶇紪鍙�"
></van-field>
<van-field
+ ref="barcode"
value=""
label="鐗╂枡鏉$爜"
clearable
placeholder="璇锋壂鐮�"
v-model="barcode"
:right-icon-size="19"
- @input="getBarcode"
+ @keyup.enter.native ="getBarcode"
+ <%--@input="getBarcode"--%>
v-focus.noKeyboard
></van-field>
<van-field
@@ -64,7 +70,7 @@
</van-cell-group>
</div>
- <van-tabs @click="onClick" color="#000" title-active-color="#0283EF" >
+ <van-tabs color="#000" title-active-color="#0283EF" >
<van-tab title="寰呴��鏄庣粏">
<van-row v-for="value in ItemTblDetail" class="font">
<van-col span="12">鐗╂枡:{{value.itemNo}}</van-col>
@@ -84,6 +90,6 @@
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Sctl.js?<%=156 %>"></script>
+ <script src="Js/Sctl.js?<%=159 %>"></script>
</asp:Content>
--
Gitblit v1.9.3