chenhaozhe
2026-02-05 c141b01c990146b4ef41c17a69ad3066d721a91c
pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue
@@ -36,7 +36,7 @@
                <view class="form-item">
                    <view class="title">维修内容:</view>
                    <view class="right">
                        <textarea v-model="hform.HRepairContent" placeholder="请输入验证内容" />
                        <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" />
                    </view>
                </view>
            <!-- 源单类型 -->
@@ -57,7 +57,7 @@
            
            <!-- 源单单号 -->
            <view class="form-item">
                <view class="title required">源单单号:</view>
                <view class="title">源单单号:</view>
                <view :class="enableSourceBillEdit?'right':'righton'">
                    <input v-model="hform.HMainSourceBillNo" :disabled="!enableSourceBillEdit"
                           @confirm="GetMessageByHMainSourceBillNo(hform.HMainSourceBillNo)" 
@@ -223,7 +223,7 @@
        </view>
        <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
        <!-- 源单单据列表弹窗 -->
        <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType"
        <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="HBillType"
            :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID">
        </BillListPopupEquipConkBookBillVue>
    </view>
@@ -306,7 +306,7 @@
                    HDeleteMan: '',
                    HDeleteDate: '',
                    // 新增的源单相关字段
                    HMainSourceBillType: '设备维修登记单', // 默认为设备维修登记单
                    HMainSourceBillType: '-1', // 默认为设备维修登记单
                    HMainSourceBillNo: '',
                    HMainSourceInterID: 0,
                    HMainSourceEntryID: 0,
@@ -706,10 +706,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,
                        }
                    })
@@ -857,8 +861,12 @@
                    let oMain = JSON.stringify(this.hform);
                    this.HDetailList[0].HManagerID = this.hform.HManagerID
                    this.HDetailList[0].HRepairID = this.hform.HRepairID
                    let oprType = this.operationType
                    if(oprType == 4){
                        oprType = 1
                    }
                    let sSubStr = JSON.stringify(this.HDetailList);
                    let sMainSub = oMain + ';' + sSubStr + `;-1;${this.operationType}` + ';' + getUserInfo()[
                    let sMainSub = oMain + ';' + sSubStr + `;-1;${oprType}` + ';' + getUserInfo()[
                    'Czymc'];
                    let res = await CommonUtils.doRequest2Sync({
                        url: "/Sb_EquipRepairSendWorkBill/AddEquipRepairSendWorkBill",
@@ -907,6 +915,43 @@
                        message: "提交单据失败: " + err
                    })
                }
            },
            async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) {
                // 下推单据类型为设备故障登记单
                if(HSourceBillType == 3907) {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai",
                        data: {
                            HID: HInterID
                        }
                    })
                    let {data,code, count, Message} = res.data
                    if(code == 1) {
                        console.log('data: ',data.h_v_Sb_EquipConkBookBillList_Edit);
                        let data1 = data.h_v_Sb_EquipConkBookBillList_Edit[0]
                        this.hform.HMainSourceBillType = HSourceBillType
                        this.HMainSourceBillType = '设备故障登记单'
                        this.hform.HMainSourceBillNo = data1.单据号
                        this.hform.HMainSourceInterID = data1.hmainid
                        this.hform.HMainSourceEntryID = data1.hsubid
                        this.hform.HEquipID = data1.HEquipID
                        this.hform.HManagerName = data1.负责人
                        this.hform.HManagerID = data1.HManagerID
                        this.hform.HBarName = data1.设备名称
                        this.hform.HBarModel = data1.设备型号
                        this.hform.HBarSpec = data1.设备规格
                        this.hform.HRepairContent = data1.故障描述
                    }
                    else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取源单失败: ${Message}`
                        })
                    }
                }
            }
        },
        onLoad(e) {
@@ -925,10 +970,13 @@
            } else if (this.operationType == 3) {
                // 编辑
            } else if (this.operationType == 4) {
                // 浏览
                this.enableEdit = false;
                this.enableSourceBillEdit = false;
                this.showHMainSourceBillType = false;
                let {HSourceBillType, HInterID, HBillNo} = e
                // 下推
                // this.enableEdit = false;
                // this.enableSourceBillEdit = false;
                // this.showHMainSourceBillType = false;
                this.getMaxNum()
                this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo)
            }
            this.getHDeptList()