pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill.vue
@@ -269,17 +269,25 @@
        },
        async onLoad(e) {
            console.log(e, this.userInfo)
            this.OperationType = e.OperationType
            if (e.HInterID) {
                this.HInterID_Temp = e.HInterID
                this.RoadBillMain(e.HInterID)
                this.barCodeFocus = true
            } else {
                this.getNewData()
                this.HSourceBillNoFocus = true
                this.refreshBarCodeState()
            this.OperationType = e.OperationType || 1
            if(operationType == 1) {
                if (e.HInterID) {
                    this.HInterID_Temp = e.HInterID
                    this.RoadBillMain(e.HInterID)
                    this.barCodeFocus = true
                } else {
                    this.getNewData()
                    this.HSourceBillNoFocus = true
                    this.refreshBarCodeState()
                }
            }else if(operationType == 5) {
                // 单据下推
                let {HSourceBillType, HInterID, HBillNo} = e
                this.getMaxNum()
                this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo)
            }
            this.InitConkType()
            this.InitConkReason()
            this.InitDept()
@@ -719,6 +727,41 @@
                        }
                    }
                });
            },
            async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) {
                // 下推单据类型为设备故障登记单
                if(HSourceBillType == 3815) {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sc_MouldConkBookBill/Sb_MouldConkBookBillListCheckDetai",
                        data: {
                            HID: HInterID
                        }
                    })
                    let {data,code, count, Message} = res.data
                    console.log('data: ',data);
                    if(code == 1) {
                        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.hform.HMainSourceBillNo = data1.单据号
                        this.hform.HMainSourceInterID = data1.hmainid
                        this.hform.HMainSourceEntryID = data1.hsubid
                        this.hform.HMouldID = data1.HMouldID
                        this.hform.HManagerName = data1.负责人
                        this.hform.HManagerID = data1.HManagerID
                        this.hform.HMouldName = data1.产品模具
                        this.hform.HMouldModel = data1.产品模具型号
                        this.hform.HMouldSpec = data1.产品模具规格
                    }
                    else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取源单失败: ${Message}`
                        })
                    }
                }
            }
        }
    }