zrg
2026-01-08 c076dc095b915c1936eff1c853188cb21274ce09
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -50,13 +50,13 @@
                        <radio-group @change="radioChange" class="radio_Container">
                            <label>
                                <view>
                                    <radio value="OK" :checked="hform.HLastResult == 'OK'" />
                                    <radio value="OK" :checked="calcHLastResult == 'OK'" />
                                    <text>OK</text>
                                </view>
                            </label>
                            </label>
                            <view>
                                <radio value="NG" :checked="hform.HLastResult == 'NG'" />
                                <radio value="NG" :checked="calcHLastResult == 'NG'" />
                                <text>NG</text>
                            </view>
                            </label>
@@ -141,7 +141,10 @@
        </template>
        <!-- 明细信息 -->
        <template v-if="tabs == 1">
            <view class="form">
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="left">
                        设备点检规程
@@ -289,7 +292,6 @@
    import {
        MpaasScan
    } from "@/utils/mpaasScan.js"
    import "@/pages/MJGL/style/MJBillStyle.scss"
    import {
        getUserInfo
    } from "../../../utils/auth";
@@ -358,9 +360,36 @@
                get() {
                    return this.btnTop - this.tabsBottom - 5
                }
            },
            calcHLastResult: {
                get() {
                    if (this.HCheckFileList.length == 0) {
                        return 'OK'
                    } else {
                        let okCount = this.HCheckFileList.reduce((acc, item) => {
                            if (item.HDotCheckResult) {
                                return acc + 1
                            }
                            return acc
                        }, 0)
                        if (okCount == this.HCheckFileList.length) {
                            return 'OK'
                        }
                        return 'NG'
                    }
                }
            }
        },
        methods: {
            addNew() {
                uni.redirectTo({
                    url: './Sb_EquipDotCheckBill?operationType=1'
                })
            },
            goBack() {
                uni.navigateBack()
            },
            checkBoxChangeHandler(index, e) {
                let cr = e.detail.value
                if (cr.length == 0) {
@@ -511,17 +540,28 @@
                        Message
                    } = res.data
                    console.log('data: ', data);
                    this.hform.HEquipID = data[0].HInterID
                    this.hform.HBarName = data[0].设备名称
                    this.hform.HBarSpec = data[0].设备规格
                    this.hform.HBarModel = data[0].设备型号
                    this.hform.HQty = 1
                    if (count == 1) {
                        console.log('data: ', data);
                        this.hform.HEquipID = data[0].HInterID
                        this.hform.HBarName = data[0].设备名称
                        this.hform.HBarSpec = data[0].设备规格
                        this.hform.HBarModel = data[0].设备型号
                        this.hform.HQty = 1
                    // 获取检验规程
                    this.GetItemByEquipFile()
                        // 获取检验规程
                        this.GetItemByEquipFile()
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: err
                    })
                }
            },
            async GetItemByEquipFile() {
@@ -626,13 +666,16 @@
                        },
                        method: "POST"
                    })
                    if(!res) {
                       return
                    if (!res) {
                        return
                    }
                    let {count, Message} = res.data
                    if(count == 1){
                    let {
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
@@ -640,7 +683,7 @@
                                if (res.confirm) {
                                    console.log('用户点击确定');
                                    uni.redirectTo({
                                        url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1'
                                        url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
                                    })
                                } else if (res.cancel) {
                                    console.log('用户点击取消');
@@ -650,14 +693,14 @@
                                }
                            }
                        });
                    }else {
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "提交单据失败: " + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
@@ -704,5 +747,6 @@
    }
</script>
<style lang="scss">
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>