From 547294b0c7a7de8cc84a8a8df297548c7b2f9846 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 06 八月 2025 10:07:48 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue | 70 +++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
index fc8c7e7..98d9178 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
@@ -176,7 +176,11 @@
flowCardCount=produceList.value.length
handleSummary()
- handleGetQRCode()
+ if (name=='澶╂触鍖楃幓鐜荤拑宸ヤ笟鎶�鏈湁闄愬叕鍙革紙TJBB-QR7.1-01锛�'){
+ handleGetQRCodeTj()//澶╂触鎵爜鏋姤宸ラ渶瑕佸悎骞跺眰鍙蜂簩缁寸爜
+ }else{
+ handleGetQRCode()//鎷嗗垎灞傚彿浜岀淮鐮�
+ }
} else {
ElMessage.warning(res.msg)
router.push("/login")
@@ -185,44 +189,54 @@
}
)
+
const handleGetQRCode = async () => {
for (let i = 0; i < produceList.value.length; i++) {
- const detail = produceList.value[i].detail[0];
- const processId = detail.process_id;
- const mergeStr = detail.mergeTechnologyNumber?.toString() || '';
+ const detailItem = produceList.value[i].detail[0];
+ const detailList = produceList.value[i].detailList;
- detail.qrcodeList = []; // 鍒濆鍖�
+ const mergeTechNumber = detailItem.mergeTechnologyNumber.toString();
+ const processId = detailItem.process_id;
+ const url = `${processId}/${mergeTechNumber}`;
- for (let j = 0; j < mergeStr.length; j++) {
- const singleTech = mergeStr[j]; // 鍙栧嚭姣忎竴浣嶅瓧绗�
- const url = `${processId}/${singleTech}`;
- const qrcodeData = await QRCode.toDataURL(url);
- detail.qrcodeList.push({
+ const qrcodeData = await QRCode.toDataURL(url);
+ detailItem.qrcodeList = [];
+
+ //鍌ㄥ瓨灞傚彿
+ const seenTechNumbers = new Set();
+
+ for (let j = 0; j < detailList.length; j++) {
+ const techNum = detailList[j].technology_number;
+ //鏈夊垯璺宠繃
+ if (seenTechNumbers.has(techNum)) continue;
+ detailItem.qrcodeList.push({
qrcode: qrcodeData,
- technologyNumber: singleTech
+ technologyNumber: techNum
});
+
+ seenTechNumbers.add(techNum);
}
}
};
-// const handleGetQRCode = async () => {
-// let technologyNumber=''
-// for (let i = 0; i < produceList.value.length; i++) {
-//
-// const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
-// produceList.value[i].detail[0]["qrcodeList"] = []; // 鍒濆鍖栦竴涓┖鏁扮粍鐢ㄦ潵瀛樺偍 QR Code
-// const merge = produceList.value[i].detail[0].mergeTechnologyNumber.toString();
-// const processId = produceList.value[i].detail[0].process_id;
-// const url = `${processId}/${technologyNumber}`;
-// // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
-// const qrcodeData = await QRCode.toDataURL(url);
-// produceList.value[i].detail[0]["qrcodeList"].push({
-// qrcode: qrcodeData,
-// technologyNumber: technologyNumber
-// });
-// }
-// };
+
+const handleGetQRCodeTj = async () => {
+ let technologyNumber=''
+ for (let i = 0; i < produceList.value.length; i++) {
+ const technologyNumber = produceList.value[i].detail[0].mergeTechnologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
+ produceList.value[i].detail[0]["qrcodeList"] = []; // 鍒濆鍖栦竴涓┖鏁扮粍鐢ㄦ潵瀛樺偍 QR Code
+
+ const processId = produceList.value[i].detail[0].process_id;
+ const url = `${processId}/${technologyNumber}`;
+ // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ const qrcodeData = await QRCode.toDataURL(url);
+ produceList.value[i].detail[0]["qrcodeList"].push({
+ qrcode: qrcodeData,
+ technologyNumber: technologyNumber
+ });
+ }
+};
//鏍规嵁杈撳叆鐨勬暟閲忛噸鏂版眹鎬�
--
Gitblit v1.8.0