wtt
2026-01-04 529d5bb818b888805a71b52294414e9840703bde
添加自检单,模具领用出库退库列表优化
9个文件已修改
2个文件已添加
2895 ■■■■■ 已修改文件
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue 2253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue 572 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab4.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/auth.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "2.0.40",
    "versionCode" : 240,
    "versionName" : "2.0.41",
    "versionCode" : 241,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages.json
@@ -1390,6 +1390,19 @@
                "navigationBarTitleText": "模具报废出库单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill",
            "style": {
                "navigationBarTitleText": "车间自检单"
            }
        },
        {
            "path": "pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList",
            "style": {
                "navigationBarTitleText": "车间自检单列表",
                "enablePullDownRefresh": true
            }
        }
        
    ],
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
@@ -112,7 +112,7 @@
                        <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号"
                            v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
                        <input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo"
                            v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" placeholder="请输入源单单号" />
                            v-model="hform.HSourceBillNo"  placeholder="请输入源单单号" />
                
                    </view>
                    <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue
@@ -17,7 +17,7 @@
                <view class="title">开始时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
                        <view class="picker-overlay"></view>
                        <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="请选择" />
                    </picker>
                </view>
@@ -26,7 +26,7 @@
                <view class="title">结束时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
                        <view class="picker-overlay"></view>
                        <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="请选择" />
                    </picker>
                </view>
@@ -362,6 +362,9 @@
</script>
<style lang="scss" scoped>
    picker input{
        pointer-events: none;
    }
    .form{
        width: 640rpx;
        margin: 20rpx auto;
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
@@ -90,7 +90,7 @@
                    <view class="title">源单类型:</view>
                    <view class="right" v-show="showHMainSourceBillType">
                        <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
                            @change="HMainSourceBillTypeChange">
                            >
                            <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
                                placeholder="请选择源单类型" />
                            <view class="picker-overlay"></view>
@@ -107,11 +107,11 @@
                        <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号"
                            v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
                        <input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo"
                            v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" placeholder="请输入源单单号" />
                            v-model="hform.HSourceBillNo"  placeholder="请输入源单单号" />
                    </view>
                    <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
                        <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
                        <uni-icons type="search" size="20" ></uni-icons>
                    </view>
                    <view class="righton" v-show="!showHSourceBillNo">
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue
@@ -17,7 +17,7 @@
                <view class="title">开始时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
                        <view class="picker-overlay"></view>
                        <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="请选择" />
                    </picker>
                </view>
@@ -26,7 +26,7 @@
                <view class="title">结束时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
                        <view class="picker-overlay"></view>
                        <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="请选择" />
                    </picker>
                </view>
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue
New file
@@ -0,0 +1,2253 @@
<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 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">
                        <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">
                        <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 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" />
                                <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" 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 == 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" v-if="checkItem.HQCStd">
                                    <text>检验值:</text>{{ checkItem.HQCStd }}
                                </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="sampleDestory">
                                        <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="{
                data: checkItems[item.checkItemId],
                list: InspectValues[item.checkItemId],
                mode: 2 // 巡检检验值模块
              }">
                        </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>
</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,
                mainTabSelected: 1,
                subTabSelected: 1,
                // 源单状态控制
                hasSourceBill: false,
                // 控制当前显示的弹窗模块
                enablePopupModule: "",
                PopupModuleNameList: [
                    "",
                    "SampleScheme",
                    "CheckItem",
                    "InspectMent",
                    "Material",
                    "ICMOBill",
                    "ProcExchBill",
                    "QCScheme",
                    "Process",
                ],
                // 当前操作的检验单ID缓存
                currentChechItemIDCache: -1,
                // 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: "抽样检验",
                    },
                },
                // 源单类型
                HSourceBillType: "工序进站接收单",
                HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"],
                HSourceBillTypeNameList: [
                    "工序进站接收单",
                    "工序委外接收单",
                    "生产订单",
                    "工序流转卡",
                ],
                // 主表属性
                hform: {
                    HSourceBillType: "7518",
                    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,
                    HMainSourceBillType: "",
                    HMainSourceInterID: "0",
                    HMainSourceEntryID: "1",
                    HMainSourceBillNo: "",
                },
                // 检验项目和抽样检验 值
                checkItems: {},
                // 检测值模块
                InspectModules: {},
                // 检测值
                InspectValues: {},
            };
        },
        methods: {
            // 源单类型选择
            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 == 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,
                            },
                        });
                        let {
                            count,
                            Message,
                            data
                        } = res.data;
                        if (count != 1) {
                            CommonUtils.showTips({
                                title: "温馨提示",
                                message: `获取检验方案 错误: ${Message}`,
                            });
                            return;
                        }
                        this.hform.HQCSchemeName = data[0].检验方案名称;
                        this.hform.HQCSchemeID = data[0].hmainid;
                        this.get_CheckItem();
                    } catch (err) {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取检验方案 错误: ${err}`,
                        });
                    }
                }
            },
            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].检验方案ID;
                    this.hform.HProcName = data[0].当前工序;
                    this.hform.HBatchNo = data[0].批号;
                    this.hasSourceBill = true
                    this.get_CheckItem();
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取工序流转卡 错误: ${err}`,
                    });
                }
            },
            async LoadingInformation_ICMO(HBarCode) {
                // 生产订单
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/QC_FirstPieceCheckBill/get_ICMOBill_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;
                    this.hform.HProcExchQty = data[0].流转卡数量 || 0;
                    this.hform.HICMOBillNo = data[0].任务单;
                    this.hform.HICMOInterID = data[0].HICMOInterID;
                    this.hform.HICMOQty = data[0].HICMOQty;
                    this.hform.HSourceName = data[0].生产资源;
                    this.hform.HSourceID = data[0].HSourceID;
                    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].检验方案ID;
                    this.hform.HProcName = data[0].当前工序;
                    this.hasSourceBill = true
                    this.get_CheckItem();
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取生产订单 错误: ${err}`,
                    });
                }
            },
            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].HInterID;
                    HICMOEntryID = data[0].HICMOEntryID || 1;
                    this.hasSourceBill = true
                    this.get_CheckItem();
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取工序委外接收单 错误: ${err}`,
                    });
                }
            },
            async LoadingInformation_StationInBill(HBarCode) {
                // 进站接收单
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/QC_FirstPieceCheckBill/get_StationInBill_ByHBillNo",
                        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;
                    this.hform.HProcExchQty = data[0].流转卡数量 || 0;
                    this.hform.HICMOBillNo = data[0].任务单;
                    this.hform.HICMOInterID = data[0].HICMOInterID;
                    this.hform.HICMOQty = data[0].HICMOQty;
                    this.hform.HSourceName = data[0].生产资源;
                    this.hform.HSourceID = data[0].HSourceID;
                    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].检验方案ID;
                    this.hform.HProcName = data[0].当前工序;
                    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 部门代码`,
                            user: getUserInfo()["Czymc"],
                            Organization: uni.getStorageSync("Organization"),
                        },
                    });
                    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;
                }
                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"],
                        },
                    });
                    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;
                }
                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;
                    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.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.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"
                ];
                // 检查是否可以新增检验值项
                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["代码"],
                        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["抽样方案代码"],
                        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];
                }
            },
            // 产品代码返回
            async MaterComplete(e) {
                console.log("MaterRet: ", e);
                for (var key in e["retVal"]) {
                    let data = e["retVal"][key];
                    Object.assign(this.hform, {
                        HMaterNumber: data["物料代码"],
                        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.产品代码,
                        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 = "";
                if (HProcID == "0" || HProcID == "") {
                    CommonUtils.showTips({
                        message: "请选择工序",
                    });
                    return;
                }
                sWhere = " and 工序流转卡主内码='" + HProcExchInterID + "' and HProcID=" + HProcID;
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
                        data: {
                            sWhere: sWhere,
                            user: getUserInfo()["Czymc"],
                        },
                    });
                    let {
                        data,
                        count,
                        Message
                    } = res.data;
                    if (count != 1) {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取取样单信息失败: ${Message}`,
                        });
                    }
                    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;
                if (HProcID != "0") {
                    sWhere += " and HProcID=" + HProcID;
                }
                if (HSourceID != "0") {
                    sWhere += " and HSourceID=" + HSourceID;
                }
                sWhere += " and HSourceInterID=" + HProcExchInterID;
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/CheckBill/GetICMOBillStatusList",
                        data: {
                            sWhere: sWhere,
                            user: getUserInfo()["Czymc"],
                        },
                    });
                    let {
                        data,
                        count,
                        Message
                    } = res.data;
                    if (count != 1) {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取生产工单信息失败: ${Message}`,
                        });
                    }
                    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.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_Sec",
                        data: {
                            CheckProjectID: this.hform.HQCSchemeID || 0,
                            HBatchQty: this.hform.HProcExchQty || 0,
                            HMaterID: this.hform.HMaterID,
                            HBillType: '自检方案'
                        },
                    });
                    let {
                        data,
                        count,
                        Message
                    } = res.data;
                    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.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: "7518",
                        },
                    });
                    if (!res) {
                        return;
                    }
                    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.HCheckLastResult();
            },
            checkSubmitValidate() {
                // if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
                //     CommonUtils.showTips({
                //         message: "任务单数量不能为空且不能小于等于0!",
                //     });
                //     return false;
                // }
                if (this.hform.HFirstCheckEmp == 0) {
                    CommonUtils.showTips({
                        message: "检验员未选择!",
                    });
                    return false;
                }
                for (let key in this.checkItems) {
                    if (!this.checkItems[key].HQCCheckItemID) {
                        CommonUtils.showTips({
                            message: `第${this.checkItems[key].num}行检验项目不能为空!`,
                        });
                        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;
                    }
                }
                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);
                    let res = await CommonUtils.doRequest2Sync({
                        url: "/QC_WorkSelfCheckBill/set_SaveBill",
                        data: {
                            sMainSub: sMainSub,
                        },
                        method: "POST",
                    });
                    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/ZLGL/xunjianjianyan/PatrolProcCheckBill?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/WorkSelfCheckBill/WorkSelfCheckBill",
                });
            },
            goBack() {
                uni.navigateBack();
            },
            async RoadBillMain() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillEdit",
                        data: {
                            sWhere: ` and hmainid=${this.hform.HInterID}`,
                            user: getUserInfo()["Czymc"],
                        },
                    });
                    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].物料代码,
                            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].检验方案ID,
                            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].检验结果
                            });
                        }
                        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();
            }
            await this.InitHSource();
            await this.InitHWorkShift();
            await this.InitHEmp();
        },
    };
</script>
<style lang="scss" scoped>
    input {
        width: inherit;
        font-size: 26rpx;
    }
    .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;
        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;
        }
    }
    .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;
            .left {
                width: 208rpx;
                text {
                    color: red;
                    font-weight: bold;
                }
            }
            .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-input-placeholder,
                    .uni-input-input {
                        font-size: 26rpx;
                    }
                }
                .uni-combox::v-deep input {
                    height: inherit;
                    font-size: 26rpx;
                }
            }
            .disabled {
                border: 1px solid #e4e4e4;
                background-color: #e4e4e4;
            }
            .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;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #3a78ff;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #acacac;
            color: #fff;
            // position: absolute;
            // right: 120rpx;
        }
        .btn-d {
            background-color: #ff8901;
            color: #fff;
        }
    }
    .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;
        }
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    .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;
            input {
                font-size: 26rpx;
            }
            .detail {
                // width: 50%;
                box-sizing: border-box;
                font-size: 26rpx;
                color: #555;
                padding-right: 20rpx;
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
            .editable {
                width: 50%;
                display: inline-flex;
                flex-direction: row;
                align-items: center;
                text {
                    flex-shrink: 0;
                }
                .sampleDestory {
                    border: 1px solid #acacac;
                    border-radius: 5rpx;
                    padding: 0 12rpx;
                }
            }
        }
    }
    .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;
        }
    }
    .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;
        }
    }
    .more {
        color: #888;
        font-size: 22rpx;
        display: flex;
        border-top: 1px solid #eee;
        padding-top: 10rpx;
        .part {
            width: 100%;
            text-align: center;
        }
    }
    .pass-background {
        background-color: #cee3f2;
        border: none;
    }
    .unpass-background {
        background-color: #f0d6e3;
        border: none;
    }
</style>
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue
New file
@@ -0,0 +1,572 @@
<template>
    <view class="page" id="pageContent">
        <view class="search-condition-zone">
            <view class="form-item">
                <view class="left">
                    日期:
                </view>
                <view class="daterange" style="flex: 1;">
                    <view class="right general">
                        <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
                            <view>{{hform.HBeginDate}}</view>
                        </uni-datetime-picker>
                    </view>
                    <view>—</view>
                    <view class="right general">
                        <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
                            <view>{{hform.HEndDate}}</view>
                        </uni-datetime-picker>
                    </view>
                </view>
            </view>
            <view class="form-item">
                <view class="left">
                    单据号:
                </view>
                <view class="right general">
                    <input type="text" v-model="hform.HBillNo" />
                </view>
            </view>
        </view>
        <view class="button-zone">
            <button type="default" class="btn-a" size="mini" @tap="cmdAdd">新增</button>
            <button type="default" class="btn-a" size="mini" @tap="cmdSearch">查询</button>
            <button type="default" class="btn-c" size="mini" @tap="exit">退出</button>
        </view>
        <view class="info-list-zone" id="scroll-content" :style="{height: scrollContentHeight + 'px'}">
            <view class="card-item" v-for="(item, index) in listData" :key="index">
                <uni-card :title="item['单据号']" :extra="'日期:' + item['日期'].split('T')[0]"
                    @tap="showDetail = showDetail==index?-1:index">
                    <view class="card-detail">
                        <view class="detail" v-if="item['单据类型']">
                            <text>单据类型:</text>{{item['单据类型']}}
                        </view>
                        <view class="detail" v-if="item['单据状态']">
                            <text>单据状态:</text>{{item['单据状态']}}
                        </view>
                        <view class="detail" v-if="item['判断结论']">
                            <text>判断结论:</text>{{item['判断结论']}}
                        </view>
                        <view class="detail" v-if="item['物料代码']">
                            <text>物料代码:</text>{{item['物料代码']}}
                        </view>
                        <view class="detail" v-if="item['物料名称']">
                            <text>物料名称:</text>{{item['物料名称']}}
                        </view>
                        <view class="detail" v-if="item['规格型号']">
                            <text>规格型号:</text>{{item['规格型号']}}
                        </view>
                        <view class="detail" v-if="item['检验方案']">
                            <text>检验方案:</text>{{item['检验方案']}}
                        </view>
                        <view class="detail" v-if="item['规格型号']">
                            <text>规格型号:</text>{{item['规格型号']}}
                        </view>
                    </view>
                    <view class="card-detail" v-if="showDetail == index">
                        <view class="detail" v-if="item['质检员']">
                            <text>质检员:</text>{{item['质检员']}}
                        </view>
                        <view class="detail" v-if="item['部门']">
                            <text>部门:</text>{{item['部门']}}
                        </view>
                        <view class="detail" v-if="item['生产订单']">
                            <text>生产订单:</text>{{item['生产订单']}}
                        </view>
                        <view class="detail" v-if="item['工序流转卡号']">
                            <text>工序流转卡号:</text>{{item['工序流转卡号']}}
                        </view>
                        <view class="detail" v-if="item['生产资源名称']">
                            <text>生产资源名称:</text>{{item['生产资源名称']}}
                        </view>
                        <view class="detail" v-if="item['创建人']">
                            <text>创建人:</text>{{item['创建人']}}
                        </view>
                        <view class="detail" v-if="item['审核人']">
                            <text>审核人:</text>{{item['审核人']}}
                        </view>
                        <view class="detail" v-if="item['组织名称']">
                            <text>组织名称:</text>{{item['组织名称']}}
                        </view>
                        <view class="detail" v-if="item['备注']">
                            <text>备注:</text>{{item['备注']}}
                        </view>
                        <view class="detail" v-if="item['源单号']">
                            <text>源单号:</text>{{item['源单号']}}
                        </view>
                        <view class="detail" v-if="item['制单日期']">
                            <text>制单日期:</text>{{item['制单日期']}}
                        </view>
                        <view class="detail" v-if="item['审核日期']">
                            <text>审核日期:</text>{{item['审核日期']}}
                        </view>
                    </view>
                    <view class="more" v-if="showDetail == index && operations != index">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <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;">
                            <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>
                    <view class="op" v-if="operations == index">
                        <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button>
                        <button class="op3" size="mini" plain @tap.stop="audit(item, 1)" v-if="!listData[index]['审核人']">审核</button>
                        <button class="op3" size="mini" plain @tap.stop="audit(item, 2)" v-if="listData[index]['审核人']">反审核</button>
                        <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button>
                        <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                    </view>
                </uni-card>
            </view>
            <view class="over" v-if="listData.length == 0">暂无数据</view>
        </view>
        <view class="pagination-zone" id="pagination-zone">
            <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total"
                v-model="paginationMeta.current" @change="onPaginationChangeHandler"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '@/utils/common'
    import {
        getUserInfo
    } from '@/utils/auth'
    import dayjs, {
        Dayjs
    } from 'dayjs'
    export default {
        data() {
            return {
                navHeight: 0,
                scrollTop: 0,
                showDetail: -1,
                operations: -1,
                hform: {
                    HBeginDate: dayjs(new Date).subtract(30, 'd').format('YYYY-MM-DD'),
                    HEndDate: dayjs(new Date).format('YYYY-MM-DD'),
                    HBillNo: ''
                },
                paginationMeta: {
                    current: 1,
                    total: 0,
                    // pageSize: 30,
                    pageSize: 10,
                },
                pageMeta: {
                    scrollContentTop: 0,
                    bottomBtnTop: 0,
                },
                listData: [],
                listDataShow: [],
            }
        },
        computed: {
            scrollContentHeight: {
                get() {
                    return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
                }
            }
        },
        methods: {
            exit() {
                uni.navigateBack()
            },
            cmdAdd() {
                uni.navigateTo({
                    url: "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill?operationType=1"
                })
            },
            async cmdSearch() {
                let sWhere = ''
                if (this.hform.HBeginDate != "" && this.hform.HEndDate != "") {
                    sWhere += " and  CONVERT(varchar(100),日期, 23) between '" + this.hform.HBeginDate + "' and '" +
                        this.hform.HEndDate + "' ";
                }
                if (this.hform.HBillNo != "") {
                    sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"
                }
                try {
                    let res = await CommonUtils.doRequest2Sync({
                        url: '/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillListPage',
                        data: {
                            "sWhere": sWhere,
                            "user": getUserInfo()["Czymc"],
                            "page": this.paginationMeta.current,
                            "size": this.paginationMeta.pageSize
                        },
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count > 0) {
                        this.listData = data
                        this.paginationMeta.total = count
                    } else {
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }
                } catch (err) {
                    console.warn(err);
                    uni.showToast({
                        title: '接口请求失败:' + err,
                        icon: 'none'
                    })
                }
            },
            async onPaginationChangeHandler({
                current
            }) {
                this.paginationMeta.current = current
                this.cmdSearch()
            },
            async audit(item, mode) {
                console.log('审核单据: ',item);
                try{
                    let res = await CommonUtils.doRequest2Sync({
                        method: 'GET',
                        url: '/QC_WorkSelfCheckBill/AuditQC_WorkSelfCheckBill',
                        data: {
                            HInterID: item["hmainid"],
                            type: mode,
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    if(!res) {
                        return
                    }
                    let {count, data, Message} = res.data
                    if(count == 1) {
                        CommonUtils.showTips({
                            message: `${item["审核人"]?'反审核':'审核'}成功`
                        })
                        this.$forceUpdate()
                        setTimeout(() => {
                            this.cmdSearch()
                        }, 2000)
                    }else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `单据${item["审核人"]?'反审核':'审核'}失败: ${Message}`
                        })
                    }
                }catch(err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `单据${item["审核人"]?'反审核':'审核'}错误: ${err}`
                    })
                }
            },
            async del(item) {
                console.log("delItem: ", item);
                uni.showModal({
                    title: '提示',
                    content: '确认要删除记录?删除后不能恢复',
                    success: async (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            try {
                                let res = await CommonUtils.doRequest2Sync({
                                    url: '/QC_WorkSelfCheckBill/DeltetQC_WorkSelfCheckBill',
                                    data: {
                                        "HInterID": item.hmainid,
                                        "user": getUserInfo()["Czymc"]
                                    }
                                })
                                if (!res) {
                                    return
                                }
                                let {
                                    count,
                                    code,
                                    Message
                                } = res.data
                                if (count == 0) {
                                    return uni.showModal({
                                        title: '错误提示',
                                        content: `删除错误: ${Message}`,
                                        showCancel: false
                                    })
                                }
                                uni.showToast({
                                    title: '删除成功',
                                    icon: 'none'
                                })
                                this.cmdSearch()
                            } catch (err) {
                                uni.showModal({
                                    title: '错误提示',
                                    content: `接口请求失败: ${err}`,
                                    showCancel: false
                                })
                            }
                        }
                    },
                })
            },
            edit(item) {
                console.log("editItem:", item)
                uni.navigateTo({
                    url: `/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill?operationType=3&linterid=${item.hmainid}`
                })
            }
        },
        onShow() {
            this.$nextTick(() => {
                this.cmdSearch()
            })
        },
        onReady() {
            // #ifndef MP-WEIXIN
            let query = uni.createSelectorQuery().in(this)
            query.select("#scroll-content").boundingClientRect((data) => {
                this.pageMeta.scrollContentTop = data.top
            }).exec()
            query.select("#pagination-zone").boundingClientRect((data) => {
                this.pageMeta.bottomBtnTop = data.top
            }).exec()
            // #endif
            // #ifdef MP-WEIXIN
            // 微信不支持 uni.createSelectorQuery().in(this)
            // #endif
        },
    }
</script>
<style lang="scss" scoped>
    .page {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 20rpx;
        padding: 20rpx 0;
        position: relative;
        .button-zone {
            height: auto;
            box-sizing: border-box;
            padding-top: 20rpx;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            flex-wrap: wrap;
            button {
                border-radius: 50rpx;
                width: 180rpx;
                height: 66rpx;
                line-height: 66rpx;
                font-size: 28rpx;
            }
            .btn-a {
                background-color: #3a78ff;
                color: #fff;
            }
            .btn-c {
                background-color: #ff5722;
                color: #fff;
            }
        }
        .search-condition-zone {
            height: auto;
            box-sizing: border-box;
            padding: 0 60rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            .form-item {
                display: flex;
                flex-direction: row;
                gap: 20rpx;
                align-items: center;
                font-size: 28rpx;
                .left {
                    width: 4rem;
                }
                .right {
                    flex: 1;
                    padding: 8rpx 16rpx;
                    .search {
                        width: 28rpx;
                        height: 28rpx;
                    }
                    input {
                        font-size: 28rpx;
                    }
                    .uni-combox {
                        padding: 0;
                        margin: 0;
                        ::v-deep .uni-combox__input {
                            font-size: 28rpx;
                            height: auto;
                        }
                    }
                }
                .general {
                    border-radius: 22rpx;
                    border: 1px solid #acacac;
                }
                .disabled {
                    border-radius: 22rpx;
                    border: 1px solid #e4e4e4;
                    background-color: #e4e4e4;
                }
            }
        }
        .info-list-zone {
            overflow-y: auto;
            .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;
                        }
                    }
                }
            }
        }
        .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;
            }
        }
        .op {
            display: flex;
            justify-content: space-between;
            gap: 20rpx;
            margin-top: 20rpx;
            flex-wrap: wrap;
            align-content: flex-start;
            button {
                margin: 0;
                flex-shrink: 0;
                padding: 0;
                width: 150rpx;
                flex-basis: 150rpx;
                font-size: 25rpx;
            }
            .op1 {
                border: 1px solid #41a863;
                color: #41a863;
            }
            .op2 {
                border: 1px solid #d98d00;
                color: #d98d00;
            }
            .op3 {
                border: 1px solid #3a78ff;
                color: #3a78ff;
            }
            .op4 {
                border: 1px solid #da0000;
                color: #da0000;
            }
            .op5 {
                border: 1px solid #888;
                color: #888;
            }
        }
        .pagination-zone {
            position: fixed;
            bottom: 0;
            box-sizing: border-box;
            background-color: #fff;
            box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
            padding: 20rpx 40rpx 20rpx 40rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            justify-content: space-between;
            width: 100%;
        }
    }
</style>
pages/index/tab3.vue
@@ -112,20 +112,34 @@
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料出库单列表",
                        "text": "模具领用出库单列表",
                        "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList",
                        "id": 49,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料退库单列表",
                        "text": "模具领用退库单列表",
                        "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList",
                        "id": 50,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领用出库单",
                        "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill",
                        "id": 49,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领用退库单",
                        "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill",
                        "id": 50,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具调拨单列表",
                        "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList",
                        "id": 51,
pages/index/tab4.vue
@@ -134,6 +134,20 @@
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "车间自检单",
                        "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "车间自检单查询",
                        "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList",
                        "id": 55,
                        "hidden": false
                    }
                    
                ]
utils/auth.js
@@ -74,7 +74,7 @@
}
export function getUserInfo() {
  let userinfo = uni.getStorageSync('userinfo');
  console.log('userinfo', userinfo)
  //console.log('userinfo', userinfo)
  if (userinfo) {
    return JSON.parse(userinfo);
  }