chenhaozhe
9 天以前 7fee2d3972fc2d9a9bd251279c658aaf5d6a039e
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
15个文件已修改
3个文件已添加
2897 ■■■■ 已修改文件
package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/Kf_MoveStockBill_CusBar/Kf_MoveStockBill_CusBar_APP.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue 173 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill.vue 162 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/shangmudan/MouldUpperBill.vue 155 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/xiamodan/MouldLowerBill.vue 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMain.vue 1368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMainList.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue 118 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast2.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gongxuOut/Cj_StationOutBill_Standard.vue 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/login.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab4.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomamingxi/tiaomamingxi.vue 509 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/weiwaigxIn/Cj_StationEntrustInBill.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/weiwaigxOut/Cj_StationEntrustOutBill.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -22,4 +22,4 @@
    "uqrcodejs": "^4.0.7",
    "vue-i18n": "^9.1.9"
  }
}
}
pages/Kf_MoveStockBill_CusBar/Kf_MoveStockBill_CusBar_APP.vue
@@ -219,8 +219,9 @@
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="list" v-for="(item,index) in HMaterList" :key="index">
            }">
                <!-- 物料列表 - 使用排序后的数据 -->
                <view class="list" v-for="(item,index) in paginatedMaterList" :key="index">
                    <uni-card :title="item.物料名称" :extra="item.物料代码" style="margin: 10px;" @tap="delMater(item)">
                        <view class="card-detail">
                            <view class="detail">
@@ -241,15 +242,21 @@
                            <view class="detail" v-if="item.辅助属性">
                                <text>辅助属性:</text>{{item.辅助属性}}
                            </view>
                            <!-- 兴达客户 功能 -->
                            <view class="detail" v-if="materMeta[0].HWHName && /兴达/.test(hform.HStockOrgName
                            )">
                            <view class="detail" v-if="materMeta[0].HWHName && /兴达/.test(hform.HStockOrgName)">
                                <text>仓库:</text>{{materMeta[0].HWHName}}
                            </view>
                        </view>
                    </uni-card>
                </view>
                <view class="over" v-if="HMaterList.length == 0">暂无数据</view>
                <view style="padding: 10px; background: #f5f5f5; display: flex; justify-content: space-between; align-items: center;">
                    <text>共 {{ sortedMaterList.length }} 条</text>
                    <view>
                        <button size="mini" @click="prevPage" :disabled="currentPage === 1" style="margin-right: 10px;">上一页</button>
                        <text>{{ currentPage }}/{{ totalPages }}</text>
                        <button size="mini" @click="nextPage" :disabled="currentPage === totalPages" style="margin-left: 10px;">下一页</button>
                    </view>
                </view>
                <view class="over" v-if="sortedMaterList.length == 0">暂无数据</view>
            </view>
        </template>
@@ -400,6 +407,10 @@
        },
        data() {
            return {
                currentPage: 1,
                pageSize: 10,
                sortedMaterList: [],  // 排序后的物料列表
                paginatedMaterList: [] ,// 当前页显示的物料
                tabs: 0,
                hcpFocus: false,
                barCodeFocus: false,
@@ -565,6 +576,39 @@
                      this.barCodeFocus = true;
                  }, 100);
              },
               // 排序物料(有数量的排在前面)
                sortMaterList(list) {
                    if (!list || list.length === 0) return []
                    return [...list].sort((a, b) => {
                        // 数量大于0的排在前面
                        if (a.数量 > 0 && b.数量 <= 0) return -1
                        if (a.数量 <= 0 && b.数量 > 0) return 1
                        return b.数量 - a.数量  // 都有数量或都没有,按数量降序
                    })
                },
            // 更新当前页数据
            updatePageData() {
                const start = (this.currentPage - 1) * this.pageSize
                const end = start + this.pageSize
                this.paginatedMaterList = this.sortedMaterList.slice(start, end)
            },
            // 上一页
            prevPage() {
                if (this.currentPage > 1) {
                    this.currentPage--
                    this.updatePageData()
                }
            },
            // 下一页
            nextPage() {
                if (this.currentPage < Math.ceil(this.sortedMaterList.length / this.pageSize)) {
                    this.currentPage++
                    this.updatePageData()
                }
            },
            async set_InitBillSubType(){
                try{
                    let res = await CommonUtils.doRequest2Async({
@@ -816,6 +860,8 @@
                    }
                });
            },
            // 器具删除
            async delMould(item) {
                uni.showModal({
@@ -1772,6 +1818,9 @@
                                this.FIFOlist = data.FIFOlist
                            }
                        }
                        this.sortedMaterList = this.sortMaterList(this.HMaterList)
                        this.currentPage = 1
                        this.updatePageData()
                        // 根据是否是箱条码配置仓位信息
                        if (sBarCodePrefix == 'PAK') {
pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
@@ -1,8 +1,12 @@
<template>
    <view>
        <view class="tabs" id="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view>
            <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view>
            <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">
                {{ $t("Sb_EquipConkBookBill.tabBasic") == "Sb_EquipConkBookBill.tabBasic" ? "基本信息" : $t("Sb_EquipConkBookBill.tabBasic") }}
            </view>
            <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">
                {{ $t("Sb_EquipConkBookBill.tabOther") == "Sb_EquipConkBookBill.tabOther" ? "其他信息" : $t("Sb_EquipConkBookBill.tabOther") }}
            </view>
        </view>
        <!-- 基本信息 -->
        <template v-if="tabs == 0">
@@ -11,94 +15,85 @@
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">设备条码:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HBarCode") == "Sb_EquipConkBookBill.HBarCode" ? "设备条码:" : $t("Sb_EquipConkBookBill.HBarCode") }}</view>
                    <view :class="enableEdit?'right':'righton'">
                        <input v-model="hform.HBarCode" :disabled="!enableEdit"
                            @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="请输入(或扫描)设备条码" />
                            @confirm="GetMessageByBarCode(hform.HBarCode)" :placeholder="$t('Sb_EquipConkBookBill.HBarCode_Placeholder') == 'Sb_EquipConkBookBill.HBarCode_Placeholder' ? '请输入(或扫描)设备条码' : $t('Sb_EquipConkBookBill.HBarCode_Placeholder')" />
                    </view>
                    <view class="icon-wrapper">
                        <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">开始时间:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HConkBeginDate") == "Sb_EquipConkBookBill.HConkBeginDate" ? "开始时间:" : $t("Sb_EquipConkBookBill.HConkBeginDate") }}</view>
                    <view class="right">
                        <uni-datetime-picker type="datetime" :clear-icon="false" v-model="hform.HRepairPlanBeginDate">
                            <input :value="hform.HConkBeginDate" />
                            <input :value="hform.HConkBeginDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择' : $t('Gy.HDate_Placeholder')" />
                        </uni-datetime-picker>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">故障类别:</view>
                    <view class="title required">{{ $t("Sb_EquipConkBookBill.HConkTypeName") == "Sb_EquipConkBookBill.HConkTypeName" ? "故障类别:" : $t("Sb_EquipConkBookBill.HConkTypeName") }}</view>
                    <zxz-uni-data-select required class="right" :localdata="HConkTypeList" dataKey="故障类别名称"
                        dataValue="hitemid" v-model="hform.HConkTypeID">
                    </zxz-uni-data-select>
                    <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
                </view>
                <view class="form-item">
                    <view class="title required">故障原因:</view>
                    <view class="title required">{{ $t("Sb_EquipConkBookBill.HConkReasonName") == "Sb_EquipConkBookBill.HConkReasonName" ? "故障原因:" : $t("Sb_EquipConkBookBill.HConkReasonName") }}</view>
                    <zxz-uni-data-select required class="right" :localdata="HConkReasonList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HConkReasonID">
                    </zxz-uni-data-select>
                    <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
                </view>
                <view class="form-item">
                    <view class="title">故障描述:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HExplanation") == "Sb_EquipConkBookBill.HExplanation" ? "故障描述:" : $t("Sb_EquipConkBookBill.HExplanation") }}</view>
                    <view class="right">
                        <textarea v-model="hform.HExplanation" placeholder="请输入故障描述" />
                        <textarea v-model="hform.HExplanation" :placeholder="$t('Sb_EquipConkBookBill.HExplanation_Placeholder') == 'Sb_EquipConkBookBill.HExplanation_Placeholder' ? '请输入故障描述' : $t('Sb_EquipConkBookBill.HExplanation_Placeholder')" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号:" : $t("Gy.HBillNo") }}</view>
                    <view class="righton">
                        <input disabled v-model="hform.HBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据日期:</view>
                    <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期:" : $t("Gy.HDate") }}</view>
                    <view class="righton">
                        <input disabled v-model="hform.HDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">部门:</view>
                    <view class="title required">{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "部门:" : $t("Gy.HDeptName") }}</view>
                    <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="部门名称"
                        dataValue="HItemID" v-model="hform.HDeptID">
                    </zxz-uni-data-select>
                    <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
                </view>
                <view class="form-item">
                    <view class="title required">发现人:</view>
                    <view class="title required">{{ $t("Sb_EquipConkBookBill.HEmpName") == "Sb_EquipConkBookBill.HEmpName" ? "发现人:" : $t("Sb_EquipConkBookBill.HEmpName") }}</view>
                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HEmpID">
                    </zxz-uni-data-select>
                    <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
                </view>
                <view class="form-item">
                    <view class="title required">验收人:</view>
                    <view class="title required">{{ $t("Sb_EquipConkBookBill.HManagerName") == "Sb_EquipConkBookBill.HManagerName" ? "验收人:" : $t("Sb_EquipConkBookBill.HManagerName") }}</view>
                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HManagerID">
                    </zxz-uni-data-select>
                    <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
                </view>
                <view class="form-item">
                    <view class="title">设备名称:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HBarName") == "Sb_EquipConkBookBill.HBarName" ? "设备名称:" : $t("Sb_EquipConkBookBill.HBarName") }}</view>
                    <view class="righton">
                        <input v-model="hform.HBarName" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">设备规格:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HBarSpec") == "Sb_EquipConkBookBill.HBarSpec" ? "设备规格:" : $t("Sb_EquipConkBookBill.HBarSpec") }}</view>
                    <view class="righton">
                        <input v-model="hform.HBarSpec" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">设备型号:</view>
                    <view class="title">{{ $t("Sb_EquipConkBookBill.HBarModel") == "Sb_EquipConkBookBill.HBarModel" ? "设备型号:" : $t("Sb_EquipConkBookBill.HBarModel") }}</view>
                    <view class="righton">
                        <input v-model="hform.HBarModel" disabled />
                    </view>
@@ -113,49 +108,49 @@
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">创建人:</view>
                    <view class="title">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "创建人:" : $t("Gy.HMaker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">创建日期:</view>
                    <view class="title">{{ $t("Gy.HMakeDate") == "Gy.HMakeDate" ? "创建日期:" : $t("Gy.HMakeDate") }}</view>
                    <view class="righton">
                        <input v-model="hform.HMakeDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="title">{{ $t("Gy.HUpDater") == "Gy.HUpDater" ? "修改人:" : $t("Gy.HUpDater") }}</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="title">{{ $t("Gy.HUpDateDate") == "Gy.HUpDateDate" ? "修改日期:" : $t("Gy.HUpDateDate") }}</view>
                    <view class="righton">
                        <input v-model="hform.HUpDateDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="title">{{ $t("Gy.HChecker") == "Gy.HChecker" ? "审核人:" : $t("Gy.HChecker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核时间:</view>
                    <view class="title">{{ $t("Gy.HCheckDate") == "Gy.HCheckDate" ? "审核时间:" : $t("Gy.HCheckDate") }}</view>
                    <view class="righton">
                        <input v-model="hform.HCheckDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废人:</view>
                    <view class="title">{{ $t("Gy.HDeleteMan") == "Gy.HDeleteMan" ? "作废人:" : $t("Gy.HDeleteMan") }}</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteMan" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废日期:</view>
                    <view class="title">{{ $t("Gy.HDeleteDate") == "Gy.HDeleteDate" ? "作废日期:" : $t("Gy.HDeleteDate") }}</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteDate" />
                    </view>
@@ -165,12 +160,11 @@
        </template>
        <!-- 操作按钮 -->
        <view class="buttons" id="buttons">
            <button class="btn-a" size="mini" @tap="submit">提交</button>
            <button class="btn-a" size="mini" @tap="submit">{{ $t("Sb_EquipConkBookBill.submit") == "Sb_EquipConkBookBill.submit" ? "提交" : $t("Sb_EquipConkBookBill.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>
            <button class="btn-a" size="mini" @tap="addNew">{{ $t("Sb_EquipConkBookBill.addNew") == "Sb_EquipConkBookBill.addNew" ? "新增" : $t("Sb_EquipConkBookBill.addNew") }}</button>
            <button class="btn-c" size="mini" @tap="goBack">{{ $t("Sb_EquipConkBookBill.goBack") == "Sb_EquipConkBookBill.goBack" ? "退出" : $t("Sb_EquipConkBookBill.goBack") }}</button>
        </view>
        <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
    </view>
</template>
@@ -278,14 +272,14 @@
                        this.HConkTypeList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取故障类别失败: ${Message}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.getConkTypeFailed') == 'Sb_EquipConkBookBill.getConkTypeFailed' ? '获取故障类别失败' : this.$t('Sb_EquipConkBookBill.getConkTypeFailed')}: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取故障类别失败: ${err}`
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getConkTypeFailed') == 'Sb_EquipConkBookBill.getConkTypeFailed' ? '获取故障类别失败' : this.$t('Sb_EquipConkBookBill.getConkTypeFailed')}: ${err}`
                    })
                }
            },
@@ -308,14 +302,14 @@
                        this.HConkReasonList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取故障原因失败: ${Message}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.getConkReasonFailed') == 'Sb_EquipConkBookBill.getConkReasonFailed' ? '获取故障原因失败' : this.$t('Sb_EquipConkBookBill.getConkReasonFailed')}: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取故障原因失败: ${err}`
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getConkReasonFailed') == 'Sb_EquipConkBookBill.getConkReasonFailed' ? '获取故障原因失败' : this.$t('Sb_EquipConkBookBill.getConkReasonFailed')}: ${err}`
                    })
                }
            },
@@ -327,37 +321,37 @@
            ValidCheck() {
                if (this.hform.HEquipID == 0) {
                    return {
                        Message: "未录入设备信息,请先录入设备信息!",
                        Message: this.$t('Sb_EquipConkBookBill.noEquipInfo') == 'Sb_EquipConkBookBill.noEquipInfo' ? '未录入设备信息,请先录入设备信息!' : this.$t('Sb_EquipConkBookBill.noEquipInfo'),
                        state: false
                    }
                }
                if (this.hform.HDeptID == 0) {
                    return {
                        Message: "部门不得为空!",
                        Message: this.$t('Sb_EquipConkBookBill.deptRequired') == 'Sb_EquipConkBookBill.deptRequired' ? '部门不得为空!' : this.$t('Sb_EquipConkBookBill.deptRequired'),
                        state: false
                    }
                }
                if (this.hform.HEmpID == 0) {
                    return {
                        Message: "发现人不得为空!",
                        Message: this.$t('Sb_EquipConkBookBill.discovererRequired') == 'Sb_EquipConkBookBill.discovererRequired' ? '发现人不得为空!' : this.$t('Sb_EquipConkBookBill.discovererRequired'),
                        state: false
                    }
                }
                if (this.hform.HManagerID == 0) {
                    return {
                        Message: "验收人不得为空!",
                        Message: this.$t('Sb_EquipConkBookBill.checkerRequired') == 'Sb_EquipConkBookBill.checkerRequired' ? '验收人不得为空!' : this.$t('Sb_EquipConkBookBill.checkerRequired'),
                        state: false
                    }
                }
                if (this.hform.HConkReasonID == 0) {
                    return {
                        Message: "故障原因不得为空!",
                        Message: this.$t('Sb_EquipConkBookBill.reasonRequired') == 'Sb_EquipConkBookBill.reasonRequired' ? '故障原因不得为空!' : this.$t('Sb_EquipConkBookBill.reasonRequired'),
                        state: false
                    }
                }
                if (this.hform.HConkTypeID == 0) {
                    return {
                        Message: "故障类别不得为空!",
                        Message: this.$t('Sb_EquipConkBookBill.typeRequired') == 'Sb_EquipConkBookBill.typeRequired' ? '故障类别不得为空!' : this.$t('Sb_EquipConkBookBill.typeRequired'),
                        state: false
                    }
                }
@@ -397,14 +391,14 @@
                    },
                    success: (uploadRes) => {
                        CommonUtils.showTips({
                            message: "上传成功"
                            message: this.$t('Sb_EquipConkBookBill.uploadSuccess') == 'Sb_EquipConkBookBill.uploadSuccess' ? '上传成功' : this.$t('Sb_EquipConkBookBill.uploadSuccess')
                        })
                        this.attachmentInfo[index].status = "上传成功"
                        this.attachmentInfo[index].status = this.$t('Sb_EquipConkBookBill.uploadSuccess') == 'Sb_EquipConkBookBill.uploadSuccess' ? '上传成功' : this.$t('Sb_EquipConkBookBill.uploadSuccess')
                    },
                    fail: (err) => {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `上传失败: ${err}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.uploadFailed') == 'Sb_EquipConkBookBill.uploadFailed' ? '上传失败' : this.$t('Sb_EquipConkBookBill.uploadFailed')}: ${err}`
                        })
                    }
                })
@@ -412,8 +406,8 @@
            delFile(index) {
                console.log('attachmentInfo: ', this.attachmentInfo[index]);
                uni.showModal({
                    title: '提示',
                    content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!',
                    title: this.$t('Sb_EquipConkBookBill.confirmTitle') == 'Sb_EquipConkBookBill.confirmTitle' ? '提示' : this.$t('Sb_EquipConkBookBill.confirmTitle'),
                    content: this.$t('Sb_EquipConkBookBill.delConfirm') == 'Sb_EquipConkBookBill.delConfirm' ? '确认要删除 " ' : this.$t('Sb_EquipConkBookBill.delConfirm') + this.attachmentInfo[index].fileName + this.$t('Sb_EquipConkBookBill.delConfirmSuffix') == 'Sb_EquipConkBookBill.delConfirmSuffix' ? ' " 删除后将不可恢复!' : this.$t('Sb_EquipConkBookBill.delConfirmSuffix'),
                    success: (res) => {
                        if (res.confirm) {
                            this.attachmentInfo.splice(index, 1)
@@ -428,7 +422,7 @@
                this.attachmentInfo.push({
                    fileName: fileInfo.name,
                    size: fileInfo.size,
                    status: '等待上传',
                    status: this.$t('Sb_EquipConkBookBill.uploadWaiting') == 'Sb_EquipConkBookBill.uploadWaiting' ? '等待上传' : this.$t('Sb_EquipConkBookBill.uploadWaiting'),
                    filePath: fileInfo.tempFilePath
                })
            },
@@ -455,13 +449,13 @@
                        this.HShiftsList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: err
                    })
                }
@@ -487,13 +481,13 @@
                        this.HDeptList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: err
                    })
                }
@@ -522,13 +516,13 @@
                        this.HEmpList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: err
                    })
                }
@@ -571,14 +565,14 @@
                        this.enableEdit = false
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: err
                    })
                }
@@ -631,14 +625,14 @@
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取点检规程错误: ${Message}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.getCheckRuleFailed') == 'Sb_EquipConkBookBill.getCheckRuleFailed' ? '获取点检规程错误' : this.$t('Sb_EquipConkBookBill.getCheckRuleFailed')}: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取点检规程错误: ${err}`
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getCheckRuleFailed') == 'Sb_EquipConkBookBill.getCheckRuleFailed' ? '获取点检规程错误' : this.$t('Sb_EquipConkBookBill.getCheckRuleFailed')}: ${err}`
                    })
                }
            },
@@ -669,8 +663,8 @@
                    this.hform.HBillNo = data[0]["HBillNo"]
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "获取单据信息异常: " + err
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getBillInfoFailed') == 'Sb_EquipConkBookBill.getBillInfoFailed' ? '获取单据信息异常' : this.$t('Sb_EquipConkBookBill.getBillInfoFailed')}: ` + err
                    })
                }
            },
@@ -709,8 +703,8 @@
                    } = res.data
                    if (count == 1) {
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
                            title: this.$t('Sb_EquipConkBookBill.confirmTitle') == 'Sb_EquipConkBookBill.confirmTitle' ? '提示' : this.$t('Sb_EquipConkBookBill.confirmTitle'),
                            content: res.data.Message + (this.$t('Sb_EquipConkBookBill.continueAdd') == 'Sb_EquipConkBookBill.continueAdd' ? '。是否继续新增?(点击取消返回上级页面)' : this.$t('Sb_EquipConkBookBill.continueAdd')),
                            success: (res) => {
                                if (res.confirm) {
                                    console.log('用户点击确定');
@@ -727,16 +721,16 @@
                        });
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "提交单据失败: " + Message
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.submitFailed') == 'Sb_EquipConkBookBill.submitFailed' ? '提交单据失败' : this.$t('Sb_EquipConkBookBill.submitFailed')}: ` + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "提交单据失败: " + err
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.submitFailed') == 'Sb_EquipConkBookBill.submitFailed' ? '提交单据失败' : this.$t('Sb_EquipConkBookBill.submitFailed')}: ` + err
                    })
                }
            },
@@ -762,15 +756,15 @@
                        this.enableEdit = false
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取故障登记单失败: ${msg}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.getEditFailed') == 'Sb_EquipConkBookBill.getEditFailed' ? '获取故障登记单失败' : this.$t('Sb_EquipConkBookBill.getEditFailed')}: ${msg}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取故障登记单失败: ${err}`
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getEditFailed') == 'Sb_EquipConkBookBill.getEditFailed' ? '获取故障登记单失败' : this.$t('Sb_EquipConkBookBill.getEditFailed')}: ${err}`
                    })
                }
            },
@@ -803,19 +797,22 @@
                        })
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取设备数据失败: ${Message}`
                            title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                            message: `${this.$t('Sb_EquipConkBookBill.getEquipFailed') == 'Sb_EquipConkBookBill.getEquipFailed' ? '获取设备数据失败' : this.$t('Sb_EquipConkBookBill.getEquipFailed')}: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取设备数据失败: ${err}`
                        title: this.$t('Sb_EquipConkBookBill.tipTitle') == 'Sb_EquipConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sb_EquipConkBookBill.tipTitle'),
                        message: `${this.$t('Sb_EquipConkBookBill.getEquipFailed') == 'Sb_EquipConkBookBill.getEquipFailed' ? '获取设备数据失败' : this.$t('Sb_EquipConkBookBill.getEquipFailed')}: ${err}`
                    })
                }
            }
        },
        onLoad(e) {
            uni.setNavigationBarTitle({
                title: this.$t("Sb_EquipConkBookBill.title") == 'Sb_EquipConkBookBill.title' ? '设备故障登记单' : this.$t("Sb_EquipConkBookBill.title")
            })
            console.log('e: ', e);
            if (!e.operationType) {
                this.operationType = 1
pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill.vue
@@ -2,33 +2,36 @@
    <view>
        <view class="form">
            <view class="tabs">
                <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view>
                <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">其他信息</view>
                <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">
                    {{ $t("Sc_MouldConkBookBill.tabBasic") == "Sc_MouldConkBookBill.tabBasic" ? "基本信息" : $t("Sc_MouldConkBookBill.tabBasic") }}
                </view>
                <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">
                    {{ $t("Sc_MouldConkBookBill.tabOther") == "Sc_MouldConkBookBill.tabOther" ? "其他信息" : $t("Sc_MouldConkBookBill.tabOther") }}
                </view>
            </view>
            <view v-if="tabs == 0">
                <view class="form-item">
                    <view class="title">模具条码</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HBarCode") == "Sc_MouldConkBookBill.HBarCode" ? "模具条码" : $t("Sc_MouldConkBookBill.HBarCode") }}</view>
                    <view class="right" :class="barcodeReadOnly?'readonly':''">
                        <input type="text" :disabled="barcodeReadOnly" :focus="barCodeFocus" v-model="hform.HBarCode"
                            @confirm="getHBarCodeData(hform.HBarCode)" />
                            @confirm="getHBarCodeData(hform.HBarCode)" :placeholder="$t('Sc_MouldConkBookBill.HBarCode_Placeholder') == 'Sc_MouldConkBookBill.HBarCode_Placeholder' ? '请输入(或扫描)模具条码' : $t('Sc_MouldConkBookBill.HBarCode_Placeholder')" />
                    </view>
                    <uni-icons type="scan"
                        style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;"
                        size="20" @click="toScanCode"></uni-icons>
                </view>
                <view class="form-item" @click="searchModule">
                    <view class="title">模具</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HMould") == "Sc_MouldConkBookBill.HMould" ? "模具" : $t("Sc_MouldConkBookBill.HMould") }}</view>
                    <view class="righton" style="width: 350rpx;">
                        <input placeholder="请选择模具" />
                        <input :placeholder="$t('Sc_MouldConkBookBill.HMould_Placeholder') == 'Sc_MouldConkBookBill.HMould_Placeholder' ? '请选择模具' : $t('Sc_MouldConkBookBill.HMould_Placeholder')" />
                    </view>
                    <uni-icons type="search"
                        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                        size="20"></uni-icons>
                </view>
                <view class="form-item">
                    <view class="title">故障发生日期</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HConkBeginDate") == "Sc_MouldConkBookBill.HConkBeginDate" ? "故障发生日期" : $t("Sc_MouldConkBookBill.HConkBeginDate") }}</view>
                    <view class="right">
                        <uni-datetime-picker type="date">
                            <view style="font-size: 30rpx;">{{hform.HConkBeginDate}}</view>
@@ -36,33 +39,31 @@
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">故障类别</view>
                    <view class="title required">{{ $t("Sc_MouldConkBookBill.HConkTypeName") == "Sc_MouldConkBookBill.HConkTypeName" ? "故障类别" : $t("Sc_MouldConkBookBill.HConkTypeName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="ConkTypeNameList" placeholder="请选择故障类别" v-model="hform.HConkTypeName"
                            @input="ConkTypeNameChange"></uni-combox>
                        <uni-combox :candidates="ConkTypeNameList" :placeholder="$t('Sc_MouldConkBookBill.HConkTypeName_Placeholder') == 'Sc_MouldConkBookBill.HConkTypeName_Placeholder' ? '请选择故障类别' : $t('Sc_MouldConkBookBill.HConkTypeName_Placeholder')" v-model="hform.HConkTypeName" @input="ConkTypeNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">故障原因</view>
                    <view class="title required">{{ $t("Sc_MouldConkBookBill.HConkReasonName") == "Sc_MouldConkBookBill.HConkReasonName" ? "故障原因" : $t("Sc_MouldConkBookBill.HConkReasonName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="ConkReasonNameList" placeholder="请选择故障原因"
                            v-model="hform.HConkReasonName" @input="ConkReasonChange"></uni-combox>
                        <uni-combox :candidates="ConkReasonNameList" :placeholder="$t('Sc_MouldConkBookBill.HConkReasonName_Placeholder') == 'Sc_MouldConkBookBill.HConkReasonName_Placeholder' ? '请选择故障原因' : $t('Sc_MouldConkBookBill.HConkReasonName_Placeholder')" v-model="hform.HConkReasonName" @input="ConkReasonChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">故障描述</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HExplanation") == "Sc_MouldConkBookBill.HExplanation" ? "故障描述" : $t("Sc_MouldConkBookBill.HExplanation") }}</view>
                    <view class="right">
                        <textarea value="" style="height: 6em;" maxlength="2000" placeholder="请输入故障描述..." />
                        <textarea value="" style="height: 6em;" maxlength="2000" :placeholder="$t('Sc_MouldConkBookBill.HExplanation_Placeholder') == 'Sc_MouldConkBookBill.HExplanation_Placeholder' ? '请输入故障描述...' : $t('Sc_MouldConkBookBill.HExplanation_Placeholder')" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据号</view>
                    <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号" : $t("Gy.HBillNo") }}</view>
                    <view class="right">
                        <input name="HInterID" v-model="hform.HBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据日期</view>
                    <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期" : $t("Gy.HDate") }}</view>
                    <view class="right">
                        <uni-datetime-picker type="date">
                            <view style="font-size: 30rpx;">{{hform.HDate}}</view>
@@ -70,91 +71,88 @@
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">部门</view>
                    <view class="title required">{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "部门" : $t("Gy.HDeptName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="DeptNameList" placeholder="请选择部门" v-model="hform.HDeptName"
                            @input="DeptChange"></uni-combox>
                        <uni-combox :candidates="DeptNameList" :placeholder="$t('Gy.HDeptName_Placeholder') == 'Gy.HDeptName_Placeholder' ? '请选择部门' : $t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" @input="DeptChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">发现人</view>
                    <view class="title required">{{ $t("Sc_MouldConkBookBill.HEmpName") == "Sc_MouldConkBookBill.HEmpName" ? "发现人" : $t("Sc_MouldConkBookBill.HEmpName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="EmpNameList" placeholder="请选择发现人" v-model="hform.HEmpName"
                            @input="EmpChange"></uni-combox>
                        <uni-combox :candidates="EmpNameList" :placeholder="$t('Sc_MouldConkBookBill.HEmpName_Placeholder') == 'Sc_MouldConkBookBill.HEmpName_Placeholder' ? '请选择发现人' : $t('Sc_MouldConkBookBill.HEmpName_Placeholder')" v-model="hform.HEmpName" @input="EmpChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">验收人</view>
                    <view class="title required">{{ $t("Sc_MouldConkBookBill.HManagerName") == "Sc_MouldConkBookBill.HManagerName" ? "验收人" : $t("Sc_MouldConkBookBill.HManagerName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="EmpNameList" placeholder="请选择验收人" v-model="hform.HManagerName"
                            @input="ManagerChange"></uni-combox>
                        <uni-combox :candidates="EmpNameList" :placeholder="$t('Sc_MouldConkBookBill.HManagerName_Placeholder') == 'Sc_MouldConkBookBill.HManagerName_Placeholder' ? '请选择验收人' : $t('Sc_MouldConkBookBill.HManagerName_Placeholder')" v-model="hform.HManagerName" @input="ManagerChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">模具名称</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HBarName") == "Sc_MouldConkBookBill.HBarName" ? "模具名称" : $t("Sc_MouldConkBookBill.HBarName") }}</view>
                    <view class="righton">
                        <input disabled type="text" placeholder="请输入器具名称" v-model="hform.HBarName" />
                        <input disabled type="text" :placeholder="$t('Sc_MouldConkBookBill.HBarName_Placeholder') == 'Sc_MouldConkBookBill.HBarName_Placeholder' ? '请输入器具名称' : $t('Sc_MouldConkBookBill.HBarName_Placeholder')" v-model="hform.HBarName" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">模具规格</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HBarSpec") == "Sc_MouldConkBookBill.HBarSpec" ? "模具规格" : $t("Sc_MouldConkBookBill.HBarSpec") }}</view>
                    <view class="righton">
                        <input disabled type="text" placeholder="请输入器具规格" v-model="hform.HBarSpec" />
                        <input disabled type="text" :placeholder="$t('Sc_MouldConkBookBill.HBarSpec_Placeholder') == 'Sc_MouldConkBookBill.HBarSpec_Placeholder' ? '请输入器具规格' : $t('Sc_MouldConkBookBill.HBarSpec_Placeholder')" v-model="hform.HBarSpec" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">模具型号</view>
                    <view class="title">{{ $t("Sc_MouldConkBookBill.HBarModel") == "Sc_MouldConkBookBill.HBarModel" ? "模具型号" : $t("Sc_MouldConkBookBill.HBarModel") }}</view>
                    <view class="righton">
                        <input disabled type="text" placeholder="请输入器具型号" v-model="hform.HBarModel" />
                        <input disabled type="text" :placeholder="$t('Sc_MouldConkBookBill.HBarModel_Placeholder') == 'Sc_MouldConkBookBill.HBarModel_Placeholder' ? '请输入器具型号' : $t('Sc_MouldConkBookBill.HBarModel_Placeholder')" v-model="hform.HBarModel" />
                    </view>
                </view>
            </view>
            <view v-if="tabs == 1">
                <view class="form-item">
                    <view class="title">创建人:</view>
                    <view class="title">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "创建人:" : $t("Gy.HMaker") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HMaker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">创建日期:</view>
                    <view class="title">{{ $t("Gy.HMakeDate") == "Gy.HMakeDate" ? "创建日期:" : $t("Gy.HMakeDate") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HMakeDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="title">{{ $t("Gy.HUpDater") == "Gy.HUpDater" ? "修改人:" : $t("Gy.HUpDater") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HUpDater" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="title">{{ $t("Gy.HUpDateDate") == "Gy.HUpDateDate" ? "修改日期:" : $t("Gy.HUpDateDate") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HUpDateDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="title">{{ $t("Gy.HChecker") == "Gy.HChecker" ? "审核人:" : $t("Gy.HChecker") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HChecker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核日期:</view>
                    <view class="title">{{ $t("Gy.HCheckDate") == "Gy.HCheckDate" ? "审核日期:" : $t("Gy.HCheckDate") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HCheckDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废人:</view>
                    <view class="title">{{ $t("Gy.HDeleteMan") == "Gy.HDeleteMan" ? "作废人:" : $t("Gy.HDeleteMan") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HDeleteMan" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废日期:</view>
                    <view class="title">{{ $t("Gy.HDeleteDate") == "Gy.HDeleteDate" ? "作废日期:" : $t("Gy.HDeleteDate") }}</view>
                    <view class="righton">
                        <input type="text" v-model="hform.HDeleteDate" disabled />
                    </view>
@@ -163,10 +161,10 @@
            <view class="bottom-btn">
                <button :class="EnableSave?'btn-a':'btn-c'" :disabled="!EnableSave" size="mini"
                    @tap="submit">提交</button>
                    @tap="submit">{{ $t("Sc_MouldConkBookBill.submit") == "Sc_MouldConkBookBill.submit" ? "提交" : $t("Sc_MouldConkBookBill.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>
                <button class="btn-a" size="mini" @tap="addNew">{{ $t("Sc_MouldConkBookBill.addNew") == "Sc_MouldConkBookBill.addNew" ? "新增" : $t("Sc_MouldConkBookBill.addNew") }}</button>
                <button class="btn-c" size="mini" @tap="goBack">{{ $t("Sc_MouldConkBookBill.goBack") == "Sc_MouldConkBookBill.goBack" ? "退出" : $t("Sc_MouldConkBookBill.goBack") }}</button>
            </view>
        </view>
    </view>
@@ -270,6 +268,9 @@
        },
        async onLoad(e) {
            uni.setNavigationBarTitle({
                title: this.$t("Sc_MouldConkBookBill.title") == 'Sc_MouldConkBookBill.title' ? '模具故障登记单' : this.$t("Sc_MouldConkBookBill.title")
            })
            console.log(e, this.userInfo)
            this.operationType = e.operationType || 1
            if (this.operationType == 1) {
@@ -333,14 +334,14 @@
                        this.ConkTypeNameList = Array.from(data).map(elem => elem['故障类别名称'])
                    } else {
                        CommonUtils.showTips({
                            title: '错误提示',
                            message: "初始化故障类型错误: " + Message,
                            title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                            message: this.$t('Sc_MouldConkBookBill.initConkTypeFailed') == 'Sc_MouldConkBookBill.initConkTypeFailed' ? '初始化故障类型错误: ' : this.$t('Sc_MouldConkBookBill.initConkTypeFailed') + Message,
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '错误提示',
                        message: "初始化故障类型错误: " + err,
                        title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                        message: this.$t('Sc_MouldConkBookBill.initConkTypeFailed') == 'Sc_MouldConkBookBill.initConkTypeFailed' ? '初始化故障类型错误: ' : this.$t('Sc_MouldConkBookBill.initConkTypeFailed') + err,
                    })
                }
            },
@@ -377,14 +378,14 @@
                        this.ConkReasonNameList = Array.from(data).map(elem => elem['HName'])
                    } else {
                        CommonUtils.showTips({
                            title: '错误提示',
                            message: "初始化故障原因错误: " + Message,
                            title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                            message: this.$t('Sc_MouldConkBookBill.initConkReasonFailed') == 'Sc_MouldConkBookBill.initConkReasonFailed' ? '初始化故障原因错误: ' : this.$t('Sc_MouldConkBookBill.initConkReasonFailed') + Message,
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '错误提示',
                        message: "初始化故障原因错误: " + err,
                        title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                        message: this.$t('Sc_MouldConkBookBill.initConkReasonFailed') == 'Sc_MouldConkBookBill.initConkReasonFailed' ? '初始化故障原因错误: ' : this.$t('Sc_MouldConkBookBill.initConkReasonFailed') + err,
                    })
                }
            },
@@ -421,14 +422,14 @@
                        this.DeptNameList = Array.from(data).map(elem => elem['HName'])
                    } else {
                        CommonUtils.showTips({
                            title: '错误提示',
                            message: "初始化部门错误: " + Message,
                            title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                            message: this.$t('Sc_MouldConkBookBill.initDeptFailed') == 'Sc_MouldConkBookBill.initDeptFailed' ? '初始化部门错误: ' : this.$t('Sc_MouldConkBookBill.initDeptFailed') + Message,
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '错误提示',
                        message: "初始化部门错误: " + err,
                        title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                        message: this.$t('Sc_MouldConkBookBill.initDeptFailed') == 'Sc_MouldConkBookBill.initDeptFailed' ? '初始化部门错误: ' : this.$t('Sc_MouldConkBookBill.initDeptFailed') + err,
                    })
                }
            },
@@ -467,14 +468,14 @@
                        this.EmpNameList = Array.from(data).map(elem => elem['HName'])
                    } else {
                        CommonUtils.showTips({
                            title: '错误提示',
                            message: "初始化职员错误: " + Message,
                            title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                            message: this.$t('Sc_MouldConkBookBill.initEmpFailed') == 'Sc_MouldConkBookBill.initEmpFailed' ? '初始化职员错误: ' : this.$t('Sc_MouldConkBookBill.initEmpFailed') + Message,
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '错误提示',
                        message: "初始化职员错误: " + err,
                        title: this.$t('Sc_MouldConkBookBill.errorTitle') == 'Sc_MouldConkBookBill.errorTitle' ? '错误提示' : this.$t('Sc_MouldConkBookBill.errorTitle'),
                        message: this.$t('Sc_MouldConkBookBill.initEmpFailed') == 'Sc_MouldConkBookBill.initEmpFailed' ? '初始化职员错误: ' : this.$t('Sc_MouldConkBookBill.initEmpFailed') + err,
                    })
                }
            },
@@ -537,7 +538,7 @@
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                    'timeoutText': this.$t('Sc_MouldConkBookBill.scanTimeoutText') == 'Sc_MouldConkBookBill.scanTimeoutText' ? '未识别到二维码' : this.$t('Sc_MouldConkBookBill.scanTimeoutText') //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    if (this.hform.HBarCode == '*') {
@@ -559,7 +560,7 @@
            async getHBarCodeData(HBarCode) {
                if (!HBarCode) {
                    CommonUtils.showTips({
                        message: '条形码不能为空'
                        message: this.$t('Sc_MouldConkBookBill.barCodeEmpty') == 'Sc_MouldConkBookBill.barCodeEmpty' ? '条形码不能为空' : this.$t('Sc_MouldConkBookBill.barCodeEmpty')
                    })
                    return
                }
@@ -585,15 +586,15 @@
                    } else {
                        this.refreshBarCodeState()
                        return CommonUtils.showTips({
                            title: '温馨提示',
                            title: this.$t('Sc_MouldConkBookBill.tipTitle') == 'Sc_MouldConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sc_MouldConkBookBill.tipTitle'),
                            message: Message
                        })
                    }
                } catch (err) {
                    this.refreshBarCodeState()
                    return CommonUtils.showTips({
                        title: '温馨提示',
                        message: "接口请求失败" + err
                        title: this.$t('Sc_MouldConkBookBill.tipTitle') == 'Sc_MouldConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sc_MouldConkBookBill.tipTitle'),
                        message: this.$t('Sc_MouldConkBookBill.requestFailed') == 'Sc_MouldConkBookBill.requestFailed' ? '接口请求失败' : this.$t('Sc_MouldConkBookBill.requestFailed') + err
                    })
                }
@@ -627,7 +628,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('Sc_MouldConkBookBill.requestFailed') == 'Sc_MouldConkBookBill.requestFailed' ? '接口请求失败' : this.$t('Sc_MouldConkBookBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -637,15 +638,15 @@
                let message = ''
                if (!this.hform.HConkTypeName) {
                    message = '未填写故障类别'
                    message = this.$t('Sc_MouldConkBookBill.noConkType') == 'Sc_MouldConkBookBill.noConkType' ? '未填写故障类别' : this.$t('Sc_MouldConkBookBill.noConkType')
                } else if (!this.hform.HConkReasonName) {
                    message = '未填写故障原因'
                    message = this.$t('Sc_MouldConkBookBill.noConkReason') == 'Sc_MouldConkBookBill.noConkReason' ? '未填写故障原因' : this.$t('Sc_MouldConkBookBill.noConkReason')
                } else if (!this.hform.HDeptName) {
                    message = '未填写部门'
                    message = this.$t('Sc_MouldConkBookBill.noDept') == 'Sc_MouldConkBookBill.noDept' ? '未填写部门' : this.$t('Sc_MouldConkBookBill.noDept')
                } else if (!this.hform.HEmpName) {
                    message = '未填写发现人'
                    message = this.$t('Sc_MouldConkBookBill.noDiscoverer') == 'Sc_MouldConkBookBill.noDiscoverer' ? '未填写发现人' : this.$t('Sc_MouldConkBookBill.noDiscoverer')
                } else if (!this.hform.HManagerName) {
                    message = '未填写验收人'
                    message = this.$t('Sc_MouldConkBookBill.noChecker') == 'Sc_MouldConkBookBill.noChecker' ? '未填写验收人' : this.$t('Sc_MouldConkBookBill.noChecker')
                }
                if (!message) {
                    return true
@@ -692,8 +693,8 @@
                    } = res.data
                    if (count == 1) {
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '。是否继续新增?',
                            title: this.$t('Sc_MouldConkBookBill.confirmTitle') == 'Sc_MouldConkBookBill.confirmTitle' ? '提示' : this.$t('Sc_MouldConkBookBill.confirmTitle'),
                            content: res.data.Message + (this.$t('Sc_MouldConkBookBill.continueAdd') == 'Sc_MouldConkBookBill.continueAdd' ? '。是否继续新增?' : this.$t('Sc_MouldConkBookBill.continueAdd')),
                            success: (res) => {
                                if (res.confirm) {
                                    console.log('用户点击确定');
@@ -710,14 +711,14 @@
                        });
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            title: this.$t('Sc_MouldConkBookBill.tipTitle') == 'Sc_MouldConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sc_MouldConkBookBill.tipTitle'),
                            message: Message
                        })
                        this.EnableSave = true
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        title: this.$t('Sc_MouldConkBookBill.tipTitle') == 'Sc_MouldConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sc_MouldConkBookBill.tipTitle'),
                        message: err
                    })
                    this.EnableSave = true
@@ -726,8 +727,8 @@
            goBack() {
                uni.showModal({
                    title: '提示',
                    content: '确认要退出当前页面吗?',
                    title: this.$t('Sc_MouldConkBookBill.confirmTitle') == 'Sc_MouldConkBookBill.confirmTitle' ? '提示' : this.$t('Sc_MouldConkBookBill.confirmTitle'),
                    content: this.$t('Sc_MouldConkBookBill.exitConfirm') == 'Sc_MouldConkBookBill.exitConfirm' ? '确认要退出当前页面吗?' : this.$t('Sc_MouldConkBookBill.exitConfirm'),
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
@@ -759,7 +760,7 @@
                        console.log('data: ', data.h_v_Sc_MouldConkBookBillList_Edit);
                        let data1 = data.h_v_Sc_MouldConkBookBillList_Edit[0]
                        this.hform.HMainSourceBillType = HSourceBillType
                        this.HMainSourceBillType = '器具故障登记单'
                        this.HMainSourceBillType = this.$t('Sc_MouldConkBookBill.sourceBillTypeName') == 'Sc_MouldConkBookBill.sourceBillTypeName' ? '器具故障登记单' : this.$t('Sc_MouldConkBookBill.sourceBillTypeName')
                        this.hform.HMainSourceBillNo = data1.单据号
                        this.hform.HMainSourceInterID = data1.hmainid
                        this.hform.HMainSourceEntryID = data1.hsubid
@@ -773,8 +774,8 @@
                       
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取源单失败: ${Message}`
                            title: this.$t('Sc_MouldConkBookBill.tipTitle') == 'Sc_MouldConkBookBill.tipTitle' ? '温馨提示' : this.$t('Sc_MouldConkBookBill.tipTitle'),
                            message: this.$t('Sc_MouldConkBookBill.getSourceFailed') == 'Sc_MouldConkBookBill.getSourceFailed' ? '获取源单失败: ' : this.$t('Sc_MouldConkBookBill.getSourceFailed') + Message
                        })
                    }
@@ -788,6 +789,7 @@
</script>
<style lang="scss" scoped>
    /* 样式保持不变 */
    .form {
        width: 668rpx;
        margin: 20rpx auto;
pages/MJGL/shangmudan/MouldUpperBill.vue
@@ -2,9 +2,10 @@
    <view>
        <view class="form">
            <view class="form-item">
                <view class="title">条码</view>
                <view class="title">{{ $t("MouldUpperBill.HBarCode") == "MouldUpperBill.HBarCode" ? "条码" : $t("MouldUpperBill.HBarCode") }}</view>
                <view class="right" style="width: 350rpx;">
                    <input type="text" :focus="HBarCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码"
                    <input type="text" :focus="HBarCodeFocus" v-model="hform.HBarCode"
                        :placeholder="$t('MouldUpperBill.HBarCode_Placeholder') == 'MouldUpperBill.HBarCode_Placeholder' ? '请扫描(或输入)条码' : $t('MouldUpperBill.HBarCode_Placeholder')"
                        @confirm="getHBarCodeData(hform.HBarCode)" />
                </view>
                <uni-icons type="scan"
@@ -12,78 +13,80 @@
                    size="20" @click="toScanCode"></uni-icons>
            </view>
            <view class="tabs">
                <view :class="tabs == 0 ? 'on':''" @tap="() => { tabs = 0; reFocusBarCode(); }">单据信息</view>
                <view :class="tabs == 1 ? 'on':''" @tap="() => { tabs = 1; reFocusBarCode(); }">模具信息</view>
                <view :class="tabs == 2 ? 'on':''" @tap="() => { tabs = 2; reFocusBarCode(); }">制单信息</view>
                <view :class="tabs == 0 ? 'on':''" @tap="() => { tabs = 0; reFocusBarCode(); }">
                    {{ $t("MouldUpperBill.tabBillInfo") == "MouldUpperBill.tabBillInfo" ? "单据信息" : $t("MouldUpperBill.tabBillInfo") }}
                </view>
                <view :class="tabs == 1 ? 'on':''" @tap="() => { tabs = 1; reFocusBarCode(); }">
                    {{ $t("MouldUpperBill.tabMouldInfo") == "MouldUpperBill.tabMouldInfo" ? "模具信息" : $t("MouldUpperBill.tabMouldInfo") }}
                </view>
                <view :class="tabs == 2 ? 'on':''" @tap="() => { tabs = 2; reFocusBarCode(); }">
                    {{ $t("MouldUpperBill.tabMakerInfo") == "MouldUpperBill.tabMakerInfo" ? "制单信息" : $t("MouldUpperBill.tabMakerInfo") }}
                </view>
            </view>
            <!-- 单据信息 -->
            <view v-if="tabs == 0">
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号:" : $t("Gy.HBillNo") }}</view>
                    <view class="righton">
                        <input name="HBillNo" disabled v-model="hform.HBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据日期:</view>
                    <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期:" : $t("Gy.HDate") }}</view>
                    <view class="right">
                        <picker mode="date" v-model="hform.HDate" @change="HDateChange">
                            <input disabled v-model="hform.HDate" placeholder="请选择日期" />
                            <input disabled v-model="hform.HDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择日期' : $t('Gy.HDate_Placeholder')" />
                        </picker>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title"><text>*</text>使用部门:</view>
                    <view class="title"><text>*</text>{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "使用部门:" : $t("Gy.HDeptName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName"
                            @input="HDeptNameChange"></uni-combox>
                        <uni-combox :candidates="arrayHDeptName" :placeholder="$t('Gy.HDeptName_Placeholder') == 'Gy.HDeptName_Placeholder' ? '请选择部门' : $t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" @input="HDeptNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title"><text>*</text>操作员:</view>
                    <view class="title"><text>*</text>{{ $t("MouldUpperBill.HEmpName") == "MouldUpperBill.HEmpName" ? "操作员:" : $t("MouldUpperBill.HEmpName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择操作员" v-model="hform.HEmpName"
                            @input="HEmpNameChange"></uni-combox>
                        <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldUpperBill.HEmpName_Placeholder') == 'MouldUpperBill.HEmpName_Placeholder' ? '请选择操作员' : $t('MouldUpperBill.HEmpName_Placeholder')" v-model="hform.HEmpName" @input="HEmpNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title"><text>*</text>负责人:</view>
                    <view class="title"><text>*</text>{{ $t("MouldUpperBill.HManagerName") == "MouldUpperBill.HManagerName" ? "负责人:" : $t("MouldUpperBill.HManagerName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择负责人" v-model="hform.HMangerName"
                            @input="HManagerNameChange"></uni-combox>
                        <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldUpperBill.HManagerName_Placeholder') == 'MouldUpperBill.HManagerName_Placeholder' ? '请选择负责人' : $t('MouldUpperBill.HManagerName_Placeholder')" v-model="hform.HMangerName" @input="HManagerNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title"><text>*</text>生产资源:</view>
                    <view class="title"><text>*</text>{{ $t("MouldUpperBill.HSourceName") == "MouldUpperBill.HSourceName" ? "生产资源:" : $t("MouldUpperBill.HSourceName") }}</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName"
                            @input="HSourceNameChange"></uni-combox>
                        <uni-combox :candidates="arrayHSourceName" :placeholder="$t('MouldUpperBill.HSourceName_Placeholder') == 'MouldUpperBill.HSourceName_Placeholder' ? '请选择生产资源' : $t('MouldUpperBill.HSourceName_Placeholder')" v-model="hform.HSourceName" @input="HSourceNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">上模时间:</view>
                    <view class="title">{{ $t("MouldUpperBill.HScanDate") == "MouldUpperBill.HScanDate" ? "上模时间:" : $t("MouldUpperBill.HScanDate") }}</view>
                    <view class="righton">
                        <input name="HScanDate" disabled v-model="hform.HScanDate" placeholder="请选择" />
                        <input name="HScanDate" disabled v-model="hform.HScanDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择' : $t('Gy.HDate_Placeholder')" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">生产订单:</view>
                    <view class="title">{{ $t("MouldUpperBill.HICMOBillNo") == "MouldUpperBill.HICMOBillNo" ? "生产订单:" : $t("MouldUpperBill.HICMOBillNo") }}</view>
                    <view class="righton">
                        <input name="HICMOBillNo" disabled v-model="hform.HICMOBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">流转卡:</view>
                    <view class="title">{{ $t("MouldUpperBill.HProcExchBillNo") == "MouldUpperBill.HProcExchBillNo" ? "流转卡:" : $t("MouldUpperBill.HProcExchBillNo") }}</view>
                    <view class="righton">
                        <input disabled v-model="hform.HProcExchBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">备注:</view>
                    <view class="title">{{ $t("Gy.HRemark") == "Gy.HRemark" ? "备注:" : $t("Gy.HRemark") }}</view>
                    <view class="right">
                        <textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="请输入备注"></textarea>
                        <textarea name="HRemark" v-model="hform.HRemark" auto-height :placeholder="$t('Gy.HRemark_Placeholder') == 'Gy.HRemark_Placeholder' ? '请输入备注' : $t('Gy.HRemark_Placeholder')"></textarea>
                    </view>
                </view>
@@ -96,72 +99,72 @@
                        <uni-card style="margin: 10rpx 0;">
                            <view class="card-content">
                                <view class="card-row">
                                    <text class="label">序号:</text>
                                    <text class="label">{{ $t("MouldUpperBill.table_SerialNo") == "MouldUpperBill.table_SerialNo" ? "序号:" : $t("MouldUpperBill.table_SerialNo") }}</text>
                                    <text class="value">{{ index + 1 }}</text>
                                </view>
                                <view class="card-row">
                                    <text class="label">器具编码:</text>
                                    <text class="label">{{ $t("MouldUpperBill.table_MouldCode") == "MouldUpperBill.table_MouldCode" ? "器具编码:" : $t("MouldUpperBill.table_MouldCode") }}</text>
                                    <text class="value">{{ item.器具编码 }}</text>
                                </view>
                                <view class="card-row">
                                    <text class="label">器具名称:</text>
                                    <text class="label">{{ $t("MouldUpperBill.table_MouldName") == "MouldUpperBill.table_MouldName" ? "器具名称:" : $t("MouldUpperBill.table_MouldName") }}</text>
                                    <text class="value">{{ item.器具名称 }}</text>
                                </view>
                                <view class="card-row">
                                    <text class="label">器具型号:</text>
                                    <text class="label">{{ $t("MouldUpperBill.table_MouldModel") == "MouldUpperBill.table_MouldModel" ? "器具型号:" : $t("MouldUpperBill.table_MouldModel") }}</text>
                                    <text class="value">{{ item.器具型号 }}</text>
                                </view>
                                <view class="card-row">
                                    <text class="label">器具条码:</text>
                                    <text class="label">{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "器具条码:" : $t("Gy.HBarCode") }}</text>
                                    <text class="value">{{ item.器具条码 }}</text>
                                </view>
                                <view class="card-row">
                                    <text class="label">器具数量:</text>
                                    <text class="label">{{ $t("Gy.HQty") == "Gy.HQty" ? "器具数量:" : $t("Gy.HQty") }}</text>
                                    <text class="value">{{ item.器具数量 }}</text>
                                </view>
                            </view>
                        </uni-card>
                    </view>
                    <view class="over" v-if="listData.length == 0">暂无模具数据</view>
                    <view class="over" v-if="listData.length == 0">{{ $t("MouldUpperBill.noMouldData") == "MouldUpperBill.noMouldData" ? "暂无模具数据" : $t("MouldUpperBill.noMouldData") }}</view>
                </view>
            </view>
            <view v-if="tabs == 2">
                <view class="form-item">
                    <view class="title">制单人:</view>
                    <view class="title">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">制单日期:</view>
                    <view class="title">{{ $t("Gy.HMakeDate") == "Gy.HMakeDate" ? "制单日期:" : $t("Gy.HMakeDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HMakeDate" v-model="hform.HMakeDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HMakeDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="title">{{ $t("Gy.HUpDater") == "Gy.HUpDater" ? "修改人:" : $t("Gy.HUpDater") }}</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="title">{{ $t("Gy.HUpDateDate") == "Gy.HUpDateDate" ? "修改日期:" : $t("Gy.HUpDateDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HUpDateDate" v-model="hform.HUpDateDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HUpDateDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="title">{{ $t("Gy.HChecker") == "Gy.HChecker" ? "审核人:" : $t("Gy.HChecker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核日期:</view>
                    <view class="title">{{ $t("Gy.HCheckDate") == "Gy.HCheckDate" ? "审核日期:" : $t("Gy.HCheckDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HCheckDate" v-model="hform.HCheckDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HCheckDate" disabled />
@@ -171,10 +174,10 @@
            </view>
            <view class="bottom-btn">
                <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button>
                <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
                <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldUpperBill.submit") == "MouldUpperBill.submit" ? "提交" : $t("MouldUpperBill.submit") }}</button>
                <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">{{ $t("MouldUpperBill.modify") == "MouldUpperBill.modify" ? "修改" : $t("MouldUpperBill.modify") }}</button>
                <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldUpperBill.submit") == "MouldUpperBill.submit" ? "提交" : $t("MouldUpperBill.submit") }}</button>
                <button class="btn-c" size="mini" @tap="goBack">{{ $t("MouldUpperBill.goBack") == "MouldUpperBill.goBack" ? "退出" : $t("MouldUpperBill.goBack") }}</button>
            </view>
        </view>
@@ -256,6 +259,10 @@
            }
        },
        onLoad(e) {
uni.setNavigationBarTitle({
                title: this.$t("MouldUpperBill.title") == 'MouldUpperBill.title' ? '上模单' : this.$t("MouldUpperBill.title")
            })
            this.HBarCodeFocus = true
            this.getHDeptList()
            this.getHEmpList()
@@ -289,7 +296,7 @@
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                    'timeoutText': this.$t('MouldUpperBill.scanTimeoutText') == 'MouldUpperBill.scanTimeoutText' ? '未识别到二维码' : this.$t('MouldUpperBill.scanTimeoutText') //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    this.hform.HBarCode = ret.resp_result
@@ -320,7 +327,7 @@
                if (uni.getStorageSync('Organization') == "杭州斯莫尔磁性材料有限公司") {
                    if (!this.hform.HSourceName) {
                        uni.showToast({
                            title: '请先选择或扫描生产资源',
                            title: this.$t('MouldUpperBill.selectSourceFirst') == 'MouldUpperBill.selectSourceFirst' ? '请先选择或扫描生产资源' : this.$t('MouldUpperBill.selectSourceFirst'),
                            icon: 'none'
                        });
                        return;
@@ -388,7 +395,7 @@
                                case 3:
                                    if (!this.hform.HICMOBillNo && !this.hform.HProcExchBillNo) {
                                        uni.showToast({
                                            title: '请先扫描生产工单',
                                            title: this.$t('MouldUpperBill.scanWorkOrderFirst') == 'MouldUpperBill.scanWorkOrderFirst' ? '请先扫描生产工单' : this.$t('MouldUpperBill.scanWorkOrderFirst'),
                                            icon: 'none'
                                        });
                                        return;
@@ -435,7 +442,7 @@
                                    break;
                                default:
                                    uni.showToast({
                                        title: '未知的返回类型',
                                        title: this.$t('MouldUpperBill.unknownType') == 'MouldUpperBill.unknownType' ? '未知的返回类型' : this.$t('MouldUpperBill.unknownType'),
                                        icon: 'none',
                                    });
                                    break;
@@ -451,7 +458,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -472,7 +479,7 @@
                    if (existingIndex === -1) {
                        // 如果不存在,说明不在当前物料的检具清单中
                        uni.showToast({
                            title: '当前检具不在当前物料的检具清单中',
                            title: this.$t('MouldUpperBill.mouldNotInList') == 'MouldUpperBill.mouldNotInList' ? '当前检具不在当前物料的检具清单中' : this.$t('MouldUpperBill.mouldNotInList'),
                            icon: 'none',
                            duration: 1500
                        });
@@ -484,7 +491,7 @@
                            this.listData[existingIndex].器具条码 = this.hform.HBarCode;
                            this.listData[existingIndex].器具数量 = 1;
                            uni.showToast({
                                title: '扫描成功',
                                title: this.$t('MouldUpperBill.scanSuccess') == 'MouldUpperBill.scanSuccess' ? '扫描成功' : this.$t('MouldUpperBill.scanSuccess'),
                                icon: 'success',
                                duration: 1500
                            });
@@ -492,7 +499,7 @@
                        } else {
                            // 器具数量已为1,提示不允许重复扫描
                            uni.showToast({
                                title: '该模具已扫描,不允许重复扫描',
                                title: this.$t('MouldUpperBill.mouldAlreadyScanned') == 'MouldUpperBill.mouldAlreadyScanned' ? '该模具已扫描,不允许重复扫描' : this.$t('MouldUpperBill.mouldAlreadyScanned'),
                                icon: 'none',
                                duration: 1500
                            });
@@ -515,7 +522,7 @@
                        };
                        this.listData.push(newRow);
                        uni.showToast({
                            title: '扫描成功',
                            title: this.$t('MouldUpperBill.scanSuccess') == 'MouldUpperBill.scanSuccess' ? '扫描成功' : this.$t('MouldUpperBill.scanSuccess'),
                            icon: 'success',
                            duration: 1500
                        });
@@ -523,7 +530,7 @@
                    } else {
                        // 如果已存在,提示用户
                        uni.showToast({
                            title: '该模具已扫描',
                            title: this.$t('MouldUpperBill.mouldAlreadyScanned') == 'MouldUpperBill.mouldAlreadyScanned' ? '该模具已扫描' : this.$t('MouldUpperBill.mouldAlreadyScanned'),
                            icon: 'none',
                            duration: 1500
                        });
@@ -556,7 +563,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -596,7 +603,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -642,7 +649,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -718,7 +725,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -811,7 +818,7 @@
                            } else {
                                // 校验不通过,显示错误信息
                                uni.showToast({
                                    title: res.data.Message || '模具档案校验失败',
                                    title: res.data.Message || this.$t('MouldUpperBill.mouldCheckFailed') == 'MouldUpperBill.mouldCheckFailed' ? '模具档案校验失败' : this.$t('MouldUpperBill.mouldCheckFailed'),
                                    icon: 'none'
                                });
                                resolve(false);
@@ -820,7 +827,7 @@
                        fail: (res) => {
                            console.log('获取模具条码失败:', res);
                            uni.showToast({
                                title: '校验失败,请检查网络',
                                title: this.$t('MouldUpperBill.checkNetworkFailed') == 'MouldUpperBill.checkNetworkFailed' ? '校验失败,请检查网络' : this.$t('MouldUpperBill.checkNetworkFailed'),
                                icon: 'none'
                            });
                            resolve(false);
@@ -852,7 +859,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -862,7 +869,7 @@
                if (uni.getStorageSync('Organization') == "杭州斯莫尔磁性材料有限公司") {
                    if (!this.hform.HSourceName) {
                        uni.showToast({
                            title: '请先选择生产资源',
                            title: this.$t('MouldUpperBill.selectSourceFirst') == 'MouldUpperBill.selectSourceFirst' ? '请先选择生产资源' : this.$t('MouldUpperBill.selectSourceFirst'),
                            icon: 'none'
                        });
                        return;
@@ -870,7 +877,7 @@
                }
                if (this.listData.length === 0) {
                    uni.showToast({
                        title: '请至少添加一个模具',
                        title: this.$t('MouldUpperBill.addAtLeastOneMould') == 'MouldUpperBill.addAtLeastOneMould' ? '请至少添加一个模具' : this.$t('MouldUpperBill.addAtLeastOneMould'),
                        icon: 'none'
                    })
                }
@@ -885,9 +892,9 @@
                    if (zeroQtyItem) {
                        // 找到第一个数量异常项的位置(索引+1)
                        const index = this.listData.indexOf(zeroQtyItem) + 1;
                        const code = zeroQtyItem.器具编码 || '未知编码';
                        const code = zeroQtyItem.器具编码 || this.$t('MouldUpperBill.unknownCode') == 'MouldUpperBill.unknownCode' ? '未知编码' : this.$t('MouldUpperBill.unknownCode');
                        uni.showToast({
                            title: `第${index}行【${code}】器具数量为0,请检查`,
                            title: this.$t('MouldUpperBill.qtyZeroError') == 'MouldUpperBill.qtyZeroError' ? '第{index}行【{code}】器具数量为0,请检查' : this.$t('MouldUpperBill.qtyZeroError').replace('{index}', index).replace('{code}', code),
                            icon: 'none',
                            duration: 3000
                        });
@@ -896,22 +903,22 @@
                }
                if (!this.hform.HEmpName) {
                    uni.showToast({
                        title: '请选择操作员',
                        title: this.$t('MouldUpperBill.selectOperator') == 'MouldUpperBill.selectOperator' ? '请选择操作员' : this.$t('MouldUpperBill.selectOperator'),
                        icon: 'none'
                    })
                } else if (!this.hform.HMangerName) {
                    uni.showToast({
                        title: '请选择负责人',
                        title: this.$t('MouldUpperBill.selectManager') == 'MouldUpperBill.selectManager' ? '请选择负责人' : this.$t('MouldUpperBill.selectManager'),
                        icon: 'none'
                    })
                } else if (!this.hform.HDeptName) {
                    uni.showToast({
                        title: '请选择部门',
                        title: this.$t('MouldUpperBill.selectDept') == 'MouldUpperBill.selectDept' ? '请选择部门' : this.$t('MouldUpperBill.selectDept'),
                        icon: 'none'
                    })
                } else {
                    uni.showLoading({
                        title: '请稍候'
                        title: this.$t('MouldUpperBill.pleaseWait') == 'MouldUpperBill.pleaseWait' ? '请稍候' : this.$t('MouldUpperBill.pleaseWait')
                    })
                    // ========== 第一步:构建主表数据 ==========
                    const mainData = {
@@ -987,8 +994,8 @@
                                let prePage = pages[pages.length - 2];
                                uni.showModal({
                                    title: "提示",
                                    content: res.data.Message + "。是否继续新增?",
                                    title: this.$t('MouldUpperBill.confirmTitle') == 'MouldUpperBill.confirmTitle' ? '提示' : this.$t('MouldUpperBill.confirmTitle'),
                                    content: res.data.Message + (this.$t('MouldUpperBill.continueAdd') == 'MouldUpperBill.continueAdd' ? '。是否继续新增?' : this.$t('MouldUpperBill.continueAdd')),
                                    success: (res) => {
                                        if (res.confirm) {
                                            console.log("用户点击确定");
@@ -1012,7 +1019,7 @@
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '接口请求失败',
                                title: this.$t('MouldUpperBill.requestFailed') == 'MouldUpperBill.requestFailed' ? '接口请求失败' : this.$t('MouldUpperBill.requestFailed'),
                                icon: 'none'
                            })
                        },
@@ -1021,8 +1028,8 @@
            },
            goBack() {
                uni.showModal({
                    title: '提示',
                    content: '确认要退出当前页面吗?',
                    title: this.$t('MouldUpperBill.confirmTitle') == 'MouldUpperBill.confirmTitle' ? '提示' : this.$t('MouldUpperBill.confirmTitle'),
                    content: this.$t('MouldUpperBill.exitConfirm') == 'MouldUpperBill.exitConfirm' ? '确认要退出当前页面吗?' : this.$t('MouldUpperBill.exitConfirm'),
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
@@ -1038,6 +1045,7 @@
</script>
<style lang="scss" scoped>
    /* 样式保持不变 */
    .form {
        width: 668rpx;
        margin: 20rpx auto;
@@ -1160,5 +1168,4 @@
            border-bottom: 3px solid #3a78ff;
        }
    }
</style>
pages/MJGL/xiamodan/MouldLowerBill.vue
@@ -2,104 +2,100 @@
    <view>
        <view class="form">
            <view class="form-item">
                <view class="title"><text>*</text>条形码:</view>
                <view class="title"><text>*</text>{{ $t("MouldLowerBill.HBarCode") == "MouldLowerBill.HBarCode" ? "条形码:" : $t("MouldLowerBill.HBarCode") }}</view>
                <view class="right" style="width: 380rpx;">
                    <input v-model="hform.HBarCode" placeholder="请扫描条码" @blur="getHBarCodeData(hform.HBarCode)" />
                    <input v-model="hform.HBarCode" :placeholder="$t('MouldLowerBill.HBarCode_Placeholder') == 'MouldLowerBill.HBarCode_Placeholder' ? '请扫描条码' : $t('MouldLowerBill.HBarCode_Placeholder')" @blur="getHBarCodeData(hform.HBarCode)" />
                </view>
                <uni-icons type="scan"
                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                    size="20" @click="toScanCode"></uni-icons>
            </view>
            <view class="form-item">
                <view class="title">单据号:</view>
                <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号:" : $t("Gy.HBillNo") }}</view>
                <view class="righton">
                    <input name="HBillNo" disabled v-model="hform.HBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">单据日期:</view>
                <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期:" : $t("Gy.HDate") }}</view>
                <view class="right">
                    <picker mode="date" v-model="hform.HDate" @change="HDateChange">
                        <input disabled v-model="hform.HDate" placeholder="请选择日期" />
                        <input disabled v-model="hform.HDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择日期' : $t('Gy.HDate_Placeholder')" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>部门:</view>
                <view class="title"><text>*</text>{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "部门:" : $t("Gy.HDeptName") }}</view>
                <view class="right">
                    <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName"
                        @input="HDeptNameChange"></uni-combox>
                    <uni-combox :candidates="arrayHDeptName" :placeholder="$t('Gy.HDeptName_Placeholder') == 'Gy.HDeptName_Placeholder' ? '请选择部门' : $t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" @input="HDeptNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>操作员:</view>
                <view class="title"><text>*</text>{{ $t("MouldLowerBill.HEmpName") == "MouldLowerBill.HEmpName" ? "操作员:" : $t("MouldLowerBill.HEmpName") }}</view>
                <view class="right">
                    <uni-combox :candidates="arrayHEmpName" placeholder="请选择操作员" v-model="hform.HEmpName"
                        @input="HEmpNameChange"></uni-combox>
                    <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldLowerBill.HEmpName_Placeholder') == 'MouldLowerBill.HEmpName_Placeholder' ? '请选择操作员' : $t('MouldLowerBill.HEmpName_Placeholder')" v-model="hform.HEmpName" @input="HEmpNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>负责人:</view>
                <view class="title"><text>*</text>{{ $t("MouldLowerBill.HManagerName") == "MouldLowerBill.HManagerName" ? "负责人:" : $t("MouldLowerBill.HManagerName") }}</view>
                <view class="right">
                    <uni-combox :candidates="arrayHEmpName" placeholder="请选择负责人" v-model="hform.HMangerName"
                        @input="HManagerNameChange"></uni-combox>
                    <uni-combox :candidates="arrayHEmpName" :placeholder="$t('MouldLowerBill.HManagerName_Placeholder') == 'MouldLowerBill.HManagerName_Placeholder' ? '请选择负责人' : $t('MouldLowerBill.HManagerName_Placeholder')" v-model="hform.HMangerName" @input="HManagerNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产资源:</view>
                <view class="title">{{ $t("MouldLowerBill.HSourceName") == "MouldLowerBill.HSourceName" ? "生产资源:" : $t("MouldLowerBill.HSourceName") }}</view>
                <view class="right">
                    <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName"
                        @input="HSourceNameChange"></uni-combox>
                    <uni-combox :candidates="arrayHSourceName" :placeholder="$t('MouldLowerBill.HSourceName_Placeholder') == 'MouldLowerBill.HSourceName_Placeholder' ? '请选择生产资源' : $t('MouldLowerBill.HSourceName_Placeholder')" v-model="hform.HSourceName" @input="HSourceNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">模具编码:</view>
                <view class="title">{{ $t("MouldLowerBill.HMouldNumber") == "MouldLowerBill.HMouldNumber" ? "模具编码:" : $t("MouldLowerBill.HMouldNumber") }}</view>
                <view class="righton">
                    <input name="HMouldNumber" v-model="hform.HMouldNumber" disabled placeholder="请输入器具编码" />
                    <input name="HMouldNumber" v-model="hform.HMouldNumber" disabled :placeholder="$t('MouldLowerBill.HMouldNumber_Placeholder') == 'MouldLowerBill.HMouldNumber_Placeholder' ? '请输入器具编码' : $t('MouldLowerBill.HMouldNumber_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">模具名称:</view>
                <view class="title">{{ $t("MouldLowerBill.HMouldName") == "MouldLowerBill.HMouldName" ? "模具名称:" : $t("MouldLowerBill.HMouldName") }}</view>
                <view class="righton">
                    <input name="HMouldName" v-model="hform.HMouldName" disabled placeholder="请输入器具名称" />
                    <input name="HMouldName" v-model="hform.HMouldName" disabled :placeholder="$t('MouldLowerBill.HMouldName_Placeholder') == 'MouldLowerBill.HMouldName_Placeholder' ? '请输入器具名称' : $t('MouldLowerBill.HMouldName_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">模具型号:</view>
                <view class="title">{{ $t("MouldLowerBill.HMouldModel") == "MouldLowerBill.HMouldModel" ? "模具型号:" : $t("MouldLowerBill.HMouldModel") }}</view>
                <view class="righton">
                    <input name="HMouldModel" v-model="hform.HMouldModel" disabled placeholder="请输入器具型号" />
                    <input name="HMouldModel" v-model="hform.HMouldModel" disabled :placeholder="$t('MouldLowerBill.HMouldModel_Placeholder') == 'MouldLowerBill.HMouldModel_Placeholder' ? '请输入器具型号' : $t('MouldLowerBill.HMouldModel_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">数量:</view>
                <view class="title">{{ $t("Gy.HQty") == "Gy.HQty" ? "数量:" : $t("Gy.HQty") }}</view>
                <view class="righton">
                    <input name="HQty" v-model="hform.HQty" disabled placeholder="请输入数量" />
                    <input name="HQty" v-model="hform.HQty" disabled :placeholder="$t('Gy.HQty_Placeholder') == 'Gy.HQty_Placeholder' ? '请输入数量' : $t('Gy.HQty_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">下模时间:</view>
                <view class="title">{{ $t("MouldLowerBill.HScanDate") == "MouldLowerBill.HScanDate" ? "下模时间:" : $t("MouldLowerBill.HScanDate") }}</view>
                <view class="righton">
                    <input name="HScanDate" disabled v-model="hform.HScanDate" placeholder="请选择" />
                    <input name="HScanDate" disabled v-model="hform.HScanDate" :placeholder="$t('Gy.HDate_Placeholder') == 'Gy.HDate_Placeholder' ? '请选择' : $t('Gy.HDate_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产订单:</view>
                <view class="title">{{ $t("MouldLowerBill.HICMOBillNo") == "MouldLowerBill.HICMOBillNo" ? "生产订单:" : $t("MouldLowerBill.HICMOBillNo") }}</view>
                <view class="righton">
                    <input name="HICMOBillNo" disabled v-model="hform.HICMOBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">流转卡:</view>
                <view class="title">{{ $t("MouldLowerBill.HProcExchBillNo") == "MouldLowerBill.HProcExchBillNo" ? "流转卡:" : $t("MouldLowerBill.HProcExchBillNo") }}</view>
                <view class="righton">
                    <input disabled v-model="hform.HProcExchBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">备注:</view>
                <view class="title">{{ $t("Gy.HRemark") == "Gy.HRemark" ? "备注:" : $t("Gy.HRemark") }}</view>
                <view class="right">
                    <textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="请输入备注"></textarea>
                    <textarea name="HRemark" v-model="hform.HRemark" auto-height :placeholder="$t('Gy.HRemark_Placeholder') == 'Gy.HRemark_Placeholder' ? '请输入备注' : $t('Gy.HRemark_Placeholder')"></textarea>
                </view>
            </view>
@@ -107,39 +103,39 @@
            <view v-if="showmore">
                <view class="form-item">
                    <view class="title">制单人:</view>
                    <view class="title">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">制单日期:</view>
                    <view class="title">{{ $t("Gy.HMakeDate") == "Gy.HMakeDate" ? "制单日期:" : $t("Gy.HMakeDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HMakeDate" v-model="hform.HMakeDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HMakeDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="title">{{ $t("Gy.HUpDater") == "Gy.HUpDater" ? "修改人:" : $t("Gy.HUpDater") }}</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="title">{{ $t("Gy.HUpDateDate") == "Gy.HUpDateDate" ? "修改日期:" : $t("Gy.HUpDateDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HUpDateDate" v-model="hform.HUpDateDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HUpDateDate" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="title">{{ $t("Gy.HChecker") == "Gy.HChecker" ? "审核人:" : $t("Gy.HChecker") }}</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核日期:</view>
                    <view class="title">{{ $t("Gy.HCheckDate") == "Gy.HCheckDate" ? "审核日期:" : $t("Gy.HCheckDate") }}</view>
                    <view class="righton">
                        <input v-if="hform.HCheckDate" v-model="hform.HCheckDate.substr(0,10)" disabled />
                        <input v-else v-model="hform.HCheckDate" disabled />
@@ -149,20 +145,20 @@
            </view>
            <view class="other">
                <view v-if="!showmore" @tap="showmore = true">
                    展开其他信息<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
                    {{ $t("MouldLowerBill.expandInfo") == "MouldLowerBill.expandInfo" ? "展开其他信息" : $t("MouldLowerBill.expandInfo") }}<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
                </view>
                <view v-if="showmore" @tap="showmore = false">
                    折叠其他信息<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
                    {{ $t("MouldLowerBill.collapseInfo") == "MouldLowerBill.collapseInfo" ? "折叠其他信息" : $t("MouldLowerBill.collapseInfo") }}<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
                </view>
            </view>
            <view class="tab_area"></view>
            <view class="bottom-btn">
                <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button>
                <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
                <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldLowerBill.submit") == "MouldLowerBill.submit" ? "提交" : $t("MouldLowerBill.submit") }}</button>
                <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">{{ $t("MouldLowerBill.modify") == "MouldLowerBill.modify" ? "修改" : $t("MouldLowerBill.modify") }}</button>
                <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">{{ $t("MouldLowerBill.submit") == "MouldLowerBill.submit" ? "提交" : $t("MouldLowerBill.submit") }}</button>
                <button class="btn-c" size="mini" @tap="goBack">{{ $t("MouldLowerBill.goBack") == "MouldLowerBill.goBack" ? "退出" : $t("MouldLowerBill.goBack") }}</button>
            </view>
        </view>
@@ -238,6 +234,9 @@
        },
        onLoad(e) {
uni.setNavigationBarTitle({
                title: this.$t("MouldLowerBill.title") == 'MouldLowerBill.title' ? '下模单' : this.$t("MouldLowerBill.title")
            })
            this.hform.HMaker = uni.getStorageSync('HUserName')
            console.log(e, this.userInfo)
            if (e.linterid) {
@@ -260,7 +259,7 @@
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                    'timeoutText': this.$t('MouldLowerBill.scanTimeoutText') == 'MouldLowerBill.scanTimeoutText' ? '未识别到二维码' : this.$t('MouldLowerBill.scanTimeoutText') //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    this.hform.HBarCode = ret.resp_result
@@ -314,7 +313,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -345,7 +344,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -385,7 +384,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -432,7 +431,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -511,7 +510,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -541,7 +540,7 @@
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                            icon: 'none'
                        })
                    },
@@ -550,32 +549,32 @@
            submit() {
                if (!this.hform.HBarCode) {
                    uni.showToast({
                        title: '请扫描模具条形码',
                        title: this.$t('MouldLowerBill.scanMouldBarCode') == 'MouldLowerBill.scanMouldBarCode' ? '请扫描模具条形码' : this.$t('MouldLowerBill.scanMouldBarCode'),
                        icon: 'none'
                    })
                } else if (!this.hform.HSourceName) {
                    uni.showToast({
                        title: '请选择生产资源',
                        title: this.$t('MouldLowerBill.selectSource') == 'MouldLowerBill.selectSource' ? '请选择生产资源' : this.$t('MouldLowerBill.selectSource'),
                        icon: 'none'
                    })
                } else if (!this.hform.HMouldName) {
                    uni.showToast({
                        title: '模具不能为空',
                        title: this.$t('MouldLowerBill.mouldRequired') == 'MouldLowerBill.mouldRequired' ? '模具不能为空' : this.$t('MouldLowerBill.mouldRequired'),
                        icon: 'none'
                    })
                } else if (!this.hform.HEmpName) {
                    uni.showToast({
                        title: '请选择操作员',
                        title: this.$t('MouldLowerBill.selectOperator') == 'MouldLowerBill.selectOperator' ? '请选择操作员' : this.$t('MouldLowerBill.selectOperator'),
                        icon: 'none'
                    })
                } else if (!this.hform.HMangerName) {
                    uni.showToast({
                        title: '请选择负责人',
                        title: this.$t('MouldLowerBill.selectManager') == 'MouldLowerBill.selectManager' ? '请选择负责人' : this.$t('MouldLowerBill.selectManager'),
                        icon: 'none'
                    })
                } else {
                    uni.showLoading({
                        title: '请稍候'
                        title: this.$t('MouldLowerBill.pleaseWait') == 'MouldLowerBill.pleaseWait' ? '请稍候' : this.$t('MouldLowerBill.pleaseWait')
                    })
                    var sMainStr = JSON.stringify(this.hform);
                    var sMainSub = sMainStr + ";" + uni.getStorageSync('HUserName') + ";" + this.btnType;
@@ -593,8 +592,8 @@
                            if (res.data.count == 1) {
                            
                                uni.showModal({
                                    title: "提示",
                                    content: res.data.Message + "。是否继续新增?",
                                    title: this.$t('MouldLowerBill.confirmTitle') == 'MouldLowerBill.confirmTitle' ? '提示' : this.$t('MouldLowerBill.confirmTitle'),
                                    content: res.data.Message + (this.$t('MouldLowerBill.continueAdd') == 'MouldLowerBill.continueAdd' ? '。是否继续新增?' : this.$t('MouldLowerBill.continueAdd')),
                                    success: (res) => {
                                        if (res.confirm) {
                                            console.log("用户点击确定");
@@ -620,7 +619,7 @@
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '接口请求失败',
                                title: this.$t('MouldLowerBill.requestFailed') == 'MouldLowerBill.requestFailed' ? '接口请求失败' : this.$t('MouldLowerBill.requestFailed'),
                                icon: 'none'
                            })
                        },
@@ -629,8 +628,8 @@
            },
            goBack() {
                uni.showModal({
                    title: '提示',
                    content: '确认要退出当前页面吗?',
                    title: this.$t('MouldLowerBill.confirmTitle') == 'MouldLowerBill.confirmTitle' ? '提示' : this.$t('MouldLowerBill.confirmTitle'),
                    content: this.$t('MouldLowerBill.exitConfirm') == 'MouldLowerBill.exitConfirm' ? '确认要退出当前页面吗?' : this.$t('MouldLowerBill.exitConfirm'),
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
@@ -646,6 +645,7 @@
</script>
<style lang="scss" scoped>
    /* 样式保持不变 */
    .form {
        width: 668rpx;
        margin: 20rpx auto;
pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMain.vue
New file
@@ -0,0 +1,1368 @@
<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">
                            <uni-datetime-picker type="datetime" :clear-icon="false" v-model="hform.HHappendDate">
                                <view>{{ hform.HHappendDate }}</view>
                            </uni-datetime-picker>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">生产订单</view>
                        <view class="right">
                            <input type="text" v-model="hform.HICMOBillNos" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品编码</view>
                        <view class="right">
                            <input type="text" v-model="hform.HMaterNumbers" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品名称</view>
                        <view class="right">
                            <input type="text" v-model="hform.HMaterNames"/>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">规格型号</view>
                        <view class="right">
                            <input type="text" v-model="hform.HMaterModels"/>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">计量单位</view>
                        <view class="right">
                            <input type="text" v-model="hform.HUnitNames"/>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品类型</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMaterTypes" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良数量</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HUnRightQtys" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">车间</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HDeptNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">发生工序</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HProcNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良现象</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HBadPhenomenaNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良品SN码</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HBarCodes" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">销售订单</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HSeOrderBillNos" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">问题现象简述</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HReasonNotes" disabled />
                        </view>
                    </view>
                    <!-- 紧急程度 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">紧急程度</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HLevs" disabled />
                        </view>
                    </view>
                    <!-- 是否停线 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">是否停线</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HIsStops" disabled />
                        </view>
                    </view>
                    <!-- 是否批量问题 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">是否批量问题</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HIsBatchUnRights" disabled />
                        </view>
                    </view>
                    <!-- 处理部门 -->
                    <view class="form-item">
                        <view class="left">处理部门</view>
                        <view class="right">
                            <uni-combox :candidates="DeptNameList" placeholder="请选择处理部门" v-model="hform.HDisposeDeptName"
                                @input="HDisposeDeptChange"></uni-combox>
                        </view>
                    </view>
                    <!-- 发起人 -->
                    <view class="form-item">
                        <view class="left">发起人</view>
                        <view class="right">
                            <uni-combox :candidates="GyEmpNameList" placeholder="请选择发起人"
                                v-model="hform.HSendMan" @input="HSendManChange"></uni-combox>
                        </view>
                    </view>
                    <!-- 接收人 -->
                    <view class="form-item">
                        <view class="left">接收人</view>
                        <view class="right">
                            <uni-combox :candidates="GyEmpNameList" placeholder="请选择接收人"
                                v-model="hform.HReceiveMan" @input="HReceiveManChange"></uni-combox>
                        </view>
                    </view>
                    <!-- 抄送人 - 改为下拉框 -->
                    <view class="form-item">
                        <view class="left">抄送人</view>
                        <view class="right">
                            <uni-combox :candidates="GyEmpNameList" placeholder="请选择抄送人"
                                v-model="hform.HCopyMan" @input="HCopyManChange"></uni-combox>
                        </view>
                    </view>
                    <!-- 源单类型 - 修复版 -->
                    <view class="form-item">
                        <view class="left">源单类型</view>
                        <view class="right" v-show="showHMainSourceBillType">
                            <picker :range="arrayHMainSourceBillType" @change="HMainSourceBillTypeChange" mode="selector">
                                <view class="picker-value">{{ HMainSourceBillTypeDisplay || '请选择源单类型' }}</view>
                            </picker>
                        </view>
                        <view class="right disabled" v-show="!showHMainSourceBillType">
                            <view class="picker-value">{{ HMainSourceBillTypeDisplay }}</view>
                        </view>
                    </view>
                    <!-- 源单单号 -->
                    <view class="form-item">
                        <view class="left">源单号</view>
                        <view class="right">
                            <input type="text" v-model="hform.HMainSourceBillNo" placeholder="请输入或扫描源单号"
                                @confirm="GetMessageByHSourceBillNo" />
                        </view>
                        <view class="icon-wrapper" @click="openSourceBillSelector">
                            <uni-icons type="search" size="20"></uni-icons>
                        </view>
                        <view class="icon-wrapper" @click="scanSourceBill">
                            <uni-icons type="scan" size="20"></uni-icons>
                        </view>
                    </view>
                    <!-- 处理工序 -->
                    <view class="form-item">
                        <view class="left">处理工序</view>
                        <view class="right disabled">
                            <input type="text" disabled v-model="hform.HDisposeProcName" />
                        </view>
                        <view class="icon-wrapper-big">
                            <uni-icons type="search" size="20" :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
                                :disabled="hasSourceBill"
                                @click="showSelectorModule(8)"></uni-icons>
                        </view>
                    </view>
                    <!-- 不良类型 -->
                    <view class="form-item">
                        <view class="left">不良类型</view>
                        <view class="right disabled">
                            <input type="text" disabled v-model="hform.HBadTypeName" />
                        </view>
                        <view class="icon-wrapper-big">
                            <uni-icons type="search" size="20" :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
                                :disabled="hasSourceBill"
                                @click="showSelectorModule(7)"></uni-icons>
                        </view>
                    </view>
                    <!-- 不良原因 -->
                    <view class="form-item">
                        <view class="left">不良原因</view>
                        <view class="right disabled">
                            <input type="text" disabled v-model="hform.HBadReasonName" />
                        </view>
                        <view class="icon-wrapper-big">
                            <uni-icons type="search" size="20" :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
                                :disabled="hasSourceBill"
                                @click="showSelectorModule(2)"></uni-icons>
                        </view>
                    </view>
                    <!-- 处理结论详情 -->
                    <view class="form-item">
                        <view class="left">处理结论详情</view>
                        <view class="right">
                            <input type="text" v-model="hform.HDisposeNote" />
                        </view>
                    </view>
                    <!-- 纠正及预防措施 -->
                    <view class="form-item">
                        <view class="left">纠正及预防措施</view>
                        <view class="right">
                            <input type="text" v-model="hform.HNote" />
                        </view>
                    </view>
                    <!-- 处理结论 -->
                    <view class="form-item">
                        <view class="left">处理结论</view>
                        <view class="right select-border">
                            <uni-data-select
                                v-model="hform.HCheckerResult"
                                :localdata="conclusionList"
                                :clear="false"
                                placeholder="请选择处理结论"
                                :disabled="hasSourceBill"
                                class="no-border-select"
                            ></uni-data-select>
                        </view>
                    </view>
                </view>
                <view class="bill-main-content" v-if="mainTabSelected == 2">
                    <view class="form-item">
                        <view class="left">工序流转卡</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HProcExchBillNos" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品编码</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMaterNumbers" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品名称</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMaterNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">规格型号</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMaterModels" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">计量单位</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HUnitNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">产品类型</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMaterTypes" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良数量</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HUnRightQtys" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">车间</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HDeptNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">发生工序</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HProcNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良现象</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HBadPhenomenaNames" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">不良品SN码</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HBarCodes" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">销售订单</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HSeOrderBillNos" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">问题现象简述</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HReasonNotes" disabled />
                        </view>
                    </view>
                    <!-- 紧急程度 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">紧急程度</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HLevs" disabled />
                        </view>
                    </view>
                    <!-- 是否停线 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">是否停线</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HIsStops" disabled />
                        </view>
                    </view>
                    <!-- 是否批量问题 - 显示文本 -->
                    <view class="form-item">
                        <view class="left">是否批量问题</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HIsBatchUnRights" disabled />
                        </view>
                    </view>
                    <!-- 原有的备注和组织字段 -->
                    <view class="form-item">
                        <view class="left">备注</view>
                        <view class="right">
                            <input type="text" v-model="hform.HRemark" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">组织</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.Organization" disabled />
                        </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" v-model="hform.HMaker" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">制单日期</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HMakeDate" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">修改人</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HUpDater" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">修改日期</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HUpDateDate" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">审核人</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HChecker" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">审核日期</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HCheckDate" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">关闭人</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HCloseMan" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">关闭日期</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HCloseDate" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">作废人</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HDeleteMan" disabled />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">作废日期</view>
                        <view class="right disabled">
                            <input type="text" v-model="hform.HDeleteDate" disabled />
                        </view>
                    </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>
        <!-- 弹窗组件 -->
        <GyBadReasonPopup ref="GyBadReasonPopup" @update="CheckItemComplete" :bindKey="currentChechItemIDCache">
        </GyBadReasonPopup>
        <ProcessPopupVue ref="processPopup" @update="HProcComplete" :bindKey="0"></ProcessPopupVue>
        <GyBadTypePopupVue ref="GyBadTypePopupVue" @update="HQCSchemeComplete" :bindKey="0"></GyBadTypePopupVue>
        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
            :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="handleSourceBill"></BillListPopupVue>
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import {
        CommonUtils
    } from "../../../utils/common";
    import GyBadReasonPopup from "../../../components/ZLGL/GyBadReasonPopup.vue";
    import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
    import GyBadTypePopupVue from "../../../components/ZLGL/GyBadTypePopup.vue";
    import BillListPopupVue from "@/components/BillListPopup/BillListPopup.vue";
    import {
        getUserInfo
    } from "../../../utils/auth";
    export default {
        components: {
            GyBadReasonPopup,
            ProcessPopupVue,
            GyBadTypePopupVue,
            BillListPopupVue,
        },
        data() {
            return {
                operationType: 1,
                mainTabSelected: 1,
                hasSourceBill: false,
                enablePopupModule: "",
                PopupModuleNameList: [
                    "", "", "GyBadReasonPopup", "", "", "", "", "GyBadTypePopupVue", "ProcessPopupVue"
                ],
                conclusionList: [
                    { value: '处理完成', text: '处理完成' },
                    { value: '无法处理', text: '无法处理' },
                    { value: '处理失败', text: '处理失败' }
                ],
                emergencyList: [
                    { value: '普通', text: '普通' },
                    { value: '紧急', text: '紧急' }
                ],
                yesNoList: [
                    { value: '否', text: '否' },
                    { value: '是', text: '是' }
                ],
                currentChechItemIDCache: -1,
                GyEmpList: [],
                GyEmpNameList: [],
                DeptNameList: [],
                DeptList: [],
                HMainSourceBillTypeDisplay: "", // 用于显示的源单类型
                arrayHMainSourceBillType: ["不良品评审申请单", "工序出站汇报单"],
                arrayHMainSourceBillTypeID: ["7512", "3791"],
                showHMainSourceBillType: true,
                hform: {
                    // 单据信息
                    HInterID: "0",
                    HEntryID: "0",
                    HBillNo: "",
                    HDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HHappendDate:dayjs(new Date()).format("YYYY-MM-DD HH:MM"),
                    HBillType: '7514',
                    // 申请信息
                    HBillNos: "",
                    HDates: "",
                    HHappendDates: "",
                    // 生产订单
                    HICMOBillNos: "",
                    HICMOInterIDs: "0",
                    HICMOEntryIDs: "0",
                    // 产品信息
                    HMaterNumbers: "",
                    HMaterNames: "",
                    HMaterModels: "",
                    HMaterIDs: "0",
                    HUnitNames: "",
                    HUnitIDs: "0",
                    HMaterTypes: "",
                    // 工序流转卡
                    HProcExchBillNos: "",
                    HProcExchInterIDs: "0",
                    HProcExchEntryIDs: "0",
                    // 不良信息
                    HUnRightQtys: "",
                    HLevs: "普通",
                    HIsStops: "否",
                    HIsBatchUnRights: "否",
                    HBarCodes: "",
                    HBadPhenomenaNames: "",
                    HBadPhenomenaIDs: "0",
                    HReasonNotes: "",
                    // 部门工序
                    HDeptNames: "",
                    HDeptIDs: "0",
                    HProcNames: "",
                    HProcIDs: "0",
                    // 销售订单
                    HSeOrderBillNos: "",
                    // 源单信息
                    HMainSourceBillType: "",
                    HMainSourceBillNo: "",
                    HMainSourceInterID: "0",
                    HMainSourceEntryID: "0",
                    HSendMan: "",
                    HCopyMan: "",
                    HDisposeDeptName: "",
                    HDisposeDeptID: "0",
                    HDisposeProcName: "",
                    HDisposeProcID: "0",
                    HDisposeEmpName: "",
                    HSendManID: "0",
                    HReceiveManID: "0",
                    HDisposeEmpID: "0",
                    HCheckerResult: "处理完成",
                    HDisposeNote: "",
                    // 不良原因类型
                    HBadTypeName: "",
                    HBadTypeID: "0",
                    HBadReasonName: "",
                    HBadReasonID: "0",
                    // 备注
                    HNote: "",
                    HRemark: "",
                    // 组织信息
                    Organization: getUserInfo()["Organization"] || "",
                    HStockOrgID: uni.getStorageSync('OrganizationID') || "0",
                    // 制单信息
                    HMaker: getUserInfo()["Czymc"] || "",
                    HMakeDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    HUpDater: "",
                    HUpDateDate: "",
                    HChecker: "",
                    HCheckDate: "",
                    HCloseMan: "",
                    HCloseDate: "",
                    HDeleteMan: "",
                    HDeleteDate: "",
                },
            };
        },
        methods: {
            // 显示选择器弹窗
            async showSelectorModule(index) {
                if (this.hasSourceBill) {
                    uni.showToast({ title: '已有源单,不能修改', icon: 'none' });
                    return;
                }
                this.currentChechItemIDCache = 0;
                this.enablePopupModule = this.PopupModuleNameList[index];
                await this.$nextTick();
                let popupRef = null;
                if (index === 2) popupRef = this.$refs.GyBadReasonPopup;
                else if (index === 7) popupRef = this.$refs.GyBadTypePopupVue;
                else if (index === 8) popupRef = this.$refs.processPopup;
                if (popupRef) {
                    popupRef.showPopup();
                }
            },
            // 初始化职员数据的方法(仿照 InitHEmp)
            async InitGyEmp() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_Employee/list",
                        data: {
                            sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''`,
                            user: getUserInfo()["Czymc"],
                            Organization: uni.getStorageSync("Organization"),
                        },
                    });
                    let { data, Message, count } = res.data;
                    if (count == 1) {
                        this.GyEmpList = data;
                        this.GyEmpNameList = Array.from(data).map((e) => e["职员名称"]);
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `初始化职员失败: ${Message}`,
                        });
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `初始化职员失败: ${err}`,
                    });
                }
            },
            // 不良原因选择完成
            // 新增:扫码获取源单号
            scanSourceBill() {
                // 调用微信扫码功能
                uni.scanCode({
                    scanType: ['barCode', 'qrCode'],
                    success: (res) => {
                        // 将扫码结果赋值给源单号
                        this.hform.HMainSourceBillNo = res.result;
                        // 自动触发查询
                        this.GetMessageByHSourceBillNo();
                    },
                    fail: (err) => {
                        console.error('扫码失败:', err);
                        uni.showToast({
                            title: '扫码失败',
                            icon: 'none'
                        });
                    }
                });
            },
            CheckItemComplete(e) {
                if (e && e.retVal) {
                    let data = Object.values(e.retVal)[0];
                    this.hform.HBadReasonID = String(data.HItemID || 0);
                    this.hform.HBadReasonName = data.不良原因名称 || "";
                }
                this.$refs.GyBadReasonPopup?.exit();
                this.enablePopupModule = "";
            },
            // 不良类型选择完成
            HQCSchemeComplete(e) {
                if (e && e.retVal) {
                    let data = Object.values(e.retVal)[0];
                    this.hform.HBadTypeID = String(data.HItemID || 0);
                    this.hform.HBadTypeName = data.不良类型名称 || "";
                }
                this.$refs.GyBadTypePopupVue?.exit();
                this.enablePopupModule = "";
            },
            // 工序选择完成
            HProcComplete(e) {
                if (e && e.retVal) {
                    let data = Object.values(e.retVal)[0];
                    this.hform.HDisposeProcID = String(data.HItemID || 0);
                    this.hform.HDisposeProcName = data.工序名称 || "";
                }
                this.$refs.processPopup?.exit();
                this.enablePopupModule = "";
            },
            // 初始化部门
            async InitDept() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: '/PublicPageMethod/DeptList',
                        data: { sWhere: 'where 1=1' }
                    });
                    if (res.data.count == 1) {
                        this.DeptList = res.data.data;
                        this.DeptNameList = res.data.data.map(e => e['HName']);
                    }
                } catch (err) {
                    console.error('初始化部门错误:', err);
                }
            },
            // 初始化职员
            async InitHEmp() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_Employee/list",
                        data: {
                            sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''`,
                        },
                    });
                    if (res.data.count == 1) {
                        this.GyEmpList = res.data.data;
                        this.GyEmpNameList = res.data.data.map(e => e["职员名称"]);
                    }
                } catch (err) {
                    console.error('初始化职员失败:', err);
                }
            },
            // 打开源单选择器
            openSourceBillSelector() {
                if (!this.hform.HMainSourceBillType) {
                    uni.showToast({ title: '请先选择源单类型', icon: 'none' });
                    return;
                }
                this.$refs.billList.showPopup();
            },
            // 接收源单
            handleSourceBill(e) {
                this.hform.HMainSourceBillNo = e.HBillNo;
                this.GetMessageByHSourceBillNo();
                this.$refs.billList?.exit();
            },
            // 获取源单数据
            async GetMessageByHSourceBillNo() {
                 if (!this.hform.HMainSourceBillType) {
                        uni.showToast({ title: '请选择源单类型', icon: 'none' });
                        return;
                    }
                    if (!this.hform.HMainSourceBillNo ) {
                           uni.showToast({ title: '请输入或者扫码源单号', icon: 'none' });
                           return;
                       }
                try {
                    let res;
                    let user = getUserInfo()["Czymc"] || "";
                    let Organization = uni.getStorageSync('OrganizationID') || "";
                    // 根据源单类型调用不同的接口
                    if (this.hform.HMainSourceBillType === "7512") {
                        res = await CommonUtils.doRequest2Async({
                            url: "/Sc_ProcessMangement/Get_QC_NoPassProdRequestBillList",
                            type: "GET",
                            data: {
                                "sWhere": ` and 单据号 = '${this.hform.HMainSourceBillNo}'`,
                                "user": user
                            }
                        });
                    } else if (this.hform.HMainSourceBillType === "3791") {
                        res = await CommonUtils.doRequest2Async({
                            url: "/Cj_StationOutBill/get_Display_byPage",
                            type: "GET",
                            data: {
                                "sWhere": `and 单据号 = ''${this.hform.HMainSourceBillNo}''`,
                                "user": user,
                                "Organization": Organization,
                                "page": 1,
                                "size": 1,
                                "HBillSubType": "3791"
                            }
                        });
                    }
                    uni.hideLoading();
                    // 获取第一条数据
                    let data = null;
                    if (res.data) {
                        if (Array.isArray(res.data) && res.data.length > 0) {
                            data = res.data[0];
                        } else if (res.data.data && res.data.data.length > 0) {
                            data = res.data.data[0];
                        } else if (res.data.rows && res.data.rows.length > 0) {
                            data = res.data.rows[0];
                        } else if (res.data.list && res.data.list.length > 0) {
                            data = res.data.list[0];
                        }
                    }
                    if (data) {
                        // 根据源单类型处理数据
                        if (this.hform.HMainSourceBillType === "7512") {
                            // 处理不良品评审申请单数据(第一组数据)
                            this.hform.HBillNos = data.单据号 || "";
                            this.hform.HDates = data.日期 ? data.日期.split('T')[0] : "";
                            this.hform.HHappendDates = data.发生时间 ? data.发生时间.replace('T', ' ') : "";
                            this.hform.HICMOBillNos = data.任务单号 || "";
                            this.hform.HProcExchBillNos = data.工序流转卡号 || "";
                            this.hform.HMaterNumbers = data.产品代码 || "";
                            this.hform.HMaterNames = data.产品名称 || "";
                            this.hform.HMaterModels = data.规格型号 || "";
                            this.hform.HUnitNames = data.计量单位名称 || "";
                            this.hform.HMaterTypes = data.产品类型 === "1" ? "产成品" : data.产品类型 || "";
                            this.hform.HUnRightQtys = data.不良数量 || "0";
                            this.hform.HDeptNames = data.车间名称 || "";
                            this.hform.HProcNames = data.工序 || "";
                            this.hform.HBadPhenomenaNames = data.不良现象 || "";
                            this.hform.HBarCodes = data.不良品SN码 || "";
                            this.hform.HSeOrderBillNos = data.销售订单 || "";
                            this.hform.HReasonNotes = data.问题现象简述 || "";
                            this.hform.HLevs = data.紧急程度 || "普通";
                            this.hform.HIsStops = data.是否停线 || "否";
                            this.hform.HIsBatchUnRights = data.是否批量问题 || "否";
                            // 源单ID信息
                            this.hform.HMainSourceInterID = data.hmainid || "0";
                            this.hform.HMainSourceEntryID = data.任务单子内码 || "0";
                        } else if (this.hform.HMainSourceBillType === "3791") {
                            // 处理工序出站汇报单数据(第二组数据)
                            this.hform.HBillNos = data.单据号 || "";
                            this.hform.HDates = data.日期 ? data.日期.split('T')[0] : "";
                            this.hform.HHappendDates = data.出站时间 ? data.出站时间.replace('T', ' ') : "";
                            this.hform.HICMOBillNos = data.任务单 || "";
                            this.hform.HProcExchBillNos = data.工序流转卡号 || "";
                            this.hform.HMaterNumbers = data.产品代码 || "";
                            this.hform.HMaterNames = data.产品名称 || "";
                            this.hform.HMaterModels = data.规格型号 || "";
                            this.hform.HUnitNames = data.计量单位 || "";
                            this.hform.HMaterTypes = data.产品类型 || "";
                            // 不良数量 - 第二组数据中可能是不良数量字段
                            this.hform.HUnRightQtys = data.不良数量 || data.报废数量 || "0";
                            this.hform.HDeptNames = data.车间 || data.部门 || "";
                            this.hform.HProcNames = data.当前工序 || "";
                            // 不良现象 - 第二组数据可能没有这个字段
                            this.hform.HBadPhenomenaNames = data.不良现象 || "";
                            // 其他字段
                            this.hform.HBarCodes = data.批次号 || data.不良品SN码 || "";
                            this.hform.HSeOrderBillNos = data.销售订单 || "";
                            this.hform.HReasonNotes = data.问题现象简述 || "";
                            this.hform.HLevs = data.紧急程度 || "普通";
                            this.hform.HIsStops = data.是否停线 || "否";
                            this.hform.HIsBatchUnRights = data.是否批量问题 || "否";
                            // 源单ID信息
                            this.hform.HMainSourceInterID = data.hmainid || data.HProcExchInterID || "0";
                            this.hform.HMainSourceEntryID = data.HProcExchEntryID || "1";
                        }
                        // 设置源单类型显示
                        let index = this.arrayHMainSourceBillTypeID.findIndex(id => id == this.hform.HMainSourceBillType);
                        if (index != -1) {
                            this.HMainSourceBillTypeDisplay = this.arrayHMainSourceBillType[index];
                        }
                        this.hasSourceBill = false;
                        uni.showToast({ title: '加载成功', icon: 'success' });
                        // 强制更新视图
                        this.$forceUpdate();
                    } else {
                        uni.showToast({ title: '未找到源单', icon: 'none' });
                    }
                } catch (err) {
                    uni.hideLoading();
                    console.error('获取失败:', err);
                    // 显示更详细的错误信息
                    if (err.response && err.response.data) {
                        console.error('错误详情:', err.response.data);
                        uni.showToast({ title: err.response.data.Message || '获取失败', icon: 'none' });
                    } else {
                        uni.showToast({ title: '获取失败', icon: 'none' });
                    }
                }
            },
            // 处理部门选择
            HDisposeDeptChange(val) {
                let index = this.DeptNameList.findIndex(e => e == val);
                if (index == -1) {
                    this.hform.HDisposeDeptName = '';
                    this.hform.HDisposeDeptID = '0';
                    return;
                }
                this.hform.HDisposeDeptName = this.DeptList[index]['HName'];
                this.hform.HDisposeDeptID = String(this.DeptList[index]['HItemID']);
            },
            // 发起人选择
            HSendManChange(val) {
                let index = this.GyEmpList.findIndex(e => e["职员名称"] == val);
                if (index == -1) {
                    this.hform.HSendMan = "";
                    return;
                }
                this.hform.HSendMan = this.GyEmpList[index]["职员名称"];
            },
            // 接收人选择
            HReceiveManChange(val) {
                let index = this.GyEmpList.findIndex(e => e["职员名称"] == val);
                if (index == -1) {
                    this.hform.HReceiveMan = "";
                    return;
                }
                this.hform.HReceiveMan = this.GyEmpList[index]["职员名称"];
            },
            // 抄送人选择 -
            HCopyManChange(val) {
                let index = this.GyEmpList.findIndex(e => e["职员名称"] == val);
                if (index == -1) {
                    this.hform.HCopyMan = "";
                    return;
                }
                this.hform.HCopyMan = this.GyEmpList[index]["职员名称"];
            },
            // 源单类型选择
            HMainSourceBillTypeChange(e) {
                let index = e.detail.value;
                this.HMainSourceBillTypeDisplay = this.arrayHMainSourceBillType[index];
                this.hform.HMainSourceBillType = this.arrayHMainSourceBillTypeID[index];
            },
            // 获取单据号
            async getMaxBillNo() {
                try {
                    let res = await CommonUtils.doRequest2Sync({
                        url: "/Web/GetMAXNum",
                        data: { HBillType: "7512" },
                    });
                    if (res?.data?.count == 1) {
                        this.hform.HInterID = res.data.data[0].HInterID;
                        this.hform.HBillNo = res.data.data[0].HBillNo;
                    }
                } catch (err) {
                    console.error('获取单据号异常:', err);
                }
            },
            // 验证
            checkSubmitValidate() {
                if (!this.hform.HBillNo) {
                    uni.showToast({ title: '单据号不能为空', icon: 'none' });
                    return false;
                }
                if (!this.hform.HSendMan) {
                    uni.showToast({ title: '发起人不能为空', icon: 'none' });
                    return false;
                }
                if (!this.hform.HReceiveMan) {
                    uni.showToast({ title: '接收人不能为空', icon: 'none' });
                    return false;
                }
                return true;
            },
        async getEditData(HInterID) {
            if (!HInterID || HInterID === "0") return;
            uni.showLoading({ title: '加载中...' });
            try {
                let res = await CommonUtils.doRequest2Async({
                    url: "/Sc_ProcessMangement/Edit_QC_NoPassProdDisposeBill",
                    type: "GET",
                    data: { "HID": HInterID }
                });
                if (res.data && res.data.data && res.data.data.length > 0) {
                    let data = res.data.data[0];
                    this.hform = {
                        ...this.hform,  // 保留原有的默认值
                        HInterID: data.hmainid || "0",
                        HEntryID: data.HEntryID || "0",
                        HBillNo: data.单据号 || "",
                        HDate: data.日期 ? data.日期.split('T')[0] : dayjs().format("YYYY-MM-DD"),
                        HBillType: data.HBillType || '7513',
                        HBillNos: data.源单号 || "",  // 这是源单号
                        HDates: data.日期 ? data.日期.split('T')[0] : "",  // 源单日期
                        HHappendDates: data.发生时间 ? data.发生时间.replace('T', ' ') : "",
                        HICMOBillNos: data.生产订单|| "",
                        HICMOInterIDs: data.HICMOInterIDs || "0",
                        HICMOEntryIDs: data.HICMOEntryIDs || "0",
                        HMaterNumbers: data.产品代码 || "",
                        HMaterNames: data.产品名称 || "",
                        HMaterModels: data.规格型号 || "",
                        HMaterIDs: data.HMaterID || "0",
                        HUnitNames: data.计量单位名称 || "",
                        HUnitIDs: data.HUnitID || "0",
                        HMaterTypes: data.产品类型 === "1" ? "产品类型" : data.产品类型 || "",
                        HProcExchBillNos: data.工序流转卡号 || "",
                        HProcExchInterIDs: data.HProcExchInterIDs || "0",
                        HProcExchEntryIDs: data.HProcExchEntryIDs || "0",
                        HDisposeEmpName:data.处理人 ,
                        HUnRightQtys: data.不良数量 || "0",
                        HLevs: data.紧急程度 || "普通",
                        HIsStops: data.是否停线 || "否",
                        HIsBatchUnRights: data.是否批量问题 || "否",
                        HBarCodes: data.不良品SN码 || "",
                        HBadPhenomenaNames: data.不良现象 || "",
                        HBadPhenomenaIDs: data.HBadPhenomenaID || "0",
                        HReasonNotes: data.问题现象简述 || "",
                        HNote:data.纠正及预防措施,
                        HDeptNames: data.车间名称 || "",
                        HDeptIDs: data.HDeptID || "0",
                        HProcNames: data.工序 || "",
                        HProcIDs: data.HProcID || "0",
                        HSeOrderBillNos: data.销售订单 || "",
                        HMainSourceBillType: data.源单类型 || "",
                        HMainSourceBillNo: data.源单号 || "",
                        HMainSourceInterID: data.源单ID || data.hmainid || "0",
                        HMainSourceEntryID: data.源单子ID || data.任务单子内码 || "0",
                        HSendMan: data.发送人 || "",
                        HReceiveMan: data.接收人 || "",
                        HCopyMan: data.抄送 || "",
                        HDisposeDeptName: data.处理部门 || "",
                        HDisposeDeptID: data.HDisposeDeptID || "0",
                        HDisposeProcID:data.HDisposeProcID || "0",
                        HDisposeProcName: data.处理工序 || "",
                        HDisposeEmpID: data.HDisposeEmpID || "0",
                        HCheckerResult: data.处理结论 || "",
                        HDisposeNote: data.处理结论详情 || "",
                        HBadTypeName: data.不良类型 || "",
                        HBadTypeID: data.HBadTypeID || "0",
                        HBadReasonName: data.不良原因 || "",
                        HBadReasonID: data.HBadReasonID || "0",
                        HRemark: data.表头备注 || "",
                        Organization: data.Organization || getUserInfo()["Organization"] || "",
                        HStockOrgID: data.HStockOrgID || uni.getStorageSync('OrganizationID') || "0",
                        HMaker: data.制单人 || "",
                        HMakeDate: data.制单日期 ? data.制单日期.replace('T', ' ') : "",
                        HUpDater: data.修改人 || "",
                        HUpDateDate: data.修改日期 ? data.修改日期.replace('T', ' ') : "",
                        HChecker: data.审核人 || "",
                        HCheckDate: data.审核日期 ? data.审核日期.replace('T', ' ') : "",
                        HCloseMan: data.关闭人 || "",
                        HCloseDate: data.关闭日期 ? data.关闭日期.replace('T', ' ') : "",
                        HDeleteMan: data.作废人 || "",
                        HDeleteDate: data.作废日期 ? data.作废日期.replace('T', ' ') : "",
                    };
                    if (data.源单类型) {
                        let index = this.arrayHMainSourceBillTypeID.findIndex(id => id == data.源单类型);
                        if (index != -1) {
                            this.HMainSourceBillTypeDisplay = this.arrayHMainSourceBillType[index];
                        }
                    }
                    this.hasSourceBill = false;
                    this.$forceUpdate();
                    console.log('赋值后的hform:', this.hform);
                }
            } catch (err) {
                console.error('获取数据失败:', err);
                uni.showToast({ title: '获取数据失败', icon: 'none' });
            } finally {
                uni.hideLoading();
            }
        },
        // 保存
        async submit() {
            if (!this.checkSubmitValidate()) return;
            let operation = this.operationType == 1 ? "Add" : "Update";
            // 编辑时设置修改人和修改时间
            if (this.operationType == 3) {
                this.hform.HUpDater = getUserInfo()["Czymc"];
                this.hform.HUpDateDate = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
            }
            try {
                let sMainStr = JSON.stringify(this.hform);
                let sMainSub = sMainStr + ';' + operation + ';' + getUserInfo()["Czymc"];
                let res = await CommonUtils.doRequest2Sync({
                    url: "/Sc_ProcessMangement/SaveQC_NoPassProdDisposeBill",
                    data: { "msg": sMainSub },
                    method: "POST",
                });
                if (res?.data?.count == 1) {
                    uni.showModal({
                        title: '提示',
                        content: '保存成功,是否继续新增?',
                        success: (r) => {
                            if (r.confirm) {
                                uni.redirectTo({
                                    url: "/pages/ZLGL/QCNoPassProdDisposeBillMainList/QCNoPassProdDisposeBillMain?operationType=1",
                                });
                            } else {
                                uni.navigateBack();
                            }
                        }
                    });
                } else {
                    uni.showToast({ title: res?.data?.Message || '保存失败', icon: 'none' });
                }
            } catch (err) {
                console.error('保存失败:', err);
                uni.showToast({ title: '保存失败', icon: 'none' });
            }
        },
            // 新增
            addNew() {
                uni.redirectTo({
                     url: "/pages/ZLGL/QCNoPassProdDisposeBillMainList/QCNoPassProdDisposeBillMain?operationType=1",
                });
            },
            // 返回
            goBack() {
                uni.navigateBack();
            },
        },
        async onLoad(e) {
            this.operationType = parseInt(e.operationType) || 1;
            this.hform.HInterID = e.HInterID  || "0";
            const organization = uni.getStorageSync('Organization');
            this.hform.Organization = organization || '';
            await this.InitGyEmp();
            await this.InitDept();
           if (this.operationType == 1) {
                await this.getMaxBillNo();
                this.hform.HSendMan = getUserInfo()["Czymc"] || "";
            } else if (this.operationType == 3) {
                await this.getEditData(e.HInterID);
            }
        }
    };
</script>
<style lang="scss" scoped>
    /* 样式保持不变 */
    input { width: inherit; font-size: 26rpx; }
    .uni-input { padding: 0; }
    .bill-main-tabs {
        box-sizing: border-box;
        width: 730rpx;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20rpx;
        border-bottom: 1px solid #ddd;
        padding: 20rpx 10rpx;
        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 {
        box-sizing: border-box;
        padding: 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; }
            .right {
                padding: 8rpx 20rpx;
                font-size: 26rpx;
                flex: 1;
                border-radius: 22rpx;
                border: 1px solid #acacac;
                .uni-combox { padding: 0; height: auto; }
                .uni-combox::v-deep input { height: inherit; font-size: 26rpx; }
                input {
                    width: 100%;
                    border: none;
                    outline: none;
                    background: transparent;
                }
            }
            .disabled { border: 1px solid #e4e4e4; background-color: #f5f5f5; }
        }
    }
    .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;
        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-c { background-color: #acacac; color: #fff; }
    }
    .select-border {
        border: 1px solid #acacac !important;
        border-radius: 22rpx !important;
    }
    .no-border-select ::v-deep .uni-select {
        border: none !important;
    }
    .icon-wrapper, .icon-wrapper-big {
        background-color: #3a78ff;
        border-radius: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        margin-left: 20rpx;
        .uni-icons { color: #fff !important; }
    }
    .icon-wrapper { width: 40rpx; height: 40rpx; }
    .icon-wrapper-big { width: 50rpx; height: 50rpx; }
    .enable-icon-button { background-color: #3a78ff; }
    .disable-icon-button { background-color: lightgray; pointer-events: none; }
</style>
pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMainList.vue
New file
@@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>
pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
@@ -2,150 +2,145 @@
    <view>
        <scroll-view scroll-y id="scroll-content" class="scroll-content" :style="{height: scrollContentHeight + 'px'}">
            <view class="form-item">
                <view class="title">条形码:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HBarCode") == "QC_TakeSampleCheckBill.HBarCode" ? "条形码:" : $t("QC_TakeSampleCheckBill.HBarCode") }}</view>
                <view class="right">
                    <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" />
                    <input type="text" name="HBarCode" id="HBarCode" v-model="HBarCode" @confirm="getCode(HBarCode)" :placeholder="$t('QC_TakeSampleCheckBill.HBarCode_Placeholder') == 'QC_TakeSampleCheckBill.HBarCode_Placeholder' ? '请扫描条码' : $t('QC_TakeSampleCheckBill.HBarCode_Placeholder')" />
                </view>
                <view class="right-icon" @click="toScanCode">
                    <uni-icons color="#fff" type="scan" size="24"></uni-icons>
                </view>
            </view>
            <view class="form-item">
                <view class="title required">工序:</view>
                <view class="title required">{{ $t("QC_TakeSampleCheckBill.HProcName") == "QC_TakeSampleCheckBill.HProcName" ? "工序:" : $t("QC_TakeSampleCheckBill.HProcName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" placeholder="请选择工序号"
                        v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox>
                    <uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" :placeholder="$t('QC_TakeSampleCheckBill.HProcName_Placeholder') == 'QC_TakeSampleCheckBill.HProcName_Placeholder' ? '请选择工序号' : $t('QC_TakeSampleCheckBill.HProcName_Placeholder')" v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title required">取样数量:</view>
                <view class="title required">{{ $t("Gy.HQty") == "Gy.HQty" ? "取样数量:" : $t("Gy.HQty") }}</view>
                <view class="right">
                    <input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
                    <input type="number" name="HQty" id="HQty" v-model="hform.HQty" :placeholder="$t('Gy.HQty_Placeholder') == 'Gy.HQty_Placeholder' ? '请输入数量' : $t('Gy.HQty_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">破坏性实验数量:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HSampleDamageQty") == "QC_TakeSampleCheckBill.HSampleDamageQty" ? "破坏性实验数量:" : $t("QC_TakeSampleCheckBill.HSampleDamageQty") }}</view>
                <view class="right">
                    <input type="number" name="HSampleDamageQty" id="HSampleDamageQty"
                        v-model="hform.HSampleDamageQty" />
                        v-model="hform.HSampleDamageQty" :placeholder="$t('QC_TakeSampleCheckBill.HSampleDamageQty_Placeholder') == 'QC_TakeSampleCheckBill.HSampleDamageQty_Placeholder' ? '请输入数量' : $t('QC_TakeSampleCheckBill.HSampleDamageQty_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title required">送测类型:</view>
                <view class="title required">{{ $t("QC_TakeSampleCheckBill.TestType") == "QC_TakeSampleCheckBill.TestType" ? "送测类型:" : $t("QC_TakeSampleCheckBill.TestType") }}</view>
                <view class="right">
                    <uni-combox :candidates="TestTypeArray" v-model="hform.TestType"
                        @input="TestTypeChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">送测内容:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HBadNote") == "QC_TakeSampleCheckBill.HBadNote" ? "送测内容:" : $t("QC_TakeSampleCheckBill.HBadNote") }}</view>
                <view class="right">
                    <input type="text" name="HBadNote" id="HBadNote" v-model="hform.HBadNote" />
                    <input type="text" name="HBadNote" id="HBadNote" v-model="hform.HBadNote" :placeholder="$t('QC_TakeSampleCheckBill.HBadNote_Placeholder') == 'QC_TakeSampleCheckBill.HBadNote_Placeholder' ? '请输入送测内容' : $t('QC_TakeSampleCheckBill.HBadNote_Placeholder')" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">部门:</view>
                <view class="title">{{ $t("Gy.HDeptName") == "Gy.HDeptName" ? "部门:" : $t("Gy.HDeptName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" placeholder="请选择部门"
                        v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
                    <uni-combox :candidates="HDeptNameArray" name="HDeptName" id="HDeptName" :placeholder="$t('Gy.HDeptName_Placeholder') == 'Gy.HDeptName_Placeholder' ? '请选择部门' : $t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" @input="HDeptNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title required">生产班次:</view>
                <view class="title required">{{ $t("QC_TakeSampleCheckBill.HShiftsName") == "QC_TakeSampleCheckBill.HShiftsName" ? "生产班次:" : $t("QC_TakeSampleCheckBill.HShiftsName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="请选择生产班次"
                        v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
                    <uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" :placeholder="$t('QC_TakeSampleCheckBill.HShiftsName_Placeholder') == 'QC_TakeSampleCheckBill.HShiftsName_Placeholder' ? '请选择生产班次' : $t('QC_TakeSampleCheckBill.HShiftsName_Placeholder')" v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title required">生产班组:</view>
                <view class="title required">{{ $t("QC_TakeSampleCheckBill.HGroupName") == "QC_TakeSampleCheckBill.HGroupName" ? "生产班组:" : $t("QC_TakeSampleCheckBill.HGroupName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HGroupNameArray" name="HGroupName" id="HGroupName" placeholder="请选择生产班组"
                        v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox>
                    <uni-combox :candidates="HGroupNameArray" name="HGroupName" id="HGroupName" :placeholder="$t('QC_TakeSampleCheckBill.HGroupName_Placeholder') == 'QC_TakeSampleCheckBill.HGroupName_Placeholder' ? '请选择生产班组' : $t('QC_TakeSampleCheckBill.HGroupName_Placeholder')" v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">取样员:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HCheckEmpName") == "QC_TakeSampleCheckBill.HCheckEmpName" ? "取样员:" : $t("QC_TakeSampleCheckBill.HCheckEmpName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HCheckEmpNameArray" name="HCheckEmpName" id="HCheckEmpName"
                        placeholder="请选择取样员" v-model="hform.HCheckEmpName"
                        :placeholder="$t('QC_TakeSampleCheckBill.HCheckEmpName_Placeholder') == 'QC_TakeSampleCheckBill.HCheckEmpName_Placeholder' ? '请选择取样员' : $t('QC_TakeSampleCheckBill.HCheckEmpName_Placeholder')" v-model="hform.HCheckEmpName"
                        @input="HCheckEmpNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产资源:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HSourceName") == "QC_TakeSampleCheckBill.HSourceName" ? "生产资源:" : $t("QC_TakeSampleCheckBill.HSourceName") }}</view>
                <view class="right">
                    <uni-combox :candidates="HSourceNameArray" name="HSourceName" id="HSourceName" placeholder="请选择生产资料"
                        v-model="hform.HSourceName" @input="HSourceNameChangeHandler"></uni-combox>
                    <uni-combox :candidates="HSourceNameArray" name="HSourceName" id="HSourceName" :placeholder="$t('QC_TakeSampleCheckBill.HSourceName_Placeholder') == 'QC_TakeSampleCheckBill.HSourceName_Placeholder' ? '请选择生产资料' : $t('QC_TakeSampleCheckBill.HSourceName_Placeholder')" v-model="hform.HSourceName" @input="HSourceNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">单据日期:</view>
                <view class="title">{{ $t("Gy.HDate") == "Gy.HDate" ? "单据日期:" : $t("Gy.HDate") }}</view>
                <view class="right disabled">
                    <input disabled type="text" name="HDate" id="HDate" v-model="hform.HDate" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">单据号:</view>
                <view class="title">{{ $t("Gy.HBillNo") == "Gy.HBillNo" ? "单据号:" : $t("Gy.HBillNo") }}</view>
                <view class="right disabled">
                    <input disabled type="text" name="HBillNo" id="HBillNo" v-model="hform.HBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产订单:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HICMOBillNo") == "QC_TakeSampleCheckBill.HICMOBillNo" ? "生产订单:" : $t("QC_TakeSampleCheckBill.HICMOBillNo") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">流转卡:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HProcExchBillNo") == "QC_TakeSampleCheckBill.HProcExchBillNo" ? "流转卡:" : $t("QC_TakeSampleCheckBill.HProcExchBillNo") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HProcExchBillNo" name="HProcExchBillNo"
                        id="HProcExchBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">物料代码:</view>
                <view class="title">{{ $t("Gy.HMaterCode") == "Gy.HMaterCode" ? "物料代码:" : $t("Gy.HMaterCode") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HMaterCode" name="HMaterCode" id="HMaterCode" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">物料名称:</view>
                <view class="title">{{ $t("Gy.HMaterName") == "Gy.HMaterName" ? "物料名称:" : $t("Gy.HMaterName") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HMaterName" name="HMaterName" id="HMaterName" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">规格型号:</view>
                <view class="title">{{ $t("Gy.HMaterSpec") == "Gy.HMaterSpec" ? "规格型号:" : $t("Gy.HMaterSpec") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HMaterSpec" name="HMaterSpec" id="HMaterSpec" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">计量单位:</view>
                <view class="title">{{ $t("Gy.HUnitName") == "Gy.HUnitName" ? "计量单位:" : $t("Gy.HUnitName") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HUnitName" name="HUnitName" id="HUnitName" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">流转卡批号:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HBatchNo") == "QC_TakeSampleCheckBill.HBatchNo" ? "流转卡批号:" : $t("QC_TakeSampleCheckBill.HBatchNo") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HBatchNo" name="HBatchNo" id="HBatchNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">流转卡数量:</view>
                <view class="title">{{ $t("QC_TakeSampleCheckBill.HProcExchQty") == "QC_TakeSampleCheckBill.HProcExchQty" ? "流转卡数量:" : $t("QC_TakeSampleCheckBill.HProcExchQty") }}</view>
                <view class="right disabled">
                    <input disabled type="text" v-model="hform.HProcExchQty" name="HProcExchQty" id="HProcExchQty" />
                </view>
            </view>
        </scroll-view>
        <view class="bottom-btn" id="bottom-btn">
            <view><button class="btn-a" size="mini" @tap="submit">提交</button></view>
            <view><button class="btn-b" size="mini" @tap="onAddNewHandler">新增</button></view>
            <view><button class="btn-a" size="mini" @tap="submit">{{ $t("QC_TakeSampleCheckBill.submit") == "QC_TakeSampleCheckBill.submit" ? "提交" : $t("QC_TakeSampleCheckBill.submit") }}</button></view>
            <view><button class="btn-b" size="mini" @tap="onAddNewHandler">{{ $t("QC_TakeSampleCheckBill.addNew") == "QC_TakeSampleCheckBill.addNew" ? "新增" : $t("QC_TakeSampleCheckBill.addNew") }}</button></view>
            <view class="placeholder__view"></view>
            <view><button class="btn-c" size="mini" @tap="goBack">退出</button></view>
            <view><button class="btn-c" size="mini" @tap="goBack">{{ $t("QC_TakeSampleCheckBill.goBack") == "QC_TakeSampleCheckBill.goBack" ? "退出" : $t("QC_TakeSampleCheckBill.goBack") }}</button></view>
        </view>
    </view>
</template>
@@ -169,7 +164,6 @@
                },
                refSav: 'Add',
                showMask: true,
                TestTypeArray: ["首检", "巡检", "未检", "实验"],
                HBillType: '7521',
                HProcNameArray: [],
@@ -197,7 +191,7 @@
                    HProcID: 0,
                    HQty: '',
                    HSampleDamageQty: 0,
                    TestType: '首检',
                    TestType: 'first',
                    HBadNote: '',
                    HDeptName: getUserInfo().HDeptName,
                    HDeptID: getUserInfo().HDeptID,
@@ -247,6 +241,14 @@
                get() {
                    return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
                }
            },
            TestTypeArray() {
                return [
                    this.$t('QC_TakeSampleCheckBill.testTypeFirst') == 'QC_TakeSampleCheckBill.testTypeFirst' ? '首检' : this.$t('QC_TakeSampleCheckBill.testTypeFirst'),
                    this.$t('QC_TakeSampleCheckBill.testTypeInspection') == 'QC_TakeSampleCheckBill.testTypeInspection' ? '巡检' : this.$t('QC_TakeSampleCheckBill.testTypeInspection'),
                    this.$t('QC_TakeSampleCheckBill.testTypeNot') == 'QC_TakeSampleCheckBill.testTypeNot' ? '未检' : this.$t('QC_TakeSampleCheckBill.testTypeNot'),
                    this.$t('QC_TakeSampleCheckBill.testTypeExperiment') == 'QC_TakeSampleCheckBill.testTypeExperiment' ? '实验' : this.$t('QC_TakeSampleCheckBill.testTypeExperiment')
                ];
            }
        },
        onReady() {
@@ -265,6 +267,9 @@
        },
        async onLoad(e) {
            uni.setNavigationBarTitle({
                title: this.$t("QC_TakeSampleCheckBill.title") == 'QC_TakeSampleCheckBill.title' ? '取样单' : this.$t("QC_TakeSampleCheckBill.title")
            })
            let {
                operationType
            } = e
@@ -284,7 +289,7 @@
            this.get_HWorkShift()
        },
        methods: {
            HDeptNameChangeHandler() {
            HDeptNameChangeHandler(e) {
                let index = this.HDeptNameArray.findIndex(item => item == e)
                if (index != -1) {
@@ -348,7 +353,7 @@
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                                title: msg
                            })
                        }
                    }
@@ -575,7 +580,7 @@
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                    'timeoutText': this.$t('QC_TakeSampleCheckBill.scanTimeoutText') == 'QC_TakeSampleCheckBill.scanTimeoutText' ? '未识别到二维码' : this.$t('QC_TakeSampleCheckBill.scanTimeoutText') //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    if (this.hform.HBarCode == '*') {
@@ -592,7 +597,7 @@
                if (!HBarCode) {
                    return uni.showToast({
                        icon: 'none',
                        title: '条形码不能为空'
                        title: this.$t('QC_TakeSampleCheckBill.barCodeEmpty') == 'QC_TakeSampleCheckBill.barCodeEmpty' ? '条形码不能为空' : this.$t('QC_TakeSampleCheckBill.barCodeEmpty')
                    })
                }
                CommonUtils.doRequest2({
@@ -662,55 +667,55 @@
                if (this.hform.HProcID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '工序没有选择'
                        title: this.$t('QC_TakeSampleCheckBill.noProcess') == 'QC_TakeSampleCheckBill.noProcess' ? '工序没有选择' : this.$t('QC_TakeSampleCheckBill.noProcess')
                    })
                }
                if (this.hform.HQty == '') {
                    return uni.showToast({
                        icon: 'none',
                        title: '取样数量不能为空'
                        title: this.$t('QC_TakeSampleCheckBill.sampleQtyEmpty') == 'QC_TakeSampleCheckBill.sampleQtyEmpty' ? '取样数量不能为空' : this.$t('QC_TakeSampleCheckBill.sampleQtyEmpty')
                    })
                }
                if (this.hform.HSampleDamageQty == '') {
                    return uni.showToast({
                        icon: 'none',
                        title: '破坏性实验数量不能为空'
                        title: this.$t('QC_TakeSampleCheckBill.damageQtyEmpty') == 'QC_TakeSampleCheckBill.damageQtyEmpty' ? '破坏性实验数量不能为空' : this.$t('QC_TakeSampleCheckBill.damageQtyEmpty')
                    })
                }
                if (this.hform.HProcID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '工序没有选择'
                        title: this.$t('QC_TakeSampleCheckBill.noProcess') == 'QC_TakeSampleCheckBill.noProcess' ? '工序没有选择' : this.$t('QC_TakeSampleCheckBill.noProcess')
                    })
                }
                if (this.hform.HDeptID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '部门没有选择'
                        title: this.$t('QC_TakeSampleCheckBill.noDept') == 'QC_TakeSampleCheckBill.noDept' ? '部门没有选择' : this.$t('QC_TakeSampleCheckBill.noDept')
                    })
                }
                if (this.hform.HShiftsID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '班次未选择'
                        title: this.$t('QC_TakeSampleCheckBill.noShift') == 'QC_TakeSampleCheckBill.noShift' ? '班次未选择' : this.$t('QC_TakeSampleCheckBill.noShift')
                    })
                }
                if (this.hform.HGroupID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '生产班组未选择'
                        title: this.$t('QC_TakeSampleCheckBill.noGroup') == 'QC_TakeSampleCheckBill.noGroup' ? '生产班组未选择' : this.$t('QC_TakeSampleCheckBill.noGroup')
                    })
                }
                if (this.hform.HCheckEmp == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '取样员未选择'
                        title: this.$t('QC_TakeSampleCheckBill.noChecker') == 'QC_TakeSampleCheckBill.noChecker' ? '取样员未选择' : this.$t('QC_TakeSampleCheckBill.noChecker')
                    })
                }
                if (this.hform.HSourceID == 0) {
                    return uni.showToast({
                        icon: 'none',
                        title: '生产资源未选择'
                        title: this.$t('QC_TakeSampleCheckBill.noSource') == 'QC_TakeSampleCheckBill.noSource' ? '生产资源未选择' : this.$t('QC_TakeSampleCheckBill.noSource')
                    })
                }
@@ -731,8 +736,8 @@
                        } = res.data
                        if (count == 1) {
                            uni.showModal({
                                title: '提示',
                                content: res.data.Message + '。是否继续新增?',
                                title: this.$t('QC_TakeSampleCheckBill.confirmTitle') == 'QC_TakeSampleCheckBill.confirmTitle' ? '提示' : this.$t('QC_TakeSampleCheckBill.confirmTitle'),
                                content: res.data.Message + (this.$t('QC_TakeSampleCheckBill.continueAdd') == 'QC_TakeSampleCheckBill.continueAdd' ? '。是否继续新增?' : this.$t('QC_TakeSampleCheckBill.continueAdd')),
                                success: (res) => {
                                    if (res.confirm) {
                                        console.log('用户点击确定');
@@ -769,6 +774,7 @@
</script>
<style lang="scss" scoped>
    /* 样式保持不变 */
    .scroll-content {
        box-sizing: border-box;
        padding: 20rpx;
pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue
@@ -41,7 +41,8 @@
            </view>
            <view class="card-item-wrapper">
                <view v-for="(item, index) in materialManifest" :key="index">
                    <uni-card :title="item.HSourceBillNo" @tap="toDetail(item, index)">
                    <uni-card :title="item.HSourceBillNo" :extra="item.F_WPVT_Text_tzk ? '订单号:' + item.F_WPVT_Text_tzk : ''"
                     @tap="toDetail(item, index)">
                        <view class="card-detail">
                            <view class="detail">
                                <text>物料代码:</text>{{item.HMaterNumber}}
@@ -328,6 +329,7 @@
                detailManifestItem: {
                    "HMaterNumber": "",
                    "HMaterID": "",
                    "F_WPVT_Text_tzk": "",
                    "HMaterName": "",
                    "HMaterModel": "",
                    "HUnitName": "",
@@ -547,6 +549,7 @@
                        HSPID: data[0].HSPID,
                        HSupID: data[0].HSupID,
                        HMaterID: data[0].HMaterID,
                        F_WPVT_Text_tzk: data[0].F_WPVT_Text_tzk,
                        HSourceBillType: data[0].HSourceBillType,
                        HSLInterID: data[0].HSLInterID,
                        HSLEntryID: data[0].HSLEntryID,
@@ -642,6 +645,7 @@
                            "HSupID": this.detailManifestItem.HSupID || 0,
                            "HKeeperID": this.detailManifestItem.HKeeperID || 0,
                            "HMaterID": this.detailManifestItem.HMaterID,
                            "F_WPVT_Text_tzk": this.detailManifestItem.F_WPVT_Text_tzk,
                            "HSourceBillType": this.detailManifestItem.HSourceBillType,
                            "HSLInterID": this.detailManifestItem.HSLInterID,
                            "HSLEntryID": this.detailManifestItem.HSLEntryID,
@@ -659,7 +663,7 @@
                    } = res.data
                    if (count == 1) {
                        CommonUtils.showTips({
                            message: `上传成功`
                            message: '上传成功'
                        })
                        this.attachmentInfo = []
                        // 刷新单据号,防止单据号重复
@@ -667,7 +671,7 @@
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `上传失败: ${Message}`
                            message: '上传失败: ${Message}'
                        })
                    }
pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast2.vue
@@ -50,7 +50,7 @@
            </view>
            <view class="card-item-wrapper">
                <view v-for="(item, index) in materialManifest" :key="index">
                    <uni-card :class="item.selected?'card-selected':''" :title="item.HSourceBillNo"
                    <uni-card :class="item.selected?'card-selected':''" :title="item.HSourceBillNo" :extra="item.F_WPVT_Text_tzk ? '订单号:' + item.F_WPVT_Text_tzk : ''"
                        @tap="selectMater(item, index)">
                        <view class="card-detail">
                            <view class="detail">
@@ -244,6 +244,7 @@
                detailManifest: [],
                detailManifestItem: {
                    "HMaterNumber": "",
                    "F_WPVT_Text_tzk": "",
                    "HMaterID": "",
                    "HMaterName": "",
                    "HMaterModel": "",
@@ -475,6 +476,7 @@
                        HSPID: data[0].HSPID,
                        HSupID: data[0].HSupID,
                        HMaterID: data[0].HMaterID,
                        F_WPVT_Text_tzk: data[0].F_WPVT_Text_tzk,
                        HSourceBillType: data[0].HSourceBillType,
                        HSLInterID: data[0].HSLInterID,
                        HSLEntryID: data[0].HSLEntryID,
pages/gongxuOut/Cj_StationOutBill_Standard.vue
@@ -484,6 +484,7 @@
            </view> -->
            <view class="bottom-btn">
                <button v-if="hform.HIsTimeFlag==0" class="btn-a" size="mini" @tap="beginWork()">开工</button>
                <button v-if="btnType == 0 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button v-if="btnType != 0 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button>
                <button v-if="btnType != 0 && isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
@@ -706,12 +707,7 @@
            }) {
                console.log(detail.value[0])
                this.hform.HIsTimeFlag = detail.value[0] || 0
                if(detail.value[0]){
                    this.getNewHRelBeginDate()
                    this.hform.HRelEndTime = getDateTime.dateTimeStr('y-m-d h:i');
                }else{
                    this.hform.HWorkTimes = 0;
                }
            },
            //通过登录用户获取默认值
            getDefValByUser() {
@@ -1210,6 +1206,10 @@
                            }else{
                                //设置主序列
                                this.setMainHSEQ();
                                //设置默认工序号
                                if(this.hform.HProcNo!=""&&this.hform.HProcNo!=null){
                                    this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
                                }
                            }
                        } else {
                            uni.showToast({
@@ -1334,9 +1334,9 @@
                if(CommonUtils.isEmpty(this.hform.HQty) == true){
                    return {pass: false, message: '提交失败: 报废数量为空'}
                }
                if(this.hform.HIsTimeFlag == 1 && CommonUtils.isEmpty(this.hform.HWorkTimes, true, true)) {
                    return {pass: false, message: '提交失败: 开启计时,但工时为0或空'}
                }
                // if(this.hform.HIsTimeFlag == 1 && CommonUtils.isEmpty(this.hform.HWorkTimes, true, true)) {
                //     return {pass: false, message: '提交失败: 开启计时,但工时为0或空'}
                // }
                return {pass: true, message: ''}
            },
            //编辑
@@ -1479,7 +1479,10 @@
                                } else if (barNo1 == 'GXLX' && data.工序号) {
                                    this.hform.HProcNo = data.工序号
                                }
                            }
                                //视图获取当前最新的工序号
                            }else if(data.工序汇报当前工序号!=null && data.工序汇报当前工序号!=""){
                                this.hform.HProcNo = data.工序汇报当前工序号
                            }
                            this.hform.HICMOInterID = data.hicmointerid
                            this.hform.HICMOBillNo = data.任务单号
                            this.hform.HMaterID = data.HMaterID
@@ -1588,10 +1591,7 @@
                            this.hform.HNotReportQty = data['未报工数量']
                            this.hform.HProcNumber = data['工序代码']
                            this.hform.HIsTimeFlag = data['是否计时'] ? 1 : 0
                            if(data['是否计时']){
                                this.hform.HRelEndTime = getDateTime.dateTimeStr('y-m-d h:i');
                                this.getNewHRelBeginDate();
                            }
                            this.hform.HSEQName = data.序列名称
                           // this.hform.HStyleNumber = data['款号']
                            // this.hform.HQty = data.合格数量
@@ -1618,59 +1618,59 @@
                });
            },
            //获取最新的报工日期
            getNewHRelBeginDate(){
                uni.request({
                    url: this.serverUrl + '/Cj_StationOutBill/get_Display',
                    data:{
                        sWhere: ` and HEmpID = N'${this.hform.HEmpID}'`,
                        user: uni.getStorageSync('HUserName'),
                        HBillSubType:'',
                    },
                    success: (res) => {
                        if(res.data.count == 1){
                            //获取列表数据
                            const listData = res.data.data
                            // 获取当前日期(去掉时间部分)
                            const today = new Date();
                            today.setHours(0, 0, 0, 0);
                            if(listData.length==0){
                                this.hform.HRelBeginTime = getDateTime.dateTimeSetHoureStr(7, 40, 0, 0,'y-m-d h:i');
                                this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
                            }else{
                                // 从对象数组中提取所有日期字段并找到最大值
                                const maxDate = listData.reduce((max, obj) => {
                                    const date = new Date(obj.出站时间);
                                    return date > max ? date : max;
                                }, new Date(0)); // 初始值为最小日期
                                // 比较最大日期和今天的日期部分(不比较时间)
                                const maxDateDateOnly = new Date(maxDate);
                                maxDateDateOnly.setHours(0, 0, 0, 0);
                                  // 比较最大日期和今天
                                if (maxDateDateOnly.getTime() !== today.getTime()) {
                                    // 如果不是今天,返回当前日期
                                    this.hform.HRelBeginTime = getDateTime.dateTimeSetHoureStr(7, 40, 0, 0,'y-m-d h:i');
                                    this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
                                }else{
                                    this.hform.HRelBeginTime = getDateTime.formatDate(maxDate);
                                    this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
                                }
                            }
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            // getNewHRelBeginDate(){
            //     uni.request({
            //         url: this.serverUrl + '/Cj_StationOutBill/get_Display',
            //         data:{
            //             sWhere: ` and HEmpID = N'${this.hform.HEmpID}'`,
            //             user: uni.getStorageSync('HUserName'),
            //             HBillSubType:'',
            //         },
            //         success: (res) => {
            //             if(res.data.count == 1){
            //                 //获取列表数据
            //                 const listData = res.data.data
            //                 // 获取当前日期(去掉时间部分)
            //                 const today = new Date();
            //                 today.setHours(0, 0, 0, 0);
            //                 if(listData.length==0){
            //                     this.hform.HRelBeginTime = getDateTime.dateTimeSetHoureStr(7, 40, 0, 0,'y-m-d h:i');
            //                     this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
            //                 }else{
            //                     // 从对象数组中提取所有日期字段并找到最大值
            //                     const maxDate = listData.reduce((max, obj) => {
            //                         const date = new Date(obj.出站时间);
            //                         return date > max ? date : max;
            //                     }, new Date(0)); // 初始值为最小日期
            //                     // 比较最大日期和今天的日期部分(不比较时间)
            //                     const maxDateDateOnly = new Date(maxDate);
            //                     maxDateDateOnly.setHours(0, 0, 0, 0);
            //                       // 比较最大日期和今天
            //                     if (maxDateDateOnly.getTime() !== today.getTime()) {
            //                         // 如果不是今天,返回当前日期
            //                         this.hform.HRelBeginTime = getDateTime.dateTimeSetHoureStr(7, 40, 0, 0,'y-m-d h:i');
            //                         this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
            //                     }else{
            //                         this.hform.HRelBeginTime = getDateTime.formatDate(maxDate);
            //                         this.hform.HWorkTimes=getDateTime.calculateHoursDiff(this.hform.HRelBeginTime,this.hform.HRelEndTime);
            //                     }
            //                 }
            //             }else{
            //                 uni.showToast({
            //                     title:res.data.Message,
            //                     icon:'none'
            //                 })
            //             }
            //         },
            //         fail: (res) => {
            //             console.log(res);
            //             uni.showToast({
            //                 title:'接口请求失败',
            //                 icon:'none'
            //             })
            //         },
            //     });
            // },
            //新增
            getNewData() {
                
@@ -1933,6 +1933,44 @@
                    }
                });
            },
            //开工按钮
            beginWork(){
                if(this.hform.lngBillKey==''||this.hform.lngBillKey==0||this.hform.lngBillSubKey==''||this.hform.lngBillSubKey==0){
                    CommonUtils.showTips({
                        title: "开工失败",
                        message: `开工失败请扫描流转卡并选择工序`,
                    });
                    return ;
                }
                uni.request({
                    url: this.serverUrl + '/Cj_StationOutBill/startTranslating',
                    method: 'GET',
                    data: {
                        HProcExchInterID: this.hform.lngBillKey,
                        HProcExchEntryID:this.hform.lngBillSubKey,
                        HOrgID:this.hform.HPRDOrgID,
                        HProcNo:this.hform.HProcNo,
                        user:uni.getStorageSync('HUserName')
                    },
                    success: (res) => {
                        uni.hideLoading();
                        if (res.data.count == 1) {
                            uni.showToast({ title: '开工成功', icon: 'none' });
                        } else {
                            CommonUtils.showTips({
                                title: "开工失败",
                                message: `${res.data.Message}`,
                            });
                        }
                    },
                    fail: () => {
                        uni.hideLoading();
                        uni.showToast({ title: '接口请求失败', icon: 'none' });
                    },
                });
            }
        }
    }
</script>
pages/index/login.vue
@@ -114,7 +114,7 @@
                    "陈镐哲本地测试2": 'http://192.168.88.82:81/API/',
                    "张瑞广本地测试": 'http://localhost:8082/API/',
                    "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/',
                    "杨权鑫本地测试": 'http://172.20.10.2:8082/API/',
                    "杨权鑫本地测试": 'http://192.168.0.81:8082/API/',
                    "王仪本地测试": 'http://192.168.0.74:8080/API/',
                    // 小卫内外网
                    "苏州卫智科技-外网": 'http://221.224.60.42:8082/API_WW/',
pages/index/tab2.vue
@@ -630,6 +630,13 @@
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon15.png",
                        "text": "不良品评审申请单列表",
                        "url": "/pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMainList",
                        "id": 55,
                        "hidden": false
                    },
                ]
            }
        },
pages/index/tab4.vue
@@ -212,6 +212,13 @@
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon15.png",
                        "text": "不良品评审申请单",
                        "url": "/pages/ZLGL/QCNoPassProdRequestBillMain/QCNoPassProdRequestBillMain",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon15.png",
                        "text": "投料防错",
pages/tiaomamingxi/tiaomamingxi.vue
New file
@@ -0,0 +1,509 @@
<template>
    <view class="page" id="pageContent">
<!--        <view class="search-condition-zone">
            <view class="form-item">
                <view class="left">
                    条码:
                </view>
                <view class="right general">
                    <input type="text" v-model="hform.HBarCode" />
                </view>
            </view>
            <view class="form-item">
                <view class="left">
                    数量:
                </view>
                <view class="right general">
                    <input type="text" v-model="hform.iQty" />
                </view>
            </view>
        </view> -->
<!--        <view class="button-zone">
            <button type="default" class="btn-a" size="mini" @tap="cmdChange">调整</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="list" v-for="(item, index) in Materlist" :key="index">
                <uni-card :title="item.HBarCode" style="margin: 10px;" @tap="delMater(item)">
                    <view class="card-detail">
                        <view class="detail">
                            <text>{{ $t("Kf_ProductInBill_PDA.table_SourceBillNo") == "Kf_ProductInBill_PDA.table_SourceBillNo" ? "批次" : $t("Kf_ProductInBill_PDA.table_SourceBillNo") }}:</text>{{ item.HBatchNo }}
                        </view>
                        <view class="detail">
                            <text>{{ $t("Kf_ProductInBill_PDA.table_SourceBillNo") == "Kf_ProductInBill_PDA.table_SourceBillNo" ? "数量" : $t("Kf_ProductInBill_PDA.table_SourceBillNo") }}:</text>{{ item.HQty }}
                        </view>
                    </view>
                </uni-card>
            </view>
        </view>
        <view class="pagination-zone" id="pagination-zone">
            <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total"
                :current="paginationMeta.current" @change="onPaginationChangeHandler"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '../../utils/common'
    import {
        getUserInfo
    } from '../../utils/auth'
    export default {
        data() {
            return {
                navHeight: 0,
                HWHNameList: [],
                arrayHWHName: [],
                HStockPlaceNameList: [],
                arrayHStockPlaceName: [],
                Materlist: [],
                HMaterID: 0,
                HBillType: 0,
                HInterID: 0,
                HIsStockMgr: false,
                scrollTop: 0,
                HInterID_check: 0,
                HBillType_check: '',
                sBatchNo_check: '',
                sBarCode_check: '',
                sSCWhID_check: 0,
                sSCSPID_check: 0,
                sAuxPropID_check: 0,
                sMTONo_check: '',
                HMaterID_check: 0,
                sWhID_check: 0,
                sSPID_check: 0,
                HSourceInterID_check: 0,
                HSourceEntryID_check: 0,
                EndQty_check: 0,
                HInterID_check_check: 0,
                hform: {
                    HBarCode: '',
                    HWHName: '',
                    HWHID: 0,
                    HStockPlaceName: '',
                    HStockPlaceID: 0,
                    iQty: 0,
                },
                paginationMeta: {
                    current: 1,
                    total: 0,
                    pageSize: 30,
                },
                pageMeta: {
                    scrollContentTop: 0,
                    bottomBtnTop: 0,
                },
                listData: [],
                listDataShow: [],
            }
        },
        computed: {
            scrollContentHeight: {
                get() {
                    return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
                }
            }
        },
        methods: {
            exit() {
                uni.navigateBack()
            },
            onArrayHWHNameChangeHandler(e) {
                let index = this.HWHNameList.findIndex(p => p.HName == e)
                if (index != -1) {
                    this.hform.HWHID = this.HWHNameList[index].HItemID
                    this.HIsStockMgr = this.HWHNameList[index].HIsStockMgr
                }
            },
            getWHInfo() {
                CommonUtils.doRequest(
                    "/Web/GetWarehouseList_Json_New", {
                        Warehouse: "",
                        HOrgID: uni.getStorageSync('OrganizationID')
                    },
                    (res) => {
                        let res1 = res.data
                        let {
                            data,
                            count
                        } = res1
                        if (count == 1) {
                            this.HWHNameList = data
                            for (var i = 0; i < data.length; i++) {
                                this.arrayHWHName[i] = data[i]["HName"]
                            }
                        } else {
                            uni.showToast({
                                title: '仓库数据请求失败',
                                icon: 'none'
                            })
                        }
                    },
                )
            },
            delMater(item){
                console.log(this.HBillType, this.HInterID, item.HBarCode);
                uni.showModal({
                    title: '提示',
                    content: '确认要删除 "' + item.HBarCode + '" 吗?删除后将不可恢复!',
                    success: (res) => {
                        if (res.confirm) {
                            try {
                                CommonUtils.doRequest2({
                                    url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
                                    data: {
                                        HInterID: this.HInterID,
                                        HBillType: this.HBillType,
                                        HBarCode: item.HBarCode
                                    },
                                    resFunction: () => {
                                        console.log("删除成功,开始刷新")
                                        uni.$emit('refreshList')
                                        this.GetMater();
                                        uni.showToast({
                                            title: '删除成功',
                                            icon: 'success'
                                        })
                                    }
                                });
                            } catch (e) {
                                console.log("删除异常", e);
                            }
                        } else if (res.cancel) {
                            console.log('用户取消删除');
                        }
                    }
                });
            },
            GetMater(){
                CommonUtils.doRequest2({
                    url: '/Kf_BarCodeEditDlg/Kf_BarCodeEditDlg_Json',
                    data: {
                        swhere:  ' and HInterID= ' + this.HInterID + ' and HMaterID= '+ this.HMaterID + ''
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count > 0) {
                            this.Materlist = data
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    }
                });
            },
            onArrayHStockPlaceNameChangeHandler() {
                let index = this.HStockPlaceNameList.findIndex(p => p.HName == e)
                if (index != -1) {
                    this.hform.HStockPlaceID = this.HStockPlaceNameList[index].HItemID
                }
            },
            getStockPlaceInfo() {
                CommonUtils.doRequest(
                    "/WEBSController/GetStockPlaceList_Json", {
                        StockPlace: '',
                        HWhID: this.hform.HWHID,
                        HStockOrgID: uni.getStorageSync('OrganizationID')
                    },
                    (res) => {
                        let res1 = res.data
                        console.log(res1)
                        let {
                            data,
                            count
                        } = res1
                        if (count == 1) {
                            this.HStockPlaceNameList = data
                            for (var i = 0; i < data.length; i++) {
                                this.arrayHStockPlaceName[i] = data[i]["HWhName"]
                            }
                        } else {
                            uni.showToast({
                                title: '仓位数据请求失败'+res.Message,
                                icon: 'none'
                            })
                        }
                    },
                )
            },
            cmdChange() {
                CommonUtils.doRequest2({
                    url: '/Kf_BarCodeEditDlg/Kf_BarCodeEditDlg_Json',
                    data: {
                        swhere:  ' and HInterID= ' + this.HInterID + ' and HMaterID= '+ this.HMaterID + " and HBarCode= '" + this.hform.HBarCode + "'"
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count > 0) {
                            console.log(data)
                            uni.showModal({
                                title: '提示',
                                content: '确认要修改 "' + data[0].HBarCode + '" 吗?',
                                success: (res) => {
                                    if (res.confirm) {
                                        try {
                                            CommonUtils.doRequest2({
                                                url: '/Kf_BarCodeEditDlg/GetCheckQtyByBarCodeBill',
                                                data: {
                                                    HInterID: data[0].HInterID,
                                                    HBillType: data[0].HBillType,
                                                    sBatchNo: data[0].HBatchNo,
                                                    sBarCode: data[0].HBarCode,
                                                    sSCSPID: data[0].HOutStockPlaceID,
                                                    sSCWhID: data[0].HSCWHID,
                                                    sAuxPropID: data[0].HAuxPropID,
                                                    sMTONo: data[0].HMTONo,
                                                    iQty: this.hform.iQty,
                                                    HMaterID: data[0].HMaterID,
                                                    sWhID: data[0].HWhID,
                                                    sSPID: data[0].HStockPlaceID,
                                                    HSourceInterID: data[0].HSourceInterID,
                                                    HSourceEntryID: data[0].HSourceEntryID,
                                                    EndQty: this.hform.iQty - data[0].HQty,
                                                    sQty: data[0].HQty
                                                },
                                                resFunction: () => {
                                                    console.log("修改成功,开始刷新")
                                                    uni.$emit('refreshList')
                                                    this.GetMater();
                                                    uni.showToast({
                                                        title: '修改成功',
                                                        icon: 'success'
                                                    })
                                                    try {
                                                        CommonUtils.doRequest2({
                                                            url: '/Kf_BarCodeEditDlg/GetCheckQtyByBarCodeBill',
                                                            data: {
                                                                HInterID: data[0].HInterID,
                                                                HBillType: data[0].HBillType,
                                                                sBatchNo: data[0].HBatchNo,
                                                                sBarCode: data[0].HBarCode,
                                                                sSCSPID: data[0].HOutStockPlaceID,
                                                                sSCWhID: data[0].HSCWHID,
                                                                sAuxPropID: data[0].HAuxPropID,
                                                                sMTONo: data[0].HMTONo,
                                                                iQty: this.hform.iQty,
                                                                HMaterID: data[0].HMaterID,
                                                                sWhID: data[0].HWhID,
                                                                sSPID: data[0].HStockPlaceID,
                                                                HSourceInterID: data[0].HSourceInterID,
                                                                HSourceEntryID: data[0].HSourceEntryID,
                                                                EndQty: this.hform.iQty - data[0].HQty,
                                                                sQty: data[0].HQty
                                                            },
                                                            resFunction: () => {
                                                                console.log("修改成功,开始刷新")
                                                                uni.$emit('refreshList')
                                                                this.GetMater();
                                                                uni.showToast({
                                                                    title: '修改成功',
                                                                    icon: 'success'
                                                                })
                                                            }
                                                        });
                                                    } catch (e) {
                                                        console.log("修改异常", e);
                                                    }
                                                }
                                            });
                                        } catch (e) {
                                            console.log("修改异常", e);
                                        }
                                    } else if (res.cancel) {
                                        console.log('用户取消修改');
                                    }
                                }
                            });
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    }
                });
            },
            async onPaginationChangeHandler({current}) {
                this.listDataShow =this.listData.slice((current - 1) * this.paginationMeta.pageSize,current * this.paginationMeta.pageSize)
            }
        },
        async onLoad(options) {
            this.hform.HBarCode = options.HMaterNumber || '';
            this.getWHInfo()
            this.getStockPlaceInfo()
            this.HMaterID = options.HMaterID
            this.HBillType = options.HBillType
            this.HInterID = options.HInterID
            console.log("赋值后:", this.HInterID, this.HMaterID, this.HBillType);
            await this.$nextTick();
            this.GetMater()
            this.$nextTick(() => {
                this.cmdSearch()
            })
        },
        onReady() {
            let query = uni.createSelectorQuery().in(this)
            query.select("#scroll-content").boundingClientRect((data) => {
                this.pageMeta.scrollContentTop = data.top
                console.log("this.pageMeta.scrollContentTop: ", this.pageMeta.scrollContentTop)
            }).exec()
            query.select("#pagination-zone").boundingClientRect((data) => {
                this.pageMeta.bottomBtnTop = data.top
                console.log('this.pageMeta.bottomBtnTop: ',this.pageMeta.bottomBtnTop);
            }).exec()
        },
    }
</script>
<style lang="scss" scoped>
    .page {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 10rpx;
        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;
                        }
                    }
                }
            }
        }
        .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: 30rpx 40rpx 40rpx 40rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            justify-content: space-between;
            width: 100%;
        }
    }
</style>
pages/weiwaigxIn/Cj_StationEntrustInBill.vue
@@ -18,7 +18,7 @@
            <view class="form-item">
                <view class="title"><text>*</text>流水号:</view>
                <view class="right" style="width: 380rpx;">
                    <input v-model="hform.HProcNo" placeholder="请输入(或扫描)流水号" @blur="getHProcNoData2(hform.HBarCode,hform.HProcNo,hform.HSEQNumber)"/>
                    <input v-model="hform.HProcNo" placeholder="请输入(或扫描)流水号" @confirm="getHProcNoData2(hform.HBarCode,hform.HProcNo,hform.HSEQNumber)"/>
                </view>
                <view class="icon-wrapper" >
                    <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
@@ -724,6 +724,7 @@
                                this.arrayHSEQName[i] = res.data.data[i].HSEQName
                            }
                            this.$forceUpdate();
                            console.log(this.hform.HProcNo)
                            //没有序列号默认主序列
                            if(e==1){
                                //设置主序列
@@ -734,6 +735,10 @@
                            }else{
                                //设置主序列
                                this.setMainHSEQ();
                                //设置默认工序号
                                if(this.hform.HProcNo!=""&&this.hform.HProcNo!=null){
                                    this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
                                }
                            }
                        } else {
                            uni.showToast({
@@ -880,6 +885,9 @@
                        console.log(2,res.data);
                        if(res.data.code == 1){
                            var data = res.data.data[0]
                            if(data.委外发出当前工序号!=null && data.委外发出当前工序号!=""){
                                this.hform.HProcNo = data.委外发出当前工序号
                            }
                            this.hform.HICMOBillNo= data.任务单号
                            this.hform.HProcExchBillNo= data.单据号
                            this.hform.HICMOInterID= data.hicmointerid
pages/weiwaigxOut/Cj_StationEntrustOutBill.vue
@@ -907,6 +907,10 @@
                            }else{
                                //设置主序列
                                this.setMainHSEQ();
                                //设置默认工序号
                                if(this.hform.HProcNo!=""&&this.hform.HProcNo!=null){
                                    this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
                                }
                            }
                            this.$forceUpdate();
                        } else {
@@ -1057,6 +1061,9 @@
                        console.log(2, res.data);
                        if (res.data.code == 1) {
                            var data = res.data.data[0]
                            if(data.委外接收当前工序号!=null && data.委外接收当前工序号!=""){
                                this.hform.HProcNo = data.委外接收当前工序号
                            }
                            this.hform.HICMOBillNo = data.任务单号
                            this.hform.HICMOInterID = data.hicmointerid
                            this.hform.HMaterID = data.HMaterID