yusijie
2026-02-06 28328db7ef0b0270e9e94b6a11b32cb5f9bdac88
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -156,39 +156,40 @@
                        <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
                    </view>
                </view>
                <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
                    <uni-card style="margin: 10px;">
                        <view class="card-detail">
                            <view class="detail">
                                <text>序号:</text>{{index+1}}
                            </view>
                            <view class="detail">
                                <text>结果:</text>
                                <checkbox-group style="display: inline-block;"
                                    @change="checkBoxChangeHandler(index, $event)">
                                    <checkbox value="enabled" :checked="item.HDotCheckResult" />
                                </checkbox-group>
                            </view>
                            <view class="detail">
                                <text>点检项目分类:</text>{{item.HDotCheckItemClassName}}
                            </view>
                            <view class="detail">
                                <text>点检项目:</text>{{item.HDotCheckItem}}
                            </view>
                            <view class="detail">
                                <text>点检部位:</text>{{item.HDotCheckPart}}
                            </view>
                            <view class="detail">
                                <text>负责人名称:</text>{{item.HManagerName}}
                            </view>
                            <view class="detail">
                                <text>备注:</text>{{item.HRemark}}
                            </view>
                        </view>
                    </uni-card>
                </view>
                <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view>
            </view>
            <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
                <uni-card style="margin: 10px;">
                    <view class="card-detail">
                        <view class="detail">
                            <text>序号:</text>{{index+1}}
                        </view>
                        <view class="detail">
                            <text>结果:</text>
                            <checkbox-group style="display: inline-block;"
                                @change="checkBoxChangeHandler(index, $event)">
                                <checkbox value="enabled" :checked="item.HDotCheckResult" />
                            </checkbox-group>
                        </view>
                        <view class="detail">
                            <text>点检项目分类:</text>{{item.HDotCheckItemClassName}}
                        </view>
                        <view class="detail">
                            <text>点检方法:</text>{{item.HDotCheckItemMethodName}}
                        </view>
                        <view class="detail">
                            <text>点检部位:</text>{{item.HDotCheckPart}}
                        </view>
                        <view class="detail">
                            <text>负责人名称:</text>{{item.HManagerName}}
                        </view>
                        <view class="detail">
                            <text>备注:</text>{{item.HRemark}}
                        </view>
                    </view>
                </uni-card>
            </view>
            <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view>
        </template>
        <!-- 其他信息 -->
        <template v-if="tabs == 2">
@@ -281,6 +282,7 @@
            <button class="btn-c" size="mini" @tap="goBack">退出</button>
        </view>
        <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
        <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'DJ'"></BillSelectorPopupVue>
    </view>
</template>
@@ -295,11 +297,12 @@
    import {
        getUserInfo
    } from "../../../utils/auth";
    import {
        TrackOpTypes
    } from "vue";
    import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue";
    export default {
        name: 'sb_EquipDotCheckBill',
        components: {
            BillSelectorPopupVue
        },
        data() {
            return {
                tabs: 0,
@@ -318,8 +321,8 @@
                hform: {
                    HBarCode: "",
                    HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    HBeginDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HQty: 0,
                    HErrNote: "",
                    HBigSafeNote: "",
@@ -328,9 +331,9 @@
                    HShiftsID: 0,
                    HBillNo: "",
                    HInterID: 0,
                    HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    HDeptName: "",
                    HDeptID: 0,
                    HDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HDeptName: getUserInfo().HDeptName,
                    HDeptID: getUserInfo().HDeptID,
                    HRemark: "",
                    HBarName: "",
                    HEquipID: 0,
@@ -382,6 +385,20 @@
        },
        methods: {
            billSelectHandler(billData) {
                console.log('billData: ', billData);
                let data = billData.retVal[this.hform.HEquipID]
                this.get_DocCheckItem2(data.hmainid)
            },
            toCheckFile() {
                if (this.hform.HEquipID == 0) {
                    return CommonUtils.showTips({
                        message: '不能选择点检规程,请先扫描设备条码!!!'
                    })
                }
                this.$refs['billSelector'].showPopup(this.hform.HEquipID)
            },
            addNew() {
                uni.redirectTo({
                    url: './Sb_EquipDotCheckBill?operationType=1'
@@ -455,10 +472,11 @@
            async getShiftList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: '/Web/GetGy_ShiftsList_Json',
                        url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
                        data: {
                            Shifts: "",
                        }
                           sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'')  != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`,
                           HMaker: getUserInfo()["Czymc"],
                        },
                    })
                    let {
@@ -487,7 +505,7 @@
                    let res = await CommonUtils.doRequest2Async({
                        url: '/Gy_Department/list',
                        data: {
                            sWhere: "",
                            sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')} `,
                            user: uni.getStorageSync('HUserName'),
                            Organization: uni.getStorageSync('Organization')
                        }
@@ -515,7 +533,7 @@
            },
            toScanCode() {
                MpaasScan.scanCode(cb => {
                    this.hfrom.HBarCode = cb
                    this.hform.HBarCode = cb
                    this.GetMessageByBarCode(cb)
                })
            },
@@ -564,6 +582,67 @@
                    })
                }
            },
            // 获取保养规程
            async get_DocCheckItem2(HDotCheckRuleInterID) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Web/GetDotCheckRuleItemByDotCheckRuleID",
                        data: {
                            "HDotCheckRuleInterID": HDotCheckRuleInterID
                        },
                    })
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        console.log('data: ',data);
                        this.hform.HEquipDotCheckRuleInterID = data[0].HInterID
                        this.hform.HEquipDotCheckRuleInterNo = data[0].HBillNo
                        this.hform.HPlanNo = data[0].点检计划单
                        this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0]
                            .点检计划ID
                        this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[
                            0].点检计划子ID
                        this.HCheckFileList = Array.from(data).map(item => {
                            return {
                                "HDotCheckItemID": item.HDotCheckItemID,
                                "HDotCheckCode": item.点检项目代码,
                                "HDotCheckItem": item.点检项目,
                                "HDotCheckPart": item.点检部位,
                                "HClaim": item.具体要求,
                                "HManagerID": item.负责人ID,
                                "HManagerCode": item.负责人代码,
                                "HManagerName": item.负责人名称,
                                "HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID,
                                "HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID,
                                "HSourceBillNo": item.点检计划单,
                                "HDotCheckItemClassID": 0,
                                "HDotCheckItemClassName": "",
                                "HDotCheckItemMethodID": 0,
                                "HDotCheckItemMethodName": "",
                                //"HDotCheckResult": item.默认结论 == 1 ? true : false
                                "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false
                            }
                        })
                        this.enableEdit = false
                        this.$refs["billSelector"].exit()
                    } else {
                        CommonUtils.showTips({
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        message: err
                    })
                }
            },
            async GetItemByEquipFile() {
                try {
                    let res = await CommonUtils.doRequest2Async({
@@ -593,7 +672,7 @@
                            return {
                                "HDotCheckItemID": item.HDotCheckItemID,
                                "HDotCheckCode": item.点检项目代码,
                                "HDotCheckItem": item.点检项目,
                                "HDotCheckItem": item.点检项目名称,
                                "HDotCheckPart": item.点检部位,
                                "HClaim": item.具体要求,
                                "HManagerID": item.负责人ID,
@@ -606,10 +685,10 @@
                                "HDotCheckItemClassName": "",
                                "HDotCheckItemMethodID": 0,
                                "HDotCheckItemMethodName": "",
                                "HDotCheckResult": item.默认结论 == 1 ? true : false
                                "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false
                            }
                        })
                        this.tabs = 1
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',