chenhaozhe
6 天以前 08132eb6a645b4a42205d142feb14c9118a4a16a
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

# Conflicts:
# pages/index/tab2.vue
18个文件已修改
5个文件已添加
3168 ■■■■■ 已修改文件
components/BillListPopup/BillListPopup.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/ZLGL/CheckProjectPopup.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue 544 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/shoujianjianyan/firstCheckBill.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/mine.vue 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab1.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab4.vue 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mujvzhuangtai/mujvzhuangtai.vue 140 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/qijvguzhangdengji/mouldMistakeBill.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/simaheyi/BarCodeCheck_SN.vue 874 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/simaheyi/table.vue 487 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/auth.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/BillListPopup/BillListPopup.vue
@@ -10,6 +10,11 @@
                    <view class="title"><text>物料: </text></view>
                    <view class="right"><input type="text" :focus="enablefocus" v-model="HMater"
                            @confirm="getBillList" /></view>
                    <view class="icon-wrapper-big">
                        <uni-icons class="right-icon"
                        :class="'enable-icon-button'"
                        type="scan" size="20" @click="toScanCode"></uni-icons>
                    </view>
                </view>
                <view class="search-condition">
                    <view class="title"><text>关联项: </text></view>
@@ -71,6 +76,9 @@
        CommonUtils
    } from '../../utils/common';
    import dayjs from 'dayjs';
    import {
        MpaasScan
    } from "../../utils/mpaasScan";
    export default {
        name: "BillListPopup",
        data() {
@@ -115,6 +123,15 @@
            event: 'change'
        },
        methods: {
            //扫码
            toScanCode() {
                MpaasScan.scanCode((res) => {
                    if (res) {
                        this.HMater = res;
                        this.getBillList();
                    }
                });
            },
            popupChangeHandler(e) {
                if (e.show === true) {
                    this.getBillList()
@@ -347,4 +364,10 @@
            background-color: rgba(0, 122, 255, 0.2);
        }
    }
    .enable-icon-button {
        background-color: #3a78ff;
        padding: 6rpx;
        color: #fff;
        border-radius: 100%;
    }
</style>
components/ZLGL/CheckProjectPopup.vue
@@ -5,7 +5,7 @@
                <view class="search-condition">
                    <view class="title"><text>日期: </text></view>
                    <view class="daterange" style="flex: 1;">
                        <view class="right general">
                        <!-- <view class="right general">
                            <uni-datetime-picker type="date" :clear-icon="false" v-model="HBeginDate">
                                <view>{{HBeginDate}}</view>
                            </uni-datetime-picker>
@@ -15,7 +15,7 @@
                            <uni-datetime-picker type="date" :clear-icon="false" v-model="HEndDate">
                                <view>{{HEndDate}}</view>
                            </uni-datetime-picker>
                        </view>
                        </view> -->
                    </view>
                </view>
                <view class="buttons">
@@ -109,8 +109,8 @@
                panelHeight: 0,
                HProcessName: '',
                HMaterName: '',
                HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"),
                HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
                // HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"),
                // HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
                multiSouceBillList: []
            };
        },
@@ -161,9 +161,9 @@
            getsWhere() {
                let sWhere =
                    ` and ISNULL(审核人,'')!=''  and HOrgID  = '${ uni.getStorageSync("OrganizationID")}'`
                if (this.HBeginDate && this.HEndDate) {
                    sWhere += ` and  CONVERT(varchar(100),日期, 23) between '${this.HBeginDate}' and '${this.HEndDate}'`
                }
                // if (this.HBeginDate && this.HEndDate) {
                //     sWhere += ` and  CONVERT(varchar(100),日期, 23) between '${this.HBeginDate}' and '${this.HEndDate}'`
                // }
                if (this.HMaterName && this.HProcessName) {
                    sWhere += ` and 物料名称 = '${this.HMaterName}' and 工序名称 = '${this.HProcessName}'`
pages.json
@@ -26,6 +26,18 @@
                "navigationBarTitleText": "单据列表"
            }
        },
        {
            "path": "pages/index/tab3",
            "style": {
                "navigationBarTitleText": "器具管理"
            }
        },
        {
            "path": "pages/index/tab4",
            "style": {
                "navigationBarTitleText": "质量管理"
            }
        },
        {
            "path": "pages/index/mine",
            "style": {
@@ -1272,6 +1284,12 @@
                "navigationBarTitleText": "三码合一"
            }
        },
        {
            "path": "pages/simaheyi/BarCodeCheck_SN",
            "style": {
                "navigationBarTitleText": "四码合一"
            }
        },
        {
            "path": "pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2",
            "style": {
@@ -1329,6 +1347,14 @@
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/ZLGL/checkFlowList/QC_CheckedBillflowList",
            "style" :
            {
                "navigationBarTitleText" : "已审核",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/MJGL/Gy_MouldFile/Gy_MouldFileList",
            "style" : 
@@ -1397,6 +1423,18 @@
                "selectedIconPath": "static/tabBar/icon2-default.png",
                "text": "单据列表"
            },
            {
                "pagePath": "pages/index/tab3",
                "iconPath": "static/tabBar/icon2.png",
                "selectedIconPath": "static/tabBar/icon2-default.png",
                "text": "器具管理"
            },
            {
                "pagePath": "pages/index/tab4",
                "iconPath": "static/tabBar/icon2.png",
                "selectedIconPath": "static/tabBar/icon2-default.png",
                "text": "质量管理"
            },
            {
                "pagePath": "pages/index/mine",
                "iconPath": "static/tabBar/user.png",
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
@@ -94,7 +94,7 @@
                <view class="form-item">
                    <view class="title">源单类型:</view>
                    <view class="right" v-show="showHMainSourceBillType">
                        <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
                        <picker :range="arrayHMainSourceBillType"
                            @change="HMainSourceBillTypeChange">
                            <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
                                placeholder="请选择源单类型" />
@@ -232,12 +232,12 @@
                    HBarCode: '',
                    HInterID: '',
                    HBillType: 3802,
                    HWHName: getUserInfo().HWHName,
                    HWHName: getUserInfo().HWhName,
                    HWHID: getUserInfo().HWhID,
                    HStockPlaceName: getUserInfo().HSPName,
                    HStockPlaceID: getUserInfo().HSPID,
                    HKeeperName: getUserInfo().User,
                    HKeeperID: getUserInfo().User,//发料人
                    HKeeperName: getUserInfo().HKeeperName,
                    HKeeperID: getUserInfo().HKeeperID,//发料人
                    HSecManagerName: getUserInfo().HEmpName,
                    HSecManagerID: getUserInfo().HEmpID,//领料人
                    HDeptName: getUserInfo().HDept,
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
@@ -273,7 +273,7 @@
                    HBarCode: '',
                    HInterID: '',
                    HBillType: 3803,
                    HWHName: getUserInfo().HWHName,
                    HWHName: getUserInfo().HWhName,
                    HWHID: getUserInfo().HWhID,
                    HStockPlaceName: getUserInfo().HSPName,
                    HStockPlaceID: getUserInfo().HSPID,
@@ -282,8 +282,8 @@
                    HDeptID: getUserInfo().HDeptID,
                    HSecManagerID: getUserInfo().HEmpID,
                    HSecManagerName:  getUserInfo().HEmpName,
                    HKeeperID: 0,
                    HKeeperName: '',
                    HKeeperName: getUserInfo().HKeeperName,
                    HKeeperID: getUserInfo().HKeeperID,//发料人
                    //源单信息
                    HMainSourceBillType: uni.getStorageSync('billType_3803') ? uni.getStorageSync('billType_3803') :
                        3849,
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -511,7 +511,8 @@
                        HBarCode: HBarCode,
                        HInterID: 0,
                        HEntryID: 0,
                        Mode: 1 //扫码模式
                        Mode: 1 ,//扫码模式
                        user:getUserInfo()["Czymc"]
                    }
                })
            
@@ -571,7 +572,8 @@
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 //选单模式
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
            
pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue
New file
@@ -0,0 +1,544 @@
<template>
    <view class="page" id="pageContent">
        <view class="search-condition-zone">
            <view class="form-item">
                <view class="left">源单类型</view>
                <uni-combox :candidates="arrayHSourceBillTypeName" placeholder="请选择源单类型" v-model="hform.HSourceBillTypeName"
                    @input="HSourceBillTypeNameChange"></uni-combox>
            </view>
            <view class="form-item">
                <view class="left">
                    单据号:
                </view>
                <view class="right general">
                    <input type="text" v-model="hform.HBillNo" />
                </view>
            </view>
        </view>
        <view class="button-zone">
            <button type="default" class="btn-a" size="mini" @tap="cmdSearch">查询</button>
            <button type="default" class="btn-c" size="mini" @tap="exit">退出</button>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="card-item" v-for="(item, index) in showList" :key="index">
            <uni-card :title="item['单据号']" :extra="'日期:' + item['日期'].split('T')[0]"
                @tap="showDetail = showDetail==index?-1:index">
                <view class="card-detail">
                    <!-- 动态生成所有非空字段 -->
                    <view
                        class="detail"
                        v-for="(value, key,keyIndex) in item"
                        :key="key"
                        v-if="keyIndex<=10 && shouldShowField(key, value)"
                    >
                        <text>{{ formatFieldName(key) }}:</text>{{ value }}
                    </view>
                </view>
                <view class="card-detail" v-if="showDetail == index">
                    <view
                        class="detail"
                        v-for="(value, key,keyIndex) in item"
                        :key="key"
                        v-if="keyIndex>=15 && shouldShowField(key, value)"
                    >
                        <text>{{ formatFieldName(key) }}:</text>{{ value }}
                    </view>
                </view>
                <view class="more" v-if="showDetail == index && operations != index">
                    <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==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;">
                        <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="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>
        </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>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '@/utils/common'
    import {
        getUserInfo
    } from '@/utils/auth'
    import dayjs, {
        Dayjs
    } from 'dayjs'
    export default {
        data() {
            return {
                showDetail: -1,
                operations : -1,
                hform: {
                    HSourceBillType:'8505',
                    HSourceBillTypeName: "首件检验单",
                    HBillNo: ''
                },
                sWhere: '',
                listData: [],
                showList: [],
                page: 1,
                HSourceBillTypeList: {首件检验单:'8505',末件检验单:'8507'},
                arrayHSourceBillTypeName: [
                    "首件检验单",
                    "末件检验单",
                ],
            }
        },
        onReachBottom: function() {
            this.page++
            setTimeout(() => {
                this.showList = this.showList.concat(this.getPage(this.page, this.listData))
            }, 100)
        },
        onPullDownRefresh: function() {
            this.cmdSearch()
            setTimeout(() => {
                uni.stopPullDownRefresh();
            }, 1000);
        },
        computed: {
        },
        methods: {
            // 判断哪些字段需要显示
            shouldShowField(key, value) {
                // 排除不需要显示的字段
                const excludeKeys = ['单据号', '日期']; // 这些字段已经在其他地方显示了
                // 判断key是否全英文(不包含中文)
                const isAllEnglish = /^[a-zA-Z]+$/.test(key);
                // 判断key是否包含"ID"(不区分大小写)
                const containsID = key.toUpperCase().includes('ID');
                return !excludeKeys.includes(key) &&
                       !isAllEnglish && // 排除全英文的key
                       !containsID && // 排除包含ID的key
                       value !== null &&
                       value !== undefined &&
                       value !== '';
            },
            // 格式化字段名显示
            formatFieldName(key) {
                // 你可以根据需求自定义显示名称
                const nameMap = {
                    '物料代码': '物料代码',
                    '物料名称': '物料名称',
                    '规格型号': '规格型号',
                    // ... 其他字段映射
                };
                return nameMap[key] || key;
            },
            HSourceBillTypeNameChange(e) {
                console.log(e);
                this.hform.HSourceBillType = this.HSourceBillTypeList[this.hform.HSourceBillTypeName];
                console.log(this.hform.HSourceBillType);
                this.cmdSearch();
            },
            exit() {
                uni.navigateBack()
            },
            getPage(page, list) {
                let sindex = (parseInt(page) - 1) * 20
                let eindex = parseInt(page) * 20
                let newList = list.slice(sindex, eindex)
                return newList
            },
            async cmdSearch() {
                let sWhere = ' '
                if (this.hform.HBillNo != "") {
                    sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"
                }
                try {
                    let res = await CommonUtils.doRequest2Sync({
                        url: '/LEMS/CheckFlowList',
                        data: {
                            "sWhere": sWhere,
                            "billType":this.hform.HSourceBillType,
                            "type":3,
                            "userid": getUserInfo()["Czybm"]
                        },
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count > 0) {
                        this.listData = res.data.data
                        this.showList = this.getPage(this.page, this.listData)
                    } else {
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }
                } catch (err) {
                    console.warn(err);
                    uni.showToast({
                        title: '接口请求失败:' + err,
                        icon: 'none'
                    })
                }
            },
            async audit(item, mode) {
                console.log('审核单据: ',item);
                let url = '';
                let ajaxData = '';
                if(this.hform.HSourceBillType=='8505'){
                    url = 'QC_FirstPieceCheckBill/AuditFlow',
                    ajaxData= {
                        HInterID: item["hmainid"],
                        IsAudit: mode,
                        CurUserName: getUserInfo()["Czymc"],
                        CurUserID:getUserInfo()["Czybm"],
                    }
                }else if(this.hform.HSourceBillType=='8507'){
                    url = 'QC_ProcessCheckBill/AuditFlow',
                    ajaxData= {
                        HInterID: item["hmainid"],
                        IsAudit: mode,
                        CurUserName: getUserInfo()["Czymc"],
                        CurUserID:getUserInfo()["Czybm"],
                    }
                }
                try{
                    let res = await CommonUtils.doRequest2Sync({
                        method: 'GET',
                        url: url,
                        data: ajaxData
                    })
                    if(!res) {
                        return
                    }
                    let {count, data, Message} = res.data
                    if(count == 1) {
                        CommonUtils.showTips({
                            message: `审核成功`
                        })
                        this.$forceUpdate()
                        setTimeout(() => {
                            this.cmdSearch()
                        }, 2000)
                    }else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `审核失败: ${Message}`
                        })
                    }
                }catch(err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `单据审核出现错误: ${err}`
                    })
                }
            },
            async Reject(item) {
                console.log("delItem: ", item);
                let url = '';
                let ajaxData = '';
                if(this.hform.HSourceBillType=='8505'){
                    url = 'QC_FirstPieceCheckBill/RejectCheckFlow',
                    ajaxData= {
                        HInterID: item["hmainid"],
                        CurUserID:getUserInfo()["Czybm"],
                    }
                }else if(this.hform.HSourceBillType=='8507'){
                    url = 'QC_ProcessCheckBill/RejectCheckFlow',
                    ajaxData= {
                        HInterID: item["hmainid"],
                        CurUserID:getUserInfo()["Czybm"],
                    }
                }
                uni.showModal({
                    title: '提示',
                    content: '确认要驳回记录?',
                    success: async (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            try {
                                let res = await CommonUtils.doRequest2Sync({
                                    url: url,
                                    data: ajaxData
                                })
                                if (!res) {
                                    return
                                }
                                let {
                                    count,
                                    code,
                                    Message
                                } = res.data
                                if (count == 0) {
                                    return uni.showModal({
                                        title: '错误提示',
                                        content: `驳回错误: ${Message}`,
                                        showCancel: false
                                    })
                                }
                                uni.showToast({
                                    title: '驳回成功',
                                    icon: 'none'
                                })
                                this.cmdSearch()
                            } catch (err) {
                                uni.showModal({
                                    title: '错误提示',
                                    content: `接口请求失败: ${err}`,
                                    showCancel: false
                                })
                            }
                        }
                    },
                })
            },
        },
        onShow() {
            this.$nextTick(() => {
                this.cmdSearch()
            })
        },
    }
</script>
<style lang="scss" scoped>
    .page {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 20rpx;
        padding: 20rpx 0;
        position: relative;
        .button-zone {
            height: auto;
            box-sizing: border-box;
            padding-top: 20rpx;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            flex-wrap: wrap;
            button {
                border-radius: 50rpx;
                width: 180rpx;
                height: 66rpx;
                line-height: 66rpx;
                font-size: 28rpx;
            }
            .btn-a {
                background-color: #3a78ff;
                color: #fff;
            }
            .btn-c {
                background-color: #ff5722;
                color: #fff;
            }
        }
        .search-condition-zone {
            height: auto;
            box-sizing: border-box;
            padding: 0 60rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            .form-item {
                display: flex;
                flex-direction: row;
                gap: 20rpx;
                align-items: center;
                font-size: 28rpx;
                .left {
                    width: 4rem;
                }
                .right {
                    flex: 1;
                    padding: 8rpx 16rpx;
                    .search {
                        width: 28rpx;
                        height: 28rpx;
                    }
                    input {
                        font-size: 28rpx;
                    }
                    .uni-combox {
                        padding: 0;
                        margin: 0;
                        ::v-deep .uni-combox__input {
                            font-size: 28rpx;
                            height: auto;
                        }
                    }
                }
                .general {
                    border-radius: 22rpx;
                    border: 1px solid #acacac;
                }
                .disabled {
                    border-radius: 22rpx;
                    border: 1px solid #e4e4e4;
                    background-color: #e4e4e4;
                }
            }
        }
        .info-list-zone {
            overflow-y: auto;
            .card-item {
                .card-detail {
                    width: 100%;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;
                    line-height: 120%;
                    .detail {
                        // width: 50%;
                        font-size: 26rpx;
                        margin-bottom: 12rpx;
                        color: #555;
                        margin-right: 20rpx;
                        text {
                            color: #999;
                            font-size: 26rpx;
                        }
                    }
                }
            }
        }
        .daterange {
            display: flex;
            flex-direction: row;
            gap: 10rpx;
            justify-content: center;
            align-items: center;
        }
        .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-between;
            gap: 20rpx;
            margin-top: 20rpx;
            flex-wrap: wrap;
            align-content: flex-start;
            button {
                margin: 0;
                flex-shrink: 0;
                padding: 0;
                width: 150rpx;
                flex-basis: 150rpx;
                font-size: 25rpx;
            }
            .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;
            }
        }
        .pagination-zone {
            position: fixed;
            bottom: 0;
            box-sizing: border-box;
            background-color: #fff;
            box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
            padding: 20rpx 40rpx 20rpx 40rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            justify-content: space-between;
            width: 100%;
        }
    }
</style>
pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill.vue
@@ -775,7 +775,8 @@
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 //选单模式
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -631,13 +631,19 @@
                ArrayAnalysisMethodValue: [1, 2, 3],
                // 子表 页签信息
                subTabs: {
                    0: {
                        id: "0",
                        name: "其他类型",
                    },
                },
                    1: {
                        id: "1",
                        name: "检验项目",
                    },
                    2: {
                        id: "2",
                        name: "不良原因",
                    },
                    3: {
                        id: "3",
                        name: "抽样检验",
                    },
                },
                // 源单类型
                HSourceBillType: "收料通知单",
@@ -763,7 +769,8 @@
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 //选单模式
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
@@ -862,7 +869,8 @@
                        HBarCode: HBarCode,
                        HInterID: 0,
                        HEntryID: 0,
                        Mode: 1 //扫码模式
                        Mode: 1 ,//扫码模式
                        user:getUserInfo()["Czymc"]
                    }
                })
pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
@@ -696,7 +696,8 @@
                        HBarCode: HBarCode,
                        HInterID: 0,
                        HEntryID: 0,
                        Mode: 1 //扫码模式
                        Mode: 1, //扫码模式
                        user:getUserInfo()["Czymc"]
                    }
                })
            
@@ -709,7 +710,7 @@
                if (count == 1) {
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['产品名称']
                    this.hform.HMaterNumber = data[0]['HMaterNumber']
                    this.hform.HMaterNumber = data[0]['产品代码']
                    this.hform.HMainSourceBillNo = data[0]['HBillNo']
                    this.hform.HSourceBillNo = data[0]['HBillNo']
                    this.hform.HMainSourceInterID = data[0].HInterID
@@ -739,6 +740,69 @@
                    })
                }
            },
            async HandleBillSelectComplete(e) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
                        data: {
                            HBillType: this.hform.HBillType,
                            HSourceBillType: this.hform.HSourceBillType,
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        data,
                        Message,
                        count
                    } = res.data
                    if (count == 1) {
                        console.log('获取源单:', data)
                        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.HMainSourceInterID = data[0].HInterID
                        this.hform.HMainSourceEntryID = data[0].HEntryID
                        this.hform.HQCSchemeName = data[0].检验方案名称
                        this.hform.HQCSchemeID = data[0].检验方案ID
                        this.hform.HSourceBillQty = data[0].HSourceBillQty
                        this.hform.HICMOBillNo= data[0].任务单号
                        this.hform.HICMOInterID= data[0].HICMOInterID
                        this.hform.HICMOEntryID= data[0].HICMOEntryID
                        this.hform.HICMOQty= data[0].生产数量
                        this.hform.HProcExchBillNo= data[0].单据号
                        this.hform.HProcExchInterID= data[0].HInterID
                        this.hform.HProcExchEntryID= data[0].HEntryID
                        this.hform.HProcExchQty= data[0].流转卡数量
                        this.hform.HSourceName= data[0].生产资源
                        this.hform.HSourceID= data[0].HSourceID
                        this.hform.HProcID= data[0].HProcID
                        this.hform.HProcName= data[0].当前工序
                        this.get_CheckItem();
                        this.hasSourceBill = true
                        this.$refs['billList'].exit()
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: "源单下推错误: " + err
                    })
                }
            },
            async GetCheckItemID() {
                if (!this.hform.HMaterName && !this.hform.HProcName) {
                    try {
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
@@ -782,7 +782,8 @@
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 //选单模式
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
@@ -880,7 +881,8 @@
                        HBarCode: HBarCode,
                        HInterID: 0,
                        HEntryID: 0,
                        Mode: 1 //扫码模式
                        Mode: 1, //扫码模式
                        user:getUserInfo()["Czymc"]
                    }
                })
pages/ZLGL/shoujianjianyan/firstCheckBill.vue
@@ -705,7 +705,7 @@
            toScanCode() {
                MpaasScan.scanCode((res) => {
                    if (res) {
                        this.getSourceBillInfo(HBarCode);
                        this.getSourceBillInfo(res);
                    }
                });
            },
@@ -719,7 +719,8 @@
                        HBarCode: HBarCode,
                        HInterID: 0,
                        HEntryID: 0,
                        Mode: 1 //扫码模式
                        Mode: 1, //扫码模式
                        user:getUserInfo()["Czymc"]
                    }
                })
            
@@ -732,7 +733,7 @@
                if (count == 1) {
                    this.hform.HMaterID = data[0]['HMaterID']
                    this.hform.HMaterName = data[0]['产品名称']
                    this.hform.HMaterNumber = data[0]['HMaterNumber']
                    this.hform.HMaterNumber = data[0]['产品代码']
                    this.hform.HMainSourceBillNo = data[0]['HBillNo']
                    this.hform.HSourceBillNo = data[0]['HBillNo']
                    this.hform.HMainSourceInterID = data[0].HInterID
@@ -772,6 +773,69 @@
                // }
                
            },
            async HandleBillSelectComplete(e) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
                        data: {
                            HBillType: this.hform.HBillType,
                            HSourceBillType: this.hform.HSourceBillType,
                            HBarCode: "",
                            HInterID: e?.HInterID,
                            HEntryID: e?.HEntryID,
                            Mode: 2 ,//选单模式
                            user:getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        data,
                        Message,
                        count
                    } = res.data
                    if (count == 1) {
                        console.log('获取源单:', data)
                        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.HMainSourceInterID = data[0].HInterID
                        this.hform.HMainSourceEntryID = data[0].HEntryID
                        this.hform.HQCSchemeName = data[0].检验方案名称
                        this.hform.HQCSchemeID = data[0].检验方案ID
                        this.hform.HSourceBillQty = data[0].HSourceBillQty
                        this.hform.HICMOBillNo= data[0].任务单号
                        this.hform.HICMOInterID= data[0].HICMOInterID
                        this.hform.HICMOEntryID= data[0].HICMOEntryID
                        this.hform.HICMOQty= data[0].生产数量
                        this.hform.HProcExchBillNo= data[0].单据号
                        this.hform.HProcExchInterID= data[0].HInterID
                        this.hform.HProcExchEntryID= data[0].HEntryID
                        this.hform.HProcExchQty= data[0].流转卡数量
                        this.hform.HSourceName= data[0].生产资源
                        this.hform.HSourceID= data[0].HSourceID
                        this.hform.HProcID= data[0].HProcID
                        this.hform.HProcName= data[0].当前工序
                        this.get_CheckItem();
                        this.hasSourceBill = true
                        this.$refs['billList'].exit()
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: "源单下推错误: " + err
                    })
                }
            },
            async GetCheckItemID() {
                if (!this.hform.HMaterName && !this.hform.HProcName) {
                    try {
pages/index/index.vue
@@ -309,8 +309,8 @@
                    },
                    {
                        img: '../../static/icon/icon8.png',
                        text: '模具档案查询',
                        url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`,
                        text: '四码合一',
                        url: `/pages/simaheyi/BarCodeCheck_SN`,
                        id: 36,
                        hidden: false,
                    },
pages/index/mine.vue
@@ -27,12 +27,16 @@
<script>
    import { getUserInfo } from "@/utils/auth.js";
    import {
        CommonUtils
    } from '@/utils/common'
    export default {
        data() {
            return {
                userInfo:getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
                vers:uni.getStorageSync('vers'),
                checkCount:0,
              itemData:[{
                  img:'../../static/icon00.png',
                  text:'待我审核',
@@ -41,7 +45,7 @@
              },{
                  img:'../../static/icon01.png',
                  text:'已审核',
                  url:'',
                  url:'/pages/ZLGL/checkFlowList/QC_CheckedBillflowList',
                  id:1
              },{
                  img:'../../static/icon06.png',
@@ -69,8 +73,11 @@
              ]
            }
        },
        onLoad() {
        async onLoad() {
            console.log(this.userInfo)
            await this.cmdSearchFirst()
            await this.cmdSearchLast()
            this.itemData[0].text = `待我审核(${this.checkCount})`
        },
        methods: {
            toUrl(item){
@@ -100,8 +107,84 @@
                        }
                    }
                });
            },
            //获取待审批总数首件
            async cmdSearchFirst() {
                try {
                    let res = await CommonUtils.doRequest2Sync({
                        url: '/LEMS/CheckFlowList',
                        data: {
                            "sWhere": ' ',
                            "billType":8505,
                            "type":2,
                            "userid": getUserInfo()["Czybm"]
                        },
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count > 0) {
                        this.checkCount += res.data.data.length
                        console.log(res.data.data.length)
                    } else {
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }
                } catch (err) {
                    console.warn(err);
                    uni.showToast({
                        title: '接口请求失败:' + err,
                        icon: 'none'
                    })
                }
            },
            //末件全部
            async cmdSearchLast(){
                try {
                    let res = await CommonUtils.doRequest2Sync({
                        url: '/LEMS/CheckFlowList',
                        data: {
                            "sWhere": ' ',
                            "billType":8507,
                            "type":2,
                            "userid": getUserInfo()["Czybm"]
                        },
                    })
                    if (!res) {
                        return
                    }
                    let {
                        data,
                        count,
                        Message
                    } = res.data
                    if (count > 0) {
                        this.checkCount += res.data.data.length
                    } else {
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }
                } catch (err) {
                    console.warn(err);
                    uni.showToast({
                        title: '接口请求失败:' + err,
                        icon: 'none'
                    })
                }
            }
        }
        }
    }
</script>
pages/index/tab1.vue
@@ -110,25 +110,19 @@
                        img: '../../static/icon/icon14.png',
                        text: '我的报工平台',
                        tip: '点击进入',
                        url: '/pages/baogong/table',
                        url: '/pages/baogong/IpadIndex',
                        id: 11,
                        hidden: true,
                    }, {
                    },
                    {
                        img: '../../static/icon/icon32.png',
                        text: '设备运行状态',
                        tip: '查看详情',
                        url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai',
                        id: 14,
                        hidden: true,
                    }, {
                        img: '../../static/icon/icon6.png',
                        text: '模具状态分析',
                        tip: '查看详情',
                        url: '/pages/mujvzhuangtai/mujvzhuangtai',
                        id: 15,
                        hidden: true,
                    }, {
                    },
                    {
                        img: '../../static/icon/icon10.png',
                        text: '我的任务',
                        tip: '立即新增',
@@ -136,13 +130,7 @@
                        id: 16,
                        hidden: false,
                    }, 
                    {
                        img: '../../static/icon/icon16.png',
                        text: '器具寿命',
                        url: '/pages/shoujishouming/table',
                        id: 17,
                        hidden: false,
                    },
                    
                ]
                // itemData: [{
pages/index/tab2.vue
@@ -319,118 +319,7 @@
                        "id": 36,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具故障登记列表",
                        "url": "/pages/qijvguzhangdengji/mouldMistake",
                        "id": 37,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具故障登记单",
                        "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1",
                        "id": 38,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具维修记录列表",
                        "url": "/pages/weixiujilu/mouldRepairRecordBillList",
                        "id": 39,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具维修记录单",
                        "url": "/pages/weixiujilu/mouldRepairRecordBill",
                        "id": 40,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "首件检验单列表",
                        "url": "/pages/ZLGL/shoujianjianyan/firstCheckBillList",
                        "id": 41,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "首件检验单",
                        "url": "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1",
                        "id": 42,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "巡检检验单列表",
                        "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBillList",
                        "id": 43,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "巡检检验单",
                        "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill?operationType=1",
                        "id": 44,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单列表",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList",
                        "id": 45,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1",
                        "id": 46,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon5.png",
                        "text": "模具点检记录单列表",
                        "url": "/pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList",
                        "id": 47,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon5.png",
                        "text": "模具保养记录单列表",
                        "url": "/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList",
                        "id": 48,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料出库单列表",
                        "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList",
                        "id": 49,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料退库单列表",
                        "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList",
                        "id": 50,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具调拨单列表",
                        "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList",
                        "id": 51,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具报废出库单列表",
                        "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList",
                        "id": 51,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "装箱单暂存列表",
@@ -438,62 +327,7 @@
                        "id": 52,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验单",
                        "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBill",
                        "id": 53,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验列表",
                        "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBillList",
                        "id": 54,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "生产入库校验单",
                        "url": "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2",
                        "id": 53,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "出厂校验单",
                        "url": "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill",
                        "id": 54,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验(批量)",
                        "url": "/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "全检检验单",
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBill",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "全检检验单查询",
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "在库检验单查询",
                        "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBill",
                        "id": 58,
                        "hidden": false
                    }
                    
                ]
            }
pages/index/tab3.vue
New file
@@ -0,0 +1,281 @@
<template>
    <view class="content">
        <view class="header">
            <view class="switch-button">
                <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons>
            </view>
        </view>
        <view class="mains">
            <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" :key="index"
                @tap="toUrl(item)">
                <image :src="item.img" mode=""></image>
                <view class="texts">
                    {{item.text}}
                </view>
            </view>
            <view :enable-hidden="item.hidden" :hidden="!item.id" v-if="canEdit" class="box edit" v-for="(item,index) in itemData"
                :key="index" @tap="switchHidden(index)">
                <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
                <image :src="item.img" mode=""></image>
                <view class="texts">
                    {{item.text}}
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '../../utils/common'
    import {
        getMenuList,
        setMenuList
    } from '../../utils/menuListApp'
    import {
        getUserInfo
    } from '../../utils/auth'
    export default {
        data() {
            return {
                updateCount: 0,
                menuListName: 'tab3',
                canEdit: false,
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                itemData: [
                    {
                        img: '../../static/icon/icon6.png',
                        text: '模具状态分析',
                        tip: '查看详情',
                        url: '/pages/mujvzhuangtai/mujvzhuangtai',
                        id: 15,
                        hidden: false,
                    },
                    {
                        img: '../../static/icon/icon8.png',
                        text: '模具档案查询',
                        url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`,
                        id: 36,
                        hidden: false,
                    },
                    {
                        img: '../../static/icon/icon16.png',
                        text: '器具寿命',
                        url: '/pages/shoujishouming/table',
                        id: 17,
                        hidden: false,
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具故障登记列表",
                        "url": "/pages/qijvguzhangdengji/mouldMistake",
                        "id": 37,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具故障登记单",
                        "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1",
                        "id": 38,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具维修记录列表",
                        "url": "/pages/weixiujilu/mouldRepairRecordBillList",
                        "id": 39,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "模具维修记录单",
                        "url": "/pages/weixiujilu/mouldRepairRecordBill",
                        "id": 40,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon5.png",
                        "text": "模具点检记录单列表",
                        "url": "/pages/MJGL/mujudianjianjiludan/MouldDotCheckPlanBillList",
                        "id": 47,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon5.png",
                        "text": "模具保养记录单列表",
                        "url": "/pages/MJGL/mujubaoyangjiludan/mouldMaintainRecordBillList",
                        "id": 48,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料出库单列表",
                        "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList",
                        "id": 49,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具领料退库单列表",
                        "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList",
                        "id": 50,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具调拨单列表",
                        "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList",
                        "id": 51,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "模具报废出库单列表",
                        "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList",
                        "id": 51,
                        "hidden": false
                    },
                ]
            }
        },
        onLoad() {
            this.getHiddenItem()
        },
        methods: {
            judgeHidden() {
                return process.env.NODE_ENV === 'development'
            },
            async getHiddenItem() {
                let data = await getMenuList({
                    menuName: this.menuListName
                })
                Array.from(data).forEach(e => {
                    this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"])
                    this.itemData[e["HIndex"]].id = e["HEntryID"];//id为0强制隐藏
                })
            },
            switchHidden(index) {
                this.updateCount++;
                this.itemData[index].hidden = !this.itemData[index].hidden
            },
            switchIconsModeHandler() {
                this.canEdit = !this.canEdit
                if (this.canEdit == false && this.updateCount > 0) {
                    this.$nextTick(() => {
                        // uni.setStorageSync("HIndexItemData", this.itemData)
                        setMenuList({
                            menuName: this.menuListName,
                            payload: this.itemData
                        })
                        this.updateCount = 0
                    })
                }
                this.$forceUpdate()
            },
            toUrl(item) {
                if (item.url) {
                    uni.navigateTo({
                        url: item.url
                    })
                } else {
                    uni.showToast({
                        title: '功能开发中。。。',
                        icon: 'none'
                    })
                }
            }
        }
    }
</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%;
        height: 2em;
        position: relative;
        .switch-button {
            position: absolute;
            right: 10rpx;
            bottom: 0;
        }
    }
    .mains {
        width: 720rpx;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        padding-bottom: 80rpx;
        .box {
            width: 25%;
            margin-top: 2.5vh;
            text-align: center;
            image {
                width: 18vw;
                height: 18vw;
            }
            .texts {
                width: 120rpx;
                margin: 0 auto;
                font-size: 29rpx;
                font-weight: normal;
                color: #333333;
                margin-top: .2vh;
            }
        }
        .edit {
            position: relative;
        }
        .edit-mark {
            position: absolute;
            top: 0;
            right: 0;
        }
        view[enable-hidden] {
            opacity: .4 !important;
        }
        view[hidden] {
            display: none;
        }
    }
</style>
pages/index/tab4.vue
New file
@@ -0,0 +1,278 @@
<template>
    <view class="content">
        <view class="header">
            <view class="switch-button">
                <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons>
            </view>
        </view>
        <view class="mains">
            <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" :key="index"
                @tap="toUrl(item)">
                <image :src="item.img" mode=""></image>
                <view class="texts">
                    {{item.text}}
                </view>
            </view>
            <view :enable-hidden="item.hidden" :hidden="!item.id" v-if="canEdit" class="box edit" v-for="(item,index) in itemData"
                :key="index" @tap="switchHidden(index)">
                <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
                <image :src="item.img" mode=""></image>
                <view class="texts">
                    {{item.text}}
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '../../utils/common'
    import {
        getMenuList,
        setMenuList
    } from '../../utils/menuListApp'
    import {
        getUserInfo
    } from '../../utils/auth'
    export default {
        data() {
            return {
                updateCount: 0,
                menuListName: 'tab4',
                canEdit: false,
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                itemData: [
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "首件检验单列表",
                        "url": "/pages/ZLGL/shoujianjianyan/firstCheckBillList",
                        "id": 41,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon13.png",
                        "text": "首件检验单",
                        "url": "/pages/ZLGL/shoujianjianyan/firstCheckBill?operationType=1",
                        "id": 42,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "巡检检验单列表",
                        "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBillList",
                        "id": 43,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "巡检检验单",
                        "url": "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill?operationType=1",
                        "id": 44,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单列表",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList",
                        "id": 45,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "末件检验单",
                        "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1",
                        "id": 46,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验单",
                        "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBill",
                        "id": 53,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验列表",
                        "url": "/pages/ZLGL/lailiaojianyan/POStockInCheckBillList",
                        "id": 54,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "生产入库检验单",
                        "url": "/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2",
                        "id": 53,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "出厂校验单",
                        "url": "/pages/ZLGL/chuchangjiaoyandan/QC_OutCompCheckBill",
                        "id": 54,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "来料检验(批量)",
                        "url": "/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "全检检验单",
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBill",
                        "id": 55,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "全检检验单查询",
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
                        "id": 55,
                        "hidden": false
                    }
                ]
            }
        },
        onLoad() {
            this.getHiddenItem()
        },
        methods: {
            judgeHidden() {
                return process.env.NODE_ENV === 'development'
            },
            async getHiddenItem() {
                let data = await getMenuList({
                    menuName: this.menuListName
                })
                Array.from(data).forEach(e => {
                    this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"])
                    this.itemData[e["HIndex"]].id = e["HEntryID"];//id为0强制隐藏
                })
            },
            switchHidden(index) {
                this.updateCount++;
                this.itemData[index].hidden = !this.itemData[index].hidden
            },
            switchIconsModeHandler() {
                this.canEdit = !this.canEdit
                if (this.canEdit == false && this.updateCount > 0) {
                    this.$nextTick(() => {
                        // uni.setStorageSync("HIndexItemData", this.itemData)
                        setMenuList({
                            menuName: this.menuListName,
                            payload: this.itemData
                        })
                        this.updateCount = 0
                    })
                }
                this.$forceUpdate()
            },
            toUrl(item) {
                if (item.url) {
                    uni.navigateTo({
                        url: item.url
                    })
                } else {
                    uni.showToast({
                        title: '功能开发中。。。',
                        icon: 'none'
                    })
                }
            }
        }
    }
</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%;
        height: 2em;
        position: relative;
        .switch-button {
            position: absolute;
            right: 10rpx;
            bottom: 0;
        }
    }
    .mains {
        width: 720rpx;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        padding-bottom: 80rpx;
        .box {
            width: 25%;
            margin-top: 2.5vh;
            text-align: center;
            image {
                width: 18vw;
                height: 18vw;
            }
            .texts {
                width: 120rpx;
                margin: 0 auto;
                font-size: 29rpx;
                font-weight: normal;
                color: #333333;
                margin-top: .2vh;
            }
        }
        .edit {
            position: relative;
        }
        .edit-mark {
            position: absolute;
            top: 0;
            right: 0;
        }
        view[enable-hidden] {
            opacity: .4 !important;
        }
        view[hidden] {
            display: none;
        }
    }
</style>
pages/mujvzhuangtai/mujvzhuangtai.vue
@@ -3,13 +3,15 @@
        <view class="container">
            <view class="warehouse-selector">
                <view class="left">当前仓库:</view>
                <picker :range="warehouseRange" :value="warehouseSelected" @change="warehouseChange">
                    <view class="right">
                        <input type="text" disabled v-model="warehouseSelected" placeholder="请选择当前仓库">
                        <uni-icons type="forward" color="#808080"
                            style="border-left: 1rpx solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
                    </view>
                </picker>
                <zxz-uni-data-select
                    v-model="HWHID"
                    dataKey="HName"
                    dataValue="HItemID"
                    :filterable="true"
                    :localdata="HWHList"
                    :clear="false"
                    @change="warehouseChange"
                ></zxz-uni-data-select>
            </view>
            <!-- 分割线 -->
@@ -31,6 +33,9 @@
                            </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['设计寿命']}}
@@ -80,12 +85,12 @@
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import { CommonUtils } from '@/utils/common';
    export default {
        data() {
            return {
                warehouseRange: [],
                warehouseIDRange: [],
                warehouseSelected: "",
                HWHList: [],
                HWHID:getUserInfo()["HWhID"],
                userInfo: getUserInfo(),
                organInfo: {
                    id: uni.getStorageSync("OrganizationID") || "",
@@ -130,14 +135,12 @@
                })
                uni.hideLoading()
            },
            async warehouseChange(e) {
                let index = e.detail.value
                this.warehouseSelected = this.warehouseRange[index]
                let id = this.warehouseIDRange[index]
            async warehouseChange() {
                let id = this.HWHID
                this.moulds = []
                this.doRequest(
                    "/Web/Get_Sc_MouldStatusAnalysisList", {
                        sWhere: ` and HWHID = ${id}`,
                        sWhere: ` and HWHID = ${id} and HUSEORGID = ${uni.getStorageSync("OrganizationID")}`,
                        user: this.userInfo.Czymc,
                        Organization: this.organInfo.name
                    },
@@ -163,36 +166,27 @@
                )
            },
            async initWHSelector() {
                this.doRequest(
                    "/Gy_Warehouse/listTree", {
                        sWhere: "",
                        user: this.userInfo.Czymc,
                        Organization: this.organInfo.name
                    },
                    function(res) {
                        console.log(res)
                        let {
                            count,
                            data
                        } = res.data
                        this.warehouseRange = []
                        this.warehouseIDRange = []
                        if (count > 0) {
                            JSON.parse(data)[0].children.forEach(item => {
                                this.warehouseRange.push(`${item.Number}-${item.Title}`)
                                this.warehouseIDRange.push(item.Id)
                            })
                        }
                        this.warehouseChange({
                            detail: {
                                value: 0
                            }
                        })
                    },
                    function(err) {
                        console.error(err)
                    },
                CommonUtils.doRequest(
                    "/Web/GetWarehouseList_Json_New", {
                        Warehouse: "",
                        HOrgID: uni.getStorageSync('OrganizationID')
                    },
                    (res) => {
                        let res1 = res.data
                        let {
                            data,
                            count
                        } = res1
                        if (count == 1) {
                            this.HWHList = data
                            this.warehouseChange();
                        } else {
                            uni.showToast({
                                title: '仓库数据请求失败',
                                icon: 'none'
                            })
                        }
                    },
                )
            },
            ToDetail(item) {
@@ -205,37 +199,35 @@
            await this.initWHSelector()
        },
        onPullDownRefresh() {
            let whIndex = this.warehouseRange.indexOf(this.warehouseSelected);
            if(whIndex != -1){
                let id = this.warehouseIDRange[whIndex]
                this.moulds = []
                this.doRequest(
                    "/Web/Get_Sc_MouldStatusAnalysisList", {
                        sWhere: ` and HWHID = ${id}`,
                        user: this.userInfo.Czymc,
                        Organization: this.organInfo.name
                    },
                    function(res) {
                        console.log(res)
                        let res1 = res.data
                        let {
                            data,
                            count
                        } = res1
                        if (count > 0) {
                            console.log(data)
                            this.moulds = data.map(item => {
                                return Object.assign(item, {
                                    imgSrc: "../../static/mold.png"
                                })
            let id = this.HWHID
            this.moulds = []
            this.doRequest(
                "/Web/Get_Sc_MouldStatusAnalysisList", {
                    sWhere: ` and HWHID = ${id}  and HUSEORGID = ${uni.getStorageSync("OrganizationID")}`,
                    user: this.userInfo.Czymc,
                    Organization: this.organInfo.name
                },
                function(res) {
                    console.log(res)
                    let res1 = res.data
                    let {
                        data,
                        count
                    } = res1
                    if (count > 0) {
                        console.log(data)
                        this.moulds = data.map(item => {
                            return Object.assign(item, {
                                imgSrc: "../../static/mold.png"
                            })
                        }
                    },
                    function(err) {
                        console.error(err)
                        })
                    }
                )
            }
                },
                function(err) {
                    console.error(err)
                }
            )
            uni.stopPullDownRefresh()
        }
    }
pages/qijvguzhangdengji/mouldMistakeBill.vue
@@ -803,9 +803,10 @@
                    message = '未填写部门'
                } else if (!this.hform.HEmpName) {
                    message = '未填写发现人'
                } else if (!this.hform.HManagerName) {
                    message = '未填写负责人'
                }
                }
                // else if (!this.hform.HManagerName) {
    //                 message = '未填写负责人'
    //             }
                if (!message) {
                    return true
pages/simaheyi/BarCodeCheck_SN.vue
New file
@@ -0,0 +1,874 @@
<template>
    <view class="form">
        <view class="form-base-info">
            <view class="form-item">
                <view class="title">栈板码</view>
                <!-- 按照源单物料样式添加disabled类和禁用属性 -->
                <view class="right" :class="disableBarCodePallet ? 'disabled' : ''">
                    <input type="text" :focus="HBarCodePalletFocus" v-model="HBarCode_Pallet"
                        @confirm="CheckBarcode(HBarCode_Pallet,1)" :disabled="disableBarCodePallet" />
                </view>
                <view class="right-icon">
                    <uni-icons class="right-icon" :class="disableBarCodePallet ? 'disabled':''" type="scan"
                        style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20"
                        @click="toScanCode" :disabled="disableBarCodePallet"></uni-icons>
                </view>
            </view>
            <view class="form-item">
                <view class="title">目的仓码</view>
                <!-- 按照源单物料样式添加disabled类和禁用属性 -->
                <view class="right" :class="disableBarCodeDest ? 'disabled' : ''">
                    <input type="text" :focus="HBarCodeDestFocus" v-model="HBarCode_Destination"
                        @confirm="CheckBarcode(HBarCode_Destination,2)" :disabled="disableBarCodeDest" />
                </view>
                <view class="right-icon">
                    <uni-icons class="right-icon" :class="disableBarCodeDest ? 'disabled':''" type="scan"
                        style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20"
                        @click="toScanCode" :disabled="disableBarCodeDest"></uni-icons>
                </view>
            </view>
            <view class="form-item">
                <view class="title">中箱码</view>
                <!-- 按照源单物料样式添加disabled类和禁用属性 -->
                <view class="right" :class="disableBarCodeMiddle ? 'disabled' : ''">
                    <input type="text" :focus="HBarCodeMiddleFocus" v-model="HBarCode_MiddleBox "
                        @confirm="CheckBarcode(HBarCode_MiddleBox,3)" :disabled="disableBarCodeMiddle" />
                </view>
                <view class="right-icon">
                    <uni-icons class="right-icon" :class="disableBarCodeMiddle ? 'disabled':''" type="scan"
                        style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20"
                        @click="toScanCode" :disabled="disableBarCodeMiddle"></uni-icons>
                </view>
            </view>
            <view class="form-item">
                <view class="title">产品码</view>
                <!-- 按照源单物料样式添加disabled类和禁用属性 -->
                <view class="right" :class="disableBarCodeSN ? 'disabled' : ''">
                    <input type="text" :focus="HBarCodeSNFocus" v-model="HBarCode_SN"
                        @confirm="CheckBarcode(HBarCode_SN,4)" :disabled="disableBarCodeSN" />
                </view>
                <view class="right-icon">
                    <uni-icons class="right-icon" :class="[disableBarCodeSN ? 'disabled':'']" type="scan"
                        style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20"
                        @click="toScanCode" :disabled="disableBarCodeSN"></uni-icons>
                </view>
            </view>
        </view>
        <view class="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">复核信息</view>
            <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">单据信息</view>
        </view>
        <!-- 复核信息 -->
        <view v-if="tabs == 0">
            <zb-table id="list-table" :checked-highlight="true" :fit="true" :style="{height: `${listTableHeight}px`}"
                :columns="columns" :data="listData" :show-header="true" :border="true" :row-key="row => row.index"
                @toggleRowSelection="handleSelect" @toggleAllSelection="handleSelectAll"
                @rowClick="onTableRowClickHandler" />
        </view>
        <!-- 单据信息 -->
        <view v-if="tabs == 1">
            <view class="bill-info">
                <view class="form-item">
                    <view class="title">单据日期</view>
                    <view class="right">
                        <uni-datetime-picker type="date" v-model="hform.HDate">
                            <input type="text" v-model="hform.HDate" />
                        </uni-datetime-picker>
                    </view>
                </view>
            </view>
            <view class="bill-info">
                <view class="form-item">
                    <view class="title">制单人</view>
                    <view class="right disabled">
                        <input type="text" disabled :value="hform.HMaker" />
                    </view>
                </view>
            </view>
            <view class="bill-info">
                <view class="form-item">
                    <view class="title">单据号</view>
                    <view class="right disabled">
                        <input type="text" disabled :value="hform.HBillNo" />
                    </view>
                </view>
            </view>
            <view class="bill-info">
                <view class="form-item">
                    <view class="title">单据ID</view>
                    <view class="right disabled">
                        <input type="text" disabled :value="hform.HInterID" />
                    </view>
                </view>
            </view>
            <view class="bill-info">
                <view class="form-item">
                    <view class="title">组织</view>
                    <view class="right disabled">
                        <input type="text" disabled :value="hform.HStockOrgName" />
                    </view>
                </view>
            </view>
        </view>
        <view class="bottom-btn" id="bottom-btn">
            <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini"
                @tap="cmdSubmit">提交</button>
            <view style="flex: 1;"></view>
            <button class="btn-d" size="mini" @tap="cmdDelete">删除</button>
            <button class="btn-c" size="mini" @tap="cmdExit">退出</button>
        </view>
    </view>
</template>
<script>
    import dayjs from 'dayjs'
    import {
        getUserInfo
    } from "../../utils/auth";
    import {
        CommonUtils
    } from "@/utils/common.js"
    import {
        MpaasScan
    } from "@/utils/mpaasScan.js"
    export default {
        data() {
            return {
                // ==================== 布局计算相关 ====================
                // 计算列表高度
                bottomBtnTop: 0,
                listTableTop: 0,
                // ==================== 界面状态控制 ====================
                EnableSubmit: true, // 是否允许提交
                disableBarCodePallet: false, // 栈板码禁用状态
                disableBarCodeDest: false, // 目的仓码禁用状态
                disableBarCodeMiddle: false, // 中箱码禁用状态
                disableBarCodeSN: false, // 产品码禁用状态
                HBarCodePalletFocus: false, // 栈板码输入框聚焦状态
                HBarCodeDestFocus: false, // 目的仓码输入框聚焦状态
                HBarCodeMiddleFocus: false, // 中箱码输入框聚焦状态
                HBarCodeSNFocus: false, // 产品码输入框聚焦状态
                tabs: 0, // 当前选项卡(0:单据信息,1:装箱信息)
                // ==================== 业务数据 ====================
                HBarCode_Pallet: '', // 栈板码
                HBarCode_Destination: '', //目的仓码
                HBarCode_MiddleBox: '', //中箱码
                HBarCode_SN: '', // 产品码
                HBillType: '1283', // 单据类型
                HBillSubType: '1', // 子类型(1装箱、2组托)
                OperationType: 1, // 操作类型(1新增、2从缓存列表中返回)
                HMaterNumber_Pack: "", // 托条码对应物料代码
                HBarCode_Pallet_Temp: "", // 从缓存列表中返回栈板码
                BarCodeType: 1, // 条码类型(1:装箱,2:组托)
                // ==================== 列表数据 ====================
                listOption: [], // 列表选项
                listData: [], // 表格数据
                selectedRows: [], // 表格选中的数据
                columns: [ // 表格列配置
                    {
                        type: 'selection',
                        fixed: true,
                        width: 50
                    },
                    {
                        name: 'index',
                        label: '序号',
                        width: 60,
                        hidden: true
                    },
                    {
                        name: '栈板码',
                        label: '栈板码',
                        width: 200
                    },
                    {
                        name: '目的仓码',
                        label: '目的仓码',
                        width: 200
                    },
                    {
                        name: '中箱码',
                        label: '中箱码',
                        width: 200
                    },
                    {
                        name: 'SN码',
                        label: 'SN码',
                        width: 200
                    }
                ],
                // ==================== 主表单数据 ====================
                hform: {
                    HDate: dayjs(new Date()).format('YYYY-MM-DD'), // 单据日期
                    HMaker: getUserInfo()['Czymc'], // 制单人
                    HBillNo: '', // 单据号
                    HInterID: '', // 单据ID
                    HStockOrgName: uni.getStorageSync("Organization"), // 组织名称
                    HStockOrgID: uni.getStorageSync("OrganizationID"), // 组织ID
                },
                // ==================== 系统配置 ====================
                HModName: "Sc_PackUnionBill_Packing_PDA", // 模块名称
                ModRightName: "CE_PackUnionBill_Packing", // 模块权限参数
                titleData: [] // 不需要显示的字段
            }
        },
        components: {
        },
        // ==================== 计算属性 ====================
        computed: {
            // 计算表格高度
            listTableHeight: {
                get() {
                    return this.bottomBtnTop - this.listTableTop - 10
                }
            }
        },
        // ==================== 方法 ====================
        methods: {
            // 复选框变化处理
            checkboxGroupChangeHandler(e) {
                let checkBoxValues = Array.from(e.detail.value)
                this.hform.HQualityApproval = checkBoxValues.includes('qualityApproval')
            },
            // 表格行点击处理
            onTableRowClickHandler(row, index) {
                if (!this.listData[index].checked) {
                    this.$set(this.listData[index], 'checked', true)
                } else {
                    this.listData[index].checked = !this.listData[index].checked
                }
            },
            // 刷新SN码输入框焦点
            async HBarCodeSNFocusRefresh() {
                this.HBarCode_SN = ''
                this.HBarCodeSNFocus = false
                await this.$nextTick()
                this.HBarCodeSNFocus = true
            },
            // 刷新栈板码输入框焦点
            async HBarCodePalletFocusRefresh() {
                this.HBarCode_Pallet = ''
                this.HBarCodePalletFocus = false
                await this.$nextTick()
                this.HBarCodePalletFocus = true
            },
            // 刷新目的仓码输入框焦点
            async HBarCodeDestFocusRefresh() {
                this.HBarCode_Destination = ''
                this.HBarCodeDestFocus = false
                await this.$nextTick()
                this.HBarCodeDestFocus = true
            },
            // 刷新中箱码输入框焦点
            async HBarCodeMiddleFocusRefresh() {
                this.HBarCode_MiddleBox = ''
                this.HBarCodeMiddleFocus = false
                await this.$nextTick()
                this.HBarCodeMiddleFocus = true
            },
            // 扫描栈板码
            toScanCode() {
                MpaasScan.scanCode((scanCode) => {
                    this.HBarCode_Pallet = scanCode
                    this.CheckBarcode(this.HBarCode_Pallet, 1)
                })
            },
            // 扫描目的仓码
            toScanCode() {
                MpaasScan.scanCode((scanCode) => {
                    this.HBarCode_Destination = scanCode
                    this.CheckBarcode(this.HBarCode_Destination, 2)
                })
            },
            // 扫描中箱码
            toScanCode() {
                MpaasScan.scanCode((scanCode) => {
                    this.HBarCode_MiddleBox = scanCode
                    this.CheckBarcode(this.HBarCode_MiddleBox, 3)
                })
            },
            // 扫描产品SN码
            toScanCode() {
                MpaasScan.scanCode((scanCode) => {
                    this.HBarCode_SN = scanCode
                    this.CheckBarcode(this.HBarCode_SN, 4)
                })
            },
            // 扫条码核对校验信息
            CheckBarcode(HBarCode, HBarCodeType) {
                CommonUtils.doRequest2({
                    url: '/CheckBarcodeController/Get_BarCode_BarcodeCheck',
                    data: {
                        HBarCode_Pallet: this.HBarCode_Pallet,
                        HBarCode_Destination: this.HBarCode_Destination,
                        HBarCode_MiddleBox: this.HBarCode_MiddleBox,
                        HBarCode_SN: this.HBarCode_SN,
                        HBarCodeType: HBarCodeType,
                        HInterID: this.hform.HInterID,
                        HBillNo: this.hform.HBillNo,
                        HMaker: this.hform.HMaker
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message,
                            list
                        } = res.data
                        if (count == 1) {
                            CommonUtils.playSound(1)
                            if(HBarCodeType == 1){
                                //处理成功后聚焦到目的仓码输入框
                                this.HBarCodeDestFocusRefresh()
                            }else if(HBarCodeType == 2){
                                //处理成功后聚焦到中箱码输入框
                                this.HBarCodeMiddleFocusRefresh()
                            }else if(HBarCodeType == 3){
                                //处理成功后聚焦到SN码输入框
                                this.HBarCodeSNFocusRefresh()
                            }else if(HBarCodeType == 4){
                                //处理成功后聚焦到SN码输入框
                                this.HBarCodeSNFocusRefresh()
                            }
                            //this.DisBillEntryList();
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                            this.listData = [];
                            for (let i = 0; i < data.length; i++) {
                                this.listData.push(Object.assign(data[i], {
                                    index: i
                                }))
                            }
                        } else {
                            CommonUtils.playSound(0)
                            this.HBarCodePalletFocusRefresh()
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    }
                })
            },
            // 根据产品码获取信息
            GetMeesageByBarCode(HBarCode) {
                let HBarCode_Pallet = this.HBarCode_Pallet
                let sOldBarCode = this.HBarCode_SN
                let HDeleteFlag = sOldBarCode.substring(0, 1)
                let sBarCode = sOldBarCode.slice(1)
                if (!HBarCode_Pallet) {
                    return uni.showToast({
                        icon: 'none',
                        title: '栈板码不能为空,请先扫描托条码!'
                    })
                }
                if (HDeleteFlag == '*') {
                    // 删除条码逻辑
                    if (!sBarCode) {
                        return uni.showToast({
                            icon: 'none',
                            title: '请扫描要删除的条码'
                        })
                    } else {
                        this.HBarCodeSNFocusRefresh()
                    }
                    CommonUtils.doRequest2({
                        url: '/WEBSController/set_DelPackUnionBill_Temp_Pack_Json',
                        data: {
                            "HInterID": this.hform.HInterID,
                            "HBarCode": sBarCode,
                            "HBillType": this.HBillType
                        },
                        resFunction: (res) => {
                            let {
                                data,
                                count,
                                Message
                            } = res.data
                            if (count == 1) {
                                CommonUtils.playSound(1)
                                this.tabs = 1
                                this.DisBillEntryList()
                            } else {
                                CommonUtils.playSound(0)
                                uni.showToast({
                                    icon: 'none',
                                    title: Message
                                })
                            }
                        }
                    })
                } else {
                    // 新增条码逻辑
                    let sBarCode = this.HBarCode_SN
                    if (!sBarCode) {
                        return uni.showToast({
                            icon: 'none',
                            title: '条码不能为空,请扫描条码!'
                        })
                    }
                    CommonUtils.doRequest2({
                        url: '/WEBSController/Get_BarCode_PackUnionBill_New_Json_Cus',
                        data: {
                            "HBarCode": sBarCode,
                            "HInterID": this.hform.HInterID,
                            "HBillNo": this.hform.HBillNo,
                            "HBillType": this.HBillType,
                            "HBillSubType": this.HBillSubType,
                            "HBarCode_Pallet": this.HBarCode_Pallet,
                            "HMaterNumber_Pack": this.HMaterNumber_Pack,
                            "HMaker": this.hform.HMaker,
                            "HStockOrgID": this.hform.HStockOrgID
                        },
                        resFunction: (res) => {
                            let {
                                data,
                                count,
                                Message
                            } = res.data
                            if (count == 1) {
                                CommonUtils.playSound(1)
                                this.tabs = 1
                                this.HBarCodeSNFocusRefresh()
                                this.DisBillEntryList()
                            } else {
                                CommonUtils.playSound(0)
                                this.HBarCodeSNFocusRefresh()
                                uni.showToast({
                                    icon: 'none',
                                    title: Message
                                })
                            }
                        }
                    })
                }
            },
            // 显示单据明细列表
            DisBillEntryList() {
                CommonUtils.doRequest2({
                    url: '/WEBSController/GetBillEntry_Tmp_Pack_Json',
                    data: {
                        "HInterID": this.hform.HInterID,
                        "HBillNo": this.hform.HBillNo,
                        "HBillType": this.HBillType
                    },
                    resFunction: (res) => {
                        let {
                            count,
                            data,
                            Message
                        } = res.data
                        this.listData = []
                        if (count == 1) {
                            for (let i = 0; i < data.length; i++) {
                                this.listData.push(Object.assign(data[i], {
                                    index: i
                                }))
                            }
                        } else {
                        }
                    }
                })
            },
            // 表格选择处理
            handleSelect(selected, array) {
                this.selectedRows = array
            },
            // 表格全选处理
            handleSelectAll(selected, array) {
                this.selectedRows = array
            },
            // 播放提示音
            playSound(type) {
                const innerAudioContext = uni.createInnerAudioContext();
                innerAudioContext.src = type == 1 ? '/static/success.wav' : '/static/jingbao.wav';
                innerAudioContext.play();
            },
            // 获取最大单据号
            getMaxNo() {
                CommonUtils.doRequest2({
                    url: "/WEBSController/GetMaxBillNoAndID_Json",
                    data: {
                        "HBillType": this.HBillType
                    },
                    resFunction: (d) => {
                        let {
                            count,
                            data,
                            Message
                        } = d.data
                        if (count == 1) {
                            this.hform.HInterID = data[0].HInterID;
                            this.hform.HBillNo = data[0].HBillNo
                        } else {
                            uni.showModal({
                                title: "温馨提示",
                                showCancel: false,
                                content: Message
                            })
                        }
                    }
                })
            },
            // 提交前检查
            submitPreCheck() {
                if (CommonUtils.isEmpty(this.hform.HInterID)) {
                    uni.showToast({
                        icon: 'none',
                        title: '单据内码获取失败,错误的单据内码!'
                    })
                    return false
                }
                if (CommonUtils.isEmpty(this.hform.HBillNo)) {
                    uni.showToast({
                        icon: 'none',
                        title: '单据号获取失败,错误的单据号!'
                    })
                    return false
                }
                if (this.listData.length < 1) {
                    uni.showToast({
                        icon: 'none',
                        title: '没有扫码信息,请先扫描条码,确认无误后再提交!'
                    })
                    return false
                }
                return true
            },
            // 删除选中行
            cmdDelete() {
                if (this.selectedRows.length != 1) {
                    return uni.showToast({
                        icon: 'none',
                        title: '请选择一行记录,进行删除!'
                    })
                }
                uni.showModal({
                    title: '删除确认',
                    content: '确认要删除选中行所有扫码记录?删除后将不可恢复!',
                    success: ({
                        confirm
                    }) => {
                        if (confirm) {
                            CommonUtils.doRequest2({
                                url: '/WEBSController/set_DelPackUnionBill_Temp_Pack_Json',
                                data: {
                                    HInterID: this.hform.HInterID,
                                    HBillType: this.HBillType,
                                    HBarCode: this.selectedRows[0].HBarCode_SN
                                },
                                resFunction: (res) => {
                                    let {
                                        data,
                                        count,
                                        Message
                                    } = res.data
                                    if (count == 1) {
                                        CommonUtils.playSound(1)
                                        uni.showToast({
                                            icon: 'none',
                                            title: Message
                                        })
                                        this.DisBillEntryList()
                                    } else {
                                        CommonUtils.playSound(0)
                                        uni.showToast({
                                            icon: 'none',
                                            title: Message
                                        })
                                    }
                                }
                            })
                        }
                    }
                })
            },
            // 提交单据
            cmdSubmit() {
                let checkRes = this.submitPreCheck()
                if (!checkRes) return
                this.EnableSubmit = false
                CommonUtils.doRequest2({
                    url: '/CheckBarcodeController/Save_BarCode_BarcodeCheck',
                    data: {
                        "HInterID": this.hform.HInterID,
                        "HBillNo": this.hform.HBillNo
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count == 1) {
                            uni.showModal({
                                title: '温馨提示',
                                content: Message,
                                confirmText: "新增",
                                cancelText: '关闭',
                                success: ({
                                    confirm,
                                    cancel
                                }) => {
                                    if (confirm) {
                                        uni.redirectTo({
                                            url: "/pages/sanmaheyi/BarCodeCheck"
                                        })
                                    }
                                    if (cancel) {
                                        uni.navigateBack()
                                    }
                                }
                            })
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    }
                })
            },
            // 退出页面
            cmdExit() {
                uni.navigateBack()
            }
        },
        // ==================== 生命周期 ====================
        async onReady() {
            // 计算表格高度
            // #ifndef MP-WEIXIN
            let query = uni.createSelectorQuery().in(this)
            query.select("#bottom-btn").boundingClientRect((data) => {
                if (data) this.bottomBtnTop = data.top
            }).exec();
            query.select("#list-table").boundingClientRect((data) => {
                if (data) this.listTableTop = data.top
            }).exec();
            // #endif
        },
        onLoad(e) {
            // 初始化参数
            this.BarCodeType = e.BarCodeType || 1
            this.OperationType = e.OperationType || 1
            this.HBarCode_Pallet = e.HBarCode_Pallet_Temp || ""
            this.hform.HSourceBillNo = e.HSourceBillNo || ""
            this.HBarCode_Destination = e.HBarCode_Destination || ""
            this.HBarCode_MiddleBox = e.HBarCode_MiddleBox || ""
            // 根据操作类型初始化数据
            if (this.OperationType == 1) {
                this.getMaxNo() // 新增模式:获取新单据号
                // 初始化时聚焦到源单单号
                this.HSourcebillNoFocus = true
            } else if (this.OperationType == 2) {
                this.disableBarCodePallet = false
                this.disableBarCodeDest = false
                this.disableBarCodeMiddle = false
                this.disableBarCodeSN = false
                this.CheckBarcode(this.HBarCode_Pallet, 1) // 缓存模式:加载已有数据
                this.DisBillEntryList()
                this.tabs = 0
            }
            // 默认聚焦到栈板码输入框
            this.HBarCodePalletFocusRefresh()
        },
        onUnload() {
            uni.$off('BillSelectComplete')
        }
    }
</script>
<style lang="scss">
    input {
        width: inherit;
        padding: 8rpx 20rpx;
        font-size: 30rpx;
    }
    .form {
        display: flex;
        flex-direction: column;
        gap: 20rpx;
        .form-base-info {
            display: flex;
            flex-direction: column;
            gap: 10rpx;
            box-sizing: border-box;
            padding: 30rpx;
        }
        .bill-info {
            display: flex;
            flex-direction: column;
            gap: 10rpx;
            box-sizing: border-box;
            padding: 16rpx 30rpx;
        }
        .form-item {
            display: flex;
            flex-direction: row;
            gap: 10rpx;
            .title {
                width: 5rem;
                flex-shrink: 0;
            }
            .right {
                flex: 1;
                border-radius: 22rpx;
                border: 1px solid #acacac;
            }
            .disabled {
                border: 1px solid #e4e4e4;
                background-color: #e4e4e4;
            }
            .right-icon {
                flex-shrink: 0;
                display: flex;
                justify-content: center;
                align-items: center;
            }
            .icon-wrapper {
                background-color: #3A78FF;
                border-radius: 100%;
                width: 52rpx;
                height: 52rpx;
                display: flex;
                justify-content: center;
                align-items: center;
                flex-shrink: 0;
                .uni-icons {
                    color: #fff !important;
                }
            }
            .icon-wrapper[disabled] {
                background-color: rgba(228, 228, 228, 1);
                pointer-events: none;
                touch-action: none;
            }
        }
    }
    .tabs {
        width: 100%;
        display: flex;
        border-bottom: 1px solid #ddd;
        margin: 20rpx 0;
        view {
            width: 25%;
            font-size: 30rpx;
            color: #555;
            text-align: center;
            padding: 16rpx 0;
        }
        .on {
            color: #3a78ff;
            font-weight: bold;
            border-bottom: 3px solid #3a78ff;
        }
    }
    .bottom-btn {
        width: 100%;
        box-sizing: border-box;
        // height: 120rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        background-color: #fff;
        box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
        padding: 30rpx 40rpx 40rpx 40rpx;
        display: flex;
        flex-direction: row;
        gap: 10rpx;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #3A78FF;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #acacac;
            color: #fff;
            // position: absolute;
            // right: 120rpx;
        }
        .btn-d {
            background-color: #ff8901;
            color: #fff;
        }
    }
    .right-icon.disabled {
        background-color: #ccc !important;
        color: #666 !important;
        cursor: not-allowed;
    }
</style>
pages/simaheyi/table.vue
New file
@@ -0,0 +1,487 @@
<template>
    <view class="content">
        <view class="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缓存列表</view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="form" v-if="tabs == 0">
            <view class="buttons" @tap="add">
                <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>新增
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
            <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;"
                @tap="showDetail = showDetail==index?-1:index">
                <view class="card-detail">
                    <view class="detail" v-if="item.托条码">
                        <text>托条码:</text>{{item.托条码}}
                    </view>
                    <view class="detail" v-if="item.HSourceBillNo">
                        <text>源单号:</text>{{item.HSourceBillNo}}
                    </view>
                    <view class="detail" v-if="item.制单人">
                        <text>制单人:</text>{{item.制单人}}
                    </view>
                    <view class="detail" v-if="item.制单日期">
                        <text>制单日期:</text>{{ item.制单日期.split('T')[0] }}
                    </view>
                    <view class="detail" v-if="item.组织">
                        <text>组织:</text>{{item.组织}}
                    </view>
                </view>
                <view class="more">
                    <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)">
                        <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>编辑
                    </view>
                    <view class="part" style="color: #da0000;" @tap.stop="del(item)">
                        <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons>删除
                    </view>
                </view>
            </uni-card>
        </view>
        <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==1">
            <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;"
                @tap="showDetail = showDetail==index?-1:index">
                <view class="card-detail">
                    <view class="detail" v-if="item.状态">
                        <text>状态:</text>{{item.状态}}
                    </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>
                <view class="more">
                    <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)">
                        <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码
                    </view>
                    <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)">
                        <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销
                    </view>
                </view>
            </uni-card>
        </view>
        <view class="over" v-if="!listData || 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>
        <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
    </view>
</template>
<script>
    import dayjs from "dayjs";
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue";
    export default {
        data() {
            return {
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                tabs: 0,
                urls: '/WEBSController/GetSc_PackUnionBill_TempList_Json',
                MvarReportTitle: '装箱单缓存列表',
                hform: {
                    // HBillNo: '',
                    // HSourceBillNo: '',
                    HBillType: 3783,
                    HMaker: uni.getStorageSync('HUserName'),
                    HStockOrgID: uni.getStorageSync('OrganizationID'),
                },
                sWhere: '',
                listData: [],
                showList: [],
                showDetail: -1,
                page: 1,
            }
        },
        components: {
            BarCodePopupVue
        },
        onShow() {
            //用户模块权限判断
            this.CheckModRight()
            this.changeTab(0)
            console.log(this.userInfo, uni.getStorageSync('HUserName'))
        },
        onReachBottom: function() {
            this.page++
            setTimeout(() => {
                this.showList = this.showList.concat(this.getPage(this.page, this.listData))
            }, 100)
        },
        onPullDownRefresh: function() {
            this.clear()
            setTimeout(() => {
                uni.stopPullDownRefresh();
            }, 1000);
        },
        methods: {
            async qrCodeDisplay(item) {
                this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
                await this.$nextTick()
                this.$refs.barcodePopup.open()
            },
            CheckModRight() {
                uni.request({
                    url: this.serverUrl + '/WEBSController/CheckModRight_Json',
                    data: {
                        ModRightName: 'CE_PackUnion',
                        HUserName: uni.getStorageSync('HUserName')
                    },
                    success: (res) => {
                        if (res.data.count == 1) {} else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            getPage(page, list) {
                let sindex = (parseInt(page) - 1) * 20
                let eindex = parseInt(page) * 20
                let newList = list.slice(sindex, eindex)
                return newList
            },
            changeTab(e) {
                this.tabs = e
                this.page = 1
                this.showList = []
                if (this.tabs == 0) {
                    this.urls = '/WEBSController/GetSc_PackUnionBill_TempList_Json'
                }
                // if(this.tabs == 1){
                //     this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
                // }
                this.getList()
            },
            getList() {
                uni.showLoading({
                    title: '加载中...'
                })
                uni.request({
                    url: this.serverUrl + this.urls,
                    data: this.hform,
                    success: (res) => {
                        console.log(1, res);
                        if (res.data.count == 1) {
                            this.listData = res.data.data
                            this.showList = this.getPage(this.page, this.listData)
                            setTimeout(() => {
                                uni.hideLoading()
                            }, 1000)
                        } else {
                            uni.hideLoading()
                            this.listData = []
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.hideLoading()
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            search() {
                this.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                console.log(this.hform)
                this.getList()
            },
            clear() {
                this.listData = []
                this.page = 1
                this.showList = []
                this.sWhere = ''
                this.hform = {
                    HBillNo: '',
                    HSourceBillNo: '',
                    HBillType: 3783,
                    HMaker: uni.getStorageSync('HUserName'),
                    HStockOrgID: uni.getStorageSync('OrganizationID'),
                }
                this.getList()
            },
            add() {
                uni.navigateTo({
                    url: './form?OperationType=1'
                })
            },
            //编辑
            edit(item) {
                console.log(item)
                uni.navigateTo({
                    url: './form?OperationType=2&HBarCode_Pack_Temp=' + item["HBarCode_Pack"] + '&HSourceBillNo=' +item["HSourceBillNo"],
                })
            },
            //删除
            del(item) {
                // console.log(item.hmainid,uni.getStorageSync('HUserName'))
                uni.showModal({
                    title: '提示',
                    content: '确认要删除记录?删除后不能恢复',
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            uni.request({
                                url: this.serverUrl +
                                    '/WEBSController/DeleteTemp_PackUnionBill_Json',
                                data: {
                                    HInterID: item.HInterID,
                                },
                                success: (res) => {
                                    console.log(1, res);
                                    if (res.data.count == 1) {
                                        this.clear()
                                    }
                                    uni.showToast({
                                        title: res.data.Message,
                                        icon: 'none'
                                    })
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.hideLoading()
                                    uni.showToast({
                                        title: '接口请求失败',
                                        icon: 'none'
                                    })
                                },
                            });
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
            },
            //撤销
            revoke(item) {
                // console.log(item.hmainid,uni.getStorageSync('HUserName'))
                uni.showModal({
                    title: '提示',
                    content: '是否确认撤销',
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            uni.request({
                                url: this.serverUrl +
                                    '/WEBSController/set_DeleteICStockBillAndWMS_Json',
                                data: {
                                    HInterID: item.HInterID,
                                    HBillNo: item.单据号,
                                    HBillType: this.hform.HBillType,
                                    HMaker: uni.getStorageSync('HUserName'),
                                    MvarReportTitle: this.MvarReportTitle,
                                },
                                success: (res) => {
                                    console.log(1, res);
                                    if (res.data.count == 1) {
                                        this.clear()
                                    }
                                    uni.showToast({
                                        title: res.data.Message,
                                        icon: 'none'
                                    })
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.hideLoading()
                                    uni.showToast({
                                        title: '接口请求失败',
                                        icon: 'none'
                                    })
                                },
                            });
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
            },
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 640rpx;
        margin: 20rpx auto;
        margin-top: 90rpx;
    }
    .tabs {
        width: 100%;
        position: fixed;
        left: 0;
        z-index: 9;
        display: flex;
        background-color: #e5e5e5;
        view {
            width: 50%;
            font-size: 30rpx;
            color: #333;
            text-align: center;
            padding: 16rpx 0;
        }
        .on {
            color: #3a78ff;
            font-weight: bold;
            border-bottom: 3px solid #3a78ff;
        }
    }
    .buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
        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;
        }
    }
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title {
            width: 180rpx;
            text {
                color: red;
                font-weight: bold;
            }
        }
        .right {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input {
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .list {
        width: 100%;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail {
                // width: 50%;
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                margin-right: 20rpx;
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
        }
        .more {
            color: #888;
            font-size: 26rpx;
            display: flex;
            border-top: 1px solid #eee;
            padding-top: 20rpx;
            .part {
                width: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
    }
</style>
utils/auth.js
@@ -74,7 +74,7 @@
}
export function getUserInfo() {
  let userinfo = uni.getStorageSync('userinfo');
  // console.log('userinfo', userinfo)
  console.log('userinfo', userinfo)
  if (userinfo) {
    return JSON.parse(userinfo);
  }