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/Sttl.js | 101 ++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 89 insertions(+), 12 deletions(-)
diff --git a/H5/Js/Sttl.js b/H5/Js/Sttl.js
index c8117c2..f2e0332 100644
--- a/H5/Js/Sttl.js
+++ b/H5/Js/Sttl.js
@@ -14,11 +14,16 @@
selectType: "",
daa001: "",
barcode: "",
- ItemBlDetail:[],
modeInfo: [],
active: 0,
show: false,
actions: [],
+ ItemBlDetail: [], // 寰呮壂
+ ItemYsDetail: [], // 宸叉壂
+ ItemTblDetail: [],
+ ItemDetail: [],
+ ItemBarKw: [],
+ currentIndex: -1,
}
},
mounted() {
@@ -29,6 +34,56 @@
};
},
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();
+ //this.active = 1; //鑷姩鍒囨崲鍒板簱浣嶅垪琛╰ab
+ },
+ GetBarKwByItem() {
+
+ var that = this;
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
+ itemId: that.selItem.itemid,
+ userName: that.userInfo.loginAccount,
+ type: 'STCK',//鍙楁墭閫�鏂�/鍙楁墭鍑哄簱
+ 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;
@@ -65,7 +120,7 @@
//onClick(index, title) {
// this.$toast(`${index} ${title}`);
// this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
-
+ //that.$playSound('success');
//},
onSelect(item) {
// 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
@@ -73,6 +128,8 @@
this.show = false;
this.billNo = item.name;
+ // 娓呯┖搴撲綅鍒楄〃
+ this.ItemBarKw = [];
this.GetMesItemDetailByBillNo();
//this.$toast(item.name);
@@ -87,9 +144,14 @@
.then(function (res) {
var json = res;
if (json.status == 0) {
- that.ItemBlDetail = json.data.tbBillList;
- //that.daa001 = json.data.tbBillList.item1;
+ //that.ItemBlDetail = json.data.tbBillList;
+ var tbBillList = json.data.tbBillList || {};
+ that.ItemBlDetail = tbBillList.blDetails || []; // 寰呮壂
+ that.ItemYsDetail = tbBillList.ysDetails || []; // 宸叉壂
that.$refs.barcode.focus();
+ // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
+ that.currentIndex = -1;
+ that.ItemBarKw = [];
}
else {
that.$toast.fail(json.message);
@@ -146,6 +208,7 @@
userName: that.userInfo.loginAccount,
barcode: that.barcode,
daa001: that.billNo,
+ billNo: that.billNo,
//type: selectType
}, false)
.then(function (res) {
@@ -157,17 +220,27 @@
that.num = null;
//that.ItemBlDetail = json.data.tbBillList.item2
that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+ that.$playSound('success');
that.GetMesItemDetailByBillNo();
that.$refs.barcode.focus();
that.barcode = "";
that.num = "";
that.splitNum = "";
+ that.GetBarKwByItem(); // 閫�鏂欏悗鍒锋柊搴撲綅
} else if (json.status == 2) {
+ //浣跨敤tbBillList
+ //that.$refs.splitNum.focus();
+ //that.splitNum = json.data.cfNum;
+ //that.num = json.data.num;
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);
@@ -212,11 +285,11 @@
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 +300,8 @@
that.AxiosHttp("post", 'MesSttl/SplitBarcode', {
userName: that.userInfo.loginAccount,
barcode: that.barcode,
- daa001: that.billNo,
+ daa001: that.daa001,
+ billNo: that.billNo,
num: that.splitNum,
//type: selectType
}, false)
@@ -236,11 +310,14 @@
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 = "";
that.splitNum = "";
that.GetMesItemDetailByBillNo();
+ that.GetBarKwByItem();// 閫�鏂欏悗鍒锋柊搴撲綅
}
else {
that.$toast.fail(json.message);
--
Gitblit v1.9.3