pages/ZLGL/shoujianjianyan/firstCheckBill.vue
@@ -5,7 +5,8 @@
            <!-- 主表页签 -->
            <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 == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">其他信息</view>
                <view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">制单信息</view>
            </view>
            <!-- 主表内容 -->
            <view class="bill-main-contents">
@@ -26,17 +27,7 @@
                            </uni-datetime-picker>
                        </view>
                    </view>
                    <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" />
                                <view class="picker-overlay"></view>
                            </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="请输入或扫描源单号"
@@ -51,25 +42,7 @@
                " size="20" @click="toScanCode"></uni-icons>
                        </view>
                    </view>
                    <view class="form-item">
                        <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">
                        <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"></view>
                    </view> -->
                    <view class="form-item">
                        <view class="left">任务单号</view>
                        <view class="right disabled">
@@ -79,24 +52,12 @@
                                @click="showSelectorModule(hform, 5)"></uni-icons></view>
                    </view>
                    <view class="form-item">
                        <view class="left">任务单数量</view>
                        <view class="right">
                            <input type="number" v-model="hform.HICMOQty" />
                        </view>
                    </view>
                    <view class="form-item">
                        <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">流转卡数量</view>
                        <view class="right">
                            <input type="number" v-model="hform.HProcExchQty" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品代码</view>
@@ -129,12 +90,7 @@
                        <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">
                            <input type="text" value="" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">判断结论</view>
                        <view class="right none-border">
@@ -159,21 +115,74 @@
                        <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">
                            <input type="text" value="" />
                        <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" />
                                <view class="picker-overlay"></view>
                            </picker>
                        </view>
                    </view>
                    <view class="form-item">
                        <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">
                        <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">
                            <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" value="" />
                            <input type="text" v-model="hform.HErrTreatment" value="" />
                        </view>
                    </view>
                    <!-- <view class="form-item">
                        <view class="left">任务单数量</view>
                        <view class="right">
                            <input type="number" v-model="hform.HICMOQty" />
                        </view>
                    </view> -->
                    <view class="form-item">
                        <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" v-model="hform.HBatchNo" />
                        </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 == 2">
                <view class="bill-main-content" v-if="mainTabSelected == 3">
                    <view class="form-item">
                        <view class="left">制单人</view>
                        <view class="right disabled">
@@ -304,8 +313,11 @@
                                <view class="detail" v-if="checkItem.HUnit">
                                    <text>单位:</text>{{ checkItem.HUnit }}
                                </view>
                                <view class="detail" v-if="checkItem.HQCStd">
                                    <text>检验值:</text>{{ checkItem.HQCStd }}
                                <!-- 只有定量分析才启用检验值 -->
                                <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 }}
@@ -383,7 +395,7 @@
                                </view>
                                <view class="detail editable">
                                    <text>样本破坏数:</text>
                                    <view class="sampleDestory">
                                    <view class="editable-input">
                                        <input type="number" v-model="SamplingItem.HSampleDamageQty" />
                                    </view>
                                </view>
@@ -623,6 +635,21 @@
            };
        },
        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];
@@ -1099,7 +1126,7 @@
                this.$refs.listPopup.showPopup();
            },
            getAnalysisMethodDisplay(val) {
                console.log("AnalysisMethodVal: ", val);
                console.log("AnalysisMethod: ", val);
                if (val) {
                    return this.arrayAnalysisMethod.find((e) => e.value == val).name;
                }
@@ -1632,12 +1659,12 @@
            },
            checkSubmitValidate() {
                if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
                    CommonUtils.showTips({
                        message: "任务单数量不能为空且不能小于等于0!",
                    });
                    return false;
                }
                // if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
                //    CommonUtils.showTips({
                //       message: "任务单数量不能为空且不能小于等于0!",
                //    });
                //    return false;
                // }
                if (this.hform.HFirstCheckEmp == 0) {
                    CommonUtils.showTips({
@@ -1757,7 +1784,7 @@
                                if (res.confirm) {
                                    console.log("用户点击确定");
                                    uni.redirectTo({
                                        url: "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1",
                                        url: "/pages/ZLGL/shoujianjianyan/form?operationType=1",
                                    });
                                } else if (res.cancel) {
                                    console.log("用户点击取消");
@@ -1880,9 +1907,6 @@
                                    return '其他检验'
                                }
                            }(),
                        });
                        for (let i = 0; i < data.length; i++) {
@@ -1928,9 +1952,7 @@
                                HStrictness: data[i].严格度,
                                HInspectResultToSee: data[i].检验结果
                            });
                        }
                        this.hasSourceBill = true
                    } else {
@@ -1952,9 +1974,7 @@
            this.hform.HInterID = e.linterid || 0;
            if (this.operationType == 1) {
                await this.getMaxBillNo();
            } else if (this.operationType == 2) {
            } else if (this.operationType == 3) {
            } else if (this.operationType == 2) {} else if (this.operationType == 3) {
                await this.RoadBillMain();
            }
@@ -2177,7 +2197,7 @@
                    flex-shrink: 0;
                }
                .sampleDestory {
                .editable-input {
                    border: 1px solid #acacac;
                    border-radius: 5rpx;
                    padding: 0 12rpx;