wtt
2025-12-22 394fdfc5f67f8c98dbe05492056295fd03aba4ab
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -34,18 +34,14 @@
                                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" style="
                                background-color: #3a78ff;
                                padding: 6rpx;
                                color: #fff;
                                border-radius: 100%;" size="20" @click="toBillSelector"></uni-icons>
                            <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>
@@ -54,8 +50,10 @@
                        <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>
@@ -63,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">产品代码</view>
@@ -71,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">
@@ -93,7 +94,7 @@
                        <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>
@@ -119,7 +120,8 @@
                            <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>
@@ -367,14 +369,14 @@
                    <view class="list" v-else>
                        <uni-card v-for="(br, index) in badReasons" :key="index">
                            <view class="card-detail">
                                <view class="detail"> <text>序号:</text>{{ index+1 }} </view>
                                <view class="detail" style="min-width: 14em;">
                                <view class="detail editable"> <text>序号:</text>{{ index+1 }} </view>
                                <view class="detail editable">
                                    <view style="flex-shrink: 0"><text>不良原因代码:</text></view>
                                    <text>{{ br.HBadReasonNumber }} </text>
                                    <view style="flex: 1;"><text>{{ br.HBadReasonNumber }} </text></view>
                                </view>
                                <view class="detail editable">
                                    <view style="flex-shrink: 0"><text>不良原因:</text></view>
                                    <text>{{ br.HBadReasonName }} </text>
                                    <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>
@@ -572,7 +574,6 @@
                subTabSelected: 1,
                // 源单状态控制
                hasSourceBill: false,
                // 控制当前显示的弹窗模块
                enablePopupModule: "",
@@ -642,6 +643,7 @@
                    "采购订单",
                    "采购入库单",
                ],
                hasSourceBill: false,
                // 主表属性
                hform: {
                    HBillType: '7503',
@@ -716,8 +718,8 @@
                this.badReasons.push({
                    'HBadReasonNumber': 0,
                    'HBadReasonNumber': "",
                    'HBadReasonHName': "",
                    'HCheckMan': this.hform.HFirstCheckEmp,
                    'HBadReasonName': "",
                    'HCheckMan': this.hform.HFirstCheckEmpName,
                    'HQty': 0,
                    'HGroupName': this.hform.HGroupName || "",
                    'HSourceName': this.hform.HSourceName
@@ -741,23 +743,25 @@
                        }
                    })
                    console.log(res)
                    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].检验方案ID
                        this.get_CheckItem();
                        this.hasSourceBill = true
                        this.$refs['billList'].exit()
                    } else {
                        CommonUtils.showTips({
@@ -838,11 +842,12 @@
                    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].检验方案ID
                    this.hasSourceBill = true
                    this.get_CheckItem();
                } else {
                    CommonUtils.showTips({
@@ -1139,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;
@@ -1320,11 +1326,11 @@
                this.$refs.listPopup.showPopup();
            },
            async showSelectorModule_BadReason(item, index){
                this.enablePopupModule = this.PopupModuleNameList[index];
            async showSelectorModule_BadReason(itemIndex, Moduleindex) {
                this.enablePopupModule = this.PopupModuleNameList[Moduleindex];
                console.log("this.$refs: ", this.$refs);
                await this.$nextTick();
                this.$refs.listPopup.showPopup(index);
                this.$refs.listPopup.showPopup(itemIndex);
            },
            getAnalysisMethodDisplay(val) {
                console.log("AnalysisMethod: ", val);
@@ -1614,7 +1620,15 @@
            },
            // 不良原因回调
            async HBadReasonComplete(e) {
                console.log('e: ',e);
                console.log('e: ', e);
                Object.assign(this.badReasons[e.index], {
                    HBadReasonName: e.retVal[0]['不良原因名称'],
                    HBadReasonNumber: e.retVal[0]['不良原因代码'],
                    HBadReasonID: e.retVal[0]['HItemID']
                })
                this.$refs['listPopup'].exit()
            },
            async get_QC_TakeSampleCheckBillList() {
                // 取样单查询
@@ -1961,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,
                        },
@@ -2004,13 +2019,13 @@
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `首件检验单保存错误: ${Message}`,
                            message: `来料检验单保存错误: ${Message}`,
                        });
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `首件检验单保存错误: ${err}`,
                        message: `来料检验单保存错误: ${err}`,
                    });
                }
            },
@@ -2159,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
@@ -2430,7 +2462,6 @@
    }
    .icon-wrapper-big {
        background-color: #3a78ff;
        border-radius: 100%;
        width: 50rpx;
        height: 50rpx;
@@ -2467,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>