From 394fdfc5f67f8c98dbe05492056295fd03aba4ab Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 22 十二月 2025 08:28:37 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/caigouruku/POStockInBill.vue                           |   57 
 pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue        | 4560 +++++++++++++------------
 pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue | 4509 +++++++++++++------------
 components/ZLGL/BadReasonPopup.vue                           |  309 +
 pages/index/tab2.vue                                         |    2 
 main.js                                                      |    6 
 pages/zhijiediaobo/MoveStockBill.vue                         |  320 +
 utils/i18n.js                                                |    4 
 pages/index/login.vue                                        |    3 
 .hbuilderx/launch.json                                       |    4 
 pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue             |  444 ++
 components/BillListPopup/BillListPopup.vue                   |   16 
 12 files changed, 5,681 insertions(+), 4,553 deletions(-)

diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 4dd14cd..a7d9080 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -21,11 +21,11 @@
             "type" : "uni-app:app-ios"
         },
         {
-            "customPlaygroundType" : "device",
+            "customPlaygroundType" : "local",
             "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
             "openVueDevtools" : true,
             "packageName" : "com.shebeiguanli.www",
-            "playground" : "standard",
+            "playground" : "custom",
             "type" : "uni-app:app-android"
         }
     ]
diff --git a/components/BillListPopup/BillListPopup.vue b/components/BillListPopup/BillListPopup.vue
index 3b6f437..1d9f9a2 100644
--- a/components/BillListPopup/BillListPopup.vue
+++ b/components/BillListPopup/BillListPopup.vue
@@ -25,7 +25,7 @@
                     <view class="options-wrapper" v-show="HBillList.length != 0">
                         <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''"
                             v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['鐗╂枡鍚嶇О']"
-                            :extra="`鏁伴噺: ${bill['鏁伴噺']}`" @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'], index)">
+                            :extra="`鏁伴噺: ${bill['鏁伴噺']}`" @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'], index, bill['HSourceEntryID'])">
                             <view class="item">
                                 <view class="left">鍗曟嵁鍙�: </view>
                                 <view class="right">{{bill['鍗曟嵁鍙�']}}</view>
@@ -143,12 +143,22 @@
             showPopup() {
                 this.$refs.popup.open();
             },
-            clickCard(interid, billno, index) {
+            clickCard(interid, billno, index, entryid) {
                 if (this.MultiSourceBill == false) { // 闈炲婧愬崟妯″紡
+                    // 鎬荤嚎鏂瑰紡浼犻�掓暟鎹� (鍙法缁勪欢浼犻��)
                     uni.$emit('BillSelectComplete', {
                         HInterID: interid,
                         HBillNo: billno,
-                        enableMultiSourceBill: this.MultiSourceBill
+                        enableMultiSourceBill: this.MultiSourceBill,
+                        HEntryID: entryid || 0
+                    })
+                    
+                    // 鐖跺瓙缁勪欢涔嬮棿浼犻�掓暟鎹�
+                    this.$emit("BillSelectComplete",  {
+                        HInterID: interid,
+                        HBillNo: billno,
+                        enableMultiSourceBill: this.MultiSourceBill,
+                        HEntryID: entryid || 0
                     })
                 } else {
                     this.$set(this.HBillList[this.curPage - 1][index], 'isActive', !this.HBillList[this.curPage - 1][
diff --git a/components/ZLGL/BadReasonPopup.vue b/components/ZLGL/BadReasonPopup.vue
new file mode 100644
index 0000000..a72e1e8
--- /dev/null
+++ b/components/ZLGL/BadReasonPopup.vue
@@ -0,0 +1,309 @@
+<template>
+    <view>
+        <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+            <view class="content">
+                <view class="search-condition">
+                    <view class="title"><text>浠g爜: </text></view>
+                    <view class="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view>
+                </view>
+                <view class="search-condition">
+                    <view class="title"><text>鍚嶇О: </text></view>
+                    <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view>
+                </view>
+                <view class="buttons">
+                    <button size="mini" type="primary" @click="search">鏌ヨ</button>
+                    <view style="flex: 1;"></view>
+                    <button size="mini" type="primary" @click="exit">閫�鍑�</button>
+                </view>
+                <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;">
+                    <view class="card-item" v-show="HBillList.length != 0">
+                        <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''"
+                            v-for="(bill, index) in HBillList[curPage-1]" :key="index" @tap="clickCard(bill, index)">
+                                <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(0,10)" :key="index">
+                                    <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}锛�</text>{{  bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template>    
+                                    <template v-else><text>{{ HBillField.ColmCols }}锛�</text>{{  bill[HBillField.ColmCols] }}</template>
+                                </view>
+                                <view class="card-detail" v-if="showDetail == index">
+                                    <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(10,-1)" :key="index">
+                                        <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}锛�</text>{{  bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template>    
+                                        <template v-else><text>{{ HBillField.ColmCols }}锛�</text>{{  bill[HBillField.ColmCols] }}</template>
+                                    </view>
+                                </view>
+                            <view class="more" v-if="showDetail == index && operations != index">
+                            	<view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = -1">
+                            		<uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14" ></uni-icons>鏀惰捣
+                            	</view>
+                            	<!-- <view class="part" @tap.stop="operations = operations==index?-1:index">
+                            		<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+                            			size="14"></uni-icons>鎿嶄綔
+                            	</view> -->
+                            </view>
+                            <view class="more" v-if="showDetail != index && operations != index">
+                            	<view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = index">
+                            		<uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+                            	</view>
+                            	<!-- <view class="part" @tap.stop="operations = operations==index?-1:index">
+                            		<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+                            			size="14"></uni-icons>鎿嶄綔
+                            	</view> -->
+                            </view>
+                        </uni-card>
+                    </view>
+                    <view class="over" v-show="HBillList.length == 0">鏆傛棤鏁版嵁</view>
+                </scroll-view>
+                <uni-pagination id="#pagination" title="鏍囬鏂囧瓧" v-model="curPage" :pageSize="size"
+                    :total="length"></uni-pagination>
+            </view>
+        </uni-popup>
+    </view>
+</template>
+
+<script>
+    import dayjs from 'dayjs';
+    import {
+        CommonUtils
+    } from '@/utils/common';
+    import {
+        getUserInfo
+    } from '@/utils/auth';
+    export default {
+        name: "BadReasonPopup",
+        emits: ["update:modelValue"],
+        data() {
+            return {
+                showDetail: -1,
+                operations: -1,
+                dayjs: dayjs,
+                enablefocus: false,
+                size: 20,
+                curPage: 1,
+                length: 0,
+                page: 0,
+                HName: '',
+                HCode: '',
+                HBillList: [], // 琛ㄥ崟鏁版嵁闆嗗悎
+                HBillFieldsList: [], // 琛ㄥ崟瀛楁闆嗗悎
+                panelHeight: 0,
+
+                refTargetKey: 0,
+                multiSouceBillList: [],
+
+            };
+        },
+        props: {
+            HStockOrgID: {
+                type: [String, Number],
+            },
+        },
+        mounted() {},
+        methods: {
+            popupChangeHandler(e) {
+                if (e.show === true) {
+                    this.getBillList()
+                }
+            },
+            async exit() {
+                this.size = 20
+                this.curPage = 1
+                this.length = 0
+                this.page = 0
+                this.HSourceBillNo = ''
+                this.HMater = ''
+                this.HCustom = ''
+                this.HBillList = []
+                this.enablefocus = false
+                this.multiSouceBillList = []
+                // 闇�瑕佺瓑寰呴〉闈㈠唴鐨勬暟鎹祴鍊煎畬姣�
+                await this.$nextTick()
+                this.$refs.popup.close();
+            },
+            search() {
+                this.getBillList()
+            },
+            showPopup(index) {
+                this.$refs.popup.open();
+                this.refTargetKey = index
+            },
+            clickCard(bill, index) {
+                let retVal = {}
+                retVal[0] = bill
+                this.$emit("update", {
+                    retVal: retVal,
+                    index: this.refTargetKey
+                })
+            },
+            getsWhere() {
+                let sWhere =
+                    ` and 绂佺敤鏍囪 !='Y' and  ISNULL(瀹℃牳浜�,'')!=''  and HUSEORGID = '${ uni.getStorageSync("OrganizationID")}'`
+
+                if (this.HCode) {
+                    swhere += ` and 涓嶈壇鍘熷洜浠g爜 like '%${this.HCode}%'`
+                }
+                if (this.HName) {
+                    swhere += ` and 涓嶈壇鍘熷洜鍚嶇О like '%${this.HName}%'`
+                }
+                return sWhere
+            },
+            getBillList() {
+                this.HBillList = []
+                this.length = 0
+                this.page = 0
+                this.curPage = 1
+                CommonUtils.doRequest(
+                    "/Gy_BadReason/list", {
+                        sWhere: this.getsWhere(),
+                        user: getUserInfo()['Czymc']
+                    },
+                    (res) => {
+                        let {
+                            data,
+                            count,
+                            list,
+                            Message
+                        } = res.data
+                        if (count == 1) {
+                            this.length = Array.from(data).length
+                            const result = [];
+                            for (let i = 0; i < data.length; i += this.size) {
+                                result.push(data.slice(i, i + this.size));
+                            }
+                            this.HBillList = result
+                            // 杩囨护涓嶉渶瑕佹樉绀虹殑瀛楁
+                            this.HBillFieldsList = Array.from(list)
+                                .filter(e => this.shouldShowField(e.ColmCols) == true)
+                            this.page = result.length
+                            setTimeout(() => {
+                                this.enablefocus = true
+                            }, 500)
+                        } else {
+                            setTimeout(() => {
+                                this.enablefocus = true
+                            }, 500)
+                            uni.showToast({
+                                icon: 'none',
+                                title: Message
+                            })
+                        }
+                    }
+                )
+            },
+            // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+			shouldShowField(key) {
+			    // 鎺掗櫎涓嶉渶瑕佹樉绀虹殑瀛楁
+			    const excludeKeys = ['鍗曟嵁鍙�', '鏃ユ湡']; // 杩欎簺瀛楁宸茬粡鍦ㄥ叾浠栧湴鏂规樉绀轰簡
+			    
+			    // 鍒ゆ柇key鏄惁鍏ㄨ嫳鏂囷紙涓嶅寘鍚腑鏂囷級
+			    const isAllEnglish = /^[a-zA-Z]+$/.test(key);
+			    
+			    // 鍒ゆ柇key鏄惁鍖呭惈"ID"锛堜笉鍖哄垎澶у皬鍐欙級
+			    const containsID = key.toUpperCase().includes('ID');
+			    
+			    return !excludeKeys.includes(key) && 
+			           !isAllEnglish && // 鎺掗櫎鍏ㄨ嫳鏂囩殑key
+			           !containsID // 鎺掗櫎鍖呭惈ID鐨刱ey
+			},
+            emptyValueFilter(item, fieldList){
+                return fieldList.filter(e => item[e.ColmCols])
+            }
+        },
+    }
+</script>
+
+<style lang="scss" scoped>
+    .content {
+        box-sizing: border-box;
+        border-radius: 15rpx 15rpx 0 0;
+        padding: 20rpx 20rpx 40rpx 20rpx;
+        background-color: #fff;
+        display: flex;
+        flex-direction: column;
+        gap: 10rpx;
+
+        .search-condition {
+            display: flex;
+            flex-direction: row;
+            align-s: center;
+            gap: 20rpx;
+            font-size: 30rpx;
+
+            .title {
+                width: 5rem;
+                text-align: right;
+            }
+
+            .right {
+                flex: 1;
+                border-radius: 22rpx;
+                border: 1px solid #acacac;
+                height: auto;
+                padding: 8rpx 16rpx;
+
+                input {
+                    width: 100%;
+                    font-size: 30rpx;
+                }
+            }
+        }
+
+        .buttons {
+            display: flex;
+            flex-direction: row;
+            gap: 20rpx;
+            justify-content: flex-end;
+
+            >button {
+                display: inline-flex;
+                width: 4rem;
+            }
+        }
+
+        .card-item {
+            .card-detail {
+                width: 100%;
+                display: flex;
+                flex-wrap: wrap;
+                justify-content: space-between;
+                line-height: 120%;
+
+                .detail {
+                    // width: 50%;
+                    font-size: 26rpx;
+                    margin-bottom: 12rpx;
+                    color: #555;
+                    margin-right: 20rpx;
+
+                    text {
+                        color: #999;
+                        font-size: 26rpx;
+                    }
+                }
+            }
+        }
+
+        .uni-card--is-active {
+            background-color: rgba(0, 122, 255, 0.2);
+        }
+
+        .daterange {
+            display: flex;
+            flex-direction: row;
+            gap: 10rpx;
+            justify-content: center;
+            align-items: center;
+
+        }
+    }
+    
+    .more {
+        color: #888;
+        font-size: 24rpx;
+        display: flex;
+        border-top: 1px solid #eee;
+        padding-top: 20rpx;
+    
+        .part {
+            width: 50%;
+            text-align: center;
+        }
+    }
+</style>
\ No newline at end of file
diff --git a/main.js b/main.js
index 4ca7fb7..ab8bfb7 100644
--- a/main.js
+++ b/main.js
@@ -2,6 +2,7 @@
 import en from "./locale/en.json"
 import ZhCN from "./locale/zh-Hans.json"
 
+// 鍔犺浇鏈湴璇█鍖�
 const messages = {
 	"zh-Hans":ZhCN,
 	en,
@@ -11,6 +12,8 @@
   locale: uni.getLocale(),// 鑾峰彇宸茶缃殑璇█
   messages
 }
+
+
 
 import App from './App'
 import Printer from './plugins/printer'
@@ -31,6 +34,7 @@
 // #ifndef VUE3
 import Vue from 'vue'
 import VueI18n from 'vue-i18n'
+
 Vue.use(VueI18n)
 const i18n = new VueI18n(i18nConfig)
 Vue.config.productionTip = false
@@ -40,6 +44,7 @@
     ...App
 })
 app.$mount()
+export default i18n
 // #endif
 
 // #ifdef VUE3
@@ -53,6 +58,7 @@
     app
   }
 }
+export default i18n
 // #endif
 // main.js uni.showToast 瀹炵幇鍏ㄥ眬鎷︽埅璁剧疆榛樿鎻愮ず鏃堕棿涓�3.5绉�
 const originalShowToast = uni.showToast;
diff --git a/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue b/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue
index 23b3660..c9e0b02 100644
--- a/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue
+++ b/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue
@@ -1,2267 +1,2458 @@
 <template>
-	<view>
-		<!-- 涓昏〃鍖哄煙 -->
-		<view class="bill-main-area">
-			<!-- 涓昏〃椤电 -->
-			<view class="bill-main-tabs">
-				<view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
-				<view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鍏朵粬淇℃伅</view>
-				<view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
-			</view>
-			<!-- 涓昏〃鍐呭 -->
-			<view class="bill-main-contents">
-				<!-- 鍩烘湰淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 1">
-					<view class="form-item">
-						<view class="left">鍗曟嵁鍙�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HBillNo" disabled />
-						</view>
-					</view>
+    <view>
+        <!-- 涓昏〃鍖哄煙 -->
+        <view class="bill-main-area">
+            <!-- 涓昏〃椤电 -->
+            <view class="bill-main-tabs">
+                <view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
+                <view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鍏朵粬淇℃伅</view>
+                <view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+            </view>
+            <!-- 涓昏〃鍐呭 -->
+            <view class="bill-main-contents">
+                <!-- 鍩烘湰淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 1">
+                    <view class="form-item">
+                        <view class="left">鍗曟嵁鍙�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HBillNo" disabled />
+                        </view>
+                    </view>
 
-					<view class="form-item">
-						<view class="left">鏃ユ湡</view>
-						<view class="right">
-							<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
-								<view>{{ hform.HDate }}</view>
-							</uni-datetime-picker>
-						</view>
-					</view>
+                    <view class="form-item">
+                        <view class="left">鏃ユ湡</view>
+                        <view class="right">
+                            <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
+                                <view>{{ hform.HDate }}</view>
+                            </uni-datetime-picker>
+                        </view>
+                    </view>
 
-					<view class="form-item">
-						<view class="left">婧愬崟鍗曞彿</view>
-						<view class="right" :class="!hasSourceBill?'':'disabled'">
-							<input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�"
-								v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
-						</view>
-						<view class="icon-wrapper-big">
-							<uni-icons class="right-icon" type="scan" style="
-                  background-color: #3a78ff;
-                  padding: 6rpx;
-                  color: #fff;
-                  border-radius: 100%;
-                " size="20" @click="toScanCode"></uni-icons>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇璧勬簮</view>
-						<view class="right">
-							<uni-combox :candidates="GySourceNameList" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
-								@update:modelValue="HSourceChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇鐝</view>
-						<view class="right">
-							<uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
-								v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
-						</view>
-					</view>				
-					<view class="form-item" v-if="false">
-						<view class="left">浠诲姟鍗曞彿</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HICMOBillNo" disabled />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 5)"></uni-icons></view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">娴佽浆鍗″彿</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HProcExchBillNo" disabled />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 6)"></uni-icons></view>
-					</view>
-					<view class="form-item">
-						<view class="left">浜у搧浠g爜</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HMaterNumber" />
-						</view>
-						<view class="icon-wrapper-big">
-							<uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浜у搧鍚嶇О</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HMaterName" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">妫�楠屽憳</view>
-						<view class="right">
-							<uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="璇烽�夋嫨妫�楠屽憳"
-								:v-model="hform.HFirstCheckEmpName"
-								@update:modelValue="HFirstCheckEmpChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">妫�楠屾柟妗�</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="this.hform.HQCSchemeName" />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 7)"></uni-icons></view>
-					</view>
-					
-					<view class="form-item">
-						<view class="left">鍒ゆ柇缁撹</view>
-						<view class="right none-border">
-							<radio-group @changer="checkResultChange">
-								<label>
-									<radio value="0" :checked="hform.HLastResult" /><text></text>
-									鍚堟牸
-								</label>
-								<view style="width: 20rpx; display: inline-block"></view>
-								<label>
-									<radio value="1" :checked="!hform.HLastResult" /><text></text>
-									涓嶅悎鏍�
-								</label>
-							</radio-group>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">宸ュ簭</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HProcName" />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 8)"></uni-icons></view>
-					</view>
-								
-				</view>
-				<!-- 鍏朵粬淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 2">
-					<view class="form-item">
-						<view class="left">婧愬崟绫诲瀷</view>
-						<view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'">
-							<picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill"
-								@change="HSourceBillTypeNameChange">
-								<input type="text" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="HSourceBillType" disabled/>
-								<view class="picker-overlay"></view>
-							</picker>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇鐝</view>
-						<view class="right">
-							<uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
-								v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">寮傚父涓存椂澶勭悊鏂规</view>
-						<view class="right">
-							<input type="text" v-model="hform.HErrTreatment" value="" />
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">浠诲姟鍗曟暟閲�</view>
-						<view class="right">
-							<input type="number" v-model="hform.HICMOQty" />
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">娴佽浆鍗℃暟閲�</view>
-						<view class="right">
-							<input type="number" v-model="hform.HProcExchQty" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鎵瑰彿</view>
-						<view class="right">
-							<input type="text" value="" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">澶囨敞</view>
-						<view class="right">
-							<input type="text" v-model="hform.HRemark" value="" />
-						</view>
-					</view>		
-				</view>
-				<!-- 鍒跺崟淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 3">
-					<view class="form-item">
-						<view class="left">鍒跺崟浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HMaker" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍒跺崟鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HMakeDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">瀹℃牳浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HChecker" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">瀹℃牳鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCheckDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍏抽棴浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCloseMan" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍏抽棴鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCloseDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">淇敼浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HUpDater" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">淇敼鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HUpDateDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浣滃簾浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HDeleteMan" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浣滃簾鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HDeleteDate" disabled />
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 瀛愯〃鍖哄煙 -->
-		<view class="bill-sub-area">
-			<!-- 瀛愯〃椤电 -->
-			<view class="bill-sub-tabs">
-				<view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''"
-					@tap="subTabSelected = subTab.id">{{ subTab.name }}</view>
-			</view>
-			<!-- 瀛愯〃鍐呭 -->
-			<view class="bill-main-contents">
-				<!-- 妫�楠岄」鐩� 鍛堢幇 -->
-				<view v-if="subTabSelected == 1">
-					<!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
-					<view class="buttons" @tap="addCheckItem()">
-						<uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
-					</view>
-					<view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
-					<view class="list" v-else>
-						<uni-card v-for="checkItem in checkItems" :key="checkItem.num">
-							<view class="card-detail">
-								<view class="detail"> <text>搴忓彿锛�</text>{{ checkItem.num }} </view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>妫�楠岄」鐩細</text></view>
-									<input type="text" :value="checkItem.HQCCheckItemName" disabled="" />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(checkItem, 2)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>妫�楠屼华鍣細</text></view>
-									<input type="text" :value="checkItem.HInspectInstruMentName" disabled="" />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(checkItem, 3)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<view><text>缁撹锛�</text></view>
-									<view style="width: 4em">
-										{{ checkItem.HResult == 1 ? "鍚堟牸" : "涓嶅悎鏍�" }}
-									</view>
-									<view>
-										<switch style="width: 2em; transform: scale(0.7)"
-											:checked="checkItem.HResult == 1"
-											@change="HResultChange(checkItem.num, $event)" />
-									</view>
-								</view>
-								<view class="detail editable" style="position: relative">
-									<view style="flex-shrink: 0"><text>鍒嗘瀽鏂规硶锛�</text></view>
-									<picker :range="arrayAnalysisMethod" range-key="name"
-										@change="HAnalysisMethodChange(checkItem.num, $event)">
-										<input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
-											placeholder="璇烽�夋嫨" />
-										<view class="picker-overlay"></view>
-									</picker>
-								</view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
-									<view>
-										<switch type="checkbox" style="transform: scale(0.7)"
-											:checked="checkItem.HKeyInspect"
-											@change="HKeyInspectChange(checkItem, $event)" />
-									</view>
-								</view>
-								<view class="detail" v-if="checkItem.HQCStd">
-									<text>妫�楠屾爣鍑嗭細</text>{{ checkItem.HQCStd }}
-								</view>
-								<view class="detail" v-if="checkItem.HUnit">
-									<text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
-								</view>
-								 <!-- 鍙湁瀹氶噺鍒嗘瀽鎵嶅惎鐢ㄦ楠屽�� -->
-								<view class="detail editable" v-show="checkItem.HAnalysisMethod == 2"> 
-								<text>妫�楠屽�硷細</text>
-								<input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" />
-								</view>
-								
-								<view class="detail" v-if="checkItem.HQCNote">
-									<text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
-								</view>
-								<view class="detail" v-if="checkItem.HTargetVal">
-									<text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
-								</view>
-								<view class="detail" v-if="checkItem.HUpLimit">
-									<text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
-								</view>
-								<view class="detail" v-if="checkItem.HDownLimit">
-									<text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
-								</view>
-								<view class="detail" v-if="checkItem.HMax">
-									<text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
-								</view>
-								<view class="detail" v-if="checkItem.HMin">
-									<text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
-								</view>
-								<view class="detail" v-if="checkItem.HAvg">
-									<text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
-								</view>
-							</view>
-							<view style="height: 20rpx"></view>
-							<view class="more">
-								<view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)">
-									<uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
-										size="18"></uni-icons>鍒犻櫎
-								</view>
-							</view>
-						</uni-card>
-					</view>
-				</view>
-				<!-- 鎶芥牱妫�楠� 鍛堢幇 -->
-				<view v-if="subTabSelected == 2">
-					<view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
-					<view class="list" v-else>
-						<uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
-							<view class="card-detail">
-								<view class="detail"> <text>搴忓彿锛�</text>{{ SamplingItem.num }} </view>
-								<view class="detail editable">
-									<text>妫�楠岄」鐩細</text>{{ SamplingItem.HQCCheckItemName }}
-								</view>
-								<view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
-								<view class="detail editable" style="width: 100%">
-									<view style="flex-shrink: 0"><text>鎶芥牱鏂规锛�</text></view>
-									<input type="text" :value="SamplingItem.HSampleSchemeName" disabled />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(SamplingItem, 1)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<text>鎶芥牱绫诲瀷锛�</text>{{ SamplingItem.HSamplingType }}
-								</view>
-								<view class="detail editable">
-									<text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
-								</view>
-								<view class="detail editable">
-									<text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
-								</view>
-								<view class="detail editable">
-									<text>AQL锛�</text>{{ SamplingItem.HAQL }}
-								</view>
-								<view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
-								<view class="detail editable">
-									<text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
-								</view>
-								<view class="detail editable">
-									<text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
-								</view>
-								<view class="detail editable">
-									<text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
-								</view>
-								<view class="detail editable">
-									<text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
-								</view>
-								<view class="detail editable">
-									<text>鏍锋湰鐮村潖鏁帮細</text>
-									<view class="editable-input">
-										<input type="number" v-model="SamplingItem.HSampleDamageQty" />
-									</view>
-								</view>
-								<view class="detail editable">
-									<text>妫�楠岀粨鏋滐細</text>
-									<view style="border-radius: 15%; padding: 0 10rpx" :class="
+                    <view class="form-item">
+                        <view class="left">婧愬崟鍗曞彿</view>
+                        <view class="right" :class="!hasSourceBill?'':'disabled'">
+                            <input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�"
+                                v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons class="right-icon" type="scan"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons>
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons class="right-icon" type="search"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇璧勬簮</view>
+                        <view class="right">
+                            <uni-combox :candidates="GySourceNameList" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
+                                @update:modelValue="HSourceChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇鐝</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+                                v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">浠诲姟鍗曞彿</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HICMOBillNo" disabled />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 5)"></uni-icons></view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">娴佽浆鍗″彿</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HProcExchBillNo" disabled />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 6)"></uni-icons></view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浜у搧浠g爜</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HMaterNumber" />
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 4)"></uni-icons>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浜у搧鍚嶇О</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HMaterName" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">妫�楠屽憳</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="璇烽�夋嫨妫�楠屽憳"
+                                :v-model="hform.HFirstCheckEmpName"
+                                @update:modelValue="HFirstCheckEmpChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">妫�楠屾柟妗�</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="this.hform.HQCSchemeName" />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                @click="showSelectorModule(hform, 7)"></uni-icons></view>
+                    </view>
+
+                    <view class="form-item">
+                        <view class="left">鍒ゆ柇缁撹</view>
+                        <view class="right none-border">
+                            <radio-group @changer="checkResultChange">
+                                <label>
+                                    <radio value="0" :checked="hform.HLastResult" /><text></text>
+                                    鍚堟牸
+                                </label>
+                                <view style="width: 20rpx; display: inline-block"></view>
+                                <label>
+                                    <radio value="1" :checked="!hform.HLastResult" /><text></text>
+                                    涓嶅悎鏍�
+                                </label>
+                            </radio-group>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">宸ュ簭</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HProcName" />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 8)"></uni-icons></view>
+                    </view>
+
+                </view>
+                <!-- 鍏朵粬淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 2">
+                    <view class="form-item">
+                        <view class="left">婧愬崟绫诲瀷</view>
+                        <view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'">
+                            <picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill"
+                                @change="HSourceBillTypeNameChange">
+                                <input type="text" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="HSourceBillType" disabled />
+                                <view class="picker-overlay"></view>
+                            </picker>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇鐝</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+                                v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">寮傚父涓存椂澶勭悊鏂规</view>
+                        <view class="right">
+                            <input type="text" v-model="hform.HErrTreatment" value="" />
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">浠诲姟鍗曟暟閲�</view>
+                        <view class="right">
+                            <input type="number" v-model="hform.HICMOQty" />
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">娴佽浆鍗℃暟閲�</view>
+                        <view class="right">
+                            <input type="number" v-model="hform.HProcExchQty" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鎵瑰彿</view>
+                        <view class="right">
+                            <input type="text" value="" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">澶囨敞</view>
+                        <view class="right">
+                            <input type="text" v-model="hform.HRemark" value="" />
+                        </view>
+                    </view>
+                </view>
+                <!-- 鍒跺崟淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 3">
+                    <view class="form-item">
+                        <view class="left">鍒跺崟浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HMaker" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍒跺崟鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HMakeDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">瀹℃牳浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HChecker" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">瀹℃牳鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCheckDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍏抽棴浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCloseMan" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍏抽棴鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCloseDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">淇敼浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HUpDater" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">淇敼鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HUpDateDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浣滃簾浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HDeleteMan" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浣滃簾鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HDeleteDate" disabled />
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <!-- 瀛愯〃鍖哄煙 -->
+        <view class="bill-sub-area">
+            <!-- 瀛愯〃椤电 -->
+            <view class="bill-sub-tabs">
+                <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''"
+                    @tap="subTabSelected = subTab.id">{{ subTab.name }}</view>
+            </view>
+            <!-- 瀛愯〃鍐呭 -->
+            <view class="bill-main-contents">
+                <!-- 妫�楠岄」鐩� 鍛堢幇 -->
+                <view v-if="subTabSelected == 1">
+                    <!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
+                    <view class="buttons" @tap="addCheckItem()">
+                        <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
+                    </view>
+                    <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="checkItem in checkItems" :key="checkItem.num">
+                            <view class="card-detail">
+                                <view class="detail"> <text>搴忓彿锛�</text>{{ checkItem.num }} </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠岄」鐩細</text></view>
+                                    <input type="text" :value="checkItem.HQCCheckItemName" disabled="" />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(checkItem, 2)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠屼华鍣細</text></view>
+                                    <input type="text" :value="checkItem.HInspectInstruMentName" disabled="" />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(checkItem, 3)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view><text>缁撹锛�</text></view>
+                                    <view style="width: 4em">
+                                        {{ checkItem.HResult == 1 ? "鍚堟牸" : "涓嶅悎鏍�" }}
+                                    </view>
+                                    <view>
+                                        <switch style="width: 2em; transform: scale(0.7)"
+                                            :checked="checkItem.HResult == 1"
+                                            @change="HResultChange(checkItem.num, $event)" />
+                                    </view>
+                                </view>
+                                <view class="detail editable" style="position: relative">
+                                    <view style="flex-shrink: 0"><text>鍒嗘瀽鏂规硶锛�</text></view>
+                                    <picker :range="arrayAnalysisMethod" range-key="name"
+                                        @change="HAnalysisMethodChange(checkItem.num, $event)">
+                                        <input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
+                                            placeholder="璇烽�夋嫨" />
+                                        <view class="picker-overlay"></view>
+                                    </picker>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
+                                    <view>
+                                        <switch type="checkbox" style="transform: scale(0.7)"
+                                            :checked="checkItem.HKeyInspect"
+                                            @change="HKeyInspectChange(checkItem, $event)" />
+                                    </view>
+                                </view>
+                                <view class="detail" v-if="checkItem.HQCStd">
+                                    <text>妫�楠屾爣鍑嗭細</text>{{ checkItem.HQCStd }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HUnit">
+                                    <text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
+                                </view>
+                                <!-- 鍙湁瀹氶噺鍒嗘瀽鎵嶅惎鐢ㄦ楠屽�� -->
+                                <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2">
+                                    <text>妫�楠屽�硷細</text>
+                                    <input type="text" class="editable-input" @blur="calcHResult(checkItem)"
+                                        v-model="checkItem.HInspectValQ" />
+                                </view>
+
+                                <view class="detail" v-if="checkItem.HQCNote">
+                                    <text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HTargetVal">
+                                    <text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HUpLimit">
+                                    <text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HDownLimit">
+                                    <text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HMax">
+                                    <text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HMin">
+                                    <text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HAvg">
+                                    <text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
+                                </view>
+                            </view>
+                            <view style="height: 20rpx"></view>
+                            <view class="more">
+                                <view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)">
+                                    <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
+                                        size="18"></uni-icons>鍒犻櫎
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+                <!-- 涓嶈壇鍘熷洜 鍛堢幇 -->
+                <view v-if="subTabSelected == 2">
+                    <view class="buttons" @tap="addBadReason()">
+                        <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
+                    </view>
+                    <view class="over" v-if="badReasons.length  == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="(br, index) in badReasons" :key="index">
+                            <view class="card-detail">
+                                <view class="detail editable"> <text>搴忓彿锛�</text>{{ index+1 }} </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜浠g爜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonName }} </text></view>
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule_BadReason(index, 9)"></uni-icons>
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鏁伴噺锛�</text></view>
+                                    <view class="editable-input">
+                                        <input type="number" v-model="br.HQty" />
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠屽憳锛�</text></view>
+                                    <text>{{ br.HCheckMan }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇鐝粍锛�</text></view>
+                                    <text>{{ br.HGroupName }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇璧勬簮锛�</text></view>
+                                    <text>{{ br.HSourceName }} </text>
+                                </view>
+
+                            </view>
+                            <view class="more">
+                                <view class="part" style="color: #da0000" @tap.stop="delBadReason(br, index)">
+                                    <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
+                                        size="18"></uni-icons>鍒犻櫎
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+
+                <!-- 鎶芥牱妫�楠� 鍛堢幇 -->
+                <view v-if="subTabSelected == 3">
+                    <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
+                            <view class="card-detail">
+                                <view class="detail"> <text>搴忓彿锛�</text>{{ SamplingItem.num }} </view>
+                                <view class="detail editable">
+                                    <text>妫�楠岄」鐩細</text>{{ SamplingItem.HQCCheckItemName }}
+                                </view>
+                                <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+                                <view class="detail editable" style="width: 100%">
+                                    <view style="flex-shrink: 0"><text>鎶芥牱鏂规锛�</text></view>
+                                    <input type="text" :value="SamplingItem.HSampleSchemeName" disabled />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(SamplingItem, 1)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <text>鎶芥牱绫诲瀷锛�</text>{{ SamplingItem.HSamplingType }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>AQL锛�</text>{{ SamplingItem.HAQL }}
+                                </view>
+                                <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰鐮村潖鏁帮細</text>
+                                    <view class="editable-input">
+                                        <input type="number" v-model="SamplingItem.HSampleDamageQty" />
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <text>妫�楠岀粨鏋滐細</text>
+                                    <view style="border-radius: 15%; padding: 0 10rpx" :class="
                                         SamplingItem.HInspectResultToSee == '鍚堟牸'
                                         ? 'pass-background'
                                         : SamplingItem.HInspectResultToSee == '涓嶅悎鏍�'
                                         ? 'unpass-background'
                                         : ''
                                     ">
-										{{ SamplingItem.HInspectResultToSee }}
-									</view>
-								</view>
-							</view>
-						</uni-card>
-					</view>
-				</view>
-				<!-- 妫�娴嬪�� 鍛堢幇 -->
-				<view v-else v-for="item in InspectModules" :key="item.id">
-					<view v-if="subTabSelected == item.id">
-						<InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
-							@syncCheckData="InspectValueComplete" :bind-data="{
+                                        {{ SamplingItem.HInspectResultToSee }}
+                                    </view>
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+                <!-- 妫�娴嬪�� 鍛堢幇 -->
+                <view v-else v-for="item in InspectModules" :key="item.id">
+                    <view v-if="subTabSelected == item.id">
+                        <InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
+                            @syncCheckData="InspectValueComplete" :bind-data="{
                 data: checkItems[item.checkItemId],
                 list: InspectValues[item.checkItemId],
                 mode: 4 // 妫�娴嬪�兼ā鍧�
               }">
-						</InspectValueTemplateVue>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view style="height: 120rpx"></view>
-		<view class="bottom-btn">
-			<button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
-			<view style="flex: 1"></view>
-			<button class="btn-a" size="mini" @tap="addNew">鏂板</button>
-			<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
-		</view>
-		<SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup"
-			@update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
-		</SampleSchemePopupVue>
-		<CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup"
-			@update="CheckItemComplete" :bindKey="currentChechItemIDCache">
-		</CheckItemPopupVue>
-		<InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup"
-			@update="InspectMentComplete" :bindKey="currentChechItemIDCache">
-		</InspectMentPopupVue>
-		<MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete"
-			:bindKey="0">
-		</MaterialPopupVue>
-		<ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete"
-			:bindKey="0"></ICMOBillPopupVue>
-		<ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup"
-			@update="ProcExchBillComplete" :bindKey="0"></ProcExchBillPopupVue>
-		<ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete"
-			:bindKey="0"></ProcessPopupVue>
-		<CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
-			@update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
-	</view>
+                        </InspectValueTemplateVue>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view style="height: 120rpx"></view>
+        <view class="bottom-btn">
+            <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+            <view style="flex: 1"></view>
+            <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+            <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+        </view>
+        <SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup"
+            @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
+        </SampleSchemePopupVue>
+        <CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup"
+            @update="CheckItemComplete" :bindKey="currentChechItemIDCache">
+        </CheckItemPopupVue>
+        <InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup"
+            @update="InspectMentComplete" :bindKey="currentChechItemIDCache">
+        </InspectMentPopupVue>
+        <MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete"
+            :bindKey="0">
+        </MaterialPopupVue>
+        <ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete"
+            :bindKey="0"></ICMOBillPopupVue>
+        <ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup"
+            @update="ProcExchBillComplete" :bindKey="0"></ProcExchBillPopupVue>
+        <ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete"
+            :bindKey="0"></ProcessPopupVue>
+        <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
+            @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
+        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType"
+            :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue>
+        <BadReasonPopupVue v-if="enablePopupModule == PopupModuleNameList[9]" ref="listPopup"
+            @update="HBadReasonComplete"></BadReasonPopupVue>
+
+    </view>
 </template>
 
 <script>
-	import dayjs from "dayjs";
-	import {
-		CommonUtils
-	} from "../../../utils/common";
-	import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue";
-	import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue";
-	import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue";
-	import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue";
-	import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue";
-	import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue";
-	import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue";
-	import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
-	import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue";
-	import {
-		getUserInfo
-	} from "../../../utils/auth";
-	import {
-		MpaasScan
-	} from "../../../utils/mpaasScan";
-	export default {
-		components: {
-			InspectValueTemplateVue,
-			SampleSchemePopupVue,
-			CheckItemPopupVue,
-			InspectMentPopupVue,
-			MaterialPopupVue,
-			ICMOBillPopupVue,
-			ProcExchBillPopupVue,
-			ProcessPopupVue,
-			CheckProjectPopupVue,
-		},
-		computed: {
-			judgeConclusion: {
-				get() {
-					return true;
-				},
-			},
-		},
-		data() {
-			return {
-				operationType: 1,
+    import dayjs from "dayjs";
+    import {
+        CommonUtils
+    } from "../../../utils/common";
+    import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue";
+    import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue";
+    import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue";
+    import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue";
+    import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue";
+    import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue";
+    import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue";
+    import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
+    import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue";
+    import {
+        getUserInfo
+    } from "../../../utils/auth";
+    import {
+        MpaasScan
+    } from "../../../utils/mpaasScan";
+    import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue";
+    import BadReasonPopupVue from "../../../components/ZLGL/BadReasonPopup.vue";
+    export default {
+        components: {
+            InspectValueTemplateVue,
+            SampleSchemePopupVue,
+            CheckItemPopupVue,
+            InspectMentPopupVue,
+            MaterialPopupVue,
+            ICMOBillPopupVue,
+            ProcExchBillPopupVue,
+            ProcessPopupVue,
+            CheckProjectPopupVue,
+            BillListPopupVue,
+            BadReasonPopupVue
+        },
+        computed: {
+            judgeConclusion: {
+                get() {
+                    return true;
+                },
+            },
+        },
+        data() {
+            return {
+                operationType: 1,
 
-				mainTabSelected: 1,
-				subTabSelected: 1,
+                mainTabSelected: 1,
+                subTabSelected: 1,
 
-				// 婧愬崟鐘舵�佹帶鍒�
-				hasSourceBill: false,
+                // 婧愬崟鐘舵�佹帶鍒�
+                hasSourceBill: false,
 
-				// 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
-				enablePopupModule: "",
-				PopupModuleNameList: [
-					"",
-					"SampleScheme",
-					"CheckItem",
-					"InspectMent",
-					"Material",
-					"ICMOBill",
-					"ProcExchBill",
-					"QCScheme",
-					"Process",
-				],
-				// 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
-				currentChechItemIDCache: -1,
+                // 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
+                enablePopupModule: "",
+                PopupModuleNameList: [
+                    "",
+                    "SampleScheme",
+                    "CheckItem",
+                    "InspectMent",
+                    "Material",
+                    "ICMOBill",
+                    "ProcExchBill",
+                    "QCScheme",
+                    "Process",
+                    "BadReason"
+                ],
+                // 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
+                currentChechItemIDCache: -1,
 
-				// uni-combox 閫夋嫨鍣ㄤ娇鐢�
-				// 鐢熶骇璧勬簮
-				GySourceList: [],
-				GySourceNameList: [],
-				// 鐝
-				GyWorkShiftList: [],
-				GyWorkShiftNameList: [],
-				// 妫�楠屽憳
-				GyFirstCheckEmpList: [],
-				GyFirstCheckEmpNameList: [],
+                // uni-combox 閫夋嫨鍣ㄤ娇鐢�
+                // 鐢熶骇璧勬簮
+                GySourceList: [],
+                GySourceNameList: [],
+                // 鐝
+                GyWorkShiftList: [],
+                GyWorkShiftNameList: [],
+                // 妫�楠屽憳
+                GyFirstCheckEmpList: [],
+                GyFirstCheckEmpNameList: [],
 
-				// 妫�楠屾柟妗�
-				arrayAnalysisMethod: [{
-						value: 1,
-						name: "瀹氭�у垎鏋�",
-					},
-					{
-						value: 2,
-						name: "瀹氶噺鍒嗘瀽",
-					},
-					{
-						value: 3,
-						name: "鍏朵粬鍒嗘瀽",
-					},
-				],
-				ArrayAnalysisMethodValue: [1, 2, 3],
-				// 瀛愯〃 椤电淇℃伅
-				subTabs: {
-					1: {
-						id: "1",
-						name: "妫�楠岄」鐩�",
-					},
-					2: {
-						id: "2",
-						name: "鎶芥牱妫�楠�",
-					},
-				},
+                // 妫�楠屾柟妗�
+                arrayAnalysisMethod: [{
+                        value: 1,
+                        name: "瀹氭�у垎鏋�",
+                    },
+                    {
+                        value: 2,
+                        name: "瀹氶噺鍒嗘瀽",
+                    },
+                    {
+                        value: 3,
+                        name: "鍏朵粬鍒嗘瀽",
+                    },
+                ],
+                ArrayAnalysisMethodValue: [1, 2, 3],
+                // 瀛愯〃 椤电淇℃伅
+                subTabs: {
+                    1: {
+                        id: "1",
+                        name: "妫�楠岄」鐩�",
+                    },
+                    2: {
+                        id: "2",
+                        name: "涓嶈壇鍘熷洜",
+                    },
+                    3: {
+                        id: "3",
+                        name: "鎶芥牱妫�楠�",
+                    },
+                },
 
-				// 婧愬崟绫诲瀷
-				HSourceBillType: "閿�鍞鍗�",
-				HSourceBillTypeValueList: ['1401','1402'],
-				HSourceBillTypeNameList: [
-					"閿�鍞鍗�","鍙戣揣閫氱煡鍗�"
-				],
-				// 涓昏〃灞炴��
-				hform: {
-					HSourceBillType: "1401",
-					HSourceBillNo: "",
-					HBillNo: "",
-					HInterID: "0",
-					HDate: dayjs(new Date()).format("YYYY-MM-DD"),
-					HSourceName: "",
-					HSourceID: "0",
-					HShiftsName: "",
-					HShiftsID: "0",
-					HICMOBillNo: "",
-					HICMOInterID: "0",
-					HICMOEntryID: "1",
-					HICMOQty: "0",
-					HProcExchBillNo: "",
-					HProcExchInterID: "0",
-					HProcExchEntryID: "0",
-					HProcExchQty: "0",
-					HMaterNumber: "",
-					HMaterID: "0",
-					HMaterName: "",
-					HFirstCheckEmpName: "",
-					HFirstCheckEmp: 0,
-					HQCSchemeName: "",
-					HQCSchemeID: "0",
-					HBatchNo: "",
-					HLastResult: true, // 榛樿鍚堟牸
-					HProcName: "",
-					HProcID: "0",
-					HTakeSampleCheckBillNo: "", // 鍙栨牱鍗�
-					HTakeSampleCheckBillID: "0",
-					HRemark: "",
-					HErrTreatment: "", // 寮傚父涓存椂澶勭悊鏂规
-					HMaker: getUserInfo()["Czymc"] || "",
-					HChecker: "",
-					HCloseMan: "",
-					HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
-					HCheckDate: "",
-					HCloseDate: "",
-					HUpDater: "",
-					HDeleteMan: "",
-					HUpDateDate: "",
-					HDeleteDate: "",
-					HResult: 1,
-					HAnalysisMethod: "",
+                // 婧愬崟绫诲瀷
+                HSourceBillType: "閿�鍞鍗�",
+                HSourceBillTypeValueList: ['1401', '1402'],
+                HSourceBillTypeNameList: [
+                    "閿�鍞鍗�", "鍙戣揣閫氱煡鍗�"
+                ],
+                // 涓昏〃灞炴��
+                hform: {
+                    HBillType: "7504",
+                    HSourceBillType: "1401",
+                    HSourceBillNo: "",
+                    HBillNo: "",
+                    HInterID: "0",
+                    HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+                    HSourceName: "",
+                    HSourceID: "0",
+                    HShiftsName: "",
+                    HShiftsID: "0",
+                    HICMOBillNo: "",
+                    HICMOInterID: "0",
+                    HICMOEntryID: "1",
+                    HICMOQty: "0",
+                    HProcExchBillNo: "",
+                    HProcExchInterID: "0",
+                    HProcExchEntryID: "0",
+                    HProcExchQty: "0",
+                    HMaterNumber: "",
+                    HMaterID: "0",
+                    HMaterName: "",
+                    HFirstCheckEmpName: "",
+                    HFirstCheckEmp: 0,
+                    HQCSchemeName: "",
+                    HQCSchemeID: "0",
+                    HBatchNo: "",
+                    HLastResult: true, // 榛樿鍚堟牸
+                    HProcName: "",
+                    HProcID: "0",
+                    HTakeSampleCheckBillNo: "", // 鍙栨牱鍗�
+                    HTakeSampleCheckBillID: "0",
+                    HRemark: "",
+                    HErrTreatment: "", // 寮傚父涓存椂澶勭悊鏂规
+                    HMaker: getUserInfo()["Czymc"] || "",
+                    HChecker: "",
+                    HCloseMan: "",
+                    HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
+                    HCheckDate: "",
+                    HCloseDate: "",
+                    HUpDater: "",
+                    HDeleteMan: "",
+                    HUpDateDate: "",
+                    HDeleteDate: "",
+                    HResult: 1,
+                    HAnalysisMethod: "",
 
-					HResDec: "",
-					HStatus: 1,
+                    HResDec: "",
+                    HStatus: 1,
 
-					HMainSourceBillType: "",
-					HMainSourceInterID: "0",
-					HMainSourceEntryID: "1",
-					HMainSourceBillNo: "",
-				},
-				// 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
-				checkItems: {},
-				// 妫�娴嬪�兼ā鍧�
-				InspectModules: {},
-				// 妫�娴嬪��
-				InspectValues: {},
-			};
-		},
-		methods: {
-			// 妫�楠屽�� 璁$畻鏄惁鍚堟牸
-			calcHResult(item){
-			    // 闈炴娊妫�鏉′欢涓嬪垽鏂粨璁�
-			    console.log('item: ',item);
-			    if(item.HSampleSchemeID) {
-			        return
-			    }
-			    
-			    if(item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit){
-			     this.checkItems[item.num].HResult = true
-		         return
-		     }
-		     
-		     this.checkItems[item.num].HResult = false
-			},
-			// 婧愬崟绫诲瀷閫夋嫨
-			HSourceBillTypeNameChange(e) {
-				this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value];
-				this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
-			},
-			toScanCode() {
-				MpaasScan.scanCode((res) => {
-					if (res) {
-						this.getSourceBillInfo(HBarCode);
-					}
-				});
-			},
-			async getSourceBillInfo(HBarCode) {
-				console.log('HBarCode: ', HBarCode);
-				// 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
-				if (this.hform.HSourceBillType == 1401) {
-					// 閿�鍞鍗�
-					await this.LoadingInformation_SeOrder(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				
-				if (this.hform.HSourceBillType == 1402) {
-					// 鍙戣揣閫氱煡鍗昄oadingInformation_SeOutStock
-					await this.LoadingInformation_SeOutStock(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				if (this.hform.HSourceBillType == 3710) {
-					// 鐢熶骇璁㈠崟鍒楄〃棣栨
-					await this.LoadingInformation_ICMO(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				if (this.hform.HSourceBillType == 3772) {
-					// 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
-					await this.LoadingInformation_ProcExchange(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-			},
-			async GetCheckItemID() {
-				if (!this.hform.HMaterName && !this.hform.HProcName) {
-					try {
-						let res = await CommonUtils.doRequest2Async({
-							url: "/Web/GetCheckItemID",
-							data: {
-								HName: this.hform.HMaterName,
-								HProName: this.hform.HProcName,
-								HSourceID: this.hform.HSourceID,
-							},
-						});
+                    HMainSourceBillType: "",
+                    HMainSourceInterID: "0",
+                    HMainSourceEntryID: "1",
+                    HMainSourceBillNo: "",
 
-						let {
-							count,
-							Message,
-							data
-						} = res.data;
+                    HStockOrgID: uni.getStorageSync('OrganizationID')
+                },
+                // 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
+                checkItems: {},
+                // 妫�娴嬪�兼ā鍧�
+                InspectModules: {},
+                // 妫�娴嬪��
+                InspectValues: {},
+                // 涓嶈壇鍘熷洜
+                badReasons: [],
+            };
+        },
+        methods: {
+            // 鏂板涓嶈壇鍘熷洜
+            addBadReason() {
+                this.badReasons.push({
+                    'HBadReasonNumber': 0,
+                    'HBadReasonNumber': "",
+                    'HBadReasonName': "",
+                    'HCheckMan': this.hform.HFirstCheckEmpName,
+                    'HQty': 0,
+                    'HGroupName': this.hform.HGroupName || "",
+                    'HSourceName': this.hform.HSourceName
+                })
+            },
+            delBadReason(badReason, index) {
+                console.log('badReason: ', badReason);
+                this.badReasons.splice(index, 1)
+            },
+            toBillSelector() {
+                this.$refs['billList'].showPopup()
+            },
+            async HandleBillSelectComplete(e) {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
+                        data: {
+                            HBillType: this.hform.HBillType,
+                            HSourceBillType: this.hform.HSourceBillType,
+                            HBarCode: "",
+                            HInterID: e?.HInterID,
+                            HEntryID: e?.HEntryID,
+                            Mode: 2 //閫夊崟妯″紡
+                        }
+                    })
 
-						if (count != 1) {
-							CommonUtils.showTips({
-								title: "娓╅Θ鎻愮ず",
-								message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${Message}`,
-							});
-							return;
-						}
+                    console.log(res)
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data
+                    if (count == 1) {
+                        this.hform.HMaterID = data[0]['HMaterID']
+                        this.hform.HMaterName = data[0]['HMaterName']
+                        this.hform.HMaterNumber = data[0]['HMaterNumber']
+                        this.hform.HMainSourceBillNo = data[0]['HBillNo']
+                        this.hform.HSourceBillNo = data[0]['HBillNo']
+                        this.hform.HMainSourceInterID = data[0].HInterID
+                        this.hform.HMainSourceEntryID = data[0].HEntryID
+                        this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
+                        this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D
+                        this.get_CheckItem();
+                        this.hasSourceBill = true
+                        this.$refs['billList'].exit()
+                    } else {
+                        CommonUtils.showTips({
+                            title: '娓╅Θ鎻愮ず',
+                            message: Message
+                        })
+                    }
 
-						this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-						this.hform.HQCSchemeID = data[0].hmainid;
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: "婧愬崟涓嬫帹閿欒: " + err
+                    })
+                }
 
-						this.get_CheckItem();
-					} catch (err) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${err}`,
-						});
-					}
-				}
-			},
-			//#region 涓�鑷�
-			async LoadingInformation_ProcExchange(HBarCode) {
-				// 宸ュ簭娴佽浆鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/CheckBill/get_ProcessExchangeBill_ByBillNo",
-						data: {
-							HBillNo: HBarCode,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+            },
+            // 妫�楠屽�� 璁$畻鏄惁鍚堟牸
+            calcHResult(item) {
+                // 闈炴娊妫�鏉′欢涓嬪垽鏂粨璁�
+                console.log('item: ', item);
+                if (item.HSampleSchemeID) {
+                    return
+                }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                if (item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit) {
+                    this.checkItems[item.num].HResult = true
+                    return
+                }
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
-					this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					this.hform.HProcExchInterID = data[0].HProcExchInterID;
-					this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0;
-					this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
-					this.hform.HICMOInterID = data[0].HICMOInterID;
-					this.hform.HICMOQty = data[0].HICMOQty || 0;
-					this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
-					this.hform.HSourceID = data[0].HSourceID || 0;
-					this.hform.HMaterID = data[0].HMaterID;
-					this.hform.HMaterName = data[0].浜у搧鍚嶇О;
-					this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HMainSourceBillType = data[0].HBillType;
-					this.hform.HMainSourceInterID = data[0].HInterID;
-					this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
-					this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-					this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-					this.hform.HBatchNo = data[0].鎵瑰彿;
+                this.checkItems[item.num].HResult = false
+            },
+            // 婧愬崟绫诲瀷閫夋嫨
+            HSourceBillTypeNameChange(e) {
+                this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value];
+                this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
+            },
+            toScanCode() {
+                MpaasScan.scanCode((res) => {
+                    if (res) {
+                        this.getSourceBillInfo(HBarCode);
+                    }
+                });
+            },
+            async getSourceBillInfo(HBarCode) {
+                console.log('HBarCode: ', HBarCode);
+                // 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
+                if (this.hform.HSourceBillType == 1401) {
+                    // 閿�鍞鍗�
+                    await this.LoadingInformation_SeOrder(HBarCode);
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                    return;
+                }
 
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			
-			//#region 淇敼
-			async LoadingInformation_ICMO(HBarCode) {
-				// 鐢熶骇璁㈠崟
-				try {
-					let sWhere="and 鍗曟嵁鍙�='"+HBarCode+"'"
-					console.log(sWhere)
-					let res = await CommonUtils.doRequest2Async({
-						url: "/LEMS/MES_IF_ICMOBillList_Json",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                if (this.hform.HSourceBillType == 1402) {
+                    // 鍙戣揣閫氱煡鍗昄oadingInformation_SeOutStock
+                    await this.LoadingInformation_SeOutStock(HBarCode);
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                    return;
+                }
+                if (this.hform.HSourceBillType == 3710) {
+                    // 鐢熶骇璁㈠崟鍒楄〃棣栨
+                    await this.LoadingInformation_ICMO(HBarCode);
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                    return;
+                }
+                if (this.hform.HSourceBillType == 3772) {
+                    // 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
+                    await this.LoadingInformation_ProcExchange(HBarCode);
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                    return;
+                }
+            },
+            async GetCheckItemID() {
+                if (!this.hform.HMaterName && !this.hform.HProcName) {
+                    try {
+                        let res = await CommonUtils.doRequest2Async({
+                            url: "/Web/GetCheckItemID",
+                            data: {
+                                HName: this.hform.HMaterName,
+                                HProName: this.hform.HProcName,
+                                HSourceID: this.hform.HSourceID,
+                            },
+                        });
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                        let {
+                            count,
+                            Message,
+                            data
+                        } = res.data;
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${Message}`,
-						});
-						return;
-					}
-					//鐢熶骇鏀�
-					//this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					//this.hform.HProcExchInterID = data[0].HProcExchInterID;
-					//this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
-					//this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					this.hform.HICMOBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HICMOInterID = data[0].hmainid;
-					this.hform.HICMOQty = data[0].鐢熶骇浠诲姟鍗曟暟閲�;
-					this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
-					this.hform.HSourceID = data[0].HSourceID;
-					this.hform.HMaterID = data[0].HMaterID;
-					this.hform.HMaterNumber=data[0].浜у搧浠g爜
-					this.hform.HMaterName = data[0].浜у搧鍚嶇О;
-					this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HMainSourceBillType = data[0].鍗曟嵁绫诲瀷;
-					this.hform.HMainSourceInterID = data[0].HInterID;
-					this.hform.HICMOEntryID = data[0].HEntryID || 1;
-					this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-					this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			
-			//#region 涓�鑷�
-			async LoadingInformation_StationEntrustOutBill(HBarCode) {
-				// 宸ュ簭濮斿鎺ユ敹鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Cj_StationEntrustOutBill/list",
-						data: {
-							sWhere: ` and HBillNo = '${HBarCode}'`,
-						},
-					});
+                        if (count != 1) {
+                            CommonUtils.showTips({
+                                title: "娓╅Θ鎻愮ず",
+                                message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${Message}`,
+                            });
+                            return;
+                        }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                        this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                        this.hform.HQCSchemeID = data[0].hmainid;
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
+                        this.get_CheckItem();
+                    } catch (err) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${err}`,
+                        });
+                    }
+                }
+            },
+            //#region 涓�鑷�
+            async LoadingInformation_ProcExchange(HBarCode) {
+                // 宸ュ簭娴佽浆鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/CheckBill/get_ProcessExchangeBill_ByBillNo",
+                        data: {
+                            HBillNo: HBarCode,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					HProcExchInterID = data[0].HProcExchInterID;
-					HProcExchEntryID = data[0].HProcExchEntryID;
-					HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
-					HICMOInterID = data[0].HICMOInterID;
-					HICMOQty = data[0].HICMOQty;
-					HSourceName = data[0].鐢熶骇璧勬簮;
-					HSourceID = data[0].HSourceID;
-					HMaterID = data[0].HMaterID;
-					HMaterName = data[0].浜у搧鍚嶇О;
-					HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					HMainSourceBillType = data[0].HBillType;
-					HMainSourceInterID = data[0].hmainid;
-					HICMOEntryID = data[0].HICMOEntryID || 1;
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			//LoadingInformation_SeOutStock
-			async LoadingInformation_SeOrder(HBarCode) {
-				// 婧愬崟涓洪攢鍞鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_OutCompCheckBill/get_SeOrderBill_Tmp_ByBiilNo",
-						data: {
-							HBillNo: HBarCode,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    this.hform.HProcExchInterID = data[0].HProcExchInterID;
+                    this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0;
+                    this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
+                    this.hform.HICMOInterID = data[0].HICMOInterID;
+                    this.hform.HICMOQty = data[0].HICMOQty || 0;
+                    this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+                    this.hform.HSourceID = data[0].HSourceID || 0;
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+                    this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HMainSourceBillType = data[0].HBillType;
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+                    this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+                    this.hform.HBatchNo = data[0].鎵瑰彿;
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇閿�鍞鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
-					//change_inlife
-						this.hform.HMaterNumber=data[0].HMaterNumber;
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
 
-						this.hform.HMaterID = data[0].HMaterID;
-						this.hform.HMaterName = data[0].HMaterName;
-						this.hform.HMainSourceBillNo = data[0].HBillNo;
-	
-						this.hform.HMainSourceInterID = data[0].HInterID;
-						this.hform.HMainSourceEntryID=data[0].HEntryID
+            //#region 淇敼
+            async LoadingInformation_ICMO(HBarCode) {
+                // 鐢熶骇璁㈠崟
+                try {
+                    let sWhere = "and 鍗曟嵁鍙�='" + HBarCode + "'"
+                    console.log(sWhere)
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/LEMS/MES_IF_ICMOBillList_Json",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-						this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-						this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
 
-					for (let i = 0; i < data.length; i++) {
-						this.addCheckItem(data[i])
-					}
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    //鐢熶骇鏀�
+                    //this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    //this.hform.HProcExchInterID = data[0].HProcExchInterID;
+                    //this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
+                    //this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    this.hform.HICMOBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HICMOInterID = data[0].hmainid;
+                    this.hform.HICMOQty = data[0].鐢熶骇浠诲姟鍗曟暟閲�;
+                    this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+                    this.hform.HSourceID = data[0].HSourceID;
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterNumber = data[0].浜у搧浠g爜
+                    this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+                    this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HMainSourceBillType = data[0].鍗曟嵁绫诲瀷;
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HICMOEntryID = data[0].HEntryID || 1;
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+                    this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
 
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇閿�鍞鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			//LoadingInformation_SeOutStock
-			async LoadingInformation_SeOutStock(HBarCode) {
-				// 婧愬崟涓哄彂璐ч�氱煡璁㈠崟
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_OutCompCheckBill/get_SeOutStockBill_Tmp_ByBillNo",
-						data: {
-							HBillNo: HBarCode,
-							user: getUserInfo()["Czymc"],
-						},
-					});
-			
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
-			
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鍙戣揣閫氱煡鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
-					//change_inlife
-						this.hform.HMaterNumber=data[0].HMaterNumber;
-			
-						this.hform.HMaterID = data[0].HMaterID;
-						this.hform.HMaterName = data[0].HMaterName;
-						this.hform.HMainSourceBillNo = data[0].HBillNo;
-				
-						this.hform.HMainSourceInterID = data[0].HInterID;
-						this.hform.HMainSourceEntryID=data[0].HEntryID
-			
-						this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-						this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					
-			
-					for (let i = 0; i < data.length; i++) {
-						this.addCheckItem(data[i])
-					}
-			
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鍙戣揣閫氱煡鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			// 妫�楠屽憳鍒濆鍖�
-			async InitHEmp() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_Employee/list",
-						data: {
-							sWhere: `  and 缁勭粐鍚嶇О = '${uni.getStorageSync(
+            //#region 涓�鑷�
+            async LoadingInformation_StationEntrustOutBill(HBarCode) {
+                // 宸ュ簭濮斿鎺ユ敹鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Cj_StationEntrustOutBill/list",
+                        data: {
+                            sWhere: ` and HBillNo = '${HBarCode}'`,
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+
+                    HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    HProcExchInterID = data[0].HProcExchInterID;
+                    HProcExchEntryID = data[0].HProcExchEntryID;
+                    HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
+                    HICMOInterID = data[0].HICMOInterID;
+                    HICMOQty = data[0].HICMOQty;
+                    HSourceName = data[0].鐢熶骇璧勬簮;
+                    HSourceID = data[0].HSourceID;
+                    HMaterID = data[0].HMaterID;
+                    HMaterName = data[0].浜у搧鍚嶇О;
+                    HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    HMainSourceBillType = data[0].HBillType;
+                    HMainSourceInterID = data[0].hmainid;
+                    HICMOEntryID = data[0].HICMOEntryID || 1;
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
+            //LoadingInformation_SeOutStock
+            async LoadingInformation_SeOrder(HBarCode) {
+                // 婧愬崟涓洪攢鍞鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/QC_OutCompCheckBill/get_SeOrderBill_Tmp_ByBiilNo",
+                        data: {
+                            HBillNo: HBarCode,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇閿�鍞鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    //change_inlife
+                    this.hform.HMaterNumber = data[0].HMaterNumber;
+
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterName = data[0].HMaterName;
+                    this.hform.HMainSourceBillNo = data[0].HBillNo;
+
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HMainSourceEntryID = data[0].HEntryID
+
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+
+
+                    for (let i = 0; i < data.length; i++) {
+                        this.addCheckItem(data[i])
+                    }
+
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇閿�鍞鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            //LoadingInformation_SeOutStock
+            async LoadingInformation_SeOutStock(HBarCode) {
+                // 婧愬崟涓哄彂璐ч�氱煡璁㈠崟
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/QC_OutCompCheckBill/get_SeOutStockBill_Tmp_ByBillNo",
+                        data: {
+                            HBillNo: HBarCode,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鍙戣揣閫氱煡鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    //change_inlife
+                    this.hform.HMaterNumber = data[0].HMaterNumber;
+
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterName = data[0].HMaterName;
+                    this.hform.HMainSourceBillNo = data[0].HBillNo;
+
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HMainSourceEntryID = data[0].HEntryID
+
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+
+
+                    for (let i = 0; i < data.length; i++) {
+                        this.addCheckItem(data[i])
+                    }
+
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鍙戣揣閫氱煡鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            // 妫�楠屽憳鍒濆鍖�
+            async InitHEmp() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_Employee/list",
+                        data: {
+                            sWhere: `  and 缁勭粐鍚嶇О = '${uni.getStorageSync(
               "Organization"
             )}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
-							user: getUserInfo()["Czymc"],
-							Organization: uni.getStorageSync("Organization"),
-						},
-					});
+                            user: getUserInfo()["Czymc"],
+                            Organization: uni.getStorageSync("Organization"),
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("data: ", data);
-						this.GyFirstCheckEmpList = data;
-						this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
-					});
-				}
-			},
-			async HFirstCheckEmpChange(e) {
-				console.log("閫変腑妫�楠屽憳: ", e);
-				let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["鑱屽憳鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HFirstCheckEmp = 0;
-					this.hform.HFirstCheckEmpName = "";
-					return;
-				}
+                    if (count == 1) {
+                        console.log("data: ", data);
+                        this.GyFirstCheckEmpList = data;
+                        this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
+                    });
+                }
+            },
+            async HFirstCheckEmpChange(e) {
+                console.log("閫変腑妫�楠屽憳: ", e);
+                let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["鑱屽憳鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HFirstCheckEmp = 0;
+                    this.hform.HFirstCheckEmpName = "";
+                    return;
+                }
 
-				this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"];
-				this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
-			},
-			// 鐢熶骇鐝鍒濆鍖�
-			async InitHWorkShift() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
-						data: {
-							sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'')  != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
+                this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"];
+                this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
+            },
+            // 鐢熶骇鐝鍒濆鍖�
+            async InitHWorkShift() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
+                        data: {
+                            sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'')  != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
               "Organization"
             )}'`,
-							HMaker: getUserInfo()["Czymc"],
-						},
-					});
+                            HMaker: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("data: ", data);
-						this.GyWorkShiftList = data;
-						this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
-					});
-				}
-			},
-			async HWorkShiftChange(e) {
-				console.log("閫変腑鐝: ", e);
-				let index = this.GyWorkShiftList.findIndex((elem) => elem["鐝鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HWorkShiftID = 0;
-					this.hform.HWorkShiftName = "";
-					return;
-				}
+                    if (count == 1) {
+                        console.log("data: ", data);
+                        this.GyWorkShiftList = data;
+                        this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
+                    });
+                }
+            },
+            async HWorkShiftChange(e) {
+                console.log("閫変腑鐝: ", e);
+                let index = this.GyWorkShiftList.findIndex((elem) => elem["鐝鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HWorkShiftID = 0;
+                    this.hform.HWorkShiftName = "";
+                    return;
+                }
 
-				this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"];
-				this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
-			},
-			// 鐢熶骇璧勬簮鏇存柊
-			// 鐢熶骇璧勬簮鍒濆鍖�
-			async InitHSource() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_Source/list",
-						data: {
-							sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and HUSEORGID = '100038'`,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"];
+                this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
+            },
+            // 鐢熶骇璧勬簮鏇存柊
+            // 鐢熶骇璧勬簮鍒濆鍖�
+            async InitHSource() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_Source/list",
+                        data: {
+                            sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and HUSEORGID = '100038'`,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						this.GySourceList = data;
-						this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
-					});
-				}
-			},
-			// 鐢熶骇璧勬簮鏇存柊
-			async HSourceChange(e) {
-				console.log("閫変腑鐢熶骇璧勬簮: ", e);
-				let index = this.GySourceList.findIndex((elem) => elem["鐢熶骇璧勬簮鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HSourceID = 0;
-					this.hform.HSourceName = "";
-					return;
-				}
+                    if (count == 1) {
+                        this.GySourceList = data;
+                        this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
+                    });
+                }
+            },
+            // 鐢熶骇璧勬簮鏇存柊
+            async HSourceChange(e) {
+                console.log("閫変腑鐢熶骇璧勬簮: ", e);
+                let index = this.GySourceList.findIndex((elem) => elem["鐢熶骇璧勬簮鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HSourceID = 0;
+                    this.hform.HSourceName = "";
+                    return;
+                }
 
-				this.hform.HSourceID = this.GySourceList[index]["HItemID"];
-				this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"];
+                this.hform.HSourceID = this.GySourceList[index]["HItemID"];
+                this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"];
 
-				this.get_ICMOBillStatusList();
-				this.get_QC_TakeSampleCheckBillList();
-				this.GetCheckItemID();
-			},
-			// 鏄剧ず寮圭獥
-			async showSelectorModule(item, index) {
-				this.currentChechItemIDCache = item.num || 0; // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
-				this.enablePopupModule = this.PopupModuleNameList[index];
-				console.log("this.$refs: ", this.$refs);
-				await this.$nextTick();
-				if (index == 7) {
-					// 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
-					this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
-				}
+                this.get_ICMOBillStatusList();
+                this.get_QC_TakeSampleCheckBillList();
+                this.GetCheckItemID();
+            },
+            // 鏄剧ず寮圭獥
+            async showSelectorModule(item, index) {
+                this.currentChechItemIDCache = item.num || 0; // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
+                this.enablePopupModule = this.PopupModuleNameList[index];
+                console.log("this.$refs: ", this.$refs);
+                await this.$nextTick();
+                if (index == 7) {
+                    // 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
+                    this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
+                }
 
-				this.$refs.listPopup.showPopup();
-			},
-			getAnalysisMethodDisplay(val) {
-				console.log("AnalysisMethodVal: ", val);
-				if (val) {
-					return this.arrayAnalysisMethod.find((e) => e.value == val).name;
-				}
-				return "";
-			},
-			checkResultChange(event) {
-				console.log("event: ", event);
-			},
-			// 妫�楠岄」鐩柊澧炶
-			addCheckItem(resource) {
-				let ordinal = this.getObjLength(this.checkItems) + 1;
-				let checkItem = {
-					num: ordinal,
-					HInterID: this.hform.HInterID,
-					HQCCheckItemID: "",
-					HQCCheckItemNumber: "",
-					HQCCheckItemName: "",
-					HInspectInstruMentID: "0",
-					HInspectInstruMentNumber: "",
-					HInspectInstruMentName: "",
-					HQCStd: "",
-					HUnit: "",
-					HQCNote: "",
-					HAnalysisMethod: "",
-					HResult: 1,
-					HMax: "",
-					HMin: "",
-					HAvg: "",
-					HRemark: "",
-					HKeyInspect: false,
-					HStatus: 1,
-					HSampleSchemeID: "",
-					HUnitID: 0,
-					HInspectVal: "",
-					HTargetVal: "",
-					HUpLimit: "",
-					HDownLimit: "",
-					HUpOffSet: "",
-					HDownOffSet: "",
-					HSampleDamageQty: 0,
-					HSampleSchemeName: "",
-					HSampleQty: 0,
-					HAcceptQty: 0,
-					HInspectionLevel: "",
-					HRejectQty: 0,
-					HStrictness: "",
-					HSampleUnRightQty: 0,
-					HAQL: "",
-					HSamplingType: "",
-					HInspectResultToSee: "",
-				};
-				if (resource) {
-					// 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
-					Object.assign(checkItem, resource);
-				}
-				this.$set(this.checkItems, ordinal, checkItem);
-				this.$nextTick(() => {
-					// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
-					this.setInspectValModule(this.checkItems[ordinal]);
-				});
-			},
-			// 妫�楠岄」鐩垹闄よ
-			removeCheckItem(item) {
-				uni.showModal({
-					title: "娓╅Θ鎻愮ず",
-					content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
-					success: (res) => {
-						if (res.confirm) {
-							this.$delete(this.checkItems, item.num);
-							this.$delete(this.subTabs, `_${item.num}`);
-							this.$forceUpdate();
-							this.refreshCheckItemNum();
-						}
-					},
-				});
-			},
-			async refreshCheckItemNum() {
-				await this.$nextTick();
-				// 閲嶆帓搴忓彿
-				let num = 1;
-				let checkItemsCache = {};
-				for (let s in this.checkItems) {
-					checkItemsCache[num] = this.checkItems[s];
-					checkItemsCache[num].num = num;
-					num++;
-				}
-				this.checkItems = checkItemsCache;
-			},
-			getObjLength(obj) {
-				return Object.keys(obj).length;
-			},
-			// 缁撹淇敼
-			HResultChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
+                this.$refs.listPopup.showPopup();
+            },
+            async showSelectorModule_BadReason(itemIndex, Moduleindex) {
+                this.enablePopupModule = this.PopupModuleNameList[Moduleindex];
+                console.log("this.$refs: ", this.$refs);
+                await this.$nextTick();
+                this.$refs.listPopup.showPopup(itemIndex);
+            },
+            getAnalysisMethodDisplay(val) {
+                console.log("AnalysisMethodVal: ", val);
+                if (val) {
+                    return this.arrayAnalysisMethod.find((e) => e.value == val).name;
+                }
+                return "";
+            },
+            checkResultChange(event) {
+                console.log("event: ", event);
+            },
+            // 妫�楠岄」鐩柊澧炶
+            addCheckItem(resource) {
+                let ordinal = this.getObjLength(this.checkItems) + 1;
+                let checkItem = {
+                    num: ordinal,
+                    HInterID: this.hform.HInterID,
+                    HQCCheckItemID: "",
+                    HQCCheckItemNumber: "",
+                    HQCCheckItemName: "",
+                    HInspectInstruMentID: "0",
+                    HInspectInstruMentNumber: "",
+                    HInspectInstruMentName: "",
+                    HQCStd: "",
+                    HUnit: "",
+                    HQCNote: "",
+                    HAnalysisMethod: "",
+                    HResult: 1,
+                    HMax: "",
+                    HMin: "",
+                    HAvg: "",
+                    HRemark: "",
+                    HKeyInspect: false,
+                    HStatus: 1,
+                    HSampleSchemeID: "",
+                    HUnitID: 0,
+                    HInspectVal: "",
+                    HTargetVal: "",
+                    HUpLimit: "",
+                    HDownLimit: "",
+                    HUpOffSet: "",
+                    HDownOffSet: "",
+                    HSampleDamageQty: 0,
+                    HSampleSchemeName: "",
+                    HSampleQty: 0,
+                    HAcceptQty: 0,
+                    HInspectionLevel: "",
+                    HRejectQty: 0,
+                    HStrictness: "",
+                    HSampleUnRightQty: 0,
+                    HAQL: "",
+                    HSamplingType: "",
+                    HInspectResultToSee: "",
+                };
+                if (resource) {
+                    // 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
+                    Object.assign(checkItem, resource);
+                }
+                this.$set(this.checkItems, ordinal, checkItem);
+                this.$nextTick(() => {
+                    // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+                    this.setInspectValModule(this.checkItems[ordinal]);
+                });
+            },
+            // 妫�楠岄」鐩垹闄よ
+            removeCheckItem(item) {
+                uni.showModal({
+                    title: "娓╅Θ鎻愮ず",
+                    content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
+                    success: (res) => {
+                        if (res.confirm) {
+                            this.$delete(this.checkItems, item.num);
+                            this.$delete(this.subTabs, `_${item.num}`);
+                            this.$forceUpdate();
+                            this.refreshCheckItemNum();
+                        }
+                    },
+                });
+            },
+            async refreshCheckItemNum() {
+                await this.$nextTick();
+                // 閲嶆帓搴忓彿
+                let num = 1;
+                let checkItemsCache = {};
+                for (let s in this.checkItems) {
+                    checkItemsCache[num] = this.checkItems[s];
+                    checkItemsCache[num].num = num;
+                    num++;
+                }
+                this.checkItems = checkItemsCache;
+            },
+            getObjLength(obj) {
+                return Object.keys(obj).length;
+            },
+            // 缁撹淇敼
+            HResultChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
 
-				this.HCheckLastResult();
-			},
-			// 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
-			HCheckLastResult() {
-				let unPassNum = 0;
-				for (var key in this.checkItems) {
-					if (!(this.checkItems[key]["HResult"] == 1)) {
-						unPassNum++;
-					}
-				}
+                this.HCheckLastResult();
+            },
+            // 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
+            HCheckLastResult() {
+                let unPassNum = 0;
+                for (var key in this.checkItems) {
+                    if (!(this.checkItems[key]["HResult"] == 1)) {
+                        unPassNum++;
+                    }
+                }
 
-				if (unPassNum > 0) {
-					this.hform.HLastResult = false;
-					return;
-				}
-				this.hform.HLastResult = true;
-			},
-			// 妫�楠屾柟妗堜慨鏀�
-			HAnalysisMethodChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][
-					"value"
-				];
+                if (unPassNum > 0) {
+                    this.hform.HLastResult = false;
+                    return;
+                }
+                this.hform.HLastResult = true;
+            },
+            // 妫�楠屾柟妗堜慨鏀�
+            HAnalysisMethodChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][
+                    "value"
+                ];
 
-				// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
-				this.setInspectValModule(this.checkItems[id]);
-			},
-			// 閲嶇偣妫�鏌ヤ慨鏀�
-			HKeyInspectChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HKeyInspect"] = e.detail.value;
-			},
-			// 妫�楠岄」鐩繑鍥�
-			async CheckItemComplete(e) {
-				console.log("CheckItemRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HQCCheckItemID: data["HItemID"],
-						HQCCheckItemNumber: data["浠g爜"],
-						HQCCheckItemName: data["鍚嶇О"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屾柟妗堣繑鍥�
-			async SampleSchemeComplete(e) {
-				console.log("SampleSchemeRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HSampleSchemeID: data["hmainid"],
-						HSampleSchemeNumber: data["鎶芥牱鏂规浠g爜"],
-						HSampleSchemeName: data["鎶芥牱鏂规鍚嶇О"],
-						HSampleQty: data["鏍锋湰閲�"] || 0,
-						HAcceptQty: data["鍏佽鏁�"] || 0,
-						HInspectionLevel: data["妫�楠屾按骞�"],
-						HRejectQty: data["鎷掔粷鏁�"] || 0,
-						HStrictness: data["涓ユ牸搴�"],
-						HSampleUnRightQty: data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
-						HAQL: data["AQL"],
-						HSamplingType: data["鎶芥牱绫诲瀷"],
-						HInspectResultToSee: data["妫�楠岀粨鏋�"],
-						HUpLimit: data["涓婇檺鍊�"] || 0,
-						HDownLimit: data["涓嬮檺鍊�"] || 0,
-						HSampleDamageQty: data["鏍锋湰鐮村潖鏁�"] || 0,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					this.setInspectValModule(this.checkItems[key]);
+                // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+                this.setInspectValModule(this.checkItems[id]);
+            },
+            // 閲嶇偣妫�鏌ヤ慨鏀�
+            HKeyInspectChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HKeyInspect"] = e.detail.value;
+            },
+            // 妫�楠岄」鐩繑鍥�
+            async CheckItemComplete(e) {
+                console.log("CheckItemRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HQCCheckItemID: data["HItemID"],
+                        HQCCheckItemNumber: data["浠g爜"],
+                        HQCCheckItemName: data["鍚嶇О"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屾柟妗堣繑鍥�
+            async SampleSchemeComplete(e) {
+                console.log("SampleSchemeRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HSampleSchemeID: data["hmainid"],
+                        HSampleSchemeNumber: data["鎶芥牱鏂规浠g爜"],
+                        HSampleSchemeName: data["鎶芥牱鏂规鍚嶇О"],
+                        HSampleQty: data["鏍锋湰閲�"] || 0,
+                        HAcceptQty: data["鍏佽鏁�"] || 0,
+                        HInspectionLevel: data["妫�楠屾按骞�"],
+                        HRejectQty: data["鎷掔粷鏁�"] || 0,
+                        HStrictness: data["涓ユ牸搴�"],
+                        HSampleUnRightQty: data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
+                        HAQL: data["AQL"],
+                        HSamplingType: data["鎶芥牱绫诲瀷"],
+                        HInspectResultToSee: data["妫�楠岀粨鏋�"],
+                        HUpLimit: data["涓婇檺鍊�"] || 0,
+                        HDownLimit: data["涓嬮檺鍊�"] || 0,
+                        HSampleDamageQty: data["鏍锋湰鐮村潖鏁�"] || 0,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    this.setInspectValModule(this.checkItems[key]);
 
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屼华鍣ㄨ繑鍥�
-			async InspectMentComplete(e) {
-				console.log("InspectInstruMentRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HInspectInstruMentID: data["HItemID"],
-						HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
-						HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 浜у搧浠g爜杩斿洖
-			async MaterComplete(e) {
-				console.log("MaterRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HMaterNumber: data["鐗╂枡浠g爜"],
-						HMaterName: data["鐗╂枡鍚嶇О"],
-						HMaterID: data["HItemID"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-					this.GetCheckItemID();
-				}
-			},
-			// 浠诲姟鍗曡繑鍥�
-			async ICMOBillComplete(e) {
-				console.log("ICMOBillRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HICMOInterID: data.hmainid,
-						HICMOEntryID: data.HEntryID || 1,
-						HICMOBillNo: data.鍗曟嵁鍙�,
-						HMaterNumber: data.浜у搧浠g爜,
-						HMaterName: data.浜у搧鍚嶇О,
-						HMaterID: data.HMaterID,
-						HICMOQty: data.鐢熶骇浠诲姟鍗曟暟閲�,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 娴佽浆鍗¤繑鍥�
-			async ProcExchBillComplete(e) {
-				console.log("ProcExchBillRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HProcExchInterID: data.hmainid,
-						HProcExchEntryID: data.hsubid,
-						HProcExchBillNo: data.鍗曟嵁鍙�,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屾柟妗�(涓昏〃)杩斿洖
-			async HQCSchemeComplete(e) {
-				console.log("HQCSchemeRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HQCSchemeID: data.hmainid,
-						HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
-					});
-					await this.get_CheckItem();
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 宸ュ簭杩斿洖
-			async HProcComplete(e) {
-				console.log(" HProcRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HProcName: data["宸ュ簭鍚嶇О"],
-						HProcID: data["HItemID"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-					await this.GetCheckItemID();
-					await this.get_ICMOBillStatusList();
-					await this.get_QC_TakeSampleCheckBillList();
-				}
-			},
-			
-			//
-			async get_QC_TakeSampleCheckBillList() {
-				// 鍙栨牱鍗曟煡璇�
-				let HProcID = this.hform.HProcID;
-				let HProcExchInterId = this.hform.HProcExchInterID;
-				let sWhere = "";
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屼华鍣ㄨ繑鍥�
+            async InspectMentComplete(e) {
+                console.log("InspectInstruMentRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HInspectInstruMentID: data["HItemID"],
+                        HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
+                        HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 浜у搧浠g爜杩斿洖
+            async MaterComplete(e) {
+                console.log("MaterRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HMaterNumber: data["鐗╂枡浠g爜"],
+                        HMaterName: data["鐗╂枡鍚嶇О"],
+                        HMaterID: data["HItemID"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                    this.GetCheckItemID();
+                }
+            },
+            // 浠诲姟鍗曡繑鍥�
+            async ICMOBillComplete(e) {
+                console.log("ICMOBillRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HICMOInterID: data.hmainid,
+                        HICMOEntryID: data.HEntryID || 1,
+                        HICMOBillNo: data.鍗曟嵁鍙�,
+                        HMaterNumber: data.浜у搧浠g爜,
+                        HMaterName: data.浜у搧鍚嶇О,
+                        HMaterID: data.HMaterID,
+                        HICMOQty: data.鐢熶骇浠诲姟鍗曟暟閲�,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 娴佽浆鍗¤繑鍥�
+            async ProcExchBillComplete(e) {
+                console.log("ProcExchBillRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HProcExchInterID: data.hmainid,
+                        HProcExchEntryID: data.hsubid,
+                        HProcExchBillNo: data.鍗曟嵁鍙�,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屾柟妗�(涓昏〃)杩斿洖
+            async HQCSchemeComplete(e) {
+                console.log("HQCSchemeRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HQCSchemeID: data.hmainid,
+                        HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
+                    });
+                    await this.get_CheckItem();
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 宸ュ簭杩斿洖
+            async HProcComplete(e) {
+                console.log(" HProcRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HProcName: data["宸ュ簭鍚嶇О"],
+                        HProcID: data["HItemID"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                    await this.GetCheckItemID();
+                    await this.get_ICMOBillStatusList();
+                    await this.get_QC_TakeSampleCheckBillList();
+                }
+            },
+            // 涓嶈壇鍘熷洜鍥炶皟
+            async HBadReasonComplete(e) {
+                console.log('e: ', e);
+                Object.assign(this.badReasons[e.index], {
+                    HBadReasonName: e.retVal[0]['涓嶈壇鍘熷洜鍚嶇О'],
+                    HBadReasonNumber: e.retVal[0]['涓嶈壇鍘熷洜浠g爜'],
+                    HBadReasonID: e.retVal[0]['HItemID']
+                })
 
-				if (HProcID == "0" || HProcID == "") {
-					CommonUtils.showTips({
-						message: "璇烽�夋嫨宸ュ簭",
-					});
-					return;
-				}
+                this.$refs['listPopup'].exit()
 
-				sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
+            },
+            //
+            async get_QC_TakeSampleCheckBillList() {
+                // 鍙栨牱鍗曟煡璇�
+                let HProcID = this.hform.HProcID;
+                let HProcExchInterId = this.hform.HProcExchInterID;
+                let sWhere = "";
 
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                if (HProcID == "0" || HProcID == "") {
+                    CommonUtils.showTips({
+                        message: "璇烽�夋嫨宸ュ簭",
+                    });
+                    return;
+                }
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${Message}`,
-						});
-					}
+                sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
 
-					this.hform.HTakeSampleCheckBillID = data[0]["hmainid"];
-					this.hform.HTakeSampleCheckBillNo = data[0]["鍗曟嵁鍙�"];
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${err}`,
-					});
-				}
-			},
-			async get_ICMOBillStatusList() {
-				let sWhere = "";
-				let HProcID = this.hform.HProcID;
-				let HSourceID = this.hform.HSourceID;
-				let HProcExchInterId = this.hform.HProcExchInterID;
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-				if (HProcID != "0") {
-					sWhere += " and HProcID=" + HProcID;
-				}
-				if (HSourceID != "0") {
-					sWhere += " and HSourceID=" + HSourceID;
-				}
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${Message}`,
+                        });
+                    }
 
-				sWhere += " and HSourceInterID=" + HProcExchInterID;
+                    this.hform.HTakeSampleCheckBillID = data[0]["hmainid"];
+                    this.hform.HTakeSampleCheckBillNo = data[0]["鍗曟嵁鍙�"];
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${err}`,
+                    });
+                }
+            },
+            async get_ICMOBillStatusList() {
+                let sWhere = "";
+                let HProcID = this.hform.HProcID;
+                let HSourceID = this.hform.HSourceID;
+                let HProcExchInterId = this.hform.HProcExchInterID;
 
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/CheckBill/GetICMOBillStatusList",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                if (HProcID != "0") {
+                    sWhere += " and HProcID=" + HProcID;
+                }
+                if (HSourceID != "0") {
+                    sWhere += " and HSourceID=" + HSourceID;
+                }
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${Message}`,
-						});
-					}
+                sWhere += " and HSourceInterID=" + HProcExchInterID;
 
-					this.hform.HProcID = data[0]["HProcID"];
-					this.hform.HProcName = data[0]["宸ュ簭"];
-					this.hform.HSourceID = data[0]["HSourceID"];
-					this.hform.HSourceName = data[0]["鐢熶骇璧勬簮"];
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${err}`,
-					});
-				}
-			},
-			setInspectValModule(checkItem) {
-				console.log("checkItem: ", checkItem);
-				if (!checkItem || !checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
-					return;
-				}
-				// 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
-				this.$set(this.InspectModules, `_${checkItem.num}`, {
-					id: `_${checkItem.num}`,
-					checkItemId: checkItem.num,
-				});
-				console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod);
-				let analysisMethodName = this.arrayAnalysisMethod.find(
-					(e) => e.value == checkItem.HAnalysisMethod
-				).name;
-				this.$set(this.subTabs, `_${checkItem.num}`, {
-					id: `_${checkItem.num}`,
-					name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`,
-				});
-			},
-			InspectValueUpdate(e) {
-				console.log("e: ", e);
-				let {
-					data,
-					list
-				} = e;
-				this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data);
-				this.$set(this.InspectValues, `${data.num}`, list);
-			},
-			// 甯﹀嚭妫�楠岄」鐩�
-			async get_CheckItem() {
-				// 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
-				this.checkItems = {}
-				for (let key in this.subTabs) {
-					if (key.substring(1) == "_") {
-						this.$delete(this.subTabs, key)
-					}
-				}
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Web/GetCheckItemByCheckProjectID",
-						data: {
-							CheckProjectID: this.hform.HQCSchemeID || 0,
-							HBatchQty: this.hform.HProcExchQty || 0,
-						},
-					});
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/CheckBill/GetICMOBillStatusList",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${Message}`,
+                        });
+                    }
 
-					if (count == 1) {
-						for (var i = 0; i < data.length; i++) {
-							let checkItem = {
-								HQCCheckItemID: data[i]["HQCCheckItemID"],
-								HQCCheckItemNumber: data[i]["妫�楠岄」鐩唬鐮�"],
-								HQCCheckItemName: data[i]["妫�楠岄」鐩�"],
-								HInspectInstruMentID: data[i]["HInspectInstruMentID"],
-								HInspectInstruMentNumber: data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
-								HInspectInstruMentName: data[i]["妫�楠屼华鍣�"],
-								HQCStd: data[i]["HQCStd"],
-								HUnit: data[i]["鍗曚綅鍚嶇О"],
-								HQCNote: "",
-								HAnalysisMethod: data[i]["鍒嗘瀽鏂规硶"],
-								HResult: data[i]["榛樿缁撹"],
-								HMax: "",
-								HMin: "",
-								HAvg: "",
-								HRemark: "",
-								HKeyInspect: data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
-								HStatus: 0,
-								HSampleSchemeID: data[i]["HSampleSchemeID"],
-								HUnitID: data[i]["HUnitID"],
-								HInspectVal: "",
-								HTargetVal: "",
-								HUpLimit: data[i].涓婇檺鍊�,
-								HDownLimit: data[i].涓嬮檺鍊�,
-								HUpOffSet: "",
-								HDownOffSet: "",
-								HSampleDamageQty: "0",
-								HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
-								HSampleQty: data[i].鏍锋湰閲�,
-								HAcceptQty: data[i].鍏佽鏁�,
-								HInspectionLevel: data[i].妫�楠屾按骞�,
-								HRejectQty: data[i].鎷掔粷鏁�,
-								HStrictness: data[i].涓ユ牸搴�,
-								HSampleUnRightQty: 0,
-								HAQL: data[i].AQL,
-								HSamplingType: data[i].鎶芥牱绫诲瀷,
-								HCompareSymbol: data[i].姣旇緝绗�,
-								HTargetVal: data[i].鐩爣鍊� || 0,
-							};
+                    this.hform.HProcID = data[0]["HProcID"];
+                    this.hform.HProcName = data[0]["宸ュ簭"];
+                    this.hform.HSourceID = data[0]["HSourceID"];
+                    this.hform.HSourceName = data[0]["鐢熶骇璧勬簮"];
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${err}`,
+                    });
+                }
+            },
+            setInspectValModule(checkItem) {
+                console.log("checkItem: ", checkItem);
+                if (!checkItem || !checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
+                    return;
+                }
+                // 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
+                this.$set(this.InspectModules, `_${checkItem.num}`, {
+                    id: `_${checkItem.num}`,
+                    checkItemId: checkItem.num,
+                });
+                console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod);
+                let analysisMethodName = this.arrayAnalysisMethod.find(
+                    (e) => e.value == checkItem.HAnalysisMethod
+                ).name;
+                this.$set(this.subTabs, `_${checkItem.num}`, {
+                    id: `_${checkItem.num}`,
+                    name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`,
+                });
+            },
+            InspectValueUpdate(e) {
+                console.log("e: ", e);
+                let {
+                    data,
+                    list
+                } = e;
+                this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data);
+                this.$set(this.InspectValues, `${data.num}`, list);
+            },
+            // 甯﹀嚭妫�楠岄」鐩�
+            async get_CheckItem() {
+                // 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
+                this.checkItems = {}
+                for (let key in this.subTabs) {
+                    if (key.substring(1) == "_") {
+                        this.$delete(this.subTabs, key)
+                    }
+                }
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Web/GetCheckItemByCheckProjectID",
+                        data: {
+                            CheckProjectID: this.hform.HQCSchemeID || 0,
+                            HBatchQty: this.hform.HProcExchQty || 0,
+                            HMaterID: this.hform.HMaterID,
+                            HBillType: '鍑哄巶妫�鏂规'
+                        },
+                    });
 
-							this.addCheckItem(checkItem);
-						}
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
-					});
-				}
-			},
-			async getMaxBillNo() {
-				try {
-					let res = await CommonUtils.doRequest2Sync({
-						url: "/Web/GetMAXNum",
-						data: {
-							HBillType: "7504",
-						},
-					});
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
 
-					if (!res) {
-						return;
-					}
+                    if (count == 1) {
+                        for (var i = 0; i < data.length; i++) {
+                            let checkItem = {
+                                HQCCheckItemID: data[i]["HQCCheckItemID"],
+                                HQCCheckItemNumber: data[i]["妫�楠岄」鐩唬鐮�"],
+                                HQCCheckItemName: data[i]["妫�楠岄」鐩�"],
+                                HInspectInstruMentID: data[i]["HInspectInstruMentID"],
+                                HInspectInstruMentNumber: data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
+                                HInspectInstruMentName: data[i]["妫�楠屼华鍣�"],
+                                HQCStd: data[i]["HQCStd"],
+                                HUnit: data[i]["鍗曚綅鍚嶇О"],
+                                HQCNote: "",
+                                HAnalysisMethod: data[i]["鍒嗘瀽鏂规硶"],
+                                HResult: data[i]["榛樿缁撹"],
+                                HMax: "",
+                                HMin: "",
+                                HAvg: "",
+                                HRemark: "",
+                                HKeyInspect: data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
+                                HStatus: 0,
+                                HSampleSchemeID: data[i]["HSampleSchemeID"],
+                                HUnitID: data[i]["HUnitID"],
+                                HInspectVal: "",
+                                HTargetVal: "",
+                                HUpLimit: data[i].涓婇檺鍊�,
+                                HDownLimit: data[i].涓嬮檺鍊�,
+                                HUpOffSet: "",
+                                HDownOffSet: "",
+                                HSampleDamageQty: "0",
+                                HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+                                HSampleQty: data[i].鏍锋湰閲�,
+                                HAcceptQty: data[i].鍏佽鏁�,
+                                HInspectionLevel: data[i].妫�楠屾按骞�,
+                                HRejectQty: data[i].鎷掔粷鏁�,
+                                HStrictness: data[i].涓ユ牸搴�,
+                                HSampleUnRightQty: 0,
+                                HAQL: data[i].AQL,
+                                HSamplingType: data[i].鎶芥牱绫诲瀷,
+                                HCompareSymbol: data[i].姣旇緝绗�,
+                                HTargetVal: data[i].鐩爣鍊� || 0,
+                            };
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
-					if (count == 1) {
-						this.hform.HInterID = data[0].HInterID;
-						this.hform.HBillNo = data[0].HBillNo;
-					} else {
-						throw Message;
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
-					});
-				}
-			},
-			// 妫�楠屽�艰繑鍥炲��
-			InspectValueComplete(e) {
-				console.log("e: ", e);
-				let key = e.num;
-				e.HStatus = e.HStatus ? 1 : 0
-				if (e.HResult2 == '') {
-					e.HResult2 = this.checkItems[key].HResult
-				}
-				Object.assign(this.checkItems[key], e);
-				this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
-				this.checkItems[key].HResult = this.checkItems[key].HResult2 == '鍚堟牸' ? 1 : 2;
+                            this.addCheckItem(checkItem);
+                        }
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
+                    });
+                }
+            },
+            async getMaxBillNo() {
+                try {
+                    let res = await CommonUtils.doRequest2Sync({
+                        url: "/Web/GetMAXNum",
+                        data: {
+                            HBillType: "7504",
+                        },
+                    });
 
-				this.HCheckLastResult();
+                    if (!res) {
+                        return;
+                    }
 
-			},
-			checkSubmitValidate() {
-				// if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
-				// 	CommonUtils.showTips({
-				// 		message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
-				// 	});
-				// 	return false;
-				// }
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
+                    if (count == 1) {
+                        this.hform.HInterID = data[0].HInterID;
+                        this.hform.HBillNo = data[0].HBillNo;
+                    } else {
+                        throw Message;
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
+                    });
+                }
+            },
+            // 妫�楠屽�艰繑鍥炲��
+            InspectValueComplete(e) {
+                console.log("e: ", e);
+                let key = e.num;
+                e.HStatus = e.HStatus ? 1 : 0
+                if (e.HResult2 == '') {
+                    e.HResult2 = this.checkItems[key].HResult
+                }
+                Object.assign(this.checkItems[key], e);
+                this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
+                this.checkItems[key].HResult = this.checkItems[key].HResult2 == '鍚堟牸' ? 1 : 2;
 
-				if (this.hform.HFirstCheckEmp == 0) {
-					CommonUtils.showTips({
-						message: "妫�楠屽憳鏈�夋嫨锛�",
-					});
-					return false;
-				}
+                this.HCheckLastResult();
 
-				for (let key in this.checkItems) {
-					if (!this.checkItems[key].HQCCheckItemID) {
-						CommonUtils.showTips({
-							message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
-						});
-						return false;
-					}
+            },
+            checkSubmitValidate() {
+                // if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
+                // 	CommonUtils.showTips({
+                // 		message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
+                // 	});
+                // 	return false;
+                // }
 
-					if (
-						this.checkItems[key].HSampleSchemeID == "" ||
-						this.checkItems[key].HSampleSchemeID == null
-					) {
-						this.checkItems[key].HSampleSchemeID = 0;
-					}
-					if (
-						this.checkItems[key].HSampleQty == "" ||
-						this.checkItems[key].HSampleQty == null
-					) {
-						this.checkItems[key].HSampleQty = 0;
-					}
-					if (
-						this.checkItems[key].HSampleDamageQty == "" ||
-						this.checkItems[key].HSampleDamageQty == null
-					) {
-						this.checkItems[key].HSampleDamageQty = 0;
-					}
-					if (
-						this.checkItems[key].HAcceptQty == "" ||
-						this.checkItems[key].HAcceptQty == null
-					) {
-						this.checkItems[key].HAcceptQty = 0;
-					}
-					if (
-						this.checkItems[key].HRejectQty == "" ||
-						this.checkItems[key].HRejectQty == null
-					) {
-						this.checkItems[key].HRejectQty = 0;
-					}
-					if (
-						this.checkItems[key].HSampleUnRightQty == "" ||
-						this.checkItems[key].HSampleUnRightQty == 0
-					) {
-						this.checkItems[key].HSampleUnRightQty = 0;
-					}
-					if (this.checkItems[key].HUnitID == "") {
-						this.checkItems[key].HUnitID = 0;
-					}
-				}
+                if (this.hform.HFirstCheckEmp == 0) {
+                    CommonUtils.showTips({
+                        message: "妫�楠屽憳鏈�夋嫨锛�",
+                    });
+                    return false;
+                }
 
-				return true;
-			},
-			async submit() {
-				if (!this.checkSubmitValidate()) {
-					return;
-				}
-				try {
-					console.log('this.$refs: ', this.$refs);
-					// 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
-					if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length >
-						0) {
-						// 鍔犺浇鏈夋楠屽�兼ā鍧�
-						await this.$refs.InspectValueModules[0].set_SaveValue();
-						this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
-						await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData)
-					}
-					let InspectValuesTrans = [];
-					let HInterID = this.hform.HInterID;
-					for (let key in this.InspectValues) {
-						let HEntryID = key;
+                for (let key in this.checkItems) {
+                    if (!this.checkItems[key].HQCCheckItemID) {
+                        CommonUtils.showTips({
+                            message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
+                        });
+                        return false;
+                    }
 
-						InspectValuesTrans.push(
-							`${JSON.stringify(this.InspectValues[key])}`
-						);
-					}
-					let checkItemsArray = [];
-					for (var key in this.checkItems) {
-						let checkItem = JSON.parse(JSON.stringify(this.checkItems[key]))
-						delete checkItem.data
-						checkItemsArray.push(checkItem);
-					}
-					console.log('checkItemsArray: ', checkItemsArray);
-					let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify(
+                    if (
+                        this.checkItems[key].HSampleSchemeID == "" ||
+                        this.checkItems[key].HSampleSchemeID == null
+                    ) {
+                        this.checkItems[key].HSampleSchemeID = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleQty == "" ||
+                        this.checkItems[key].HSampleQty == null
+                    ) {
+                        this.checkItems[key].HSampleQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleDamageQty == "" ||
+                        this.checkItems[key].HSampleDamageQty == null
+                    ) {
+                        this.checkItems[key].HSampleDamageQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HAcceptQty == "" ||
+                        this.checkItems[key].HAcceptQty == null
+                    ) {
+                        this.checkItems[key].HAcceptQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HRejectQty == "" ||
+                        this.checkItems[key].HRejectQty == null
+                    ) {
+                        this.checkItems[key].HRejectQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleUnRightQty == "" ||
+                        this.checkItems[key].HSampleUnRightQty == 0
+                    ) {
+                        this.checkItems[key].HSampleUnRightQty = 0;
+                    }
+                    if (this.checkItems[key].HUnitID == "") {
+                        this.checkItems[key].HUnitID = 0;
+                    }
+                }
+
+                return true;
+            },
+            async submit() {
+                if (!this.checkSubmitValidate()) {
+                    return;
+                }
+                try {
+                    console.log('this.$refs: ', this.$refs);
+                    // 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
+                    if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules
+                        .length >
+                        0) {
+                        // 鍔犺浇鏈夋楠屽�兼ā鍧�
+                        await this.$refs.InspectValueModules[0].set_SaveValue();
+                        this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
+                        await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData)
+                    }
+                    let InspectValuesTrans = [];
+                    let HInterID = this.hform.HInterID;
+                    for (let key in this.InspectValues) {
+                        let HEntryID = key;
+
+                        InspectValuesTrans.push(
+                            `${JSON.stringify(this.InspectValues[key])}`
+                        );
+                    }
+                    let checkItemsArray = [];
+                    for (var key in this.checkItems) {
+                        let checkItem = JSON.parse(JSON.stringify(this.checkItems[key]))
+                        delete checkItem.data
+                        checkItemsArray.push(checkItem);
+                    }
+                    console.log('checkItemsArray: ', checkItemsArray);
+                    let sMainSub =
+                        `${JSON.stringify(this.hform)};${JSON.stringify(
           checkItemsArray
-        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`;
-					console.log("this.checkItems: ", this.checkItems);
+        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0] || '[]'};${JSON.stringify(this.badReasons)}`;
+                    console.log("this.checkItems: ", this.checkItems);
 
-					let res = await CommonUtils.doRequest2Sync({
-						url: "/QC_OutCompCheckBill/AddBill",
-						data: {
-							sMainSub: sMainSub,
-						},
-						method: "POST",
-					});
+                    let res = await CommonUtils.doRequest2Sync({
+                        url: "/QC_OutCompCheckBill/AddBill",
+                        data: {
+                            sMainSub: sMainSub,
+                        },
+                        method: "POST",
+                    });
 
-					if (!res) {
-						return;
-					}
+                    if (!res) {
+                        return;
+                    }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
-					if (count == 1) {
-						uni.showModal({
-							title: "鎻愮ず",
-							content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
-							success: (res) => {
-								if (res.confirm) {
-									console.log("鐢ㄦ埛鐐瑰嚮纭畾");
-									uni.redirectTo({
-										url: "/pages/JIAOYAN/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1",
-									});
-								} else if (res.cancel) {
-									console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
-									// setTimeout(() => {
-									//     uni.navigateBack();
-									// }, 50)
-								}
-							},
-						});
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${err}`,
-					});
-				}
-			},
-			addNew() {
-				uni.redirectTo({
-					url: "/pages/ZLGL/shoujianjianyan/firstCheckBillList?operationType=1",
-				});
-			},
-			goBack() {
-				uni.navigateBack();
-			},
-			async RoadBillMain() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit",
-						data: {
-							sWhere: ` and hmainid=${this.hform.HInterID}`,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+                    if (count == 1) {
+                        uni.showModal({
+                            title: "鎻愮ず",
+                            content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
+                            success: (res) => {
+                                if (res.confirm) {
+                                    console.log("鐢ㄦ埛鐐瑰嚮纭畾");
+                                    uni.redirectTo({
+                                        url: "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill?operationType=1",
+                                    });
+                                } else if (res.cancel) {
+                                    console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
+                                    // setTimeout(() => {
+                                    //     uni.navigateBack();
+                                    // }, 50)
+                                }
+                            },
+                        });
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${err}`,
+                    });
+                }
+            },
+            addNew() {
+                uni.redirectTo({
+                    url: "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill?operationType=1",
+                });
+            },
+            goBack() {
+                uni.navigateBack();
+            },
+            async RoadBillMain() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit",
+                        data: {
+                            sWhere: ` and hmainid=${this.hform.HInterID}`,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("RoadBillMain: : ", data);
-						Object.assign(this.hform, {
-							HInterID: data[0].hmainid,
-							HBillNo: data[0].鍗曟嵁鍙�,
-							HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
-							HSourceID: data[0].HSourceID,
-							HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
-							HICMOBillNo: data[0].浠诲姟鍗曞彿,
-							HICMOQty: data[0].浠诲姟鍗曟暟閲�,
-							HICMOInterID: data[0].HICMOInterID,
-							HICMOEntryID: data[0].HICMOEntryID || 1,
-							HMaterID: data[0].HMaterID,
-							HMaterName: data[0].鐗╂枡鍚嶇О,
-							HMaterNumber: data[0].鐗╂枡浠g爜,
-							HProcID: data[0].HProcID,
-							HProcName: data[0].HProcName,
-							HProcExchQty: data[0].HProcExchQty || 0,
-							HProcExchBillNo: data[0].HProcExchBillNo,
-							HProcExchInterID: data[0].HProcExchInterID,
-							HProcExchEntryID: data[0].HProcExchEntryID || 0,
-							HFirstCheckEmp: data[0].HFirstCheckEmp,
-							HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
-							HQCSchemeID: data[0].妫�楠屾柟妗圛D,
-							HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
-							HRemark: data[0].琛ㄥご澶囨敞,
-							HMaker: data[0].鍒跺崟浜�,
-							HMakeDate: data[0].鍒跺崟鏃ユ湡,
-							HChecker: data[0].瀹℃牳浜�,
-							HCheckDate: data[0].瀹℃牳鏃ユ湡,
-							HCloseMan: data[0].鍏抽棴浜�,
-							HCloseDate: data[0].鍏抽棴鏃ユ湡,
-							HUpDateDate: data[0].淇敼鏃ユ湡,
-							HDeleteDate: data[0].浣滃簾鏃ユ湡,
-							HSampleSchemeID: data[0].HSampleSchemeID,
-							HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
-							HSampleQty: data[0].鏍锋湰閲�,
-							HSampleQty2: data[0].鏍锋湰閲�,
-							HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
-							HSamplingType: data[0].鎶芥牱绫诲瀷,
-							HAcceptQty: data[0].鍏佽鏁�,
-							HInspectionLevel: data[0].妫�楠屾按骞�,
-							HRejectQty: data[0].鎷掔粷鏁�,
-							HStrictness: data[0].涓ユ牸搴�,
-							HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
-							HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
-							HAQL: data[0].AQL,
-							HUnitID: data[0].HUnitID,
-							HUnit: data[0].鍗曚綅,
-							HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
-							HInspectVal: data[0].妫�娴嬪��,
-							HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
-							HTargetVal: data[0].鐩爣鍊�,
-							HUpLimit: data[0].涓婇檺鍊�,
-							HDownLimit: data[0].涓嬮檺鍊�,
-							HUpOffSet: data[0].涓婂亸宸�,
-							HDownOffSet: data[0].涓嬪亸宸�,
-							HEntryID: data[0].hsubid,
-							HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
-							HQCCheckItemID: data[0].HQCCheckItemID,
-							HShiftsID: data[0].HShiftsID,
-							HShiftsName: data[0].鐝鍚嶇О,
-							HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
-							HBatchNo: data[0].鎵瑰彿,
-							HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
-							HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
-							HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
-							HAnalysisMethod: function() {
-								if (data[0].HAnalysisMethod == 1) {
-									return '瀹氭�ф楠�'
-								} else if (data[0].HAnalysisMethod == 2) {
-									return '瀹氶噺妫�楠�'
-								} else {
-									return '鍏朵粬妫�楠�'
-								}
-							}(),
+                    if (count == 1) {
+                        console.log("RoadBillMain: : ", data);
+                        Object.assign(this.hform, {
+                            HInterID: data[0].hmainid,
+                            HBillNo: data[0].鍗曟嵁鍙�,
+                            HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
+                            HSourceID: data[0].HSourceID,
+                            HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
+                            HICMOBillNo: data[0].浠诲姟鍗曞彿,
+                            HICMOQty: data[0].浠诲姟鍗曟暟閲�,
+                            HICMOInterID: data[0].HICMOInterID,
+                            HICMOEntryID: data[0].HICMOEntryID || 1,
+                            HMaterID: data[0].HMaterID,
+                            HMaterName: data[0].鐗╂枡鍚嶇О,
+                            HMaterNumber: data[0].鐗╂枡浠g爜,
+                            HProcID: data[0].HProcID,
+                            HProcName: data[0].HProcName,
+                            HProcExchQty: data[0].HProcExchQty || 0,
+                            HProcExchBillNo: data[0].HProcExchBillNo,
+                            HProcExchInterID: data[0].HProcExchInterID,
+                            HProcExchEntryID: data[0].HProcExchEntryID || 0,
+                            HFirstCheckEmp: data[0].HFirstCheckEmp,
+                            HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
+                            HQCSchemeID: data[0].妫�楠屾柟妗圛D,
+                            HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
+                            HRemark: data[0].琛ㄥご澶囨敞,
+                            HMaker: data[0].鍒跺崟浜�,
+                            HMakeDate: data[0].鍒跺崟鏃ユ湡,
+                            HChecker: data[0].瀹℃牳浜�,
+                            HCheckDate: data[0].瀹℃牳鏃ユ湡,
+                            HCloseMan: data[0].鍏抽棴浜�,
+                            HCloseDate: data[0].鍏抽棴鏃ユ湡,
+                            HUpDateDate: data[0].淇敼鏃ユ湡,
+                            HDeleteDate: data[0].浣滃簾鏃ユ湡,
+                            HSampleSchemeID: data[0].HSampleSchemeID,
+                            HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
+                            HSampleQty: data[0].鏍锋湰閲�,
+                            HSampleQty2: data[0].鏍锋湰閲�,
+                            HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
+                            HSamplingType: data[0].鎶芥牱绫诲瀷,
+                            HAcceptQty: data[0].鍏佽鏁�,
+                            HInspectionLevel: data[0].妫�楠屾按骞�,
+                            HRejectQty: data[0].鎷掔粷鏁�,
+                            HStrictness: data[0].涓ユ牸搴�,
+                            HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
+                            HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
+                            HAQL: data[0].AQL,
+                            HUnitID: data[0].HUnitID,
+                            HUnit: data[0].鍗曚綅,
+                            HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
+                            HInspectVal: data[0].妫�娴嬪��,
+                            HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
+                            HTargetVal: data[0].鐩爣鍊�,
+                            HUpLimit: data[0].涓婇檺鍊�,
+                            HDownLimit: data[0].涓嬮檺鍊�,
+                            HUpOffSet: data[0].涓婂亸宸�,
+                            HDownOffSet: data[0].涓嬪亸宸�,
+                            HEntryID: data[0].hsubid,
+                            HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
+                            HQCCheckItemID: data[0].HQCCheckItemID,
+                            HShiftsID: data[0].HShiftsID,
+                            HShiftsName: data[0].鐝鍚嶇О,
+                            HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
+                            HBatchNo: data[0].鎵瑰彿,
+                            HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
+                            HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
+                            HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
+                            HAnalysisMethod: function() {
+                                if (data[0].HAnalysisMethod == 1) {
+                                    return '瀹氭�ф楠�'
+                                } else if (data[0].HAnalysisMethod == 2) {
+                                    return '瀹氶噺妫�楠�'
+                                } else {
+                                    return '鍏朵粬妫�楠�'
+                                }
+                            }(),
 
 
 
-						});
+                        });
 
-						for (let i = 0; i < data.length; i++) {
-							this.addCheckItem({
-								HQCCheckItemID: data[i].HQCCheckItemID,
-								HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
-								HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
-								HInspectInstruMentID: data[i].HInspectInstruMentID,
-								HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
-								HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
-								HQCStd: data[i].妫�楠屾爣鍑�,
-								HUnit: data[i].鍗曚綅鍚嶇О,
-								HQCNote: data[i].妫�楠岃褰�,
-								HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
-								HMax: data[i].鏈�澶у��,
-								HMin: data[i].鏈�灏忓��,
-								HAvg: data[i].骞冲潎鍊�,
-								HRemark: data[i].琛ㄤ綋澶囨敞,
-								HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
-									1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
-									2 : 3,
-								HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
-								HSampleSchemeID: data[i].HSampleSchemeID,
-								HUnitID: data[i].HUnitID,
-								HInspectVal: data[i].妫�娴嬪��,
-								HTargetVal: data[i].鐩爣鍊�,
-								HUpLimit: data[i].涓婇檺鍊�,
-								HDownLimit: data[i].涓嬮檺鍊�,
-								HUpOffSet: data[i].涓婂亸宸�,
-								HDownOffSet: data[i].涓嬪亸宸�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
-								HSampleQty: data[i].鏍锋湰閲�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HAcceptQty: data[i].鍏佽鏁�,
-								HInspectionLevel: 0,
-								HRejectQty: data[i].鎷掔粷鏁�,
-								HStrictness: 0,
-								HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
-								HAQL: data[i].AQL,
-								HSamplingType: 0,
-								HSamplingType: data[i].鎶芥牱绫诲瀷,
-								HStrictness: data[i].涓ユ牸搴�,
-								HInspectResultToSee: data[i].妫�楠岀粨鏋�
-							});
+                        for (let i = 0; i < data.length; i++) {
+                            this.addCheckItem({
+                                HQCCheckItemID: data[i].HQCCheckItemID,
+                                HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
+                                HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
+                                HInspectInstruMentID: data[i].HInspectInstruMentID,
+                                HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
+                                HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
+                                HQCStd: data[i].妫�楠屾爣鍑�,
+                                HUnit: data[i].鍗曚綅鍚嶇О,
+                                HQCNote: data[i].妫�楠岃褰�,
+                                HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
+                                HMax: data[i].鏈�澶у��,
+                                HMin: data[i].鏈�灏忓��,
+                                HAvg: data[i].骞冲潎鍊�,
+                                HRemark: data[i].琛ㄤ綋澶囨敞,
+                                HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
+                                    1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
+                                    2 : 3,
+                                HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
+                                HSampleSchemeID: data[i].HSampleSchemeID,
+                                HUnitID: data[i].HUnitID,
+                                HInspectVal: data[i].妫�娴嬪��,
+                                HTargetVal: data[i].鐩爣鍊�,
+                                HUpLimit: data[i].涓婇檺鍊�,
+                                HDownLimit: data[i].涓嬮檺鍊�,
+                                HUpOffSet: data[i].涓婂亸宸�,
+                                HDownOffSet: data[i].涓嬪亸宸�,
+                                HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+                                HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+                                HSampleQty: data[i].鏍锋湰閲�,
+                                HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+                                HAcceptQty: data[i].鍏佽鏁�,
+                                HInspectionLevel: 0,
+                                HRejectQty: data[i].鎷掔粷鏁�,
+                                HStrictness: 0,
+                                HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
+                                HAQL: data[i].AQL,
+                                HSamplingType: 0,
+                                HSamplingType: data[i].鎶芥牱绫诲瀷,
+                                HStrictness: data[i].涓ユ牸搴�,
+                                HInspectResultToSee: data[i].妫�楠岀粨鏋�
+                            });
 
-						}
+                        }
+                        
+                        this.hasSourceBill = true
 
+                        let resBadReason = await CommonUtils.doRequest2Async({
+                            url: '/QC_POStockInCheckBill_BadReason/getBadReasonList',
+                            data: {
+                                HInterID: data[0].hmainid,
+                                user: getUserInfo()["Czymc"],
+                            }
+                        })
 
-						this.hasSourceBill = true
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
-					});
-				}
-			},
-		},
-		async onLoad(e) {
-			this.operationType = e.operationType || 1;
-			this.hform.HInterID = e.linterid || 0;
-			if (this.operationType == 1) {
-				await this.getMaxBillNo();
-			} else if (this.operationType == 2) {
+                        ({
+                            count,
+                            data
+                        } = resBadReason.data)
+                        if (count == 1) {
+                            this.badReasons.push(...data)
+                        }
 
-			} else if (this.operationType == 3) {
-				await this.RoadBillMain();
-			}
+                        this.hasSourceBill = true
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
+                    });
+                }
+            },
+        },
+        async onLoad(e) {
+            this.operationType = e.operationType || 1;
+            this.hform.HInterID = e.linterid || 0;
+            if (this.operationType == 1) {
+                await this.getMaxBillNo();
+            } else if (this.operationType == 2) {
 
-			await this.InitHSource();
-			await this.InitHWorkShift();
-			await this.InitHEmp();
-		},
-	};
+            } else if (this.operationType == 3) {
+                await this.RoadBillMain();
+            }
+
+            await this.InitHSource();
+            await this.InitHWorkShift();
+            await this.InitHEmp();
+        },
+    };
 </script>
 
 <style lang="scss" scoped>
-	input {
-		width: inherit;
-		font-size: 26rpx;
-	}
+    input {
+        width: inherit;
+        font-size: 26rpx;
+    }
 
-	.uni-input {
-		padding: 0;
-	}
+    .uni-input {
+        padding: 0;
+    }
 
-	.bill-main-tabs,
-	.bill-sub-tabs {
-		box-sizing: border-box;
-		width: 730rpx;
-		display: flex;
-		flex-direction: row;
-		flex-wrap: nowrap;
-		gap: 20rpx;
-		flex-shrink: 0;
-		overflow-x: auto;
-		border-bottom: 1px solid #ddd;
-		padding: 20rpx 10rpx;
-		white-space: nowrap;
+    .bill-main-tabs,
+    .bill-sub-tabs {
+        box-sizing: border-box;
+        width: 730rpx;
+        display: flex;
+        flex-direction: row;
+        flex-wrap: nowrap;
+        gap: 20rpx;
+        flex-shrink: 0;
+        overflow-x: auto;
+        border-bottom: 1px solid #ddd;
+        padding: 20rpx 10rpx;
+        white-space: nowrap;
 
-		view {
-			width: auto;
-			font-size: 26rpx;
-			color: #555;
-			text-align: center;
-			padding: 16rpx 0;
-		}
+        view {
+            width: auto;
+            font-size: 26rpx;
+            color: #555;
+            text-align: center;
+            padding: 16rpx 0;
+        }
 
-		.selected {
-			color: #3a78ff;
-			font-weight: bold;
-			border-bottom: 3px solid #3a78ff;
-		}
-	}
+        .selected {
+            color: #3a78ff;
+            font-weight: bold;
+            border-bottom: 3px solid #3a78ff;
+        }
+    }
 
-	.bill-main-content,
-	.bill-sub-content {
-		box-sizing: border-box;
-		padding: 0 30rpx 0 30rpx;
-		display: flex;
-		flex-direction: column;
+    .bill-main-content,
+    .bill-sub-content {
+        box-sizing: border-box;
+        padding: 0 30rpx 0 30rpx;
+        display: flex;
+        flex-direction: column;
 
-		.form-item {
-			width: 100%;
-			display: flex;
-			align-items: center;
-			font-size: 26rpx;
-			padding: 6rpx 0;
+        .form-item {
+            width: 100%;
+            display: flex;
+            align-items: center;
+            font-size: 26rpx;
+            padding: 6rpx 0;
 
-			.left {
-				width: 208rpx;
+            .left {
+                width: 208rpx;
 
-				text {
-					color: red;
-					font-weight: bold;
-				}
-			}
+                text {
+                    color: red;
+                    font-weight: bold;
+                }
+            }
 
-			.right {
-				// width: 450rpx;
-				padding: 8rpx 20rpx;
-				font-size: 26rpx;
-				flex: 1;
-				border-radius: 22rpx;
-				border: 1px solid #acacac;
+            .right {
+                // width: 450rpx;
+                padding: 8rpx 20rpx;
+                font-size: 26rpx;
+                flex: 1;
+                border-radius: 22rpx;
+                border: 1px solid #acacac;
 
-				.uni-combox {
-					padding: 0;
-					height: auto;
+                .uni-combox {
+                    padding: 0;
+                    height: auto;
 
-					.uni-input-placeholder,
-					.uni-input-input {
-						font-size: 26rpx;
-					}
-				}
+                    .uni-input-placeholder,
+                    .uni-input-input {
+                        font-size: 26rpx;
+                    }
+                }
 
-				.uni-combox::v-deep input {
-					height: inherit;
-					font-size: 26rpx;
-				}
-			}
+                .uni-combox::v-deep input {
+                    height: inherit;
+                    font-size: 26rpx;
+                }
+            }
 
-			.disabled {
-				border: 1px solid #e4e4e4;
-				background-color: #e4e4e4;
-			}
+            .disabled {
+                border: 1px solid #e4e4e4;
+                background-color: #e4e4e4;
+            }
 
-			.none-border {
-				border: none;
-			}
-		}
-	}
+            .none-border {
+                border: none;
+            }
+        }
+    }
 
-	.bottom-btn {
-		box-sizing: border-box;
-		width: 100%;
-		height: 120rpx;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background-color: #fff;
-		box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
-		padding: 30rpx 40rpx 40rpx 40rpx;
-		display: flex;
-		flex-direction: row;
-		gap: 10rpx;
+    .bottom-btn {
+        box-sizing: border-box;
+        width: 100%;
+        height: 120rpx;
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        background-color: #fff;
+        box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+        padding: 30rpx 40rpx 40rpx 40rpx;
+        display: flex;
+        flex-direction: row;
+        gap: 10rpx;
 
-		button {
-			border-radius: 50rpx;
-			width: 180rpx;
-			height: 66rpx;
-			line-height: 66rpx;
-			font-size: 28rpx;
-		}
+        button {
+            border-radius: 50rpx;
+            width: 180rpx;
+            height: 66rpx;
+            line-height: 66rpx;
+            font-size: 28rpx;
+        }
 
-		.btn-a {
-			background-color: #3a78ff;
-			color: #fff;
-		}
+        .btn-a {
+            background-color: #3a78ff;
+            color: #fff;
+        }
 
-		.btn-b {
-			background-color: #41a863;
-			color: #fff;
-		}
+        .btn-b {
+            background-color: #41a863;
+            color: #fff;
+        }
 
-		.btn-c {
-			background-color: #acacac;
-			color: #fff;
-			// position: absolute;
-			// right: 120rpx;
-		}
+        .btn-c {
+            background-color: #acacac;
+            color: #fff;
+            // position: absolute;
+            // right: 120rpx;
+        }
 
-		.btn-d {
-			background-color: #ff8901;
-			color: #fff;
-		}
-	}
+        .btn-d {
+            background-color: #ff8901;
+            color: #fff;
+        }
+    }
 
-	.buttons {
-		box-sizing: border-box;
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		padding: 10rpx 0;
+    .buttons {
+        box-sizing: border-box;
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        padding: 10rpx 0;
 
-		button {
-			border-radius: 50rpx;
-			width: 180rpx;
-			height: 66rpx;
-			line-height: 66rpx;
-			font-size: 26rpx;
-		}
+        button {
+            border-radius: 50rpx;
+            width: 180rpx;
+            height: 66rpx;
+            line-height: 66rpx;
+            font-size: 26rpx;
+        }
 
-		.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;
+        }
+    }
 
-	.list {
-		width: 100%;
+    .list {
+        width: 100%;
 
-		.card-detail {
-			width: 100%;
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-			align-items: center;
-			line-height: 120%;
-			gap: 10rpx 0;
+        .card-detail {
+            width: 100%;
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            align-items: center;
+            line-height: 120%;
+            gap: 10rpx 0;
 
-			input {
-				font-size: 26rpx;
-			}
+            input {
+                font-size: 26rpx;
+            }
 
-			.detail {
-				// width: 50%;
-				box-sizing: border-box;
-				font-size: 26rpx;
-				color: #555;
-				padding-right: 20rpx;
+            .detail {
+                // width: 50%;
+                box-sizing: border-box;
+                font-size: 26rpx;
+                color: #555;
+                padding-right: 20rpx;
 
-				text {
-					color: #999;
-					font-size: 26rpx;
-				}
-			}
+                text {
+                    color: #999;
+                    font-size: 26rpx;
+                }
+            }
 
-			.editable {
-				width: 50%;
-				display: inline-flex;
-				flex-direction: row;
-				align-items: center;
+            .editable {
+                width: 50%;
+                display: inline-flex;
+                flex-direction: row;
+                align-items: center;
 
-				text {
-					flex-shrink: 0;
-				}
+                text {
+                    flex-shrink: 0;
+                }
 
                 .editable-input {
                     border: 1px solid #acacac;
@@ -2272,57 +2463,72 @@
         }
     }
 
-	.icon-wrapper {
-		background-color: #3a78ff;
-		border-radius: 100%;
-		width: 40rpx;
-		height: 40rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-shrink: 0;
+    .icon-wrapper {
+        background-color: #3a78ff;
+        border-radius: 100%;
+        width: 40rpx;
+        height: 40rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        flex-shrink: 0;
 
-		.uni-icons {
-			color: #fff !important;
-		}
-	}
+        .uni-icons {
+            color: #fff !important;
+        }
+    }
 
-	.icon-wrapper-big {
-		background-color: #3a78ff;
-		border-radius: 100%;
-		width: 50rpx;
-		height: 50rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-shrink: 0;
-		margin-left: 20rpx;
+    .icon-wrapper-big {
+        background-color: #3a78ff;
+        border-radius: 100%;
+        width: 50rpx;
+        height: 50rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        flex-shrink: 0;
+        margin-left: 20rpx;
 
-		.uni-icons {
-			color: #fff !important;
-		}
-	}
+        .uni-icons {
+            color: #fff !important;
+        }
+    }
 
-	.more {
-		color: #888;
-		font-size: 22rpx;
-		display: flex;
-		border-top: 1px solid #eee;
-		padding-top: 10rpx;
+    .more {
+        color: #888;
+        font-size: 22rpx;
+        display: flex;
+        border-top: 1px solid #eee;
+        padding-top: 10rpx;
 
-		.part {
-			width: 100%;
-			text-align: center;
-		}
-	}
+        .part {
+            width: 100%;
+            text-align: center;
+        }
+    }
 
-	.pass-background {
-		background-color: #cee3f2;
-		border: none;
-	}
+    .pass-background {
+        background-color: #cee3f2;
+        border: none;
+    }
 
-	.unpass-background {
-		background-color: #f0d6e3;
-		border: none;
-	}
+    .unpass-background {
+        background-color: #f0d6e3;
+        border: none;
+    }
+
+    .enable-icon-button {
+        background-color: #3a78ff;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+    }
+
+    .disable-icon-button {
+        background-color: lightgray;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+        pointer-events: none;
+    }
 </style>
\ No newline at end of file
diff --git a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
index 423f253..d108428 100644
--- a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
+++ b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -27,29 +27,33 @@
                             </uni-datetime-picker>
                         </view>
                     </view>
-<view class="form-item">
+                    <view class="form-item">
                         <view class="left">婧愬崟鍗曞彿</view>
                         <view class="right" :class="!hasSourceBill?'':'disabled'">
                             <input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�"
                                 v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
                         </view>
                         <view class="icon-wrapper-big">
-                            <uni-icons class="right-icon" type="scan" style="
-                  background-color: #3a78ff;
-                  padding: 6rpx;
-                  color: #fff;
-                  border-radius: 100%;
-                " size="20" @click="toScanCode"></uni-icons>
+                            <uni-icons class="right-icon" type="scan"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons>
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons class="right-icon" type="search"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons>
                         </view>
                     </view>
-                    
+
                     <view class="form-item">
                         <view class="left">浠诲姟鍗曞彿</view>
                         <view class="right disabled">
                             <input type="text" :value="hform.HICMOBillNo" disabled />
                         </view>
-                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
-                                @click="showSelectorModule(hform, 5)"></uni-icons></view>
+                        <view class="icon-wrapper-big"><uni-icons type="search"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="showSelectorModule(hform, 5)"></uni-icons>
+                        </view>
                     </view>
                     <view class="form-item">
                         <view class="left">娴佽浆鍗″彿</view>
@@ -57,7 +61,8 @@
                             <input type="text" :value="hform.HProcExchBillNo" disabled />
                         </view>
                         <view class="icon-wrapper-big"><uni-icons type="search" size="20"
-                                @click="showSelectorModule(hform, 6)"></uni-icons></view>
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 6)"></uni-icons></view>
                     </view>
                     <view class="form-item">
                         <view class="left">浜у搧浠g爜</view>
@@ -65,7 +70,9 @@
                             <input type="text" disabled :value="hform.HMaterNumber" />
                         </view>
                         <view class="icon-wrapper-big">
-                            <uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons>
+                            <uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 4)"></uni-icons>
                         </view>
                     </view>
                     <view class="form-item">
@@ -87,10 +94,10 @@
                         <view class="right disabled">
                             <input type="text" disabled :value="this.hform.HQCSchemeName" />
                         </view>
-                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20" class='enable-icon-button'
                                 @click="showSelectorModule(hform, 7)"></uni-icons></view>
                     </view>
-                    
+
                     <view class="form-item">
                         <view class="left">鍒ゆ柇缁撹</view>
                         <view class="right none-border">
@@ -113,9 +120,10 @@
                             <input type="text" disabled :value="hform.HProcName" />
                         </view>
                         <view class="icon-wrapper-big"><uni-icons type="search" size="20"
-                                @click="showSelectorModule(hform, 8)"></uni-icons></view>
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 8)"></uni-icons></view>
                     </view>
-                    
+
                 </view>
                 <!-- 鍏朵粬淇℃伅 -->
                 <view class="bill-main-content" v-if="mainTabSelected == 2">
@@ -314,10 +322,11 @@
                                     <text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
                                 </view>
                                 <!-- 鍙湁瀹氶噺鍒嗘瀽鎵嶅惎鐢ㄦ楠屽�� -->
-                                <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2"> 
+                                <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2">
                                     <text>妫�楠屽�硷細</text>
-                                    <input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" />
-                                    
+                                    <input type="text" class="editable-input" @blur="calcHResult(checkItem)"
+                                        v-model="checkItem.HInspectValQ" />
+
                                 </view>
                                 <view class="detail" v-if="checkItem.HQCNote">
                                     <text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
@@ -351,8 +360,58 @@
                         </uni-card>
                     </view>
                 </view>
-                <!-- 鎶芥牱妫�楠� 鍛堢幇 -->
+                <!-- 涓嶈壇鍘熷洜 鍛堢幇 -->
                 <view v-if="subTabSelected == 2">
+                    <view class="buttons" @tap="addBadReason()">
+                        <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
+                    </view>
+                    <view class="over" v-if="badReasons.length  == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="(br, index) in badReasons" :key="index">
+                            <view class="card-detail">
+                                <view class="detail editable"> <text>搴忓彿锛�</text>{{ index+1 }} </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜浠g爜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonName }} </text></view>
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule_BadReason(index, 9)"></uni-icons>
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鏁伴噺锛�</text></view>
+                                    <view class="editable-input">
+                                        <input type="number" v-model="br.HQty" />
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠屽憳锛�</text></view>
+                                    <text>{{ br.HCheckMan }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇鐝粍锛�</text></view>
+                                    <text>{{ br.HGroupName }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇璧勬簮锛�</text></view>
+                                    <text>{{ br.HSourceName }} </text>
+                                </view>
+
+                            </view>
+                            <view class="more">
+                                <view class="part" style="color: #da0000" @tap.stop="delBadReason(br, index)">
+                                    <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
+                                        size="18"></uni-icons>鍒犻櫎
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+                <!-- 鎶芥牱妫�楠� 鍛堢幇 -->
+                <view v-if="subTabSelected == 3">
                     <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
                     <view class="list" v-else>
                         <uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
@@ -456,6 +515,10 @@
             :bindKey="0"></ProcessPopupVue>
         <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
             @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
+        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType"
+            :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue>
+        <BadReasonPopupVue v-if="enablePopupModule == PopupModuleNameList[9]" ref="listPopup"
+            @update="HBadReasonComplete"></BadReasonPopupVue>
     </view>
 </template>
 
@@ -479,6 +542,8 @@
     import {
         MpaasScan
     } from "../../../utils/mpaasScan";
+    import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue";
+    import BadReasonPopupVue from "../../../components/ZLGL/BadReasonPopup.vue";
     export default {
         components: {
             InspectValueTemplateVue,
@@ -490,6 +555,8 @@
             ProcExchBillPopupVue,
             ProcessPopupVue,
             CheckProjectPopupVue,
+            BillListPopupVue,
+            BadReasonPopupVue
         },
         computed: {
             judgeConclusion: {
@@ -500,13 +567,13 @@
         },
         data() {
             return {
-                operationType: 1,
+                billList: null,
 
+                operationType: 1,
                 mainTabSelected: 1,
                 subTabSelected: 1,
 
                 // 婧愬崟鐘舵�佹帶鍒�
-                hasSourceBill: false,
 
                 // 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
                 enablePopupModule: "",
@@ -520,6 +587,7 @@
                     "ProcExchBill",
                     "QCScheme",
                     "Process",
+                    "BadReason"
                 ],
                 // 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
                 currentChechItemIDCache: -1,
@@ -558,22 +626,28 @@
                     },
                     2: {
                         id: "2",
+                        name: "涓嶈壇鍘熷洜",
+                    },
+                    3: {
+                        id: "3",
                         name: "鎶芥牱妫�楠�",
                     },
+
                 },
 
                 // 婧愬崟绫诲瀷
-                HSourceBillType: "宸ュ簭杩涚珯鎺ユ敹鍗�",
-                HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"],
+                HSourceBillType: "鏀舵枡閫氱煡鍗�",
+                HSourceBillTypeValueList: ["1103", "1102", "1201"],
                 HSourceBillTypeNameList: [
-                    "宸ュ簭杩涚珯鎺ユ敹鍗�",
-                    "宸ュ簭濮斿鎺ユ敹鍗�",
-                    "鐢熶骇璁㈠崟",
-                    "宸ュ簭娴佽浆鍗�",
+                    "鏀舵枡閫氱煡鍗�",
+                    "閲囪喘璁㈠崟",
+                    "閲囪喘鍏ュ簱鍗�",
                 ],
+                hasSourceBill: false,
                 // 涓昏〃灞炴��
                 hform: {
-                    HSourceBillType: "3790",
+                    HBillType: '7503',
+                    HSourceBillType: "1103",
                     HSourceBillNo: "",
                     HBillNo: "",
                     HInterID: "0",
@@ -625,6 +699,8 @@
                     HMainSourceInterID: "0",
                     HMainSourceEntryID: "1",
                     HMainSourceBillNo: "",
+
+                    HStockOrgID: uni.getStorageSync('OrganizationID')
                 },
                 // 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
                 checkItems: {},
@@ -632,22 +708,97 @@
                 InspectModules: {},
                 // 妫�娴嬪��
                 InspectValues: {},
+                // 涓嶈壇鍘熷洜
+                badReasons: [],
             };
         },
         methods: {
+            // 鏂板涓嶈壇鍘熷洜
+            addBadReason() {
+                this.badReasons.push({
+                    'HBadReasonNumber': 0,
+                    'HBadReasonNumber': "",
+                    'HBadReasonName': "",
+                    'HCheckMan': this.hform.HFirstCheckEmpName,
+                    'HQty': 0,
+                    'HGroupName': this.hform.HGroupName || "",
+                    'HSourceName': this.hform.HSourceName
+                })
+            },
+            delBadReason(badReason, index) {
+                console.log('badReason: ', badReason);
+                this.badReasons.splice(index, 1)
+            },
+            async HandleBillSelectComplete(e) {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
+                        data: {
+                            HBillType: this.hform.HBillType,
+                            HSourceBillType: this.hform.HSourceBillType,
+                            HBarCode: "",
+                            HInterID: e?.HInterID,
+                            HEntryID: e?.HEntryID,
+                            Mode: 2 //閫夊崟妯″紡
+                        }
+                    })
+
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data
+                    if (count == 1) {
+                        console.log('鑾峰彇婧愬崟锛�', data)
+                        this.hform.HMaterID = data[0]['HMaterID']
+                        this.hform.HMaterName = data[0]['HMaterName']
+                        this.hform.HMaterNumber = data[0]['HMaterNumber']
+                        this.hform.HMainSourceBillNo = data[0]['HBillNo']
+                        this.hform.HSourceBillNo = data[0]['HBillNo']
+                        this.hform.HMainSourceInterID = data[0].HInterID
+                        this.hform.HMainSourceEntryID = data[0].HEntryID
+                        this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
+                        this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D
+
+                        this.get_CheckItem();
+                        this.hasSourceBill = true
+                        this.$refs['billList'].exit()
+                    } else {
+                        CommonUtils.showTips({
+                            title: '娓╅Θ鎻愮ず',
+                            message: Message
+                        })
+                    }
+
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: "婧愬崟涓嬫帹閿欒: " + err
+                    })
+                }
+
+            },
             // 妫�楠屽�� 璁$畻鏄惁鍚堟牸
-            calcHResult(item){
+            calcHResult(item) {
                 // 闈炴娊妫�鏉′欢涓嬪垽鏂粨璁�
-                console.log('item: ',item);
-                if(item.HSampleSchemeID) {
+                console.log('item: ', item);
+                if (item.HSampleSchemeID) {
                     return
                 }
-                
-                if(item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit){
+
+                if (item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit) {
                     this.checkItems[item.num].HResult = true
                     return
                 }
-                
+
                 this.checkItems[item.num].HResult = false
             },
             // 婧愬崟绫诲瀷閫夋嫨
@@ -662,61 +813,110 @@
                     }
                 });
             },
+            // 鏍规嵁婧愬崟绫诲瀷閫夋嫨鍗曟嵁
+            toBillSelector() {
+                this.$refs['billList'].showPopup()
+            },
             async getSourceBillInfo(HBarCode) {
                 console.log('HBarCode: ', HBarCode);
+                let res = await CommonUtils.doRequest2Async({
+                    url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
+                    data: {
+                        HBillType: this.hform.HBillType,
+                        HSourceBillType: this.hform.HSourceBillType,
+                        HBarCode: HBarCode,
+                        HInterID: 0,
+                        HEntryID: 0,
+                        Mode: 1 //鎵爜妯″紡
+                    }
+                })
+
+                console.log(res)
+                let {
+                    data,
+                    Message,
+                    count
+                } = res.data
+                if (count == 1) {
+                    this.hform.HMaterID = data[0]['HMaterID']
+                    this.hform.HMaterName = data[0]['HMaterName']
+                    this.hform.HMaterNumber = data[0]['HMaterNumber']
+                    this.hform.HMainSourceBillNo = data[0]['HBillNo']
+                    this.hform.HSourceBillNo = data[0]['HBillNo']
+                    this.hform.HMainSourceInterID = data[0].HInterID
+                    this.hform.HMainSourceEntryID = data[0].HEntryID
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } else {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: Message
+                    })
+                }
+
+                if (
+                    (uni.getStorageSync("OrganizationID") == "7667152" &&
+                        uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                    (uni.getStorageSync("OrganizationID") == "100199" &&
+                        uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                ) {
+                    await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                }
                 // 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
-                if (this.hform.HSourceBillType == 3790) {
-                    // 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
-                    await this.LoadingInformation_StationInBill(HBarCode);
-                    if (
-                        (uni.getStorageSync("OrganizationID") == "7667152" &&
-                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-                        (uni.getStorageSync("OrganizationID") == "100199" &&
-                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-                    ) {
-                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-                    }
-                    return;
-                }
-                if (this.hform.HSourceBillType == 3793) {
-                    // 宸ュ簭濮斿鎺ユ敹鍗曞垪琛ㄩ妫�
-                    await this.LoadingInformation_StationEntrustOutBill(HBarCode);
-                    if (
-                        (uni.getStorageSync("OrganizationID") == "7667152" &&
-                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-                        (uni.getStorageSync("OrganizationID") == "100199" &&
-                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-                    ) {
-                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-                    }
-                    return;
-                }
-                if (this.hform.HSourceBillType == 3710) {
-                    // 鐢熶骇璁㈠崟鍒楄〃棣栨
-                    await this.LoadingInformation_ICMO(HBarCode);
-                    if (
-                        (uni.getStorageSync("OrganizationID") == "7667152" &&
-                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-                        (uni.getStorageSync("OrganizationID") == "100199" &&
-                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-                    ) {
-                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-                    }
-                    return;
-                }
-                if (this.hform.HSourceBillType == 3772) {
-                    // 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
-                    await this.LoadingInformation_ProcExchange(HBarCode);
-                    if (
-                        (uni.getStorageSync("OrganizationID") == "7667152" &&
-                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-                        (uni.getStorageSync("OrganizationID") == "100199" &&
-                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-                    ) {
-                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-                    }
-                    return;
-                }
+                //if (this.hform.HSourceBillType == 3790) {
+                //    // 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
+                //    await this.LoadingInformation_StationInBill(HBarCode);
+                //    if (
+                //        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                //            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                //        (uni.getStorageSync("OrganizationID") == "100199" &&
+                //            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                //    ) {
+                //        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                //    }
+                //    return;
+                //}
+                //if (this.hform.HSourceBillType == 3793) {
+                //    // 宸ュ簭濮斿鎺ユ敹鍗曞垪琛ㄩ妫�
+                //    await this.LoadingInformation_StationEntrustOutBill(HBarCode);
+                //    if (
+                //        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                //            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                //        (uni.getStorageSync("OrganizationID") == "100199" &&
+                //            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                //    ) {
+                //        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                //    }
+                //    return;
+                //}
+                //if (this.hform.HSourceBillType == 3710) {
+                //    // 鐢熶骇璁㈠崟鍒楄〃棣栨
+                //    await this.LoadingInformation_ICMO(HBarCode);
+                //    if (
+                //        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                //            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                //        (uni.getStorageSync("OrganizationID") == "100199" &&
+                //            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                //    ) {
+                //        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                //    }
+                //    return;
+                //}
+                //if (this.hform.HSourceBillType == 3772) {
+                //    // 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
+                //    await this.LoadingInformation_ProcExchange(HBarCode);
+                //    if (
+                //        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                //            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                //        (uni.getStorageSync("OrganizationID") == "100199" &&
+                //            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                //    ) {
+                //        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                //    }
+                //    return;
+                //}
             },
             async GetCheckItemID() {
                 if (!this.hform.HMaterName && !this.hform.HProcName) {
@@ -944,6 +1144,7 @@
                     this.hform.HMaterID = data[0].HMaterID;
                     this.hform.HMaterName = data[0].浜у搧鍚嶇О;
                     this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HSourceBillNo = data[0].鍗曟嵁鍙�
                     this.hform.HMainSourceBillType = data[0].HBillType;
                     this.hform.HMainSourceInterID = data[0].HInterID;
                     this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
@@ -1124,6 +1325,12 @@
                 }
 
                 this.$refs.listPopup.showPopup();
+            },
+            async showSelectorModule_BadReason(itemIndex, Moduleindex) {
+                this.enablePopupModule = this.PopupModuleNameList[Moduleindex];
+                console.log("this.$refs: ", this.$refs);
+                await this.$nextTick();
+                this.$refs.listPopup.showPopup(itemIndex);
             },
             getAnalysisMethodDisplay(val) {
                 console.log("AnalysisMethod: ", val);
@@ -1411,6 +1618,18 @@
                     await this.get_QC_TakeSampleCheckBillList();
                 }
             },
+            // 涓嶈壇鍘熷洜鍥炶皟
+            async HBadReasonComplete(e) {
+                console.log('e: ', e);
+                Object.assign(this.badReasons[e.index], {
+                    HBadReasonName: e.retVal[0]['涓嶈壇鍘熷洜鍚嶇О'],
+                    HBadReasonNumber: e.retVal[0]['涓嶈壇鍘熷洜浠g爜'],
+                    HBadReasonID: e.retVal[0]['HItemID']
+                })
+
+                this.$refs['listPopup'].exit()
+
+            },
             async get_QC_TakeSampleCheckBillList() {
                 // 鍙栨牱鍗曟煡璇�
                 let HProcID = this.hform.HProcID;
@@ -1546,6 +1765,8 @@
                         data: {
                             CheckProjectID: this.hform.HQCSchemeID || 0,
                             HBatchQty: this.hform.HProcExchQty || 0,
+                            HMaterID: this.hform.HMaterID,
+                            HBillType: '鏉ユ枡妫�鏂规'
                         },
                     });
 
@@ -1754,13 +1975,14 @@
                         checkItemsArray.push(checkItem);
                     }
                     console.log('checkItemsArray: ', checkItemsArray);
-                    let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify(
+                    let sMainSub =
+                        `${JSON.stringify(this.hform)};${JSON.stringify(
           checkItemsArray
-        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`;
+        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0] || '[]'};${JSON.stringify(this.badReasons)}`;
                     console.log("this.checkItems: ", this.checkItems);
 
                     let res = await CommonUtils.doRequest2Sync({
-                        url: "/QC_FirstPieceCheckBill/set_SaveBill",
+                        url: "/QC_POStockInCheckBill/set_SaveBill",
                         data: {
                             sMainSub: sMainSub,
                         },
@@ -1784,7 +2006,7 @@
                                 if (res.confirm) {
                                     console.log("鐢ㄦ埛鐐瑰嚮纭畾");
                                     uni.redirectTo({
-                                        url: "/pages/ZLGL/shoujianjianyan/form?operationType=1",
+                                        url: "/pages/ZLGL/lailiaojianyan/POStockInCheckBill?operationType=1",
                                     });
                                 } else if (res.cancel) {
                                     console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
@@ -1797,19 +2019,19 @@
                     } else {
                         CommonUtils.showTips({
                             title: "娓╅Θ鎻愮ず",
-                            message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${Message}`,
+                            message: `鏉ユ枡妫�楠屽崟淇濆瓨閿欒: ${Message}`,
                         });
                     }
                 } catch (err) {
                     CommonUtils.showTips({
                         title: "娓╅Θ鎻愮ず",
-                        message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${err}`,
+                        message: `鏉ユ枡妫�楠屽崟淇濆瓨閿欒: ${err}`,
                     });
                 }
             },
             addNew() {
                 uni.redirectTo({
-                    url: "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1",
+                    url: "/pages/ZLGL/lailiaojianyan/POStockInCheckBill?operationType=1",
                 });
             },
             goBack() {
@@ -1952,6 +2174,23 @@
                                 HStrictness: data[i].涓ユ牸搴�,
                                 HInspectResultToSee: data[i].妫�楠岀粨鏋�
                             });
+                        }
+                        this.hasSourceBill = true
+
+                        let resBadReason = await CommonUtils.doRequest2Async({
+                            url: '/QC_POStockInCheckBill_BadReason/getBadReasonList',
+                            data: {
+                                HInterID: data[0].hmainid,
+                                user: getUserInfo()["Czymc"],
+                            }
+                        })
+
+                        ({
+                            count,
+                            data
+                        } = resBadReason.data)
+                        if (count == 1) {
+                            this.badReasons.push(...data)
                         }
 
                         this.hasSourceBill = true
@@ -2168,6 +2407,7 @@
             justify-content: space-between;
             align-items: center;
             line-height: 120%;
+            padding: 20rpx 10rpx;
             gap: 10rpx 0;
 
             input {
@@ -2222,7 +2462,6 @@
     }
 
     .icon-wrapper-big {
-        background-color: #3a78ff;
         border-radius: 100%;
         width: 50rpx;
         height: 50rpx;
@@ -2259,4 +2498,19 @@
         background-color: #f0d6e3;
         border: none;
     }
+
+    .enable-icon-button {
+        background-color: #3a78ff;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+    }
+
+    .disable-icon-button {
+        background-color: lightgray;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+        pointer-events: none;
+    }
 </style>
\ No newline at end of file
diff --git a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
index c2dc66d..f646d7f 100644
--- a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
+++ b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
@@ -1,2231 +1,2439 @@
 <template>
-	<view>
-		<!-- 涓昏〃鍖哄煙 -->
-		<view class="bill-main-area">
-			<!-- 涓昏〃椤电 -->
-			<view class="bill-main-tabs">
-				<view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
-				<view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鍏朵粬淇℃伅</view>
-				<view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
-			</view>
-			<!-- 涓昏〃鍐呭 -->
-			<view class="bill-main-contents">
-				<!-- 鍩烘湰淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 1">
-					<view class="form-item">
-						<view class="left">鍗曟嵁鍙�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HBillNo" disabled />
-						</view>
-					</view>
+    <view>
+        <!-- 涓昏〃鍖哄煙 -->
+        <view class="bill-main-area">
+            <!-- 涓昏〃椤电 -->
+            <view class="bill-main-tabs">
+                <view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
+                <view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鍏朵粬淇℃伅</view>
+                <view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+            </view>
+            <!-- 涓昏〃鍐呭 -->
+            <view class="bill-main-contents">
+                <!-- 鍩烘湰淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 1">
+                    <view class="form-item">
+                        <view class="left">鍗曟嵁鍙�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HBillNo" disabled />
+                        </view>
+                    </view>
 
-					<view class="form-item">
-						<view class="left">鏃ユ湡</view>
-						<view class="right">
-							<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
-								<view>{{ hform.HDate }}</view>
-							</uni-datetime-picker>
-						</view>
-					</view>
+                    <view class="form-item">
+                        <view class="left">鏃ユ湡</view>
+                        <view class="right">
+                            <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
+                                <view>{{ hform.HDate }}</view>
+                            </uni-datetime-picker>
+                        </view>
+                    </view>
 
-					<view class="form-item">
-						<view class="left">婧愬崟鍗曞彿</view>
-						<view class="right" :class="!hasSourceBill?'':'disabled'">
-							<input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�"
-								v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
-						</view>
-						<view class="icon-wrapper-big">
-							<uni-icons class="right-icon" type="scan" style="
-                  background-color: #3a78ff;
-                  padding: 6rpx;
-                  color: #fff;
-                  border-radius: 100%;
-                " size="20" @click="toScanCode"></uni-icons>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇璧勬簮</view>
-						<view class="right">
-							<uni-combox :candidates="GySourceNameList" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
-								@update:modelValue="HSourceChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇鐝</view>
-						<view class="right">
-							<uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
-								v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
-						</view>
-					</view>				
-					<view class="form-item" v-if="false">
-						<view class="left">浠诲姟鍗曞彿</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HICMOBillNo" disabled />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 5)"></uni-icons></view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">娴佽浆鍗″彿</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HProcExchBillNo" disabled />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 6)"></uni-icons></view>
-					</view>
-					<view class="form-item">
-						<view class="left">浜у搧浠g爜</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HMaterNumber" />
-						</view>
-						<view class="icon-wrapper-big">
-							<uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浜у搧鍚嶇О</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HMaterName" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">妫�楠屽憳</view>
-						<view class="right">
-							<uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="璇烽�夋嫨妫�楠屽憳"
-								:v-model="hform.HFirstCheckEmpName"
-								@update:modelValue="HFirstCheckEmpChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">妫�楠屾柟妗�</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="this.hform.HQCSchemeName" />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 7)"></uni-icons></view>
-					</view>
-					
-					<view class="form-item">
-						<view class="left">鍒ゆ柇缁撹</view>
-						<view class="right none-border">
-							<radio-group @changer="checkResultChange">
-								<label>
-									<radio value="0" :checked="hform.HLastResult" /><text></text>
-									鍚堟牸
-								</label>
-								<view style="width: 20rpx; display: inline-block"></view>
-								<label>
-									<radio value="1" :checked="!hform.HLastResult" /><text></text>
-									涓嶅悎鏍�
-								</label>
-							</radio-group>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">宸ュ簭</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HProcName" />
-						</view>
-						<view class="icon-wrapper-big"><uni-icons type="search" size="20"
-								@click="showSelectorModule(hform, 8)"></uni-icons></view>
-					</view>
-								
-				</view>
-				<!-- 鍏朵粬淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 2">
-					<view class="form-item">
-						<view class="left">婧愬崟绫诲瀷</view>
-						<view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'">
-							<picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill"
-								@change="HSourceBillTypeNameChange">
-								<input type="text" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="HSourceBillType" disabled/>
-								<view class="picker-overlay"></view>
-							</picker>
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">鐢熶骇鐝</view>
-						<view class="right">
-							<uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
-								v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">寮傚父涓存椂澶勭悊鏂规</view>
-						<view class="right">
-							<input type="text" v-model="hform.HErrTreatment" value="" />
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">浠诲姟鍗曟暟閲�</view>
-						<view class="right">
-							<input type="number" v-model="hform.HICMOQty" />
-						</view>
-					</view>
-					<view class="form-item" v-if="false">
-						<view class="left">娴佽浆鍗℃暟閲�</view>
-						<view class="right">
-							<input type="number" v-model="hform.HProcExchQty" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鎵瑰彿</view>
-						<view class="right">
-							<input type="text" value="" />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">澶囨敞</view>
-						<view class="right">
-							<input type="text" v-model="hform.HRemark" value="" />
-						</view>
-					</view>		
-				</view>
-				<!-- 鍒跺崟淇℃伅 -->
-				<view class="bill-main-content" v-if="mainTabSelected == 3">
-					<view class="form-item">
-						<view class="left">鍒跺崟浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HMaker" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍒跺崟鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HMakeDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">瀹℃牳浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HChecker" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">瀹℃牳鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCheckDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍏抽棴浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCloseMan" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鍏抽棴鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HCloseDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">淇敼浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HUpDater" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">淇敼鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HUpDateDate" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浣滃簾浜�</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HDeleteMan" disabled />
-						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">浣滃簾鏃ユ湡</view>
-						<view class="right disabled">
-							<input type="text" :value="hform.HDeleteDate" disabled />
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 瀛愯〃鍖哄煙 -->
-		<view class="bill-sub-area">
-			<!-- 瀛愯〃椤电 -->
-			<view class="bill-sub-tabs">
-				<view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''"
-					@tap="subTabSelected = subTab.id">{{ subTab.name }}</view>
-			</view>
-			<!-- 瀛愯〃鍐呭 -->
-			<view class="bill-main-contents">
-				<!-- 妫�楠岄」鐩� 鍛堢幇 -->
-				<view v-if="subTabSelected == 1">
-					<!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
-					<view class="buttons" @tap="addCheckItem()">
-						<uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
-					</view>
-					<view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
-					<view class="list" v-else>
-						<uni-card v-for="checkItem in checkItems" :key="checkItem.num">
-							<view class="card-detail">
-								<view class="detail"> <text>搴忓彿锛�</text>{{ checkItem.num }} </view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>妫�楠岄」鐩細</text></view>
-									<input type="text" :value="checkItem.HQCCheckItemName" disabled="" />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(checkItem, 2)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>妫�楠屼华鍣細</text></view>
-									<input type="text" :value="checkItem.HInspectInstruMentName" disabled="" />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(checkItem, 3)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<view><text>缁撹锛�</text></view>
-									<view style="width: 4em">
-										{{ checkItem.HResult == 1 ? "鍚堟牸" : "涓嶅悎鏍�" }}
-									</view>
-									<view>
-										<switch style="width: 2em; transform: scale(0.7)"
-											:checked="checkItem.HResult == 1"
-											@change="HResultChange(checkItem.num, $event)" />
-									</view>
-								</view>
-								<view class="detail editable" style="position: relative">
-									<view style="flex-shrink: 0"><text>鍒嗘瀽鏂规硶锛�</text></view>
-									<picker :range="arrayAnalysisMethod" range-key="name"
-										@change="HAnalysisMethodChange(checkItem.num, $event)">
-										<input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
-											placeholder="璇烽�夋嫨" />
-										<view class="picker-overlay"></view>
-									</picker>
-								</view>
-								<view class="detail editable">
-									<view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
-									<view>
-										<switch type="checkbox" style="transform: scale(0.7)"
-											:checked="checkItem.HKeyInspect"
-											@change="HKeyInspectChange(checkItem, $event)" />
-									</view>
-								</view>
-								<view class="detail" v-if="checkItem.HQCStd">
-									<text>妫�楠屾爣鍑嗭細</text>{{ checkItem.HQCStd }}
-								</view>
-								<view class="detail" v-if="checkItem.HUnit">
-									<text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
-								</view>
-								 <!-- 鍙湁瀹氶噺鍒嗘瀽鎵嶅惎鐢ㄦ楠屽�� -->
-								<view class="detail editable" v-show="checkItem.HAnalysisMethod == 2"> 
-								<text>妫�楠屽�硷細</text>
-								<input type="text" class="editable-input" @blur="calcHResult(checkItem)" v-model="checkItem.HInspectValQ" />
-								</view>
-								
-								<view class="detail" v-if="checkItem.HQCNote">
-									<text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
-								</view>
-								<view class="detail" v-if="checkItem.HTargetVal">
-									<text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
-								</view>
-								<view class="detail" v-if="checkItem.HUpLimit">
-									<text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
-								</view>
-								<view class="detail" v-if="checkItem.HDownLimit">
-									<text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
-								</view>
-								<view class="detail" v-if="checkItem.HMax">
-									<text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
-								</view>
-								<view class="detail" v-if="checkItem.HMin">
-									<text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
-								</view>
-								<view class="detail" v-if="checkItem.HAvg">
-									<text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
-								</view>
-							</view>
-							<view style="height: 20rpx"></view>
-							<view class="more">
-								<view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)">
-									<uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
-										size="18"></uni-icons>鍒犻櫎
-								</view>
-							</view>
-						</uni-card>
-					</view>
-				</view>
-				<!-- 鎶芥牱妫�楠� 鍛堢幇 -->
-				<view v-if="subTabSelected == 2">
-					<view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
-					<view class="list" v-else>
-						<uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
-							<view class="card-detail">
-								<view class="detail"> <text>搴忓彿锛�</text>{{ SamplingItem.num }} </view>
-								<view class="detail editable">
-									<text>妫�楠岄」鐩細</text>{{ SamplingItem.HQCCheckItemName }}
-								</view>
-								<view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
-								<view class="detail editable" style="width: 100%">
-									<view style="flex-shrink: 0"><text>鎶芥牱鏂规锛�</text></view>
-									<input type="text" :value="SamplingItem.HSampleSchemeName" disabled />
-									<view class="icon-wrapper"><uni-icons type="search" size="16"
-											@click="showSelectorModule(SamplingItem, 1)"></uni-icons></view>
-								</view>
-								<view class="detail editable">
-									<text>鎶芥牱绫诲瀷锛�</text>{{ SamplingItem.HSamplingType }}
-								</view>
-								<view class="detail editable">
-									<text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
-								</view>
-								<view class="detail editable">
-									<text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
-								</view>
-								<view class="detail editable">
-									<text>AQL锛�</text>{{ SamplingItem.HAQL }}
-								</view>
-								<view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
-								<view class="detail editable">
-									<text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
-								</view>
-								<view class="detail editable">
-									<text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
-								</view>
-								<view class="detail editable">
-									<text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
-								</view>
-								<view class="detail editable">
-									<text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
-								</view>
-								<view class="detail editable">
-									<text>鏍锋湰鐮村潖鏁帮細</text>
-									<view class="editable-input">
-										<input type="number" v-model="SamplingItem.HSampleDamageQty" />
-									</view>
-								</view>
-								<view class="detail editable">
-									<text>妫�楠岀粨鏋滐細</text>
-									<view style="border-radius: 15%; padding: 0 10rpx" :class="
+                    <view class="form-item">
+                        <view class="left">婧愬崟鍗曞彿</view>
+                        <view class="right" :class="!hasSourceBill?'':'disabled'">
+                            <input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�"
+                                v-model="hform.HSourceBillNo" @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons class="right-icon" type="scan"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons>
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons class="right-icon" type="search"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇璧勬簮</view>
+                        <view class="right">
+                            <uni-combox :candidates="GySourceNameList" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
+                                @update:modelValue="HSourceChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇鐝</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+                                v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">浠诲姟鍗曞彿</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HICMOBillNo" disabled />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 5)"></uni-icons></view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">娴佽浆鍗″彿</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HProcExchBillNo" disabled />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 6)"></uni-icons></view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浜у搧浠g爜</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HMaterNumber" />
+                        </view>
+                        <view class="icon-wrapper-big">
+                            <uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 4)"></uni-icons>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浜у搧鍚嶇О</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HMaterName" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">妫�楠屽憳</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="璇烽�夋嫨妫�楠屽憳"
+                                :v-model="hform.HFirstCheckEmpName"
+                                @update:modelValue="HFirstCheckEmpChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">妫�楠屾柟妗�</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="this.hform.HQCSchemeName" />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20" class="enable-icon-button"
+                                @click="showSelectorModule(hform, 7)"></uni-icons></view>
+                    </view>
+
+                    <view class="form-item">
+                        <view class="left">鍒ゆ柇缁撹</view>
+                        <view class="right none-border">
+                            <radio-group @changer="checkResultChange">
+                                <label>
+                                    <radio value="0" :checked="hform.HLastResult" /><text></text>
+                                    鍚堟牸
+                                </label>
+                                <view style="width: 20rpx; display: inline-block"></view>
+                                <label>
+                                    <radio value="1" :checked="!hform.HLastResult" /><text></text>
+                                    涓嶅悎鏍�
+                                </label>
+                            </radio-group>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">宸ュ簭</view>
+                        <view class="right disabled">
+                            <input type="text" disabled :value="hform.HProcName" />
+                        </view>
+                        <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+                                :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
+                                :disabled="hasSourceBill" @click="showSelectorModule(hform, 8)"></uni-icons></view>
+                    </view>
+
+                </view>
+                <!-- 鍏朵粬淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 2">
+                    <view class="form-item">
+                        <view class="left">婧愬崟绫诲瀷</view>
+                        <view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'">
+                            <picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill"
+                                @change="HSourceBillTypeNameChange">
+                                <input type="text" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="HSourceBillType" disabled />
+                                <view class="picker-overlay"></view>
+                            </picker>
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">鐢熶骇鐝</view>
+                        <view class="right">
+                            <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+                                v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">寮傚父涓存椂澶勭悊鏂规</view>
+                        <view class="right">
+                            <input type="text" v-model="hform.HErrTreatment" value="" />
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">浠诲姟鍗曟暟閲�</view>
+                        <view class="right">
+                            <input type="number" v-model="hform.HICMOQty" />
+                        </view>
+                    </view>
+                    <view class="form-item" v-if="false">
+                        <view class="left">娴佽浆鍗℃暟閲�</view>
+                        <view class="right">
+                            <input type="number" v-model="hform.HProcExchQty" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鎵瑰彿</view>
+                        <view class="right">
+                            <input type="text" value="" />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">澶囨敞</view>
+                        <view class="right">
+                            <input type="text" v-model="hform.HRemark" value="" />
+                        </view>
+                    </view>
+                </view>
+                <!-- 鍒跺崟淇℃伅 -->
+                <view class="bill-main-content" v-if="mainTabSelected == 3">
+                    <view class="form-item">
+                        <view class="left">鍒跺崟浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HMaker" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍒跺崟鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HMakeDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">瀹℃牳浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HChecker" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">瀹℃牳鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCheckDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍏抽棴浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCloseMan" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">鍏抽棴鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HCloseDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">淇敼浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HUpDater" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">淇敼鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HUpDateDate" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浣滃簾浜�</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HDeleteMan" disabled />
+                        </view>
+                    </view>
+                    <view class="form-item">
+                        <view class="left">浣滃簾鏃ユ湡</view>
+                        <view class="right disabled">
+                            <input type="text" :value="hform.HDeleteDate" disabled />
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <!-- 瀛愯〃鍖哄煙 -->
+        <view class="bill-sub-area">
+            <!-- 瀛愯〃椤电 -->
+            <view class="bill-sub-tabs">
+                <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''"
+                    @tap="subTabSelected = subTab.id">{{ subTab.name }}</view>
+            </view>
+            <!-- 瀛愯〃鍐呭 -->
+            <view class="bill-main-contents">
+                <!-- 妫�楠岄」鐩� 鍛堢幇 -->
+                <view v-if="subTabSelected == 1">
+                    <!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
+                    <view class="buttons" @tap="addCheckItem()">
+                        <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
+                    </view>
+                    <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="checkItem in checkItems" :key="checkItem.num">
+                            <view class="card-detail">
+                                <view class="detail"> <text>搴忓彿锛�</text>{{ checkItem.num }} </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠岄」鐩細</text></view>
+                                    <input type="text" :value="checkItem.HQCCheckItemName" disabled="" />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(checkItem, 2)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠屼华鍣細</text></view>
+                                    <input type="text" :value="checkItem.HInspectInstruMentName" disabled="" />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(checkItem, 3)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view><text>缁撹锛�</text></view>
+                                    <view style="width: 4em">
+                                        {{ checkItem.HResult == 1 ? "鍚堟牸" : "涓嶅悎鏍�" }}
+                                    </view>
+                                    <view>
+                                        <switch style="width: 2em; transform: scale(0.7)"
+                                            :checked="checkItem.HResult == 1"
+                                            @change="HResultChange(checkItem.num, $event)" />
+                                    </view>
+                                </view>
+                                <view class="detail editable" style="position: relative">
+                                    <view style="flex-shrink: 0"><text>鍒嗘瀽鏂规硶锛�</text></view>
+                                    <picker :range="arrayAnalysisMethod" range-key="name"
+                                        @change="HAnalysisMethodChange(checkItem.num, $event)">
+                                        <input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
+                                            placeholder="璇烽�夋嫨" />
+                                        <view class="picker-overlay"></view>
+                                    </picker>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
+                                    <view>
+                                        <switch type="checkbox" style="transform: scale(0.7)"
+                                            :checked="checkItem.HKeyInspect"
+                                            @change="HKeyInspectChange(checkItem, $event)" />
+                                    </view>
+                                </view>
+                                <view class="detail" v-if="checkItem.HQCStd">
+                                    <text>妫�楠屾爣鍑嗭細</text>{{ checkItem.HQCStd }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HUnit">
+                                    <text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
+                                </view>
+                                <!-- 鍙湁瀹氶噺鍒嗘瀽鎵嶅惎鐢ㄦ楠屽�� -->
+                                <view class="detail editable" v-show="checkItem.HAnalysisMethod == 2">
+                                    <text>妫�楠屽�硷細</text>
+                                    <input type="text" class="editable-input" @blur="calcHResult(checkItem)"
+                                        v-model="checkItem.HInspectValQ" />
+                                </view>
+
+                                <view class="detail" v-if="checkItem.HQCNote">
+                                    <text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HTargetVal">
+                                    <text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HUpLimit">
+                                    <text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HDownLimit">
+                                    <text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HMax">
+                                    <text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HMin">
+                                    <text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
+                                </view>
+                                <view class="detail" v-if="checkItem.HAvg">
+                                    <text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
+                                </view>
+                            </view>
+                            <view style="height: 20rpx"></view>
+                            <view class="more">
+                                <view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)">
+                                    <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
+                                        size="18"></uni-icons>鍒犻櫎
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+
+                <view v-if="subTabSelected == 2">
+                    <view class="buttons" @tap="addBadReason()">
+                        <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
+                    </view>
+                    <view class="over" v-if="badReasons.length  == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="(br, index) in badReasons" :key="index">
+                            <view class="card-detail">
+                                <view class="detail editable"> <text>搴忓彿锛�</text>{{ index+1 }} </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜浠g爜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>涓嶈壇鍘熷洜锛�</text></view>
+                                    <view style="flex: 1;"><text>{{ br.HBadReasonName }} </text></view>
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule_BadReason(index, 9)"></uni-icons>
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鏁伴噺锛�</text></view>
+                                    <view class="editable-input">
+                                        <input type="number" v-model="br.HQty" />
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>妫�楠屽憳锛�</text></view>
+                                    <text>{{ br.HCheckMan }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇鐝粍锛�</text></view>
+                                    <text>{{ br.HGroupName }} </text>
+                                </view>
+                                <view class="detail editable">
+                                    <view style="flex-shrink: 0"><text>鐢熶骇璧勬簮锛�</text></view>
+                                    <text>{{ br.HSourceName }} </text>
+                                </view>
+
+                            </view>
+                            <view class="more">
+                                <view class="part" style="color: #da0000" @tap.stop="delBadReason(br, index)">
+                                    <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
+                                        size="18"></uni-icons>鍒犻櫎
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+
+                <!-- 鎶芥牱妫�楠� 鍛堢幇 -->
+                <view v-if="subTabSelected == 3">
+                    <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
+                    <view class="list" v-else>
+                        <uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
+                            <view class="card-detail">
+                                <view class="detail"> <text>搴忓彿锛�</text>{{ SamplingItem.num }} </view>
+                                <view class="detail editable">
+                                    <text>妫�楠岄」鐩細</text>{{ SamplingItem.HQCCheckItemName }}
+                                </view>
+                                <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+                                <view class="detail editable" style="width: 100%">
+                                    <view style="flex-shrink: 0"><text>鎶芥牱鏂规锛�</text></view>
+                                    <input type="text" :value="SamplingItem.HSampleSchemeName" disabled />
+                                    <view class="icon-wrapper"><uni-icons type="search" size="16"
+                                            @click="showSelectorModule(SamplingItem, 1)"></uni-icons></view>
+                                </view>
+                                <view class="detail editable">
+                                    <text>鎶芥牱绫诲瀷锛�</text>{{ SamplingItem.HSamplingType }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>AQL锛�</text>{{ SamplingItem.HAQL }}
+                                </view>
+                                <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
+                                </view>
+                                <view class="detail editable">
+                                    <text>鏍锋湰鐮村潖鏁帮細</text>
+                                    <view class="editable-input">
+                                        <input type="number" v-model="SamplingItem.HSampleDamageQty" />
+                                    </view>
+                                </view>
+                                <view class="detail editable">
+                                    <text>妫�楠岀粨鏋滐細</text>
+                                    <view style="border-radius: 15%; padding: 0 10rpx" :class="
                                         SamplingItem.HInspectResultToSee == '鍚堟牸'
                                         ? 'pass-background'
                                         : SamplingItem.HInspectResultToSee == '涓嶅悎鏍�'
                                         ? 'unpass-background'
                                         : ''
                                     ">
-										{{ SamplingItem.HInspectResultToSee }}
-									</view>
-								</view>
-							</view>
-						</uni-card>
-					</view>
-				</view>
-				<!-- 妫�娴嬪�� 鍛堢幇 -->
-				<view v-else v-for="item in InspectModules" :key="item.id">
-					<view v-if="subTabSelected == item.id">
-						<InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
-							@syncCheckData="InspectValueComplete" :bind-data="{
+                                        {{ SamplingItem.HInspectResultToSee }}
+                                    </view>
+                                </view>
+                            </view>
+                        </uni-card>
+                    </view>
+                </view>
+                <!-- 妫�娴嬪�� 鍛堢幇 -->
+                <view v-else v-for="item in InspectModules" :key="item.id">
+                    <view v-if="subTabSelected == item.id">
+                        <InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
+                            @syncCheckData="InspectValueComplete" :bind-data="{
                 data: checkItems[item.checkItemId],
                 list: InspectValues[item.checkItemId],
                 mode: 3 // 棣栨妫�娴嬪�兼ā鍧�
               }">
-						</InspectValueTemplateVue>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view style="height: 120rpx"></view>
-		<view class="bottom-btn">
-			<button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
-			<view style="flex: 1"></view>
-			<button class="btn-a" size="mini" @tap="addNew">鏂板</button>
-			<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
-		</view>
-		<SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup"
-			@update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
-		</SampleSchemePopupVue>
-		<CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup"
-			@update="CheckItemComplete" :bindKey="currentChechItemIDCache">
-		</CheckItemPopupVue>
-		<InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup"
-			@update="InspectMentComplete" :bindKey="currentChechItemIDCache">
-		</InspectMentPopupVue>
-		<MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete"
-			:bindKey="0">
-		</MaterialPopupVue>
-		<ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete"
-			:bindKey="0"></ICMOBillPopupVue>
-		<ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup"
-			@update="ProcExchBillComplete" :bindKey="0"></ProcExchBillPopupVue>
-		<ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete"
-			:bindKey="0"></ProcessPopupVue>
-		<CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
-			@update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
-	</view>
+                        </InspectValueTemplateVue>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view style="height: 120rpx"></view>
+        <view class="bottom-btn">
+            <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+            <view style="flex: 1"></view>
+            <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+            <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+        </view>
+        <SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup"
+            @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
+        </SampleSchemePopupVue>
+        <CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup"
+            @update="CheckItemComplete" :bindKey="currentChechItemIDCache">
+        </CheckItemPopupVue>
+        <InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup"
+            @update="InspectMentComplete" :bindKey="currentChechItemIDCache">
+        </InspectMentPopupVue>
+        <MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete"
+            :bindKey="0">
+        </MaterialPopupVue>
+        <ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete"
+            :bindKey="0"></ICMOBillPopupVue>
+        <ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup"
+            @update="ProcExchBillComplete" :bindKey="0"></ProcExchBillPopupVue>
+        <ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete"
+            :bindKey="0"></ProcessPopupVue>
+        <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
+            @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
+        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType"
+            :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue>
+        <BadReasonPopupVue v-if="enablePopupModule == PopupModuleNameList[9]" ref="listPopup"
+            @update="HBadReasonComplete"></BadReasonPopupVue>
+    </view>
 </template>
 
 <script>
-	import dayjs from "dayjs";
-	import {
-		CommonUtils
-	} from "../../../utils/common";
-	import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue";
-	import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue";
-	import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue";
-	import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue";
-	import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue";
-	import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue";
-	import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue";
-	import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
-	import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue";
-	import {
-		getUserInfo
-	} from "../../../utils/auth";
-	import {
-		MpaasScan
-	} from "../../../utils/mpaasScan";
-	export default {
-		components: {
-			InspectValueTemplateVue,
-			SampleSchemePopupVue,
-			CheckItemPopupVue,
-			InspectMentPopupVue,
-			MaterialPopupVue,
-			ICMOBillPopupVue,
-			ProcExchBillPopupVue,
-			ProcessPopupVue,
-			CheckProjectPopupVue,
-		},
-		computed: {
-			judgeConclusion: {
-				get() {
-					return true;
-				},
-			},
-		},
-		data() {
-			return {
-				operationType: 1,
+    import dayjs from "dayjs";
+    import {
+        CommonUtils
+    } from "../../../utils/common";
+    import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue";
+    import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue";
+    import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue";
+    import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue";
+    import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue";
+    import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue";
+    import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue";
+    import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
+    import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue";
+    import {
+        getUserInfo
+    } from "../../../utils/auth";
+    import {
+        MpaasScan
+    } from "../../../utils/mpaasScan";
+    import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue";
+    import BadReasonPopupVue from "../../../components/ZLGL/BadReasonPopup.vue";
+    export default {
+        components: {
+            InspectValueTemplateVue,
+            SampleSchemePopupVue,
+            CheckItemPopupVue,
+            InspectMentPopupVue,
+            MaterialPopupVue,
+            ICMOBillPopupVue,
+            ProcExchBillPopupVue,
+            ProcessPopupVue,
+            CheckProjectPopupVue,
+            BillListPopupVue,
+            BadReasonPopupVue
+        },
+        computed: {
+            judgeConclusion: {
+                get() {
+                    return true;
+                },
+            },
+        },
+        data() {
+            return {
+                operationType: 1,
 
-				mainTabSelected: 1,
-				subTabSelected: 1,
+                mainTabSelected: 1,
+                subTabSelected: 1,
 
-				// 婧愬崟鐘舵�佹帶鍒�
-				hasSourceBill: false,
+                // 婧愬崟鐘舵�佹帶鍒�
+                hasSourceBill: false,
 
-				// 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
-				enablePopupModule: "",
-				PopupModuleNameList: [
-					"",
-					"SampleScheme",
-					"CheckItem",
-					"InspectMent",
-					"Material",
-					"ICMOBill",
-					"ProcExchBill",
-					"QCScheme",
-					"Process",
-				],
-				// 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
-				currentChechItemIDCache: -1,
+                // 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
+                enablePopupModule: "",
+                PopupModuleNameList: [
+                    "",
+                    "SampleScheme",
+                    "CheckItem",
+                    "InspectMent",
+                    "Material",
+                    "ICMOBill",
+                    "ProcExchBill",
+                    "QCScheme",
+                    "Process",
+                    "BadReason"
+                ],
+                // 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
+                currentChechItemIDCache: -1,
 
-				// uni-combox 閫夋嫨鍣ㄤ娇鐢�
-				// 鐢熶骇璧勬簮
-				GySourceList: [],
-				GySourceNameList: [],
-				// 鐝
-				GyWorkShiftList: [],
-				GyWorkShiftNameList: [],
-				// 妫�楠屽憳
-				GyFirstCheckEmpList: [],
-				GyFirstCheckEmpNameList: [],
+                // uni-combox 閫夋嫨鍣ㄤ娇鐢�
+                // 鐢熶骇璧勬簮
+                GySourceList: [],
+                GySourceNameList: [],
+                // 鐝
+                GyWorkShiftList: [],
+                GyWorkShiftNameList: [],
+                // 妫�楠屽憳
+                GyFirstCheckEmpList: [],
+                GyFirstCheckEmpNameList: [],
 
-				// 妫�楠屾柟妗�
-				arrayAnalysisMethod: [{
-						value: 1,
-						name: "瀹氭�у垎鏋�",
-					},
-					{
-						value: 2,
-						name: "瀹氶噺鍒嗘瀽",
-					},
-					{
-						value: 3,
-						name: "鍏朵粬鍒嗘瀽",
-					},
-				],
-				ArrayAnalysisMethodValue: [1, 2, 3],
-				// 瀛愯〃 椤电淇℃伅
-				subTabs: {
-					1: {
-						id: "1",
-						name: "妫�楠岄」鐩�",
-					},
-					2: {
-						id: "2",
-						name: "鎶芥牱妫�楠�",
-					},
-				},
+                // 妫�楠屾柟妗�
+                arrayAnalysisMethod: [{
+                        value: 1,
+                        name: "瀹氭�у垎鏋�",
+                    },
+                    {
+                        value: 2,
+                        name: "瀹氶噺鍒嗘瀽",
+                    },
+                    {
+                        value: 3,
+                        name: "鍏朵粬鍒嗘瀽",
+                    },
+                ],
+                ArrayAnalysisMethodValue: [1, 2, 3],
+                // 瀛愯〃 椤电淇℃伅
+                subTabs: {
+                    1: {
+                        id: "1",
+                        name: "妫�楠岄」鐩�",
+                    },
+                    2: {
+                        id: "2",
+                        name: "涓嶈壇鍘熷洜",
+                    },
+                    3: {
+                        id: "3",
+                        name: "鎶芥牱妫�楠�",
+                    },
+                },
 
-				// 婧愬崟绫诲瀷
-				HSourceBillType: "鐢熶骇姹囨姤鍗�",
-				HSourceBillTypeValueList: ["3771"],
-				HSourceBillTypeNameList: [
-					"鐢熶骇姹囨姤鍗�"
-				],
-				// 涓昏〃灞炴��
-				hform: {
-					HSourceBillType: "3711",
-					HSourceBillNo: "",
-					HBillNo: "",
-					HInterID: "0",
-					HDate: dayjs(new Date()).format("YYYY-MM-DD"),
-					HSourceName: "",
-					HSourceID: "0",
-					HShiftsName: "",
-					HShiftsID: "0",
-					HICMOBillNo: "",
-					HICMOInterID: "0",
-					HICMOEntryID: "1",
-					HICMOQty: "0",
-					HProcExchBillNo: "",
-					HProcExchInterID: "0",
-					HProcExchEntryID: "0",
-					HProcExchQty: "0",
-					HMaterNumber: "",
-					HMaterID: "0",
-					HMaterName: "",
-					HFirstCheckEmpName: "",
-					HFirstCheckEmp: 0,
-					HQCSchemeName: "",
-					HQCSchemeID: "0",
-					HBatchNo: "",
-					HLastResult: true, // 榛樿鍚堟牸
-					HProcName: "",
-					HProcID: "0",
-					HTakeSampleCheckBillNo: "", // 鍙栨牱鍗�
-					HTakeSampleCheckBillID: "0",
-					HRemark: "",
-					HErrTreatment: "", // 寮傚父涓存椂澶勭悊鏂规
-					HMaker: getUserInfo()["Czymc"] || "",
-					HChecker: "",
-					HCloseMan: "",
-					HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
-					HCheckDate: "",
-					HCloseDate: "",
-					HUpDater: "",
-					HDeleteMan: "",
-					HUpDateDate: "",
-					HDeleteDate: "",
-					HResult: 1,
-					HAnalysisMethod: "",
+                // 婧愬崟绫诲瀷
+                HSourceBillType: "鐢熶骇姹囨姤鍗�",
+                HSourceBillTypeValueList: ["3711", "3772"],
+                HSourceBillTypeNameList: [
+                    "鐢熶骇姹囨姤鍗�", '宸ュ簭娴佽浆鍗�'
+                ],
+                // 涓昏〃灞炴��
+                hform: {
+                    HBillType: "7501",
+                    HSourceBillType: "3711",
+                    HSourceBillNo: "",
+                    HBillNo: "",
+                    HInterID: "0",
+                    HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+                    HSourceName: "",
+                    HSourceID: "0",
+                    HShiftsName: "",
+                    HShiftsID: "0",
+                    HICMOBillNo: "",
+                    HICMOInterID: "0",
+                    HICMOEntryID: "1",
+                    HICMOQty: "0",
+                    HProcExchBillNo: "",
+                    HProcExchInterID: "0",
+                    HProcExchEntryID: "0",
+                    HProcExchQty: "0",
+                    HMaterNumber: "",
+                    HMaterID: "0",
+                    HMaterName: "",
+                    HFirstCheckEmpName: "",
+                    HFirstCheckEmp: 0,
+                    HQCSchemeName: "",
+                    HQCSchemeID: "0",
+                    HBatchNo: "",
+                    HLastResult: true, // 榛樿鍚堟牸
+                    HProcName: "",
+                    HProcID: "0",
+                    HTakeSampleCheckBillNo: "", // 鍙栨牱鍗�
+                    HTakeSampleCheckBillID: "0",
+                    HRemark: "",
+                    HErrTreatment: "", // 寮傚父涓存椂澶勭悊鏂规
+                    HMaker: getUserInfo()["Czymc"] || "",
+                    HChecker: "",
+                    HCloseMan: "",
+                    HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
+                    HCheckDate: "",
+                    HCloseDate: "",
+                    HUpDater: "",
+                    HDeleteMan: "",
+                    HUpDateDate: "",
+                    HDeleteDate: "",
+                    HResult: 1,
+                    HAnalysisMethod: "",
 
-					HResDec: "",
-					HStatus: 1,
+                    HResDec: "",
+                    HStatus: 1,
 
-					HMainSourceBillType: "",
-					HMainSourceInterID: "0",
-					HMainSourceEntryID: "1",
-					HMainSourceBillNo: "",
-				},
-				// 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
-				checkItems: {},
-				// 妫�娴嬪�兼ā鍧�
-				InspectModules: {},
-				// 妫�娴嬪��
-				InspectValues: {},
-			};
-		},
-		methods: {
-			// 妫�楠屽�� 璁$畻鏄惁鍚堟牸
-			calcHResult(item){
-			    // 闈炴娊妫�鏉′欢涓嬪垽鏂粨璁�
-			    console.log('item: ',item);
-			    if(item.HSampleSchemeID) {
-			        return
-			    }
-			    
-			    if(item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit){
-			     this.checkItems[item.num].HResult = true
-		         return
-		     }
-		     
-		     this.checkItems[item.num].HResult = false
-			},
-			// 婧愬崟绫诲瀷閫夋嫨
-			HSourceBillTypeNameChange(e) {
-				this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value];
-				this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
-			},
-			toScanCode() {
-				MpaasScan.scanCode((res) => {
-					if (res) {
-						this.getSourceBillInfo(HBarCode);
-					}
-				});
-			},
-			async getSourceBillInfo(HBarCode) {
-				console.log('HBarCode: ', HBarCode);
-				// 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
-				if (this.hform.HSourceBillType == 3711) {
-					// 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
-					await this.LoadingInformation_ICMOReportBill(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				// if (this.hform.HSourceBillType == 3790) {
-				// 	// 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
-				// 	await this.LoadingInformation_StationInBill(HBarCode);
-				// 	if (
-				// 		(uni.getStorageSync("OrganizationID") == "7667152" &&
-				// 			uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-				// 		(uni.getStorageSync("OrganizationID") == "100199" &&
-				// 			uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-				// 	) {
-				// 		await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-				// 	}
-				// 	return;
-				// }
-				if (this.hform.HSourceBillType == 3793) {
-					// 宸ュ簭濮斿鎺ユ敹鍗曞垪琛ㄩ妫�
-					await this.LoadingInformation_StationEntrustOutBill(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				if (this.hform.HSourceBillType == 3710) {
-					// 鐢熶骇璁㈠崟鍒楄〃棣栨
-					await this.LoadingInformation_ICMO(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-				if (this.hform.HSourceBillType == 3772) {
-					// 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
-					await this.LoadingInformation_ProcExchange(HBarCode);
-					if (
-						(uni.getStorageSync("OrganizationID") == "7667152" &&
-							uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
-						(uni.getStorageSync("OrganizationID") == "100199" &&
-							uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
-					) {
-						await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
-					}
-					return;
-				}
-			},
-			async GetCheckItemID() {
-				if (!this.hform.HMaterName && !this.hform.HProcName) {
-					try {
-						let res = await CommonUtils.doRequest2Async({
-							url: "/Web/GetCheckItemID",
-							data: {
-								HName: this.hform.HMaterName,
-								HProName: this.hform.HProcName,
-								HSourceID: this.hform.HSourceID,
-							},
-						});
+                    HMainSourceBillType: "",
+                    HMainSourceInterID: "0",
+                    HMainSourceEntryID: "1",
+                    HMainSourceBillNo: "",
 
-						let {
-							count,
-							Message,
-							data
-						} = res.data;
+                    HStockOrgID: uni.getStorageSync('OrganizationID')
+                },
+                // 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
+                checkItems: {},
+                // 妫�娴嬪�兼ā鍧�
+                InspectModules: {},
+                // 妫�娴嬪��
+                InspectValues: {},
+                // 涓嶈壇鍘熷洜
+                badReasons: [],
+            };
+        },
+        methods: {
+            // 鏂板涓嶈壇鍘熷洜
+            addBadReason() {
+                this.badReasons.push({
+                    'HBadReasonNumber': 0,
+                    'HBadReasonNumber': "",
+                    'HBadReasonName': "",
+                    'HCheckMan': this.hform.HFirstCheckEmpName,
+                    'HQty': 0,
+                    'HGroupName': this.hform.HGroupName || "",
+                    'HSourceName': this.hform.HSourceName
+                })
+            },
+            delBadReason(badReason, index) {
+                console.log('badReason: ', badReason);
+                this.badReasons.splice(index, 1)
+            },
+            // 鏍规嵁婧愬崟绫诲瀷閫夋嫨鍗曟嵁
+            toBillSelector() {
+                this.$refs['billList'].showPopup()
+            },
+            // 鏄剧ず涓嶈壇鍘熷洜寮圭獥 (璋冪敤鏂瑰紡鍜屽師鏈夊脊绐楄皟鐢ㄦ柟寮忎笉鍚�)
+            async showSelectorModule_BadReason(itemIndex, Moduleindex) {
+                this.enablePopupModule = this.PopupModuleNameList[Moduleindex];
+                console.log("this.$refs: ", this.$refs);
+                await this.$nextTick();
+                this.$refs.listPopup.showPopup(itemIndex);
+            },
+            async HandleBillSelectComplete(e) {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
+                        data: {
+                            HBillType: this.hform.HBillType,
+                            HSourceBillType: this.hform.HSourceBillType,
+                            HBarCode: "",
+                            HInterID: e?.HInterID,
+                            HEntryID: e?.HEntryID,
+                            Mode: 2 //閫夊崟妯″紡
+                        }
+                    })
 
-						if (count != 1) {
-							CommonUtils.showTips({
-								title: "娓╅Θ鎻愮ず",
-								message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${Message}`,
-							});
-							return;
-						}
+                    console.log(res)
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data
+                    if (count == 1) {
+                        this.hform.HMaterID = data[0]['HMaterID']
+                        this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
+                        this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
+                        this.hform.HMainSourceBillNo = data[0]['HBillNo']
+                        this.hform.HSourceBillNo = data[0]['HBillNo']
+                        this.hform.HMainSourceInterID = data[0].HInterID
+                        this.hform.HMainSourceEntryID = data[0].HEntryID
+                        this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
+                        this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D
+                        this.hform.HProcID = data[0]['HProcID']
+                        this.hform.HProcName = data[0]['褰撳墠宸ュ簭']
+                        this.hasSourceBill = true
+                        this.get_CheckItem();
+                        this.$refs['billList'].exit()
+                    } else {
+                        CommonUtils.showTips({
+                            title: '娓╅Θ鎻愮ず',
+                            message: Message
+                        })
+                    }
 
-						this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-						this.hform.HQCSchemeID = data[0].hmainid;
+                    if (
+                        (uni.getStorageSync("OrganizationID") == "7667152" &&
+                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                        (uni.getStorageSync("OrganizationID") == "100199" &&
+                            uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                    ) {
+                        await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: "婧愬崟涓嬫帹閿欒: " + err
+                    })
+                }
 
-						this.get_CheckItem();
-					} catch (err) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${err}`,
-						});
-					}
-				}
-			},
-			//#region 涓�鑷�
-			async LoadingInformation_ProcExchange(HBarCode) {
-				// 宸ュ簭娴佽浆鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/CheckBill/get_ProcessExchangeBill_ByBillNo",
-						data: {
-							HBillNo: HBarCode,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+            },
+            // 妫�楠屽�� 璁$畻鏄惁鍚堟牸
+            calcHResult(item) {
+                // 闈炴娊妫�鏉′欢涓嬪垽鏂粨璁�
+                console.log('item: ', item);
+                if (item.HSampleSchemeID) {
+                    return
+                }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                if (item.HInspectValQ >= item.HDownLimit && item.HInspectValQ <= item.HUpLimit) {
+                    this.checkItems[item.num].HResult = true
+                    return
+                }
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
-					this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					this.hform.HProcExchInterID = data[0].HProcExchInterID;
-					this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0;
-					this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
-					this.hform.HICMOInterID = data[0].HICMOInterID;
-					this.hform.HICMOQty = data[0].HICMOQty || 0;
-					this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
-					this.hform.HSourceID = data[0].HSourceID || 0;
-					this.hform.HMaterID = data[0].HMaterID;
-					this.hform.HMaterName = data[0].浜у搧鍚嶇О;
-					this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HMainSourceBillType = data[0].HBillType;
-					this.hform.HMainSourceInterID = data[0].HInterID;
-					this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
-					this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-					this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-					this.hform.HBatchNo = data[0].鎵瑰彿;
+                this.checkItems[item.num].HResult = false
+            },
+            // 婧愬崟绫诲瀷閫夋嫨
+            HSourceBillTypeNameChange(e) {
+                this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value];
+                this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
+                this.hform.HMainSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
+            },
+            toScanCode() {
+                MpaasScan.scanCode((res) => {
+                    if (res) {
+                        this.getSourceBillInfo(HBarCode);
+                    }
+                });
+            },
+            async getSourceBillInfo(HBarCode) {
+                console.log('HBarCode: ', HBarCode);
 
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			
-			//#region 淇敼
-			async LoadingInformation_ICMO(HBarCode) {
-				// 鐢熶骇璁㈠崟
-				try {
-					let sWhere="and 鍗曟嵁鍙�='"+HBarCode+"'"
-					console.log(sWhere)
-					let res = await CommonUtils.doRequest2Async({
-						url: "/LEMS/MES_IF_ICMOBillList_Json",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                // 璋冪敤閫氱敤 涓嬫帹鍑芥暟
+                let res = await CommonUtils.doRequest2Async({
+                    url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
+                    data: {
+                        HBillType: this.hform.HBillType,
+                        HSourceBillType: this.hform.HSourceBillType,
+                        HBarCode: HBarCode,
+                        HInterID: 0,
+                        HEntryID: 0,
+                        Mode: 1 //鎵爜妯″紡
+                    }
+                })
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                console.log(res)
+                let {
+                    data,
+                    Message,
+                    count
+                } = res.data
+                if (count == 1) {
+                    console.log('data: ', data);
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${Message}`,
-						});
-						return;
-					}
-					//鐢熶骇鏀�
-					//this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					//this.hform.HProcExchInterID = data[0].HProcExchInterID;
-					//this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
-					//this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					this.hform.HICMOBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HICMOInterID = data[0].hmainid;
-					this.hform.HICMOQty = data[0].鐢熶骇浠诲姟鍗曟暟閲�;
-					this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
-					this.hform.HSourceID = data[0].HSourceID;
-					this.hform.HMaterID = data[0].HMaterID;
-					this.hform.HMaterNumber=data[0].浜у搧浠g爜
-					this.hform.HMaterName = data[0].浜у搧鍚嶇О;
-					this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					this.hform.HMainSourceBillType = data[0].鍗曟嵁绫诲瀷;
-					this.hform.HMainSourceInterID = data[0].HInterID;
-					this.hform.HICMOEntryID = data[0].HEntryID || 1;
-					this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-					this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			
-			//#region 涓�鑷�
-			async LoadingInformation_StationEntrustOutBill(HBarCode) {
-				// 宸ュ簭濮斿鎺ユ敹鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Cj_StationEntrustOutBill/list",
-						data: {
-							sWhere: ` and HBillNo = '${HBarCode}'`,
-						},
-					});
+                    this.hform.HMaterID = data[0]['HMaterID']
+                    this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
+                    this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
+                    this.hform.HMainSourceBillNo = data[0]['HBillNo']
+                    this.hform.HSourceBillNo = data[0]['HBillNo']
+                    this.hform.HMainSourceInterID = data[0].HInterID
+                    this.hform.HMainSourceEntryID = data[0].HEntryID
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D
+                    this.hform.HProcID = data[0]['HProcID']
+                    this.hform.HProcName = data[0]['褰撳墠宸ュ簭']
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } else {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: Message
+                    })
+                }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                if (
+                    (uni.getStorageSync("OrganizationID") == "7667152" &&
+                        uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                    (uni.getStorageSync("OrganizationID") == "100199" &&
+                        uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                ) {
+                    await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                }
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
+                // 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
+                // if (this.hform.HSourceBillType == 3711) {
+                // 	// 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
+                // 	await this.LoadingInformation_ICMOReportBill(HBarCode);
+                // 	if (
+                // 		(uni.getStorageSync("OrganizationID") == "7667152" &&
+                // 			uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                // 		(uni.getStorageSync("OrganizationID") == "100199" &&
+                // 			uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                // 	) {
+                // 		await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                // 	}
+                // 	return;
+                // }
+                // if (this.hform.HSourceBillType == 3790) {
+                // 	// 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
+                // 	await this.LoadingInformation_StationInBill(HBarCode);
+                // 	if (
+                // 		(uni.getStorageSync("OrganizationID") == "7667152" &&
+                // 			uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+                // 		(uni.getStorageSync("OrganizationID") == "100199" &&
+                // 			uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+                // 	) {
+                // 		await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+                // 	}
+                // 	return;
+                // }
 
-					HProcExchBillNo = data[0].娴佽浆鍗″彿;
-					HProcExchInterID = data[0].HProcExchInterID;
-					HProcExchEntryID = data[0].HProcExchEntryID;
-					HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
-					HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
-					HICMOInterID = data[0].HICMOInterID;
-					HICMOQty = data[0].HICMOQty;
-					HSourceName = data[0].鐢熶骇璧勬簮;
-					HSourceID = data[0].HSourceID;
-					HMaterID = data[0].HMaterID;
-					HMaterName = data[0].浜у搧鍚嶇О;
-					HMainSourceBillNo = data[0].鍗曟嵁鍙�;
-					HMainSourceBillType = data[0].HBillType;
-					HMainSourceInterID = data[0].hmainid;
-					HICMOEntryID = data[0].HICMOEntryID || 1;
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			//#endregion
-			
-			async LoadingInformation_ICMOReportBill(HBarCode) {
-				// 鐢熶骇姹囨姤鍗�
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_LastPieceCheckBill/get_ICMOReportBill_Tmp_getByBillNo",
-						data: {
-							HBillNo: HBarCode,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+            },
+            async GetCheckItemID() {
+                if (!this.hform.HMaterName && !this.hform.HProcName) {
+                    try {
+                        let res = await CommonUtils.doRequest2Async({
+                            url: "/Web/GetCheckItemID",
+                            data: {
+                                HName: this.hform.HMaterName,
+                                HProName: this.hform.HProcName,
+                                HSourceID: this.hform.HSourceID,
+                            },
+                        });
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
+                        let {
+                            count,
+                            Message,
+                            data
+                        } = res.data;
 
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鐢熶骇姹囨姤鍗� 閿欒: ${Message}`,
-						});
-						return;
-					}
-					//change_inlife
-					this.hform.HMainSourceEntryID=data[0].HEntryID||1;
-					this.hform.HMaterNumber=data[0].HMaterNumber;
-					this.hform.HICMOBillNo = data[0].HICMOBillNo;
-					this.hform.HICMOInterID = data[0].HICMOInterID;
-					this.hform.HICMOQty = data[0].HICMOQty;
-					this.hform.HSourceName = data[0].HSourceName;
-					this.hform.HSourceID = data[0].HSourceID;
-					this.hform.HMaterID = data[0].HMaterID;
-					this.hform.HMaterName = data[0].HMaterName;
-					this.hform.HMainSourceBillNo = data[0].HBillNo;
-					this.hform.HMainSourceBillType = data[0].HBillType;
-					this.hform.HMainSourceInterID = data[0].HInterID;
-					this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
-					this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
-					this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
-					
+                        if (count != 1) {
+                            CommonUtils.showTips({
+                                title: "娓╅Θ鎻愮ず",
+                                message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${Message}`,
+                            });
+                            return;
+                        }
 
-					for (let i = 0; i < data.length; i++) {
-						this.addCheckItem(data[i])
-					}
+                        this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                        this.hform.HQCSchemeID = data[0].hmainid;
 
-					this.hasSourceBill = true
-					this.get_CheckItem();
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鐢熶骇姹囨姤鍗� 閿欒: ${err}`,
-					});
-				}
-			},
-			// 妫�楠屽憳鍒濆鍖�
-			async InitHEmp() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_Employee/list",
-						data: {
-							sWhere: `  and 缁勭粐鍚嶇О = '${uni.getStorageSync(
+                        this.get_CheckItem();
+                    } catch (err) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${err}`,
+                        });
+                    }
+                }
+            },
+            //#region 涓�鑷�
+            async LoadingInformation_ProcExchange(HBarCode) {
+                // 宸ュ簭娴佽浆鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/CheckBill/get_ProcessExchangeBill_ByBillNo",
+                        data: {
+                            HBillNo: HBarCode,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    this.hform.HProcExchInterID = data[0].HProcExchInterID;
+                    this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0;
+                    this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
+                    this.hform.HICMOInterID = data[0].HICMOInterID;
+                    this.hform.HICMOQty = data[0].HICMOQty || 0;
+                    this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+                    this.hform.HSourceID = data[0].HSourceID || 0;
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+                    this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HMainSourceBillType = data[0].HBillType;
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+                    this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+                    this.hform.HBatchNo = data[0].鎵瑰彿;
+
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
+
+            //#region 淇敼
+            async LoadingInformation_ICMO(HBarCode) {
+                // 鐢熶骇璁㈠崟
+                try {
+                    let sWhere = "and 鍗曟嵁鍙�='" + HBarCode + "'"
+                    console.log(sWhere)
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/LEMS/MES_IF_ICMOBillList_Json",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    //鐢熶骇鏀�
+                    //this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    //this.hform.HProcExchInterID = data[0].HProcExchInterID;
+                    //this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
+                    //this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    this.hform.HICMOBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HICMOInterID = data[0].hmainid;
+                    this.hform.HICMOQty = data[0].鐢熶骇浠诲姟鍗曟暟閲�;
+                    this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+                    this.hform.HSourceID = data[0].HSourceID;
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterNumber = data[0].浜у搧浠g爜
+                    this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+                    this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    this.hform.HMainSourceBillType = data[0].鍗曟嵁绫诲瀷;
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HICMOEntryID = data[0].HEntryID || 1;
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+                    this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
+
+            //#region 涓�鑷�
+            async LoadingInformation_StationEntrustOutBill(HBarCode) {
+                // 宸ュ簭濮斿鎺ユ敹鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Cj_StationEntrustOutBill/list",
+                        data: {
+                            sWhere: ` and HBillNo = '${HBarCode}'`,
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+
+                    HProcExchBillNo = data[0].娴佽浆鍗″彿;
+                    HProcExchInterID = data[0].HProcExchInterID;
+                    HProcExchEntryID = data[0].HProcExchEntryID;
+                    HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
+                    HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
+                    HICMOInterID = data[0].HICMOInterID;
+                    HICMOQty = data[0].HICMOQty;
+                    HSourceName = data[0].鐢熶骇璧勬簮;
+                    HSourceID = data[0].HSourceID;
+                    HMaterID = data[0].HMaterID;
+                    HMaterName = data[0].浜у搧鍚嶇О;
+                    HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+                    HMainSourceBillType = data[0].HBillType;
+                    HMainSourceInterID = data[0].hmainid;
+                    HICMOEntryID = data[0].HICMOEntryID || 1;
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            //#endregion
+
+            async LoadingInformation_ICMOReportBill(HBarCode) {
+                // 鐢熶骇姹囨姤鍗�
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/QC_LastPieceCheckBill/get_ICMOReportBill_Tmp_getByBillNo",
+                        data: {
+                            HBillNo: HBarCode,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
+
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鐢熶骇姹囨姤鍗� 閿欒: ${Message}`,
+                        });
+                        return;
+                    }
+                    //change_inlife
+                    this.hform.HMainSourceEntryID = data[0].HEntryID || 1;
+                    this.hform.HMaterNumber = data[0].HMaterNumber;
+                    this.hform.HICMOBillNo = data[0].HICMOBillNo;
+                    this.hform.HICMOInterID = data[0].HICMOInterID;
+                    this.hform.HICMOQty = data[0].HICMOQty;
+                    this.hform.HSourceName = data[0].HSourceName;
+                    this.hform.HSourceID = data[0].HSourceID;
+                    this.hform.HMaterID = data[0].HMaterID;
+                    this.hform.HMaterName = data[0].HMaterName;
+                    this.hform.HMainSourceBillNo = data[0].HBillNo;
+                    this.hform.HMainSourceBillType = data[0].HBillType;
+                    this.hform.HMainSourceInterID = data[0].HInterID;
+                    this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
+                    this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+                    this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+
+
+                    for (let i = 0; i < data.length; i++) {
+                        this.addCheckItem(data[i])
+                    }
+
+                    this.hasSourceBill = true
+                    this.get_CheckItem();
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鐢熶骇姹囨姤鍗� 閿欒: ${err}`,
+                    });
+                }
+            },
+            // 妫�楠屽憳鍒濆鍖�
+            async InitHEmp() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_Employee/list",
+                        data: {
+                            sWhere: `  and 缁勭粐鍚嶇О = '${uni.getStorageSync(
               "Organization"
             )}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
-							user: getUserInfo()["Czymc"],
-							Organization: uni.getStorageSync("Organization"),
-						},
-					});
+                            user: getUserInfo()["Czymc"],
+                            Organization: uni.getStorageSync("Organization"),
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("data: ", data);
-						this.GyFirstCheckEmpList = data;
-						this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
-					});
-				}
-			},
-			async HFirstCheckEmpChange(e) {
-				console.log("閫変腑妫�楠屽憳: ", e);
-				let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["鑱屽憳鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HFirstCheckEmp = 0;
-					this.hform.HFirstCheckEmpName = "";
-					return;
-				}
+                    if (count == 1) {
+                        console.log("data: ", data);
+                        this.GyFirstCheckEmpList = data;
+                        this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
+                    });
+                }
+            },
+            async HFirstCheckEmpChange(e) {
+                console.log("閫変腑妫�楠屽憳: ", e);
+                let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["鑱屽憳鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HFirstCheckEmp = 0;
+                    this.hform.HFirstCheckEmpName = "";
+                    return;
+                }
 
-				this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"];
-				this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
-			},
-			// 鐢熶骇鐝鍒濆鍖�
-			async InitHWorkShift() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
-						data: {
-							sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'')  != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
+                this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"];
+                this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
+            },
+            // 鐢熶骇鐝鍒濆鍖�
+            async InitHWorkShift() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
+                        data: {
+                            sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'')  != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
               "Organization"
             )}'`,
-							HMaker: getUserInfo()["Czymc"],
-						},
-					});
+                            HMaker: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("data: ", data);
-						this.GyWorkShiftList = data;
-						this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
-					});
-				}
-			},
-			async HWorkShiftChange(e) {
-				console.log("閫変腑鐝: ", e);
-				let index = this.GyWorkShiftList.findIndex((elem) => elem["鐝鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HWorkShiftID = 0;
-					this.hform.HWorkShiftName = "";
-					return;
-				}
+                    if (count == 1) {
+                        console.log("data: ", data);
+                        this.GyWorkShiftList = data;
+                        this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
+                    });
+                }
+            },
+            async HWorkShiftChange(e) {
+                console.log("閫変腑鐝: ", e);
+                let index = this.GyWorkShiftList.findIndex((elem) => elem["鐝鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HWorkShiftID = 0;
+                    this.hform.HWorkShiftName = "";
+                    return;
+                }
 
-				this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"];
-				this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
-			},
-			// 鐢熶骇璧勬簮鏇存柊
-			// 鐢熶骇璧勬簮鍒濆鍖�
-			async InitHSource() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Gy_Source/list",
-						data: {
-							sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and HUSEORGID = '100038'`,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"];
+                this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
+            },
+            // 鐢熶骇璧勬簮鏇存柊
+            // 鐢熶骇璧勬簮鍒濆鍖�
+            async InitHSource() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Gy_Source/list",
+                        data: {
+                            sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and HUSEORGID = '100038'`,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
 
-					if (count == 1) {
-						this.GySourceList = data;
-						this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
-					});
-				}
-			},
-			// 鐢熶骇璧勬簮鏇存柊
-			async HSourceChange(e) {
-				console.log("閫変腑鐢熶骇璧勬簮: ", e);
-				let index = this.GySourceList.findIndex((elem) => elem["鐢熶骇璧勬簮鍚嶇О"] == e);
-				if (index == -1) {
-					this.hform.HSourceID = 0;
-					this.hform.HSourceName = "";
-					return;
-				}
+                    if (count == 1) {
+                        this.GySourceList = data;
+                        this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
+                    });
+                }
+            },
+            // 鐢熶骇璧勬簮鏇存柊
+            async HSourceChange(e) {
+                console.log("閫変腑鐢熶骇璧勬簮: ", e);
+                let index = this.GySourceList.findIndex((elem) => elem["鐢熶骇璧勬簮鍚嶇О"] == e);
+                if (index == -1) {
+                    this.hform.HSourceID = 0;
+                    this.hform.HSourceName = "";
+                    return;
+                }
 
-				this.hform.HSourceID = this.GySourceList[index]["HItemID"];
-				this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"];
+                this.hform.HSourceID = this.GySourceList[index]["HItemID"];
+                this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"];
 
-				this.get_ICMOBillStatusList();
-				this.get_QC_TakeSampleCheckBillList();
-				this.GetCheckItemID();
-			},
-			// 鏄剧ず寮圭獥
-			async showSelectorModule(item, index) {
-				this.currentChechItemIDCache = item.num || 0; // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
-				this.enablePopupModule = this.PopupModuleNameList[index];
-				console.log("this.$refs: ", this.$refs);
-				await this.$nextTick();
-				if (index == 7) {
-					// 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
-					this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
-				}
+                this.get_ICMOBillStatusList();
+                this.get_QC_TakeSampleCheckBillList();
+                this.GetCheckItemID();
+            },
+            // 鏄剧ず寮圭獥
+            async showSelectorModule(item, index) {
+                this.currentChechItemIDCache = item.num || 0; // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
+                this.enablePopupModule = this.PopupModuleNameList[index];
+                console.log("this.$refs: ", this.$refs);
+                await this.$nextTick();
+                if (index == 7) {
+                    // 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
+                    this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
+                }
 
-				this.$refs.listPopup.showPopup();
-			},
-			getAnalysisMethodDisplay(val) {
-				console.log("AnalysisMethodVal: ", val);
-				if (val) {
-					return this.arrayAnalysisMethod.find((e) => e.value == val).name;
-				}
-				return "";
-			},
-			checkResultChange(event) {
-				console.log("event: ", event);
-			},
-			// 妫�楠岄」鐩柊澧炶
-			addCheckItem(resource) {
-				let ordinal = this.getObjLength(this.checkItems) + 1;
-				let checkItem = {
-					num: ordinal,
-					HInterID: this.hform.HInterID,
-					HQCCheckItemID: "",
-					HQCCheckItemNumber: "",
-					HQCCheckItemName: "",
-					HInspectInstruMentID: "0",
-					HInspectInstruMentNumber: "",
-					HInspectInstruMentName: "",
-					HQCStd: "",
-					HUnit: "",
-					HQCNote: "",
-					HAnalysisMethod: "",
-					HResult: 1,
-					HMax: "",
-					HMin: "",
-					HAvg: "",
-					HRemark: "",
-					HKeyInspect: false,
-					HStatus: 1,
-					HSampleSchemeID: "",
-					HUnitID: 0,
-					HInspectVal: "",
-					HTargetVal: "",
-					HUpLimit: "",
-					HDownLimit: "",
-					HUpOffSet: "",
-					HDownOffSet: "",
-					HSampleDamageQty: 0,
-					HSampleSchemeName: "",
-					HSampleQty: 0,
-					HAcceptQty: 0,
-					HInspectionLevel: "",
-					HRejectQty: 0,
-					HStrictness: "",
-					HSampleUnRightQty: 0,
-					HAQL: "",
-					HSamplingType: "",
-					HInspectResultToSee: "",
-				};
-				if (resource) {
-					// 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
-					Object.assign(checkItem, resource);
-				}
-				this.$set(this.checkItems, ordinal, checkItem);
-				this.$nextTick(() => {
-					// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
-					this.setInspectValModule(this.checkItems[ordinal]);
-				});
-			},
-			// 妫�楠岄」鐩垹闄よ
-			removeCheckItem(item) {
-				uni.showModal({
-					title: "娓╅Θ鎻愮ず",
-					content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
-					success: (res) => {
-						if (res.confirm) {
-							this.$delete(this.checkItems, item.num);
-							this.$delete(this.subTabs, `_${item.num}`);
-							this.$forceUpdate();
-							this.refreshCheckItemNum();
-						}
-					},
-				});
-			},
-			async refreshCheckItemNum() {
-				await this.$nextTick();
-				// 閲嶆帓搴忓彿
-				let num = 1;
-				let checkItemsCache = {};
-				for (let s in this.checkItems) {
-					checkItemsCache[num] = this.checkItems[s];
-					checkItemsCache[num].num = num;
-					num++;
-				}
-				this.checkItems = checkItemsCache;
-			},
-			getObjLength(obj) {
-				return Object.keys(obj).length;
-			},
-			// 缁撹淇敼
-			HResultChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
+                this.$refs.listPopup.showPopup();
+            },
+            getAnalysisMethodDisplay(val) {
+                console.log("AnalysisMethodVal: ", val);
+                if (val) {
+                    return this.arrayAnalysisMethod.find((e) => e.value == val).name;
+                }
+                return "";
+            },
+            checkResultChange(event) {
+                console.log("event: ", event);
+            },
+            // 妫�楠岄」鐩柊澧炶
+            addCheckItem(resource) {
+                let ordinal = this.getObjLength(this.checkItems) + 1;
+                let checkItem = {
+                    num: ordinal,
+                    HInterID: this.hform.HInterID,
+                    HQCCheckItemID: "",
+                    HQCCheckItemNumber: "",
+                    HQCCheckItemName: "",
+                    HInspectInstruMentID: "0",
+                    HInspectInstruMentNumber: "",
+                    HInspectInstruMentName: "",
+                    HQCStd: "",
+                    HUnit: "",
+                    HQCNote: "",
+                    HAnalysisMethod: "",
+                    HResult: 1,
+                    HMax: "",
+                    HMin: "",
+                    HAvg: "",
+                    HRemark: "",
+                    HKeyInspect: false,
+                    HStatus: 1,
+                    HSampleSchemeID: "",
+                    HUnitID: 0,
+                    HInspectVal: "",
+                    HTargetVal: "",
+                    HUpLimit: "",
+                    HDownLimit: "",
+                    HUpOffSet: "",
+                    HDownOffSet: "",
+                    HSampleDamageQty: 0,
+                    HSampleSchemeName: "",
+                    HSampleQty: 0,
+                    HAcceptQty: 0,
+                    HInspectionLevel: "",
+                    HRejectQty: 0,
+                    HStrictness: "",
+                    HSampleUnRightQty: 0,
+                    HAQL: "",
+                    HSamplingType: "",
+                    HInspectResultToSee: "",
+                };
+                if (resource) {
+                    // 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
+                    Object.assign(checkItem, resource);
+                }
+                this.$set(this.checkItems, ordinal, checkItem);
+                this.$nextTick(() => {
+                    // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+                    this.setInspectValModule(this.checkItems[ordinal]);
+                });
+            },
+            // 妫�楠岄」鐩垹闄よ
+            removeCheckItem(item) {
+                uni.showModal({
+                    title: "娓╅Θ鎻愮ず",
+                    content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
+                    success: (res) => {
+                        if (res.confirm) {
+                            this.$delete(this.checkItems, item.num);
+                            this.$delete(this.subTabs, `_${item.num}`);
+                            this.$forceUpdate();
+                            this.refreshCheckItemNum();
+                        }
+                    },
+                });
+            },
+            async refreshCheckItemNum() {
+                await this.$nextTick();
+                // 閲嶆帓搴忓彿
+                let num = 1;
+                let checkItemsCache = {};
+                for (let s in this.checkItems) {
+                    checkItemsCache[num] = this.checkItems[s];
+                    checkItemsCache[num].num = num;
+                    num++;
+                }
+                this.checkItems = checkItemsCache;
+            },
+            getObjLength(obj) {
+                return Object.keys(obj).length;
+            },
+            // 缁撹淇敼
+            HResultChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
 
-				this.HCheckLastResult();
-			},
-			// 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
-			HCheckLastResult() {
-				let unPassNum = 0;
-				for (var key in this.checkItems) {
-					if (!(this.checkItems[key]["HResult"] == 1)) {
-						unPassNum++;
-					}
-				}
+                this.HCheckLastResult();
+            },
+            // 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
+            HCheckLastResult() {
+                let unPassNum = 0;
+                for (var key in this.checkItems) {
+                    if (!(this.checkItems[key]["HResult"] == 1)) {
+                        unPassNum++;
+                    }
+                }
 
-				if (unPassNum > 0) {
-					this.hform.HLastResult = false;
-					return;
-				}
-				this.hform.HLastResult = true;
-			},
-			// 妫�楠屾柟妗堜慨鏀�
-			HAnalysisMethodChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][
-					"value"
-				];
+                if (unPassNum > 0) {
+                    this.hform.HLastResult = false;
+                    return;
+                }
+                this.hform.HLastResult = true;
+            },
+            // 妫�楠屾柟妗堜慨鏀�
+            HAnalysisMethodChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][
+                    "value"
+                ];
 
-				// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
-				this.setInspectValModule(this.checkItems[id]);
-			},
-			// 閲嶇偣妫�鏌ヤ慨鏀�
-			HKeyInspectChange(id, e) {
-				console.log("e: ", e);
-				this.checkItems[id]["HKeyInspect"] = e.detail.value;
-			},
-			// 妫�楠岄」鐩繑鍥�
-			async CheckItemComplete(e) {
-				console.log("CheckItemRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HQCCheckItemID: data["HItemID"],
-						HQCCheckItemNumber: data["浠g爜"],
-						HQCCheckItemName: data["鍚嶇О"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屾柟妗堣繑鍥�
-			async SampleSchemeComplete(e) {
-				console.log("SampleSchemeRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HSampleSchemeID: data["hmainid"],
-						HSampleSchemeNumber: data["鎶芥牱鏂规浠g爜"],
-						HSampleSchemeName: data["鎶芥牱鏂规鍚嶇О"],
-						HSampleQty: data["鏍锋湰閲�"] || 0,
-						HAcceptQty: data["鍏佽鏁�"] || 0,
-						HInspectionLevel: data["妫�楠屾按骞�"],
-						HRejectQty: data["鎷掔粷鏁�"] || 0,
-						HStrictness: data["涓ユ牸搴�"],
-						HSampleUnRightQty: data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
-						HAQL: data["AQL"],
-						HSamplingType: data["鎶芥牱绫诲瀷"],
-						HInspectResultToSee: data["妫�楠岀粨鏋�"],
-						HUpLimit: data["涓婇檺鍊�"] || 0,
-						HDownLimit: data["涓嬮檺鍊�"] || 0,
-						HSampleDamageQty: data["鏍锋湰鐮村潖鏁�"] || 0,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					this.setInspectValModule(this.checkItems[key]);
+                // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+                this.setInspectValModule(this.checkItems[id]);
+            },
+            // 閲嶇偣妫�鏌ヤ慨鏀�
+            HKeyInspectChange(id, e) {
+                console.log("e: ", e);
+                this.checkItems[id]["HKeyInspect"] = e.detail.value;
+            },
+            // 妫�楠岄」鐩繑鍥�
+            async CheckItemComplete(e) {
+                console.log("CheckItemRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HQCCheckItemID: data["HItemID"],
+                        HQCCheckItemNumber: data["浠g爜"],
+                        HQCCheckItemName: data["鍚嶇О"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屾柟妗堣繑鍥�
+            async SampleSchemeComplete(e) {
+                console.log("SampleSchemeRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HSampleSchemeID: data["hmainid"],
+                        HSampleSchemeNumber: data["鎶芥牱鏂规浠g爜"],
+                        HSampleSchemeName: data["鎶芥牱鏂规鍚嶇О"],
+                        HSampleQty: data["鏍锋湰閲�"] || 0,
+                        HAcceptQty: data["鍏佽鏁�"] || 0,
+                        HInspectionLevel: data["妫�楠屾按骞�"],
+                        HRejectQty: data["鎷掔粷鏁�"] || 0,
+                        HStrictness: data["涓ユ牸搴�"],
+                        HSampleUnRightQty: data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
+                        HAQL: data["AQL"],
+                        HSamplingType: data["鎶芥牱绫诲瀷"],
+                        HInspectResultToSee: data["妫�楠岀粨鏋�"],
+                        HUpLimit: data["涓婇檺鍊�"] || 0,
+                        HDownLimit: data["涓嬮檺鍊�"] || 0,
+                        HSampleDamageQty: data["鏍锋湰鐮村潖鏁�"] || 0,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    this.setInspectValModule(this.checkItems[key]);
 
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屼华鍣ㄨ繑鍥�
-			async InspectMentComplete(e) {
-				console.log("InspectInstruMentRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.checkItems[key], {
-						HInspectInstruMentID: data["HItemID"],
-						HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
-						HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 浜у搧浠g爜杩斿洖
-			async MaterComplete(e) {
-				console.log("MaterRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HMaterNumber: data["鐗╂枡浠g爜"],
-						HMaterName: data["鐗╂枡鍚嶇О"],
-						HMaterID: data["HItemID"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-					this.GetCheckItemID();
-				}
-			},
-			// 浠诲姟鍗曡繑鍥�
-			async ICMOBillComplete(e) {
-				console.log("ICMOBillRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HICMOInterID: data.hmainid,
-						HICMOEntryID: data.HEntryID || 1,
-						HICMOBillNo: data.鍗曟嵁鍙�,
-						HMaterNumber: data.浜у搧浠g爜,
-						HMaterName: data.浜у搧鍚嶇О,
-						HMaterID: data.HMaterID,
-						HICMOQty: data.鐢熶骇浠诲姟鍗曟暟閲�,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 娴佽浆鍗¤繑鍥�
-			async ProcExchBillComplete(e) {
-				console.log("ProcExchBillRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HProcExchInterID: data.hmainid,
-						HProcExchEntryID: data.hsubid,
-						HProcExchBillNo: data.鍗曟嵁鍙�,
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 妫�楠屾柟妗�(涓昏〃)杩斿洖
-			async HQCSchemeComplete(e) {
-				console.log("HQCSchemeRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HQCSchemeID: data.hmainid,
-						HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
-					});
-					await this.get_CheckItem();
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-				}
-			},
-			// 宸ュ簭杩斿洖
-			async HProcComplete(e) {
-				console.log(" HProcRet: ", e);
-				for (var key in e["retVal"]) {
-					let data = e["retVal"][key];
-					Object.assign(this.hform, {
-						HProcName: data["宸ュ簭鍚嶇О"],
-						HProcID: data["HItemID"],
-					});
-					await this.$nextTick();
-					this.$refs.listPopup.exit();
-					// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
-					await this.$nextTick();
-					this.enablePopupModule = this.PopupModuleNameList[0];
-					await this.GetCheckItemID();
-					await this.get_ICMOBillStatusList();
-					await this.get_QC_TakeSampleCheckBillList();
-				}
-			},
-			
-			//
-			async get_QC_TakeSampleCheckBillList() {
-				// 鍙栨牱鍗曟煡璇�
-				let HProcID = this.hform.HProcID;
-				let HProcExchInterId = this.hform.HProcExchInterID;
-				let sWhere = "";
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屼华鍣ㄨ繑鍥�
+            async InspectMentComplete(e) {
+                console.log("InspectInstruMentRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.checkItems[key], {
+                        HInspectInstruMentID: data["HItemID"],
+                        HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
+                        HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 浜у搧浠g爜杩斿洖
+            async MaterComplete(e) {
+                console.log("MaterRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HMaterNumber: data["鐗╂枡浠g爜"],
+                        HMaterName: data["鐗╂枡鍚嶇О"],
+                        HMaterID: data["HItemID"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                    this.GetCheckItemID();
+                }
+            },
+            // 浠诲姟鍗曡繑鍥�
+            async ICMOBillComplete(e) {
+                console.log("ICMOBillRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HICMOInterID: data.hmainid,
+                        HICMOEntryID: data.HEntryID || 1,
+                        HICMOBillNo: data.鍗曟嵁鍙�,
+                        HMaterNumber: data.浜у搧浠g爜,
+                        HMaterName: data.浜у搧鍚嶇О,
+                        HMaterID: data.HMaterID,
+                        HICMOQty: data.鐢熶骇浠诲姟鍗曟暟閲�,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 娴佽浆鍗¤繑鍥�
+            async ProcExchBillComplete(e) {
+                console.log("ProcExchBillRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HProcExchInterID: data.hmainid,
+                        HProcExchEntryID: data.hsubid,
+                        HProcExchBillNo: data.鍗曟嵁鍙�,
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 妫�楠屾柟妗�(涓昏〃)杩斿洖
+            async HQCSchemeComplete(e) {
+                console.log("HQCSchemeRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HQCSchemeID: data.hmainid,
+                        HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
+                    });
+                    await this.get_CheckItem();
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                }
+            },
+            // 宸ュ簭杩斿洖
+            async HProcComplete(e) {
+                console.log(" HProcRet: ", e);
+                for (var key in e["retVal"]) {
+                    let data = e["retVal"][key];
+                    Object.assign(this.hform, {
+                        HProcName: data["宸ュ簭鍚嶇О"],
+                        HProcID: data["HItemID"],
+                    });
+                    await this.$nextTick();
+                    this.$refs.listPopup.exit();
+                    // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+                    await this.$nextTick();
+                    this.enablePopupModule = this.PopupModuleNameList[0];
+                    await this.GetCheckItemID();
+                    await this.get_ICMOBillStatusList();
+                    await this.get_QC_TakeSampleCheckBillList();
+                }
+            },
+            // 涓嶈壇鍘熷洜鍥炶皟
+            async HBadReasonComplete(e) {
+                console.log('e: ', e);
+                Object.assign(this.badReasons[e.index], {
+                    HBadReasonName: e.retVal[0]['涓嶈壇鍘熷洜鍚嶇О'],
+                    HBadReasonNumber: e.retVal[0]['涓嶈壇鍘熷洜浠g爜'],
+                    HBadReasonID: e.retVal[0]['HItemID']
+                })
 
-				if (HProcID == "0" || HProcID == "") {
-					CommonUtils.showTips({
-						message: "璇烽�夋嫨宸ュ簭",
-					});
-					return;
-				}
+                this.$refs['listPopup'].exit()
 
-				sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
+            },
+            //
+            async get_QC_TakeSampleCheckBillList() {
+                // 鍙栨牱鍗曟煡璇�
+                let HProcID = this.hform.HProcID;
+                let HProcExchInterId = this.hform.HProcExchInterID;
+                let sWhere = "";
 
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                if (HProcID == "0" || HProcID == "") {
+                    CommonUtils.showTips({
+                        message: "璇烽�夋嫨宸ュ簭",
+                    });
+                    return;
+                }
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${Message}`,
-						});
-					}
+                sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
 
-					this.hform.HTakeSampleCheckBillID = data[0]["hmainid"];
-					this.hform.HTakeSampleCheckBillNo = data[0]["鍗曟嵁鍙�"];
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${err}`,
-					});
-				}
-			},
-			async get_ICMOBillStatusList() {
-				let sWhere = "";
-				let HProcID = this.hform.HProcID;
-				let HSourceID = this.hform.HSourceID;
-				let HProcExchInterId = this.hform.HProcExchInterID;
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-				if (HProcID != "0") {
-					sWhere += " and HProcID=" + HProcID;
-				}
-				if (HSourceID != "0") {
-					sWhere += " and HSourceID=" + HSourceID;
-				}
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${Message}`,
+                        });
+                    }
 
-				sWhere += " and HSourceInterID=" + HProcExchInterID;
+                    this.hform.HTakeSampleCheckBillID = data[0]["hmainid"];
+                    this.hform.HTakeSampleCheckBillNo = data[0]["鍗曟嵁鍙�"];
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${err}`,
+                    });
+                }
+            },
+            async get_ICMOBillStatusList() {
+                let sWhere = "";
+                let HProcID = this.hform.HProcID;
+                let HSourceID = this.hform.HSourceID;
+                let HProcExchInterId = this.hform.HProcExchInterID;
 
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/CheckBill/GetICMOBillStatusList",
-						data: {
-							sWhere: sWhere,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                if (HProcID != "0") {
+                    sWhere += " and HProcID=" + HProcID;
+                }
+                if (HSourceID != "0") {
+                    sWhere += " and HSourceID=" + HSourceID;
+                }
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
-					if (count != 1) {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${Message}`,
-						});
-					}
+                sWhere += " and HSourceInterID=" + HProcExchInterID;
 
-					this.hform.HProcID = data[0]["HProcID"];
-					this.hform.HProcName = data[0]["宸ュ簭"];
-					this.hform.HSourceID = data[0]["HSourceID"];
-					this.hform.HSourceName = data[0]["鐢熶骇璧勬簮"];
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${err}`,
-					});
-				}
-			},
-			setInspectValModule(checkItem) {
-				console.log("checkItem: ", checkItem);
-				if (!checkItem || !checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
-					return;
-				}
-				// 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
-				this.$set(this.InspectModules, `_${checkItem.num}`, {
-					id: `_${checkItem.num}`,
-					checkItemId: checkItem.num,
-				});
-				console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod);
-				let analysisMethodName = this.arrayAnalysisMethod.find(
-					(e) => e.value == checkItem.HAnalysisMethod
-				).name;
-				this.$set(this.subTabs, `_${checkItem.num}`, {
-					id: `_${checkItem.num}`,
-					name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`,
-				});
-			},
-			InspectValueUpdate(e) {
-				console.log("e: ", e);
-				let {
-					data,
-					list
-				} = e;
-				this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data);
-				this.$set(this.InspectValues, `${data.num}`, list);
-			},
-			// 甯﹀嚭妫�楠岄」鐩�
-			async get_CheckItem() {
-				// 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
-				this.checkItems = {}
-				for (let key in this.subTabs) {
-					if (key.substring(1) == "_") {
-						this.$delete(this.subTabs, key)
-					}
-				}
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/Web/GetCheckItemByCheckProjectID",
-						data: {
-							CheckProjectID: this.hform.HQCSchemeID || 0,
-							HBatchQty: this.hform.HProcExchQty || 0,
-						},
-					});
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/CheckBill/GetICMOBillStatusList",
+                        data: {
+                            sWhere: sWhere,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
+                    if (count != 1) {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${Message}`,
+                        });
+                    }
 
-					if (count == 1) {
-						for (var i = 0; i < data.length; i++) {
-							let checkItem = {
-								HQCCheckItemID: data[i]["HQCCheckItemID"],
-								HQCCheckItemNumber: data[i]["妫�楠岄」鐩唬鐮�"],
-								HQCCheckItemName: data[i]["妫�楠岄」鐩�"],
-								HInspectInstruMentID: data[i]["HInspectInstruMentID"],
-								HInspectInstruMentNumber: data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
-								HInspectInstruMentName: data[i]["妫�楠屼华鍣�"],
-								HQCStd: data[i]["HQCStd"],
-								HUnit: data[i]["鍗曚綅鍚嶇О"],
-								HQCNote: "",
-								HAnalysisMethod: data[i]["鍒嗘瀽鏂规硶"],
-								HResult: data[i]["榛樿缁撹"],
-								HMax: "",
-								HMin: "",
-								HAvg: "",
-								HRemark: "",
-								HKeyInspect: data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
-								HStatus: 0,
-								HSampleSchemeID: data[i]["HSampleSchemeID"],
-								HUnitID: data[i]["HUnitID"],
-								HInspectVal: "",
-								HTargetVal: "",
-								HUpLimit: data[i].涓婇檺鍊�,
-								HDownLimit: data[i].涓嬮檺鍊�,
-								HUpOffSet: "",
-								HDownOffSet: "",
-								HSampleDamageQty: "0",
-								HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
-								HSampleQty: data[i].鏍锋湰閲�,
-								HAcceptQty: data[i].鍏佽鏁�,
-								HInspectionLevel: data[i].妫�楠屾按骞�,
-								HRejectQty: data[i].鎷掔粷鏁�,
-								HStrictness: data[i].涓ユ牸搴�,
-								HSampleUnRightQty: 0,
-								HAQL: data[i].AQL,
-								HSamplingType: data[i].鎶芥牱绫诲瀷,
-								HCompareSymbol: data[i].姣旇緝绗�,
-								HTargetVal: data[i].鐩爣鍊� || 0,
-							};
+                    this.hform.HProcID = data[0]["HProcID"];
+                    this.hform.HProcName = data[0]["宸ュ簭"];
+                    this.hform.HSourceID = data[0]["HSourceID"];
+                    this.hform.HSourceName = data[0]["鐢熶骇璧勬簮"];
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${err}`,
+                    });
+                }
+            },
+            setInspectValModule(checkItem) {
+                console.log("checkItem: ", checkItem);
+                if (!checkItem || !checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
+                    return;
+                }
+                // 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
+                this.$set(this.InspectModules, `_${checkItem.num}`, {
+                    id: `_${checkItem.num}`,
+                    checkItemId: checkItem.num,
+                });
+                console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod);
+                let analysisMethodName = this.arrayAnalysisMethod.find(
+                    (e) => e.value == checkItem.HAnalysisMethod
+                ).name;
+                this.$set(this.subTabs, `_${checkItem.num}`, {
+                    id: `_${checkItem.num}`,
+                    name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`,
+                });
+            },
+            InspectValueUpdate(e) {
+                console.log("e: ", e);
+                let {
+                    data,
+                    list
+                } = e;
+                this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data);
+                this.$set(this.InspectValues, `${data.num}`, list);
+            },
+            // 甯﹀嚭妫�楠岄」鐩�
+            async get_CheckItem() {
+                // 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
+                this.checkItems = {}
+                for (let key in this.subTabs) {
+                    if (key.substring(1) == "_") {
+                        this.$delete(this.subTabs, key)
+                    }
+                }
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/Web/GetCheckItemByCheckProjectID",
+                        data: {
+                            CheckProjectID: this.hform.HQCSchemeID || 0,
+                            HBatchQty: this.hform.HProcExchQty || 0,
+                            HMaterID: this.hform.HMaterID,
+                            HBillType: '鐢熶骇鍏ュ簱妫�鏂规'
+                        },
+                    });
 
-							this.addCheckItem(checkItem);
-						}
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
-					});
-				}
-			},
-			async getMaxBillNo() {
-				try {
-					let res = await CommonUtils.doRequest2Sync({
-						url: "/Web/GetMAXNum",
-						data: {
-							HBillType: "7501",
-						},
-					});
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
 
-					if (!res) {
-						return;
-					}
+                    if (count == 1) {
+                        for (var i = 0; i < data.length; i++) {
+                            let checkItem = {
+                                HQCCheckItemID: data[i]["HQCCheckItemID"],
+                                HQCCheckItemNumber: data[i]["妫�楠岄」鐩唬鐮�"],
+                                HQCCheckItemName: data[i]["妫�楠岄」鐩�"],
+                                HInspectInstruMentID: data[i]["HInspectInstruMentID"],
+                                HInspectInstruMentNumber: data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
+                                HInspectInstruMentName: data[i]["妫�楠屼华鍣�"],
+                                HQCStd: data[i]["HQCStd"],
+                                HUnit: data[i]["鍗曚綅鍚嶇О"],
+                                HQCNote: "",
+                                HAnalysisMethod: data[i]["鍒嗘瀽鏂规硶"],
+                                HResult: data[i]["榛樿缁撹"],
+                                HMax: "",
+                                HMin: "",
+                                HAvg: "",
+                                HRemark: "",
+                                HKeyInspect: data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
+                                HStatus: 0,
+                                HSampleSchemeID: data[i]["HSampleSchemeID"],
+                                HUnitID: data[i]["HUnitID"],
+                                HInspectVal: "",
+                                HTargetVal: "",
+                                HUpLimit: data[i].涓婇檺鍊�,
+                                HDownLimit: data[i].涓嬮檺鍊�,
+                                HUpOffSet: "",
+                                HDownOffSet: "",
+                                HSampleDamageQty: "0",
+                                HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+                                HSampleQty: data[i].鏍锋湰閲�,
+                                HAcceptQty: data[i].鍏佽鏁�,
+                                HInspectionLevel: data[i].妫�楠屾按骞�,
+                                HRejectQty: data[i].鎷掔粷鏁�,
+                                HStrictness: data[i].涓ユ牸搴�,
+                                HSampleUnRightQty: 0,
+                                HAQL: data[i].AQL,
+                                HSamplingType: data[i].鎶芥牱绫诲瀷,
+                                HCompareSymbol: data[i].姣旇緝绗�,
+                                HTargetVal: data[i].鐩爣鍊� || 0,
+                            };
 
-					let {
-						data,
-						Message,
-						count
-					} = res.data;
-					if (count == 1) {
-						this.hform.HInterID = data[0].HInterID;
-						this.hform.HBillNo = data[0].HBillNo;
-					} else {
-						throw Message;
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
-					});
-				}
-			},
-			// 妫�楠屽�艰繑鍥炲��
-			InspectValueComplete(e) {
-				console.log("e: ", e);
-				let key = e.num;
-				e.HStatus = e.HStatus ? 1 : 0
-				if (e.HResult2 == '') {
-					e.HResult2 = this.checkItems[key].HResult
-				}
-				Object.assign(this.checkItems[key], e);
-				this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
-				this.checkItems[key].HResult = this.checkItems[key].HResult2 == '鍚堟牸' ? 1 : 2;
+                            this.addCheckItem(checkItem);
+                        }
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
+                    });
+                }
+            },
+            async getMaxBillNo() {
+                try {
+                    let res = await CommonUtils.doRequest2Sync({
+                        url: "/Web/GetMAXNum",
+                        data: {
+                            HBillType: "7501",
+                        },
+                    });
 
-				this.HCheckLastResult();
+                    if (!res) {
+                        return;
+                    }
 
-			},
-			checkSubmitValidate() {
-				// if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
-				// 	CommonUtils.showTips({
-				// 		message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
-				// 	});
-				// 	return false;
-				// }
+                    let {
+                        data,
+                        Message,
+                        count
+                    } = res.data;
+                    if (count == 1) {
+                        this.hform.HInterID = data[0].HInterID;
+                        this.hform.HBillNo = data[0].HBillNo;
+                    } else {
+                        throw Message;
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
+                    });
+                }
+            },
+            // 妫�楠屽�艰繑鍥炲��
+            InspectValueComplete(e) {
+                console.log("e: ", e);
+                let key = e.num;
+                e.HStatus = e.HStatus ? 1 : 0
+                if (e.HResult2 == '') {
+                    e.HResult2 = this.checkItems[key].HResult
+                }
+                Object.assign(this.checkItems[key], e);
+                this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
+                this.checkItems[key].HResult = this.checkItems[key].HResult2 == '鍚堟牸' ? 1 : 2;
 
-				if (this.hform.HFirstCheckEmp == 0) {
-					CommonUtils.showTips({
-						message: "妫�楠屽憳鏈�夋嫨锛�",
-					});
-					return false;
-				}
+                this.HCheckLastResult();
 
-				for (let key in this.checkItems) {
-					if (!this.checkItems[key].HQCCheckItemID) {
-						CommonUtils.showTips({
-							message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
-						});
-						return false;
-					}
+            },
+            checkSubmitValidate() {
+                // if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
+                // 	CommonUtils.showTips({
+                // 		message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
+                // 	});
+                // 	return false;
+                // }
 
-					if (
-						this.checkItems[key].HSampleSchemeID == "" ||
-						this.checkItems[key].HSampleSchemeID == null
-					) {
-						this.checkItems[key].HSampleSchemeID = 0;
-					}
-					if (
-						this.checkItems[key].HSampleQty == "" ||
-						this.checkItems[key].HSampleQty == null
-					) {
-						this.checkItems[key].HSampleQty = 0;
-					}
-					if (
-						this.checkItems[key].HSampleDamageQty == "" ||
-						this.checkItems[key].HSampleDamageQty == null
-					) {
-						this.checkItems[key].HSampleDamageQty = 0;
-					}
-					if (
-						this.checkItems[key].HAcceptQty == "" ||
-						this.checkItems[key].HAcceptQty == null
-					) {
-						this.checkItems[key].HAcceptQty = 0;
-					}
-					if (
-						this.checkItems[key].HRejectQty == "" ||
-						this.checkItems[key].HRejectQty == null
-					) {
-						this.checkItems[key].HRejectQty = 0;
-					}
-					if (
-						this.checkItems[key].HSampleUnRightQty == "" ||
-						this.checkItems[key].HSampleUnRightQty == 0
-					) {
-						this.checkItems[key].HSampleUnRightQty = 0;
-					}
-					if (this.checkItems[key].HUnitID == "") {
-						this.checkItems[key].HUnitID = 0;
-					}
-				}
+                if (this.hform.HFirstCheckEmp == 0) {
+                    CommonUtils.showTips({
+                        message: "妫�楠屽憳鏈�夋嫨锛�",
+                    });
+                    return false;
+                }
 
-				return true;
-			},
-			async submit() {
-				if (!this.checkSubmitValidate()) {
-					return;
-				}
-				try {
-					console.log('this.$refs: ', this.$refs);
-					// 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
-					if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length >
-						0) {
-						// 鍔犺浇鏈夋楠屽�兼ā鍧�
-						await this.$refs.InspectValueModules[0].set_SaveValue();
-						this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
-						await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData)
-					}
-					let InspectValuesTrans = [];
-					let HInterID = this.hform.HInterID;
-					for (let key in this.InspectValues) {
-						let HEntryID = key;
+                for (let key in this.checkItems) {
+                    if (!this.checkItems[key].HQCCheckItemID) {
+                        CommonUtils.showTips({
+                            message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
+                        });
+                        return false;
+                    }
 
-						InspectValuesTrans.push(
-							`${JSON.stringify(this.InspectValues[key])}`
-						);
-					}
-					let checkItemsArray = [];
-					for (var key in this.checkItems) {
-						let checkItem = JSON.parse(JSON.stringify(this.checkItems[key]))
-						delete checkItem.data
-						checkItemsArray.push(checkItem);
-					}
-					console.log('checkItemsArray: ', checkItemsArray);
-					let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify(
+                    if (
+                        this.checkItems[key].HSampleSchemeID == "" ||
+                        this.checkItems[key].HSampleSchemeID == null
+                    ) {
+                        this.checkItems[key].HSampleSchemeID = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleQty == "" ||
+                        this.checkItems[key].HSampleQty == null
+                    ) {
+                        this.checkItems[key].HSampleQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleDamageQty == "" ||
+                        this.checkItems[key].HSampleDamageQty == null
+                    ) {
+                        this.checkItems[key].HSampleDamageQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HAcceptQty == "" ||
+                        this.checkItems[key].HAcceptQty == null
+                    ) {
+                        this.checkItems[key].HAcceptQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HRejectQty == "" ||
+                        this.checkItems[key].HRejectQty == null
+                    ) {
+                        this.checkItems[key].HRejectQty = 0;
+                    }
+                    if (
+                        this.checkItems[key].HSampleUnRightQty == "" ||
+                        this.checkItems[key].HSampleUnRightQty == 0
+                    ) {
+                        this.checkItems[key].HSampleUnRightQty = 0;
+                    }
+                    if (this.checkItems[key].HUnitID == "") {
+                        this.checkItems[key].HUnitID = 0;
+                    }
+                }
+
+                return true;
+            },
+            async submit() {
+                if (!this.checkSubmitValidate()) {
+                    return;
+                }
+                try {
+                    console.log('this.$refs: ', this.$refs);
+                    // 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
+                    if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules
+                        .length >
+                        0) {
+                        // 鍔犺浇鏈夋楠屽�兼ā鍧�
+                        await this.$refs.InspectValueModules[0].set_SaveValue();
+                        this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
+                        await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData)
+                    }
+                    let InspectValuesTrans = [];
+                    let HInterID = this.hform.HInterID;
+                    for (let key in this.InspectValues) {
+                        let HEntryID = key;
+
+                        InspectValuesTrans.push(
+                            `${JSON.stringify(this.InspectValues[key])}`
+                        );
+                    }
+                    let checkItemsArray = [];
+                    for (var key in this.checkItems) {
+                        let checkItem = JSON.parse(JSON.stringify(this.checkItems[key]))
+                        delete checkItem.data
+                        checkItemsArray.push(checkItem);
+                    }
+                    console.log('checkItemsArray: ', checkItemsArray);
+                    let sMainSub =
+                        `${JSON.stringify(this.hform)};${JSON.stringify(
           checkItemsArray
-        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`;
-					console.log("this.checkItems: ", this.checkItems);
+        )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0] || '[]'};${JSON.stringify(this.badReasons)}`;
+                    console.log("this.checkItems: ", this.checkItems);
 
-					let res = await CommonUtils.doRequest2Sync({
-						url: "/QC_LastPieceCheckBill/set_SaveBill",
-						data: {
-							sMainSub: sMainSub,
-						},
-						method: "POST",
-					});
+                    let res = await CommonUtils.doRequest2Sync({
+                        url: "/QC_LastPieceCheckBill/set_SaveBill",
+                        data: {
+                            sMainSub: sMainSub,
+                        },
+                        method: "POST",
+                    });
 
-					if (!res) {
-						return;
-					}
+                    if (!res) {
+                        return;
+                    }
 
-					let {
-						count,
-						Message,
-						data
-					} = res.data;
-					if (count == 1) {
-						uni.showModal({
-							title: "鎻愮ず",
-							content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
-							success: (res) => {
-								if (res.confirm) {
-									console.log("鐢ㄦ埛鐐瑰嚮纭畾");
-									uni.redirectTo({
-										url: "/pages/JIAOYAN/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1",
-									});
-								} else if (res.cancel) {
-									console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
-									// setTimeout(() => {
-									//     uni.navigateBack();
-									// }, 50)
-								}
-							},
-						});
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${err}`,
-					});
-				}
-			},
-			addNew() {
-				uni.redirectTo({
-					url: "/pages/ZLGL/shoujianjianyan/firstCheckBillList?operationType=1",
-				});
-			},
-			goBack() {
-				uni.navigateBack();
-			},
-			async RoadBillMain() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit",
-						data: {
-							sWhere: ` and hmainid=${this.hform.HInterID}`,
-							user: getUserInfo()["Czymc"],
-						},
-					});
+                    let {
+                        count,
+                        Message,
+                        data
+                    } = res.data;
+                    if (count == 1) {
+                        uni.showModal({
+                            title: "鎻愮ず",
+                            content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
+                            success: (res) => {
+                                if (res.confirm) {
+                                    console.log("鐢ㄦ埛鐐瑰嚮纭畾");
+                                    uni.redirectTo({
+                                        url: "/pages/JIAOYAN/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1",
+                                    });
+                                } else if (res.cancel) {
+                                    console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
+                                    // setTimeout(() => {
+                                    //     uni.navigateBack();
+                                    // }, 50)
+                                }
+                            },
+                        });
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鐢熶骇鍏ュ簱鏍¢獙鍗曚繚瀛橀敊璇�: ${err}`,
+                    });
+                }
+            },
+            addNew() {
+                uni.redirectTo({
+                    url: "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2?operationType=1",
+                });
+            },
+            goBack() {
+                uni.navigateBack();
+            },
+            async RoadBillMain() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit",
+                        data: {
+                            sWhere: ` and hmainid=${this.hform.HInterID}`,
+                            user: getUserInfo()["Czymc"],
+                        },
+                    });
 
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data;
 
-					if (count == 1) {
-						console.log("RoadBillMain: : ", data);
-						Object.assign(this.hform, {
-							HInterID: data[0].hmainid,
-							HBillNo: data[0].鍗曟嵁鍙�,
-							HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
-							HSourceID: data[0].HSourceID,
-							HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
-							HICMOBillNo: data[0].浠诲姟鍗曞彿,
-							HICMOQty: data[0].浠诲姟鍗曟暟閲�,
-							HICMOInterID: data[0].HICMOInterID,
-							HICMOEntryID: data[0].HICMOEntryID || 1,
-							HMaterID: data[0].HMaterID,
-							HMaterName: data[0].鐗╂枡鍚嶇О,
-							HMaterNumber: data[0].鐗╂枡浠g爜,
-							HProcID: data[0].HProcID,
-							HProcName: data[0].HProcName,
-							HProcExchQty: data[0].HProcExchQty || 0,
-							HProcExchBillNo: data[0].HProcExchBillNo,
-							HProcExchInterID: data[0].HProcExchInterID,
-							HProcExchEntryID: data[0].HProcExchEntryID || 0,
-							HFirstCheckEmp: data[0].HFirstCheckEmp,
-							HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
-							HQCSchemeID: data[0].妫�楠屾柟妗圛D,
-							HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
-							HRemark: data[0].琛ㄥご澶囨敞,
-							HMaker: data[0].鍒跺崟浜�,
-							HMakeDate: data[0].鍒跺崟鏃ユ湡,
-							HChecker: data[0].瀹℃牳浜�,
-							HCheckDate: data[0].瀹℃牳鏃ユ湡,
-							HCloseMan: data[0].鍏抽棴浜�,
-							HCloseDate: data[0].鍏抽棴鏃ユ湡,
-							HUpDateDate: data[0].淇敼鏃ユ湡,
-							HDeleteDate: data[0].浣滃簾鏃ユ湡,
-							HSampleSchemeID: data[0].HSampleSchemeID,
-							HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
-							HSampleQty: data[0].鏍锋湰閲�,
-							HSampleQty2: data[0].鏍锋湰閲�,
-							HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
-							HSamplingType: data[0].鎶芥牱绫诲瀷,
-							HAcceptQty: data[0].鍏佽鏁�,
-							HInspectionLevel: data[0].妫�楠屾按骞�,
-							HRejectQty: data[0].鎷掔粷鏁�,
-							HStrictness: data[0].涓ユ牸搴�,
-							HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
-							HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
-							HAQL: data[0].AQL,
-							HUnitID: data[0].HUnitID,
-							HUnit: data[0].鍗曚綅,
-							HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
-							HInspectVal: data[0].妫�娴嬪��,
-							HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
-							HTargetVal: data[0].鐩爣鍊�,
-							HUpLimit: data[0].涓婇檺鍊�,
-							HDownLimit: data[0].涓嬮檺鍊�,
-							HUpOffSet: data[0].涓婂亸宸�,
-							HDownOffSet: data[0].涓嬪亸宸�,
-							HEntryID: data[0].hsubid,
-							HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
-							HQCCheckItemID: data[0].HQCCheckItemID,
-							HShiftsID: data[0].HShiftsID,
-							HShiftsName: data[0].鐝鍚嶇О,
-							HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
-							HBatchNo: data[0].鎵瑰彿,
-							HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
-							HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
-							HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
-							HAnalysisMethod: function() {
-								if (data[0].HAnalysisMethod == 1) {
-									return '瀹氭�ф楠�'
-								} else if (data[0].HAnalysisMethod == 2) {
-									return '瀹氶噺妫�楠�'
-								} else {
-									return '鍏朵粬妫�楠�'
-								}
-							}(),
+                    if (count == 1) {
+                        console.log("RoadBillMain: : ", data);
+                        Object.assign(this.hform, {
+                            HInterID: data[0].hmainid,
+                            HBillNo: data[0].鍗曟嵁鍙�,
+                            HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
+                            HSourceID: data[0].HSourceID,
+                            HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
+                            HICMOBillNo: data[0].浠诲姟鍗曞彿,
+                            HICMOQty: data[0].浠诲姟鍗曟暟閲�,
+                            HICMOInterID: data[0].HICMOInterID,
+                            HICMOEntryID: data[0].HICMOEntryID || 1,
+                            HMaterID: data[0].HMaterID,
+                            HMaterName: data[0].鐗╂枡鍚嶇О,
+                            HMaterNumber: data[0].鐗╂枡浠g爜,
+                            HProcID: data[0].HProcID,
+                            HProcName: data[0].HProcName,
+                            HProcExchQty: data[0].HProcExchQty || 0,
+                            HProcExchBillNo: data[0].HProcExchBillNo,
+                            HProcExchInterID: data[0].HProcExchInterID,
+                            HProcExchEntryID: data[0].HProcExchEntryID || 0,
+                            HFirstCheckEmp: data[0].HFirstCheckEmp,
+                            HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
+                            HQCSchemeID: data[0].妫�楠屾柟妗圛D,
+                            HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
+                            HRemark: data[0].琛ㄥご澶囨敞,
+                            HMaker: data[0].鍒跺崟浜�,
+                            HMakeDate: data[0].鍒跺崟鏃ユ湡,
+                            HChecker: data[0].瀹℃牳浜�,
+                            HCheckDate: data[0].瀹℃牳鏃ユ湡,
+                            HCloseMan: data[0].鍏抽棴浜�,
+                            HCloseDate: data[0].鍏抽棴鏃ユ湡,
+                            HUpDateDate: data[0].淇敼鏃ユ湡,
+                            HDeleteDate: data[0].浣滃簾鏃ユ湡,
+                            HSampleSchemeID: data[0].HSampleSchemeID,
+                            HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
+                            HSampleQty: data[0].鏍锋湰閲�,
+                            HSampleQty2: data[0].鏍锋湰閲�,
+                            HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
+                            HSamplingType: data[0].鎶芥牱绫诲瀷,
+                            HAcceptQty: data[0].鍏佽鏁�,
+                            HInspectionLevel: data[0].妫�楠屾按骞�,
+                            HRejectQty: data[0].鎷掔粷鏁�,
+                            HStrictness: data[0].涓ユ牸搴�,
+                            HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
+                            HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
+                            HAQL: data[0].AQL,
+                            HUnitID: data[0].HUnitID,
+                            HUnit: data[0].鍗曚綅,
+                            HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
+                            HInspectVal: data[0].妫�娴嬪��,
+                            HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
+                            HTargetVal: data[0].鐩爣鍊�,
+                            HUpLimit: data[0].涓婇檺鍊�,
+                            HDownLimit: data[0].涓嬮檺鍊�,
+                            HUpOffSet: data[0].涓婂亸宸�,
+                            HDownOffSet: data[0].涓嬪亸宸�,
+                            HEntryID: data[0].hsubid,
+                            HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
+                            HQCCheckItemID: data[0].HQCCheckItemID,
+                            HShiftsID: data[0].HShiftsID,
+                            HShiftsName: data[0].鐝鍚嶇О,
+                            HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
+                            HBatchNo: data[0].鎵瑰彿,
+                            HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
+                            HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
+                            HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
+                            HAnalysisMethod: function() {
+                                if (data[0].HAnalysisMethod == 1) {
+                                    return '瀹氭�ф楠�'
+                                } else if (data[0].HAnalysisMethod == 2) {
+                                    return '瀹氶噺妫�楠�'
+                                } else {
+                                    return '鍏朵粬妫�楠�'
+                                }
+                            }(),
 
 
 
-						});
+                        });
 
-						for (let i = 0; i < data.length; i++) {
-							this.addCheckItem({
-								HQCCheckItemID: data[i].HQCCheckItemID,
-								HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
-								HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
-								HInspectInstruMentID: data[i].HInspectInstruMentID,
-								HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
-								HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
-								HQCStd: data[i].妫�楠屾爣鍑�,
-								HUnit: data[i].鍗曚綅鍚嶇О,
-								HQCNote: data[i].妫�楠岃褰�,
-								HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
-								HMax: data[i].鏈�澶у��,
-								HMin: data[i].鏈�灏忓��,
-								HAvg: data[i].骞冲潎鍊�,
-								HRemark: data[i].琛ㄤ綋澶囨敞,
-								HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
-									1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
-									2 : 3,
-								HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
-								HSampleSchemeID: data[i].HSampleSchemeID,
-								HUnitID: data[i].HUnitID,
-								HInspectVal: data[i].妫�娴嬪��,
-								HTargetVal: data[i].鐩爣鍊�,
-								HUpLimit: data[i].涓婇檺鍊�,
-								HDownLimit: data[i].涓嬮檺鍊�,
-								HUpOffSet: data[i].涓婂亸宸�,
-								HDownOffSet: data[i].涓嬪亸宸�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
-								HSampleQty: data[i].鏍锋湰閲�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HAcceptQty: data[i].鍏佽鏁�,
-								HInspectionLevel: 0,
-								HRejectQty: data[i].鎷掔粷鏁�,
-								HStrictness: 0,
-								HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
-								HAQL: data[i].AQL,
-								HSamplingType: 0,
-								HSamplingType: data[i].鎶芥牱绫诲瀷,
-								HStrictness: data[i].涓ユ牸搴�,
-								HInspectResultToSee: data[i].妫�楠岀粨鏋�
-							});
+                        for (let i = 0; i < data.length; i++) {
+                            this.addCheckItem({
+                                HQCCheckItemID: data[i].HQCCheckItemID,
+                                HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
+                                HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
+                                HInspectInstruMentID: data[i].HInspectInstruMentID,
+                                HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
+                                HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
+                                HQCStd: data[i].妫�楠屾爣鍑�,
+                                HUnit: data[i].鍗曚綅鍚嶇О,
+                                HQCNote: data[i].妫�楠岃褰�,
+                                HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
+                                HMax: data[i].鏈�澶у��,
+                                HMin: data[i].鏈�灏忓��,
+                                HAvg: data[i].骞冲潎鍊�,
+                                HRemark: data[i].琛ㄤ綋澶囨敞,
+                                HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
+                                    1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
+                                    2 : 3,
+                                HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
+                                HSampleSchemeID: data[i].HSampleSchemeID,
+                                HUnitID: data[i].HUnitID,
+                                HInspectVal: data[i].妫�娴嬪��,
+                                HTargetVal: data[i].鐩爣鍊�,
+                                HUpLimit: data[i].涓婇檺鍊�,
+                                HDownLimit: data[i].涓嬮檺鍊�,
+                                HUpOffSet: data[i].涓婂亸宸�,
+                                HDownOffSet: data[i].涓嬪亸宸�,
+                                HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+                                HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+                                HSampleQty: data[i].鏍锋湰閲�,
+                                HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+                                HAcceptQty: data[i].鍏佽鏁�,
+                                HInspectionLevel: 0,
+                                HRejectQty: data[i].鎷掔粷鏁�,
+                                HStrictness: 0,
+                                HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
+                                HAQL: data[i].AQL,
+                                HSamplingType: 0,
+                                HSamplingType: data[i].鎶芥牱绫诲瀷,
+                                HStrictness: data[i].涓ユ牸搴�,
+                                HInspectResultToSee: data[i].妫�楠岀粨鏋�
+                            });
 
-						}
+                        }
+                        
+                        this.hasSourceBill = true
+                        let resBadReason = await CommonUtils.doRequest2Async({
+                            url: '/QC_LastPieceCheckBill_BadReason/getBadReasonList',
+                            data: {
+                                HInterID: data[0].hmainid,
+                                user: getUserInfo()["Czymc"],
+                            }
+                        })
 
+                        ({
+                            count,
+                            data
+                        } = resBadReason.data)
+                        if (count == 1) {
+                            this.badReasons.push(...data)
+                        }
 
-						this.hasSourceBill = true
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
-					});
-				}
-			},
-		},
-		async onLoad(e) {
-			this.operationType = e.operationType || 1;
-			this.hform.HInterID = e.linterid || 0;
-			if (this.operationType == 1) {
-				await this.getMaxBillNo();
-			} else if (this.operationType == 2) {
+                        this.hasSourceBill = true
+                    } else {
+                        CommonUtils.showTips({
+                            title: "娓╅Θ鎻愮ず",
+                            message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
+                        });
+                    }
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
+                    });
+                }
+            },
+        },
+        async onLoad(e) {
+            this.operationType = e.operationType || 1;
+            this.hform.HInterID = e.linterid || 0;
+            if (this.operationType == 1) {
+                await this.getMaxBillNo();
+            } else if (this.operationType == 2) {
 
-			} else if (this.operationType == 3) {
-				await this.RoadBillMain();
-			}
+            } else if (this.operationType == 3) {
+                await this.RoadBillMain();
+            }
 
-			await this.InitHSource();
-			await this.InitHWorkShift();
-			await this.InitHEmp();
-		},
-	};
+            await this.InitHSource();
+            await this.InitHWorkShift();
+            await this.InitHEmp();
+        },
+    };
 </script>
 
 <style lang="scss" scoped>
-	input {
-		width: inherit;
-		font-size: 26rpx;
-	}
+    input {
+        width: inherit;
+        font-size: 26rpx;
+    }
 
-	.uni-input {
-		padding: 0;
-	}
+    .uni-input {
+        padding: 0;
+    }
 
-	.bill-main-tabs,
-	.bill-sub-tabs {
-		box-sizing: border-box;
-		width: 730rpx;
-		display: flex;
-		flex-direction: row;
-		flex-wrap: nowrap;
-		gap: 20rpx;
-		flex-shrink: 0;
-		overflow-x: auto;
-		border-bottom: 1px solid #ddd;
-		padding: 20rpx 10rpx;
-		white-space: nowrap;
+    .bill-main-tabs,
+    .bill-sub-tabs {
+        box-sizing: border-box;
+        width: 730rpx;
+        display: flex;
+        flex-direction: row;
+        flex-wrap: nowrap;
+        gap: 20rpx;
+        flex-shrink: 0;
+        overflow-x: auto;
+        border-bottom: 1px solid #ddd;
+        padding: 20rpx 10rpx;
+        white-space: nowrap;
 
-		view {
-			width: auto;
-			font-size: 26rpx;
-			color: #555;
-			text-align: center;
-			padding: 16rpx 0;
-		}
+        view {
+            width: auto;
+            font-size: 26rpx;
+            color: #555;
+            text-align: center;
+            padding: 16rpx 0;
+        }
 
-		.selected {
-			color: #3a78ff;
-			font-weight: bold;
-			border-bottom: 3px solid #3a78ff;
-		}
-	}
+        .selected {
+            color: #3a78ff;
+            font-weight: bold;
+            border-bottom: 3px solid #3a78ff;
+        }
+    }
 
-	.bill-main-content,
-	.bill-sub-content {
-		box-sizing: border-box;
-		padding: 0 30rpx 0 30rpx;
-		display: flex;
-		flex-direction: column;
+    .bill-main-content,
+    .bill-sub-content {
+        box-sizing: border-box;
+        padding: 0 30rpx 0 30rpx;
+        display: flex;
+        flex-direction: column;
 
-		.form-item {
-			width: 100%;
-			display: flex;
-			align-items: center;
-			font-size: 26rpx;
-			padding: 6rpx 0;
+        .form-item {
+            width: 100%;
+            display: flex;
+            align-items: center;
+            font-size: 26rpx;
+            padding: 6rpx 0;
 
-			.left {
-				width: 208rpx;
+            .left {
+                width: 208rpx;
 
-				text {
-					color: red;
-					font-weight: bold;
-				}
-			}
+                text {
+                    color: red;
+                    font-weight: bold;
+                }
+            }
 
-			.right {
-				// width: 450rpx;
-				padding: 8rpx 20rpx;
-				font-size: 26rpx;
-				flex: 1;
-				border-radius: 22rpx;
-				border: 1px solid #acacac;
+            .right {
+                // width: 450rpx;
+                padding: 8rpx 20rpx;
+                font-size: 26rpx;
+                flex: 1;
+                border-radius: 22rpx;
+                border: 1px solid #acacac;
 
-				.uni-combox {
-					padding: 0;
-					height: auto;
+                .uni-combox {
+                    padding: 0;
+                    height: auto;
 
-					.uni-input-placeholder,
-					.uni-input-input {
-						font-size: 26rpx;
-					}
-				}
+                    .uni-input-placeholder,
+                    .uni-input-input {
+                        font-size: 26rpx;
+                    }
+                }
 
-				.uni-combox::v-deep input {
-					height: inherit;
-					font-size: 26rpx;
-				}
-			}
+                .uni-combox::v-deep input {
+                    height: inherit;
+                    font-size: 26rpx;
+                }
+            }
 
-			.disabled {
-				border: 1px solid #e4e4e4;
-				background-color: #e4e4e4;
-			}
+            .disabled {
+                border: 1px solid #e4e4e4;
+                background-color: #e4e4e4;
+            }
 
-			.none-border {
-				border: none;
-			}
-		}
-	}
+            .none-border {
+                border: none;
+            }
+        }
+    }
 
-	.bottom-btn {
-		box-sizing: border-box;
-		width: 100%;
-		height: 120rpx;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background-color: #fff;
-		box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
-		padding: 30rpx 40rpx 40rpx 40rpx;
-		display: flex;
-		flex-direction: row;
-		gap: 10rpx;
+    .bottom-btn {
+        box-sizing: border-box;
+        width: 100%;
+        height: 120rpx;
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        background-color: #fff;
+        box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+        padding: 30rpx 40rpx 40rpx 40rpx;
+        display: flex;
+        flex-direction: row;
+        gap: 10rpx;
 
-		button {
-			border-radius: 50rpx;
-			width: 180rpx;
-			height: 66rpx;
-			line-height: 66rpx;
-			font-size: 28rpx;
-		}
+        button {
+            border-radius: 50rpx;
+            width: 180rpx;
+            height: 66rpx;
+            line-height: 66rpx;
+            font-size: 28rpx;
+        }
 
-		.btn-a {
-			background-color: #3a78ff;
-			color: #fff;
-		}
+        .btn-a {
+            background-color: #3a78ff;
+            color: #fff;
+        }
 
-		.btn-b {
-			background-color: #41a863;
-			color: #fff;
-		}
+        .btn-b {
+            background-color: #41a863;
+            color: #fff;
+        }
 
-		.btn-c {
-			background-color: #acacac;
-			color: #fff;
-			// position: absolute;
-			// right: 120rpx;
-		}
+        .btn-c {
+            background-color: #acacac;
+            color: #fff;
+            // position: absolute;
+            // right: 120rpx;
+        }
 
-		.btn-d {
-			background-color: #ff8901;
-			color: #fff;
-		}
-	}
+        .btn-d {
+            background-color: #ff8901;
+            color: #fff;
+        }
+    }
 
-	.buttons {
-		box-sizing: border-box;
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		padding: 10rpx 0;
+    .buttons {
+        box-sizing: border-box;
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        padding: 10rpx 0;
 
-		button {
-			border-radius: 50rpx;
-			width: 180rpx;
-			height: 66rpx;
-			line-height: 66rpx;
-			font-size: 26rpx;
-		}
+        button {
+            border-radius: 50rpx;
+            width: 180rpx;
+            height: 66rpx;
+            line-height: 66rpx;
+            font-size: 26rpx;
+        }
 
-		.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;
+        }
+    }
 
-	.list {
-		width: 100%;
+    .list {
+        width: 100%;
 
-		.card-detail {
-			width: 100%;
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-			align-items: center;
-			line-height: 120%;
-			gap: 10rpx 0;
+        .card-detail {
+            width: 100%;
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            align-items: center;
+            line-height: 120%;
+            gap: 10rpx 0;
 
-			input {
-				font-size: 26rpx;
-			}
+            input {
+                font-size: 26rpx;
+            }
 
-			.detail {
-				// width: 50%;
-				box-sizing: border-box;
-				font-size: 26rpx;
-				color: #555;
-				padding-right: 20rpx;
+            .detail {
+                // width: 50%;
+                box-sizing: border-box;
+                font-size: 26rpx;
+                color: #555;
+                padding-right: 20rpx;
 
-				text {
-					color: #999;
-					font-size: 26rpx;
-				}
-			}
+                text {
+                    color: #999;
+                    font-size: 26rpx;
+                }
+            }
 
-			.editable {
-				width: 50%;
-				display: inline-flex;
-				flex-direction: row;
-				align-items: center;
+            .editable {
+                width: 50%;
+                display: inline-flex;
+                flex-direction: row;
+                align-items: center;
 
-				text {
-					flex-shrink: 0;
-				}
+                text {
+                    flex-shrink: 0;
+                }
 
                 .editable-input {
                     border: 1px solid #acacac;
@@ -2236,57 +2444,72 @@
         }
     }
 
-	.icon-wrapper {
-		background-color: #3a78ff;
-		border-radius: 100%;
-		width: 40rpx;
-		height: 40rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-shrink: 0;
+    .icon-wrapper {
+        background-color: #3a78ff;
+        border-radius: 100%;
+        width: 40rpx;
+        height: 40rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        flex-shrink: 0;
 
-		.uni-icons {
-			color: #fff !important;
-		}
-	}
+        .uni-icons {
+            color: #fff !important;
+        }
+    }
 
-	.icon-wrapper-big {
-		background-color: #3a78ff;
-		border-radius: 100%;
-		width: 50rpx;
-		height: 50rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-shrink: 0;
-		margin-left: 20rpx;
+    .icon-wrapper-big {
+        background-color: #3a78ff;
+        border-radius: 100%;
+        width: 50rpx;
+        height: 50rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        flex-shrink: 0;
+        margin-left: 20rpx;
 
-		.uni-icons {
-			color: #fff !important;
-		}
-	}
+        .uni-icons {
+            color: #fff !important;
+        }
+    }
 
-	.more {
-		color: #888;
-		font-size: 22rpx;
-		display: flex;
-		border-top: 1px solid #eee;
-		padding-top: 10rpx;
+    .more {
+        color: #888;
+        font-size: 22rpx;
+        display: flex;
+        border-top: 1px solid #eee;
+        padding-top: 10rpx;
 
-		.part {
-			width: 100%;
-			text-align: center;
-		}
-	}
+        .part {
+            width: 100%;
+            text-align: center;
+        }
+    }
 
-	.pass-background {
-		background-color: #cee3f2;
-		border: none;
-	}
+    .pass-background {
+        background-color: #cee3f2;
+        border: none;
+    }
 
-	.unpass-background {
-		background-color: #f0d6e3;
-		border: none;
-	}
+    .unpass-background {
+        background-color: #f0d6e3;
+        border: none;
+    }
+
+    .enable-icon-button {
+        background-color: #3a78ff;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+    }
+
+    .disable-icon-button {
+        background-color: lightgray;
+        padding: 6rpx;
+        color: #fff;
+        border-radius: 100%;
+        pointer-events: none;
+    }
 </style>
\ No newline at end of file
diff --git a/pages/caigouruku/POStockInBill.vue b/pages/caigouruku/POStockInBill.vue
index 9481447..4881325 100644
--- a/pages/caigouruku/POStockInBill.vue
+++ b/pages/caigouruku/POStockInBill.vue
@@ -20,19 +20,19 @@
             <view class="form-item">
                 <view class="title">浠撳簱:</view>
                 <view class="right">
-                    <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
-                        @input="HWHNameChange" @confirm="HWHNameScan"></uni-combox>
+                    <uni-combox :candidates="arrayHWHName" placeholder="璇烽�夋嫨浠撳簱" v-model="hform.HWHName"
+                        @input="HWHNameChange"></uni-combox>
                 </view>
             </view>
             <view class="form-item">
                 <view class="title">浠撲綅:</view>
-                <view class="right" v-show="showHStockPlaceName">
+                <view class="right" v-show="true">
                     <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
                         v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"
                         @confirm="HStockPlaceNameScan"></uni-combox>
                 </view>
-                <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName"
-                        placeholder="涓嶅彲鎿嶄綔" :disabled="!showHStockPlaceName" /></view>
+                <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="涓嶅彲鎿嶄綔"
+                        :disabled="!showHStockPlaceName" /></view>
             </view>
 
             <view class="tabs">
@@ -424,6 +424,7 @@
         },
         methods: {
             async HWHNameScan(e) {
+                return
                 // 鎵弿浠撳簱鐮�
                 console.log('浠撳簱鐮�: ', e);
                 let index = this.HWHNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
@@ -438,20 +439,38 @@
             },
             async HStockPlaceNameScan(e) {
                 // 鎵弿浠撲綅鐮�
-                console.log('浠撲綅鐮�: ', e);
-                let index = this.HStockPlaceNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
-                console.log('index: ', index);
+                console.log('Code: ', e);
                 // 涓嶅厛缃┖鐨勮瘽锛屾暟鎹啀娆℃壂鎻忕浉鍚岀殑浠撲綅鐮� 涓嶄細瑙﹀彂缁勪欢鍐呯殑鍒锋柊
                 this.hform.HStockPlaceID = 0
                 this.hform.HStockPlaceName = ''
-                await this.$nextTick()
-                if (index == -1) {
-                    uni.showToast({
-                        icon: 'none',
-                        title: '鎵弿浠撲綅鏉$爜瀵瑰簲鐨勪粨浣嶄笉瀛樺湪...'
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Gy_StockPlace/list',
+                        data: {
+                            sWhere: ` and 鏉$爜缂栧彿 = '${e}'`,
+                            user: uni.getStorageSync('HUserName'),
+                            Organization: uni.getStorageSync('Organization')
+                        },
                     })
-                } else {
-                    this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['浠撲綅鍚嶇О'])
+
+                    if (res.data.count == 1) {
+
+                        this.hform.HStockPlaceID = res.data.data[0].HMainID
+                        this.hform.HStockPlaceName = res.data.data[0].浠撲綅鍚嶇О
+                        this.hform.HWHID = res.data.data[0].HWHID
+                        this.hform.HWHName = res.data.data[0].鎵�灞炰粨搴�
+                    } else {
+                        uni.showToast({
+                            title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                            icon: 'none'
+                        })
+                    }
+
+                } catch (err) {
+                    uni.showToast({
+                        title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                        icon: 'none'
+                    })
                 }
             },
             async qrCodeDisplay() {
@@ -777,14 +796,12 @@
                     if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
                         this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
                         this.hform.HWHID = this.HWHNameList[i].HItemID
-
+                        this.HStockPlaceNameChange(null)
+                        this.showHStockPlaceName = false
                         if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
                             this.showHStockPlaceName = true
                             this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"])
-                        } else {
-                            this.hform.HStockPlaceName = ''
-                            this.showHStockPlaceName = false
-                        }
+                        } 
                     }
                 }
             },
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 2fbe988..1e65a67 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -103,7 +103,7 @@
                     "鏉窞鍑礉濂堢壒": 'http://192.168.50.253:8080/API/',
                     "鏉窞鍑礉濂堢壒澶栫綉": 'http://erp.hzcabinet.cn:9090/API/',
                     "缈佹稕娑涙湰鍦版祴璇�": 'http://localhost:81/API/',
-                    "闄堥晲鍝叉湰鍦版祴璇�": 'http://localhost:81/API/',
+                    "闄堥晲鍝叉湰鍦版祴璇�": 'http://192.168.0.123:81/API/',
                     "寮犵憺骞挎湰鍦版祴璇�": 'http://localhost:8082/API/',
                     "浣欐�濇澃鏈湴娴嬭瘯": 'http://localhost:8082/LuBaoAPI/',
                     // 灏忓崼鍐呭缃�
@@ -143,6 +143,7 @@
         },
         methods: {
             onLanguageChangeHandler(e) {
+                //TODO: 鍔ㄦ�佽幏鍙栧悗绔殑璇█鍖呮枃浠讹紝骞跺皢璇█鍖呭簲鐢ㄥ埌鍏ㄥ眬
                 console.log('e: ', e.detail.value);
                 if (e.detail.value == 0) {
                     this.Language = '涓枃'
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index e230f56..c03c984 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -447,7 +447,7 @@
 					},
 					{
 						"img": "../../static/icon/icon8.png",
-						"text": "鐢熶骇鏍¢獙鍗�",
+						"text": "鐢熶骇鍏ュ簱鏍¢獙鍗�",
 						"url": "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2",
 						"id": 53,
 						"hidden": false
diff --git a/pages/zhijiediaobo/MoveStockBill.vue b/pages/zhijiediaobo/MoveStockBill.vue
index ee9d51a..65d3ac2 100644
--- a/pages/zhijiediaobo/MoveStockBill.vue
+++ b/pages/zhijiediaobo/MoveStockBill.vue
@@ -26,14 +26,16 @@
             </view>
             <view class="form-item">
                 <view class="title">璋冨嚭浠撲綅:</view>
-                <view class="right" v-show="HSCIsStockMgr">
+                <!-- TODO: 鍥涚淮灏旈渶瑕佹壂浠撲綅鐮� 甯﹀嚭浠撳簱浠撲綅淇℃伅锛屾牴鎹叕鍙稿垽鏂槸鍚﹂渶瑕佺鐢ㄤ粨浣� -->
+                <view class="right">
                     <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
                         v-model="hform.HOutStockPlaceName" @input="HOutStockPlaceNameChange"
                         @confirm="HStockPlaceOutNameScan"></uni-combox>
                 </view>
-                <view class="righton" v-show="!HSCIsStockMgr">
+                
+                <!-- <view class="righton" v-show="!HSCIsStockMgr">
                     <input v-model="hform.HOutStockPlaceName" :disabled="!HIsStockMgr" placeholder="涓嶅彲鎿嶄綔" />
-                </view>
+                </view> -->
             </view>
 
             <view class="tabs">
@@ -165,14 +167,15 @@
                 </view>
                 <view class="form-item">
                     <view class="title">璋冨叆浠撲綅:</view>
-                    <view class="right" v-show="HIsStockMgr">
+                    <!-- TODO: 娣诲姞鍏徃鍒ゆ柇锛屽洓缁村皵娓呴櫎浠撲綅鎵爜闄愬埗锛屽叾浠栫収鏃� -->
+                    <view class="right">
                         <uni-combox :candidates="arrayHStockPlaceInNameComputed" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
                             v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange"
                             @confirm="HStockPlaceNameInScan"></uni-combox>
                     </view>
-                    <view class="righton" v-show="!HIsStockMgr">
+<!--                    <view class="righton" v-show="!HIsStockMgr">
                         <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="涓嶅彲鎿嶄綔" />
-                    </view>
+                    </view> -->
                 </view>
                 <view class="form-item">
                     <view class="title">淇濈:</view>
@@ -655,6 +658,7 @@
                 })
             },
             async HWHNameOutScan(e) {
+                return 
                 // 鎵弿浠撳簱鐮�
                 console.log('浠撳簱鐮�: ', e);
                 let index = this.HWHNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
@@ -670,23 +674,41 @@
             async HStockPlaceOutNameScan(e) {
                 // 鎵弿浠撲綅鐮�
                 console.log('浠撲綅鐮�: ', e);
-                let index = this.HStockPlaceNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
-                console.log('index: ', index);
-               // 涓嶅厛缃┖鐨勮瘽锛屾暟鎹啀娆℃壂鎻忕浉鍚岀殑浠撲綅鐮� 涓嶄細瑙﹀彂缁勪欢鍐呯殑鍒锋柊
-                this.hform.HStockPlaceID = 0
-                this.hform.HStockPlaceName = ''
-                await this.$nextTick()
-                if (index == -1) {
-                    uni.showToast({
-                        icon: 'none',
-                        title: '鎵弿浠撲綅鏉$爜瀵瑰簲鐨勪粨浣嶄笉瀛樺湪...'
+                // 涓嶅厛缃┖鐨勮瘽锛屾暟鎹啀娆℃壂鎻忕浉鍚岀殑浠撲綅鐮� 涓嶄細瑙﹀彂缁勪欢鍐呯殑鍒锋柊
+                this.hform.HOutStockPlaceID = 0
+                this.hform.HOutStockPlaceName = ''
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Gy_StockPlace/list',
+                        data: {
+                            sWhere: ` and 鏉$爜缂栧彿 = '${e}'`,
+                            user: uni.getStorageSync('HUserName'),
+                            Organization: uni.getStorageSync('Organization')
+                        },
                     })
-                    this.HOutStockPlaceNameChange('')
-                } else {
-                    this.HOutStockPlaceNameChange(this.HStockPlaceNameList[index]['浠撲綅鍚嶇О'])
+                
+                    if (res.data.count == 1) {
+                
+                        this.hform.HOutStockPlaceID = res.data.data[0].HMainID
+                        this.hform.HOutStockPlaceName = res.data.data[0].浠撲綅鍚嶇О
+                        this.hform.HSCWHID = res.data.data[0].HWHID
+                        this.hform.HSCWHName = res.data.data[0].鎵�灞炰粨搴�
+                    } else {
+                        uni.showToast({
+                            title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                            icon: 'none'
+                        })
+                    }
+                
+                } catch (err) {
+                    uni.showToast({
+                        title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                        icon: 'none'
+                    })
                 }
             },
             async HWHNameInScan(e) {
+                return;
                 // 鎵弿浠撳簱鐮�
                 console.log('浠撳簱鐮�: ', e);
                 let index = this.HWHInNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
@@ -702,16 +724,37 @@
             async HStockPlaceNameInScan(e) {
                 // 鎵弿浠撲綅鐮�
                 console.log('浠撲綅鐮�: ', e);
-                let index = this.HStockPlaceInNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
-                console.log('index: ', index);
-                if (index == -1) {
-                    this.HStockPlaceNameChange('')
-                    uni.showToast({
-                        icon: 'none',
-                        title: '鎵弿浠撲綅鏉$爜瀵瑰簲鐨勪粨浣嶄笉瀛樺湪...'
+                // 涓嶅厛缃┖鐨勮瘽锛屾暟鎹啀娆℃壂鎻忕浉鍚岀殑浠撲綅鐮� 涓嶄細瑙﹀彂缁勪欢鍐呯殑鍒锋柊
+                this.hform.HStockPlaceID = 0
+                this.hform.HStockPlaceName = ''
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Gy_StockPlace/list',
+                        data: {
+                            sWhere: ` and 鏉$爜缂栧彿 = '${e}'`,
+                            user: uni.getStorageSync('HUserName'),
+                            Organization: uni.getStorageSync('Organization')
+                        },
                     })
-                } else {
-                    this.HStockPlaceNameChange(this.HStockPlaceInNameList[index]['浠撲綅鍚嶇О'])
+                
+                    if (res.data.count == 1) {
+                
+                        this.hform.HStockPlaceID = res.data.data[0].HMainID
+                        this.hform.HStockPlaceName = res.data.data[0].浠撲綅鍚嶇О
+                        this.hform.HWHID = res.data.data[0].HWHID
+                        this.hform.HWHName = res.data.data[0].鎵�灞炰粨搴�
+                    } else {
+                        uni.showToast({
+                            title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                            icon: 'none'
+                        })
+                    }
+                
+                } catch (err) {
+                    uni.showToast({
+                        title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                        icon: 'none'
+                    })
                 }
             },
             async qrCodeDisplay() {
@@ -749,10 +792,10 @@
             },
             // 璋冨叆浠撲綅淇敼
             HStockPlaceInNameChange(e) {
-                for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
-                    if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
-                        this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
-                        this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HMainID
+                for (var i = 0; i < this.HStockPlaceInNameList.length; i++) {
+                    if (this.HStockPlaceInNameList[i].浠撲綅鍚嶇О == e) {
+                        this.hform.HStockPlaceName = this.HStockPlaceInNameList[i].浠撲綅鍚嶇О
+                        this.hform.HStockPlaceID = this.HStockPlaceInNameList[i].HMainID
                     }
                 }
             },
@@ -765,9 +808,10 @@
                     if (this.HWHInNameList[i].浠撳簱鍚嶇О == e) {
                         this.hform.HWHName = this.HWHInNameList[i].浠撳簱鍚嶇О
                         this.hform.HWHID = this.HWHInNameList[i].HItemID
-
+                        this.HStockPlaceNameChange(null)
                         if (this.HWHInNameList[i]['鍚敤浠撲綅'] == 'Y') {
                             this.HIsStockMgr = true
+                            this.getStockPlaceRemote(this.HWHInNameList[i]["HSPGroupID"], 1) // 淇敼璋冨叆浠撳簱
                         } else {
                             // this.hform.HStockPlaceName = ''
                             this.HIsStockMgr = false
@@ -1004,34 +1048,34 @@
                     }
                 });
 
-                uni.request({
-                    url: this.serverUrl + '/Gy_StockPlace/list',
-                    data: {
-                        sWhere: "",
-                        user: uni.getStorageSync('HUserName'),
-                        Organization: Organizaiton
-                    },
-                    success: (res) => {
-                        if (res.data.count == 1) {
-                            this.HStockPlaceInNameList = res.data.data
-                            for (var i = 0; i < res.data.data.length; i++) {
-                                this.arrayHStockPlaceInName[i] = res.data.data[i].浠撲綅鍚嶇О
-                            }
-                        } else {
-                            uni.showToast({
-                                title: '浠撲綅鏁版嵁璇锋眰澶辫触',
-                                icon: 'none'
-                            })
-                        }
-                    },
-                    fail: (res) => {
-                        console.log(res);
-                        uni.showToast({
-                            title: '鎺ュ彛璇锋眰澶辫触',
-                            icon: 'none'
-                        })
-                    },
-                });
+                //uni.request({
+                //    url: this.serverUrl + '/Gy_StockPlace/list',
+                //    data: {
+                //        sWhere: "",
+                //        user: uni.getStorageSync('HUserName'),
+                //        Organization: Organizaiton
+                //    },
+                //    success: (res) => {
+                //        if (res.data.count == 1) {
+                //            this.HStockPlaceInNameList = res.data.data
+                //            for (var i = 0; i < res.data.data.length; i++) {
+                //                this.arrayHStockPlaceInName[i] = res.data.data[i].浠撲綅鍚嶇О
+                //            }
+                //        } else {
+                //            uni.showToast({
+                //                title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                //                icon: 'none'
+                //            })
+                //        }
+                //    },
+                //    fail: (res) => {
+                //        console.log(res);
+                //        uni.showToast({
+                //            title: '鎺ュ彛璇锋眰澶辫触',
+                //            icon: 'none'
+                //        })
+                //    },
+                //});
             },
             //鍩虹浠撳簱璧勬枡
             getHBaseList({
@@ -1068,34 +1112,34 @@
                     },
                 });
 
-                uni.request({
-                    url: this.serverUrl + '/Gy_StockPlace/list',
-                    data: {
-                        sWhere: "",
-                        user: uni.getStorageSync('HUserName'),
-                        Organization: uni.getStorageSync('Organization')
-                    },
-                    success: (res) => {
-                        if (res.data.count == 1) {
-                            this.HStockPlaceNameList = res.data.data
-                            for (var i = 0; i < res.data.data.length; i++) {
-                                this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
-                            }
-                        } else {
-                            uni.showToast({
-                                title: '浠撲綅鏁版嵁璇锋眰澶辫触',
-                                icon: 'none'
-                            })
-                        }
-                    },
-                    fail: (res) => {
-                        console.log(res);
-                        uni.showToast({
-                            title: '鎺ュ彛璇锋眰澶辫触',
-                            icon: 'none'
-                        })
-                    },
-                });
+                // uni.request({
+                //     url: this.serverUrl + '/Gy_StockPlace/list',
+                //     data: {
+                //         sWhere: "",
+                //         user: uni.getStorageSync('HUserName'),
+                //         Organization: uni.getStorageSync('Organization')
+                //     },
+                //     success: (res) => {
+                //         if (res.data.count == 1) {
+                //             this.HStockPlaceNameList = res.data.data
+                //             for (var i = 0; i < res.data.data.length; i++) {
+                //                 this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
+                //             }
+                //         } else {
+                //             uni.showToast({
+                //                 title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                //                 icon: 'none'
+                //             })
+                //         }
+                //     },
+                //     fail: (res) => {
+                //         console.log(res);
+                //         uni.showToast({
+                //             title: '鎺ュ彛璇锋眰澶辫触',
+                //             icon: 'none'
+                //         })
+                //     },
+                // });
 
                 // this.getHYDList()
             },
@@ -1249,7 +1293,7 @@
                 });
 
             },
-            //閫夋嫨浠撳簱
+            //閫夋嫨璋冨叆浠撳簱
             HWHNameChange(e) {
                 // var name = e.split("(")
                 for (var i = 0; i < this.HWHNameList.length; i++) {
@@ -1274,15 +1318,59 @@
                     if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
                         this.hform.HSCWHName = this.HWHNameList[i].浠撳簱鍚嶇О
                         this.hform.HSCWHID = this.HWHNameList[i].HItemID
-
+                        this.HOutStockPlaceNameChange(null)
                         if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
                             this.HSCIsStockMgr = true
+                            this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"], 2) // 淇敼璋冨嚭浠撳簱
+                            // 鏌ヨ浠撲綅鏁版嵁
                         } else {
-                            this.hform.HOutStockPlaceName = ''
-                            this.hform.HOutStockPlaceID = ''
+                           
                             this.HSCIsStockMgr = false
                         }
                     }
+                }
+            },
+            // 鑾峰彇浠撲綅
+            async getStockPlaceRemote(HSPGroupID, Mode) {
+                // Mode=1 -> 璋冨叆浠撲綅鏁版嵁鑾峰彇; Mode=2 -> 璋冨嚭浠撲綅鏁版嵁鑾峰彇
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Gy_StockPlace/list',
+                        data: {
+                            sWhere: ` and HSPGroupID = ${HSPGroupID}`,
+                            user: uni.getStorageSync('HUserName'),
+                            Organization: uni.getStorageSync('Organization')
+                        },
+                    })
+            
+                    if (res.data.count == 1) {
+                        if(Mode == 1){
+                            this.HStockPlaceInNameList = res.data.data
+                            for (var i = 0; i < res.data.data.length; i++) {
+                                this.arrayHStockPlaceInName[i] = res.data.data[i].浠撲綅鍚嶇О
+                            }
+                            return 
+                        }
+                        if(Mode == 2) {
+                            this.HStockPlaceNameList = res.data.data
+                            for (var i = 0; i < res.data.data.length; i++) {
+                                this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
+                            }
+                            return
+                        }
+                        
+                    } else {
+                        uni.showToast({
+                            title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                            icon: 'none'
+                        })
+                    }
+            
+                } catch (err) {
+                    uni.showToast({
+                        title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                        icon: 'none'
+                    })
                 }
             },
             HFIFOWHNameChange(e) {
@@ -1293,23 +1381,32 @@
                     }
                 }
             },
-            //閫夋嫨浠撲綅
+            //閫夋嫨璋冨叆浠撲綅
             HStockPlaceNameChange(e) {
-                for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
-                    if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
-                        console.log(this.HStockPlaceNameList[i]);
-                        this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
-                        this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HMainID
-                    }
+                let index = this.HStockPlaceInNameList.findIndex(elem => elem['浠撲綅鍚嶇О'] == e)
+                this.hform.HStockPlaceName = ''
+                this.hform.HStockPlaceID = 0
+                if (index != -1) {
+                    this.hform.HStockPlaceName = this.HStockPlaceInNameList[index].浠撲綅鍚嶇О
+                    this.hform.HStockPlaceID = this.HStockPlaceInNameList[index].HMainID
                 }
             },
+            // 閫夋嫨璋冨嚭浠撲綅
             HOutStockPlaceNameChange(e) {
-                for (var i = 0; i < this.HStockPlaceInNameList.length; i++) {
-                    if (this.HStockPlaceInNameList[i].浠撲綅鍚嶇О == e) {
-                        this.hform.HOutStockPlaceName = this.HStockPlaceInNameList[i].浠撲綅鍚嶇О
-                        this.hform.HOutStockPlaceID = this.HStockPlaceInNameList[i].HMainID
-                    }
-                }
+                let index = this.HStockPlaceNameList.findIndex(elem => elem['浠撲綅鍚嶇О'] == e)
+                this.hform.HOutStockPlaceName = ''
+                this.hform.HOutStockPlaceID = 0
+                if (index != -1) {
+                    this.hform.HOutStockPlaceName = this.HStockPlaceNameList[index].浠撲綅鍚嶇О
+                    this.hform.HOutStockPlaceID = this.HStockPlaceNameList[index].HMainID
+                } 
+                
+                // for (var i = 0; i < this.HStockPlaceInNameList.length; i++) {
+                //     if (this.HStockPlaceInNameList[i].浠撲綅鍚嶇О == e) {
+                //         this.hform.HOutStockPlaceName = this.HStockPlaceInNameList[i].浠撲綅鍚嶇О
+                //         this.hform.HOutStockPlaceID = this.HStockPlaceInNameList[i].HMainID
+                //     }
+                // }
             },
             //閫夋嫨婧愬崟
             HSourceBillNoChange(e) {
@@ -1323,14 +1420,12 @@
             },
             //閫夋嫨婧愬崟绫诲瀷
             HMainSourceBillTypeChange(e) {
-                this.HMainSourceBillType = e.detail.value
-                let index = this.arrayHMainSourceBillType.findIndex(elem => elem == this.HMainSourceBillType)
+                console.log(e)
+                let index = e.detail.value
                 if (index != -1) {
+                    this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
                     this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index]
-                    // this.getHYDList()
                 }
-                
-                console.log(this.HMainSourceBillType, this.hform.HMainSourceBillType)
             },
 
             //鑾峰彇渚涘簲鍟嗘暟鎹�
@@ -2024,6 +2119,9 @@
                 if (!this.hform.HSupName) {
                     this.hform.HSupID = 0
                 }
+                if (!this.hform.HCusName) {
+                    this.hform.HCusID = 0
+                }
                 if (this.hform.HInterID == 0 || !this.hform.HInterID) {
                     uni.showToast({
                         title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�',
diff --git a/utils/i18n.js b/utils/i18n.js
new file mode 100644
index 0000000..de6b8aa
--- /dev/null
+++ b/utils/i18n.js
@@ -0,0 +1,4 @@
+// 杩滅▼鑾峰彇璇█鍖呭苟鍔犺浇
+import i18n from "@/main";
+import { CommonUtils }  from "./common.js"
+

--
Gitblit v1.9.1