From d2bfd6d78df34f0aad0d22e75d137d2f104c1bc1 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期一, 04 八月 2025 15:17:21 +0800
Subject: [PATCH] 修改打印模板 工序出站汇报单 添加 未报工数量 是否计时 工序 委外接收单 添加 未报工数量

---
 pages/tiaomadaying/tiaomadaying.vue | 1065 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 537 insertions(+), 528 deletions(-)

diff --git a/pages/tiaomadaying/tiaomadaying.vue b/pages/tiaomadaying/tiaomadaying.vue
index 9dfc35b..a32cb42 100644
--- a/pages/tiaomadaying/tiaomadaying.vue
+++ b/pages/tiaomadaying/tiaomadaying.vue
@@ -1,205 +1,208 @@
 <template>
-	<view class="container">
-		<view class="content">
-			<view class="header">鍩烘湰淇℃伅</view>
-			<view class="items">
-				<view class="item">
-					<view class="left">鏉$爜缂栧彿锛�</view>
-					<view class="right barcode">
-						<input :focus="HBarCodeFocus" name="HBarCode" v-model="lailiaoInfo.barCodeNo"
-							@focus="lailiaoInfo.barCodeNo = ''" @confirm="barCodeEntryHandler(lailiaoInfo.barCodeNo)"
-							placeholder="璇锋壂鎻忓晢鍝佹潯鐮�" />
-					</view>
-					<view>
-						<uni-icons type="scan"
-							style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;font-weight: 500;"
-							size="20" @click="toScanCode"></uni-icons>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">婧愬崟鍙凤細</view>
-					<view class="right">
-						<input name="HBillNo" disabled v-model="lailiaoInfo.HBillNo" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">婧愬崟琛屽彿锛�</view>
-					<view class="right">
-						<input name="HBillLineNo" disabled v-model="lailiaoInfo.HBillLineNo" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">鐗╂枡缂栫爜锛�</view>
-					<view class="right">
-						<input name="HMaterNo" disabled v-model="lailiaoInfo.HMaterNumber" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">鐗╂枡鍚嶇О锛�</view>
-					<view class="right">
-						<input name="HMaterName" disabled v-model="lailiaoInfo.HMaterName" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">瑙勬牸鍨嬪彿锛�</view>
-					<view class="right">
-						<input name="HMaterType" disabled v-model="lailiaoInfo.HMaterModel" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">鎵规锛�</view>
-					<view class="right">
-						<input name="HBatchNo" disabled v-model="lailiaoInfo.HBatchNo" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">鏁伴噺锛�</view>
-					<view class="right">
-						<input name="HQty" disabled v-model="lailiaoInfo.HQty" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">MTO鍙凤細</view>
-					<view class="right">
-						<input name="HMTONo" disabled v-model="lailiaoInfo.HMTONo" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">渚涘簲鍟嗭細</view>
-					<view class="right">
-						<input name="HSupName" disabled v-model="lailiaoInfo.HSupName" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">渚涘簲鍟嗙畝绉帮細</view>
-					<view class="right">
-						<input name="HSupNameShort" disabled v-model="lailiaoInfo.HSupNameShort" />
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="operation-zone">
-			<button class="btn-c" :disabled="buttonStatus.btn1" @click="GenereateBarCode">鐢熸垚</button>
-			<button class="btn-c" :disabled="buttonStatus.btn2" @click="print">鎵撳嵃</button>
-			<view></view>
-			<button class="btn-c" @click="setClearLailiaoInfo">鏂板</button>
-			<button class="btn-c" @click="exit">閫�鍑�</button>
-		</view>
-		<labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
-		</labelPrinterComponentVue>
-	</view>
+    <view class="container">
+        <view class="content">
+            <view class="header">鍩烘湰淇℃伅</view>
+            <view class="items">
+                <view class="item">
+                    <view class="left">鏉$爜缂栧彿锛�</view>
+                    <view class="right barcode">
+                        <input :focus="HBarCodeFocus" name="HBarCode" v-model="lailiaoInfo.barCodeNo"
+                            @focus="lailiaoInfo.barCodeNo = ''" @confirm="barCodeEntryHandler(lailiaoInfo.barCodeNo)"
+                            placeholder="璇锋壂鎻忓晢鍝佹潯鐮�" />
+                    </view>
+                    <view>
+                        <uni-icons type="scan"
+                            style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;font-weight: 500;"
+                            size="20" @click="toScanCode"></uni-icons>
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">婧愬崟鍙凤細</view>
+                    <view class="right">
+                        <input name="HBillNo" disabled v-model="lailiaoInfo.HBillNo" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">婧愬崟琛屽彿锛�</view>
+                    <view class="right">
+                        <input name="HBillLineNo" disabled v-model="lailiaoInfo.HBillLineNo" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">鐗╂枡缂栫爜锛�</view>
+                    <view class="right">
+                        <input name="HMaterNo" disabled v-model="lailiaoInfo.HMaterNumber" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">鐗╂枡鍚嶇О锛�</view>
+                    <view class="right">
+                        <input name="HMaterName" disabled v-model="lailiaoInfo.HMaterName" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">瑙勬牸鍨嬪彿锛�</view>
+                    <view class="right">
+                        <input name="HMaterType" disabled v-model="lailiaoInfo.HMaterModel" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">鎵规锛�</view>
+                    <view class="right">
+                        <input name="HBatchNo" disabled v-model="lailiaoInfo.HBatchNo" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">鏁伴噺锛�</view>
+                    <view class="right">
+                        <input name="HQty" disabled v-model="lailiaoInfo.HQty" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">MTO鍙凤細</view>
+                    <view class="right">
+                        <input name="HMTONo" disabled v-model="lailiaoInfo.HMTONo" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">渚涘簲鍟嗭細</view>
+                    <view class="right">
+                        <input name="HSupName" disabled v-model="lailiaoInfo.HSupName" />
+                    </view>
+                </view>
+                <view class="item">
+                    <view class="left">渚涘簲鍟嗙畝绉帮細</view>
+                    <view class="right">
+                        <input name="HSupNameShort" disabled v-model="lailiaoInfo.HSupNameShort" />
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="operation-zone">
+            <button class="btn-c" :disabled="buttonStatus.btn1" @click="GenereateBarCode">鐢熸垚</button>
+            <button class="btn-c" :disabled="buttonStatus.btn2" @click="print">鎵撳嵃</button>
+            <view></view>
+            <button class="btn-c" @click="setClearLailiaoInfo">鏂板</button>
+            <button class="btn-c" @click="exit">閫�鍑�</button>
+        </view>
+        <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
+        </labelPrinterComponentVue>
+    </view>
 </template>
 
 <script>
-	import labelPrinterComponentVue from '../../components/labelPrinterComponent/labelPrinterComponent.vue';
-	import {
-		CBar,
-		CBox,
-		CForm,
-		CImage,
-		CLine,
-		CCodeRotation,
-		CCodeType,
-		CPage,
-		CText,
-		CFont,
-		CBold,
-		CRotation,
-		CInverse,
-		CMag,
-		CQRCode,
-		CCorrectLevel,
-		CSN,
-		CStatus,
-		CPCL,
-	} from "@psdk/cpcl";
-	import {
-		CommonUtils
-	} from '../../utils/common';
-	import {
-		getUserInfo
-	} from "@/utils/auth.js";
-	export default {
-		data() {
-			return {
-				HBarCodeFocus: false,
+    import labelPrinterComponentVue from '../../components/labelPrinterComponent/labelPrinterComponent.vue';
+    import {
+        CBar,
+        CBox,
+        CForm,
+        CImage,
+        CLine,
+        CCodeRotation,
+        CCodeType,
+        CPage,
+        CText,
+        CFont,
+        CBold,
+        CRotation,
+        CInverse,
+        CMag,
+        CQRCode,
+        CCorrectLevel,
+        CSN,
+        CStatus,
+        CPCL,
+    } from "@psdk/cpcl";
+    import {
+        CommonUtils
+    } from '../../utils/common';
+    import {
+        getUserInfo
+    } from "@/utils/auth.js";
+    export default {
+        data() {
+            return {
+                HBarCodeFocus: false,
 
-				printInfo: "",
-				userInfo: getUserInfo(),
-				buttonStatus: {
-					btn1: true,
-					btn2: true
-				},
-				barCodeMeta: '',
-				generatedBarCode: '',
-				lailiaoInfo: {
-					HMainID: '',
-					HSubID: '',
-					HOrderBillNo: '',
-					HMaterID: '',
-					// barCodeNo: '',
-					HBillNo: '',
-					HBillLineNo: '',
-					HMaterNumber: '',
-					HMaterName: '',
-					HMaterModel: '',
-					HPcsName: '',
-					HBatchNo: '',
-					HQty: '',
-					HMTONo: '',
-					HSupName: '',
-					HSupNameShort: '',
-					HMinQty: '',
-					HBQty: '',
-					HSupID: '',
-					HUnitID: '',
-					HDate: '',
-					HSourceBillNo: '',
-					HMaker: getUserInfo()["Czymc"],
-					HSupNumber: '',
-				}
-			};
-		},
-		components: {
-			labelPrinterComponentVue
-		},
-		onLoad() {
-			this.HBarCodeFocus = true
-		},
-		methods: {
-			async refreshBarcodeState() {
-				this.HBarCodeFocus = false
-				await this.$nextTick(() => {
-					this.HBarCodeFocus = true
-					this.lailiaoInfo.barCodeNo = ""
-				})
-			},
-			async print() {
-				if (this.$printer.isConnected() === false) {
-					this.$refs.labelPrinter.openPopup()
-				} else {
-					let HBarCodeNoStr =
-						`${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty||0).toFixed(10)}@${this.lailiaoInfo.HSupNumber || ''}`
+                printInfo: "",
+                userInfo: getUserInfo(),
+                buttonStatus: {
+                    btn1: true,
+                    btn2: true
+                },
+                barCodeMeta: '',
+                generatedBarCode: '',
+                lailiaoInfo: {
+                    HMainID: '',
+                    HSubID: '',
+                    HOrderBillNo: '',
+                    HMaterID: '',
+                    // barCodeNo: '',
+                    HBillNo: '',
+                    HBillLineNo: '',
+                    HMaterNumber: '',
+                    HMaterName: '',
+                    HMaterModel: '',
+                    HPcsName: '',
+                    HBatchNo: '',
+                    HQty: '',
+                    HMTONo: '',
+                    HSupName: '',
+                    HSupNameShort: '',
+                    HMinQty: '',
+                    HBQty: '',
+                    HSupID: '',
+                    HUnitID: '',
+                    HDate: '',
+                    HSourceBillNo: '',
+                    HMaker: getUserInfo()["Czymc"],
+                    HSupNumber: '',
+                    HStyleNo: '',
+                    HGroup: '',
+                    HCustomNo: '',
+                }
+            };
+        },
+        components: {
+            labelPrinterComponentVue
+        },
+        onLoad() {
+            this.HBarCodeFocus = true
+        },
+        methods: {
+            async refreshBarcodeState() {
+                this.HBarCodeFocus = false
+                await this.$nextTick(() => {
+                    this.HBarCodeFocus = true
+                    this.lailiaoInfo.barCodeNo = ""
+                })
+            },
+            async print() {
+                if (this.$printer.isConnected() === false) {
+                    this.$refs.labelPrinter.openPopup()
+                } else {
+                    let HBarCodeNoStr =
+                        `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty||0).toFixed(10)}@${this.lailiaoInfo.HSupNumber || ''}`
 
-					let pcsInfo = this.lailiaoInfo.HPcsName ? '(' + this.lailiaoInfo.HPcsName + ')' : ''
+                    let pcsInfo = this.lailiaoInfo.HPcsName ? '(' + this.lailiaoInfo.HPcsName + ')' : ''
 
-					this.printInfo = `! 0 200 200 400 1
+                    this.printInfo = `! 0 200 200 400 1
 PAGE-WIDTH 608
 SETQRVER 3
-B QR 470 30 Q 0 U 3
+B QR 480 30 Q 0 U 3
 LA,${HBarCodeNoStr}
 ENDQR
 T 24 0 0 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
 T 55 0 0 55 (Supplier)
-T 24 0 0 75 渚涘簲鍟嗘枡鍙�:  ${this.lailiaoInfo.HMaterNumber}
+T 24 0 0 75 渚涘簲鍟嗘枡鍙�:  ${this.lailiaofo.HMaterNumber}
 T 55 0 0 100 (Supplier Sku No.)
 T 24 0 0 120 鐗╂枡鍚嶇О: ${this.lailiaoInfo.HMaterName}
 T 55 0 0 145 (Material Code)
-T 24 0 0 165 娆惧彿: 
+T 24 0 0 165 娆惧彿: ${this.lailiaoInfo.HStyleNo}
 T 55 0 0 190 (Style No.)
-T 24 0 300 165 瀹㈡埛缂栧彿: 
+T 24 0 300 165 瀹㈡埛缂栧彿: ${this.lailiaoInfo.HCustomNo}
 T 55 0 300 190 (Consumer No.)
-T 24 0 0 210 鍒嗙粍: 
+T 24 0 0 210 鍒嗙粍: ${this.lailiaoInfo.HGroup}
 T 55 0 0 235 (Group) 
 T 24 0 300 210 瑙勬牸: ${this.lailiaoInfo.HMaterModel}
 T 55 0 300 235 (SKU NO.) 
@@ -224,381 +227,387 @@
 T 55 0 440 370 (Spec. accepted) 
 FORM
 PRINT`
-					await this.$nextTick(() => {
-						this.$refs.labelPrinter.execPrint()
-					})
-				}
-			},
-			setLailiaoInfo(data, row) {
-				if (row > data.length) {
-					CommonUtils.playSound(0)
-					return uni.showToast({
-						icon: 'none',
-						title: '鏌ヨ鐨勫崟鎹彿涓嶅瓨鍦�...'
-					})
+                    await this.$nextTick(() => {
+                        this.$refs.labelPrinter.execPrint()
+                    })
+                }
+            },
+            setLailiaoInfo(data, row) {
+                if (row > data.length) {
+                    CommonUtils.playSound(0)
+                    return uni.showToast({
+                        icon: 'none',
+                        title: '鏌ヨ鐨勫崟鎹彿涓嶅瓨鍦�...'
+                    })
 
-				}
-				let d = data[row - 1]
-				console.log('鏁伴噺: ', parseFloat(d['鏁伴噺']).toFixed(10));
-				this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
-					HMaterNumber: d['鐗╂枡缂栫爜'],
-					HMaterName: d['鐗╂枡鍚嶇О'],
-					HMaterModel: d['瑙勬牸鍨嬪彿'],
-					// HBatchNo: d['鎵瑰彿'],
-					HQty: d['鏁伴噺'],
-					HMinQty: d['鏁伴噺'],
-					HBQty: d['鏁伴噺'],
-					HSupID: d['HSupID'],
-					HSupNumber: d['渚涘簲鍟嗕唬鐮�'],
-					HSupName: d['渚涘簲鍟�'],
-					HUnitID: d['HUnitID'],
-					HPcsName: d['璁¢噺鍗曚綅'],
-					HSupNameShort: d['渚涘簲鍟�'],
-					HMTONo: d['璁″垝璺熻釜鍙�'],
-					HMainID: d['hmainid'],
-					HSubID: d['HEntryID'],
-					HMaterID: d['HMaterID'],
-					HDate: d['鏃ユ湡'],
-				})
-				CommonUtils.playSound(1)
-				this.buttonStatus.btn2 = true
-			},
-			setClearLailiaoInfo() {
-				this.lailiaoInfo = {
-					HMainID: '',
-					HSubID: '',
-					HOrderBillNo: '',
-					HMaterID: '',
-					barCodeNo: '',
-					HBillNo: '',
-					HBillLineNo: '',
-					HMaterNumber: '',
-					HMaterName: '',
-					HMaterModel: '',
-					HPcsName: '',
-					HBatchNo: '',
-					HQty: '',
-					HMTONo: '',
-					HSupName: '',
-					HSupNameShort: '',
-					HMinQty: '',
-					HBQty: '',
-					HSupID: '',
-					HUnitID: '',
-					HDate: '',
-					HSourceBillNo: '',
-					HSupNumber: '',
-				}
+                }
+                let d = data[0]
+                console.log('鏁伴噺: ', parseFloat(d['鏁伴噺']).toFixed(10));
+                this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
+                    HMaterNumber: d['鐗╂枡缂栫爜'],
+                    HMaterName: d['鐗╂枡鍚嶇О'],
+                    HMaterModel: d['瑙勬牸鍨嬪彿'],
+                    // HBatchNo: d['鎵瑰彿'],
+                    HQty: d['鏁伴噺'],
+                    HMinQty: d['鏁伴噺'],
+                    HBQty: d['鏁伴噺'],
+                    HSupID: d['HSupID'],
+                    HSupNumber: d['渚涘簲鍟嗕唬鐮�'],
+                    HSupName: d['渚涘簲鍟�'],
+                    HUnitID: d['HUnitID'],
+                    HPcsName: d['璁¢噺鍗曚綅'],
+                    HSupNameShort: d['渚涘簲鍟�'],
+                    HMTONo: d['璁″垝璺熻釜鍙�'],
+                    HMainID: d['hmainid'],
+                    HSubID: d['HEntryID'],
+                    HMaterID: d['HMaterID'],
+                    HDate: d['鏃ユ湡'],
+                    HStyleNo: d['娆惧彿'],
+                    HGroup: d['鍒嗙粍'],
+                    HCustomNo: d['瀹㈡埛缂栧彿']
+                })
+                CommonUtils.playSound(1)
+                this.buttonStatus.btn2 = true
+            },
+            setClearLailiaoInfo() {
+                this.lailiaoInfo = {
+                    HMainID: '',
+                    HSubID: '',
+                    HOrderBillNo: '',
+                    HMaterID: '',
+                    barCodeNo: '',
+                    HBillNo: '',
+                    HBillLineNo: '',
+                    HMaterNumber: '',
+                    HMaterName: '',
+                    HMaterModel: '',
+                    HPcsName: '',
+                    HBatchNo: '',
+                    HQty: '',
+                    HMTONo: '',
+                    HSupName: '',
+                    HSupNameShort: '',
+                    HMinQty: '',
+                    HBQty: '',
+                    HSupID: '',
+                    HUnitID: '',
+                    HDate: '',
+                    HSourceBillNo: '',
+                    HSupNumber: '',
+                    HStyleNo: '',
+                    HGroup: '',
+                    HCustomNo: '',
+                }
 
-				this.buttonStatus = {
-					btn1: true,
-					btn2: false
-				}
-				
-				this.refreshBarcodeState()
-			},
-			barCodeEntryHandler(barCode) {
-				if (CommonUtils.isEmpty(barCode) === false) {
-					console.log('鏉$爜鍐呭锛�' + barCode);
-					this.lailiaoInfo.barCodeNo = barCode;
-					if (barCode.includes("@") === false) {
-						this.buttonStatus.btn2 = false
-						CommonUtils.playSound(0)
-						this.refreshBarcodeState()
-						return uni.showToast({
-							icon: 'none',
-							title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
-						})
-					}
-					let barCodeInfo = barCode.split("@")
-					let [PurchaseBillNo, Row] = barCodeInfo
-					this.lailiaoInfo.HBillNo = PurchaseBillNo
-					this.lailiaoInfo.HSourceBillNo = PurchaseBillNo
-					this.lailiaoInfo.HBillLineNo = Row
-					console.log({
-						sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
-						user: this.userInfo.Czymc,
-					})
-					CommonUtils.doRequest(
-						"/Cg_POOrderBill/list", {
-							sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
-							user: this.userInfo.Czymc,
-						},
-						(res) => {
-							console.log('閲囪喘璁㈠崟: ', res)
-							let {
-								data,
-								count,
-								Message
-							} = res.data
-							if (count > 0) {
+                this.buttonStatus = {
+                    btn1: true,
+                    btn2: false
+                }
 
-								this.setLailiaoInfo(data, Row)
-								// uni.showToast({
-								//     icon: 'none',
-								//     title: Message
-								// })
-								this.buttonStatus.btn1 = false
+                this.refreshBarcodeState()
+            },
+            barCodeEntryHandler(barCode) {
+                if (CommonUtils.isEmpty(barCode) === false) {
+                    console.log('鏉$爜鍐呭锛�' + barCode);
+                    this.lailiaoInfo.barCodeNo = barCode;
+                    if (barCode.includes("@") === false) {
+                        this.buttonStatus.btn2 = false
+                        CommonUtils.playSound(0)
+                        this.refreshBarcodeState()
+                        return uni.showToast({
+                            icon: 'none',
+                            title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
+                        })
+                    }
+                    let barCodeInfo = barCode.split("@")
+                    let [PurchaseBillNo, Row] = barCodeInfo
+                    this.lailiaoInfo.HBillNo = PurchaseBillNo
+                    this.lailiaoInfo.HSourceBillNo = PurchaseBillNo
+                    this.lailiaoInfo.HBillLineNo = Row
+                    console.log({
+                        sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}' and 琛屽彿 = ${Row}`,
+                        user: this.userInfo.Czymc,
+                    })
+                    CommonUtils.doRequest(
+                        "/Cg_POOrderBill/list", {
+                            sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}' and 琛屽彿 = ${Row}`,
+                            user: this.userInfo.Czymc,
+                        },
+                        (res) => {
+                            console.log('閲囪喘璁㈠崟: ', res)
+                            let {
+                                data,
+                                count,
+                                Message
+                            } = res.data
+                            if (count > 0) {
+                                console.log('data: ', data);
+                                this.setLailiaoInfo(data, Row)
+                                // uni.showToast({
+                                //     icon: 'none',
+                                //     title: Message
+                                // })
+                                this.buttonStatus.btn1 = false
 
-							} else {
-								CommonUtils.playSound(0)
-								this.refreshBarcodeState()
-								// uni.showToast({
-								//     icon: 'none',
-								//     title: Message
-								// })
-								this.buttonStatus.btn1 = true
-								this.buttonStatus.btn2 = true
-							}
-						},
-						(error) => {
-							CommonUtils.playSound(0)
-							this.refreshBarcodeState()
-							this.buttonStatus.btn1 = true
-							this.buttonStatus.btn2 = true
-						}
-					)
+                            } else {
+                                CommonUtils.playSound(0)
+                                this.refreshBarcodeState()
+                                // uni.showToast({
+                                //     icon: 'none',
+                                //     title: Message
+                                // })
+                                this.buttonStatus.btn1 = true
+                                this.buttonStatus.btn2 = true
+                            }
+                        },
+                        (error) => {
+                            CommonUtils.playSound(0)
+                            this.refreshBarcodeState()
+                            this.buttonStatus.btn1 = true
+                            this.buttonStatus.btn2 = true
+                        }
+                    )
 
-				}
-			},
-			toScanCode() {
-				var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
-				mpaasScanModule.mpaasScan({
-					'hideAlbum': true,
-					'timeoutInterval': '10', //瓒呮椂鏃堕棿
-					'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
-				}, (ret) => {
-					console.log(ret.resp_result)
-					if (CommonUtils.isEmpty(ret.resp_result) === false) {
-						console.log('鏉$爜鍐呭锛�' + ret.resp_result);
-						this.lailiaoInfo.barCodeNo = ret.resp_result;
-						if (ret.resp_result.includes("@") === false) {
-							return uni.showToast({
-								icon: 'none',
-								title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
-							})
-						}
-						// let barCodeInfo = ret.resp_result.split("@")
-						// let [PurchaseBillNo, Row] = barCodeInfo
-						// this.lailiaoInfo.HBillNo = PurchaseBillNo,
-						//     this.lailiaoInfo.HBillLineNo = Row
-						// console.log({
-						//     sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
-						//     user: this.userInfo.Czymc,
-						// })
-						// CommonUtils.doRequest(
-						//     "/Cg_POOrderBill/list", {
-						//         sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
-						//         user: this.userInfo.Czymc,
-						//     },
-						//     (res) => {
-						//         console.log('閲囪喘璁㈠崟: ', res)
-						//         let {
-						//             data,
-						//             count
-						//         } = res.data
-						//         if (count > 0) {
-						//             this.setLailiaoInfo(data, Row)
-						//         }
-						//     },
-						//     (error) => {
+                }
+            },
+            toScanCode() {
+                var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+                mpaasScanModule.mpaasScan({
+                    'hideAlbum': true,
+                    'timeoutInterval': '10', //瓒呮椂鏃堕棿
+                    'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
+                }, (ret) => {
+                    console.log(ret.resp_result)
+                    if (CommonUtils.isEmpty(ret.resp_result) === false) {
+                        console.log('鏉$爜鍐呭锛�' + ret.resp_result);
+                        this.lailiaoInfo.barCodeNo = ret.resp_result;
+                        if (ret.resp_result.includes("@") === false) {
+                            return uni.showToast({
+                                icon: 'none',
+                                title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
+                            })
+                        }
+                        // let barCodeInfo = ret.resp_result.split("@")
+                        // let [PurchaseBillNo, Row] = barCodeInfo
+                        // this.lailiaoInfo.HBillNo = PurchaseBillNo,
+                        //     this.lailiaoInfo.HBillLineNo = Row
+                        // console.log({
+                        //     sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
+                        //     user: this.userInfo.Czymc,
+                        // })
+                        // CommonUtils.doRequest(
+                        //     "/Cg_POOrderBill/list", {
+                        //         sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
+                        //         user: this.userInfo.Czymc,
+                        //     },
+                        //     (res) => {
+                        //         console.log('閲囪喘璁㈠崟: ', res)
+                        //         let {
+                        //             data,
+                        //             count
+                        //         } = res.data
+                        //         if (count > 0) {
+                        //             this.setLailiaoInfo(data, Row)
+                        //         }
+                        //     },
+                        //     (error) => {
 
-						//     }
-						// )
-						this.barCodeEntryHandler(ret.resp_result)
-					}
+                        //     }
+                        // )
+                        this.barCodeEntryHandler(ret.resp_result)
+                    }
 
-				})
-			},
-			GenereateBarCode() {
-				let HBarCodeNoStr =
-					`${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty || 0).toFixed(10)}@${this.lailiaoInfo.HSupNumber  || ''}`
-				let sMain = []
-				sMain[0] = this.lailiaoInfo
-				let sMainStr = JSON.stringify(sMain);
-				//鑾峰彇閫夋嫨鐨勭粍缁�
-				let HOrgType = uni.getStorageSync('Organization');
-				//鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
-				let CampanyName = "xxx";
-				//鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
-				let HSourceBillType = "閲囪喘璁㈠崟";
-				//鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
-				let HSelectBarCodeType = "鍝佺鏉$爜";
-				//鑾峰彇褰撳墠鐧诲綍浜哄憳
-				let UserName = uni.getStorageSync('HUserName');
-				let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
-					CampanyName + ';' + UserName + ';' + HBarCodeNoStr;
+                })
+            },
+            GenereateBarCode() {
+                let HBarCodeNoStr =
+                    `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty || 0).toFixed(10)}@${this.lailiaoInfo.HSupNumber  || ''}`
+                let sMain = []
+                sMain[0] = this.lailiaoInfo
+                let sMainStr = JSON.stringify(sMain);
+                //鑾峰彇閫夋嫨鐨勭粍缁�
+                let HOrgType = uni.getStorageSync('Organization');
+                //鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
+                let CampanyName = "xxx";
+                //鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+                let HSourceBillType = "閲囪喘璁㈠崟";
+                //鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
+                let HSelectBarCodeType = "鍝佺鏉$爜";
+                //鑾峰彇褰撳墠鐧诲綍浜哄憳
+                let UserName = uni.getStorageSync('HUserName');
+                let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
+                    CampanyName + ';' + UserName + ';' + HBarCodeNoStr;
 
-				CommonUtils.doRequest(
-					"/Sc_BarCode/SaveBarCode_NoGenerate", {
-						msg: sMainSub,
-						CampanyName: CampanyName
-					},
-					(res) => {
-						console.log(res)
-						let {
-							data,
-							count,
-							Message
-						} = res.data
-						if (count > 0) {
-							// this.generatedBarCode = data[0]['鏉$爜缂栧彿']/
-							// console.log(this.generatedBarCode)
-							uni.showToast({
-								icon: 'none',
-								title: Message
-							})
-							this.buttonStatus = {
-								btn1: true,
-								btn2: false
-							}
-						} else {
-							this.buttonStatus = {
-								btn1: false,
-								btn2: false
-							}
-							uni.showToast({
-								icon: 'none',
-								title: Message
-							})
-						}
-					},
-					(err) => {
-						this.buttonStatus = {
-							btn1: false,
-							btn2: false
-						}
-						uni.showToast({
-							icon: 'none',
-							title: err
-						})
-					},
-					"POST"
-				)
-			},
-			exit() {
-				uni.navigateBack()
-			}
-		}
-	}
+                CommonUtils.doRequest(
+                    "/Sc_BarCode/SaveBarCode_NoGenerate", {
+                        msg: sMainSub,
+                        CampanyName: CampanyName
+                    },
+                    (res) => {
+                        console.log(res)
+                        let {
+                            data,
+                            count,
+                            Message
+                        } = res.data
+                        if (count > 0) {
+                            // this.generatedBarCode = data[0]['鏉$爜缂栧彿']/
+                            // console.log(this.generatedBarCode)
+                            uni.showToast({
+                                icon: 'none',
+                                title: Message
+                            })
+                            this.buttonStatus = {
+                                btn1: true,
+                                btn2: false
+                            }
+                        } else {
+                            this.buttonStatus = {
+                                btn1: false,
+                                btn2: false
+                            }
+                            uni.showToast({
+                                icon: 'none',
+                                title: Message
+                            })
+                        }
+                    },
+                    (err) => {
+                        this.buttonStatus = {
+                            btn1: false,
+                            btn2: false
+                        }
+                        uni.showToast({
+                            icon: 'none',
+                            title: err
+                        })
+                    },
+                    "POST"
+                )
+            },
+            exit() {
+                uni.navigateBack()
+            }
+        }
+    }
 </script>
 
 <style lang="scss" scoped>
-	* {
-		box-sizing: border-box;
-	}
+    * {
+        box-sizing: border-box;
+    }
 
-	input {
-		padding: 8rpx 20rpx;
-		font-size: 30rpx;
-		line-height: 30rpx;
-	}
+    input {
+        padding: 8rpx 20rpx;
+        font-size: 30rpx;
+        line-height: 30rpx;
+    }
 
-	.uni-input-input[disabled] {
-		background-color: #e4e4e4;
-	}
+    .uni-input-input[disabled] {
+        background-color: #e4e4e4;
+    }
 
-	.container {
-		display: flex;
-		flex-direction: column;
-		height: 100vh;
-		padding: 20rpx 0;
+    .container {
+        display: flex;
+        flex-direction: column;
+        height: 100vh;
+        padding: 20rpx 0;
 
-		.content {
-			flex: 1;
-			background-image: url('/static/svgs/folder_bg.svg');
-			background-size: cover;
-			padding: 20rpx;
+        .content {
+            flex: 1;
+            background-image: url('/static/svgs/folder_bg.svg');
+            background-size: cover;
+            padding: 20rpx;
 
-			.header {
-				font-size: 30rpx;
-			}
+            .header {
+                font-size: 30rpx;
+            }
 
-			.items {
-				display: flex;
-				flex-direction: column;
-				gap: 10rpx;
-				padding: 40rpx 0rpx;
+            .items {
+                display: flex;
+                flex-direction: column;
+                gap: 10rpx;
+                padding: 40rpx 0rpx;
 
-				.item {
-					display: flex;
-					flex-direction: row;
-					padding: 0 10rpx;
-					gap: 20rpx;
-					font-size: 30rpx;
-					// height: 1.5rem;
-					// justify-content: center;
-					align-items: center;
+                .item {
+                    display: flex;
+                    flex-direction: row;
+                    padding: 0 10rpx;
+                    gap: 20rpx;
+                    font-size: 30rpx;
+                    // height: 1.5rem;
+                    // justify-content: center;
+                    align-items: center;
 
-					.left {
-						text-align: left;
-						width: 6rem;
-					}
+                    .left {
+                        text-align: left;
+                        width: 6rem;
+                    }
 
-					.right {
-						flex: 1;
-						height: 100%;
-						padding: 6rpx 0;
-						border-radius: 22rpx;
-						border: 1px solid #e4e4e4;
-						background-color: #e4e4e4;
+                    .right {
+                        flex: 1;
+                        height: 100%;
+                        padding: 6rpx 0;
+                        border-radius: 22rpx;
+                        border: 1px solid #e4e4e4;
+                        background-color: #e4e4e4;
 
-						>input {
-							height: auto;
-						}
+                        >input {
+                            height: auto;
+                        }
 
-					}
+                    }
 
-					.barcode {
-						background-color: #fff !important;
-					}
+                    .barcode {
+                        background-color: #fff !important;
+                    }
 
 
 
-				}
-			}
-		}
+                }
+            }
+        }
 
-		.operation-zone {
-			height: 3rem;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			gap: 30rpx;
-			padding: 20rpx;
+        .operation-zone {
+            height: 3rem;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            gap: 30rpx;
+            padding: 20rpx;
 
-			>view {
-				flex: 1;
-			}
+            >view {
+                flex: 1;
+            }
 
-			>button {
-				width: 4rem;
-				padding: 0;
-				font-size: 25rpx;
-				border-radius: 50rpx;
-				line-height: 66rpx;
-				font-size: 28rpx;
-			}
+            >button {
+                width: 4rem;
+                padding: 0;
+                font-size: 25rpx;
+                border-radius: 50rpx;
+                line-height: 66rpx;
+                font-size: 28rpx;
+            }
 
-			>button[disabled] {
-				background-color: #acacac;
-				color: #fff;
-			}
+            >button[disabled] {
+                background-color: #acacac;
+                color: #fff;
+            }
 
-			.btn-a {
-				background-color: #acacac;
-				color: #fff;
-			}
+            .btn-a {
+                background-color: #acacac;
+                color: #fff;
+            }
 
-			.btn-b {
-				background-color: #41a863;
-				color: #fff;
-			}
+            .btn-b {
+                background-color: #41a863;
+                color: #fff;
+            }
 
-			.btn-c {
-				background-color: #3a78ff;
-				color: #fff;
-			}
-		}
-	}
+            .btn-c {
+                background-color: #3a78ff;
+                color: #fff;
+            }
+        }
+    }
 </style>
\ No newline at end of file

--
Gitblit v1.9.1