From 408b576b8aa155c9f7c8b919be3cd82be52a1da8 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 25 十一月 2025 08:52:44 +0800
Subject: [PATCH] 1.标准代码更新(2025-11-25)
---
H5/Js/Xsck.js | 102 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 87 insertions(+), 15 deletions(-)
diff --git a/H5/Js/Xsck.js b/H5/Js/Xsck.js
index 9e004a6..746bf53 100644
--- a/H5/Js/Xsck.js
+++ b/H5/Js/Xsck.js
@@ -19,6 +19,11 @@
active: 0,
show: false,
actions: [],
+ ItemTblDetail: [],
+ ItemDetail: [],
+ ItemBarKw: [],
+ currentIndex: -1,
+ zdy: "",
}
},
mounted() {
@@ -29,8 +34,57 @@
};
},
methods: {
+ handleRowClick(item, index) {
+ if (this.isLoading) {
+ return;
+ }
+
+ // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
+ this.currentIndex = -1;
+
+ // 璁剧疆褰撳墠閫変腑琛�
+ this.currentIndex = index;
+ this.selItem = {
+ itemid: item.itemId,
+ index: index
+ };
+
+ console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢�
+
+ this.GetBarKwByItem();
+ },
+ GetBarKwByItem() {
+
+ var that = this;
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
+ itemId: that.selItem.itemid,
+ userName: that.userInfo.loginAccount,
+ //type: 'XSCK',
+ //billNo: that.billNo
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.ItemBarKw = json.data.tbBillList;
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.$playSound('error');
+ that.ItemBarKw = [];
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$playSound('error');
+ console.log(error);
+ that.ItemBarKw = [];
+ });
+ },
+ //鑾峰彇鍙戣揣閫氱煡鍗曞彿
getInfo() {
-
this.show = true;
var that = this;
that.isLoading = true
@@ -47,11 +101,11 @@
that.actions = json.data.tbBillList.map(item => {
return { name: item }
});
-
}
}
else {
that.$toast.fail(json.message);
+ that.show = false;
}
that.isLoading = false;
})
@@ -67,16 +121,21 @@
// this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
//},
+ //鐐瑰嚮浜嬩欢
onSelect(item) {
// 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
// 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
this.show = false;
this.billNo = item.name;
+
+ // 娓呯┖搴撲綅鍒楄〃
+ this.ItemBarKw = [];
this.GetMesItemDetailByBillNo();
//this.$toast(item.name);
},
+ //鏍规嵁鍙戣揣閫氱煡鍗曞彿鑾峰彇鏄庣粏
GetMesItemDetailByBillNo() {
var that = this;
that.isLoading = true;
@@ -88,8 +147,12 @@
var json = res;
if (json.status == 0) {
that.ItemBlDetail = json.data.tbBillList;
+ that.zdy = json.data.tbBillList.allList[0].createNmae;
//that.daa001 = json.data.tbBillList.item1;
that.$refs.barcode.focus();
+ // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
+ that.currentIndex = -1;
+ that.ItemBarKw = [];
}
else {
that.$toast.fail(json.message);
@@ -104,12 +167,13 @@
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
//console.log(error);
- tthat.$refs.billNo.focus();
+ that.$refs.billNo.focus();
that.billNo = "";
that.daa001 = "";
that.ItemBlDetail = [];
});
},
+ //鎵爜
getBarcode() {
//this.barcode = value;
@@ -130,7 +194,7 @@
}
if (!that.billNo) {
- this.$toast.fail("鍙戣揣閫氱煡鍗曞彿涓嶈兘涓虹┖");
+ this.$toast.fail("鐢宠鍗曞彿涓嶈兘涓虹┖");
that.isLoading = false;
return;
}
@@ -145,7 +209,8 @@
that.AxiosHttp("post", 'MesXsck/XSCKScanBarcode', {
userName: that.userInfo.loginAccount,
barcode: that.barcode,
- daa001: that.billNo,
+ daa001: that.daa001,
+ billNo: that.billNo,
//type: selectType
}, false)
.then(function (res) {
@@ -155,7 +220,6 @@
that.barcode = null;
that.sms = null;
that.num = null;
- //that.ItemBlDetail = json.data.tbBillList.item2
that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
that.GetMesItemDetailByBillNo();
that.$refs.barcode.focus();
@@ -166,8 +230,12 @@
} else if (json.status == 2) {
that.$refs.splitNum.focus();
- that.splitNum = json.data.cfNum;
- that.num = json.data.num;
+ that.splitNum = json.data.tbBillList.splitNum; // 鎷嗗垎鏁伴噺
+ that.num = json.data.tbBillList.barcodeNum; // 鏉$爜鏁伴噺
+ that.daa001 = json.data.tbBillList.daa001; // 宸ュ崟鍙�
+ if (json.data.tbBillList.billNo) {
+ that.billNo = json.data.tbBillList.billNo;
+ } // 鍙戣揣閫氱煡鍗曞彿锛屽彧鍦ㄦ湁鍊兼椂璧嬪��
}
else {
that.$toast.fail(json.message);
@@ -188,6 +256,7 @@
that.splitNum = "";
});
},
+ //鏉$爜鎷嗗垎
tmcf() {
//this.show = true;
@@ -207,16 +276,16 @@
}
if (!that.billNo) {
- this.$toast.fail("琛ユ枡鍗曞彿涓嶈兘涓虹┖");
+ this.$toast.fail("鍙戣揣鍗曞彿涓嶈兘涓虹┖");
that.isLoading = false;
return;
}
- if (!that.daa001) {
- this.$toast.fail("宸ュ崟鍙蜂笉鑳戒负绌�");
- that.isLoading = false;
- return;
- }
+ //if (!that.daa001) {
+ // this.$toast.fail("宸ュ崟鍙蜂笉鑳戒负绌�");
+ // that.isLoading = false;
+ // return;
+ //}
if (!that.splitNum) {
this.$toast.fail("鍙戣揣鏁伴噺涓嶈兘涓虹┖");
@@ -227,7 +296,8 @@
that.AxiosHttp("post", 'MesXsck/SplitBarcode', {
userName: that.userInfo.loginAccount,
barcode: that.barcode,
- daa001: that.billNo,
+ daa001: that.daa001,
+ billNo: that.billNo,
num: that.splitNum,
//type: selectType
}, false)
@@ -236,6 +306,8 @@
if (json.status == 0) {
that.ItemBlDetail = json.data.pendingList;
that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+ that.$playSound('success');
+ that.sendPrintMessage(json.data.tbBillList);
that.$refs.barcode.focus();
that.barcode = "";
that.num = "";
--
Gitblit v1.9.3