chenhaozhe
2026-02-05 c141b01c990146b4ef41c17a69ad3066d721a91c
pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
@@ -231,12 +231,12 @@
                hform: {
                    "HBillType": '3911',
                    "HBarCode": "",
                    "HCheckBeginDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    "HCheckBeginDate": dayjs(new Date()).format("YYYY-MM-DD"),
                    "HCheckResult": "OK",
                    "HRepairCheckContent": "",
                    "HBillNo": "",
                    "HInterID": 0,
                    "HDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
                    "HDeptName": getUserInfo().HDeptName,
                    "HDeptID": getUserInfo().HDeptID,
                    "HEmpName": getUserInfo().HEmpName,
@@ -250,7 +250,7 @@
                    "HBarSpec": "",
                    "HBarModel": "",
                    "HMaker": getUserInfo()["Czymc"],
                    "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD"),
                    "HUpDater": "",
                    "HUpDateDate": "",
                    "HChecker": "",
@@ -567,10 +567,14 @@
            // 获取职员数据
            async getEmpList() {
                try {
                    let sWhere=  " where 1=1 "
                    if(this.hform.HDeptName && uni.getStorageSync("Organization") == '宁波市华舟包装有限公司'){
                        sWhere += ` and HDeptName = '${this.hform.HDeptName}'`
                    }
                    let res = await CommonUtils.doRequest2Async({
                        url: '/PublicPageMethod/UserList',
                        data: {
                            sWhere: " where 1=1",
                            sWhere: sWhere,
                        }
                    })
@@ -705,7 +709,33 @@
                    })
                }
            },
            async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) {
            async getSendWorkBill(HSendWorkID) {
                try{
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sb_EquipRepairSendWorkBill/GetEquipRepairSendWorkBillList",
                        data: {
                            sWhere: ` and hmainid ='${HSendWorkID}' `,
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    let {data, count, Message} = res.data
                    if(count == 1) {
                        this.hform.HRepairCheckID = this.HRepairCheckList.find(item => data[0]["表体维修项目"] == item["维修验收项目"])?.hitemid
                    }else {
                       CommonUtils.showTips({
                           title: "温馨提示",
                           message: `获取派工单失败: ${Message}`
                       })
                    }
                }catch(err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取派工单失败: ${err}`
                    })
                }
            },
            async getSourceBillInfo(HSourceBillType, HInterID, HBillNo, HSendWorkID) {
                // 下推单据类型为设备故障登记单
                if (HSourceBillType == 3907) {
                    let res = await CommonUtils.doRequest2Async({
@@ -730,12 +760,13 @@
                        this.hform.HBarName = data[0].设备名称
                        this.hform.HBarModel = data[0].设备规格
                        this.hform.HBarSpec = data[0].设备规格
                        this.HDetailList[0].HRepairCheckContent = data[0].故障描述
                        this.hform.HMainSourceBillNo = data[0]["设备维修记录单"];
                        this.hform.HMainSourceInterID = data[0]["HEquipRepairCheckBillInterID"];
                        this.hform.HMainSourceEntryID = data[0]["HEquipRepairCheckBillEntryID"];
                        this.hform.HManagerID = data[0]["HManagerID"];
                        this.hform.HEmpID = data[0]["HEmpID"];
                        this.getSendWorkBill(HSendWorkID)
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
@@ -830,11 +861,12 @@
                let {
                    HSourceBillType,
                    HInterID,
                    HBillNo
                    HBillNo,
                    HSendWorkID
                } = e
                // 下推
                this.getMaxNum()
                this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo)
                this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo, HSendWorkID)
            }
            this.getHDeptList()