From 3ca0447e29ec656c1e71069596d12183ffe2df92 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 10 三月 2026 10:43:17 +0800
Subject: [PATCH] 多语言

---
 pages/tiaomachaima/tiaomachaima2.vue |  154 +++++++++++++++++++++-----------------------------
 1 files changed, 65 insertions(+), 89 deletions(-)

diff --git a/pages/tiaomachaima/tiaomachaima2.vue b/pages/tiaomachaima/tiaomachaima2.vue
index 5c64f9f..fe3f7ad 100644
--- a/pages/tiaomachaima/tiaomachaima2.vue
+++ b/pages/tiaomachaima/tiaomachaima2.vue
@@ -2,9 +2,10 @@
 	<view class="container">
 		<view class="header">
 			<view class="item">
-				<view class="left">鏉$爜缂栧彿锛�</view>
+				<view class="left">{{ $t("BarCodeSplit2.barCodeNo") == "BarCodeSplit2.barCodeNo" ? "鏉$爜缂栧彿锛�" : $t("BarCodeSplit2.barCodeNo") }}</view>
 				<view class="right">
-					<input :focus="HBarCodeFocus" v-model="barCodeInfoMeta.barCodeNo" placeholder="璇锋壂鎻忔潯鐮�"
+					<input :focus="HBarCodeFocus" v-model="barCodeInfoMeta.barCodeNo" 
+						:placeholder="$t('BarCodeSplit2.barCodeNoPlaceholder') == 'BarCodeSplit2.barCodeNoPlaceholder' ? '璇锋壂鎻忔潯鐮�' : $t('BarCodeSplit2.barCodeNoPlaceholder')"
 						@blur="searchbarCodeInfo" @confirm="searchbarCodeInfo" />
 				</view>
 				<view>
@@ -14,91 +15,95 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="left">鎷嗙爜鏁伴噺锛�</view>
+				<view class="left">{{ $t("BarCodeSplit2.splitNumInput") == "BarCodeSplit2.splitNumInput" ? "鎷嗙爜鏁伴噺锛�" : $t("BarCodeSplit2.splitNumInput") }}</view>
 				<view class="right">
-					<input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" placeholder="璇疯緭鍏ユ媶鐮佹暟閲�" />
+					<input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" 
+						:placeholder="$t('BarCodeSplit2.splitNumPlaceholder') == 'BarCodeSplit2.splitNumPlaceholder' ? '璇疯緭鍏ユ媶鐮佹暟閲�' : $t('BarCodeSplit2.splitNumPlaceholder')" />
 				</view>
 			</view>
 			<view class="item">
-				<view class="left">鍒跺崟浜猴細</view>
+				<view class="left">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "鍒跺崟浜猴細" : $t("Gy.HMaker") }}</view>
 				<view class="right">
 					<input type="text" disabled name="HMaker" v-model="barCodeInfoMeta.billMaker"
-						style="background-color: #e4e4e4;" placeholder="璇疯緭鍏ュ埗鍗曚汉" />
+						style="background-color: #e4e4e4;" 
+						:placeholder="$t('BarCodeSplit2.makerPlaceholder') == 'BarCodeSplit2.makerPlaceholder' ? '璇疯緭鍏ュ埗鍗曚汉' : $t('BarCodeSplit2.makerPlaceholder')" />
 				</view>
 			</view>
 			<view class="operation-zone">
 				<button :class="cantSplit ? 'btn-disabled' : 'btn-c'" @click="searchbarCodeInfoMeta"
-					:disabled="cantSplit">鎷嗙爜</button>
+					:disabled="cantSplit">{{ $t("BarCodeSplit2.btnSplit") == "BarCodeSplit2.btnSplit" ? "鎷嗙爜" : $t("BarCodeSplit2.btnSplit") }}</button>
 				<button type="default" :class="cantGenerate ? 'btn-disabled' : 'btn-c'" @click="SaveBarCodeCreate"
-					:disabled="cantGenerate">鐢熸垚</button>
+					:disabled="cantGenerate">{{ $t("BarCodeSplit2.btnGenerate") == "BarCodeSplit2.btnGenerate" ? "鐢熸垚" : $t("BarCodeSplit2.btnGenerate") }}</button>
 				<button type="default" :class="cantPrint ? 'btn-disabled' : 'btn-c'" @click="PrintHBarCode"
-					:disabled="cantPrint">鎵撳嵃</button>
+					:disabled="cantPrint">{{ $t("BarCodeSplit2.btnPrint") == "BarCodeSplit2.btnPrint" ? "鎵撳嵃" : $t("BarCodeSplit2.btnPrint") }}</button>
 			</view>
 		</view>
 		<view class="divide"></view>
 		<view class="content">
 			<view class="barcode-detail" v-show="CommonUtils.isEmpty(Object.assign(barCodeInfo, {})) === false">
-				<view class="title">鏉$爜淇℃伅</view>
+				<view class="title">{{ $t("BarCodeSplit2.barCodeInfoTitle") == "BarCodeSplit2.barCodeInfoTitle" ? "鏉$爜淇℃伅" : $t("BarCodeSplit2.barCodeInfoTitle") }}</view>
 				<uni-card>
 					<view class="detail" style="display: none;">
-						<text>鏉$爜ID锛�</text>{{barCodeInfo['HItemID'] || '0'}}
+						<text>{{ $t("BarCodeSplit2.barCodeID") == "BarCodeSplit2.barCodeID" ? "鏉$爜ID锛�" : $t("BarCodeSplit2.barCodeID") }}</text>{{barCodeInfo['HItemID'] || '0'}}
 					</view>
 					<view class="detail">
-						<text>鏉$爜缂栧彿锛�</text>{{barCodeInfo['鏉$爜缂栧彿'] || ''}}
+						<text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "鏉$爜缂栧彿锛�" : $t("Gy.HBarCode") }}</text>{{barCodeInfo['鏉$爜缂栧彿'] || ''}}
 					</view>
 					<view class="detail">
-						<text>鏉$爜鍘熸暟閲忥細</text>{{barCodeInfo['鏁伴噺'] || '0'}}
+						<text>{{ $t("BarCodeSplit2.originalQty") == "BarCodeSplit2.originalQty" ? "鏉$爜鍘熸暟閲忥細" : $t("BarCodeSplit2.originalQty") }}</text>{{barCodeInfo['鏁伴噺'] || '0'}}
 					</view>
 					<view class="detail">
-						<text>鍓╀綑鏁伴噺锛�</text>{{barCodeInfo['鍓╀綑鏁伴噺'] || '0'}}
+						<text>{{ $t("BarCodeSplit2.remainingQty") == "BarCodeSplit2.remainingQty" ? "鍓╀綑鏁伴噺锛�" : $t("BarCodeSplit2.remainingQty") }}</text>{{barCodeInfo['鍓╀綑鏁伴噺'] || '0'}}
 					</view>
 					<view class="dWetail">
-						<text>鐗╂枡缂栫爜锛�</text>{{barCodeInfo['鐗╂枡浠g爜'] || ''}}
+						<text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "鐗╂枡缂栫爜锛�" : $t("Gy.HNumber") }}</text>{{barCodeInfo['鐗╂枡浠g爜'] || ''}}
 					</view>
 					<view class="detail">
-						<text>鐗╂枡鍚嶇О锛�</text>{{barCodeInfo['鐗╂枡鍚嶇О'] || ''}}
+						<text>{{ $t("Gy.HName") == "Gy.HName" ? "鐗╂枡鍚嶇О锛�" : $t("Gy.HName") }}</text>{{barCodeInfo['鐗╂枡鍚嶇О'] || ''}}
 					</view>
 					<view class="detail">
-						<text>瑙勬牸鍨嬪彿锛�</text>{{barCodeInfo['瑙勬牸鍨嬪彿'] || ''}}
+						<text>{{ $t("Gy.HModel") == "Gy.HModel" ? "瑙勬牸鍨嬪彿锛�" : $t("Gy.HModel") }}</text>{{barCodeInfo['瑙勬牸鍨嬪彿'] || ''}}
 					</view>
 					<view class="detail">
-						<text>璁¢噺鍗曚綅锛�</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
+						<text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "璁¢噺鍗曚綅锛�" : $t("Gy.HUnit") }}</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
 					</view>
 				</uni-card>
 			</view>
 			<view class="divide"></view>
 			<view class="barcode-split" v-show="barCodeSplitInfo.length>0">
-				<view class="title">鏉$爜鎷嗙爜</view>
+				<view class="title">{{ $t("BarCodeSplit2.barCodeSplitTitle") == "BarCodeSplit2.barCodeSplitTitle" ? "鏉$爜鎷嗙爜" : $t("BarCodeSplit2.barCodeSplitTitle") }}</view>
 				<view class="barcode-split-list" v-for="(item,index) in barCodeSplitInfo" :key="index">
 					<uni-card @tap="ModityHQty(item)">
 						<view class="detail">
-							<text>鏉$爜缂栧彿锛�</text>{{item['HBarCode'] || ''}}
+							<text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "鏉$爜缂栧彿锛�" : $t("Gy.HBarCode") }}</text>{{item['HBarCode'] || ''}}
 						</view>
 						<view class="detail split-num">
-							<text>鎷嗗垎鏁伴噺锛�</text>{{item['HSplitNum'] || '0'}}
+							<text>{{ $t("BarCodeSplit2.splitNumLabel") == "BarCodeSplit2.splitNumLabel" ? "鎷嗗垎鏁伴噺锛�" : $t("BarCodeSplit2.splitNumLabel") }}</text>{{item['HSplitNum'] || '0'}}
 						</view>
 						<view class="detail">
-							<text>鐗╂枡浠g爜锛�</text>{{item['HNumber'] || ''}}
+							<text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "鐗╂枡浠g爜锛�" : $t("Gy.HNumber") }}</text>{{item['HNumber'] || ''}}
 						</view>
 						<view class="detail">
-							<text>鐗╂枡鍚嶇О锛�</text>{{item['HName'] || ''}}
+							<text>{{ $t("Gy.HName") == "Gy.HName" ? "鐗╂枡鍚嶇О锛�" : $t("Gy.HName") }}</text>{{item['HName'] || ''}}
 						</view>
 						<view class="detail">
-							<text>瑙勬牸鍨嬪彿锛�</text>{{item['HModel'] || ''}}
+							<text>{{ $t("Gy.HModel") == "Gy.HModel" ? "瑙勬牸鍨嬪彿锛�" : $t("Gy.HModel") }}</text>{{item['HModel'] || ''}}
 						</view>
 						<view class="detail">
-							<text>璁¢噺鍗曚綅锛�</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
+							<text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "璁¢噺鍗曚綅锛�" : $t("Gy.HUnit") }}</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
 						</view>
 					</uni-card>
 				</view>
 			</view>
 		</view>
-		<view class="over" v-if="barCodeSplitInfo.length == 0">鏆傛棤鏁版嵁</view>
-		<view class="over" v-if="barCodeSplitInfo.length != 0">宸插埌搴�</view>
+		<view class="over" v-if="barCodeSplitInfo.length == 0">{{ $t("BarCodeSplit2.noData") == "BarCodeSplit2.noData" ? "鏆傛棤鏁版嵁" : $t("BarCodeSplit2.noData") }}</view>
+		<view class="over" v-if="barCodeSplitInfo.length != 0">{{ $t("BarCodeSplit2.bottom") == "BarCodeSplit2.bottom" ? "宸插埌搴�" : $t("BarCodeSplit2.bottom") }}</view>
 		<view>
-			<!-- 杈撳叆妗嗙ず渚� -->
 			<uni-popup ref="inputDialog" type="dialog">
-				<uni-popup-dialog ref="inputClose" mode="input" title="璇疯緭鍏ユ媶鐮佹暟閲�" :value="dialogVal" placeholder="璇疯緭鍏ユ媶鐮佹暟閲�"
+				<uni-popup-dialog ref="inputClose" mode="input" 
+					:title="$t('BarCodeSplit2.dialogTitle') == 'BarCodeSplit2.dialogTitle' ? '璇疯緭鍏ユ媶鐮佹暟閲�' : $t('BarCodeSplit2.dialogTitle')" 
+					:value="dialogVal" 
+					:placeholder="$t('BarCodeSplit2.dialogPlaceholder') == 'BarCodeSplit2.dialogPlaceholder' ? '璇疯緭鍏ユ媶鐮佹暟閲�' : $t('BarCodeSplit2.dialogPlaceholder')"
 					@confirm="dialogInputConfirm"></uni-popup-dialog>
 			</uni-popup>
 		</view>
@@ -155,11 +160,12 @@
 				barCodeSplitInfo: [],
 				dialogVal: 0,
 				itemCache: {},
-				cantGenerate: true, // 鐢熸垚鎸夐挳鍒濆绂佺敤
-				cantPrint: true, // 鎵撳嵃鎸夐挳鍒濆绂佺敤
-				cantSplit: false, // 鎷嗙爜鎸夐挳鍒濆鍙敤
+				cantGenerate: true,
+				cantPrint: true,
+				cantSplit: false,
 				HBarCodeFocus: false,
-				printInfo: "" //鎵撳嵃
+				printInfo: "",
+				isPrinting: false // 鎵撳嵃鐘舵��
 			};
 		},
 		components: {
@@ -168,7 +174,7 @@
 		methods: {
 			doRequest(url, data, resFunction, errFunction, method) {
 				uni.showLoading({
-					title: '鍔犺浇涓�...'
+					title: this.$t('BarCodeSplit2.loading') == 'BarCodeSplit2.loading' ? '鍔犺浇涓�...' : this.$t('BarCodeSplit2.loading')
 				})
 				uni.request({
 					method: method || "GET",
@@ -186,7 +192,7 @@
 					fail: (err) => {
 						uni.showToast({
 							icon: "error",
-							title: "鎺ュ彛璁块棶寮傚父!",
+							title: this.$t('BarCodeSplit2.requestFailed') == 'BarCodeSplit2.requestFailed' ? '鎺ュ彛璁块棶寮傚父!' : this.$t('BarCodeSplit2.requestFailed'),
 							duration: 2000
 						})
 						if (typeof errFunction === 'function') {
@@ -208,7 +214,7 @@
 				} else {
 					innerAudioContext.src = '/static/jingbao.wav';
 				}
-				innerAudioContext.play(); // 鎾斁闊抽
+				innerAudioContext.play();
 			},
 			//鍏夋爣
 			async refreshBarCodeState() {
@@ -229,9 +235,10 @@
 					`/Gy_BarCodeBillList/page?sWhere= and 鏉$爜缂栧彿=''${this.barCodeInfoMeta.barCodeNo}''&user=${getUserInfo()["Czymc"]}&page=1&size=1`
 					.toString()
 				if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) {
+					this.barCodeCall = false
 					return uni.showToast({
 						icon: "fail",
-						title: "鏉$爜缂栧彿涓嶈兘涓虹┖!"
+						title: this.$t('BarCodeSplit2.barCodeNoEmpty') == 'BarCodeSplit2.barCodeNoEmpty' ? '鏉$爜缂栧彿涓嶈兘涓虹┖!' : this.$t('BarCodeSplit2.barCodeNoEmpty')
 					})
 				}
 				this.doRequest(
@@ -246,9 +253,10 @@
 						if (count > 0) {
 							this.barCodeInfo = data[0]
 							this.barCodeSplitInfo = []
-							// 鎵弿鏉$爜鍚庨噸缃寜閽姸鎬�
 							this.resetButtonState();
                             this.barCodeCall = false
+						} else {
+							this.barCodeCall = false
 						}
 					},
 					(err) => {
@@ -260,38 +268,29 @@
 			
 			dialogInputConfirm(val) {
 				this.itemCache["HSplitNum"] = val
-
-				// 鍏抽棴绐楀彛鍚庯紝鎭㈠榛樿鍐呭
 				this.$refs.inputDialog.close()
-
 			},
 			//鎷嗙爜鎸夐挳璋冪敤
 			async searchbarCodeInfoMeta() {
 				this.cantGenerate = true
 				this.cantPrint = true
-				this.cantSplit = false // 鎷嗙爜鍓嶇‘淇濇媶鐮佹寜閽彲鐢�
+				this.cantSplit = false
 				if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) === true) {
 					return uni.showToast({
 						icon: 'none',
-						title: '鏉$爜缂栧彿涓嶅緱涓虹┖!'
+						title: this.$t('BarCodeSplit2.barCodeNoEmpty') == 'BarCodeSplit2.barCodeNoEmpty' ? '鏉$爜缂栧彿涓嶅緱涓虹┖!' : this.$t('BarCodeSplit2.barCodeNoEmpty')
 					});
 				}
 				if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) {
 					return uni.showToast({
 						icon: 'none',
-						title: '鎷嗗垎鏁伴噺涓嶅緱涓虹┖!'
-					});
-				}
-				if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) {
-					return uni.showToast({
-						icon: 'none',
-						title: '鎷嗗垎鏁伴噺涓嶅緱涓虹┖!'
+						title: this.$t('BarCodeSplit2.splitNumEmpty') == 'BarCodeSplit2.splitNumEmpty' ? '鎷嗗垎鏁伴噺涓嶅緱涓虹┖!' : this.$t('BarCodeSplit2.splitNumEmpty')
 					});
 				}
 				if (parseFloat(this.barCodeInfoMeta.splitNum) > parseFloat(this.barCodeInfo['鏁伴噺'])) {
 					return uni.showToast({
 						icon: 'none',
-						title: '鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鍘熸暟閲�!'
+						title: this.$t('BarCodeSplit2.splitNumExceed') == 'BarCodeSplit2.splitNumExceed' ? '鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鍘熸暟閲�!' : this.$t('BarCodeSplit2.splitNumExceed')
 					});
 				}
 				this.doRequest(
@@ -305,13 +304,11 @@
 							if (res.data.data.length < 1) {
 								return uni.showToast({
 									icon: 'none',
-									title: Message
+									title: res.data.Message || this.$t('BarCodeSplit2.noBillFound')
 								});
 							}
 
-							//鎷嗗垎鏉$爜锛氭暟閲忎负 splitNum
 							let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0]));
-							let HSplitNum = this.barCodeInfoMeta.splitNum;
 							this.barCodeSplitInfo.push({
 								HSplitNum: this.barCodeInfoMeta.splitNum,
 								HBarCode: res.data.data.NextBarCode,
@@ -320,17 +317,15 @@
 								HModel: barCodeItem1.HModel
 							});
 
-							//鏇存柊鍘熷厛鏉$爜鏁伴噺
 							this.barCodeInfo['鍓╀綑鏁伴噺'] = this.barCodeInfo['鏁伴噺'] - this.barCodeInfoMeta.splitNum;
 
-							// 鎷嗙爜鎴愬姛锛岀鐢ㄦ媶鐮佹寜閽紝鏀惧紑鐢熸垚鎸夐挳
 							this.cantSplit = true;
 							this.cantGenerate = false;
 							this.cantPrint = true;
 						} else {
 							uni.showToast({
 								icon: 'none',
-								title: '娌℃湁鎵惧埌瀵瑰簲鐨勫崟鎹�'
+								title: res.data.Message || this.$t('BarCodeSplit2.noBillFound')
 							});
 						}
 					},
@@ -341,7 +336,6 @@
 			},
 			//淇濆瓨鏂规硶
 			SaveBarCodeCreate() {
-				// 鏍¢獙鎷嗙爜鏁伴噺
 				let sum = this.barCodeSplitInfo.reduce((acc, obj) => {
 					return acc + obj["HSplitNum"]
 				}, 0)
@@ -349,7 +343,7 @@
 				if (sum > this.barCodeInfo["HQty"]) {
 					return uni.showToast({
 						icon: 'none',
-						title: '鎷嗙爜鏁伴噺鍜屼笉寰楀ぇ浜庢潯鐮佹暟閲�'
+						title: this.$t('BarCodeSplit2.sumExceed') == 'BarCodeSplit2.sumExceed' ? '鎷嗙爜鏁伴噺鍜屼笉寰楀ぇ浜庢潯鐮佹暟閲�' : this.$t('BarCodeSplit2.sumExceed')
 					});
 				}
 				let msg =
@@ -360,12 +354,11 @@
 					},
 					(res) => {
 						if (res.data.code == 1) {
-							// 鐢熸垚鎴愬姛锛岀鐢ㄧ敓鎴愭寜閽紝鏀惧紑鎵撳嵃鎸夐挳
 							this.cantGenerate = true;
 							this.cantPrint = false;
 							this.cantSplit = true;
 							uni.showToast({
-								title: '鐢熸垚鎴愬姛!'
+								title: this.$t('BarCodeSplit2.generateSuccess') == 'BarCodeSplit2.generateSuccess' ? '鐢熸垚鎴愬姛!' : this.$t('BarCodeSplit2.generateSuccess')
 							});
 						} else {
 							this.cantGenerate = false;
@@ -373,27 +366,23 @@
 								title: res.data.Message
 							});
 						}
-
 					},
 					(err) => {
 						console.err(err)
 					},
 					"POST"
 				)
-
 			},
 			//鎵撳嵃鎸夐挳
-			// 鐖剁粍浠朵腑鐨勬墦鍗版柟娉�
 			async PrintHBarCode() {
 				if (this.$printer.isConnected() === false) {
 					this.$refs.labelPrinter.openPopup();
 					return;
 				}
 
-				// 闃叉閲嶅鐐瑰嚮
 				if (this.isPrinting) {
 					uni.showToast({
-						title: '鎵撳嵃涓紝璇风◢鍊�...',
+						title: this.$t('BarCodeSplit2.printingMessage') == 'BarCodeSplit2.printingMessage' ? '鎵撳嵃涓紝璇风◢鍊�...' : this.$t('BarCodeSplit2.printingMessage'),
 						icon: 'none'
 					});
 					return;
@@ -405,13 +394,11 @@
 					let HBarCodeNoStr = `${this.barCodeSplitInfo[0]['HBarCode']}`;
 					console.log('鑾峰彇鏁版嵁', HBarCodeNoStr);
 
-					// 鏄剧ず鎵撳嵃涓姸鎬�
 					uni.showLoading({
-						title: '鎵撳嵃涓�...',
+						title: this.$t('BarCodeSplit2.loadingPrint') == 'BarCodeSplit2.loadingPrint' ? '鎵撳嵃涓�...' : this.$t('BarCodeSplit2.loadingPrint'),
 						mask: true
 					});
 
-					// 鑾峰彇鎵撳嵃鏁版嵁
 					const printData = await new Promise((resolve, reject) => {
 						uni.request({
 							url: this.serverUrl + '/Sc_BarCode/GetSplitBarCode_SubList',
@@ -422,17 +409,16 @@
 								if (res.data.count == 1) {
 									resolve(res.data.data[0]);
 								} else {
-									reject(new Error(res.data.Message || '鏈壘鍒版墦鍗版暟鎹�'));
+									reject(new Error(res.data.Message || this.$t('BarCodeSplit2.printNoData')));
 								}
 							},
 							fail: (err) => {
-								reject(new Error('鎺ュ彛璇锋眰澶辫触'));
+								reject(new Error(this.$t('BarCodeSplit2.requestFailed')));
 							}
 						});
 					});
 
 					const item = printData;
-					// 鍑礉濂堢壒鎵撳嵃妯℃澘
 					this.printInfo = `! 0 200 200 400 1
 			      PAGE-WIDTH 800
 			      SETQRVER 2
@@ -464,24 +450,20 @@
 
 					console.log('printInfo: ', this.printInfo);
 
-					// 绛夊緟鎵撳嵃缁勪欢鏇存柊
 					await this.$nextTick();
 
-					// 鎵ц鎵撳嵃锛屽苟绛夊緟鎵撳嵃瀹屾垚
 					const printResult = await this.$refs.labelPrinter.execPrint();
 					console.log('鎵撳嵃缁撴灉:', printResult);
 
-					// 鎵撳嵃鎴愬姛鍚庨噸缃姸鎬�
 					uni.hideLoading();
 					this.isPrinting = false;
 
 					uni.showToast({
-						title: '鎵撳嵃瀹屾垚',
+						title: this.$t('BarCodeSplit2.printSuccess') == 'BarCodeSplit2.printSuccess' ? '鎵撳嵃瀹屾垚' : this.$t('BarCodeSplit2.printSuccess'),
 						icon: 'success',
 						duration: 2000
 					});
 
-					// 鎾斁鎴愬姛鎻愮ず闊�
 					CommonUtils.playSound(1);
 
 				} catch (error) {
@@ -490,7 +472,7 @@
 					this.isPrinting = false;
 
 					uni.showToast({
-						title: error.message || '鎵撳嵃澶辫触',
+						title: error.message || this.$t('BarCodeSplit2.printFailed'),
 						icon: 'error',
 						duration: 2000
 					});
@@ -501,28 +483,25 @@
 				var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
 				mpaasScanModule.mpaasScan({
 					'hideAlbum': true,
-					'timeoutInterval': '10', //瓒呮椂鏃堕棿
-					'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
+					'timeoutInterval': '10',
+					'timeoutText': this.$t('BarCodeSplit2.timeoutText') == 'BarCodeSplit2.timeoutText' ? '鏈瘑鍒埌浜岀淮鐮�' : this.$t('BarCodeSplit2.timeoutText')
 				}, (ret) => {
 					console.log(ret.resp_result)
 					if (this.CommonUtils.isEmpty(ret.resp_result) === false) {
 						console.log('鏉$爜鍐呭锛�' + ret.resp_result);
 						this.barCodeInfoMeta.barCodeNo = ret.resp_result
-
 						this.searchbarCodeInfo()
 					}
 				})
 			},
-			// 閲嶇疆鎸夐挳鐘舵�佹柟娉�
 			resetButtonState() {
-				this.cantSplit = false; // 鎷嗙爜鎸夐挳鍙敤
-				this.cantGenerate = true; // 鐢熸垚鎸夐挳绂佺敤
-				this.cantPrint = true; // 鎵撳嵃鎸夐挳绂佺敤
+				this.cantSplit = false;
+				this.cantGenerate = true;
+				this.cantPrint = true;
 			}
 		},
 		onLoad() {
 			this.HBarCodeFocus = true;
-			// 椤甸潰鍒濆鍖栨椂璁剧疆鎸夐挳鐘舵��
 			this.resetButtonState();
 		}
 	}
@@ -562,8 +541,6 @@
 				padding: 0 10rpx;
 				gap: 20rpx;
 				font-size: 30rpx;
-				// height: 1.5rem;
-				// justify-content: center;
 				align-items: center;
 
 				.left {
@@ -577,7 +554,6 @@
 					padding: 6rpx 0;
 					border-radius: 22rpx;
 					border: 1px solid #e4e4e4;
-					//background-color: #e4e4e4;
 
 					>input {
 						height: auto;

--
Gitblit v1.9.1