chenhaozhe
2026-01-14 6b01a589c507c8af0857d5f9eadb2422bea99187
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

# Conflicts:
# pages.json
# pages/index/login.vue
14个文件已修改
2 文件已重命名
4个文件已添加
1个文件已删除
4994 ■■■■■ 已修改文件
.hbuilderx/launch.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue 630 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport.vue 627 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue 257 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/mojianjianyan/ProcessCheckBill.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/AddLineBind.vue 435 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/DayPlanBillList.vue 380 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/IpadIndex.vue 538 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/OA_ErrMsgBackBill.vue 1159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/abnormal.vue 724 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/login.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab1.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab4.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/jishikucunchaxun/table.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.hbuilderx/launch.json
@@ -21,11 +21,11 @@
            "type" : "uni-app:app-ios"
        },
        {
            "customPlaygroundType" : "local",
            "customPlaygroundType" : "device",
            "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
            "openVueDevtools" : true,
            "packageName" : "com.shebeiguanli.www",
            "playground" : "custom",
            "playground" : "standard",
            "type" : "uni-app:app-android"
        }
    ]
manifest.json
@@ -16,6 +16,10 @@
            "autoclose" : true,
            "delay" : 0
        },
        "screenOrientation": [          //可选,字符串数组类型,应用支持的横竖屏
            "portrait-primary",                 //可选,字符串类型,支持竖屏
            "portrait-secondary"               //可选,字符串类型,支持反向竖屏
        ],
        /* 模块配置 */
        "modules" : {
            "Camera" : {},
@@ -153,18 +157,7 @@
        "enable" : false
    },
    "vueVersion" : "2",
    "orientation" : [
        //竖屏正方向
        "portrait-primary",
        //竖屏反方向
        "portrait-secondary",
        //横屏正方向
        "landscape-primary",
        //横屏反方向
        "landscape-secondary",
        //自然方向
        "default"
    ],
    "locale" : "zh-Hans",
    "fallbackLocale" : "zh-Hans"
}
pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport.vue
New file
@@ -0,0 +1,630 @@
<template>
    <view>
        <view class="page-header">
            <view class="search-item">
                <view class="left">日期间隔</view>
                <view class="right">
                    <picker mode="selector" :value="curDateGap" :range="dateRangePicker"
                        @change="onDateRangePickerChangeHandler">
                        <input disabled v-model="curDateGap" placeholder="请选择日期间隔" />
                        <view class="picker-overlay"></view>
                    </picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">开始日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="startDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">
                            <text>{{ startDate }}</text>
                        </view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">结束日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="endDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">{{ endDate }}</view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="button-groups">
                <button type="default" size="mini" class="btn-c" @tap.stop="onSearchClickHandler">查询</button>
                <button type="default" size="mini" class="btn-a" @tap.stop="onResetClickHandler">重置</button>
            </view>
        </view>
        <!-- 页签区域 -->
        <view class="tab-container">
            <view class="tab-list">
                <view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { 'active': activeTab === index }]"
                    @tap="switchTab(index)">
                    <text>{{ tab.label }}</text>
                    <text v-if="tab.count > 0" class="tab-count">{{ tab.count }}</text>
                </view>
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <!-- 页签内容区域 -->
        <scroll-view v-for="(tab, tabIndex) in tabs" :key="tabIndex" v-show="activeTab === tabIndex" id="pageContent"
            scroll-y class="page-content" :style="{height: pageContentHeight + 'px'}">
            <view class="list" v-for="(item,index) in tab.listData" :key="index">
                <uni-card :title="item.设备代码" :extra="item.设备保养计划单号" style="margin: 10px;"
                    @tap="showDetail = showDetail==item.hmainid?-1:item.hmainid">
                    <view class="card-detail">
                        <view class="detail" v-if="item.设备名称">
                            <text>设备名称:</text>{{item.设备名称}}
                        </view>
                        <view class="detail" v-if="item.设备规格">
                            <text>设备规格:</text>{{item.设备规格}}
                        </view>
                        <view class="detail" v-if="item.设备型号">
                            <text>设备型号:</text>{{item.设备型号}}
                        </view>
                        <view class="detail" v-if="item.生产资源">
                            <text>生产资源:</text>{{item.对应生产资源}}
                        </view>
                        <view class="detail" v-if="item.保养周期">
                            <text>保养周期:</text>{{item.保养周期}}
                        </view>
                        <view class="detail" v-if="item.摘要">
                            <text>摘要:</text>{{item.摘要}}
                        </view>
                        <view class="detail" v-if="item.保养负责人">
                            <text>保养负责人:</text>{{item.保养负责人}}
                        </view>
                        <view class="detail" v-if="item.是否保养">
                            <text>是否保养:</text>{{item.是否保养}}
                        </view>
                        <view class="detail" v-if="item.计划开始时间点">
                            <text>计划开始时间点:</text>{{item.计划开始时间点.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.计划结束时间点">
                            <text>计划结束时间点:</text>{{item.计划结束时间点.substr(0,10)}}
                        </view>
                    </view>
                    <view class="card-detail" v-if="showDetail == item.hmainid">
                        <view class="detail" v-if="item.制单人">
                            <text>制单人:</text>{{item.制单人}}
                        </view>
                        <view class="detail" v-if="item.制单日期">
                            <text>制单日期:</text>{{item.制单日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.审核人">
                            <text>审核人:</text>{{item.审核人}}
                        </view>
                        <view class="detail" v-if="item.审核日期">
                            <text>审核日期:</text>{{item.审核日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.修改人">
                            <text>修改人:</text>{{item.修改人}}
                        </view>
                        <view class="detail" v-if="item.修改日期">
                            <text>修改日期:</text>{{item.修改日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.关闭人">
                            <text>关闭人:</text>{{item.关闭人}}
                        </view>
                        <view class="detail" v-if="item.关闭日期">
                            <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.作废人">
                            <text>作废人:</text>{{item.作废人}}
                        </view>
                        <view class="detail" v-if="item.作废日期">
                            <text>作废日期:</text>{{item.作废日期.substr(0,10)}}
                        </view>
                    </view>
                    <view class="more" v-if="showDetail == item.hmainid && operations != item.hmainid">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起
                        </view>
                        <view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="more" v-if="showDetail != item.hmainid && operations != item.hmainid">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息
                        </view>
                        <view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="op" v-if="operations == item.hmainid">
                        <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                    </view>
                </uni-card>
            </view>
            <view class="over" v-if="tabs[activeTab].listData.length == 0">暂无数据</view>
        </scroll-view>
        <!-- 分页器 -->
        <view class="page-footer">
            <uni-pagination id="pagination" title="标题文字" v-model="tabs[activeTab].pageMeta.curPage"
                :pageSize="tabs[activeTab].pageMeta.size" :total="tabs[activeTab].pageMeta.total"
                @change="onPageChangeHandler"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import dayjs from 'dayjs'
    import {
        CommonUtils
    } from '@/utils/common.js'
    import {
        getUserInfo
    } from '../../../utils/auth'
    export default {
        data() {
            return {
                // 计算卡片列表高度
                pagination_top: 0,
                pageContent_top: 0,
                // 当前激活的页签
                activeTab: 0,
                tabs: [{
                        label: '今日待保养',
                        type: 0,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    },
                    {
                        label: '今日已保养',
                        type: 1,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    },
                    {
                        label: '今日全部任务',
                        type: 2,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    }
                ],
                // 滚动控制
                scrollTop: 0,
                old: {
                    scrollTop: 0
                },
                dateRangePicker: ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"],
                curDateGap: "今天",
                enableCustomDateRange: false,
                startDate: dayjs(new Date()).format('YYYY-MM-DD'),
                endDate: dayjs(new Date()).format('YYYY-MM-DD'),
                HBillNo: '',
                showDetail: -1,
                operations: -1,
            }
        },
        computed: {
            pageContentHeight: {
                get() {
                    return (this.pagination_top - this.pageContent_top)
                }
            },
        },
        onLoad() {
            this.onSearchClickHandler()
        },
        onPullDownRefresh() {
            this.onSearchClickHandler()
        },
        async onReady() {
            // #ifndef MP-WEIXIN
            let query = uni.createSelectorQuery().in(this)
            query.select("#pagination")
                .boundingClientRect((data) => {
                    if (data) {
                        this.pagination_top = data.top
                    } else {
                        console.log("未找到#pagination节点");
                    }
                })
                .exec();
            query.select("#pageContent")
                .boundingClientRect((data) => {
                    if (data) {
                        this.pageContent_top = data.top
                    } else {
                        console.log("未找到#pageContent节点");
                    }
                })
                .exec();
            // #endif
        },
        methods: {
            goTop: function(e) {
                // 解决view层不同步的问题
                this.scrollTop = this.old.scrollTop
                this.$nextTick(function() {
                    this.scrollTop = 0
                });
            },
            // 切换页签
            switchTab(index) {
                this.activeTab = index
                this.showDetail = -1
                this.operations = -1
            },
            onDateRangePickerChangeHandler({
                detail
            }) {
                this.enableCustomDateRange = false
                this.curDateGap = this.dateRangePicker[detail.value]
                let date = new Date()
                switch (this.curDateGap) {
                    case "今天":
                        this.startDate = dayjs(date).format("YYYY-MM-DD")
                        break;
                    case "近一天":
                        this.startDate = dayjs(date).subtract(1, 'day').format("YYYY-MM-DD")
                        break;
                    case "近两天":
                        this.startDate = dayjs(date).subtract(2, 'day').format("YYYY-MM-DD")
                        break;
                    case "近三天":
                        this.startDate = dayjs(date).subtract(3, 'day').format("YYYY-MM-DD")
                        break;
                    case "近四天":
                        this.startDate = dayjs(date).subtract(4, 'day').format("YYYY-MM-DD")
                        break;
                    case "近五天":
                        this.startDate = dayjs(date).subtract(5, 'day').format("YYYY-MM-DD")
                        break;
                    case "近六天":
                        this.startDate = dayjs(date).subtract(6, 'day').format("YYYY-MM-DD")
                        break;
                    case "近七天":
                        this.startDate = dayjs(date).subtract(7, 'day').format("YYYY-MM-DD")
                        break;
                    case "近30天":
                        this.startDate = dayjs(date).subtract(30, 'day').format("YYYY-MM-DD")
                        break;
                }
                if (this.curDateGap == '任意间隔') {
                    this.enableCustomDateRange = true
                }
            },
            onSearchClickHandler() {
                let sWhere = ""
                // 获取当前激活的页签
                const currentTab = this.tabs[this.activeTab]
                sWhere = {
                    HBeginDate: this.startDate,
                    HEndDate: this.endDate
                }
                this.get_DisplayPage(JSON.stringify(sWhere), currentTab.type)
            },
            clear() {
                this.curDateGap = "今天"
                this.enableCustomDateRange = false
                this.startDate = dayjs(new Date()).format('YYYY-MM-DD')
                this.endDate = dayjs(new Date()).format('YYYY-MM-DD')
                this.HBillNo = ''
            },
            async onResetClickHandler() {
                this.clear()
                await this.$nextTick()
                this.onSearchClickHandler()
            },
            get_DisplayPage(sWhere, tabType) {
                CommonUtils.doRequest2({
                    url: '/Sb_EquipMaintainTaskReport/MaintainList_APP',
                    data: {
                        "sWhere": sWhere,
                        "user": getUserInfo()["Czymc"],
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            Message,
                            count
                        } = res.data
                        console.log('res.data: ', res.data)
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP) {
                            // 更新待签到页签
                            this.tabs[0].listData = data.h_p_Sb_EquipMaintainTaskReport_APP
                            this.tabs[0].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP.length
                            this.tabs[0].count = data.h_p_Sb_EquipMaintainTaskReport_APP.length
                        }
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP1) {
                            // 更新待处理页签
                            this.tabs[1].listData = data.h_p_Sb_EquipMaintainTaskReport_APP1
                            this.tabs[1].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
                            this.tabs[1].count = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
                        }
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP2) {
                            // 更新待验收页签
                            this.tabs[2].listData = data.h_p_Sb_EquipMaintainTaskReport_APP2
                            this.tabs[2].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
                            this.tabs[2].count = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
                        }
                        uni.stopPullDownRefresh()
                    }
                })
            },
            onPageChangeHandler() {
                this.onSearchClickHandler()
                this.goTop()
            },
        },
    }
</script>
<style lang="scss">
    .page-header {
        display: flex;
        box-sizing: border-box;
        padding: 20rpx;
        flex-direction: column;
        gap: 10rpx;
        font-size: 32rpx;
        .search-item {
            display: flex;
            flex-direction: row;
            gap: 10rpx;
            justify-content: center;
            align-items: center;
            .left {
                width: 4em;
            }
            .right {
                flex: 1;
                position: relative;
                border-radius: 22rpx;
                border: 1px solid #acacac;
                display: flex;
                padding: 4rpx 10rpx;
                picker {
                    width: 100%;
                }
            }
        }
        input {
            width: inherit;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
        .datetime-picker-inner {
            padding: 8rpx 20rpx;
            font-size: 30rpx;
            display: flex;
            align-items: center;
        }
        .font__enable {
            color: #000;
        }
        .font__disable {
            color: #cccccc;
        }
    }
    .button-groups {
        box-sizing: border-box;
        padding: 10rpx 0 0 0;
        display: flex;
        flex-direction: row;
        gap: 10rpx;
        justify-content: space-between;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            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;
        }
    }
    /* 页签样式 */
    .tab-container {
        background-color: #fff;
    }
    .tab-list {
        display: flex;
        flex-direction: row;
        border-bottom: 1px solid #e5e5e5;
    }
    .tab-item {
        flex: 1;
        padding: 20rpx 0;
        text-align: center;
        font-size: 28rpx;
        color: #666;
        position: relative;
        &.active {
            color: #3a78ff;
            font-weight: bold;
            &::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 80rpx;
                height: 4rpx;
                background-color: #3a78ff;
            }
        }
        .tab-count {
            display: inline-block;
            margin-left: 10rpx;
            padding: 0 12rpx;
            background-color: #ff6b6b;
            color: #fff;
            border-radius: 20rpx;
            font-size: 20rpx;
            min-width: 30rpx;
            text-align: center;
        }
    }
    .page-content {
        box-sizing: border-box;
        padding: 10rpx 0;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail {
                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;
            }
        }
        .op {
            display: flex;
            justify-content: space-around;
            margin-top: 20rpx;
            button {
                padding: 0;
                width: 150rpx;
                font-size: 25rpx;
                &:disabled {
                    opacity: 0.5;
                }
            }
            .op1 {
                border: 1px solid #41a863;
                color: #41a863;
            }
            .op2 {
                border: 1px solid #d98d00;
                color: #d98d00;
            }
            .op3 {
                border: 1px solid #3a78ff;
                color: #3a78ff;
            }
            .op4 {
                border: 1px solid #da0000;
                color: #da0000;
            }
            .op5 {
                border: 1px solid #888;
                color: #888;
            }
        }
    }
    .over {
        text-align: center;
        padding: 40rpx;
        color: #999;
        font-size: 28rpx;
    }
    .page-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 32rpx 40rpx;
    }
</style>
pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport.vue
New file
@@ -0,0 +1,627 @@
<template>
    <view>
        <view class="page-header">
            <view class="search-item">
                <view class="left">日期间隔</view>
                <view class="right">
                    <picker mode="selector" :value="curDateGap" :range="dateRangePicker"
                        @change="onDateRangePickerChangeHandler">
                        <input disabled v-model="curDateGap" placeholder="请选择日期间隔" />
                        <view class="picker-overlay"></view>
                    </picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">开始日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="startDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">
                            <text>{{ startDate }}</text>
                        </view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">结束日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="endDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">{{ endDate }}</view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="button-groups">
                <button type="default" size="mini" class="btn-c" @tap.stop="onSearchClickHandler">查询</button>
                <button type="default" size="mini" class="btn-a" @tap.stop="onResetClickHandler">重置</button>
            </view>
        </view>
        <!-- 页签区域 -->
        <view class="tab-container">
            <view class="tab-list">
                <view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { 'active': activeTab === index }]"
                    @tap="switchTab(index)">
                    <text>{{ tab.label }}</text>
                    <text v-if="tab.count > 0" class="tab-count">{{ tab.count }}</text>
                </view>
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <!-- 页签内容区域 -->
        <scroll-view v-for="(tab, tabIndex) in tabs" :key="tabIndex" v-show="activeTab === tabIndex" id="pageContent"
            scroll-y class="page-content" :style="{height: pageContentHeight + 'px'}">
            <view class="list" v-for="(item,index) in tab.listData" :key="index">
                <uni-card :title="item.器具号" :extra="item.器具保养计划单号" style="margin: 10px;"
                    @tap="showDetail = showDetail==item.hmainid?-1:item.hmainid">
                    <view class="card-detail">
                        <view class="detail" v-if="item.器具名称">
                            <text>器具名称:</text>{{item.器具名称}}
                        </view>
                        <view class="detail" v-if="item.器具规格">
                            <text>器具规格:</text>{{item.器具规格}}
                        </view>
                        <view class="detail" v-if="item.器具型号">
                            <text>器具型号:</text>{{item.器具型号}}
                        </view>
                        <view class="detail" v-if="item.保养周期">
                            <text>保养周期:</text>{{item.保养周期}}
                        </view>
                        <view class="detail" v-if="item.摘要">
                            <text>摘要:</text>{{item.摘要}}
                        </view>
                        <view class="detail" v-if="item.保养负责人">
                            <text>保养负责人:</text>{{item.保养负责人}}
                        </view>
                        <view class="detail" v-if="item.是否保养">
                            <text>是否保养:</text>{{item.是否保养}}
                        </view>
                        <view class="detail" v-if="item.计划开始时间点">
                            <text>计划开始时间点:</text>{{item.计划开始时间点.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.计划结束时间点">
                            <text>计划结束时间点:</text>{{item.计划结束时间点.substr(0,10)}}
                        </view>
                    </view>
                    <view class="card-detail" v-if="showDetail == item.hmainid">
                        <view class="detail" v-if="item.制单人">
                            <text>制单人:</text>{{item.制单人}}
                        </view>
                        <view class="detail" v-if="item.制单日期">
                            <text>制单日期:</text>{{item.制单日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.审核人">
                            <text>审核人:</text>{{item.审核人}}
                        </view>
                        <view class="detail" v-if="item.审核日期">
                            <text>审核日期:</text>{{item.审核日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.修改人">
                            <text>修改人:</text>{{item.修改人}}
                        </view>
                        <view class="detail" v-if="item.修改日期">
                            <text>修改日期:</text>{{item.修改日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.关闭人">
                            <text>关闭人:</text>{{item.关闭人}}
                        </view>
                        <view class="detail" v-if="item.关闭日期">
                            <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item.作废人">
                            <text>作废人:</text>{{item.作废人}}
                        </view>
                        <view class="detail" v-if="item.作废日期">
                            <text>作废日期:</text>{{item.作废日期.substr(0,10)}}
                        </view>
                    </view>
                    <view class="more" v-if="showDetail == item.hmainid && operations != item.hmainid">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起
                        </view>
                        <view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="more" v-if="showDetail != item.hmainid && operations != item.hmainid">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息
                        </view>
                        <view class="part" @tap.stop="operations = operations==item.hmainid?-1:item.hmainid">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="op" v-if="operations == item.hmainid">
                        <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                    </view>
                </uni-card>
            </view>
            <view class="over" v-if="tabs[activeTab].listData.length == 0">暂无数据</view>
        </scroll-view>
        <!-- 分页器 -->
        <view class="page-footer">
            <uni-pagination id="pagination" title="标题文字" v-model="tabs[activeTab].pageMeta.curPage"
                :pageSize="tabs[activeTab].pageMeta.size" :total="tabs[activeTab].pageMeta.total"
                @change="onPageChangeHandler"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import dayjs from 'dayjs'
    import {
        CommonUtils
    } from '@/utils/common.js'
    import {
        getUserInfo
    } from '../../../utils/auth'
    export default {
        data() {
            return {
                // 计算卡片列表高度
                pagination_top: 0,
                pageContent_top: 0,
                // 当前激活的页签
                activeTab: 0,
                tabs: [{
                        label: '今日待保养',
                        type: 0,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    },
                    {
                        label: '今日已保养',
                        type: 1,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    },
                    {
                        label: '今日全部任务',
                        type: 2,
                        count: 0,
                        listData: [], // 添加这个
                        pageMeta: { // 添加这个
                            curPage: 1,
                            size: 50,
                            total: 0,
                        }
                    }
                ],
                // 滚动控制
                scrollTop: 0,
                old: {
                    scrollTop: 0
                },
                dateRangePicker: ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"],
                curDateGap: "今天",
                enableCustomDateRange: false,
                startDate: dayjs(new Date()).format('YYYY-MM-DD'),
                endDate: dayjs(new Date()).format('YYYY-MM-DD'),
                HBillNo: '',
                showDetail: -1,
                operations: -1,
            }
        },
        computed: {
            pageContentHeight: {
                get() {
                    return (this.pagination_top - this.pageContent_top)
                }
            },
        },
        onLoad() {
            this.onSearchClickHandler()
        },
        onPullDownRefresh() {
            this.onSearchClickHandler()
        },
        async onReady() {
            // #ifndef MP-WEIXIN
            let query = uni.createSelectorQuery().in(this)
            query.select("#pagination")
                .boundingClientRect((data) => {
                    if (data) {
                        this.pagination_top = data.top
                    } else {
                        console.log("未找到#pagination节点");
                    }
                })
                .exec();
            query.select("#pageContent")
                .boundingClientRect((data) => {
                    if (data) {
                        this.pageContent_top = data.top
                    } else {
                        console.log("未找到#pageContent节点");
                    }
                })
                .exec();
            // #endif
        },
        methods: {
            goTop: function(e) {
                // 解决view层不同步的问题
                this.scrollTop = this.old.scrollTop
                this.$nextTick(function() {
                    this.scrollTop = 0
                });
            },
            // 切换页签
            switchTab(index) {
                this.activeTab = index
                this.showDetail = -1
                this.operations = -1
            },
            onDateRangePickerChangeHandler({
                detail
            }) {
                this.enableCustomDateRange = false
                this.curDateGap = this.dateRangePicker[detail.value]
                let date = new Date()
                switch (this.curDateGap) {
                    case "今天":
                        this.startDate = dayjs(date).format("YYYY-MM-DD")
                        break;
                    case "近一天":
                        this.startDate = dayjs(date).subtract(1, 'day').format("YYYY-MM-DD")
                        break;
                    case "近两天":
                        this.startDate = dayjs(date).subtract(2, 'day').format("YYYY-MM-DD")
                        break;
                    case "近三天":
                        this.startDate = dayjs(date).subtract(3, 'day').format("YYYY-MM-DD")
                        break;
                    case "近四天":
                        this.startDate = dayjs(date).subtract(4, 'day').format("YYYY-MM-DD")
                        break;
                    case "近五天":
                        this.startDate = dayjs(date).subtract(5, 'day').format("YYYY-MM-DD")
                        break;
                    case "近六天":
                        this.startDate = dayjs(date).subtract(6, 'day').format("YYYY-MM-DD")
                        break;
                    case "近七天":
                        this.startDate = dayjs(date).subtract(7, 'day').format("YYYY-MM-DD")
                        break;
                    case "近30天":
                        this.startDate = dayjs(date).subtract(30, 'day').format("YYYY-MM-DD")
                        break;
                }
                if (this.curDateGap == '任意间隔') {
                    this.enableCustomDateRange = true
                }
            },
            onSearchClickHandler() {
                let sWhere = ""
                // 获取当前激活的页签
                const currentTab = this.tabs[this.activeTab]
                sWhere = {
                    HBeginDate: this.startDate,
                    HEndDate: this.endDate
                }
                this.get_DisplayPage(JSON.stringify(sWhere), currentTab.type)
            },
            clear() {
                this.curDateGap = "今天"
                this.enableCustomDateRange = false
                this.startDate = dayjs(new Date()).format('YYYY-MM-DD')
                this.endDate = dayjs(new Date()).format('YYYY-MM-DD')
                this.HBillNo = ''
            },
            async onResetClickHandler() {
                this.clear()
                await this.$nextTick()
                this.onSearchClickHandler()
            },
            get_DisplayPage(sWhere, tabType) {
                CommonUtils.doRequest2({
                    url: '/Sb_EquipMaintainTaskReport/MaintainList_APP',
                    data: {
                        "sWhere": sWhere,
                        "user": getUserInfo()["Czymc"],
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            Message,
                            count
                        } = res.data
                        console.log('res.data: ', res.data)
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP) {
                            // 更新待签到页签
                            this.tabs[0].listData = data.h_p_Sb_EquipMaintainTaskReport_APP
                            this.tabs[0].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP.length
                            this.tabs[0].count = data.h_p_Sb_EquipMaintainTaskReport_APP.length
                        }
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP1) {
                            // 更新待处理页签
                            this.tabs[1].listData = data.h_p_Sb_EquipMaintainTaskReport_APP1
                            this.tabs[1].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
                            this.tabs[1].count = data.h_p_Sb_EquipMaintainTaskReport_APP1.length
                        }
                        if (data && data.h_p_Sb_EquipMaintainTaskReport_APP2) {
                            // 更新待验收页签
                            this.tabs[2].listData = data.h_p_Sb_EquipMaintainTaskReport_APP2
                            this.tabs[2].pageMeta.total = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
                            this.tabs[2].count = data.h_p_Sb_EquipMaintainTaskReport_APP2.length
                        }
                        uni.stopPullDownRefresh()
                    }
                })
            },
            onPageChangeHandler() {
                this.onSearchClickHandler()
                this.goTop()
            },
        },
    }
</script>
<style lang="scss">
    .page-header {
        display: flex;
        box-sizing: border-box;
        padding: 20rpx;
        flex-direction: column;
        gap: 10rpx;
        font-size: 32rpx;
        .search-item {
            display: flex;
            flex-direction: row;
            gap: 10rpx;
            justify-content: center;
            align-items: center;
            .left {
                width: 4em;
            }
            .right {
                flex: 1;
                position: relative;
                border-radius: 22rpx;
                border: 1px solid #acacac;
                display: flex;
                padding: 4rpx 10rpx;
                picker {
                    width: 100%;
                }
            }
        }
        input {
            width: inherit;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
        .datetime-picker-inner {
            padding: 8rpx 20rpx;
            font-size: 30rpx;
            display: flex;
            align-items: center;
        }
        .font__enable {
            color: #000;
        }
        .font__disable {
            color: #cccccc;
        }
    }
    .button-groups {
        box-sizing: border-box;
        padding: 10rpx 0 0 0;
        display: flex;
        flex-direction: row;
        gap: 10rpx;
        justify-content: space-between;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            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;
        }
    }
    /* 页签样式 */
    .tab-container {
        background-color: #fff;
    }
    .tab-list {
        display: flex;
        flex-direction: row;
        border-bottom: 1px solid #e5e5e5;
    }
    .tab-item {
        flex: 1;
        padding: 20rpx 0;
        text-align: center;
        font-size: 28rpx;
        color: #666;
        position: relative;
        &.active {
            color: #3a78ff;
            font-weight: bold;
            &::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 80rpx;
                height: 4rpx;
                background-color: #3a78ff;
            }
        }
        .tab-count {
            display: inline-block;
            margin-left: 10rpx;
            padding: 0 12rpx;
            background-color: #ff6b6b;
            color: #fff;
            border-radius: 20rpx;
            font-size: 20rpx;
            min-width: 30rpx;
            text-align: center;
        }
    }
    .page-content {
        box-sizing: border-box;
        padding: 10rpx 0;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail {
                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;
            }
        }
        .op {
            display: flex;
            justify-content: space-around;
            margin-top: 20rpx;
            button {
                padding: 0;
                width: 150rpx;
                font-size: 25rpx;
                &:disabled {
                    opacity: 0.5;
                }
            }
            .op1 {
                border: 1px solid #41a863;
                color: #41a863;
            }
            .op2 {
                border: 1px solid #d98d00;
                color: #d98d00;
            }
            .op3 {
                border: 1px solid #3a78ff;
                color: #3a78ff;
            }
            .op4 {
                border: 1px solid #da0000;
                color: #da0000;
            }
            .op5 {
                border: 1px solid #888;
                color: #888;
            }
        }
    }
    .over {
        text-align: center;
        padding: 40rpx;
        color: #999;
        font-size: 28rpx;
    }
    .page-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 32rpx 40rpx;
    }
</style>
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -7,6 +7,7 @@
                <view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">基本信息</view>
                <view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">扫描信息</view>
                <view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">制单信息</view>
                <view :class="mainTabSelected == 4 ? 'selected' : ''" @tap="mainTabSelected = 4">其他信息</view>
            </view>
            <!-- 主表内容 -->
            <view class="bill-main-contents">
@@ -92,19 +93,7 @@
                            <input type="number" v-model="hform.HCheckQty" :disabled="hasCheckQty" />
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">生产班组</view>
                        <view class="right-select">
                            <zxz-uni-data-select
                                v-model="hform.HGroupID"
                                dataKey="班组名称"
                                dataValue="HItemID"
                                :filterable="true"
                                :localdata="HGroupList"
                                :clear="false"
                            ></zxz-uni-data-select>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">检验员</view>
                        <view class="right-select">
@@ -127,19 +116,7 @@
                        
                    </view>
                    
                    <view class="form-item">
                        <view class="left">生产资源</view>
                        <view class="right-select">
                            <zxz-uni-data-select
                                v-model="hform.HSourceID"
                                dataKey="生产资源名称"
                                dataValue="HItemID"
                                :filterable="true"
                                :localdata="HSourceList"
                                :clear="false"
                            ></zxz-uni-data-select>
                        </view>
                    </view>
                    
                    <view class="form-item">
                        <view class="left">备注</view>
@@ -225,6 +202,35 @@
                        <view class="left">作废日期</view>
                        <view class="right disabled">
                            <input type="text" :value="hform.HDeleteDate" disabled />
                        </view>
                    </view>
                </view>
                <!-- 其他信息 -->
                <view class="bill-main-content" v-if="mainTabSelected == 4">
                    <view class="form-item">
                        <view class="left">生产班组</view>
                        <view class="right-select">
                            <zxz-uni-data-select
                                v-model="hform.HGroupID"
                                dataKey="班组名称"
                                dataValue="HItemID"
                                :filterable="true"
                                :localdata="HGroupList"
                                :clear="false"
                            ></zxz-uni-data-select>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="left">生产资源</view>
                        <view class="right-select">
                            <zxz-uni-data-select
                                v-model="hform.HSourceID"
                                dataKey="生产资源名称"
                                dataValue="HItemID"
                                :filterable="true"
                                :localdata="HSourceList"
                                :clear="false"
                            ></zxz-uni-data-select>
                        </view>
                    </view>
                </view>
@@ -466,7 +472,13 @@
                });
            },
            async getGy_BadReasonList() {
                let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(审核人,'')  != '' order by 不良原因代码`
                let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(审核人,'')  != '' `
                if (this.serverUrl == 'http://122.228.39.234:7177/API/') {
                    //海诚根据物料分组设置不良原因
                    sWhere += " and 不良类型 like '%成品%' order by 不良原因代码"
                }else{
                    sWhere += " order by 不良原因代码"
                }
                let res = await CommonUtils.doRequest2Async({
                    url: "/Gy_BadReason/list",
                    data: {
@@ -523,12 +535,19 @@
                    count
                } = res.data
                if (count == 1) {
                    if(data[0]['HBack']==1){
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: data[0]['HBackRemark']
                        })
                        return;
                    }
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['产品名称']
                    this.hform.HMaterNumber = data[0]['产品代码']
                    //源单信息
                    this.hform.HMainSourceBillNo = data[0]['HBillNo']
                    this.hform.HSourceBillNo = data[0]['HBillNo']
                    this.hform.HMainSourceBillNo = data[0]['单据号']
                    this.hform.HSourceBillNo = data[0]['单据号']
                    this.hform.HMainSourceInterID = data[0].HInterID
                    this.hform.HMainSourceEntryID = data[0].HEntryID
                    this.hform.HSourceBillQty = data[0].流转卡数量
@@ -583,6 +602,14 @@
                        count
                    } = res.data
                    if (count == 1) {
                        //如果源单数量超出提示
                        if(data[0]['HBack']==1){
                            CommonUtils.showTips({
                                title: '温馨提示',
                                message: data[0]['HBackRemark']
                            })
                            return;
                        }
                        console.log('获取源单:', data)
                        this.hform.HMaterID = data[0]['HMaterID']
                        this.hform.HMaterName = data[0]['产品名称']
@@ -709,7 +736,7 @@
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_Employee/list",
                        data: {
                            sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''and 审核人 !='' order by 部门代码`,
                            sWhere: ` and 禁用标记 = '' order by 部门代码`,
                            user: getUserInfo()["Czymc"],
                            Organization: uni.getStorageSync("Organization"),
                        },
@@ -744,7 +771,7 @@
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_Source/list",
                        data: {
                            sWhere: `and 禁用标记 != 'Y' and ISNULL(审核人,'')  != '' and 组织 = '${uni.getStorageSync("Organization")}'`,
                            sWhere: `and 禁用标记 != 'Y' and 组织 = '${uni.getStorageSync("Organization")}'`,
                            user: getUserInfo()["Czymc"],
                        },
                    });
@@ -776,7 +803,7 @@
                    let res = await CommonUtils.doRequest2Async({
                        url: "/Gy_Group/list",
                        data: {
                            sWhere: `and 禁用标记 != 'Y' and ISNULL(审核人,'')  != '' and 组织 = '${uni.getStorageSync("Organization")}'`,
                            sWhere: `and 禁用标记 != 'Y' and 组织 = '${uni.getStorageSync("Organization")}'`,
                            user: getUserInfo()["Czymc"],
                        },
                    });
@@ -862,6 +889,9 @@
                        ,HMakeDate:this.hform.HMakeDate
                        ,HReportType:1
                        ,HSourceBillType:this.hform.HSourceBillType
                        ,HSourceBillNo:this.hform.HSourceBillNo
                        ,HSourceInterID:this.hform.HMainSourceInterID
                        ,HSourceEntryID:this.hform.HMainSourceEntryID
                        ,HBadReasonHQty:1
                        ,HQty:this.hform.HCheckQty
                    }
@@ -1014,164 +1044,7 @@
            goBack() {
                uni.navigateBack();
            },
            async RoadBillMain() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/QC_ProcessCheckBill/QC_ProcessCheckBill_Edit",
                        data: {
                            sWhere: ` and hmainid=${this.hform.HInterID}`,
                            user: getUserInfo()["Czymc"],
                        },
                    });
                    let {
                        data,
                        count,
                        Message
                    } = res.data;
                    if (count == 1) {
                        console.log("RoadBillMain: : ", data);
                        Object.assign(this.hform, {
                            HInterID: data[0].hmainid,
                            HBillNo: data[0].单据号,
                            HDate: dayjs(data[0].日期).format("YYYY-MM-DD"),
                            HSourceID: data[0].HSourceID,
                            HSourceName: data[0].生产资源名称,
                            HICMOBillNo: data[0].任务单号,
                            HICMOQty: data[0].任务单数量,
                            HICMOInterID: data[0].HICMOInterID,
                            HICMOEntryID: data[0].HICMOEntryID || 1,
                            HMaterID: data[0].HMaterID,
                            HMaterName: data[0].物料名称,
                            HMaterNumber: data[0].物料代码,
                            HProcID: data[0].HProcID,
                            HProcName: data[0].HProcName,
                            HProcExchQty: data[0].HProcExchQty || 0,
                            HProcExchBillNo: data[0].HProcExchBillNo,
                            HProcExchInterID: data[0].HProcExchInterID,
                            HProcExchEntryID: data[0].HProcExchEntryID || 0,
                            HFirstCheckEmp: data[0].HFirstCheckEmp,
                            HFirstCheckEmpName: data[0].质检员名称,
                            HQCSchemeID: data[0].检验方案ID,
                            HQCSchemeName: data[0].检验方案名称,
                            HRemark: data[0].表头备注,
                            HMaker: data[0].制单人,
                            HMakeDate: data[0].制单日期,
                            HChecker: data[0].审核人,
                            HCheckDate: data[0].审核日期,
                            HCloseMan: data[0].关闭人,
                            HCloseDate: data[0].关闭日期,
                            HUpDateDate: data[0].修改日期,
                            HDeleteDate: data[0].作废日期,
                            HSampleSchemeID: data[0].HSampleSchemeID,
                            HSampleSchemeName: data[0].抽样方案名称,
                            HSampleQty: data[0].样本量,
                            HSampleQty2: data[0].样本量,
                            HSampleDamageQty: data[0].样本破坏数,
                            HSamplingType: data[0].抽样类型,
                            HAcceptQty: data[0].允许数,
                            HInspectionLevel: data[0].检验水平,
                            HRejectQty: data[0].拒绝数,
                            HStrictness: data[0].严格度,
                            HSampleUnRightQty: data[0].样本不合格数 || 0,
                            HSampleUnRightQty2: data[0].样本不合格数,
                            HAQL: data[0].AQL,
                            HUnitID: data[0].HUnitID,
                            HUnit: data[0].单位,
                            HInspectValB: data[0].检测值基础资料,
                            HInspectVal: data[0].检测值,
                            HTargetValB: data[0].目标值基础资料,
                            HTargetVal: data[0].目标值,
                            HUpLimit: data[0].上限值,
                            HDownLimit: data[0].下限值,
                            HUpOffSet: data[0].上偏差,
                            HDownOffSet: data[0].下偏差,
                            HEntryID: data[0].hsubid,
                            HQCCheckItemName: data[0].检验项目名称,
                            HQCCheckItemID: data[0].HQCCheckItemID,
                            HShiftsID: data[0].HShiftsID,
                            HShiftsName: data[0].班次名称,
                            HErrTreatment: data[0].异常临时处理方案,
                            HBatchNo: data[0].批号,
                            HCheckerResult: data[0].判定结论 == "合格" ? true : false,
                            HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
                            HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
                            HAnalysisMethod: function() {
                                if (data[0].HAnalysisMethod == 1) {
                                    return '定性检验'
                                } else if (data[0].HAnalysisMethod == 2) {
                                    return '定量检验'
                                } else {
                                    return '其他检验'
                                }
                            }(),
                        });
                        for (let i = 0; i < data.length; i++) {
                            this.addCheckItem({
                                HQCCheckItemID: data[i].HQCCheckItemID,
                                HQCCheckItemNumber: data[i].检验项目代码,
                                HQCCheckItemName: data[i].检验项目名称,
                                HInspectInstruMentID: data[i].HInspectInstruMentID,
                                HInspectInstruMentNumber: data[i].检验仪器代码,
                                HInspectInstruMentName: data[i].检验仪器名称,
                                HQCStd: data[i].检验标准,
                                HUnit: data[i].单位名称,
                                HQCNote: data[i].检验记录,
                                HResult: data[i].结论 == "合格" ? 1 : 0,
                                HMax: data[i].最大值,
                                HMin: data[i].最小值,
                                HAvg: data[i].平均值,
                                HRemark: data[i].表体备注,
                                HAnalysisMethod: data[i].分析方法 == "定性分析" ?
                                    1 : data[i].分析方法 == "定量分析" ?
                                    2 : 3,
                                HKeyInspect: data[i].重点检查 == "否" ? false : true,
                                HSampleSchemeID: data[i].HSampleSchemeID,
                                HUnitID: data[i].HUnitID,
                                HInspectVal: data[i].检测值,
                                HTargetVal: data[i].目标值,
                                HUpLimit: data[i].上限值,
                                HDownLimit: data[i].下限值,
                                HUpOffSet: data[i].上偏差,
                                HDownOffSet: data[i].下偏差,
                                HSampleDamageQty: data[i].样本破坏数,
                                HSampleSchemeName: data[i].抽样方案名称,
                                HSampleQty: data[i].样本量,
                                HSampleDamageQty: data[i].样本破坏数,
                                HAcceptQty: data[i].允许数,
                                HInspectionLevel: 0,
                                HRejectQty: data[i].拒绝数,
                                HStrictness: 0,
                                HSampleUnRightQty: data[i].样本不合格数,
                                HAQL: data[i].AQL,
                                HSamplingType: 0,
                                HSamplingType: data[i].抽样类型,
                                HStrictness: data[i].严格度,
                                HInspectResultToSee: data[i].检验结果
                            });
                        }
                        this.hasSourceBill = true
                    } else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `加载单据失败: ${Message}`,
                        });
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `加载单据失败: ${err}`,
                    });
                }
            },
        },
        async onLoad(e) {
            this.operationType = e.operationType || 1;
@@ -1180,9 +1053,7 @@
                await this.getMaxBillNo();
            } else if (this.operationType == 2) {
            } else if (this.operationType == 3) {
                await this.RoadBillMain();
            }
            }
            this.getGy_BadReasonList();
            await this.InitHSource();
            await this.InitHEmp();
pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
@@ -68,7 +68,8 @@
                </view>
                <view class="op" v-if="operations == index">
                    <button class="op3" size="mini" plain @tap.stop="audit(item, 0)">审核</button>
                    <button class="op3" size="mini" plain @tap.stop="Reject(item)">驳回</button>
                    <button class="op3" size="mini" plain @tap.stop="audit(item, 1)">反审核</button>
                    <!-- <button class="op3" size="mini" plain @tap.stop="Reject(item)">驳回</button> -->
                    <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                </view>
            </uni-card>
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -780,6 +780,13 @@
                        count
                    } = res.data
                    if (count == 1) {
                        if(data[0]['HBack']==1){
                            CommonUtils.showTips({
                                title: '温馨提示',
                                message: data[0]['HBackRemark']
                            })
                            return;
                        }
                        console.log('获取源单:', data)
                        this.hform.HMaterID = data[0]['HMaterID']
                        this.hform.HMaterName = data[0]['HMaterName']
@@ -881,6 +888,13 @@
                    count
                } = res.data
                if (count == 1) {
                    if(data[0]['HBack']==1){
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: data[0]['HBackRemark']
                        })
                        return;
                    }
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['HMaterName']
                    this.hform.HMaterNumber = data[0]['HMaterNumber']
pages/ZLGL/mojianjianyan/ProcessCheckBill.vue
File was renamed from pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
@@ -708,6 +708,13 @@
                    count
                } = res.data
                if (count == 1) {
                    if(data[0]['HBack']==1){
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: data[0]['HBackRemark']
                        })
                        return;
                    }
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['产品名称']
                    this.hform.HMaterNumber = data[0]['产品代码']
@@ -762,6 +769,13 @@
                    } = res.data
                    if (count == 1) {
                        console.log('获取源单:', data)
                        if(data[0]['HBack']==1){
                            CommonUtils.showTips({
                                title: '温馨提示',
                                message: data[0]['HBackRemark']
                            })
                            return;
                        }
                        this.hform.HMaterID = data[0]['HMaterID']
                        this.hform.HMaterName = data[0]['产品名称']
                        this.hform.HMaterNumber = data[0]['产品代码']
@@ -1933,7 +1947,7 @@
                                if (res.confirm) {
                                    console.log("用户点击确定");
                                    uni.redirectTo({
                                        url: "/pages/ZLGL/mojianjianyan/form?operationType=1",
                                        url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
                                    });
                                } else if (res.cancel) {
                                    console.log("用户点击取消");
@@ -1958,7 +1972,7 @@
            },
            addNew() {
                uni.redirectTo({
                    url: "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList?operationType=1",
                    url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
                });
            },
            goBack() {
pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue
File was renamed from pages/ZLGL/mojianjianyan/lastPieceCheckBillList.vue
@@ -193,7 +193,7 @@
            },
            cmdAdd() {
                uni.redirectTo({
                    url: "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1"
                    url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1"
                })
            },
            async cmdSearch() {
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
@@ -175,13 +175,13 @@
                            <input type="text" v-model="hform.HErrTreatment" value="" />
                        </view>
                    </view>
                    <view class="form-item" v-if="false">
                    <view class="form-item" >
                        <view class="left">任务单数量</view>
                        <view class="right">
                            <input type="number" v-model="hform.HICMOQty" />
                        </view>
                    </view>
                    <view class="form-item" v-if="false">
                    <view class="form-item">
                        <view class="left">流转卡数量</view>
                        <view class="right">
                            <input type="number" v-model="hform.HProcExchQty" />
@@ -794,6 +794,13 @@
                        count
                    } = res.data
                    if (count == 1) {
                        if(data[0]['HBack']==1){
                            CommonUtils.showTips({
                                title: '温馨提示',
                                message: data[0]['HBackRemark']
                            })
                            return;
                        }
                        this.hform.HMaterID = data[0]['HMaterID']
                        this.hform.HMaterName = data[0]['产品名称']
                        this.hform.HMaterNumber = data[0]['产品代码']
@@ -807,6 +814,7 @@
                        this.hform.HProcName = data[0]['当前工序']
                        this.hform.HSourceBillQty = data[0].HSourceBillQty
                        this.hasSourceBill = true
                        this.hform.HProcExchQty = data[0]['流转卡数量']
                        this.get_CheckItem();
                        this.$refs['billList'].exit()
                    } else {
@@ -816,14 +824,7 @@
                        })
                    }
                    if (
                        (uni.getStorageSync("OrganizationID") == "7667152" &&
                            uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
                        (uni.getStorageSync("OrganizationID") == "100199" &&
                            uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司")
                    ) {
                        await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
@@ -894,7 +895,13 @@
                } = res.data
                if (count == 1) {
                    console.log('data: ', data);
                    if(data[0]['HBack']==1){
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: data[0]['HBackRemark']
                        })
                        return;
                    }
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['产品名称']
                    this.hform.HMaterNumber = data[0]['产品代码']
@@ -907,6 +914,7 @@
                    this.hform.HProcID = data[0]['HProcID']
                    this.hform.HProcName = data[0]['当前工序']
                    this.hform.HSourceBillQty = data[0].HSourceBillQty
                    this.hform.HProcExchQty = data[0]['流转卡数量']
                    this.hasSourceBill = true
                    this.get_CheckItem();
                } else {
pages/baogong/AddLineBind.vue
New file
@@ -0,0 +1,435 @@
<template>
    <view>
        <view class="form" :style="{height: containerHeight + 'px',overflow: 'auto'}">
            <view class="form-item">
                <view class="title">生产资源:</view>
                <view class="right">
                    <uni-combox
                        :candidates="arrayHSourceName"
                        placeholder="请选择生产资源"
                        v-model="hform.HSourceName"
                        @input="HSourceNameChange">
                    </uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">负责人:</view>
                <view class="right">
                    <uni-combox
                        :candidates="arrayHManagerName"
                        placeholder="请选择负责人"
                        v-model="hform.HManagerName"
                        @input="HManagerNameChange">
                    </uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">班组:</view>
                <view class="right">
                    <uni-combox
                        :candidates="arrayHGroupName"
                        placeholder="请选择班组"
                        v-model="hform.HGroupName"
                        @input="HGroupNameChange">
                    </uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">创建日期:</view>
                <view class="righton">
                    <input disabled v-model="hform.HCreateDate" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">备注:</view>
                <view class="right">
                    <textarea v-model="hform.HRemark" placeholder="请输入备注" auto-height />
                </view>
            </view>
        </view>
        <!-- 操作按钮 -->
        <view class="buttons" id="buttons">
            <button class="btn-c" size="mini" @tap="save">保存</button>
            <view style="flex: 1;"></view>
            <button class="btn-a" size="mini" @tap="goBack">返回</button>
        </view>
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import { CommonUtils } from "@/utils/common";
    import { getUserInfo } from "@/utils/auth";
    export default {
        name: 'AddLineBind',
        data() {
            return {
                // 移除btnTop,改用固定底部布局
                // 数据列表
                HSourceNameList: [],
                HManagerNameList: [],
                HGroupNameList: [],
                // 用于uni-combox的数组
                arrayHSourceName: [],
                arrayHManagerName: [],
                arrayHGroupName: [],
                hform: {
                    HUserName: getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'),
                    HSourceID: getUserInfo()['HSourceID'],
                    HSourceName: getUserInfo()['HSource'],
                    HManagerID: getUserInfo()['HKeeperID'],
                    HManagerName: getUserInfo()['HKeeper'],
                    HGroupID: getUserInfo()['HGroupID'],
                    HGroupName: getUserInfo()['HGroup'],
                    HCreateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                    HRemark: ''
                },
                // 服务器地址
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                // 添加窗口高度
                windowHeight: 0
            };
        },
        onUnload() {
          // 页面关闭时触发刷新
          uni.$emit('refreshDeviceList');
        },
        methods: {
            // 获取所有列表数据
            async getListData() {
                // 获取生产资源列表
                await this.getSourceList();
                // 获取负责人列表(人员列表)
                await this.getManagerList();
                // 获取班组列表
                await this.getGroupList();
            },
            // 获取生产资源列表
            async getSourceList() {
                try {
                    const res = await uni.request({
                        url: this.serverUrl + '/api/newBill/getSourceList',
                        data: {
                            sWhere: ""
                        }
                    });
                    if (res[1].data.code == 1) {
                        this.HSourceNameList = res[1].data.data.Gy_Source || [];
                        for (let i = 0; i < this.HSourceNameList.length; i++) {
                            this.arrayHSourceName[i] = this.HSourceNameList[i].生产资源;
                        }
                        this.$forceUpdate();
                    } else {
                        uni.showToast({
                            title: '获取生产资源列表失败',
                            icon: 'none'
                        });
                    }
                } catch (error) {
                    console.log(error);
                    uni.showToast({
                        title: '获取生产资源列表失败',
                        icon: 'none'
                    });
                }
            },
            // 获取负责人列表(人员列表)
            async getManagerList() {
                try {
                    const res = await uni.request({
                        url: this.serverUrl + '/Web/GetEmployeeList_Json',
                        data: {
                            Employee: '',
                            HGroupID: 0
                        }
                    });
                    if (res[1].data.count == 1) {
                        this.HManagerNameList = res[1].data.data || [];
                        for (let i = 0; i < this.HManagerNameList.length; i++) {
                            this.arrayHManagerName[i] = this.HManagerNameList[i].HName;
                        }
                        this.$forceUpdate();
                    } else {
                        uni.showToast({
                            title: '获取负责人列表失败',
                            icon: 'none'
                        });
                    }
                } catch (error) {
                    console.log(error);
                    uni.showToast({
                        title: '获取负责人列表失败',
                        icon: 'none'
                    });
                }
            },
            // 获取班组列表
            async getGroupList() {
                try {
                    const res = await uni.request({
                        url: this.serverUrl + '/Gy_Group/list',
                        method: 'GET',
                        data: {
                            sWhere: "",
                            user: uni.getStorageSync('HUserName')
                        }
                    });
                    if (res[1].data.count == 1) {
                        this.HGroupNameList = res[1].data.data || [];
                        for (let i = 0; i < this.HGroupNameList.length; i++) {
                            this.arrayHGroupName[i] = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName;
                        }
                        this.$forceUpdate();
                    } else {
                        uni.showToast({
                            title: '获取班组列表失败',
                            icon: 'none'
                        });
                    }
                } catch (error) {
                    console.log(error);
                    uni.showToast({
                        title: '获取班组列表失败',
                        icon: 'none'
                    });
                }
            },
            // 选择生产资源
            HSourceNameChange(e) {
                for (let i = 0; i < this.HSourceNameList.length; i++) {
                    if (this.HSourceNameList[i].生产资源 == e) {
                        this.hform.HSourceName = this.HSourceNameList[i].生产资源;
                        this.hform.HSourceID = this.HSourceNameList[i].HItemID;
                        this.hform.HSourceCode = this.HSourceNameList[i].资源代码 || '';
                        break;
                    }
                }
            },
            // 选择负责人
            HManagerNameChange(e) {
                for (let i = 0; i < this.HManagerNameList.length; i++) {
                    if (this.HManagerNameList[i].HName == e) {
                        this.hform.HManagerName = this.HManagerNameList[i].HName;
                        this.hform.HManagerID = this.HManagerNameList[i].HItemID;
                        break;
                    }
                }
            },
            // 选择班组
            HGroupNameChange(e) {
                for (let i = 0; i < this.HGroupNameList.length; i++) {
                    const groupName = this.HGroupNameList[i].班组名称 || this.HGroupNameList[i].HName;
                    if (groupName == e) {
                        this.hform.HGroupName = groupName;
                        this.hform.HGroupID = this.HGroupNameList[i].HItemID;
                        break;
                    }
                }
            },
            // 验证表单
            validateForm() {
                if (!this.hform.HSourceID || this.hform.HSourceID == 0) {
                    uni.showToast({
                        title: '请选择生产资源',
                        icon: 'none'
                    });
                    return false;
                }
                if (!this.hform.HManagerID || this.hform.HManagerID == 0) {
                    uni.showToast({
                        title: '请选择负责人',
                        icon: 'none'
                    });
                    return false;
                }
                return true;
            },
            // 保存数据
            async save() {
                if (!this.validateForm()) {
                    return;
                }
                uni.showLoading({
                    title: '保存中...'
                });
                try {
                    const res = await CommonUtils.doRequest2Sync({
                        url: "/ReportPlatForm/SaveGetLineBindBillList",
                        data: {
                            HUserName: this.hform.HUserName,
                            HSourceID: this.hform.HSourceID,
                            HSourceName: this.hform.HSourceName,
                            HManagerID: this.hform.HManagerID,
                            HManagerName: this.hform.HManagerName,
                            HGroupID: this.hform.HGroupID,
                            HGroupName: this.hform.HGroupName,
                            HCreateDate: this.hform.HCreateDate,
                            HRemark: this.hform.HRemark
                        },
                        method: "GET"
                    });
                    uni.hideLoading();
                    if (res.data.count == 1) {
                        uni.showToast({
                            title: '保存成功',
                            icon: 'success',
                            success: () => {
                                setTimeout(() => {
                                    // 保存成功后返回上一页
                                    uni.navigateBack();
                                }, 1500);
                            }
                        });
                    } else {
                        uni.showToast({
                            title: res.data.Message || '保存失败',
                            icon: 'none'
                        });
                    }
                } catch (err) {
                    uni.hideLoading();
                    uni.showToast({
                        title: '保存失败: ' + err,
                        icon: 'none'
                    });
                }
            },
            // 返回上一页
            goBack() {
                uni.navigateBack();
            }
        },
        onLoad() {
            // 初始化数据
            this.hform.HUserName = getUserInfo()['Czymc'] || uni.getStorageSync('HUserName');
            // 获取所有列表数据
            this.getListData();
            // 获取窗口高度
            const systemInfo = uni.getSystemInfoSync();
            this.windowHeight = systemInfo.windowHeight;
        },
        onReady() {
            // 移除原来的按钮位置计算,使用固定底部布局
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        padding: 20rpx;
        // 添加底部内边距,为底部按钮留出空间
        padding-bottom: 160rpx; // 按钮高度 + 额外间距
    }
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        margin-bottom: 20rpx;
        .title {
            width: 180rpx;
            flex-shrink: 0;
        }
        .right {
            flex: 1;
            border-radius: 22rpx;
            border: 1px solid #acacac;
            padding: 0 20rpx;
            min-height: 70rpx;
            display: flex;
            align-items: center;
            input, textarea {
                width: 100%;
                font-size: 30rpx;
            }
            textarea {
                padding: 20rpx 0;
                min-height: 100rpx;
            }
        }
        .righton {
            flex: 1;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
            padding: 0 20rpx;
            min-height: 70rpx;
            display: flex;
            align-items: center;
            input {
                width: 100%;
                font-size: 30rpx;
                color: #666;
            }
        }
    }
    .buttons {
        position: fixed; // 改为固定定位
        bottom: 0; // 固定在底部
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        padding: 20rpx;
        background-color: #fff;
        border-top: 1px solid #eee;
        box-sizing: border-box; // 确保内边距不影响宽度
        z-index: 999; // 确保按钮在最上层
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
</style>
pages/baogong/DayPlanBillList.vue
@@ -23,7 +23,7 @@
                    </view>
                    <view class="detail" style="width: 100%;display: flex;align-items: center;">
                        <text>生产进度:</text>
                        <zui-progress-bar :value="item.percent" :width="220" type="follow-left"/>
                        <zui-progress-bar :value="item.percent" :width="210" type="follow-left"/>
                    </view>
                </view>
            </uni-card>
@@ -52,6 +52,37 @@
                listData:[],
                chooseIt:'',
                popList:['人员原因', '设备原因', '材料原因', '工艺原因', '模具原因', '测试原因', '环境原因'],
                // 定义操作映射配置
                actionConfig: {
                    '开工': {
                        apiUrl: '/Sc_MESBeginWorkBill/FastBeginWorkBill',
                        type: '开工',
                        handler: 'handleBegin',
                        checkStatus: true, // 需要检查状态
                        denyMsg: '单据状态不满足开工条件!' // 固定错误提示
                    },
                    '完工': {
                        apiUrl: '/Sc_MESEndWorkBill/FastEndWorkBill',
                        type: '完工',
                        handler: 'handleEnd',
                        checkStatus: true,
                        denyMsg: '单据状态不满足完工条件!' // 固定错误提示
                    },
                    '停工': {
                        apiUrl: '/Sc_MESStopWorkBill/FastStopWorkBill',
                        type: '停工',
                        handler: 'handleStop',
                        checkStatus: true,
                        denyMsg: '单据状态不满足停工条件!' // 固定错误提示
                    },
                    '异常反馈': {
                        apiUrl: '',
                        type: '异常反馈',
                        handler: 'handleAbnormal',
                        checkStatus: true,
                        denyMsg: '单据状态不满足异常反馈条件!' // 固定错误提示
                    }
                }
            }
        },
        onLoad(e) {
@@ -62,8 +93,6 @@
            this.HSourceName=e.HSourceName
            this.HSourceID=e.HSourceID
            this.getList(e.HSourceID)
        },
        onShow() {
        },
        onPullDownRefresh: function() {
            this.getList(this.HSourceID)
@@ -112,7 +141,7 @@
                console.log(item,this.chooseIt)
                this.$refs.popup.close()
                uni.navigateTo({
                    url:'./abnormal?HICMOBillNo=' + this.chooseIt.HICMOBillNo
                    url:'./OA_ErrMsgBackBill?HICMOBillNo=' + this.chooseIt.HICMOBillNo
                         +'&HSourceName=' + this.HSourceName
                         +'&HSourceBillNo=' + this.chooseIt.HSourceBillNo
                         +'&HType=' + item
@@ -121,9 +150,100 @@
            },
            edit(item){
                console.log(item)
                var lists =  ['开工', '汇报', '完工', '停工', '异常反馈']
                this.chooseIt = item
                var upData = {
                // 使用对象映射配置生成可用的操作列表
                const availableActions = Object.keys(this.actionConfig)
                uni.showActionSheet({
                    itemList: availableActions,
                    success: (res)=> {
                        const actionKey = availableActions[res.tapIndex]
                        const actionConfig = this.actionConfig[actionKey]
                        // 调用对应的处理方法
                        this[actionConfig.handler](item, actionConfig)
                    },
                    fail: function (res) {
                        console.log(res.errMsg);
                    }
                });
            },
            // 开工处理
            handleBegin(item, config) {
                const upData = this.createUpData(item)
                this.checkAndExecuteWorkStatus(
                    item,
                    config,
                    config.apiUrl,
                    upData
                )
            },
            // 完工处理
            handleEnd(item, config) {
                const upData = this.createUpData(item)
                this.checkAndExecuteWorkStatus(
                    item,
                    config,
                    config.apiUrl,
                    upData
                )
            },
            // 停工处理
            handleStop(item, config) {
                const upData = this.createUpData(item)
                this.checkAndExecuteWorkStatus(
                    item,
                    config,
                    config.apiUrl,
                    upData
                )
            },
            // 异常反馈处理
            handleAbnormal(item, config) {
                const sWhere = {
                    "HSourceID": this.HSourceID,
                    "HICMOBillNo": item.HICMOBillNo,
                    "HInterID": item.HSourceInterID,
                    "type": config.type
                }
                uni.request({
                    url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus',
                    type: "GET",
                    data: { "sWhere": JSON.stringify(sWhere) },
                    dataType: "json",
                    async: false,
                    success: (res) => {
                        console.log('异常反馈状态检查:', res.data)
                        // 根据第二个页面的逻辑:如果count>0,表示不允许操作
                        if (res.data.count > 0) {
                            // 不允许操作,显示错误提示
                            const status = item.HICMOStatus || '未知状态'
                            uni.showToast({
                                title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,${config.denyMsg}`,
                                icon:'none',
                                duration: 3000
                            })
                        }
                        else {
                            // count<=0,表示允许操作
                            this.$refs.popup.open('center')
                        }
                    },
                    fail: (res) => {
                        console.log(res)
                        uni.hideLoading()
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                })
            },
            // 创建通用的请求数据
            createUpData(item) {
                return {
                    HBillType: item.HBillType,
                    HSourceInterID: item.HSourceInterID, 
                    HSourceEntryID: item.HSourceEntryID, 
@@ -131,162 +251,136 @@
                    HSourceBillType: item.HSourceBillType, 
                    user: uni.getStorageSync('HUserName')
                }
                uni.showActionSheet({
                    itemList: lists,
                    success: (res)=> {
                        // console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
                        if(res.tapIndex == 0){
                            var urls = '/Sc_MESBeginWorkBill/FastBeginWorkBill'
                            this.WorkStaus(this.HSourceID, item.HICMOBillNo, item.HSourceInterID, lists[res.tapIndex],item.HMaterName,urls,upData)
                        }else if(res.tapIndex == 1){
                            var sWhere = { "HSourceID": this.HSourceID, "HICMOBillNo": item.HICMOBillNo, "HInterID": item.HSourceInterID,"type": "汇报"}
                            uni.request({
                                url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus',
                                type: "GET",
                                data: { "sWhere": JSON.stringify(sWhere) },
                                dataType: "json",//数据类型可以为 text xml json  script  jsonp
                                async: false,
                                success: (res) => {
                                    console.log(1,res.data);
                                    if (res.data.count > 0) {
                                        uni.navigateTo({
                                            url:'./form?HBillType=' + item.HBillType
                                             +'&HSourceInterID=' + item.HSourceInterID
                                             +'&HSourceEntryID=' + item.HSourceEntryID
                                             +'&HSourceBillNo=' + item.HSourceBillNo
                                             +'&HSourceBillType=' + item.HSourceBillType
                                        })
                                    }
                                    else {
                                        uni.showToast({
                                            title:res.data.Message,
                                            icon:'none'
                                        })
                                    }
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.hideLoading()
                                    uni.showToast({
                                        title:'接口请求失败',
                                        icon:'none'
                                    })
                                },
                            });
                        }else if(res.tapIndex == 2){
                            var urls = '/Sc_MESEndWorkBill/FastEndWorkBill'
                            this.WorkStaus(this.HSourceID, item.HICMOBillNo, item.HSourceInterID, lists[res.tapIndex],item.HMaterName,urls,upData)
                        }else if(res.tapIndex == 3){
                            var urls = '/Sc_MESStopWorkBill/FastStopWorkBill'
                            this.WorkStaus(this.HSourceID, item.HICMOBillNo, item.HSourceInterID, lists[res.tapIndex],item.HMaterName,urls,upData)
                        }else if(res.tapIndex == 4){
                            var sWhere = { "HSourceID": this.HSourceID, "HICMOBillNo": item.HICMOBillNo, "HInterID": item.HSourceInterID,"type": "异常反馈"}
                            uni.request({
                                url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus',
                                type: "GET",
                                data: { "sWhere": JSON.stringify(sWhere) },
                                dataType: "json",//数据类型可以为 text xml json  script  jsonp
                                async: false,
                                success: (res) => {
                                    console.log(1,res.data);
                                    if (res.data.count > 0) {
                                        this.$refs.popup.open('center')
                                    }
                                    else {
                                        uni.showToast({
                                            title:res.data.Message,
                                            icon:'none'
                                        })
                                    }
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.hideLoading()
                                    uni.showToast({
                                        title:'接口请求失败',
                                        icon:'none'
                                    })
                                },
                            });
                        }
                    },
                    fail: function (res) {
                        console.log(res.errMsg);
                    }
                });
            },
            upWork(urls,upData){
                uni.showLoading({
                    title:'请稍后...'
                })
                console.log(upData)
                uni.request({
                    url: this.serverUrl + urls,
                    data:upData,
                    success: (res) => {
                        console.log(1,res);
                        if(res.data.count == 1){
                            this.getList(this.HSourceID)
                        }else{
                            uni.hideLoading()
                        }
                        uni.showToast({
                            title:res.data.Message,
                            icon:'none'
                        })
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.hideLoading()
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            WorkStaus(HSourceID1, workcode, HSourceInterID, btn,HMaterName, urls ,upData,) {
                var sWhere = ""
                sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID,"type": btn}
                console.log(JSON.stringify(sWhere))
            // 通用的检查和执行方法
            checkAndExecuteWorkStatus(item, config, apiUrl, upData) {
                const sWhere = {
                    "HSourceID": this.HSourceID,
                    "HICMOBillNo": item.HICMOBillNo,
                    "HInterID": item.HSourceInterID,
                    "type": config.type
                }
                console.log('状态检查参数:', JSON.stringify(sWhere))
                uni.request({
                    url: this.serverUrl + '/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus',
                    type: "GET",
                    data: { "sWhere": JSON.stringify(sWhere) },
                    dataType: "json",//数据类型可以为 text xml json  script  jsonp
                    dataType: "json",
                    async: false,
                    success: (res) => {
                        console.log(1,res.data);
                        console.log('状态检查结果:', res.data)
                        // 根据第二个页面的逻辑:如果data.count>0,表示不允许操作
                        if (res.data.count > 0) {
                            uni.showModal({
                                title: btn + '确认',
                                content: '设备编号:' + this.HSourceName + '; 工单号:' + workcode +  '; 产品名称:' + HMaterName ,
                                success: (res) => {
                                    if (res.confirm) {
                                        console.log('用户点击确定');
                                        this.upWork(urls,upData)
                                    } else if (res.cancel) {
                                        console.log('用户点击取消');
                                    }
                                }
                            });
                            // 不允许操作,显示错误提示
                            const status = item.HICMOStatus || '未知状态'
                            const operationMap = {
                                '开工': '开工',
                                '完工': '完工',
                                '停工': '停工',
                                '异常反馈': '异常反馈'
                            }
                            const operationName = operationMap[config.type] || config.type
                            // 根据操作类型给出不同的建议
                            let suggestion = ''
                            switch(config.type) {
                                case '开工':
                                    suggestion = '开工操作需要工单状态为"待生产"或"挂起"状态,请检查当前状态是否符合要求'
                                    break
                                case '完工':
                                    suggestion = '完工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求'
                                    break
                                case '停工':
                                    suggestion = '停工操作需要工单处于"生产中"状态,请检查当前状态是否符合要求'
                                    break
                                case '异常反馈':
                                    suggestion = '异常反馈需要工单处于"生产中"或"开工"状态,请检查当前状态是否符合要求'
                                    break
                                default:
                                    suggestion = '请检查工单状态是否符合操作要求'
                            }
                            uni.showToast({
                                title: `工单【${item.HICMOBillNo}】当前状态为【${status}】,无法进行【${operationName}】操作。\n${suggestion}`,
                                icon:'none',
                                duration: 4000
                            })
                        }
                        else {
                            // data.count<=0,表示允许操作
                            this.showConfirmDialog(config.type, item, apiUrl, upData)
                        }
                    },
                    fail: (res) => {
                        console.log(res)
                        uni.hideLoading()
                        uni.showToast({
                            title:'状态检查接口请求失败',
                            icon:'none'
                        })
                    },
                })
            },
            // 显示确认对话框
            showConfirmDialog(actionType, item, apiUrl, upData) {
                // 获取当前工单状态显示在确认框中
                const status = item.HICMOStatus || '未知状态'
                uni.showModal({
                    title: actionType + '确认',
                    content: `设备:${this.HSourceName}\n工单:${item.HICMOBillNo}\n产品:${item.HMaterName}\n当前状态:${status}\n\n确定要执行【${actionType}】操作吗?`,
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定')
                            this.executeWork(apiUrl, upData, item, actionType)
                        } else if (res.cancel) {
                            console.log('用户点击取消')
                        }
                    }
                })
            },
            // 执行工作操作
            executeWork(apiUrl, upData, item, actionType) {
                uni.showLoading({
                    title:`正在${actionType}...`
                })
                console.log('执行操作参数:', upData)
                uni.request({
                    url: this.serverUrl + apiUrl,
                    data: upData,
                    success: (res) => {
                        console.log('执行操作结果:', res)
                        if(res.data.count == 1){
                            // 操作成功后刷新列表
                            this.getList(this.HSourceID)
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                                title:`${actionType}成功!`,
                                icon:'success'
                            })
                        }else{
                            uni.hideLoading()
                            // 显示更详细的操作失败提示
                            let errorMsg = res.data.Message || `${actionType}失败`
                            uni.showToast({
                                title: `${actionType}失败:${errorMsg}`,
                                icon:'none',
                                duration: 3000
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        console.log(res)
                        uni.hideLoading()
                        uni.showToast({
                            title:'接口请求失败',
                            title:`${actionType}接口请求失败,请检查网络`,
                            icon:'none'
                        })
                    },
                });
                })
            },
            changeTab(e){
                this.number = e
@@ -354,4 +448,4 @@
        color: #444;
    }
}
</style>
</style>
pages/baogong/IpadIndex.vue
@@ -1,31 +1,25 @@
<template>
    <view class="content">
<!--         <view class="form">
            <view class="form-item">
                <view class="title">设备编号:</view>
                <view class="right">
                    <input v-model="hform.HNumber" placeholder="请输入设备编号" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">设备名称:</view>
                <view class="right">
                    <input v-model="hform.HName" placeholder="请输入设备名称" />
                </view>
            </view>
        </view> -->
        <!-- <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> -->
        <view class="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">全部</view>
            <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">运行</view>
            <view :class="tabs == 2 ? 'on':''" @tap="changeTab(2)">待机</view>
            <view :class="tabs == 3 ? 'on':''" @tap="changeTab(3)">停机</view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <!-- 只在全部页签显示添加生产资源卡片 -->
        <view class="list" v-if="tabs == 0">
            <uni-card style="margin: 10px;" @tap="addResource">
                <view class="card-main add-resource">
                    <view class="add-icon">+</view>
                    <view class="add-text">添加生产资源</view>
                </view>
            </uni-card>
        </view>
        <view class="list" v-for="(item,index) in showList" :key="index">
            <uni-card style="margin: 10px;" @tap="toList(item)">
                <view class="card-main">
@@ -49,65 +43,42 @@
                    </view>
                    <view class="op">
                        <view class="op5" v-if="item.HStatus == '空闲'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op3" v-if="item.HStatus == '开机'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op4" v-if="item.HStatus == '停机'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op1" v-if="item.HStatus == '生产'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op2" v-if="item.HStatus == '维修进行中'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op2" v-if="item.HStatus == '维修结束'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                        <view class="op2" v-if="item.HStatus == '维修终止'">
                            <uni-icons type="smallcircle-filled" size="14" color=""></uni-icons><text>{{item.HStatus}}</text>
                            <uni-icons type="smallcircle-filled" size="14"
                                color=""></uni-icons><text>{{item.HStatus}}</text>
                        </view>
                    </view>
                </view>
<!--                 <view class="card-detail" v-if="showDetail == index">
                    <view class="detail" v-if="moreData.HSourceBillNo">
                        <text>当前订单:</text>{{moreData.HSourceBillNo}}
                    <!-- 删除按钮 -->
                    <view class="delete-btn" @tap.stop="deleteResource(item.HSourceID, index)" v-if="item.HSourceID">
                        <uni-icons type="closeempty" size="20" color="#da0000"></uni-icons>
                    </view>
                    <view class="detail" v-if="moreData.HMaterName">
                        <text>物料名称:</text>{{moreData.HMaterName}}
                    </view>
                </view> -->
<!--                 <view class="more" v-if="showDetail == index && operations != index">
                    <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showMore(item,index)">
                        <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起
                    </view>
                    <view class="part" @tap.stop="operations = operations==index?-1:index">
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作
                    </view>
                </view>
                <view class="more" v-if="showDetail != index && operations != index">
                    <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showMore(item,index)">
                        <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息
                    </view>
                    <view class="part" @tap.stop="operations = operations==index?-1:index">
                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>操作
                    </view>
                </view> -->
                <view class="op" v-if="operations == index">
                    <button class="op1" size="mini" plain @tap.stop="check(item)">开工</button>
<!--                     <button class="op1" size="mini" plain @tap.stop="check(item)">完工</button>
                    <button class="op2" size="mini" plain @tap.stop="antiCheck(item)">停工</button> -->
                    <button class="op3" size="mini" plain @tap.stop="edit(item)">汇报</button>
                    <button class="op4" size="mini" plain @tap.stop="del(item)">异常申请</button>
                    <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                </view>
            </uni-card>
        </view>
        <view class="over" v-if="listData.length == 0">暂无数据</view>
        <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view>
        <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view>
@@ -115,102 +86,99 @@
</template>
<script>
    import { getUserInfo } from "@/utils/auth.js";
    import {
        getUserInfo
    } from "@/utils/auth.js";
    export default {
        data() {
            return {
                userInfo:getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
                tabs:0,
                status:'全部',
                hform:{
                    HNumber:'',
                    HName:'',
                },
                sWhere:'',
                listData:[],
                moreData:[],
                showList:[],
                showDetail:-1,
                operations:-1,
                page:1,
            }
        },
        data() {
            return {
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                tabs: 0,
                status: '全部',
                sWhere: '',
                listData: [],
                showList: [],
                showDetail: -1,
                operations: -1,
                page: 1,
            }
        },
        onLoad() {
            this.getList()
            // console.log(this.userInfo,uni.getStorageSync('HUserName'))
            // 监听刷新事件
            uni.$on('refreshDeviceList', () => {
                this.getList();
            });
            this.getList();
        },
        onUnload() {
            // 移除事件监听
            uni.$off('refreshDeviceList');
        },
        onReachBottom: function() {
            this.page++
            setTimeout(() => {
                this.showList = this.showList.concat(this.getPage(this.page,this.listData))
                this.showList = this.showList.concat(this.getPage(this.page, this.listData))
            }, 100)
        },
        onPullDownRefresh: function() {
            this.clear()
            setTimeout(()=>{
            setTimeout(() => {
                uni.stopPullDownRefresh();
            }, 1000);
        },
        methods: {
            getPage(page,list){
        methods: {
            getPage(page, list) {
                let sindex = (parseInt(page) - 1) * 20
                let eindex = parseInt(page) * 20
                let newList = list.slice(sindex,eindex)
                let newList = list.slice(sindex, eindex)
                return newList
            },
            changeTab(e){
            changeTab(e) {
                this.tabs = e
                this.page = 1
                this.showList = []
                if(this.tabs == 0){
                if (this.tabs == 0) {
                    this.status = '全部'
                    this.getList()
                    // this.showList = this.getPage(this.page,this.listData)
                }
                if(this.tabs == 1){
                if (this.tabs == 1) {
                    this.status = '运行'
                    this.getList()
                    // this.showList = this.getPage(this.page,this.listData)
                }
                if(this.tabs == 2){
                if (this.tabs == 2) {
                    this.status = '待机'
                    this.getList()
                    // this.showList = this.getPage(this.page,this.listData)
                }
                if(this.tabs == 3){
                if (this.tabs == 3) {
                    this.status = '停机'
                    this.getList()
                    // this.showList = this.getPage(this.page,this.listData)
                }
            },
            getList(){
                // console.log(this.sWhere)
                uni.showLoading({
                    title:'加载中...'
                })
            getList() {
                uni.request({
                    url: this.serverUrl + '/ReportPlatForm/SearchGetLineBindBillListStatus',
                    data:{
                        HStatus:this.status,
                    url: this.serverUrl + '/ReportPlatForm/SearchGetLineBindBillListStatus',
                    data: {
                        HStatus: this.status,
                        HUserName: uni.getStorageSync('HUserName')
                    },
                    success: (res) => {
                        console.log(1,res.data);
                        if(res.data.count == 1){
                    success: (res) => {
                        console.log(1, res.data);
                        if (res.data.count == 1) {
                            this.listData = res.data.data.h_p_JIT_GetSourceInfoByUser
                            console.log(this.listData.length)
                            this.showList = this.getPage(this.page,this.listData)
                            setTimeout(()=>{
                                 uni.hideLoading()
                            this.showList = this.getPage(this.page, this.listData)
                            setTimeout(() => {
                                uni.hideLoading()
                            }, 1000)
                        }else{
                        } else {
                            this.listData = []
                            uni.hideLoading()
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
@@ -218,285 +186,230 @@
                        console.log(res);
                        uni.hideLoading()
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //选择单据日期
            BenginHCreateDateChange(e){
                console.log(e.detail.value)
                this.hform.BenginHCreateDate = e.detail.value
            },
            //选择单据日期
            EndHCreateDateChange(e){
                console.log(e.detail.value)
                this.hform.EndHCreateDate = e.detail.value
            },
            //搜索
            search(){
                this.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                console.log(this.hform)
                if (this.hform.HNumber) {
                    this.sWhere += " and 设备代码 like '%" + this.hform.HNumber + "%'";
                }
                if (this.hform.HName) {
                    this.sWhere += " and 设备名称 like '%" + this.hform.HName + "%'";
                }
                this.getList()
            },
            //新增
            creat(){
                uni.navigateTo({
                    url:'/pages/shebeidangan/Gy_EquipFileMainBill'
                })
            },
            //重置
            clear(){
                this.listData = []
                this.page = 1
                this.showList = []
                this.sWhere = ''
                this.showDetail = -1,
                this.operations = -1,
                this.hform = {
                    HNumber:'',
                    HName:'',
                }
                this.getList()
            },
            //更多
            showMore(item,index){
                this.showDetail = this.showDetail==index?-1:index
                console.log(item)
                uni.request({
                    url: this.serverUrl + '/ReportPlatForm/SearchGetWorkBillList',
                    data:{
                        HSourceID: item.HSourceID
                    },
                    success: (res) => {
                        console.log(2,res.data.data);
                        if(res.data.count == 1){
                            this.moreData = res.data.data.h_p_JIT_GetWorkBillListInfoBySource1 //时间点产量
                            console.log(2,this.moreData);
                            this.$forceUpdate()
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.hideLoading()
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            //工单列表
            toList(item){
            toList(item) {
                uni.navigateTo({
                    url:'./list?HSourceID=' + item.HSourceID + '&HSourceName=' + item.HSourceName,
                    url: './DayPlanBillList?HSourceID=' + item.HSourceID + '&HSourceName=' + item.HSourceName,
                    success: () => {
                        // 设置页面返回时需要刷新的标志
                        this.needRefresh = true;
                    }
                })
            },
            //编辑
            edit(item){
                console.log(item)
            // 添加生产资源
            addResource() {
                uni.navigateTo({
                    url:'/pages/shebeidangan/Gy_EquipFileMainBill?hmainid=' + item.hmainid
                    url: './AddLineBind', // 你需要创建这个页面
                    success: () => {
                        // 设置页面返回时需要刷新的标志
                        this.needRefresh = true;
                    }
                })
            },
            //删除
            del(item){
                console.log(item)
            // 删除生产资源
            deleteResource(HSourceID, index) {
                uni.showModal({
                    title: '提示',
                    content: '确认要删除吗,删除后不能恢复',
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                    title: '删除确认',
                    content: '确认要删除吗,删除后不能恢复',
                    success: (res) => {
                        if (res.confirm) {
                            uni.showLoading({
                                title: '删除中...'
                            })
                            uni.request({
                                url: this.serverUrl + '/Gy_EquipFileMain/Delete_EquipFile',
                                data:{
                                    HItemID: item.hmainid,
                                url: this.serverUrl + '/ReportPlatForm/DeleteGetLineBindBillList',
                                method: 'GET',
                                data: {
                                    HSourceID: HSourceID,
                                    user: uni.getStorageSync('HUserName')
                                },
                                success: (res) => {
                                    console.log(1,res);
                                    if(res.data.count == 1){
                                        this.clear()
                                success: (res) => {
                                    uni.hideLoading()
                                    if (res.data.count > 0) {
                                        // 重置分页参数
                                        this.page = 1
                                        this.listData = []
                                        this.showList = []
                                        // 重新获取数据
                                        this.getList()
                                    } else {
                                        uni.showToast({
                                            title: res.data.Message || '删除失败',
                                            icon: 'none'
                                        })
                                    }
                                    uni.showToast({
                                        title:res.data.Message,
                                        icon:'none'
                                    })
                                },
                                fail: (res) => {
                                    console.log(res);
                                fail: () => {
                                    uni.hideLoading()
                                    uni.showToast({
                                        title:'接口请求失败',
                                        icon:'none'
                                        title: '删除失败',
                                        icon: 'none'
                                    })
                                },
                            });
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
                                }
                            })
                        }
                    }
                })
            },
            // //审核
            // check(item){
            //     console.log(item)
            //     if (item.HBillStatus > 0) {
            //         uni.showToast({
            //             title:'单据不为未审核状态!'
            //         })
            //     }
            // },
            // //反审核
            // antiCheck(item){
            // },
        }
        }
    }
</script>
<style lang="scss" scoped>
    .form{
    .form {
        width: 640rpx;
        margin: 20rpx auto;
    }
    .tabs{
    .tabs {
        width: 100%;
        display: flex;
        view{
        view {
            width: 25%;
            font-size: 30rpx;
            color: #555;
            text-align: center;
            padding: 16rpx 0;
        }
        .on{
        .on {
            color: #3a78ff;
            font-weight: bold;
            border-bottom: 3px solid #3a78ff;
        }
    }
    .form-item{
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title{
        .title {
            width: 180rpx;
            text{
            text {
                color: red;
                font-weight: bold;
            }
        }
        .right{
        .right {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton{
        .righton {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input{
        input {
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .buttons{
    .buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
        button{
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a{
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b{
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c{
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    .list{
    .list {
        width: 100%;
        .card-main{
        .card-main {
            display: flex;
            image{
            image {
                width: 160rpx;
                height: 160rpx;
                margin-right: 30rpx;
            }
            .right{
            .right {
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                text{
                text {
                    color: #999;
                }
            }
        }
        .card-detail{
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail{
            .detail {
                // width: 50%;
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                margin-right: 20rpx;
                text{
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
        }
        .more{
        .more {
            color: #888;
            font-size: 24rpx;
            display: flex;
            border-top: 1px solid #eee;
            padding-top: 20rpx;
            .part{
            .part {
                width: 50%;
                text-align: center;
            }
        }
        .op{
        .op {
            display: flex;
            // justify-content: space-around;
            // margin-top: 20rpx;
@@ -508,57 +421,108 @@
            position: absolute;
            right: 30rpx;
            bottom: 30rpx;
            text{
            text {
                margin-right: 10rpx;
                font-weight: bold;
                font-size: 28rpx;
            }
            button{
            button {
                padding: 0;
                width: 150rpx;
                font-size: 25rpx;
            }
            .op1{
            .op1 {
                // border: 1px solid #41a863;
                color: #41a863;
                background-color: rgba( #41a863, .15);
                background-color: rgba(#41a863, .15);
                padding: 2rpx 10rpx;
                border-radius: 4rpx;
                box-shadow: 2rpx 2rpx 6rpx 0 #acacac;
            }
            .op2{
            .op2 {
                // border: 1px solid #d98d00;
                color: #d98d00;
                background-color: rgba( #d98d00, .15);
                background-color: rgba(#d98d00, .15);
                padding: 2rpx 10rpx;
                border-radius: 4rpx;
                box-shadow: 2rpx 2rpx 6rpx 0 #acacac;
            }
            .op3{
            .op3 {
                // border: 1px solid #3a78ff;
                color: #3a78ff;
                background-color: rgba( #3a78ff, .15);
                background-color: rgba(#3a78ff, .15);
                padding: 2rpx 10rpx;
                border-radius: 4rpx;
                box-shadow: 2rpx 2rpx 6rpx 0 #acacac;
            }
            .op4{
            .op4 {
                // border: 1px solid #da0000;
                color: #da0000;
                background-color: rgba( #da0000, .15);
                background-color: rgba(#da0000, .15);
                padding: 2rpx 10rpx;
                border-radius: 4rpx;
                box-shadow: 2rpx 2rpx 6rpx 0 #acacac;
            }
            .op5{
            .op5 {
                // border: 1px solid #888;
                color: #888;
                background-color: rgba( #888, .15);
                background-color: rgba(#888, .15);
                padding: 2rpx 10rpx;
                border-radius: 4rpx;
                box-shadow: 2rpx 2rpx 6rpx 0 #acacac;
            }
        }
    }
</style>
        // 删除按钮样式
        .delete-btn {
            position: absolute;
            top: 10rpx;
            right: 10rpx;
            width: 50rpx;
            height: 50rpx;
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
            z-index: 10;
        }
        // 添加资源卡片样式 - 大小缩小一半
        .add-resource {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 120rpx;
            /* 从300rpx缩小到150rpx */
            border: 2rpx dashed #3a78ff;
            border-radius: 16rpx;
            background-color: #f8fafc;
            .add-icon {
                font-size: 50rpx;
                /* 从100rpx缩小到50rpx */
                color: #3a78ff;
                line-height: 1;
                margin-bottom: 10rpx;
                /* 从20rpx缩小到10rpx */
            }
            .add-text {
                font-size: 24rpx;
                /* 从32rpx缩小到24rpx */
                color: #3a78ff;
                text-align: center;
            }
        }
    }
</style>
pages/baogong/OA_ErrMsgBackBill.vue
New file
@@ -0,0 +1,1159 @@
<template>
    <view>
        <!-- 页签区域 -->
        <view class="tabs" id="tabs">
            <view class="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>
        </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 name="HBillNo" disabled v-model="hform.HBillNo" placeholder="请输入单据号" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据日期:</view>
                    <view class="righton">
                        <input name="HDate" disabled v-model="hform.HDate" placeholder="请选择" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">主题:</view>
                    <view class="right">
                        <input name="HContext" v-model="hform.HContext" placeholder="请输入主题" />
                    </view>
                </view>
                <view class="form-item" style="align-items: flex-start;">
                    <view class="title"><text>*</text>详细内容:</view>
                    <view class="right" style="min-height: 150rpx;">
                        <textarea name="HDescription" v-model="hform.HDescription" auto-height maxlength="-1"
                            placeholder="请输入详细内容"></textarea>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">异常类型:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHErrMsgBackTypeName" placeholder="请选择"
                            v-model="hform.HErrMsgBackTypeName" @input="HErrMsgBackTypeNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">发送部门:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName"
                            @input="HDeptNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">发送人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择发送人" v-model="hform.HSendMan"
                            @input="HSendManChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title"><text>*</text>接收人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择接收人" v-model="hform.HReceiveMan"
                            @input="HReceiveManChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">处理人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择处理人" v-model="hform.HHandleEmpName"
                            @input="HHandleEmpNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">责任人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择责任人" v-model="hform.HBadProcManName"
                            @input="HBadProcManNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">问题来源:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHForm" placeholder="请选择问题来源" v-model="hform.HForm"
                            @input="HFormChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">生产资源:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHSourceName" placeholder="请选择" v-model="hform.HSourceName"
                            @input="HSourceNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">车间:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHCenterName" placeholder="请选择" v-model="hform.HCenterName"
                            @input="HCenterNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">产品编码:</view>
                    <view class="right">
                        <input name="HMaterNumber" v-model="hform.HMaterNumber" placeholder="请输入产品编码" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">产品名称:</view>
                    <view class="right">
                        <input name="HMaterName" v-model="hform.HMaterName" placeholder="请输入产品名称" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">规格型号:</view>
                    <view class="right">
                        <input name="HMaterModel" v-model="hform.HMaterModel" placeholder="请输入规格型号" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">涉及数量:</view>
                    <view class="right">
                        <input name="HQty" type="number" v-model="hform.HQty" placeholder="请输入数量" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">生产班次:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHShiftsName" placeholder="请选择" v-model="hform.HShiftsName"
                            @input="HShiftsNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">影响面程度:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEffect" placeholder="请选择影响面程度" v-model="hform.HErrLev"
                            @input="HEffectChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">备注:</view>
                    <view class="right" style="min-height: 150rpx;">
                        <input name="HRemark" v-model="hform.HRemark" placeholder="" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 其他信息 -->
        <template v-if="tabs == 1">
            <view class="form">
                <view class="form-item">
                    <view class="title">接收部门:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HRecDeptName"
                            @input="HRecDeptChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">抄送人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择抄送人" v-model="hform.HCopyMan"
                            @input="HCopyManChange" multiple></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">QE责任人:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHEmpName" placeholder="请选择QE责任人" v-model="hform.HQEManName"
                            @input="HQEManNameChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">紧急程度:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHLevel" placeholder="请选择紧急程度" v-model="hform.HLevel"
                            @input="HLevelChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">发送类型:</view>
                    <view class="right">
                        <uni-combox :candidates="arrayHSendType" placeholder="请选择发送类型" v-model="hform.HSendType"
                            @input="HSendTypeChange"></uni-combox>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">催促次数:</view>
                    <view class="right">
                        <input name="HHasten" type="number" v-model="hform.HHasten" placeholder="请输入催促次数" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">变化点:</view>
                    <view class="right">
                        <input name="HChangeNote" v-model="hform.HChangeNote" placeholder="请输入变化点" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据类型:</view>
                    <view class="righton">
                        <input name="HBillTypeName" disabled v-model="hform.HBillTypeName" placeholder="请输入单据类型" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据号码:</view>
                    <view class="righton">
                        <input name="HPlanBillNo" disabled v-model="hform.HPlanBillNo" placeholder="请输入单据号码" />
                    </view>
                </view>
            </view>
        </template>
        <!-- 制单信息 -->
        <template v-if="tabs == 2">
            <view class="form">
                <view class="form-item">
                    <view class="title">制单人:</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">制单日期:</view>
                    <view class="righton">
                        <input name="HMakeDate" disabled v-model="hform.HMakeDate" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="righton">
                        <input name="HUpDateDate" disabled v-model="hform.HUpDateDate" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核日期:</view>
                    <view class="righton">
                        <input name="HCheckDate" disabled v-model="hform.HCheckDate" placeholder="" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废人:</view>
                    <view class="righton">
                        <input v-model="hform.HDeleteMan" disabled />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">作废日期:</view>
                    <view class="righton">
                        <input name="HDeleteDate" disabled v-model="hform.HDeleteDate" placeholder="" />
                    </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>
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import {
        CommonUtils
    } from "@/utils/common";
    import getDateTime from '@/utils/getdateTime.js';
    import {
        getUserInfo
    } from "../../utils/auth";
    import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
    export default {
        data() {
            return {
                tabs: 0,
                tabsBottom: 0,
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                OperationType: 1,
                refSav: "",
                arrayHLevel: ['普通', '紧急'],
                arrayHForm: ['人', '机', '料', '法', '环', '测'],
                arrayHEffect: ['停线', '批量不良', '偶发不良', '无法判断'],
                arrayHSendType: ['公共', '个人'],
                // 人员相关数组
                arrayHEmpName: [], // 接收人 发送人 处理人 责任人 抄送人 QE责任人
                HEmpNameList: [],
                // 其他数组
                arrayHDeptName: [], // 接收、发送部门
                HDeptNameList: [],
                arrayHErrMsgBackTypeName: [], // 异常反馈类型
                HErrMsgBackTypeNameList: [],
                arrayHSourceName: [], //生产资源
                HSourceNameList: [],
                arrayHCenterName: [], //工作中心
                HCenterNameList: [],
                arrayHShiftsName: [], //生产班次
                HShiftsNameList: [],
                isEdit: false,
                eData: {
                    HICMOBillNo: '',
                    HSourceName: '',
                    HSourceBillNo: '',
                    HType: '',
                    OperationType: '',
                    linterid: '',
                    HSouceBillType: '',
                },
                hform: {
                    HBillNo: '',
                    HInterID: '',
                    HDate: getDateTime.dateTimeStr('y-m-d h:i:s'),
                    HContext: '',
                    HDescription: '',
                    HRemark: '',
                    HErrMsgBackTypeName: '',
                    HErrMsgBackTypeID: '0',
                    HDeptName: getUserInfo().HDeptName,
                    HDeptID: getUserInfo().HDeptID,
                    HSendMan: getUserInfo().Czymc,
                    HReceiveMan: '',
                    HHandleEmpName: '',
                    HHandleEmpID: '0',
                    HCopyMan: '',
                    HBadProcManName: '',
                    HBadProcMan: '0',
                    HQEManName: '',
                    HQEMan: '0',
                    HRecDeptName: getUserInfo().HDeptName,
                    HRecDeptID: getUserInfo().HDeptID,
                    HLevel: '普通',
                    HBillTypeName: '',
                    HPlanBillNo: '',
                    HMaterNumber: '',
                    HMaterName: '',
                    HMaterModel: '',
                    // 新添加的字段
                    HHasten: 0, // 催促次数
                    HChangeNote: '', // 变化点
                    HShiftsName: '', // 生产班次
                    HShiftsID: '0', // 生产班次ID
                    HErrLev: '', // 影响面程度
                    HForm: '人', // 问题来源
                    HSendType: '公共', // 发送类型
                    HReTransmitMan: '', // 转发至
                    HSourceName: '', // 生产资源
                    HSourceID: '0', // 生产资源ID
                    HCenterName: getUserInfo().HWorkCenter, // 车间
                    HCenterID: getUserInfo().HWorkCenterID, // 车间ID
                    HQty: 0, // 数量
                    HDeleteMan: '', // 作废人
                    HDeleteDate: '', // 作废日期
                    HMainSourceBillNo: '',
                    HMainSourceInterID: '0',
                    HMainSourceEntryID: '0',
                    HMainSourceBillType: '',
                    HMaker: getUserInfo().Czymc,
                    HMakeDate: getDateTime.dateTimeStr('y-m-d h:i:s'),
                    HUpDater: '',
                    HUpDateDate: '',
                    HChecker: '',
                    HCheckDate: '',
                }
            }
        },
        onLoad(e) {
            this.getListData()
            if (!e.OperationType) {
                this.OperationType = 1
            } else {
                this.OperationType = e.OperationType
            }
            if (this.OperationType == 1) {
                // 新增
                this.getMaxNum()
            } else if (this.OperationType == 2) {
                // 有源单
                this.getMaxNum()
            } else if (this.OperationType == 3) {
                // 编辑
                this.getEditData(e.hmainid)
            } else if (this.OperationType == 4) {
                // 报工台跳转
                this.getMaxNum()
                this.set_Sc_ICMOBillStatus(e.HSourceBillNo, e.HType, e.HSourceName); //回填信息
                this.hform.HContext = e.HType
            }
        },
        computed: {
            containerHeight: {
                get() {
                    return this.btnTop - this.tabsBottom - 5
                }
            }
        },
        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)
                })
        },
        methods: {
            //选择发送部门
            HDeptNameChange(e) {
                for (var i = 0; i < this.HDeptNameList.length; i++) {
                    if (this.HDeptNameList[i].部门名称 == e) {
                        this.hform.HDeptID = this.HDeptNameList[i].HItemID;
                        break;
                    }
                }
            },
            //选择接收部门
            HRecDeptNameChange(e) {
                for (var i = 0; i < this.HDeptNameList.length; i++) {
                    if (this.HDeptNameList[i].部门名称 == e) {
                        this.hform.HRecDeptID = this.HDeptNameList[i].HItemID;
                        break;
                    }
                }
            },
            //选择异常反馈类型
            HErrMsgBackTypeNameChange(e) {
                for (var i = 0; i < this.HErrMsgBackTypeNameList.length; i++) {
                    if (this.HErrMsgBackTypeNameList[i].异常反馈类型名称 == e) {
                        this.hform.HErrMsgBackTypeName = this.HErrMsgBackTypeNameList[i].异常反馈类型名称;
                        this.hform.HErrMsgBackTypeID = this.HErrMsgBackTypeNameList[i].HItemID;
                        break;
                    }
                }
            },
            //选择发送人
            HSendManChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                    }
                }
            },
            //选择接收人
            HReceiveManChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                    }
                }
            },
            //选择处理人
            HHandleEmpNameChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                        this.hform.HHandleEmpID = this.HEmpNameList[i].HItemID
                    }
                }
            },
            //选择抄送人
            HCopyManChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                    }
                }
            },
            //选择抄送人
            HBadProcManNameChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                        this.hform.HBadProcMan = this.HEmpNameList[i].HItemID
                    }
                }
            },
            //选择QE责任人
            HQEManNameChange(e) {
                for (var i = 0; i < this.HEmpNameList.length; i++) {
                    if (this.HEmpNameList[i].HName == e) {
                        this.hform.HQEMan = this.HEmpNameList[i].HItemID
                    }
                }
            },
            //选择生产资源
            HSourceNameChange(e) {
                for (var i = 0; i < this.HSourceNameList.length; i++) {
                    if (this.HSourceNameList[i].生产资源 == e) {
                        this.hform.HSourceName = this.HSourceNameList[i].生产资源;
                        this.hform.HSourceID = this.HSourceNameList[i].HItemID;
                        break;
                    }
                }
            },
            //选择车间
            HCenterNameChange(e) {
                for (var i = 0; i < this.HCenterNameList.length; i++) {
                    if (this.HCenterNameList[i].工作中心 == e) {
                        this.hform.HCenterName = this.HCenterNameList[i].工作中心;
                        this.hform.HCenterID = this.HCenterNameList[i].HItemID;
                        break;
                    }
                }
            },
            //选择生产班次
            HShiftsNameChange(e) {
                for (var i = 0; i < this.HShiftsNameList.length; i++) {
                    if (this.HShiftsNameList[i].班次名称 == e) {
                        this.hform.HShiftsName = this.HShiftsNameList[i].班次名称;
                        this.hform.HShiftsID = this.HShiftsNameList[i].HItemID;
                        break;
                    }
                }
            },
            // 静态下拉框选择方法
            HLevelChange(e) {
                this.hform.HLevel = e;
            },
            HFormChange(e) {
                this.hform.HForm = e;
            },
            HEffectChange(e) {
                this.hform.HErrLev = e;
            },
            HSendTypeChange(e) {
                this.hform.HSendType = e;
            },
            //新增按钮事件
            addNew() {
                uni.showModal({
                    title: '提示',
                    content: '新增后页面数据将消失,确定要新增吗?',
                    success: (res) => {
                        if (res.confirm) {
                            uni.redirectTo({
                                url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1'
                            })
                            // 重新获取最大单据号
                            this.getMaxNum();
                            // 切换到基本信息页签
                            this.tabs = 0;
                        }
                    }
                });
            },
            // 获取所有列表数据
            async getListData() {
                // 获取部门列表
                await this.getDepartmentList();
                // 获取异常反馈类型列表
                await this.getHErrMesTypeList();
                // 获取人员列表(接收人、处理人、抄送人、责任人、QE责任人)
                await this.getPersonList();
                // 获取生产资源列表
                await this.getSourceList();
                // 获取车间列表
                await this.getCenterList();
                // 获取生产班次列表
                await this.getShiftsList();
            },
            // 获取部门列表
            getDepartmentList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/Gy_Department/list',
                        data: {
                            sWhere: "",
                            user: uni.getStorageSync('HUserName'),
                            Organization: uni.getStorageSync('Organization')
                        },
                        success: (res) => {
                            if (res.data.count == 1) {
                                this.HDeptNameList = res.data.data
                                for (var i = 0; i < res.data.data.length; i++) {
                                    this.arrayHDeptName[i] = res.data.data[i].部门名称
                                }
                                this.$forceUpdate();
                                resolve();
                            } else {
                                uni.showToast({
                                    title: '获取部门信息失败',
                                    icon: 'none'
                                })
                                reject();
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '获取部门信息失败',
                                icon: 'none'
                            })
                            reject();
                        },
                    });
                });
            },
            // 获取异常反馈类型列表
            getHErrMesTypeList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/Web/GetGy_ErrMsgBackTypeList_Json',
                        data: {
                            ErrMsg: "",
                        },
                        success: (res) => {
                            if (res.data.count == 1) {
                                this.HErrMsgBackTypeNameList = res.data.data
                                for (var i = 0; i < res.data.data.length; i++) {
                                    this.arrayHErrMsgBackTypeName[i] = res.data.data[i].异常反馈类型名称
                                }
                                this.$forceUpdate();
                                resolve();
                            } else {
                                uni.showToast({
                                    title: '获取异常反馈类型信息失败',
                                    icon: 'none'
                                })
                                reject();
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '获取异常反馈类型信息失败',
                                icon: 'none'
                            })
                            reject();
                        },
                    });
                });
            },
            // 获取人员列表(通用方法)
            getPersonList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/Web/GetEmployeeList_Json',
                        data: {
                            Employee: '',
                            HGroupID: 0
                        },
                        success: (res) => {
                            if (res.data.count == 1) {
                                this.HEmpNameList = res.data.data
                                for (var i = 0; i < res.data.data.length; i++) {
                                    this.arrayHEmpName[i] = res.data.data[i].HName
                                }
                                this.$forceUpdate();
                                resolve(); // 成功时resolve
                            } else {
                                uni.showToast({
                                    title: res.data.Message,
                                    icon: 'none'
                                })
                                reject(res.data.Message); // 失败时reject
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '接口请求失败',
                                icon: 'none'
                            })
                            reject(res); // 失败时reject
                        },
                    });
                });
            },
            // 获取生产资源列表
            getSourceList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/api/newBill/getSourceList',
                        data: {
                            sWhere: ""
                        },
                        success: (res) => {
                            if (res.data.code == 1) {
                                this.HSourceNameList = res.data.data.Gy_Source
                                for (var i = 0; i < res.data.data.Gy_Source.length; i++) {
                                    this.arrayHSourceName[i] = res.data.data.Gy_Source[i].生产资源
                                }
                                this.$forceUpdate();
                                resolve();
                            } else {
                                uni.showToast({
                                    title: '获取生产资源列表失败',
                                    icon: 'none'
                                })
                                reject();
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '获取生产资源列表失败',
                                icon: 'none'
                            })
                            reject();
                        },
                    });
                });
            },
            // 获取工作中心列表
            getCenterList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/api/newBill/getWorkCenterList',
                        data: {
                            sWhere: ""
                        },
                        success: (res) => {
                            if (res.data.code == 1) {
                                this.HCenterNameList = res.data.data.Gy_WorkCenter
                                for (var i = 0; i < res.data.data.Gy_WorkCenter.length; i++) {
                                    this.arrayHCenterName[i] = res.data.data.Gy_WorkCenter[i].工作中心
                                }
                                this.$forceUpdate();
                                resolve();
                            } else {
                                uni.showToast({
                                    title: '获取车间列表失败',
                                    icon: 'none'
                                })
                                reject();
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '获取车间列表失败',
                                icon: 'none'
                            })
                            reject();
                        },
                    });
                });
            },
            // 获取生产班次列表
            getShiftsList() {
                return new Promise((resolve, reject) => {
                    uni.request({
                        url: this.serverUrl + '/Web/GetGy_ShiftsList_Json',
                        data: {
                            Shifts: ""
                        },
                        success: (res) => {
                            if (res.data.count == 1) {
                                this.HShiftsNameList = res.data.data
                                for (var i = 0; i < res.data.data.length; i++) {
                                    this.arrayHShiftsName[i] = res.data.data[i].班次名称
                                }
                                this.$forceUpdate();
                                resolve();
                            } else {
                                uni.showToast({
                                    title: '获取生产班次列表失败',
                                    icon: 'none'
                                })
                                reject();
                            }
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '获取生产班次列表失败',
                                icon: 'none'
                            })
                            reject();
                        },
                    });
                });
            },
            //新增
            getMaxNum() {
                uni.request({
                    url: this.serverUrl + '/Web/GetMAXNum',
                    data: {
                        HBillType: '4502'
                    },
                    success: (res) => {
                        if (res.data.count == 1) {
                            this.hform.HInterID = res.data.data[0].HInterID
                            this.hform.HBillNo = res.data.data[0].HBillNo
                        } else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            //报工台跳转
            set_Sc_ICMOBillStatus(HSourceBill, HType, HSourceName) {
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_Sc_ICMOBillStatus',
                    type: "GET",
                    data: {
                        "HSourceBill": HSourceBill
                    },
                    success: (res) => {
                        if (res.data.count == 1) {
                            this.hform.HMaterNumber = res.data.data[0].物料代码 //产品名称
                            this.hform.HMaterName = res.data.data[0].物料名称 //产品名称
                            this.hform.HMaterModel = res.data.data[0].规格型号 //产品规格
                            this.hform.HMainSourceBillNo = res.data.data[0].流转卡号 //源单单号
                            this.hform.HMainSourceInterID = res.data.data[0].流转卡主内码 //源单主内码
                            this.hform.HMainSourceEntryID = res.data.data[0].流转卡子内码 //源单子内码
                            this.hform.HMainSourceBillType = 3772 //源单类型
                            this.hform.HQty = res.data.data[0].计划数量 //计划数量
                            this.hform.HSourceID = res.data.data[0].HSourceID //生产资源id
                            this.hform.HSourceName = res.data.data[0].生产资源 //生产资源
                        } else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_ErrMsgBackType',
                    type: "GET",
                    data: {
                        "TypeName": HType
                    },
                    success: (res) => {
                        var data = res.data.data[0]
                        if (res.data.count == 1) {
                            this.hform.HErrMsgBackTypeID = data.HItemID
                            this.hform.HErrMsgBackTypeName = data.HName
                        } else {
                            uni.showToast({
                                title: '获取异常类型数据失败',
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '获取异常类型失败',
                            icon: 'none'
                        })
                    },
                });
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/set_EquipFile',
                    type: "GET",
                    data: {
                        "HSourceName": HSourceName
                    },
                    success: (res) => {
                        var data = res.data.data[0]
                        console.log(res.data)
                        if (res.data.count == 1) {
                            this.hform.EquipNumber = data.设备编码
                        } else {
                            uni.showToast({
                                title: '获取设备编码失败',
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '获取设备编码失败',
                            icon: 'none'
                        })
                    },
                });
                setTimeout(() => {
                    uni.hideLoading()
                    this.hform.HDescription = '异常反馈单号:' + this.hform.HBillNo + ',异常类型:' + HType + ',订单号:' + this
                        .eData.HICMOBillNo + ',流转卡号:' + this.eData.HICMOBillNo +
                        ', 产品编码:' + this.hform.HMaterNumber + ',产品名称:' + this.hform.HMaterName + ',规格型号:' + this
                        .hform.HMaterModel +
                        ',发送人:' + this.hform.HMaker + ',发生时间:' + this.hform.HDate + ',生产资源:' + this.hform
                        .HSourceName + ',设备编码:' + this.hform.EquipNumber + ',对应处理人:' + this.hform.HHandleEmpName
                }, 1000)
            },
            //编辑
            getEditData(HInterID) {
                uni.showLoading({
                    title: '加载中'
                });
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_TransFerBillListCheckDetaiL_APP',
                    data: {
                        "HID": HInterID
                    },
                    success: (res) => {
                        uni.hideLoading();
                        console.log('编辑数据:', res);
                        if (res.data.code == 1) {
                            const data = res.data.data.OA_ErrMsgBackBillMain[0];
                            // 映射字段到 Vue 中的 hform
                            this.hform = {
                                ...this.hform, // 保留原有的默认值
                                HInterID: data.HInterID,
                                HEntryID: data.HEntryID || '',
                                HBillNo: data.HBillNo || '',
                                HDate: data.HDate ? data.HDate.substr(0, 10) : dayjs(new Date()).format(
                                    "YYYY-MM-DD"),
                                HErrMsgBackTypeName: data.HErrMsgBackTypeName || '',
                                HErrMsgBackTypeID: data.HErrMsgBackTypeID || '0',
                                HContext: data.HContext || '',
                                HSendMan: data.HSendMan || '',
                                HDeptID: data.HDeptID || '0',
                                HDeptName: data.HDeptName || '',
                                HRecDeptID: data.HRecDeptID || '0',
                                HRecDeptName: data.HRecDeptName || '',
                                HCenterID: data.HCenterID || '0',
                                HCenterName: data.HCenterName || '',
                                HReceiveMan: data.HReceiveMan || '',
                                HCopyMan: data.HCopyMan || '',
                                HMainSourceInterID: data.HSourceInterID || '0',
                                HMainSourceEntryID: data.HSourceEntryID || '0',
                                HMainSourceBillNo: data.HSourceBillNo || '',
                                HMainSourceBillType: data.HSourceBillType || '',
                                HHasten: data.HHasten || 0,
                                HMaterNumber: data.HMaterNumber || '',
                                HMaterName: data.HMaterName || '',
                                HHandleEmpID: data.HHandleEmpID || '0',
                                HHandleEmpName: data.HHandleEmpName || '',
                                HMaterModel: data.HMaterModel || '',
                                HQty: data.HQty || 0,
                                HForm: data.HForm || '人',
                                HChangeNote: data.HChangeNote || '',
                                HNote: data.HNote || '',
                                HBadProcMan: data.HBadProcMan || '0',
                                HBadProcManName: data.HBadProcManName || '',
                                HQEMan: data.HQEMan || '0',
                                HQEManName: data.HQEManName || '',
                                HSourceID: data.HSourceID || '0',
                                HSourceName: data.HSourceName || '',
                                HShiftsID: data.HShiftsID || '0',
                                HShiftsName: data.HShiftsName || '',
                                HDescription: data.HDescription || '',
                                HRemark: data.HRemark || '',
                                HLevel: data.HLevel || '普通',
                                HSendType: data.HSendType || '公共',
                                HErrLev: data.HErrLev || '',
                                HMaker: data.HMaker || userInfo.Czymc || '',
                                HMakeDate: data.HMakeDate ? data.HMakeDate.substr(0, 10) : dayjs(
                                new Date()).format("YYYY-MM-DD"),
                                HUpDater: uni.getStorageSync('HUserName') || userInfo.Czymc || '',
                                HUpDateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
                                HChecker: data.HChecker || '',
                                HCheckDate: data.HCheckDate ? data.HCheckDate.substr(0, 10) : '',
                                HCloseMan: data.HCloseMan || '',
                                HCloseDate: data.HCloseDate ? data.HCloseDate.substr(0, 10) : '',
                                HDeleteMan: data.HDeleteMan || '',
                                HDeleteDate: data.HDeleteDate ? data.HDeleteDate.substr(0, 10) : '',
                            };
                            // 设置制单人信息(如果为空则使用当前用户)
                            if (!this.hform.HMaker) {
                                this.hform.HMaker = getUserInfo().Czymc;
                            }
                            // 设置修改人信息
                            if (!this.hform.HUpDater) {
                                this.hform.HUpDater = uni.getStorageSync('HUserName') || '';
                            }
                            // 设置其他字段(如果需要在界面上显示)
                            if (this.hform.HMainSourceBillNo) {
                                this.hform.HPlanBillNo = this.hform.HMainSourceBillNo;
                                this.hform.HBillTypeName = this.hform.HMainSourceBillType;
                            }
                            this.isEdit = true;
                        } else {
                            uni.showToast({
                                title: res.data.msg || '获取编辑数据失败',
                                icon: 'none'
                            });
                        }
                    },
                    fail: (res) => {
                        uni.hideLoading();
                        console.log('编辑数据请求失败:', res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        });
                    }
                });
            },
            //保存
            submit() {
                if (!this.hform.HReceiveMan) {
                    uni.showToast({
                        title: '请选择接收人',
                        icon: 'none'
                    })
                } else {
                    uni.showLoading({
                        title: '请稍候'
                    })
                    if (this.OperationType == 1 || this.OperationType == 2 || this.OperationType == 4) {
                        this.refSav = "Add";
                    }
                    //若为编辑-保存,则更新修改人和修改时间
                    if (this.OperationType == 3) {
                        this.refSav = "Update";
                        this.hform.HUpdater = getUserInfo().Czymc;
                        this.hform.HUpdaterDate = dayjs(new Date()).format("YYYY-MM-DD");
                    }
                    var sMainStr = JSON.stringify(this.hform);
                    var sMainSub = sMainStr + ';' + uni.getStorageSync('HUserName') + ';' + this.refSav
                    uni.request({
                        url: this.serverUrl + '/Sc_MESTransFerWorkBill/SaveGetMESTransFerWorkFrom_APP',
                        method: 'POST',
                        dataType: "json",
                        data: {
                            "msg": sMainSub
                        },
                        success: (res) => {
                            console.log(1, res);
                            uni.hideLoading()
                            if (res.data.count == 1) {
                                if (res.data.Verify == "Y") { //自动审核
                                    this.SaveVerify(res.data.HInterID) //审核
                                } else {
                                    uni.showModal({
                                        title: '提示',
                                        content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
                                        success: (res) => {
                                            if (res.confirm) {
                                                console.log('用户点击确定');
                                                uni.redirectTo({
                                                    url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1'
                                                })
                                            } else if (res.cancel) {
                                                console.log('用户点击取消');
                                                setTimeout(() => {
                                                    uni.navigateBack();
                                                }, 50)
                                            }
                                        }
                                    });
                                }
                            }
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title: '接口请求失败',
                                icon: 'none'
                            })
                        },
                    });
                }
            },
            SaveVerify(HInterID) {
                var datas = {
                    HInterID: HInterID,
                    IsAudit: 0,
                    CurUserName: getUserInfo().Czymc
                }
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/AuditTransFerReportList',
                    method: 'GET',
                    dataType: "json",
                    async: true,
                    data: datas,
                    success: (res) => {
                        uni.showModal({
                            title: '提示',
                            content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
                            success: (res) => {
                                if (res.confirm) {
                                    console.log('用户点击确定');
                                    uni.redirectTo({
                                        url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1'
                                    })
                                } else if (res.cancel) {
                                    console.log('用户点击取消');
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 50)
                                }
                            }
                        });
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            goBack() {
                uni.navigateBack()
            }
        }
    }
</script>
<style lang="scss">
</style>
pages/baogong/abnormal.vue
File was deleted
pages/index/login.vue
@@ -118,9 +118,11 @@
                    "宁波四维尔-外网": "http://220.189.218.155:9010/API/",
                    // 锦隆
                    "锦隆-智能家居": "http://192.168.1.11/API/",
                    "锦隆-智能家居-外网": "http://61.174.29.234:8880/API/"
                    // 华舟包装
                    "宁波华舟包装": "http://192.168.88.167:8082/API/",
                    "宁波华舟包装-外网": "http://61.164.64.222:8082//API/",
                },
                serverUrlName: '浙江智云迈思',
                serverUrlName:uni.getStorageSync('serverUrlName') || '浙江智云迈思',
                arrayOrganization: [],
                Organization: '',
@@ -193,6 +195,7 @@
                let url = this.serverUrlandName[this.serverUrlName];
                if (url != undefined) {
                    uni.setStorageSync('serverUrl', url)
                    uni.setStorageSync('serverUrlName', this.serverUrlName)
                    this.serverUrl = url
                    this.changeApi = false
                    this.getOrganization()
pages/index/tab1.vue
@@ -49,7 +49,7 @@
                        text: '工序出站汇报单新增',
                        tip: '立即新增',
                        url: '/pages/gongxuOut/Cj_StationOutBill',
                        id: 3,
                        id: 2,
                        hidden: false,
                    }, 
                    
@@ -58,7 +58,7 @@
                        text: '工序委外发出单新增',
                        tip: '立即新增',
                        url: '/pages/weiwaigxIn/Cj_StationEntrustInBill',
                        id: 5,
                        id: 3,
                        hidden: false,
                    }, 
                    
@@ -67,7 +67,7 @@
                        text: '工序委外接收单新增',
                        tip: '立即新增',
                        url: '/pages/weiwaigxOut/Cj_StationEntrustOutBill',
                        id: 7,
                        id: 4,
                        hidden: false,
                    }, 
                    {
@@ -75,106 +75,20 @@
                        text: '我的报工平台',
                        tip: '点击进入',
                        url: '/pages/baogong/IpadIndex',
                        id: 11,
                        hidden: true,
                        id: 5,
                        hidden: false,
                    }, 
                    {
                        img: '../../static/icon/icon10.png',
                        text: '我的任务',
                        tip: '立即新增',
                        url: '/pages/gongxuOutSendWork/gongxuOutSendWorkBill',
                        id: 16,
                        id: 6,
                        hidden: false,
                    }, 
                    
                    
                ]
                // itemData: [{
                //     //  img:'../../static/icon0.png',
                //     //  text:'报表中心',
                //     //  url:'/pages/shebeilvli/EquipFileBillResume',
                //     //  id:0
                //     // },{
                //     img: '../../static/icon/icon_a1.png',
                //     text: '设备档案',
                //     url: '/pages/shebeidangan/Gy_EquipFileMainBillList',
                //     id: 1
                // }, {
                //     img: '../../static/icon/icon_a2.png',
                //     text: '设备保养计划单',
                //     url: '/pages/baoyangjihua/Sb_EquipMaintainPlanList',
                //     id: 2
                // }, {
                //     img: '../../static/icon/icon_a3.png',
                //     text: '设备保养记录单',
                //     url: '/pages/baoyangjilu/Sb_EquipMaintainRuleList',
                //     id: 3
                //     // },{
                //     //  img:'../../static/icon/icon_a4.png',
                //     //  text:'设备点检计划单',
                //     //  url:'',
                //     //  id:4
                //     // },{
                //     //  img:'../../static/icon/icon_a5.png',
                //     //  text:'设备点检记录单',
                //     //  url:'',
                //     //  id:5,
                // }, {
                //     img: '../../static/icon/icon_a6.png',
                //     text: '设备故障登记表',
                //     url: '/pages/guzhangdengji/EqpConkBookBillList',
                //     id: 6
                // }, {
                //     img: '../../static/icon/icon_a7.png',
                //     text: '设备维修记录单',
                //     url: '/pages/shebeiweixiu/SbEqpMaintenanceBillList',
                //     id: 7,
                // }, {
                //     img: '../../static/icon/icon_a8.png',
                //     text: '设备履历',
                //     url: '/pages/shebeilvli/EquipFileBillResume',
                //     id: 8,
                // }, {
                //     img: '../../static/icon/icon_a9.png',
                //     text: '工序进站接收单',
                //     url: '/pages/gongxuIn/Cj_StationInBillList',
                //     id: 9,
                // }, {
                //     img: '../../static/icon/icon_a10.png',
                //     text: '工序出站汇报单',
                //     url: '/pages/gongxuOut/Cj_StationOutBillList',
                //     id: 10,
                // }, {
                //     img: '../../static/icon/icon_a11.png',
                //     text: '工序委外发出单',
                //     url: '/pages/weiwaigxIn/Cj_StationEntrustInBillList',
                //     id: 11,
                // }, {
                //     img: '../../static/icon/icon_a12.png',
                //     text: '工序委外接收单',
                //     url: '/pages/weiwaigxIn/Cj_StationEntrustInBillList',
                //     id: 12,
                // // }, {
                // //     img: '../../static/icon/icon_a13.png',
                // //     text: '设备管理',
                // //     url: '',
                // //     id: 13,
                // }, {
                //     img: '../../static/icon/icon_a14.png',
                //     text: '报工平台',
                //     url: '/pages/baogong/table',
                //     id: 14,
                // }, {
                //     img: '../../static/icon/icon_a15.png',
                //     text: '异常反馈单',
                //     url: '/pages/yichang/MESExecptFeedBackBillList',
                //     id: 15,
                // }, {
                //     img: '../../static/icon/icon_a16.png',
                //     text: '异常反馈处理单',
                //     url: '/pages/yichang/list',
                //     id: 16,
                // }]
            }
        },
        onLoad() {
@@ -182,11 +96,6 @@
        },
        methods: {
            async getHiddenItem() {
                // let itemCache = uni.getStorageSync('HTab1ItemData') || ''
                // console.log('itemCache: ', itemCache);
                // if (itemCache !== '') {
                //     this.itemData = itemCache
                // }
                let data = await getMenuList({
                    menuName: this.menuListName
                })
pages/index/tab2.vue
@@ -358,7 +358,7 @@
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单列表",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList",
                        "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBillList",
                        "id": 43,
                        "hidden": false
                    },
@@ -558,31 +558,6 @@
</script>
<style lang="scss" scoped>
    // .mains{
    //     width: 720rpx;
    //     margin: 0 auto;
    //     display: flex;
    //     flex-wrap: wrap;
    //     margin-top: 10rpx;
    //     padding-bottom: 80rpx;
    //     .box{
    //         width: 100%;
    //         margin: 26rpx 26rpx 0 26rpx;
    //         padding: 0 0 16rpx 10rpx;
    //         display: flex;
    //         align-items: center;
    //         border-bottom: 1px solid #f0f0f0;
    //         image{
    //             width: 52rpx;
    //             height: 52rpx;
    //         }
    //         .texts{
    //             font-size: 30rpx;
    //             color: #333333;
    //             margin-left: 30rpx;
    //         }
    //     }
    // }
    .header {
        width: 100%;
pages/index/tab3.vue
@@ -195,6 +195,20 @@
                        "id": 23,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "设备保养任务",
                        "url": "/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport",
                        "id": 24,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具保养任务",
                        "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport",
                        "id": 25,
                        "hidden": false
                    },
                ]
            }
        },
pages/index/tab4.vue
@@ -64,7 +64,7 @@
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1",
                        "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
                        "id": 3,
                        "hidden": false
                    },
pages/jishikucunchaxun/table.vue
@@ -45,6 +45,9 @@
                        <view class="detail" v-if="item['仓位']">
                            <text>仓位:</text>{{item['仓位']}}
                        </view>
                        <view class="detail" v-if="item['供应商']">
                            <text>供应商:</text>{{item['供应商']}}
                        </view>
                        <view class="detail" v-if="item['物料名称']">
                            <text>物料名称:</text>{{item['物料名称']}}
                        </view>