From 8ab8e369a6c1403cd2cc144935ad79b27481e206 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期日, 01 二月 2026 18:25:37 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/tiaomachaima/tiaomachaimaCopy_HK.vue |  182 +++++++++++++++++++++++++++++++++++----------
 pages.json                                 |    6 +
 pages/index/index.vue                      |    2 
 3 files changed, 149 insertions(+), 41 deletions(-)

diff --git a/pages.json b/pages.json
index d439813..2e2ae9e 100644
--- a/pages.json
+++ b/pages.json
@@ -471,6 +471,12 @@
                 "navigationBarTitleText": "鏉$爜鎷嗙爜2"
             }
         },
+		{
+		    "path": "pages/tiaomachaima/tiaomachaimaCopy_HK",
+		    "style": {
+		        "navigationBarTitleText": "鏉$爜鎷嗙爜3"
+		    }
+		},
         {
             "path": "pages/wuliaosaoma/wuliaosaoma",
             "style": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 3809d50..74915e3 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -340,7 +340,7 @@
 					{
 						"img": "../../static/icon/icon21.png",
 						"text": "鏉$爜鎷嗙爜",
-						"url": "/pages/tiaomachaima/tiaomachaimaCopy",
+						"url": "/pages/tiaomachaima/tiaomachaimaCopy_HK",
 						"id": 25,
 						"hidden": false
 					},
diff --git a/pages/tiaomachaima/tiaomachaimaCopy.vue b/pages/tiaomachaima/tiaomachaimaCopy_HK.vue
similarity index 76%
rename from pages/tiaomachaima/tiaomachaimaCopy.vue
rename to pages/tiaomachaima/tiaomachaimaCopy_HK.vue
index 3bc9ea3..b2312e3 100644
--- a/pages/tiaomachaima/tiaomachaimaCopy.vue
+++ b/pages/tiaomachaima/tiaomachaimaCopy_HK.vue
@@ -33,7 +33,7 @@
 					:disabled="cantGenerate">鐢熸垚</button>
 				<button type="default" :class="cantPrint ? 'btn-disabled' : 'btn-c'" @click="PrintHBarCode"
 					:disabled="cantPrint">鎵撳嵃</button>
-					<button type="primary" @click="printerLabel">娴嬭瘯鎵撳嵃</button>
+					<button type="primary" @click="printerLabel2">娴嬭瘯鎵撳嵃2</button>
 			</view>
 		</view>
 		<view class="divide"></view>
@@ -48,17 +48,36 @@
 						<text>鏉$爜缂栧彿锛�</text>{{barCodeInfo['鏉$爜缂栧彿'] || ''}}
 					</view>
 					<view class="detail">
-						<text>鏉$爜鍘熸暟閲忥細</text>{{barCodeInfo['鏁伴噺'] || '0'}}
-					</view>
-					<view class="detail">
-						<text>鍓╀綑鏁伴噺锛�</text>{{barCodeInfo['鍓╀綑鏁伴噺'] || '0'}}
-					</view>
-					<view class="dWetail">
-						<text>鐗╂枡缂栫爜锛�</text>{{barCodeInfo['鐗╂枡浠g爜'] || ''}}
+						<text>渚涘簲鍟嗗悕绉帮細</text>{{barCodeInfo['渚涘簲鍟�'] || ''}}
 					</view>
 					<view class="detail">
 						<text>鐗╂枡鍚嶇О锛�</text>{{barCodeInfo['鐗╂枡鍚嶇О'] || ''}}
 					</view>
+					<view class="detail">
+						<text>鐗╂枡绠�绉帮細</text>{{barCodeInfo['鐗╂枡绠�绉�'] || ''}}
+					</view>
+					<view class="detail">
+						<text>鏉$爜鍘熸暟閲忥細</text>{{barCodeInfo['鏉$爜鍓╀綑鏁伴噺'] || '0'}}
+					</view>
+					<view class="detail">
+						<text>鍓╀綑鏁伴噺锛�</text>{{barCodeInfo['鍓╀綑鏁伴噺'] || '0'}}
+					</view>
+					<view class="detail">
+						<text>宸ュ彿锛�</text>{{barCodeInfo['宸ュ彿'] || ''}}
+					</view>
+					<view class="detail">
+						<text>鐢熶骇鏃ユ湡锛�</text>{{barCodeInfo['鐢熶骇鏃ユ湡'] || ''}}
+					</view>
+					<view class="detail">
+						<text>娴佹按鍙凤細</text>{{barCodeInfo['娴佹按鍙�'] || ''}}
+					</view>
+					<view class="detail">
+						<text>鎵撳嵃鏃ユ湡锛�</text>{{barCodeInfo['鎵撳嵃鏃ユ湡'] || ''}}
+					</view>
+					<view class="dWetail">
+						<text>鐗╂枡缂栫爜锛�</text>{{barCodeInfo['鐗╂枡浠g爜'] || ''}}
+					</view>
+					
 					<view class="detail">
 						<text>瑙勬牸鍨嬪彿锛�</text>{{barCodeInfo['瑙勬牸鍨嬪彿'] || ''}}
 					</view>
@@ -79,10 +98,22 @@
 							<text>鎷嗗垎鏁伴噺锛�</text>{{item['HSplitNum'] || '0'}}
 						</view>
 						<view class="detail">
-							<text>鐗╂枡浠g爜锛�</text>{{item['HNumber'] || ''}}
+							<text>渚涘簲鍟嗗悕绉帮細</text>{{barCodeInfo['渚涘簲鍟�'] || ''}}
 						</view>
 						<view class="detail">
-							<text>鐗╂枡鍚嶇О锛�</text>{{item['HName'] || ''}}
+							<text>鐗╂枡鍚嶇О锛�</text>{{barCodeInfo['鐗╂枡鍚嶇О'] || ''}}
+						</view>
+						<view class="detail">
+							<text>鐗╂枡绠�绉帮細</text>{{barCodeInfo['鐗╂枡绠�绉�'] || ''}}
+						</view>
+						<view class="detail">
+							<text>宸ュ彿锛�</text>{{barCodeInfo['宸ュ彿'] || ''}}
+						</view>
+						<view class="detail">
+							<text>鐢熶骇鏃ユ湡锛�</text>{{barCodeInfo['鐢熶骇鏃ユ湡'] || ''}}
+						</view>
+						<view class="detail">
+							<text>娴佹按鍙凤細</text>{{barCodeInfo['娴佹按鍙�'] || ''}}
 						</view>
 						<view class="detail">
 							<text>瑙勬牸鍨嬪彿锛�</text>{{item['HModel'] || ''}}
@@ -159,9 +190,10 @@
 				});
 			
 			},
-			printerLabel(item) {
+			printerLabel() {
 				console.log('娴嬭瘯鎵撳嵃');
-				
+				const formatDate = (date = new Date()) => 
+				  date.toISOString().split('T')[0];
 				printer.setLineSpacing({
 					spacing: 1.2
 				});
@@ -170,20 +202,13 @@
 				printer.setFontSize({
 					fontSize: 1
 				});
+				//鎵撳嵃姣嶆爣绛�
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鍑哄簱鍗曞彿锛歁ATO00049684\r\n',
-				});
-				
-				printer.printText2({
-					offset: 1,
-					fontSize: 2,
-					isBold: false,
-					isUnderLine: false,
-					content: '渚涘簲鍟嗗悕绉帮細鎱堟邯鐟炵泭鐢靛瓙鏈夐檺鍏徃\r\n'
+					content: '渚涘簲鍟嗗悕绉帮細'+this.barCodeInfo['渚涘簲鍟�']+'\r\n'
 				});
 				
 				printer.printText2({
@@ -191,60 +216,52 @@
 					fontSize:2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鐗╂枡浠g爜锛歊.06.17.02.18002\r\n'
+					content: '鐗╂枡浠g爜锛�'+this.barCodeInfo['鐗╂枡浠g爜']+'\r\n'
 				});
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鐗╂枡绠�绉帮細12SH 鍑洪缃� 娉ㄥ鐏�011(鍚孏E鐏�)\r\n'
+					content: '鐗╂枡绠�绉帮細'+this.barCodeInfo['鐗╂枡绠�绉�']+'\r\n'
 				});
-				// printer.printText2({
-				// 	offset: 1,
-				// 	fontSize:2,
-				// 	isBold: false,
-				// 	isUnderLine: false,
-				// 	content: '鐗╂枡鍚嶇О锛�12SH 鍑洪缃� 娉ㄥ鐏�011(鍚孏E鐏�)\r\n'
-				// });
-				
 				printer.printText2({
 					offset: 1,
 					fontSize:2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鏁伴噺锛�1\r\n'
+					content: '鏁伴噺锛�'+this.barCodeInfo['鍓╀綑鏁伴噺']+'\r\n'
 				});
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '宸ュ彿锛�1\r\n'
+					content: '宸ュ彿锛�'+this.barCodeInfo['宸ュ彿']+'\r\n'
 				});
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鐢熶骇鏃ユ湡锛�2025-8-13\r\n'
+					content: '鐢熶骇鏃ユ湡锛�'+this.barCodeInfo['鐢熶骇鏃ユ湡']+'\r\n'
 				});
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '娴佹按鍙凤細000001\r\n'
+					content: '娴佹按鍙凤細'+this.barCodeInfo['娴佹按鍙�']+'\r\n'
 				});
 				printer.printText2({
 					offset: 1,
 					fontSize: 2,
 					isBold: false,
 					isUnderLine: false,
-					content: '鎵撳嵃鏃ユ湡锛�2025-8-13\r\n'
+					content: '鎵撳嵃鏃ユ湡锛�'+this.formatDate()+'\r\n'
 				});
 				printer.printQR2({
-					text: 'title',
+					text: this.barCodeInfo['鏉$爜缂栧彿'],
 					height: 120,
 					offset: 3
 				});
@@ -252,6 +269,90 @@
 					line_length: 5
 				});
 				printer.printGoToNextMark();
+				//鎵撳嵃瀛愭爣绛�
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '渚涘簲鍟嗗悕绉帮細'+this.barCodeInfo['渚涘簲鍟�']+'\r\n'
+				});
+				
+				printer.printText2({
+					offset: 1,
+					fontSize:2,
+					isBold: false,
+					isUnderLine: false,
+					content: '鐗╂枡浠g爜锛�'+this.barCodeInfo['鐗╂枡浠g爜']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '鐗╂枡绠�绉帮細'+this.barCodeInfo['鐗╂枡绠�绉�']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize:2,
+					isBold: false,
+					isUnderLine: false,
+					content: '鏁伴噺锛�'+this.barCodeSplitInfo[0]['HSplitNum']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '宸ュ彿锛�'+this.barCodeInfo['宸ュ彿']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '鐢熶骇鏃ユ湡锛�'+this.barCodeInfo['鐢熶骇鏃ユ湡']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '娴佹按鍙凤細'+this.barCodeInfo['娴佹按鍙�']+'\r\n'
+				});
+				printer.printText2({
+					offset: 1,
+					fontSize: 2,
+					isBold: false,
+					isUnderLine: false,
+					content: '鎵撳嵃鏃ユ湡锛�'+this.formatDate()+'\r\n'
+				});
+				printer.printQR2({
+					text: this.barCodeSplitInfo[0]['HBarCode'],
+					height: 120,
+					offset: 3
+				});
+				printer.printLine({
+					line_length: 5
+				});
+				printer.printGoToNextMark();
+				console.log('娴嬭瘯鎵撳嵃QR缁撴潫');
+			},
+			printerLabel2() {
+				console.log('娴嬭瘯鎵撳嵃');
+				const formatDate = (date = new Date()) => 
+				  date.toISOString().split('T')[0];
+				console.log(formatDate)
+				CommonUtils.showTips({
+				    message:'姣嶆爣绛綷r\n'+'渚涘簲鍟嗗悕绉帮細'+this.barCodeInfo['渚涘簲鍟�']+'\r\n'+'鐗╂枡浠g爜锛�'+this.barCodeInfo['鐗╂枡浠g爜']+'\r\n'+'鐗╂枡绠�绉帮細'+this.barCodeInfo['鐗╂枡绠�绉�']+'\r\n'
+					+'鏁伴噺锛�'+this.barCodeInfo['鍓╀綑鏁伴噺']+'\r\n'+'宸ュ彿锛�'+this.barCodeInfo['宸ュ彿']+'\r\n'+'鐢熶骇鏃ユ湡锛�'+this.barCodeInfo['鐢熶骇鏃ユ湡']+'\r\n'+'娴佹按鍙凤細'+this.barCodeInfo['娴佹按鍙�']+'\r\n'
+					+'鎵撳嵃鏃ユ湡锛�'+formatDate()+'\r\n'+this.barCodeInfo['鏉$爜缂栧彿']+'\r\n'
+					+'瀛愭爣绛綷r\n'+'渚涘簲鍟嗗悕绉帮細'+this.barCodeInfo['渚涘簲鍟�']+'\r\n'+'鐗╂枡浠g爜锛�'+this.barCodeInfo['鐗╂枡浠g爜']+'\r\n'+'鐗╂枡绠�绉帮細'+this.barCodeInfo['鐗╂枡绠�绉�']+'\r\n'
+					+'鏁伴噺锛�'+this.barCodeSplitInfo[0]['HSplitNum']+'\r\n'+'宸ュ彿锛�'+this.barCodeInfo['宸ュ彿']+'\r\n'+'鐢熶骇鏃ユ湡锛�'+this.barCodeInfo['鐢熶骇鏃ユ湡']+'\r\n'+'娴佹按鍙凤細'+this.barCodeInfo['娴佹按鍙�']+'\r\n'
+					+'鎵撳嵃鏃ユ湡锛�'+formatDate()+'\r\n'+this.barCodeSplitInfo[0]['HBarCode']+'\r\n'
+					
+					,
+				})
 				
 				console.log('娴嬭瘯鎵撳嵃QR缁撴潫');
 			},
@@ -520,7 +621,8 @@
 					
 					// 鎵撳嵃鎴愬姛鍚庨噸缃姸鎬�
 					uni.hideLoading();
-					//this.printerLabel();//鎵撳嵃
+					this.printerLabel();//鎵撳嵃
+					this.isPrinting = false;
 				} catch (error) {
 					console.error('鎵撳嵃澶辫触:', error);
 					uni.hideLoading();
@@ -575,10 +677,10 @@
 							duration: 2000
 						});
 						//鎴愬姛鍚庤缃姸鎬�
-						self.isPrinting = false;
+						//self.isPrinting = false;
 						//this.resetButtonState();
 					} else if (e.key == 3) {
-						self.isPrinting = false;
+						//self.isPrinting = false;
 						uni.showToast({
 							title: '缂虹焊',
 							duration: 2000

--
Gitblit v1.9.1