chenhaozhe
2026-01-12 fd299bcb75f5b7f1dd4fd68234109f5252b27ec6
完善设备点检记录单 和 设备保养记录单
5个文件已修改
150 ■■■■ 已修改文件
components/MJGL/BillSelectorPopup.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shengchanlingliao/PPickingCheckBill.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shengchanruku/ProductInCheckBill.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/MJGL/BillSelectorPopup.vue
@@ -91,6 +91,10 @@
            HStockOrgID: {
                type: [String, Number],
            },
            Type: {
                type: [String],
                require: true
            }
        },
        mounted() {},
        methods: {
@@ -123,9 +127,9 @@
                this.getBillList()
            },
            clickCard(bill, index) {
                console.log('this.HBillList: ',this.HBillList);
                console.log('this.HBillList: ',this.HBillList, 'index: ', index);
                let retVal = {}
                retVal[this.refTargetKey] = this.HBillList[0].filter(item => item.hmainid == bill.hmainid)
                retVal[this.refTargetKey] = bill
                this.$emit("update", {
                    retVal: retVal,
                    index: this.refTargetKey
@@ -143,22 +147,30 @@
                }
                
                if(this.refTargetKey) {
                    sWhere += ` and 设备ID = ${this.refTargetKey}`
                    // sWhere += ` and HInterID = ${this.refTargetKey}`
                }
                return sWhere
            },
            getBillList() {
                let sWhere = this.getsWhere()
                console.log('sWhere: ',sWhere);
                this.HBillList = []
                this.length = 0
                this.page = 0
                this.curPage = 1
                let url = ""
                if(this.Type == 'BY'){
                    url = "/Sb_EquipMaintainRuleBill/GetEquipMaintainRuleListPDA"
                }
                else if (this.Type == 'DJ'){
                    url = "/Sb_EquipDotCheckRuleBill/GetEquipDotCheckRuleListPDA"
                }
                else {
                }
                CommonUtils.doRequest(
                    "/Web/GetEquipmentBillsList", {
                    url, {
                        sWhere: sWhere,
                        user: getUserInfo()['Czymc'],
                        Type: "BY"
                    },
                    (res) => {
                        let {
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -156,7 +156,7 @@
                        <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
                    </view>
                </view>
            </view>
            <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
                <uni-card style="margin: 10px;">
                    <view class="card-detail">
@@ -174,7 +174,7 @@
                            <text>点检项目分类:</text>{{item.HDotCheckItemClassName}}
                        </view>
                        <view class="detail">
                            <text>点检方法:</text>{{item.HDotCheckItemMethodName}}
                                <text>点检项目:</text>{{item.HDotCheckItem}}
                        </view>
                        <view class="detail">
                            <text>点检部位:</text>{{item.HDotCheckPart}}
@@ -189,6 +189,7 @@
                </uni-card>
            </view>
            <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view>
            </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,
@@ -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'
@@ -564,6 +581,66 @@
                    })
                }
            },
            // 获取保养规程
            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
                            }
                        })
                        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({
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
@@ -128,7 +128,7 @@
                            <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
                        </view>
                    </view>
                </view>
                <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
                    <uni-card style="margin: 10px;">
                        <view class="card-detail">
@@ -161,6 +161,7 @@
                    </uni-card>
                </view>
                <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view>
                </view>
            </view>
        </template>
        <!-- 其他信息 -->
@@ -254,7 +255,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"></BillSelectorPopupVue>
        <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'BY'"></BillSelectorPopupVue>
    </view>
</template>
@@ -359,7 +360,7 @@
        methods: {
            billSelectHandler(billData) {
                console.log('billData: ', billData);
                let data = billData.retVal[0]
                let data = billData.retVal[this.hform.HEquipID]
                this.get_DocCheckItem2(data.hmainid)
            },
            // 获取保养规程
@@ -372,9 +373,26 @@
                        },
                    })
                    
                    let {data, count, Message} = res.data
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if(count == 1) {
                        console.log('data: ',data);
                        this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID
                        this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号
                        this.hform.HPlanNo = data[0].保养计划单
                        this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ?
                            0 : data[0].保养计划ID
                        this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) ==
                            "" ? 0 : data[0].保养计划子ID
                        this.hform.HMainSourceBillNo = data[0].保养计划单
                        this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 :
                            data[0].保养计划ID
                        this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 :
                            data[0].保养计划子ID
                        this.HCheckFileList = Array.from(data).map(item => {
                            return {
                                "HMaintainResult": item.默认结论 == 1 ? true : false,
@@ -416,8 +434,7 @@
                        message: '不能选择保养规程,请先扫描设备条码!!!'
                    })
                }
                console.log('this.$refs: ', this.$refs);
                this.$refs['billSelector'].showPopup(0)
                this.$refs['billSelector'].showPopup(this.hform.HEquipID)
            },
            ValidCheck() {
                if (this.hform.HEquipID == 0) {
@@ -668,7 +685,7 @@
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取点检规程错误: ${Message}`
                            message: `获取保养规程错误: ${Message}`
                        })
                    }
                } catch (err) {
pages/shengchanlingliao/PPickingCheckBill.vue
@@ -1105,7 +1105,7 @@
            },
            addNew() {
                uni.redirectTo({
                    url: '/pages/xiaoshoutuihuo/PPickingBill?OperationType=1'
                    url: './PPickingCheckBill?OperationType=1'
                })
            },
            async submit() {
@@ -1165,7 +1165,7 @@
                                        if (res.confirm) {
                                            console.log('用户点击确定');
                                            uni.redirectTo({
                                                url: '/pages/xiaoshoutuihuo/PPickingBill?OperationType=1'
                                                url: './PPickingCheckBill?OperationType=1'
                                            })
                                        } else if (res.cancel) {
                                            console.log('用户点击取消');
pages/shengchanruku/ProductInCheckBill.vue
@@ -950,7 +950,7 @@
            },
            addNew() {
                uni.redirectTo({
                    url: '/pages/shengchanruku/ProductCheckInBill?OperationType=1'
                    url: '/pages/shengchanruku/ProductInCheckBill?OperationType=1'
                })
            },
            async submit() {
@@ -1010,7 +1010,7 @@
                                        if (res.confirm) {
                                            console.log('用户点击确定');
                                            uni.redirectTo({
                                                url: '/pages/shengchanruku/ProductCheckInBill?OperationType=1'
                                                url: '/pages/shengchanruku/ProductInCheckBill?OperationType=1'
                                            })
                                        } else if (res.cancel) {
                                            console.log('用户点击取消');