zrg
2026-01-20 04b8cce533af3e8626148d315dc44f561ac5496f
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
6个文件已修改
5个文件已添加
1901 ■■■■■ 已修改文件
pages.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue 475 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue 480 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue 220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shebeilvli/EquipFileBillResume.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shebeiyunxingzhuangtai/detail.vue 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -1521,80 +1521,128 @@
        },
        {
            "path": "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList",
            "style": {
                "navigationBarTitleText": "设备维修派工单缓存"
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill",
            "style": {
                "navigationBarTitleText": "器具维修派工单"
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList",
            "style": {
                "navigationBarTitleText": "器具维修派工单缓存"
            }
        },
        {
            "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill",
            "style": {
                "navigationBarTitleText": "器具维修验收单"
            }
        },
        {
            "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList",
            "style": {
                "navigationBarTitleText": "器具维修验收单缓存"
            }
        },
        {
            "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill",
            "style": {
                "navigationBarTitleText": "工作联系单"
            }
        },
        {
            "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList",
            "style": {
                "navigationBarTitleText": "工作联系单列表"
            }
        },
        {
            "path": "pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport",
            "style": {
                "navigationBarTitleText": "设备维修任务"
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport",
            "style": {
                "navigationBarTitleText": "器具维修任务"
            }
        },
        {
            "path": "pages/EmployeeRecords/EmployeeRecordsBill",
            "style": {
                "navigationBarTitleText": "员工签到记录表"
            }
        },
        {
            "path": "pages/EmployeeRecords/EmployeeRecordsBillList",
            "style": {
                "navigationBarTitleText": "员工签到记录表列表"
            }
        },
        {
            "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill",
            "style": {
                "navigationBarTitleText": "设备故障登记单"
            }
        }, {
            "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList",
            "style": {
                "navigationBarTitleText": "设备故障登记单列表"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill",
            "style" :
            {
                "navigationBarTitleText" : "设备开机单"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipStop/Sb_EquipStopBill",
            "style" :
            {
                "navigationBarTitleText" : ""
            }
        },
        {
            "path" : "pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day",
            "style" :
            {
                "navigationBarTitleText" : "点检清单"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery",
            "style" :
            {
                "navigationBarTitleText" : "设备履历"
            }
        },
        {
            "path" : "pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess",
            "style" :
            {
                "navigationBarTitleText" : "设备工艺路线"
            }
        }
pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue
New file
@@ -0,0 +1,475 @@
<template>
    <view>
        <view class="tabs" id="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view>
            <!-- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view> -->
            <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view>
            <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> -->
        </view>
        <!-- 基本信息 -->
        <template v-if="tabs == 0">
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">日期:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">设备:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="部门名称"
                        dataValue="HItemID" v-model="hform.HEquipName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HEquipName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">关联主设备:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HEquipRelationName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HEquipRelationName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">开机人:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HBeginEmpName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HBeginEmpName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">开机时间:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HBeginTime" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">备注:</view>
                    <view class="right">
                        <textarea v-model="hform.HRemark" placeholder="请输入备注" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 其他信息 -->
        <template v-if="tabs == 2">
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">创建人:</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">创建日期:</view>
                    <view class="righton">
                        <input v-model="hform.HMakeDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDateDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核时间:</view>
                    <view class="righton">
                        <input v-model="hform.HCheckDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废人:</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteMan" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废日期:</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteDate" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 操作按钮 -->
        <view class="buttons" id="buttons">
            <button class="btn-a" size="mini" @tap="submit">提交</button>
            <view style="flex: 1;"></view>
            <!-- <button class="btn-a" size="mini" @tap="addNew">新增</button> -->
            <button class="btn-c" size="mini" @tap="goBack">退出</button>
        </view>
        <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import {
        CommonUtils
    } from "@/utils/common";
    import {
        MpaasScan
    } from "@/utils/mpaasScan.js"
    import {
        getUserInfo
    } from "../../../utils/auth";
    export default {
        // 设备开机单
        name: 'Sb_EquipBeginBill',
        data() {
            return {
                tabs: 0,
                HMainSourceBillType: "",
                btnTop: 0,
                tabsBottom: 0,
                HModName: "Sb_EquipBeginBill",
                HBillType: '3917',
                operationType: 1,
                uploadOptions: {},
                enableEdit: true,
                HDeptList: [],
                HRepairCheckList: [],
                HEmpList: [],
                HRepairList: [],
                hform: {
                    "HBillNo": "",
                    "HInterID": "0",
                    "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
                    "HEquipName": "",
                    "HEquipID": "0",
                    "HEquipRelationName": "",
                    "HEquipRelationID": "0",
                    "HBeginEmpName": getUserInfo()["HEmpName"],
                    "HBeginEmpID": getUserInfo()["HEmpID"],
                    "HBeginTime": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    "HRemark": "",
                    HMaker: getUserInfo()["Czymc"],
                    HChecker: '',
                    HCloseMan: '',
                    HUpDater: '',
                    HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HCheckDate: '',
                    HCloseDate: '',
                    HUpDateDate: '',
                    HDeleteMan: '',
                    HDeleteDate: ''
                },
            };
        },
        computed: {
            containerHeight: {
                get() {
                    return this.btnTop - this.tabsBottom - 5
                }
            },
        },
        methods: {
            // 维修项目
            async getRepairList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: '/Gy_Repair/GetRepairList',
                        data: {
                            sWhere: '',
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        this.HRepairList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取检验项目失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取检验项目失败: ${err}`
                    })
                }
            },
            // 删除明细
            delDetail(item) {
            },
            // 提交数据有效性校验
            ValidCheck() {
                if (this.hform.HEquipID == 0) {
                    return {
                        Message: "未录入设备信息,请先录入设备信息!",
                        state: false
                    }
                }
                if (this.hform.HEmpID == 0) {
                    return {
                        Message: "验收人不得为空!",
                        state: false
                    }
                }
                return {
                    Message: "",
                    state: true
                }
            },
            addNew() {
                uni.redirectTo({
                    url: './Sb_EquipRepairSendWorkBill?operationType=1'
                })
            },
            goBack() {
                uni.navigateBack()
            },
            checkBoxChangeHandler(index, e) {
                let cr = e.detail.value
                if (cr.length == 0) {
                    this.HCheckFileList[index]["HDotCheckResult"] = false
                } else {
                    this.HCheckFileList[index]["HDotCheckResult"] = true
                }
            },
            radioChange({
                detail: {
                    value
                }
            }) {
                this.hform.HCheckResult = value
            },
            async getMaxNum() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Web/GetMAXNum",
                        data: {
                            "HBillType": this.HBillType
                        }
                    })
                    let {
                        count,
                        data,
                        Message
                    } = res.data
                    console.log('data: ', data);
                    this.hform.HInterID = data[0]["HInterID"]
                    this.hform.HBillNo = data[0]["HBillNo"]
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "获取单据信息异常: " + err
                    })
                }
            },
            async set_CheckBill(HInterID, num) {
                try{
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sb_EquipBeginBill/AuditSb_EquipBeginBill",
                        data: {
                            HInterID: HInterID,
                            type: num,
                            user: getUserInfo()['Czymc']
                        }
                    })
                    if(res.count == 1) {
                        return
                    }else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "设备开机单审核失败: " + res.Message
                        })
                    }
                }catch(err){
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "设备开机单审核失败: " + err
                    })
                }
            },
            async submit() {
                let valid = this.ValidCheck()
                if (!valid.state) {
                    CommonUtils.showTips({
                        message: valid.Message
                    })
                    return
                }
                try {
                    let oMain = JSON.stringify(this.hform);
                    let sMainSub = oMain + ';Add' + `;${getUserInfo()['Czymc']}`;
                    let res = await CommonUtils.doRequest2Sync({
                        url: "/Sb_EquipBeginBill/SaveSb_EquipBeginBillMain",
                        data: {
                            "sMainSub": sMainSub
                        },
                        method: "POST"
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        if (data.Verify == "Y") { //自动审核
                            set_checkBill(data.HInterID, 1)
                        }
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '返回上级页面',
                            showCancel: false,
                            success: (res) => {
                                if (res.confirm) {
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 50)
                                } else if (res.cancel) {
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 50)
                                }
                            }
                        });
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "提交单据失败: " + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "提交单据失败: " + err
                    })
                }
            },
            async getEquipInfo() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_EquipFileMain/getSb_EquipList",
                        data: {
                            HInterID: this.hform.HEquipID,
                            user: getUserInfo()['Czymc']
                        }
                    })
                    let {
                        data,
                        Message,
                        count
                    } = res.data
                    if (count == 1) {
                        console.log('data: ', data);
                        this.hform.HEquipID = data[0].hmainid
                        this.hform.HEquipName = data[0].设备名称
                        this.hform.HEquipRelationID = data[0].HMainSourceID
                        this.hform.HEquipRelationName = data[0].所属主生产设备
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "获取设备信息失败: " + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "获取设备信息失败: " + err
                    })
                }
            }
        },
        onLoad(e) {
            console.log('e: ', e);
            if (!e.operationType) {
                this.operationType = 1
            } else {
                this.operationType = e.operationType
            }
            if (this.operationType == 1) {
                this.hform.HEquipID = e.HEquipID
                // 新增
                this.getMaxNum()
                this.getEquipInfo()
            } else if (this.operationType == 2) {
                // 复制
            } else if (this.operationType == 3) {
                // 编辑
            } else if (this.operationType == 4) {
                // 浏览
            }
        },
        onReady() {
            const query = uni.createSelectorQuery().in(this)
            query.select("#buttons")
                .boundingClientRect()
                .select("#tabs")
                .boundingClientRect()
                .exec(res => {
                    this.btnTop = Math.floor(res[0].top)
                    this.tabsBottom = Math.ceil(res[1].bottom)
                })
        }
    }
</script>
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
@@ -767,6 +767,46 @@
                        message: `获取故障登记单失败: ${err}`
                    })
                }
            },
            async GetEquipInfo(HEquipID) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_EquipFileMain/getSb_EquipList",
                        data: {
                            HInterID: HEquipID,
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        data,
                        Message,
                        count
                    } = res.data
                    if (count == 1) {
                        console.log('data: ',data);
                        Object.assign(this.hform, {
                            HDeptID: data[0]["HDeptID"],
                            HDeptName: data[0]["使用部门"],
                            HEquipID: data[0]["hmainid"],
                            HBarName: data[0]["设备名称"],
                            HBarModel: data[0]["设备规格"],
                            HBarSpec: data[0]["设备型号"],
                            HEmpID: getUserInfo()["HEmpID"],
                            HManagerID: data[0]["HRepairEmpID"]
                        })
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取设备数据失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取设备数据失败: ${err}`
                    })
                }
            }
        },
        onLoad(e) {
@@ -788,7 +828,10 @@
                this.getEditData(hmainid)
            } else if (this.operationType == 4) {
                // 浏览
                // 报工平台下推
                let HEquipID = e.HEquipID
                this.getMaxNum()
                this.GetEquipInfo(HEquipID)
            }
pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue
New file
@@ -0,0 +1,213 @@
<template>
    <view class="content">
        <view id="divide" style="width: 100%;height: 0rpx;background-color: #e5e5e5;"></view>
        <view :style="{
            height: calcContentHeight + 'px',
            overflowY: 'auto'
        }">
            <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
                <uni-card :title="item.单据号" style="margin: 10px;">
                    <view class="card-detail">
                        <template v-for="(field, index)  in CommonUtils.emptyValueFilter(item, HFieldList)">
                            <view v-if="field.ColmType == 'DateTime'" class="detail">
                                <text>{{field.ColmCols}}:</text>{{dayjs(item[field.ColmCols]).format("YYYY-MM-DD HH:mm:ss")}}
                            </view>
                            <view v-else class="detail">
                                <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}}
                            </view>
                        </template>
                    </view>
                </uni-card>
            </view>
        </view>
        <view class="pagination-zone" id="pagination-zone">
            <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
                @change="onPaginationChangeHandler"></uni-pagination>
        </view>
        <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
    import {
        CommonUtils
    } from "../../../utils/common";
    import dayjs from "dayjs";
    export default {
        data() {
            return {
                dayjs,
                CommonUtils,
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                tabs: 0,
                urls: '/Gy_EquipFileMain/GetResumeList',
                MvarReportTitle: '设备履历',
                hform: {
                    HInterID: 0,
                    HBillNo: '',
                    HSourceBillNo: '',
                    user: uni.getStorageSync('HUserName'),
                    HStockOrgID: uni.getStorageSync('OrganizationID'),
                    operationType: "4",
                    sWhere: "",
                },
                sWhere: '',
                listData: [],
                showList: [],
                HFieldList: [], // 字段列表
                showDetail: -1,
                operations: -1,
                page: 1,
                size: 20,
                dataLength: 0,
                divideBottom: 0,
                paginationTop: 0,
                showmore: false,
            }
        },
        computed: {
            calcContentHeight: {
                get() {
                    return this.paginationTop - this.divideBottom
                }
            }
        },
        onShow() {
            //用户模块权限判断
            this.changeTab(0)
            console.log(this.userInfo, uni.getStorageSync('HUserName'))
        },
        components: {
            BarCodePopupVue
        },
        onReady() {
            this.getCalcHeight()
        },
        methods: {
            changeShowMore() {
                this.showmore = !this.showmore
                this.$nextTick(() => {
                    // 重新计算内容视口高度
                    this.getCalcHeight()
                })
            },
            getCalcHeight() {
                let query = uni.createSelectorQuery().in(this)
                query
                    .select("#divide")
                    .boundingClientRect()
                    .select("#pagination-zone")
                    .boundingClientRect()
                    .exec(res => {
                        this.divideBottom = Math.ceil(res[0].bottom)
                        this.paginationTop = Math.floor(res[1].top)
                    })
            },
            async qrCodeDisplay(item) {
                this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
                await this.$nextTick()
                this.$refs.barcodePopup.open()
            },
            onPaginationChangeHandler({
                current
            }) {
                this.page = current
                this.showList = this.getPage(current, this.size, this.listData)
            },
            getPage(page, size, list) {
                let sindex = (parseInt(page) - 1) * size
                let eindex = parseInt(page) * size
                let newList = list.slice(sindex, eindex)
                return newList
            },
            changeTab(e) {
                this.tabs = e
                this.page = 1
                this.showList = []
                if (this.tabs == 0) {
                    this.urls = '/Gy_EquipFileMain/GetResumeList'
                }
                // if (this.tabs == 1) {
                //     this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
                // }
                this.search()
            },
            async getList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: this.urls,
                        data: this.hform
                    })
                    let {
                        count,
                        data,
                        Message,
                        list
                    } = res.data
                    if (count == 1) {
                        if (data == null) {
                            data = []
                        }
                        this.listData = data
                        console.log('data: ', data);
                        this.showList = this.getPage(this.page, this.size, data)
                        this.dataLength = data.length
                        this.HFieldList = CommonUtils.fieldListFilterRole({
                            FieldList: list,
                            ExcludeKeys: ["单据号"]
                        }).data
                        console.log('this.HFieldList: ', this.HFieldList);
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取设备履历失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取设备履历失败: ${err}`
                    })
                }
            },
            search() {
                this.hform.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                this.hform.sWhere = {
                    Type: this.hform.Type,
                    HInterId: this.hform.HInterId
                }
                this.getList()
            },
        },
        onLoad(e) {
            let {
                operationType,
                HEquipID
            } = e
            if (operationType == 4) {
                this.HInterID = HEquipID
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJListStyle.scss"
</style>
pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue
New file
@@ -0,0 +1,480 @@
<template>
    <view>
        <view class="tabs" id="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view>
            <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view>
        </view>
        <!-- 基本信息 -->
        <template v-if="tabs == 0">
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HBillNo" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">日期:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">设备:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="部门名称"
                        dataValue="HItemID" v-model="hform.HEquipName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HEquipName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">关联主设备:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HEquipRelationName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HEquipRelationName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title required">停机人:</view>
                    <!--                    <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
                        dataValue="HItemID" v-model="hform.HBeginEmpName">
                    </zxz-uni-data-select> -->
                    <view class="righton">
                        <input disabled v-model="hform.HStopEmpName" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">停机时间:</view>
                    <view class="righton">
                        <input disabled v-model="hform.HStopTime" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">停机原因:</view>
                    <view class="right">
                        <textarea v-model="hform.HStopReason" placeholder="请输入停机原因" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">备注:</view>
                    <view class="right">
                        <textarea v-model="hform.HRemark" placeholder="请输入备注" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 其他信息 -->
        <template v-if="tabs == 2">
            <view class="form" :style="{
                height: containerHeight + 'px',
                overflow: 'auto'
            }">
                <view class="form-item">
                    <view class="title">创建人:</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">创建日期:</view>
                    <view class="righton">
                        <input v-model="hform.HMakeDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDateDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核时间:</view>
                    <view class="righton">
                        <input v-model="hform.HCheckDate" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废人:</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteMan" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废日期:</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteDate" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 操作按钮 -->
        <view class="buttons" id="buttons">
            <button class="btn-a" size="mini" @tap="submit">提交</button>
            <view style="flex: 1;"></view>
            <!-- <button class="btn-a" size="mini" @tap="addNew">新增</button> -->
            <button class="btn-c" size="mini" @tap="goBack">退出</button>
        </view>
        <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import {
        CommonUtils
    } from "@/utils/common";
    import {
        MpaasScan
    } from "@/utils/mpaasScan.js"
    import {
        getUserInfo
    } from "../../../utils/auth";
    export default {
        // 设备停机单
        name: 'Sb_EquipBeginBill',
        data() {
            return {
                tabs: 0,
                HMainSourceBillType: "",
                btnTop: 0,
                tabsBottom: 0,
                HModName: "Sb_EquipStopBillMain",
                HBillType: '3918',
                operationType: 1,
                uploadOptions: {},
                enableEdit: true,
                HDeptList: [],
                HRepairCheckList: [],
                HEmpList: [],
                HRepairList: [],
                hform: {
                    "HBillNo": "",
                    "HInterID": "0",
                    "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
                    "HEquipName": "",
                    "HEquipID": "0",
                    "HEquipRelationName": "",
                    "HEquipRelationID": "0",
                    "HStopEmpName": getUserInfo()["HEmpName"],
                    "HStopEmpID": getUserInfo()["HEmpID"],
                    "HStopTime": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    "HRemark": "",
                    "HStopReason": "",
                    HMaker: getUserInfo()["Czymc"],
                    HChecker: '',
                    HCloseMan: '',
                    HUpDater: '',
                    HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
                    HCheckDate: '',
                    HCloseDate: '',
                    HUpDateDate: '',
                    HDeleteMan: '',
                    HDeleteDate: ''
                },
            };
        },
        computed: {
            containerHeight: {
                get() {
                    return this.btnTop - this.tabsBottom - 5
                }
            },
        },
        methods: {
            // 维修项目
            async getRepairList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: '/Gy_Repair/GetRepairList',
                        data: {
                            sWhere: '',
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        this.HRepairList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取检验项目失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取检验项目失败: ${err}`
                    })
                }
            },
            // 删除明细
            delDetail(item) {
            },
            // 提交数据有效性校验
            ValidCheck() {
                if (this.hform.HEquipID == 0) {
                    return {
                        Message: "未录入设备信息,请先录入设备信息!",
                        state: false
                    }
                }
                if (this.hform.HEmpID == 0) {
                    return {
                        Message: "验收人不得为空!",
                        state: false
                    }
                }
                return {
                    Message: "",
                    state: true
                }
            },
            addNew() {
                uni.redirectTo({
                    url: './Sb_EquipRepairSendWorkBill?operationType=1'
                })
            },
            goBack() {
                uni.navigateBack()
            },
            checkBoxChangeHandler(index, e) {
                let cr = e.detail.value
                if (cr.length == 0) {
                    this.HCheckFileList[index]["HDotCheckResult"] = false
                } else {
                    this.HCheckFileList[index]["HDotCheckResult"] = true
                }
            },
            radioChange({
                detail: {
                    value
                }
            }) {
                this.hform.HCheckResult = value
            },
            async getMaxNum() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Web/GetMAXNum",
                        data: {
                            "HBillType": this.HBillType
                        }
                    })
                    let {
                        count,
                        data,
                        Message
                    } = res.data
                    console.log('data: ', data);
                    this.hform.HInterID = data[0]["HInterID"]
                    this.hform.HBillNo = data[0]["HBillNo"]
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "获取单据信息异常: " + err
                    })
                }
            },
            async set_CheckBill(HInterID, num) {
                try{
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sb_EquipStopBill/AuditSb_EquipStopBill",
                        data: {
                            HInterID: HInterID,
                            type: num,
                            user: getUserInfo()['Czymc']
                        }
                    })
                    if(res.count == 1) {
                        return
                    }else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "设备开机单审核失败: " + res.Message
                        })
                    }
                }catch(err){
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "设备开机单审核失败: " + err
                    })
                }
            },
            async submit() {
                let valid = this.ValidCheck()
                if (!valid.state) {
                    CommonUtils.showTips({
                        message: valid.Message
                    })
                    return
                }
                try {
                    let oMain = JSON.stringify(this.hform);
                    let sMainSub = oMain + ';Add' + `;${getUserInfo()['Czymc']}`;
                    let res = await CommonUtils.doRequest2Sync({
                        url: "/Sb_EquipStopBill/SaveSb_EquipStopBillMain",
                        data: {
                            "sMainSub": sMainSub
                        },
                        method: "POST"
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count == 1) {
                        if (data.Verify == "Y") { //自动审核
                            set_checkBill(data.HInterID, 1)
                        }
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '返回上级页面',
                            showCancel: false,
                            success: (res) => {
                                if (res.confirm) {
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 50)
                                } else if (res.cancel) {
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 50)
                                }
                            }
                        });
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "提交单据失败: " + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "提交单据失败: " + err
                    })
                }
            },
            async getEquipInfo() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_EquipFileMain/getSb_EquipList",
                        data: {
                            HInterID: this.hform.HEquipID,
                            user: getUserInfo()['Czymc']
                        }
                    })
                    let {
                        data,
                        Message,
                        count
                    } = res.data
                    if (count == 1) {
                        console.log('data: ', data);
                        this.hform.HEquipID = data[0].hmainid
                        this.hform.HEquipName = data[0].设备名称
                        this.hform.HEquipRelationID = data[0].HMainSourceID
                        this.hform.HEquipRelationName = data[0].所属主生产设备
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: "获取设备信息失败: " + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: "获取设备信息失败: " + err
                    })
                }
            }
        },
        onLoad(e) {
            console.log('e: ', e);
            if (!e.operationType) {
                this.operationType = 1
            } else {
                this.operationType = e.operationType
            }
            if (this.operationType == 1) {
                this.hform.HEquipID = e.HEquipID
                // 新增
                this.getMaxNum()
                this.getEquipInfo()
            } else if (this.operationType == 2) {
                // 复制
            } else if (this.operationType == 3) {
                // 编辑
            } else if (this.operationType == 4) {
                // 浏览
            }
        },
        onReady() {
            const query = uni.createSelectorQuery().in(this)
            query.select("#buttons")
                .boundingClientRect()
                .select("#tabs")
                .boundingClientRect()
                .exec(res => {
                    this.btnTop = Math.floor(res[0].top)
                    this.tabsBottom = Math.ceil(res[1].bottom)
                })
        }
    }
</script>
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue
New file
@@ -0,0 +1,220 @@
<template>
    <view class="content">
        <view id="divide" style="width: 100%;height: 0rpx;background-color: #e5e5e5;"></view>
        <view :style="{
            height: calcContentHeight + 'px',
            overflowY: 'auto'
        }">
            <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
                <uni-card :title="item.单据号" style="margin: 10px;">
                    <view class="card-detail">
                        <template v-for="(field, index)  in CommonUtils.emptyValueFilter(item, HFieldList)">
                            <view v-if="field.ColmType == 'DateTime'" class="detail">
                                <text>{{field.ColmCols}}:</text>{{dayjs(item[field.ColmCols]).format("YYYY-MM-DD HH:mm:ss")}}
                            </view>
                            <view v-else class="detail">
                                <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}}
                            </view>
                        </template>
                    </view>
                </uni-card>
            </view>
        </view>
        <view class="pagination-zone" id="pagination-zone">
            <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
                @change="onPaginationChangeHandler"></uni-pagination>
        </view>
        <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
    import {
        CommonUtils
    } from "../../../utils/common";
    import dayjs from "dayjs";
    export default {
        data() {
            return {
                dayjs,
                CommonUtils,
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                tabs: 0,
                urls: '/Sc_HEquipStateDistribution/Get_EquipICMOTechParamList_Json',
                MvarReportTitle: '设备工艺',
                hform: {
                    HInterID: 0,
                    HICMOInterID: 0,
                    HICMOEntryID: 0,
                    HBillNo: '',
                    HSourceBillNo: '',
                    user: uni.getStorageSync('HUserName'),
                    HStockOrgID: uni.getStorageSync('OrganizationID'),
                    operationType: "4",
                    sWhere: "",
                },
                sWhere: '',
                listData: [],
                showList: [],
                HFieldList: [], // 字段列表
                showDetail: -1,
                operations: -1,
                page: 1,
                size: 20,
                dataLength: 0,
                divideBottom: 0,
                paginationTop: 0,
                showmore: false,
            }
        },
        computed: {
            calcContentHeight: {
                get() {
                    return this.paginationTop - this.divideBottom
                }
            }
        },
        onShow() {
            //用户模块权限判断
            this.changeTab(0)
            console.log(this.userInfo, uni.getStorageSync('HUserName'))
        },
        components: {
            BarCodePopupVue
        },
        onReady() {
            this.getCalcHeight()
        },
        methods: {
            changeShowMore() {
                this.showmore = !this.showmore
                this.$nextTick(() => {
                    // 重新计算内容视口高度
                    this.getCalcHeight()
                })
            },
            getCalcHeight() {
                let query = uni.createSelectorQuery().in(this)
                query
                    .select("#divide")
                    .boundingClientRect()
                    .select("#pagination-zone")
                    .boundingClientRect()
                    .exec(res => {
                        this.divideBottom = Math.ceil(res[0].bottom)
                        this.paginationTop = Math.floor(res[1].top)
                    })
            },
            async qrCodeDisplay(item) {
                this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
                await this.$nextTick()
                this.$refs.barcodePopup.open()
            },
            onPaginationChangeHandler({
                current
            }) {
                this.page = current
                this.showList = this.getPage(current, this.size, this.listData)
            },
            getPage(page, size, list) {
                let sindex = (parseInt(page) - 1) * size
                let eindex = parseInt(page) * size
                let newList = list.slice(sindex, eindex)
                return newList
            },
            changeTab(e) {
                this.tabs = e
                this.page = 1
                this.showList = []
                if (this.tabs == 0) {
                    this.urls = '/Sc_HEquipStateDistribution/Get_EquipICMOTechParamList_Json'
                }
                // if (this.tabs == 1) {
                //     this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
                // }
                this.search()
            },
            async getList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: this.urls,
                        data: this.hform
                    })
                    let {
                        count,
                        data,
                        Message,
                        list
                    } = res.data
                    if (count == 1) {
                        if (data == null) {
                            data = []
                        }
                        this.listData = data
                        console.log('data: ', data);
                        this.showList = this.getPage(this.page, this.size, data)
                        this.dataLength = data.length
                        this.HFieldList = CommonUtils.fieldListFilterRole({
                            FieldList: list,
                            ExcludeKeys: ["单据号"]
                        }).data
                        console.log('this.HFieldList: ', this.HFieldList);
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取设备履历失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取设备履历失败: ${err}`
                    })
                }
            },
            search() {
                this.hform.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                this.hform.sWhere = {
                    HEquipID: this.hform.HInterID,
                    HICMOInterID: this.hform.HICMOInterID,
                    HICMOEntryID: this.hform.HICMOEntryID,
                }
                this.getList()
            },
        },
        onLoad(e) {
            let {
                operationType,
                HEquipID,
                HICMOInterID,
                HICMOEntryID
            } = e
            if (operationType == 4) {
                this.HInterID = HEquipID
                this.HICMOInterID = HICMOInterID
                this.HICMOEntryID = HICMOEntryID
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJListStyle.scss"
</style>
pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue
New file
@@ -0,0 +1,203 @@
<template>
    <view class="content">
        <view id="divide" style="width: 100%;height: 0rpx;background-color: #e5e5e5;"></view>
        <view :style="{
            height: calcContentHeight + 'px',
            overflowY: 'auto'
        }">
            <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
                <uni-card :title="item.检查项目" style="margin: 10px;">
                    <view class="card-detail">
                        <view class="detail" style="width: 25%; justify-content: left;" v-for="(field, index)  in HFieldList" :key="index">
                            <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}}
                        </view>
                    </view>
                </uni-card>
            </view>
        </view>
        <view class="pagination-zone" id="pagination-zone">
            <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
                @change="onPaginationChangeHandler"></uni-pagination>
        </view>
        <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
    import {
        CommonUtils
    } from "../../../utils/common";
    import dayjs from "dayjs";
    export default {
        data() {
            return {
                dayjs,
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                tabs: 0,
                urls: '/Sc_WorkBeginDotCheckBill/getSc_WorkDotCheckList_Day',
                MvarReportTitle: '设备月点检记录',
                hform: {
                    HInterId: 0,
                    HBillNo: '',
                    HSourceBillNo: '',
                    user: uni.getStorageSync('HUserName'),
                    HStockOrgID: uni.getStorageSync('OrganizationID'),
                    Type: "设备",
                    sWhere: "",
                },
                sWhere: '',
                listData: [],
                showList: [],
                HFieldList: [], // 字段列表
                showDetail: -1,
                operations: -1,
                page: 1,
                size: 20,
                dataLength: 0,
                divideBottom: 0,
                paginationTop: 0,
                showmore: false,
            }
        },
        computed: {
            calcContentHeight: {
                get() {
                    return this.paginationTop - this.divideBottom
                }
            }
        },
        onShow() {
            //用户模块权限判断
            this.changeTab(0)
            console.log(this.userInfo, uni.getStorageSync('HUserName'))
        },
        components: {
            BarCodePopupVue
        },
        onReady() {
            this.getCalcHeight()
        },
        methods: {
            changeShowMore() {
                this.showmore = !this.showmore
                this.$nextTick(() => {
                    // 重新计算内容视口高度
                    this.getCalcHeight()
                })
            },
            getCalcHeight() {
                let query = uni.createSelectorQuery().in(this)
                query
                    .select("#divide")
                    .boundingClientRect()
                    .select("#pagination-zone")
                    .boundingClientRect()
                    .exec(res => {
                        this.divideBottom = Math.ceil(res[0].bottom)
                        this.paginationTop = Math.floor(res[1].top)
                    })
            },
            async qrCodeDisplay(item) {
                this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
                await this.$nextTick()
                this.$refs.barcodePopup.open()
            },
            onPaginationChangeHandler({
                current
            }) {
                this.page = current
                this.showList = this.getPage(current, this.size, this.listData)
            },
            getPage(page, size, list) {
                let sindex = (parseInt(page) - 1) * size
                let eindex = parseInt(page) * size
                let newList = list.slice(sindex, eindex)
                return newList
            },
            changeTab(e) {
                this.tabs = e
                this.page = 1
                this.showList = []
                if (this.tabs == 0) {
                    this.urls = '/Sc_WorkBeginDotCheckBill/getSc_WorkDotCheckList_Day'
                }
                // if (this.tabs == 1) {
                //     this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
                // }
                this.search()
            },
            async getList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: this.urls,
                        data: this.hform
                    })
                    let {
                        count,
                        data,
                        Message,
                        list
                    } = res.data
                    if (count == 1) {
                        if (data == null) {
                            data = []
                        }
                        this.listData = data
                        console.log('data: ', data);
                        this.showList = this.getPage(this.page, this.size, data)
                        this.dataLength = data.length
                        this.HFieldList = CommonUtils.fieldListFilterRole({
                            FieldList: list,
                            ExcludeKeys: ["检查项目"]
                        }).data
                        console.log('this.HFieldList: ',this.HFieldList);
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取点检记录失败: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取点检记录失败: ${err}`
                    })
                }
            },
            search() {
                this.hform.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                this.hform.sWhere = {
                    Type: this.hform.Type,
                    HInterId: this.hform.HInterId
                }
                this.getList()
            },
        },
        onLoad(e) {
            let {operationType, HEquipID} = e
            this.hform.Type = operationType
            this.hform.HInterId = HEquipID
        }
    }
</script>
<style lang="scss" scoped>
    @import "@/pages/MJGL/style/MJListStyle.scss"
</style>
pages/index/tab3.vue
@@ -238,6 +238,13 @@
                        "id": 27,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "设备状态查询",
                        "url": "/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai",
                        "id": 28,
                        "hidden": false
                    }
                ]
            }
        },
pages/shebeilvli/EquipFileBillResume.vue
@@ -40,7 +40,8 @@
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        
        <view class="list" v-for="(item,index) in showList" :key="index">
            <uni-card :title="item.设备名称" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
            <uni-card :title="item.设备名称" :extra="item.单据号" style="margin: 10px;"
                @tap="showDetail = showDetail==index?-1:index">
                <view class="card-detail">
                    <view class="detail" v-if="item.设备代码">
                        <text>设备代码:</text>{{item.设备代码}}
@@ -180,7 +181,8 @@
                        <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起
                    </view>
                    <view class="part" @tap.stop="toSon(item)">
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>查看子表
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                            size="14"></uni-icons>查看子表
                    </view>
                </view>
                <view class="more" v-if="showDetail != index">
@@ -188,7 +190,8 @@
                        <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息
                    </view>
                    <view class="part" @tap.stop="toSon(item)">
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>查看子表
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                            size="14"></uni-icons>查看子表
                    </view>
                </view>
            </uni-card>
@@ -201,7 +204,9 @@
</template>
<script>
    import { getUserInfo } from "@/utils/auth.js";
    import {
        getUserInfo
    } from "@/utils/auth.js";
    export default {
        data() {
            return {
@@ -221,7 +226,7 @@
                page:1,
            }
        },
        onLoad() {
        onLoad(e) {
            this.getList()
            console.log(this.userInfo,uni.getStorageSync('HUserName'))
        },
@@ -338,15 +343,15 @@
            },
            toSon(item){
                uni.navigateTo({
                    url:'/pages/shebeilvli/EquipFileBillResume_son?HInterID=' + item.hmainid
                    + '&设备名称=' + item.设备名称
                    + '&设备代码=' + item.设备代码
                    + '&设备出厂日期=' + item.设备出厂日期
                    + '&设备出厂编号=' + item.设备出厂编号
                    + '&设备型号=' + item.设备型号
                    + '&设备类型=' + item.设备类型
                    + '&设备编码=' + item.设备编码
                    + '&设备规格=' + item.设备规格,
                    url: '/pages/shebeilvli/EquipFileBillResume_son?HInterID=' + item.hmainid +
                        '&设备名称=' + item.设备名称 +
                        '&设备代码=' + item.设备代码 +
                        '&设备出厂日期=' + item.设备出厂日期 +
                        '&设备出厂编号=' + item.设备出厂编号 +
                        '&设备型号=' + item.设备型号 +
                        '&设备类型=' + item.设备类型 +
                        '&设备编码=' + item.设备编码 +
                        '&设备规格=' + item.设备规格,
                })
            }
        }
@@ -358,40 +363,48 @@
        width: 640rpx;
        margin: 20rpx auto;
    }
    .form-item{
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title{
            width: 180rpx;
            text{
                color: red;
                font-weight: bold;
            }
        }
        .right{
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton{
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input{
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .buttons{
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
        button{
            border-radius: 50rpx;
            width: 180rpx;
@@ -399,14 +412,17 @@
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a{
            background-color: #acacac;
            color: #fff;
        }
        .btn-b{
            background-color: #41a863;
            color: #fff;
        }
        .btn-c{
            background-color: #3a78ff;
            color: #fff;
@@ -415,35 +431,39 @@
    
    .list{
        width: 100%;
        .card-detail{
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail{
                // width: 50%;
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                margin-right: 20rpx;
                text{
                    color: #999;
                    font-size: 26rpx;
                }
            }
        }
        .more{
            color: #888;
            font-size: 24rpx;
            display: flex;
            border-top: 1px solid #eee;
            padding-top: 20rpx;
            .part{
                width: 50%;
                text-align: center;
            }
        }
    }
</style>
pages/shebeiyunxingzhuangtai/detail.vue
@@ -7,14 +7,14 @@
            <view class="graph"><l-echart ref="chartRef4" @finished="initHistogram4"></l-echart></view>
        </view>
        <view class="operation-zone">
            <button size="mini" plain>开机</button>
            <button size="mini" plain>停机</button>
            <button size="mini" plain>点检记录</button>
            <button size="mini" plain>故障登记</button>
        <view class="operation-zone" @click="doOperation">
            <button size="mini" data-type="equipBegin" plain>开机</button>
            <button size="mini" data-type="equipStop" plain>停机</button>
            <button size="mini" data-type="workDotCheck" plain>点检记录</button>
            <button size="mini" data-type="equipConkBook" plain>故障登记</button>
            <button size="mini" plain>维修</button>
            <button size="mini" plain>履历</button>
            <button size="mini" plain>工艺</button>
            <button size="mini" data-type="equipResume" plain>履历</button>
            <button size="mini" data-type="equipmentProcess" plain>工艺</button>
            <button size="mini" plain>状态</button>
        </view>
@@ -23,12 +23,18 @@
<script>
    import {
        CommonUtils
    } from "../../utils/common";
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import * as echarts from "echarts"
    export default {
        data() {
            return {
                HEquipID: 0,
                HICMOInterID: 0,
                HICMOEntryID: 0,
                userInfo: getUserInfo(),
                organInfo: {
                    id: uni.getStorageSync("OrganizationID") || "",
@@ -100,7 +106,8 @@
                    series: [{
                        data: [], // 默认series数据为空
                        type: 'bar'
                    }]
                    }],
                    animation: false
                };
                // 如果有数据,更新option的内容
@@ -190,7 +197,8 @@
                    series: [{
                        data: [], // 默认series数据为空
                        type: 'bar'
                    }]
                    }],
                    animation: false
                };
@@ -231,7 +239,7 @@
            //饼图
            async get_Statistics(mychart3, chartData2) {
                // 如果 chartData2 为空,提供一个“无数据”提示
                if (chartData2.length === 0) {
                if (!chartData2 || chartData2.length == 0) {
                    mychart3.setOption({
                        title: {
                            text: '暂无数据',
@@ -244,11 +252,10 @@
                            }
                        },
                        series: [], // 清空数据
                        graphic: [] // 清空图形中的文本
                        graphic: [], // 清空图形中的文本
                        animation: false
                    });
                    return;
                }
                } else {
                // 状态颜色映射
                const statusColorMap = {
                    '开机': '#28a745', // 绿色
@@ -258,6 +265,7 @@
                };
                // 计算开机率
                    chartData2 = Array.from(chartData2)
                const totalDevices = chartData2.reduce((sum, item) => sum + item.数量, 0);
                const onlineDevices = chartData2.find(item => item.状态 === '开机')?.数量 || 0;
                const onlineRate = totalDevices === 0 ? 0 : (onlineDevices / totalDevices * 100).toFixed(2);
@@ -322,6 +330,9 @@
                // 设置图表的配置项
                mychart3.setOption(option);
                }
            },
            //柱状图4
@@ -378,7 +389,8 @@
                    series: [{
                        data: [], // 默认series数据为空
                        type: 'bar'
                    }]
                    }],
                    animation: false
                };
                // 如果有数据,更新option的内容
@@ -446,33 +458,96 @@
            async initHistogram4(data) {
                const chart = await this.$refs.chartRef4.init(echarts)
                this.get_Histogram4(chart, data)
            },
            doOperation(e) {
                let ds = e.target
                let type = ds.dataset.type
                if (type) {
                    switch (type) {
                        case "equipBegin":
                            // 导航到 设备开机单
                            uni.navigateTo({
                                url: "/pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill?HEquipID=" + this.HEquipID
                            });
                            break;
                        case "equipStop":
                            // 导航到 设备停机单
                            uni.navigateTo({
                                url: "/pages/MJGL/Sb_EquipStop/Sb_EquipStopBill?HEquipID=" + this.HEquipID
                            });
                            break;
                        case "workDotCheck":
                            // 导航到点检记录
                            uni.navigateTo({
                                url: "/pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day?operationType=设备&HEquipID=" + this.HEquipID
                            });
                            ;break;
                        case "equipConkBook":
                            // 导航到设备故障登记单
                            uni.navigateTo({
                                url: "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill?operationType=4&HEquipID=" + this.HEquipID
                            })
                        ;break;
                        case "equipResume":
                            // 导航到设备履历
                            uni.navigateTo({
                                url: "/pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery?operationType=4&HEquipID=" + this.HEquipID
                            })
                        ;break;
                        case "equipmentProcess":
                            // 导航到设备工艺
                            if(!this.HICMOInterID && !this.HICMOEntryID) {
                                CommonUtils.showTips({
                                    message: "当前设备无生产订单,无法查看工艺"
                                })
                            }
                            uni.navigateTo({
                                url: "/pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess?operationType=4&HEquipID=" + this.HEquipID
                                + `&HICMOInterID=${this.HICMOInterID}&HICMOEntryID=${this.HICMOEntryID}`
                            })
                        ;break;
                        default:
                            return;
                    }
            }
        },
        onLoad(options) {
            let {
                HDeptID,
                HSourceID
            } = options
            this.doRequest(
                "/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport", {
            async getDiagram(HDeptID, HSourceID) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport",
                        data: {
                    sWhere: {
                        "HDeptID": HDeptID,
                        "HSourceID": HSourceID
                    },
                    user: this.userInfo.HEmpName,
                            user: getUserInfo()["Czymc"],
                    OrganizationID: this.organInfo.id
                },
                function(res) {
                        }
                    })
                    let res1 = res.data
                    this.initCharts(res1.data)
                },
                function(err) {
                } catch (err) {
                    uni.showToast({
                        icon: "fail",
                        title: '接口请求失败!'
                    })
                }
            )
            }
        },
        onLoad(options) {
            let {
                HDeptID,
                HSourceID,
                HEquipID,
                HICMOInterID,
                HICMOEntryID
            } = options
            this.HEquipID = HEquipID
            this.HICMOInterID = HICMOInterID
            this.HICMOEntryID = HICMOEntryID
            this.getDiagram(HDeptID, HSourceID)
        },
    }
</script>
pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue
@@ -53,6 +53,10 @@
                        <uni-icons type="smallcircle-filled" size="14"
                            color=""></uni-icons><text>{{item["设备状态"]}}</text>
                    </view>
                    <view class="op2" v-if="item['设备状态']=='故障'">
                        <uni-icons type="smallcircle-filled" size="14"
                            color=""></uni-icons><text>{{item["设备状态"]}}</text>
                    </view>
                    <view class="op1" v-if="item['设备状态']=='生产'">
                        <uni-icons type="smallcircle-filled" size="14"
                            color=""></uni-icons><text>{{item["设备状态"]}}</text>
@@ -91,7 +95,8 @@
                departmentsTitles: [],
                departmentsIdArray: [],
                devices: [],
                selectedDepartment: ""
                selectedDepartment: "",
                HDeptID: 0
            };
        },
        methods: {
@@ -99,7 +104,7 @@
                let index = e.detail.value
                this.selectedDepartment = this.departmentsTitles[index]
                let id = this.departmentsIdArray[index]
                this.HDeptID = id
                // 合并稼动率和OEE => Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport
                this.doRequest(
                    "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport",
@@ -159,8 +164,10 @@
                uni.hideLoading()
            },
            ToDetail(item) {
                console.log('item: ',item);
                uni.navigateTo({
                    url: "./detail?HDeptID=" + (item['设备id'] || 0) + "&HSourceID=" + (item['HSourceID'] || 0)
                    url: "./detail?HDeptID=" + (this.HDeptID || 0) + "&HSourceID=" + (item['HSourceID'] || 0) + `&HEquipID=${item['设备id'] || 0}`
                    + `&HICMOInterID=${item["生产订单主内码"] || 0}&HICMOEntryID=${item["生产订单子内码"] || 0}`
                })
            },
            async initDepartment() {
@@ -192,12 +199,8 @@
                        }) // 自动触发首条数据的更新语句
                    },
                )
            }
        },
        async onLoad() {
            await this.initDepartment()
        },
        onPullDownRefresh() {
            refreshEquipList() {
            let departIndex = this.departmentsTitles.indexOf(this.selectedDepartment)
            if (departIndex != -1) {
                let departId = this.departmentsIdArray[departIndex]
@@ -230,6 +233,16 @@
                    }
                )
            }
            }
        },
        async onLoad() {
            await this.initDepartment()
        },
        async onShow() {
            this.refreshEquipList()
        },
        onPullDownRefresh() {
            this.refreshEquipList()
            uni.stopPullDownRefresh()
        }