From 9ac210a2a52eebcd7ed914c49f9d421bd47f8fcf Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 19 二月 2025 08:22:49 +0800
Subject: [PATCH] 1.生产领料页面交互优化 2.生产补料、超领页面交互优化
---
H5/Js/Scbl.js | 53 +++++++++++++++++++++-----
H5/Scll.aspx | 10 ++--
H5/Js/Scll.js | 23 +++++++++--
H5/Scbl.aspx | 17 +++++---
4 files changed, 78 insertions(+), 25 deletions(-)
diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js
index 23ead55..f8b69fb 100644
--- a/H5/Js/Scbl.js
+++ b/H5/Js/Scbl.js
@@ -7,7 +7,7 @@
"loginGuid": '',
"loginAccount": '',
},
- sms: "",
+ splitNum: "",
num: "",
type: "",
billNo: "",
@@ -91,21 +91,30 @@
if (json.status == 0) {
that.ItemBlDetail = json.data.tbBillList.item2;
that.daa001 = json.data.tbBillList.item1;
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
+ that.$refs.billNo.focus();
+ that.billNo = "";
+ that.daa001 = "";
+ that.ItemBlDetail = [];
}
that.isLoading = false;
})
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
+ //console.log(error);
+ tthat.$refs.billNo.focus();
+ that.billNo = "";
+ that.daa001 = "";
+ that.ItemBlDetail = [];
});
},
- getBarcode(value) {
+ getBarcode() {
- this.barcode = value;
+ //this.barcode = value;
var that = this;
that.isLoading = true;
@@ -152,20 +161,34 @@
//that.ItemBlDetail = json.data.tbBillList.item2
that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
that.GetMesItemBlDetailByBillNo();
+ that.$refs.barcode.focus();
+ that.barcode = "";
+ that.num = "";
+ that.splitNum = "";
+
+
} else if (json.status == 2) {
that.$refs.splitNum.focus();
- that.scanInfo.splitNum = json.data.tbBillList.splitNum;
- that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
+ that.splitNum = json.data.cfNum;
+ that.num = json.data.num;
}
else {
that.$toast.fail(json.message);
+ that.$refs.barcode.focus();
+ that.barcode = "";
+ that.num = "";
+ that.splitNum = "";
}
that.isLoading = false;
})
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
+ //console.log(error);
+ that.$refs.barcode.focus();
+ that.barcode = "";
+ that.num = "";
+ that.splitNum = "";
});
},
tmcf() {
@@ -198,7 +221,7 @@
return;
}
- if (!that.sms) {
+ if (!that.splitNum) {
this.$toast.fail("鍙戣揣鏁伴噺涓嶈兘涓虹┖");
that.isLoading = false;
return;
@@ -209,7 +232,7 @@
barcode: that.barcode,
blNo: that.billNo,
billNo: that.daa001,
- num: that.sms,
+ num: that.splitNum,
type: selectType
}, false)
.then(function (res) {
@@ -217,16 +240,26 @@
if (json.status == 0) {
that.ItemBlDetail = json.data.pendingList;
that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+ that.$refs.barcode.focus();
+ that.barcode = "";
+ that.num = "";
+ that.splitNum = "";
+ that.GetMesItemBlDetailByBillNo();
}
else {
that.$toast.fail(json.message);
+ that.$refs.barcode.focus();
}
that.isLoading = false;
})
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
+ //console.log(error);
+ that.$refs.barcode.focus();
+ that.barcode = "";
+ that.num = "";
+ that.splitNum = "";
});
}
}
diff --git a/H5/Js/Scll.js b/H5/Js/Scll.js
index b87acaf..89d0fc8 100644
--- a/H5/Js/Scll.js
+++ b/H5/Js/Scll.js
@@ -9,6 +9,7 @@
},
modeInfo: { daa001: "", planNo: "" },
scanInfo: { barcodeNum: "", splitNum: "", barcode: "" },
+ ItemDetail: [],
}
},
mounted() {
@@ -29,11 +30,16 @@
.then(function (res) {
var json = res;
if (json.status == 0) {
- that.modeInfo = json.data.tbBillList;
+ that.ItemDetail = json.data.tbBillList;
+ that.modeInfo.planNo = json.data.tbBillList.planNo;
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
that.$refs.daa001.focus();
+ that.modeInfo.daa001 = "";
+ that.modeInfo.planNo = "";
+ that.ItemDetail = [];
}
that.isLoading = false;
})
@@ -42,14 +48,20 @@
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
console.log(error);
that.$refs.daa001.focus();
+ that.modeInfo.daa001 = "";
});
},
getScan() {
var that = this;
if (that.modeInfo.daa001.length <= 0) {
- that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+ 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,
@@ -60,7 +72,10 @@
var json = res;
if (json.status == 0) {
// that.scanInfo = json.data.tbBillList;
+ that.$notify({ type: 'success', message: json.message });
that.getModel();
+ that.$refs.barcode.focus();
+ that.scanInfo.barcode = null;
}
else if (json.status == 2) {
that.$refs.splitNum.focus();
@@ -71,7 +86,7 @@
that.$toast.fail(json.message);
that.$refs.barcode.focus();
}
- that.$notify({ type: 'success', message: json.message });
+
that.isLoading = false;
})
.catch(function (error) {
@@ -84,7 +99,7 @@
getChaiFen() {
var that = this;
if (that.modeInfo.daa001.length <= 0) {
- that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+ that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
return;
}
if (that.scanInfo.splitNum * 1 <= 0) {
diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx
index 14f0b40..98cd2f8 100644
--- a/H5/Scbl.aspx
+++ b/H5/Scbl.aspx
@@ -17,11 +17,13 @@
<div>
<van-cell-group>
<van-field
+ ref="billNo"
value=""
- label="琛ユ枡鍗曞彿"
+ :label="type=='cl'?'瓒呴鐢宠':'琛ユ枡鐢宠'"
clearable
placeholder="鎵爜/閫夋嫨/鎵嬪綍"
:right-icon-size="19"
+ @keyup.enter.native ="GetMesItemBlDetailByBillNo"
v-model="billNo"
v-focus.noKeyboard
><template #button>
@@ -37,11 +39,13 @@
disabled
></van-field>
<van-field
+ ref="barcode"
value=""
label="鐗╂枡鏉$爜"
clearable
placeholder="璇锋壂鐮�"
- @input="getBarcode"
+<%-- @input="getBarcode"--%>
+ @keyup.enter.native ="getBarcode"
:right-icon-size="19"
v-model="barcode"
v-focus.noKeyboard
@@ -54,12 +58,13 @@
disabled
></van-field>
<van-field
+ ref ="splitNum"
center
clearable
- v-model="sms"
+ v-model="splitNum"
label="鍙戣揣鏁伴噺"
placeholder="鍙戣揣鏁伴噺"
-disabled
+<%--disabled--%>
><template #button>
<van-button size="small" type="info" plain @click="tmcf" >鏉$爜鎷嗗垎</van-button>
</template></van-field>
@@ -67,7 +72,7 @@
</div>
<div class="van-tab-left">
- <van-tabs @click="onClick" color="#000" title-active-color="#0283EF" >
+ <van-tabs <%--@click="onClick"--%> color="#000" title-active-color="#0283EF" >
<van-tab title="寰呭彂鐗╂枡" class="mySolid font">
<%-- <van-row v-for="value in ItemBlDetail" class="font">
<van-col span="12">鐗╂枡:{{value.bld002}}</van-col>
@@ -99,5 +104,5 @@
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Scbl.js?<%=12315 %>"></script>
+ <script src="Js/Scbl.js?<%=12317 %>"></script>
</asp:Content>
diff --git a/H5/Scll.aspx b/H5/Scll.aspx
index d792906..49e336d 100644
--- a/H5/Scll.aspx
+++ b/H5/Scll.aspx
@@ -24,7 +24,7 @@
placeholder="璇锋壂鐮�"
:right-icon-size="19"
v-focus.noKeyboard
- @change="getModel" autofocus="true"
+ @keyup.enter.native="getModel" autofocus="true"
></van-field>
<van-field
v-model="modeInfo.planNo"
@@ -42,7 +42,7 @@
placeholder="璇锋壂鐮�"
:right-icon-size="19"
v-focus.noKeyboard
- @change="getScan"
+ @keyup.enter.native="getScan"
></van-field>
<van-field
v-model="scanInfo.barcodeNum"
@@ -71,7 +71,7 @@
<van-col span="6">寰呮壂</van-col>
<van-col span="6">宸叉壂</van-col>
</van-row>
- <van-row v-for="(itm,index) in modeInfo.daisao" :key="index">
+ <van-row v-for="(itm,index) in ItemDetail.daisao" :key="index">
<van-col span="12" class="text-left padding-left">
<div>{{itm.itemNo}}</div>
<div>{{itm.itemName}}</div>
@@ -86,7 +86,7 @@
<van-col span="6">闇�棰嗘暟</van-col>
<van-col span="6">宸查鏁�</van-col>
</van-row>
- <van-row v-for="(itm,index) in modeInfo.totals" :key="index">
+ <van-row v-for="(itm,index) in ItemDetail.totals" :key="index">
<van-col span="12" class="text-left padding-left">
<div>{{itm.itemNo}}</div>
<div>{{itm.itemName}}</div>
@@ -102,5 +102,5 @@
<comback ></comback>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Scll.js?<%=123331 %>"></script>
+ <script src="Js/Scll.js?<%=123332 %>"></script>
</asp:Content>
--
Gitblit v1.9.3