#
zhou zhou
2025-12-18 11c52061e55be42d4cd630a49fa2fbde82650f52
#
7个文件已修改
2922 ■■■■■ 已修改文件
pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 499 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderDetlList.vue 496 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderList.vue 451 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderPakin2.vue 970 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/stock/stockQuery.vue 499 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -273,7 +273,7 @@
            "style" :                                                                                    
            {
                "navigationBarTitleText": "单据列表",
                "enablePullDownRefresh": false
                "enablePullDownRefresh": true
            }
            
        },
pages/home/home.vue
@@ -1,17 +1,44 @@
<template>
    <view>
        <scroll-view scroll-y class="page">
            <view class="nav-list">
                <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
                    :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
                    v-for="(item,index) in elements" :key="index">
                    <view class="nav-title">{{item.title}}</view>
                    <view class="nav-name">{{item.name}}</view>
                    <text :class="'cuIcon-' + item.cuIcon"></text>
                </navigator>
    <view class="page-container">
        <!-- 头部欢迎区域 -->
        <view class="header-section">
            <view class="header-bg"></view>
            <view class="header-content">
                <view class="welcome-text">
                    <text class="greeting">欢迎使用</text>
                    <text class="app-name">WMS 仓储管理系统</text>
            </view>
            <view class="cu-tabbar-height"></view>
        </scroll-view>
                <view class="header-icon">
                    <uni-icons type="home" size="40" color="#ffffff"></uni-icons>
                </view>
            </view>
        </view>
        <!-- 功能菜单 -->
        <view class="menu-section">
            <view class="menu-grid">
                <view class="menu-item" v-for="(item, index) in elements" :key="index"
                    @click="navigateTo(item)" :style="{animationDelay: (index * 0.1) + 's'}">
                    <view class="menu-card" :class="'card-' + item.color">
                        <view class="card-icon">
                            <uni-icons :type="getIconType(item)" size="32" color="#ffffff"></uni-icons>
                        </view>
                        <view class="card-info">
                            <text class="card-title">{{item.title}}</text>
                            <text class="card-desc">{{item.name}}</text>
                        </view>
                        <view class="card-arrow">
                            <uni-icons type="right" size="16" color="rgba(255,255,255,0.6)"></uni-icons>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 底部版权 -->
        <view class="footer">
            <text class="footer-text">WMS Mobile v1.0</text>
        </view>
    </view>
</template>
@@ -24,178 +51,27 @@
                icon: '',
                elements: [],
                elements2: [
                    // {
                    //     title: '组托',
                    //     name: 'pakin',
                    //     color: 'cyan',
                    //     cuIcon: 'pullup',
                    //     url: '/pakin/pakin'
                    // },
                    {
                        title: '组托',
                        name: 'pakin',
                        color: 'cyan',
                        cuIcon: 'pullup',
                        url: '/pakin/pakin'
                    },
                    {
                        title: '订单入库',
                        name: 'orderPakin',
                        color: 'red',
                        color: 'purple',
                        cuIcon: '',
                        url: '/order/orderList'
                    },
                    {
                        title: '拣料站到站',
                        name: 'leftover',
                        color: 'orange',
                        cuIcon: 'pullup',
                        url: '/pakin/leftovers'
                    },
                    // {
                    //     title: '平库入库',
                    //     name: 'POrderPakin',
                    //     color: 'purple',
                    //     cuIcon: '',
                    //     url: '/pingku/POrderList'
                    // },
                    // {
                    //     title: '平库出库',
                    //     name: 'POrderPakin',
                    //     color: 'cyan',
                    //     cuIcon: '',
                    //     url: '/pingku/POrderListOut'
                    // },
                    // {
                    //     title: '平库库存调整',
                    //     name: 'oo',
                    //     color: 'olive',
                    //     cuIcon: '',
                    //     url: '/pingku/PInventoryAdjustment'
                    // },
                    {
                        title: '呼叫Agv',
                        name: 'AGVStart',
                        color: 'cyan',
                        title: '库存查询',
                        name: 'stockQuery',
                        color: 'green',
                        cuIcon: '',
                        url: '/AGV/AGVStart'
                        url: '/stock/stockQuery'
                    },
                    // {
                    //     title: 'Agv拆托呼叫',
                    //     name: 'AGVDismantle',
                    //     color: 'cyan',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVDismantle'
                    // },
                    {
                        title: 'Agv储位解绑',
                        name: 'AGVUnbind',
                        color: 'orange',
                        cuIcon: '',
                        url: '/AGV/AGVUnbind'
                    },
                    // {
                    //     title: 'Agv储位绑定',
                    //     name: 'AGVBind',
                    //     color: 'purple',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVBind'
                    // },
                    // {
                    //     title: '站绑定',
                    //     name: 'AGVStaBind',
                    //     color: 'red',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVStaBind'
                    // },
                    // {
                    //     title: '产线叫料',
                    //     name: 'AGVSiteList',
                    //     color: 'red',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVSiteList'
                    // },
                    // {
                    //     title: '产线叫料2',
                    //     name: 'AGVSiteList2',
                    //     color: 'red',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVSiteList2'
                    // },
                    // {
                    //     title: '成品呼叫',
                    //     name: 'AGVFinishedCall',
                    //     color: 'orange',
                    //     cuIcon: '',
                    //     url: '/AGV/AGVFinishedCall'
                    // },
                    // {
                    //     title: '成品呼叫2',
                    //     name: 'AGV_2F',
                    //     color: 'purple',
                    //     cuIcon: '',
                    //     url: '/AGV/AGV2F'
                    // },
                    // {
                    //     title: '组托上架',
                    //     name: 'putOn',
                    //     color: 'orange',
                    //     cuIcon: 'pullup',
                    //     url: '/pakin/putOn'
                    // },
                    // {
                    //     title: '打印',
                    //     name: 'print',
                    //     color: 'purple',
                    //     cuIcon: 'text',
                    //     url: '/print/print'
                    // },
                    // {
                    //     title: '订单上架',
                    //     name: 'orderPutOn',
                    //     color: 'yellow',
                    //     cuIcon: 'pullup',
                    //     url: '/order/orderPutOn'
                    // },
                    // {
                    //     title: '订单下架',
                    //     name: 'orderPutDown',
                    //     color: 'olive',
                    //     cuIcon: 'pulldown',
                    //     url: '/order/orderPutDown'
                    // },
                    // {
                    //     title: '库存查询',
                    //     name: 'stockQuery',
                    //     color: 'green',
                    //     cuIcon: '',
                    //     url: '/stock/stockQuery'
                    // },
                    // {
                    // {
                    //     title: '商品打印',
                    //     name: 'matList',
                    //     color: 'orange',
                    //     cuIcon: 'post',
                    //     url: '/mat/matList'
                    // },
                    // {
                    //     title: '补货',
                    //     name: 'restock',
                    //     color: 'yellow',
                    //     cuIcon: 'punch',
                    //     url: '/stock/restock'
                    // },
                    // {
                    //     title: '转全板',
                    //     name: 'piking',
                    //     color: 'olive',
                    //     cuIcon: 'order',
                    //     url: '/pakin/piking'
                    // },
                    // {
                    //     title: '换板绑定',
                    //     name: 'changePallet',
                    //     color: 'green',
                    //     cuIcon: 'order',
                    //     url: '/stock/changePallet'
                    // },
                    {
                        title: '退出登录',
                        name: 'logOut',
@@ -203,21 +79,39 @@
                        cuIcon: 'exit',
                        url: '/login/logOut'
                    },
                ],
                colorList: ['cyan', 'blue', 'mauve', 'pink', 'brown', 'red', 'orange', 'yellow', 'olive', 'olive', 'green',
                    'grey'
                ]
                colorList: ['cyan', 'purple', 'blue', 'pink', 'orange', 'green', 'mauve', 'brown', 'olive', 'red', 'yellow', 'grey'],
                // 图标映射
                iconMap: {
                    'pakin': 'upload',
                    'orderPakin': 'list',
                    'stockQuery': 'search',
                    'logOut': 'redo',
                    'orderPutOn': 'top',
                    'orderPutDown': 'bottom',
                    'restock': 'refresh',
                    'stockCheck': 'checkbox',
                }
            };
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.getAuth()
            this.getAuth();
        },
        methods: {
            // 获取图标类型
            getIconType(item) {
                return this.iconMap[item.name] || 'circle';
            },
            // 跳转页面
            navigateTo(item) {
                uni.navigateTo({
                    url: '/pages' + item.url
                });
            },
            getAuth() {
                let that = this
                let that = this;
                uni.request({
                    url: that.baseUrl + '/menu/pda/auth',
                    data: {},
@@ -226,25 +120,25 @@
                    },
                    method: 'POST',
                    success(res) {
                        res = res.data
                        that.elements = []
                        res = res.data;
                        that.elements = [];
                        if (res.code === 200) {
                            if (res.data == undefined || res.data == null || res.data == "") {
                                that.elements = that.elements2
                                return
                                that.elements = that.elements2;
                                return;
                            }
                            for (var i = 0; i < res.data.length; i++) {
                                if (res.data.length < 0) {
                                    break;
                                }
                                that.getIcon(res.data[i].title)
                                that.getIcon(res.data[i].title);
                                that.elements.unshift({
                                    title: res.data[i].name,
                                    name: res.data[i].title,
                                    color: that.colorList[i],
                                    color: that.colorList[i % that.colorList.length],
                                    cuIcon: that.icon,
                                    url: res.data[i].action
                                })
                                });
                            }
                            that.elements.push({
                                title: '退出登录',
@@ -252,42 +146,38 @@
                                color: 'grey',
                                cuIcon: 'exit',
                                url: '/login/logOut'
                            })
                            });
                        } else if (res.code === 403) {
                            uni.showToast({
                                title: res.msg,
                                icon: "none",
                                position: 'top'
                            })
                            });
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else if (res.status === 404) {
                            that.elements = that.elements2
                            // uni.showToast({
                            //     title: '默认主页',
                            //     icon: "none",
                            //     position: 'top'
                            // })
                            that.elements = that.elements2;
                        } else {
                            uni.showToast({
                                title: res.msg,
                                icon: "none",
                                position: 'top'
                            })
                            });
                        }
                    },
                    fail(err) {
                        console.log(err);
                        that.elements = that.elements2;
                    }
                })
                });
            },
            getIcon(e) {
                const ways = ['pakin', 'orderPakin', 'orderPutOn']
                const ways = ['pakin', 'orderPakin', 'orderPutOn'];
                if (ways.includes(e)) {
                    this.icon = 'pullup'
                    this.icon = 'pullup';
                }
            }
        }
@@ -295,82 +185,201 @@
</script>
<style>
    .page {
        height: 100vh;
    page {
        background: #f5f7fa;
    }
    .bg-red {
        background-color: #e54d42;
    .page-container {
        min-height: 100vh;
        background: linear-gradient(180deg, #f5f7fa 0%, #e8ebed 100%);
    }
    /* 头部区域 */
    .header-section {
        position: relative;
        height: 280rpx;
        overflow: hidden;
    }
    .header-bg {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 320rpx;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 0 0 60rpx 60rpx;
    }
    .header-content {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 60rpx 40rpx 40rpx;
    }
    .welcome-text {
        display: flex;
        flex-direction: column;
    }
    .greeting {
        font-size: 28rpx;
        color: rgba(255, 255, 255, 0.8);
    }
    .app-name {
        font-size: 40rpx;
        color: #ffffff;
        font-weight: 600;
        margin-top: 12rpx;
    }
    .bg-orange {
        background-color: #f37b1d;
    .header-icon {
        width: 100rpx;
        height: 100rpx;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* 菜单区域 */
    .menu-section {
        padding: 0 24rpx;
        margin-top: -60rpx;
        position: relative;
    }
    .menu-grid {
        display: flex;
        flex-direction: column;
    }
    .menu-item {
        margin-bottom: 20rpx;
        animation: slideUp 0.5s ease forwards;
        opacity: 0;
        transform: translateY(20rpx);
    }
    @keyframes slideUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    .menu-card {
        display: flex;
        align-items: center;
        padding: 28rpx 24rpx;
        border-radius: 20rpx;
        box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.12);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .menu-card:active {
        transform: scale(0.98);
        box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.15);
    }
    .card-icon {
        width: 80rpx;
        height: 80rpx;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 20rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 24rpx;
    }
    .card-info {
        flex: 1;
    }
    .card-title {
        font-size: 32rpx;
        color: #ffffff;
        font-weight: 600;
        display: block;
    }
    .bg-yellow {
        background-color: #fbbd08;
        color: #333333;
    .card-desc {
        font-size: 24rpx;
        color: rgba(255, 255, 255, 0.7);
        display: block;
        margin-top: 6rpx;
    }
    .bg-olive {
        background-color: #8dc63f;
        color: #ffffff;
    .card-arrow {
        width: 40rpx;
        height: 40rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .bg-green {
        background-color: #39b54a;
        color: #ffffff;
    /* 卡片颜色 */
    .card-cyan {
        background: linear-gradient(135deg, #1cbbb4 0%, #16a085 100%);
    }
    .bg-cyan {
        background-color: #1cbbb4;
        color: #ffffff;
    .card-purple {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    .bg-blue {
        background-color: #0081ff;
        color: #ffffff;
    .card-blue {
        background: linear-gradient(135deg, #0081ff 0%, #00bcd4 100%);
    }
    .bg-purple {
        background-color: #6739b6;
        color: #ffffff;
    .card-green {
        background: linear-gradient(135deg, #39b54a 0%, #8dc63f 100%);
    }
    .bg-mauve {
        background-color: #9c26b0;
        color: #ffffff;
    .card-orange {
        background: linear-gradient(135deg, #f37b1d 0%, #fbbd08 100%);
    }
    .bg-pink {
        background-color: #e03997;
        color: #ffffff;
    .card-red {
        background: linear-gradient(135deg, #e54d42 0%, #f37b1d 100%);
    }
    .bg-brown {
        background-color: #a5673f;
        color: #ffffff;
    .card-pink {
        background: linear-gradient(135deg, #e03997 0%, #f37b1d 100%);
    }
    .bg-grey {
        background-color: #8799a3;
        color: #ffffff;
    .card-mauve {
        background: linear-gradient(135deg, #9c26b0 0%, #667eea 100%);
    }
    .bg-gray {
        background-color: #f0f0f0;
        color: #333333;
    .card-brown {
        background: linear-gradient(135deg, #a5673f 0%, #8799a3 100%);
    }
    .bg-black {
        background-color: #333333;
        color: #ffffff;
    .card-olive {
        background: linear-gradient(135deg, #8dc63f 0%, #39b54a 100%);
    }
    .bg-white {
        background-color: #ffffff;
        color: #666666;
    .card-yellow {
        background: linear-gradient(135deg, #fbbd08 0%, #f37b1d 100%);
    }
    .card-grey {
        background: linear-gradient(135deg, #8799a3 0%, #606266 100%);
    }
    /* 底部 */
    .footer {
        padding: 40rpx 0 60rpx;
        text-align: center;
    }
    .footer-text {
        font-size: 24rpx;
        color: #c0c4cc;
    }
</style>
pages/login/login.vue
@@ -180,10 +180,11 @@
                            title: '请求失败'
                        })
                    },
                    data: {
                    data: JSON.stringify({
                        username: that.user.userName,
                        password: md5.hex_md5(that.user.password)
                    },
                    }),
                    method:'POST',
                    header: {
                        "content-type": "application/json"
                    },
pages/order/orderDetlList.vue
@@ -1,17 +1,102 @@
<template>
    <view>
    <view class="page-container">
        <!-- 订单信息头部 -->
        <view class="order-header" v-if="order">
            <view class="header-content">
                <view class="header-row">
                    <text class="header-label">单据号</text>
                    <text class="header-value">{{order.orderNo}}</text>
                </view>
                <view class="header-row">
                    <text class="header-label">单据类型</text>
                    <text class="header-value">{{order.docType$ || '-'}}</text>
                </view>
            </view>
        </view>
        <!-- 搜索框 -->
        <view class="search-bar">
            <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#EEEEEE" @input="search" />
            <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入物料" bgColor="#F5F5F5" @confirm="search" @cancel="onCancelSearch" />
        </view>    
        <view class="card" v-show="item.enableQty >0" v-for="item in menuList" @click="chose(item)">
            <view class="tag-item">单据号: {{item.orderNo}}</view>
            <view class="tag-item">物料码: {{item.matnr}}</view>
            <view class="tag-item">物料名称: {{item.maktx}}</view>
            <view class="tag-item">规格: {{item.specs}}</view>
            <view class="tag-item">批次: {{item.batch}}</view>
            <view class="tag-item">数量: {{item.anfme}}</view>
            <view class="tag-item">剩余数量: {{item.enableQty}}</view>
        <!-- 明细列表 -->
        <view class="detl-list">
            <view class="detl-card" v-for="(item, index) in filterList" :key="index" @click="chose(item)">
                <!-- 卡片头部 -->
                <view class="card-header">
                    <view class="mat-info">
                        <text class="mat-code">{{item.matnr}}</text>
                        <text class="mat-name">{{item.maktx || '-'}}</text>
                    </view>
                    <view class="qty-badge" :class="item.enableQty > 0 ? 'badge-active' : 'badge-done'">
                        <text class="qty-text">剩余 {{item.enableQty}}</text>
                    </view>
                </view>
                <!-- 卡片内容 -->
                <view class="card-body">
                    <view class="info-grid">
                        <view class="info-item">
                            <text class="info-label">规格</text>
                            <text class="info-value">{{item.specs || '-'}}</text>
                        </view>
                        <view class="info-item">
                            <text class="info-label">批次</text>
                            <text class="info-value">{{item.batch || '-'}}</text>
                        </view>
                        <view class="info-item">
                            <text class="info-label">订单数量</text>
                            <text class="info-value highlight">{{item.anfme}}</text>
                        </view>
                        <view class="info-item">
                            <text class="info-label">已完成</text>
                            <text class="info-value">{{item.anfme - item.enableQty}}</text>
                        </view>
                    </view>
                    <!-- 进度条 -->
                    <view class="progress-wrap">
                        <view class="progress-bar">
                            <view class="progress-fill" :style="{width: getProgress(item) + '%'}"></view>
                        </view>
                        <text class="progress-text">{{getProgress(item)}}%</text>
                    </view>
                </view>
                <!-- 卡片底部 -->
                <view class="card-footer" v-if="item.enableQty > 0">
                    <text class="action-text">点击组托入库</text>
                    <uni-icons type="right" size="14" color="#667eea"></uni-icons>
                </view>
                <view class="card-footer card-footer-done" v-else>
                    <text class="done-text">已完成</text>
                    <uni-icons type="checkmarkempty" size="14" color="#28a745"></uni-icons>
                </view>
            </view>
        </view>
        <!-- 空状态 -->
        <view class="empty-state" v-if="filterList.length === 0 && !loading">
            <uni-icons type="info" size="60" color="#CCCCCC"></uni-icons>
            <text class="empty-text">暂无明细数据</text>
        </view>
        <!-- 统计信息 -->
        <view class="stats-bar" v-if="menuList.length > 0">
            <view class="stats-item">
                <text class="stats-value">{{menuList.length}}</text>
                <text class="stats-label">总明细</text>
            </view>
            <view class="stats-divider"></view>
            <view class="stats-item">
                <text class="stats-value">{{pendingCount}}</text>
                <text class="stats-label">待处理</text>
            </view>
            <view class="stats-divider"></view>
            <view class="stats-item">
                <text class="stats-value">{{completedCount}}</text>
                <text class="stats-label">已完成</text>
            </view>
        </view>
    </view>
</template>
@@ -26,87 +111,152 @@
                order:'',
                baseUrl: '',
                token: '',
                loading: false,
            }
        },
        computed: {
            // 过滤后的列表(优先显示有剩余数量的)
            filterList() {
                if (!this.condition.trim()) {
                    // 排序:有剩余数量的排前面
                    return [...this.menuList].sort((a, b) => {
                        if (a.enableQty > 0 && b.enableQty <= 0) return -1;
                        if (a.enableQty <= 0 && b.enableQty > 0) return 1;
                        return 0;
                    });
                }
                const keyword = this.condition.toLowerCase();
                return this.menuList.filter(item => {
                    return (item.matnr && item.matnr.toLowerCase().includes(keyword)) ||
                           (item.maktx && item.maktx.toLowerCase().includes(keyword)) ||
                           (item.batch && item.batch.toLowerCase().includes(keyword));
                });
            },
            // 待处理数量
            pendingCount() {
                return this.menuList.filter(item => item.enableQty > 0).length;
            },
            // 已完成数量
            completedCount() {
                return this.menuList.filter(item => item.enableQty <= 0).length;
            }
        },
        onLoad() {
            let that = this
            let that = this;
            const eventChannel = this.getOpenerEventChannel();
            if (eventChannel) {
            eventChannel.on('data', function(data) {
                that.order = data.data
                that.getOrderNoList(that.order)
                    that.order = data.data;
                    that.getOrderNoList(that.order);
            });
            }
        },
        onShow() {
            let that = this
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            that.getOrderNoList(that.order)
            if (this.order) {
                this.getOrderNoList(this.order);
            }
        },
        methods: {
            // 计算进度
            getProgress(item) {
                if (!item.anfme || item.anfme === 0) return 0;
                const progress = ((item.anfme - item.enableQty) / item.anfme * 100).toFixed(0);
                return Math.min(100, Math.max(0, progress));
            },
            // 搜索
            search(){
                let that = this
                if (!this.condition.trim()) {
                    this.getOrderNoList(this.order);
                    return;
                }
                let that = this;
                that.loading = true;
                uni.request({
                    url: that.baseUrl + '/orderDetl/search/pda/auth',
                    data: {
                        condition: that.condition,
                        order: that.order.orderNo
                    },
                    // method:"GET",
                    header: {
                        'token':uni.getStorageSync('token'),
                    },
                    success(result) {
                        console.log(result);
                        var res = result.data
                        var res = result.data;
                        if (res.code === 200 ) {
                            that.menuList = res.data
                            // that.save()
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            that.menuList = res.data || [];
                        } else if (res.code === 403) {
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                                uni.reLaunch({ url: '../login/login' });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                        }
                    },
                    fail() {
                        uni.showToast({ title: '搜索请求失败', icon: "none", position: 'top' });
                    },
                    complete() {
                        that.loading = false;
                    }
                });
            },
            // 取消搜索
            onCancelSearch() {
                this.condition = '';
                this.getOrderNoList(this.order);
            },
            // 获取订单明细列表
            getOrderNoList(order) {
                let that = this
                if (!order || !order.orderNo) return;
                let that = this;
                that.loading = true;
                uni.request({
                    url: uni.getStorageSync('baseUrl') + '/orderDetl/list/pda/auth',
                    url: uni.getStorageSync('baseUrl') + '/order/pakin/orderDetl/list/pda/auth',
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token'),
                    },
                    data: {                        
                        orderNo: order.orderNo
                    },
                    success(res) {
                        res = res.data
                        that.menuList = res.data
                        res = res.data;
                        if (res.code === 200) {
                            that.menuList = res.data || [];
                        } else {
                            that.menuList = res.data || [];
                    }
                })
            },
                    fail() {
                        uni.showToast({ title: '获取明细失败', icon: "none", position: 'top' });
                    },
                    complete() {
                        that.loading = false;
                    }
                });
            },
            // 选择明细进行组托
            chose(item) {
                let that = this
                if (item.enableQty <= 0) {
                    uni.showToast({ title: '该明细已完成', icon: "none", position: 'top' });
                    return;
                }
                let that = this;
                uni.navigateTo({
                    url: "../order/orderPakin2",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('orderItem', {
                            item: item
                        })
                        });
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            // that.matnr = data.data
                            // that.input(that.matnr)
                            // 返回后刷新数据
                        },
                    },
                });
            }
        }
@@ -114,19 +264,261 @@
</script>
<style>
    .card {
        margin: 20rpx;
        padding: 30rpx;
        background-color: #157ec1;
        border-radius: 20rpx;
        color: #FFF;
    .page-container {
        min-height: 100vh;
        background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
        padding-bottom: 120rpx;
    }
    .tag-item {
        width: 100%;
        min-height: 60rpx;
        line-height: 2;
        padding-left: 50rpx;
    /* 订单头部 */
    .order-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 16rpx 20rpx;
    }
    .header-content {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 10rpx;
        padding: 12rpx 16rpx;
    }
    .header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4rpx 0;
    }
    .header-label {
        font-size: 24rpx;
        color: rgba(255, 255, 255, 0.7);
    }
    .header-value {
        font-size: 26rpx;
        color: #ffffff;
        font-size: 14px;
        font-weight: 500;
    }
    /* 搜索栏 */
    .search-bar {
        padding: 0rpx 14rpx;
        background: #ffffff;
        box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
    }
    /* 明细列表 */
    .detl-list {
        padding: 0 20rpx;
    }
    .detl-card {
        background: #ffffff;
        border-radius: 12rpx;
        margin-top: 12rpx;
        box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
        overflow: hidden;
        transition: transform 0.2s ease;
    }
    .detl-card:active {
        transform: scale(0.98);
    }
    /* 卡片头部 */
    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 14rpx 16rpx;
        border-bottom: 1rpx solid #f0f0f0;
    }
    .mat-info {
        flex: 1;
        padding-right: 12rpx;
    }
    .mat-code {
        font-size: 26rpx;
        color: #303133;
        font-weight: 600;
        display: block;
    }
    .mat-name {
        font-size: 22rpx;
        color: #909399;
        margin-top: 4rpx;
        display: block;
    }
    .qty-badge {
        padding: 4rpx 12rpx;
        border-radius: 16rpx;
        flex-shrink: 0;
    }
    .badge-active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    .badge-done {
        background: #e8f5e9;
    }
    .qty-text {
        font-size: 20rpx;
        font-weight: 500;
        color: #ffffff;
    }
    .badge-done .qty-text {
        color: #28a745;
    }
    /* 卡片内容 */
    .card-body {
        padding: 12rpx 16rpx;
    }
    .info-grid {
        display: flex;
        flex-wrap: wrap;
    }
    .info-item {
        width: 50%;
        margin-bottom: 8rpx;
    }
    .info-label {
        font-size: 20rpx;
        color: #909399;
        display: block;
    }
    .info-value {
        font-size: 24rpx;
        color: #303133;
        font-weight: 500;
        display: block;
        margin-top: 2rpx;
    }
    .info-value.highlight {
        color: #667eea;
        font-weight: 600;
    }
    /* 进度条 */
    .progress-wrap {
        display: flex;
        align-items: center;
        margin-top: 8rpx;
    }
    .progress-bar {
        flex: 1;
        height: 8rpx;
        background: #e8e8e8;
        border-radius: 4rpx;
        overflow: hidden;
    }
    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        border-radius: 4rpx;
        transition: width 0.3s ease;
    }
    .progress-text {
        font-size: 20rpx;
        color: #909399;
        margin-left: 12rpx;
        min-width: 50rpx;
        text-align: right;
    }
    /* 卡片底部 */
    .card-footer {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 12rpx 16rpx;
        border-top: 1rpx solid #f0f0f0;
        background: #fafafa;
    }
    .card-footer-done {
        background: #f0fff4;
    }
    .action-text {
        font-size: 24rpx;
        color: #667eea;
        margin-right: 6rpx;
        font-weight: 500;
    }
    .done-text {
        font-size: 24rpx;
        color: #28a745;
        margin-right: 6rpx;
    }
    /* 空状态 */
    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60rpx 0;
    }
    .empty-text {
        font-size: 26rpx;
        color: #909399;
        margin-top: 20rpx;
    }
    /* 统计栏 */
    .stats-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: #ffffff;
        padding: 16rpx 0;
        box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
    }
    .stats-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
    }
    .stats-value {
        font-size: 32rpx;
        color: #303133;
        font-weight: 600;
    }
    .stats-label {
        font-size: 20rpx;
        color: #909399;
        margin-top: 4rpx;
    }
    .stats-divider {
        width: 1rpx;
        height: 50rpx;
        background: #e8e8e8;
    }
</style>
pages/order/orderList.vue
@@ -1,23 +1,55 @@
<template>
    <view>
    <view class="page-container">
        <!-- 搜索框 -->
        <view class="search-bar">
            <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#EEEEEE" @confirm="search" />
            <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#F5F5F5" @confirm="search" @cancel="onCancelSearch" />
        </view>        
        <view>
            <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
                <view class="tag">
                    <view style="display: flex;">
                        <view class="wms-tag" :style="baColor" >单据</view>
        <!-- 订单列表 -->
        <view class="order-list">
            <view class="order-card" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
                <!-- 卡片头部 -->
                <view class="card-header">
                    <view class="order-badge" :class="getSettleClass(item.settle)">
                        <text class="badge-text">{{item.settle$ || '未知'}}</text>
                    </view>
                    <view class="order-no">
                        <text class="order-no-label">单据号</text>
                        <text class="order-no-value">{{item.orderNo}}</text>
                    </view>
                </view>
                <view class="tag-item">单据号: {{item.orderNo}}</view>
                <view class="tag-item">单据类型: {{item.docType$}}</view>
                <view class="tag-item">单据状态: {{item.settle$}}</view>
                <view class="tag-item">仓库: {{item.itemName}}</view>
                <!-- 卡片内容 -->
                <view class="card-body">
                    <view class="info-row">
                        <view class="info-item">
                            <text class="info-label">单据类型</text>
                            <text class="info-value">{{item.docType$ || '-'}}</text>
                        </view>
                        <view class="info-item">
                            <text class="info-label">仓库</text>
                            <text class="info-value">{{item.itemName || '-'}}</text>
            </view>
        </view>
        <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
                </view>
                <!-- 卡片底部 -->
                <view class="card-footer">
                    <text class="view-detail">查看详情</text>
                    <uni-icons type="right" size="14" color="#999"></uni-icons>
                </view>
            </view>
        </view>
        <!-- 空状态 -->
        <view class="empty-state" v-if="matList.length === 0 && !loading">
            <uni-icons type="search" size="60" color="#CCCCCC"></uni-icons>
            <text class="empty-text">暂无订单数据</text>
            <text class="empty-hint">下拉刷新试试</text>
        </view>
        <!-- 加载更多 -->
        <uni-load-more v-show="matList.length !== 0" :status="status" :icon-size="16" :content-text="contentText" />
    </view>
</template>
@@ -28,11 +60,8 @@
                tagList: [],
                matList: [],
                condition: '',
                reload: false,
                loading: false,
                curr:1,
                tag: '分类',
                baColor: "background-color: #0081ff;",
                desc: '商品编号:',
                baseUrl: '',
                token: '',
                status: 'more',
@@ -43,32 +72,102 @@
                },
                // 当前tagId
                tagIdNow: 1,
            }
        },
        // 下拉刷新
        onPullDownRefresh() {
            this.refreshData();
        },
        // 上拉加载更多
        onReachBottom() {
            this.status = 'more';
            this.showMat(this.tagIdNow);
            if (this.status !== 'noMore') {
                this.status = 'loading';
                this.loadMoreData();
            }
        },
        onLoad() {
            // 没啥用了
            let that = this
            // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
            const eventChannel = this.getOpenerEventChannel();
            // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
            if (eventChannel) {
            eventChannel.on('commonUrl', function(data) {
                that.commonUrl = data.commonUrl
            })
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.showMat(1)
            // 每次进入页面重新加载
            this.refreshData();
        },
        methods: {
            // 刷新数据
            refreshData() {
                this.curr = 1;
                this.matList = [];
                this.status = 'more';
                this.loading = true;
                this.fetchOrderList(true);
            },
            // 加载更多数据
            loadMoreData() {
                this.fetchOrderList(false);
            },
            // 获取订单列表
            fetchOrderList(isRefresh) {
                let that = this;
                uni.request({
                    url: that.baseUrl + '/order/pakin/order/list/pda/page/auth',
                    data: {
                        curr: that.curr,
                        limit: 20,
                        tagId: that.tagIdNow
                    },
                    method: "GET",
                    header: {
                        'token': uni.getStorageSync('token'),
                    },
                    success(result) {
                        var res = result.data;
                        if (res.code === 200) {
                            let records = res.data.records || [];
                            if (records.length > 0) {
                                if (isRefresh) {
                                    that.matList = records;
                                } else {
                                    that.matList = that.matList.concat(records);
                                }
                                that.curr = that.curr + 1;
                                that.status = 'more';
                            } else {
                                that.status = 'noMore';
                            }
                        } else if (res.code === 403) {
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                            setTimeout(() => {
                                uni.reLaunch({ url: '../login/login' });
                            }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                        }
                    },
                    fail(err) {
                        uni.showToast({ title: '网络请求失败', icon: "none", position: 'top' });
                    },
                    complete() {
                        that.loading = false;
                        uni.stopPullDownRefresh();
                    }
                });
            },
            // 搜索
            search() {
                let that = this
                if (!this.condition.trim()) {
                    this.refreshData();
                    return;
                }
                let that = this;
                that.loading = true;
                uni.request({
                    url: that.baseUrl + '/order/search/pda/auth',
                    data: {
@@ -79,132 +178,59 @@
                        'token':uni.getStorageSync('token'),
                    },
                    success(result) {
                        console.log(result);
                        var res = result.data
                        var res = result.data;
                        if (res.code === 200 ) {
                            that.matList = res.data
                            // that.save()
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                        }
                    }
                });
            },
            showTag(parentId) {
                let that = this
                uni.request({
                    url: that.baseUrl + '/tag/list/pda/auth',
                    header: {
                        'token':uni.getStorageSync('token'),
                    },
                    data: {
                        limit: 100000,
                        parentId: parentId
                    },
                    header: {
                        'token':uni.getStorageSync('token'),
                    },
                    success(result) {
                        that.tagList = null
                        that.matList = []
                        var res = result.data
                        if (res.code === 200) {
                            if (res.data != null && res.data.length > 0) {
                                that.tagList = res.data
                            } else {
                                that.showMat(parentId)
                            }
                            that.baColor = "background-color: #0081ff;"
                            that.matList = res.data || [];
                            that.status = 'noMore';
                        } else if (res.code === 403 ) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                                uni.reLaunch({ url: '../login/login' });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                        }
                    },
                    fail() {
                        uni.showToast({ title: '搜索请求失败', icon: "none", position: 'top' });
                    },
                    complete() {
                        that.loading = false;
                    }
                });
            },
            showMat(tagId) {
                let that = this
                // wms端 补接口
                // @RequestMapping(value = "/mat/list/pda/page/auth")
                // @ManagerAuth
                // public R pdaPageList(@RequestParam(required = true)Long tagId,
                //                      @RequestParam(defaultValue = "1")Integer curr,
                //                      @RequestParam(defaultValue = "10")Integer limit){
                //     EntityWrapper<Mat> wrapper = new EntityWrapper<>();
                //     wrapper.eq("tag_id", tagId);
                //     wrapper.orderBy("create_time", false);
                //     return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper));
                // }
                uni.request({
                    url: that.baseUrl + '/order/list/pda/page/auth',
                    data: {
                        curr:that.curr,
                        limit: 100,
                        tagId: tagId
            // 取消搜索
            onCancelSearch() {
                this.condition = '';
                this.refreshData();
                    },
                    method:"GET",
                    header: {
                        'token':uni.getStorageSync('token'),
            // 根据状态返回样式类名
            getSettleClass(settle) {
                // settle: 1-待处理, 2-处理中, 3-已完成, 4-已取消 (根据实际情况调整)
                const classMap = {
                    1: 'badge-pending',
                    2: 'badge-processing',
                    3: 'badge-completed',
                    4: 'badge-cancelled'
                };
                return classMap[settle] || 'badge-default';
                    },
                    success(result) {
                        that.tagList = null
                        var res = result.data
                        if (res.code === 200) {
                            if (res.data.records != null && res.data.records.length > 0) {
                                let list = res.data.records
                                that.matList = that.reload ? list : that.matList.concat(list);
                                that.curr = that.curr + 1
                            }
                            if (res.data.records.length == 0) {
                                that.status = 'noMore'
                            }
                            that.baColor = "background-color: #1cbbb4;"
                        } else if (res.code === 403 ) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                        }
                    }
                });
            },
            // 跳转到订单详情
            toPrint(item) {
                let that = this
                let that = this;
                uni.navigateTo({
                    url: "../order/orderDetlList",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('data', {
                            data: item
                        })
                        });
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            that.matnr = data.data
                            that.findMat(that.matnr)
                            that.matnr = data.data;
                            that.findMat(that.matnr);
                        },
                    },
                });
            }
        }
@@ -213,34 +239,155 @@
<style>
    @import url('../../static/css/wms.css/wms.css');
    .tag-list {
        width: 94%;
        min-height: 160rpx;
        margin: 10px auto;
        background-color: #FFF;
        border-radius: 5px;
        box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
    .page-container {
        min-height: 100vh;
        background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
        padding-bottom: 20rpx;
    }
    .tag {
    .search-bar {
        padding: 0rpx 14rpx;
        background: #ffffff;
        box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
    }
    .order-list {
        padding: 0 24rpx;
    }
    .order-card {
        background: #ffffff;
        border-radius: 16rpx;
        margin-top: 20rpx;
        box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .order-card:active {
        transform: scale(0.98);
        box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.12);
    }
    .card-header {
        display: flex;
        align-items: center;
        padding: 24rpx 28rpx;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    .order-badge {
        padding: 6rpx 16rpx;
        border-radius: 20rpx;
        margin-right: 20rpx;
    }
    .badge-text {
        font-size: 22rpx;
        font-weight: 500;
        color: #ffffff;
    }
    /* 状态徽章颜色 */
    .badge-pending {
        background: rgba(255, 255, 255, 0.3);
    }
    .badge-processing {
        background: #ffc107;
    }
    .badge-completed {
        background: #28a745;
    }
    .badge-cancelled {
        background: #dc3545;
    }
    .badge-default {
        background: rgba(255, 255, 255, 0.25);
    }
    .order-no {
        flex: 1;
    }
    .order-no-label {
        font-size: 22rpx;
        color: rgba(255, 255, 255, 0.7);
        display: block;
    }
    .order-no-value {
        font-size: 28rpx;
        color: #ffffff;
        font-weight: 600;
        display: block;
        margin-top: 4rpx;
    }
    .card-body {
        padding: 24rpx 28rpx;
    }
    .info-row {
        display: flex;
        flex-wrap: wrap;
    }
    .info-item {
        width: 50%;
        margin-bottom: 16rpx;
    }
    .info-label {
        font-size: 24rpx;
        color: #909399;
        display: block;
    }
    .info-value {
        font-size: 28rpx;
        color: #303133;
        font-weight: 500;
        display: block;
        margin-top: 6rpx;
    }
    .card-footer {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 20rpx 28rpx;
        border-top: 1rpx solid #f0f0f0;
    }
    .view-detail {
        font-size: 26rpx;
        color: #909399;
        margin-right: 8rpx;
    }
    /* 空状态 */
    .empty-state {
        display: flex;
        flex-direction: column;
        min-height: 80rpx;
        border-bottom: 1px solid #e2e2e2;
        align-items: center;
        justify-content: center;
        padding: 120rpx 0;
    }
    .wms-tag {
        min-width: 60rpx;
        margin-left: 50rpx;
    .empty-text {
        font-size: 30rpx;
        color: #909399;
        margin-top: 30rpx;
        color: #FFF;
        font-size: 14px;
        padding: 4rpx 12rpx;
    }
    .tag-item {
        width: 100%;
        min-height: 60rpx;
        line-height: 2;
        padding-left: 50rpx;
        color: #606266;
        font-size: 14px;
    .empty-hint {
        font-size: 24rpx;
        color: #c0c4cc;
        margin-top: 12rpx;
    }
</style>
pages/order/orderPakin2.vue
@@ -1,147 +1,187 @@
<template>
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs">订单号:</view>
                <view style="flex: 1;">
                    <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="orderNoFocus">
    <view class="page-container">
        <!-- 顶部固定区域 -->
        <view class="form-section">
            <!-- 订单号 -->
            <view class="form-item">
                <view class="form-label">
                    <uni-icons type="staff" size="18" color="#667eea"></uni-icons>
                    <text class="label-text">订单号</text>
                </view>
                <view class="form-input-wrap">
                    <input class="form-input" type="text" placeholder="扫码 / 输入订单号" v-model="orderNo"
                        :focus="orderNoFocus" disabled />
                </view>
                </view>
                
            <!-- 托盘码 -->
            <view class="form-item">
                <view class="form-label">
                    <uni-icons type="scan" size="18" color="#667eea"></uni-icons>
                    <text class="label-text">托盘码</text>
            </view>
            <view class="item">
                <view class="code-decs">托盘码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
                    @input="barcodeInput()">
            </view>
            <view class="item">
                <view class="code-decs">物料码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
                <!-- <view class="item-right">
                    <button></button>
                    <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text>
                    <uni-icons type="right" color="#c1c1c1"></uni-icons>
                </view> -->
                <view class="form-input-wrap">
                    <input class="form-input" type="text" placeholder="扫码 / 输入托盘码" v-model="barcode"
                        :focus="barcodeFocus" @input="barcodeInput()" />
                    <uni-icons v-if="barcode" type="clear" size="20" color="#c0c4cc" @click="clearBarcode"></uni-icons>
            </view>
        </view>
        <view class="mat-list-title">
            商品列表
            <!-- 物料码 -->
            <view class="form-item">
                <view class="form-label">
                    <uni-icons type="list" size="18" color="#667eea"></uni-icons>
                    <text class="label-text">物料码</text>
        </view>
        <scroll-view>
            <view class="list" v-for="(item,i) in dataList" :key="i">
                <view class="list-left">
                    <view class="list-left-item">
                        <view class="desc">No:</view>
                        <view class="left-item">{{i + 1}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">编码:</view>
                        <view class="left-item">
                            <uni-tag :text="item.matnr" type="primary"></uni-tag>
                <view class="form-input-wrap">
                    <input class="form-input" type="text" placeholder="扫码复核物料" v-model="matnr"
                        :focus="matFocus" @input="findMat()" />
                        </view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">品名:</view>
                        <view class="left-item">{{item.maktx}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">规格:</view>
                        <view class="left-item">{{item.specs}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">批号:</view>
                        <view class="left-item">
                            <uni-tag :text="item.batch" type="warning"></uni-tag>
        <!-- 商品列表标题 -->
        <view class="list-header">
            <view class="header-left">
                <text class="header-title">商品列表</text>
                <view class="count-badge" v-if="dataList.length > 0">
                    <text class="count-text">{{dataList.length}}</text>
                        </view>
                    </view>
                    <!-- <view class="list-left-item">
                        <view class="desc">重量:</view>
                        <view class="left-item">
                            <uni-tag :text="item.weight" type="warning"></uni-tag>
                        </view>
                    </view> -->
                    <view class="list-left-item">
                        <view class="desc">数量:</view>
                        <view class="left-item">{{item.anfme}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">状态:</view>
                        <view class="left-item">{{item.review}}</view>
            <view class="header-right">
                <text class="review-status">已复核: {{reviewedCount}} / {{dataList.length}}</text>
                    </view>
                </view>
                <view class="list-right">
                    <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
                    <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
        <!-- 商品列表 -->
        <view class="list-container">
            <view class="mat-card" v-for="(item, i) in dataList" :key="i">
                <!-- 卡片头部 -->
                <view class="card-top">
                    <view class="card-index">{{i + 1}}</view>
                    <view class="mat-code-wrap">
                        <text class="mat-code">{{item.matnr}}</text>
                    </view>
                    <view class="review-badge" :class="item.review === '已复核' ? 'reviewed' : 'unreviewed'">
                        <text class="badge-text">{{item.review}}</text>
                </view>
            </view>
        </scroll-view>
                <!-- 卡片内容 -->
                <view class="card-content">
                    <view class="info-row">
                        <view class="info-col">
                            <text class="info-label">品名</text>
                            <text class="info-value">{{item.maktx || '-'}}</text>
                        </view>
                    </view>
                    <view class="info-row">
                        <view class="info-col half">
                            <text class="info-label">规格</text>
                            <text class="info-value">{{item.specs || '-'}}</text>
                        </view>
                        <view class="info-col half">
                            <text class="info-label">批号</text>
                            <text class="info-value highlight">{{item.batch || '-'}}</text>
                        </view>
                    </view>
                    <view class="info-row">
                        <view class="info-col half">
                            <text class="info-label">数量</text>
                            <text class="info-value qty">{{item.anfme}}</text>
                        </view>
                    </view>
                </view>
                <!-- 卡片操作 -->
                <view class="card-actions">
                    <view class="action-btn edit-btn" @click="revise(item, i)">
                        <uni-icons type="compose" size="18" color="#667eea"></uni-icons>
                        <text class="action-text">修改</text>
                    </view>
                    <view class="action-btn delete-btn" @click="remove(item, i, 'warn')">
                        <uni-icons type="trash" size="18" color="#f56c6c"></uni-icons>
                        <text class="action-text delete-text">移除</text>
                    </view>
                </view>
            </view>
            <!-- 空状态 -->
            <view class="empty-state" v-if="dataList.length === 0">
                <uni-icons type="cart" size="60" color="#CCCCCC"></uni-icons>
                <text class="empty-text">暂无商品</text>
                <text class="empty-hint">请从订单明细选择商品</text>
            </view>
            <!-- 底部占位 -->
            <view class="bottom-placeholder"></view>
        </view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" @click="reset('warn')">重置</button>
            <button size="mini" type="primary" @click="combConfirm('warn')" :disabled="isDisabled">组托</button>
        <view class="bottom-bar">
            <view class="btn-reset" @click="reset('warn')">
                <uni-icons type="refresh" size="18" color="#909399"></uni-icons>
                <text class="btn-text">重置</text>
        </view>
        <!-- 弹窗 -->
            <view class="btn-submit" :class="{'btn-disabled': isDisabled || dataList.length === 0}"
                @click="combConfirm('warn')">
                <uni-icons type="checkbox" size="18" color="#ffffff"></uni-icons>
                <text class="btn-text">确认组托</text>
            </view>
        </view>
        <!-- 弹窗区域 -->
        <!-- 修改数量 -->
        <view>
            <uni-popup ref="revise" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">修改</view>
                    <view class="popup-item">
                        <view class="popup-item-left">编码:</view>
                        <view class="popup-item-right">
                            <input type="text" v-model="matnr" disabled="true"
                                style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
            <view class="popup-card">
                <view class="popup-header">
                    <text class="popup-title">修改信息</text>
                        </view>
                <view class="popup-body">
                    <view class="popup-row">
                        <text class="popup-label">编码</text>
                        <view class="popup-value disabled">{{matnr}}</view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">批号:</view>
                        <view class="popup-item-right"><input type="text" v-model="batch"></view>
                    <view class="popup-row">
                        <text class="popup-label">批号</text>
                        <input class="popup-value input" type="text" v-model="batch" placeholder="输入批号" />
                    </view>
                    <!-- <view class="popup-item">
                        <view class="popup-item-left">重量:</view>
                        <view class="popup-item-right"><input type="text" v-model="weight"></view>
                    </view> -->
                    <view class="popup-item">
                        <view class="popup-item-left">数量:</view>
                        <view class="popup-item-right" style="border: none;justify-content: center;">
                    <view class="popup-row">
                        <text class="popup-label">数量</text>
                        <view class="popup-value number">
                            <uni-number-box :value="count" :step='0.001' :max="9999999" color="#747474" @change="changeValue" />
                        </view>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="reviseClose">取消</view>
                        <view class="btn-right" @click="reviseConfirm()">修改</view>
                </view>
                <view class="popup-footer">
                    <view class="popup-btn cancel" @click="reviseClose">取消</view>
                    <view class="popup-btn confirm" @click="reviseConfirm()">确认</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 移除确认 -->
        <view>
            <!-- 提示窗示例 -->
            <uni-popup ref="alertDialog" type="dialog">
                <uni-popup-dialog :type="msgType" confirmText="移除" :title="title" :content="content"
                    @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
            </uni-popup>
        </view>
        <view>
            <!-- 提示信息弹窗 -->
            <uni-popup ref="message" type="message">
                <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
            </uni-popup>
        </view>
        <!-- 确认组托 -->
        <view>
            <uni-popup ref="combConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
                    @confirm="comb" @close="combClose"></uni-popup-dialog>
            </uni-popup>
        </view>
        <!-- 确认重置 -->
        <view>
            <uni-popup ref="resetConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
                    @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
            </uni-popup>
        </view>
    </view>
</template>
@@ -172,14 +212,21 @@
                isDisabled:false
            }
        },
        computed: {
            // 已复核数量
            reviewedCount() {
                return this.dataList.filter(item => item.review === '已复核').length;
            }
        },
        onLoad() {
            let that = this
            let that = this;
            const eventChannel = this.getOpenerEventChannel();
            if (eventChannel) {
            eventChannel.on('orderItem', function(data) {                
                that.orderNo = data.item.orderNo
                that.checkMat(data.item)
                    that.orderNo = data.item.orderNo;
                    that.checkMat(data.item);
            });
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
@@ -187,11 +234,18 @@
        },
        methods: {
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
                this.msgType1 = type;
                this.$refs.message.open();
            },
            clearBarcode() {
                this.barcode = '';
                this.barcodeFocus = false;
                setTimeout(() => {
                    this.barcodeFocus = true;
                }, 100);
            },
            clearOrderNo() {
                this.orderNo = ''
                this.orderNo = '';
                let that = this;
                that.orderNoFocus = false;
                setTimeout(() => {
@@ -200,21 +254,17 @@
                }, 100);
            },
            orderNoInput() {
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.orderNo.length
                    this.barcodeFocuss()
                }, 200)
                    var len = this.orderNo.length;
                    this.barcodeFocuss();
                }, 200);
            },
            // barcode input 事件
            barcodeInput() {
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.barcode.length
                    this.focuss()
                }, 200)
                    var len = this.barcode.length;
                    this.focuss();
                }, 200);
            },
            // 托盘码有误重置
            barcodeFocuss() {
                let that = this;
                that.barcodeFocus = false;
@@ -223,7 +273,6 @@
                    that.barcodeFocus = true;
                }, 100);
            },
            // 商品光标清空重置
            focuss() {
                this.focus = false;
                setTimeout(() => {
@@ -231,213 +280,150 @@
                    this.matFocus = true;
                }, 100);
            },
            // 搜索物料
            // 搜索物料 - 扫码复核
            findMat() {
                let that = this
                let m = that.matnr.split(";")
                let matnr1 = m[0].slice(3)
                let that = this;
                let m = that.matnr.split(";");
                let matnr1 = m[0].slice(3);
                let found = false;
                for(var i = 0;i<that.dataList.length;i++){
                    if(that.dataList[i].matnr === matnr1){
                        that.dataList[i].review = "已复核"
                        that.dataList[i].review = "已复核";
                        found = true;
                    }
                }
                if (found) {
                    that.messageText = "复核成功";
                    that.messageToggle('success');
                }
                setTimeout(() => {
                    this.matnr = '';                    
                }, 100);
                // uni.request({
                //     url: that.baseUrl + '/mat/auth',
                //     data: {
                //         matnr: matnr1
                //     },
                //     header: {
                //         'token': uni.getStorageSync('token')
                //     },
                //     success(result) {
                //         result = result.data
                //         if (result.code === 200 && result.data) {
                //             that.matData = result.data
                //             that.matnr = ''
                //             that.matData['batch'] = ''
                //             uni.navigateTo({
                //                 url: "../mat/matSelected",
                //                 // 通过eventChannel向被打开页面传送数据
                //                 success: function(res) {
                //                     res.eventChannel.emit('mat', {
                //                         data: result.data
                //                     })
                //                 },
                //                 // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
                //                 events: {
                //                     matList: function(data) {
                //                         that.checkMat(data.data)
                //                         that.focuss()
                //                     },
                //                 },
                //             });
                //         } else if (result.code == 403) {
                //             uni.showToast({
                //                 title: result.msg,
                //                 icon: "none",
                //                 position: 'top'
                //             })
                //             setTimeout(() => {
                //                 uni.reLaunch({
                //                     url: '../login/login'
                //                 });
                //             }, 1000);
                //         } else {
                //             uni.showToast({
                //                 title: result.msg,
                //                 icon: "none",
                //                 position: 'top'
                //             })
                //         }
                //     }
                // });
            },
            selectMat() {
                let that = this
                let that = this;
                uni.navigateTo({
                    url: "../mat/matQuery",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('commonUrl', {
                            commonUrl: ''
                        })
                        });
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            that.matnr = data.data
                            that.findMat(that.matnr)
                            that.matnr = data.data;
                            that.findMat(that.matnr);
                        },
                    },
                });
                that.matnr = ''
                that.matnr = '';
            },
            checkMat(mat) {
                mat.review = "未复核"
                mat.anfme = mat.enableQty
                var len = this.dataList.length
                var add = true ,sameItem = false
                mat.review = "未复核";
                mat.anfme = mat.enableQty;
                var len = this.dataList.length;
                var add = true, sameItem = false;
                for (var i = 0; i < len; i++) {
                    if (mat.matnr == this.dataList[i].matnr) {
                        for (var j = 0; j < len; j++) {
                            if (mat.batch == this.dataList[j].batch) {
                                sameItem = true
                                sameItem = true;
                            }
                        }
                        // 相同物料 不同批号  新加列表
                        if (mat.batch != this.dataList[i].batch) {
                            this.$forceUpdate() // 强制刷新
                            this.$forceUpdate();
                            if (sameItem) {
                                add = false
                                add = false;
                            } else {
                                add = true
                                add = true;
                            }
                        } else {
                            // 相同物料相同批号 数量累加
                            this.dataList[i].anfme += mat.anfme
                            this.$forceUpdate() // 强制刷新
                            add = false
                            this.dataList[i].anfme += mat.anfme;
                            this.$forceUpdate();
                            add = false;
                        }
                    }
                }
                if (add) {
                    this.dataList.unshift(mat)
                    this.dataList.unshift(mat);
                }
            },
            // 修改批号
            // 修改
            revise(item, i) {
                this.matnr = this.dataList[i].matnr
                this.count = this.dataList[i].anfme
                this.batch = this.dataList[i].batch
                this.weight = this.dataList[i].weight
                this.rowNum = i
                this.eject()
                this.matnr = this.dataList[i].matnr;
                this.count = this.dataList[i].anfme;
                this.batch = this.dataList[i].batch;
                this.weight = this.dataList[i].weight;
                this.rowNum = i;
                this.eject();
            },
            eject(type) {
                this.type = type
                this.$refs.revise.open(type)
                this.type = type;
                this.$refs.revise.open(type);
            },
            // 列表移除按钮
            remove(item, i, type) {
                this.removeNum  = i
                this.msgType = type
                this.title = '警告'
                this.content = '是否移除当前商品!'
                this.$refs.alertDialog.open(i)
                this.removeNum = i;
                this.msgType = type;
                this.title = '确认移除';
                this.content = '是否移除该商品?';
                this.$refs.alertDialog.open(i);
            },
            // 确认移除
            removeConfirm() {
                this.messageText = "移除成功"
                this.messageToggle('success')
                this.dataList.splice(this.removeNum, 1)
                this.messageText = "移除成功";
                this.messageToggle('success');
                this.dataList.splice(this.removeNum, 1);
            },
            // 取消移除
            removeClose() {
                this.$refs.alertDialog.close()
                this.$refs.alertDialog.close();
            },
            reviseConfirm() {
                this.dataList[this.rowNum].anfme = this.count
                this.dataList[this.rowNum].batch = this.batch
                this.dataList[this.rowNum].weight = this.weight
                this.matnr = ''
                this.messageText = "修改成功"
                this.messageToggle('success')
                this.$refs.revise.close()
                this.dataList[this.rowNum].anfme = this.count;
                this.dataList[this.rowNum].batch = this.batch;
                this.dataList[this.rowNum].weight = this.weight;
                this.matnr = '';
                this.messageText = "修改成功";
                this.messageToggle('success');
                this.$refs.revise.close();
            },
            reviseClose() {
                this.$refs.revise.close()
                this.$refs.revise.close();
            },
            changeValue(value) {
                this.count = value
                this.count = value;
            },
            combConfirm(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否现在组托!'
                this.$refs.combConfirm.open()
                if (this.isDisabled || this.dataList.length === 0) return;
                this.msgType = type;
                this.title = '确认组托';
                this.content = '确认将商品组托入库?';
                this.$refs.combConfirm.open();
            },
            combClose() {
                this.$refs.combConfirm.close()
                this.$refs.combConfirm.close();
            },
            comb() {                
                let that = this;
                that.isDisabled = true
                that.isDisabled = true;
                if (that.orderNo === '') {
                    this.messageText = "请输入订单条码"
                    this.messageToggle('error')
                    this.messageText = "请输入订单号";
                    this.messageToggle('error');
                    that.isDisabled = false;
                    return;
                }
                if (that.barcode === '') {
                    this.messageText = "请扫描托盘条码"
                    this.messageToggle('error')
                    this.messageText = "请扫描托盘码";
                    this.messageToggle('error');
                    that.isDisabled = false;
                    return;
                }
                if (that.dataList.length === 0) {
                    this.messageText = "请添加商品列表"
                    this.messageToggle('error')
                    this.messageText = "请添加商品";
                    this.messageToggle('error');
                    that.isDisabled = false;
                    return;
                }
                for (var i = 0; i < that.dataList.length; i++) {
                    if (that.dataList[i].review !== "已复核" ) {
                        this.messageText = that.dataList[i].matnr + '未复核'
                        this.messageToggle('error')
                        return;
                    }
                    if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                        this.messageText = that.dataList[i].matnr + '组托数量不能为0'
                        this.messageToggle('error')
                        return;
                    }
                }
                uni.request({
                    url: that.baseUrl + '/mobile/comb/auth',
@@ -451,57 +437,58 @@
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        var res = result.data;
                        if (res.code === 200) {
                            that.resst();
                            that.messageText = "组托成功"
                            that.messageToggle('success')
                            that.messageText = "组托成功";
                            that.messageToggle('success');
                            const innerAudioContext = uni.createInnerAudioContext();
                            innerAudioContext.src = '/static/music/pakinOk.mp3';
                            innerAudioContext.play()
                        } else if (res.code == 403) {
                            that.messageText = res.msg
                            that.messageToggle('error')
                            innerAudioContext.play();
                            // 返回上一页
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                                uni.navigateBack();
                            }, 1500);
                        } else if (res.code == 403) {
                            that.messageText = res.msg;
                            that.messageToggle('error');
                            setTimeout(() => {
                                uni.reLaunch({ url: '../login/login' });
                            }, 1000);
                        } else {
                            that.messageText = res.msg
                            that.messageToggle('error')
                            that.messageText = res.msg;
                            that.messageToggle('error');
                        }
                    },
                    fail: () => {
                        that.messageText = "接口超时"
                        that.messageToggle('error')
                        that.messageText = "网络请求超时";
                        that.messageToggle('error');
                    },
                    complete: () => {
                        that.isDisabled = false
                        that.isDisabled = false;
                    }
                });
            },
            reset(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否重置!'
                this.$refs.resetConfirm.open()
                this.msgType = type;
                this.title = '确认重置';
                this.content = '是否清空所有商品?';
                this.$refs.resetConfirm.open();
            },
            // 确认重置
            resetConfirm() {
                this.dataList = []
                this.messageText = "重置完成"
                this.messageToggle('success')
                this.dataList = [];
                this.barcode = '';
                this.messageText = "重置完成";
                this.messageToggle('success');
            },
            // 取消重置
            resetClose() {
            },
            resetClose() {},
            // 清空
            resst() {
                this.orderNo = ''
                this.dataList = []
                this.barcode = ''
                this.orderNo = '';
                this.dataList = [];
                this.barcode = '';
                let that = this;
                that.orderNoFocus = false;
                setTimeout(() => {
@@ -516,59 +503,416 @@
<style>
    @import url('../../static/css/wms.css/wms.css');
    .code {
        width: 100%;
        position: fixed;
        min-height: 200rpx;
        background-color: #FFF;
        z-index: 10;
    page {
        height: 100%;
        background: #f5f7fa;
    }
    .item {
    .page-container {
        min-height: 100vh;
        background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
        padding-bottom: 110rpx;
        box-sizing: border-box;
    }
    /* 表单区域 */
    .form-section {
        background: #ffffff;
        padding: 12rpx 20rpx;
        box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
    }
    .form-item {
        display: flex;
        align-items: center;
        height: 100rpx;
        margin-left: 20rpx;
        border-bottom: 1px solid #DCDFE6;
        padding: 12rpx 0;
        border-bottom: 1rpx solid #f0f0f0;
    }
    .item input {
        height: 50rpx;
        line-height: 50rpx;
        /* font-family: PingFang SC; uniapp 默认字体不居中 */
        font-size: 36upx;
        font-family: PingFang SC;
        width: 55vw;
    .form-item:last-child {
        border-bottom: none;
    }
    .code-decs {
        width: 20vw;
        font-size: 18px;
    .form-label {
        display: flex;
        align-items: center;
        width: 140rpx;
        flex-shrink: 0;
    }
    .label-text {
        font-size: 26rpx;
        color: #303133;
        margin-left: 6rpx;
    }
    .form-input-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        background: #f5f7fa;
        border-radius: 6rpx;
        padding: 0 16rpx;
        height: 60rpx;
    }
    .form-input {
        flex: 1;
        height: 60rpx;
        font-size: 26rpx;
        color: #303133;
    }
    .item-right {
        margin-left: auto;
        margin-right: 20rpx;
    /* 列表头部 */
    .list-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16rpx 20rpx;
        background: #ffffff;
        margin-top: 12rpx;
        box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
    }
    .mat-list-title {
        height: 80rpx;
        line-height: 80rpx;
        width: 100%;
        background-color: white;
    .header-left {
        display: flex;
        align-items: center;
    }
    .header-title {
        font-size: 28rpx;
        color: #303133;
        font-weight: 600;
    }
    .count-badge {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 16rpx;
        padding: 2rpx 12rpx;
        margin-left: 12rpx;
    }
    .count-text {
        font-size: 20rpx;
        color: #ffffff;
        font-weight: 500;
    }
    .header-right {
        display: flex;
        align-items: center;
    }
    .review-status {
        font-size: 22rpx;
        color: #909399;
    }
    /* 商品列表 */
    .list-container {
        padding: 0 20rpx;
    }
    .mat-card {
        background: #ffffff;
        border-radius: 12rpx;
        margin-top: 12rpx;
        box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }
    .card-top {
        display: flex;
        align-items: center;
        padding: 14rpx 16rpx;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    .card-index {
        width: 36rpx;
        height: 36rpx;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22rpx;
        color: #ffffff;
        font-weight: 600;
        margin-right: 12rpx;
    }
    .mat-code-wrap {
        flex: 1;
    }
    .mat-code {
        font-size: 26rpx;
        color: #ffffff;
        font-weight: 600;
    }
    .review-badge {
        padding: 4rpx 12rpx;
        border-radius: 16rpx;
    }
    .reviewed {
        background: #28a745;
    }
    .unreviewed {
        background: rgba(255, 255, 255, 0.3);
    }
    .badge-text {
        font-size: 20rpx;
        color: #ffffff;
    }
    /* 卡片内容 */
    .card-content {
        padding: 12rpx 16rpx;
    }
    .info-row {
        display: flex;
        margin-bottom: 8rpx;
    }
    .info-row:last-child {
        margin-bottom: 0;
    }
    .info-col {
        flex: 1;
    }
    .info-col.half {
        width: 50%;
        flex: none;
    }
    .info-label {
        font-size: 20rpx;
        color: #909399;
        display: block;
    }
    .info-value {
        font-size: 24rpx;
        color: #303133;
        display: block;
        margin-top: 2rpx;
    }
    .info-value.highlight {
        color: #667eea;
        font-weight: 500;
    }
    .info-value.qty {
        font-size: 28rpx;
        color: #303133;
        font-weight: 600;
    }
    /* 卡片操作 */
    .card-actions {
        display: flex;
        border-top: 1rpx solid #f0f0f0;
    }
    .action-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14rpx 0;
    }
    .edit-btn {
        border-right: 1rpx solid #f0f0f0;
    }
    .action-text {
        font-size: 24rpx;
        color: #667eea;
        margin-left: 6rpx;
    }
    .delete-text {
        color: #f56c6c;
    }
    /* 空状态 */
    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60rpx 0;
    }
    .empty-text {
        font-size: 26rpx;
        color: #909399;
        margin-top: 16rpx;
    }
    .empty-hint {
        font-size: 22rpx;
        color: #c0c4cc;
        margin-top: 8rpx;
    }
    .bottom-placeholder {
        height: 20rpx;
    }
    /* 底部操作栏 */
    .bottom-bar {
        position: fixed;
        margin-top: 300rpx;
        z-index: 9;
        /* border-top: 1px solid #DCDFE6; */
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        padding: 16rpx 20rpx;
        background: #ffffff;
        box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
    }
    .btn-reset {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 160rpx;
        height: 72rpx;
        background: #f5f7fa;
        border-radius: 36rpx;
        margin-right: 16rpx;
    }
    .btn-reset .btn-text {
        font-size: 26rpx;
        color: #909399;
        margin-left: 6rpx;
    }
    .btn-submit {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 72rpx;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 36rpx;
    }
    .btn-submit .btn-text {
        font-size: 28rpx;
        color: #ffffff;
        font-weight: 500;
        margin-left: 6rpx;
    }
    .btn-disabled {
        background: #c0c4cc;
        opacity: 0.6;
    }
    /* 弹窗样式 */
    .popup-card {
        width: 600rpx;
        background: #ffffff;
        border-radius: 16rpx;
        overflow: hidden;
    }
    .popup-header {
        padding: 24rpx;
        text-align: center;
        box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
        border-bottom: 1rpx solid #f0f0f0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    .list:first-child {
        margin-top: 420rpx;
    .popup-title {
        font-size: 30rpx;
        color: #ffffff;
        font-weight: 600;
    }
    .list:last-child {
        margin-bottom: 120rpx;
    .popup-body {
        padding: 24rpx;
    }
    .popup-row {
        display: flex;
        align-items: center;
        margin-bottom: 20rpx;
        height: 70rpx;
    }
    .popup-row:last-child {
        margin-bottom: 0;
    }
    .popup-label {
        width: 80rpx;
        font-size: 26rpx;
        color: #606266;
        flex-shrink: 0;
    }
    .popup-value {
        flex: 1;
        height: 70rpx;
        background: #f5f7fa;
        border-radius: 8rpx;
        padding: 0 16rpx;
        font-size: 26rpx;
        color: #303133;
        display: flex;
        align-items: center;
        box-sizing: border-box;
    }
    .popup-value.disabled {
        color: #909399;
        background: #f0f0f0;
    }
    .popup-value.input {
        padding: 0 16rpx;
    }
    .popup-value.number {
        justify-content: center;
        background: transparent;
        padding: 0;
    }
    .popup-footer {
        display: flex;
        border-top: 1rpx solid #f0f0f0;
    }
    .popup-btn {
        flex: 1;
        height: 90rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28rpx;
    }
    .popup-btn.cancel {
        color: #909399;
        border-right: 1rpx solid #f0f0f0;
    }
    .popup-btn.confirm {
        color: #667eea;
        font-weight: 600;
    }
</style>
pages/stock/stockQuery.vue
@@ -1,87 +1,109 @@
<template>
    <view>
        <!-- 搜索框 -->
        <view class="code">
            <view class="item">
                <view class="code-decs">库位号:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="locNo">
    <view class="page-container">
        <!-- 搜索表单 -->
        <view class="form-section">
            <view class="form-item">
                <view class="form-label">
                    <uni-icons type="location" size="18" color="#667eea"></uni-icons>
                    <text class="label-text">库位号</text>
            </view>
            <view class="item">
                <view class="code-decs">物料号:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" @input="findMat()">
                <view class="item-right">
                <view class="form-input-wrap">
                    <input class="form-input" type="text" placeholder="扫码 / 输入库位号" v-model="locNo" />
                    <uni-icons v-if="locNo" type="clear" size="18" color="#c0c4cc" @click="locNo=''"></uni-icons>
                </view>
            </view>
            <view class="form-item">
                <view class="form-label">
                    <uni-icons type="list" size="18" color="#667eea"></uni-icons>
                    <text class="label-text">物料号</text>
        </view>
        <view class="mat-list-title">
            商品列表
                <view class="form-input-wrap">
                    <input class="form-input" type="text" placeholder="扫码 / 输入物料号" v-model="matnr" @input="findMat()" />
                    <uni-icons v-if="matnr" type="clear" size="18" color="#c0c4cc" @click="matnr=''"></uni-icons>
                </view>
            </view>
        </view>
        
        <!-- 列表头部 -->
        <view class="list-header">
            <view class="header-left">
                <text class="header-title">库存列表</text>
                <view class="count-badge" v-if="dataList.length > 0">
                    <text class="count-text">{{dataList.length}}</text>
                </view>
            </view>
        </view>
        
        <scroll-view>
            <view class="list" v-for="(item,i) in dataList" :key="i">
                <view class="list-left">
                    <view class="list-left-item">
                        <view class="desc">No:</view>
                        <view class="left-item">{{i + 1}}</view>
        <!-- 库存列表 -->
        <view class="list-container">
            <view class="stock-card" v-for="(item, i) in dataList" :key="i">
                <view class="card-header">
                    <view class="card-index">{{i + 1}}</view>
                    <view class="loc-info">
                        <text class="loc-no">{{item.locNo}}</text>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">库位:</view>
                        <view class="left-item">{{item.locNo}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">编码:</view>
                        <view class="left-item">
                            <uni-tag :text="item.matnr" type="primary"></uni-tag>
                    <view class="qty-badge">
                        <text class="qty-text">{{item.anfme}}</text>
                        </view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">品名:</view>
                        <view class="left-item">{{item.maktx}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">规格:</view>
                        <view class="left-item">{{item.specs}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">批号:</view>
                        <view class="left-item">
                            <uni-tag :text="item.batch" type="warning"></uni-tag>
                <view class="card-body">
                    <view class="info-row">
                        <view class="info-col">
                            <text class="info-label">物料编码</text>
                            <text class="info-value code">{{item.matnr}}</text>
                        </view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">数量:</view>
                        <view class="left-item">{{item.anfme}}</view>
                    <view class="info-row">
                        <view class="info-col">
                            <text class="info-label">物料名称</text>
                            <text class="info-value">{{item.maktx || '-'}}</text>
                    </view>
                    <!-- <view class="list-left-item">
                        <view class="desc">库位号:</view>
                        <view class="left-item">{{item.locNo}}</view>
                    </view> -->
                </view>
                <!-- <view class="list-right">
                    <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
                    <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
                </view> -->
                    <view class="info-row">
                        <view class="info-col half">
                            <text class="info-label">规格</text>
                            <text class="info-value">{{item.specs || '-'}}</text>
            </view>
        </scroll-view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" @click="reset('warn')">重置</button>
            <button size="mini" type="primary" @click="search()">查询</button>
                        <view class="info-col half">
                            <text class="info-label">批号</text>
                            <text class="info-value batch">{{item.batch || '-'}}</text>
        </view>
        <view>
                    </view>
                </view>
            </view>
            <!-- 空状态 -->
            <view class="empty-state" v-if="dataList.length === 0 && !loading">
                <uni-icons type="search" size="50" color="#CCCCCC"></uni-icons>
                <text class="empty-text">暂无库存数据</text>
                <text class="empty-hint">请输入条件后点击查询</text>
            </view>
            <view class="bottom-placeholder"></view>
        </view>
        <!-- 底部操作栏 -->
        <view class="bottom-bar">
            <view class="btn-reset" @click="reset('warn')">
                <uni-icons type="refresh" size="16" color="#909399"></uni-icons>
                <text class="btn-text">重置</text>
            </view>
            <view class="btn-submit" @click="search()">
                <uni-icons type="search" size="16" color="#ffffff"></uni-icons>
                <text class="btn-text">查询</text>
            </view>
        </view>
            <!-- 提示信息弹窗 -->
            <uni-popup ref="message" type="message">
                <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
            </uni-popup>
        </view>
        <!-- 确认重置 -->
        <view>
            <uni-popup ref="resetConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
                    @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
            </uni-popup>
        </view>
    </view>
</template>
@@ -91,9 +113,10 @@
            return {
                baseUrl: '',
                token: '',
                locNo: null,
                matnr: null,
                locNo: '',
                matnr: '',
                dataList: [],
                loading: false,
                msgType: '',
                msgType1: '',
                messageText: '',
@@ -108,15 +131,16 @@
        methods: {
            // 搜索物料
            findMat() {
                let that = this
                let m = that.matnr.split(";")
                let matnr1 = m[0].slice(3)
                let that = this;
                let m = that.matnr.split(";");
                let matnr1 = m[0].slice(3);
                setTimeout(() => { 
                    that.matnr = matnr1
                    that.matnr = matnr1;
                }, 100);
            },
            search() {
                let that = this
                let that = this;
                that.loading = true;
                uni.request({
                    url: that.baseUrl + '/manLocDetl/list/auth',
                    header:{'token':uni.getStorageSync('token')},
@@ -128,108 +152,323 @@
                    },
                    method:"GET",
                    success(result) {
                        console.log(result)
                        let res = result.data
                        let records = res.data.records
                        let res = result.data;
                        if (res.code == 200) {
                            if (records) {
                                that.dataList = records
                                console.log(that.dataList)
                            let records = res.data.records;
                            if (records && records.length > 0) {
                                that.dataList = records;
                            } else {
                                that.dataList = [];
                                uni.showToast({
                                    title: "暂无更多数据",
                                    title: "暂无数据",
                                    icon: "none",
                                    position: 'top',
                                    duration: 1000
                                    duration: 1500
                                });
                            }
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                                uni.reLaunch({ url: '../login/login' });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                            uni.showToast({ title: res.msg, icon: "none", position: 'top' });
                        }
                    },
                    fail() {
                        uni.showToast({ title: '网络请求失败', icon: "none", position: 'top' });
                    },
                    complete() {
                        that.loading = false;
                    }
                })
                });
            },
            reset(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否重置!'
                this.$refs.resetConfirm.open()
                this.msgType = type;
                this.title = '确认重置';
                this.content = '是否清空查询条件?';
                this.$refs.resetConfirm.open();
            },
            // 确认重置
            resetConfirm() {
                this.dataList = []
                this.matnr = ''
                this.locNo = ''
                this.messageText = "重置完成"
                this.messageToggle('success')
                this.dataList = [];
                this.matnr = '';
                this.locNo = '';
                this.messageText = "重置完成";
                this.messageToggle('success');
            },
            // 取消重置
            resetClose() {
            },
            resetClose() {},
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
                this.msgType1 = type;
                this.$refs.message.open();
            },
        }
    }
</script>
<style>
    @import url('../../static/css/wms.css/wms.css');
    .code {
        width: 100%;
        position: fixed;
        min-height: 200rpx;
        background-color: #FFF;
        z-index: 10;
    page {
        background: #f5f7fa;
    }
    
    .item {
    .page-container {
        min-height: 100vh;
        background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
        padding-bottom: 110rpx;
        box-sizing: border-box;
    }
    /* 表单区域 */
    .form-section {
        background: #ffffff;
        padding: 12rpx 20rpx;
        box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
    }
    .form-item {
        display: flex;
        align-items: center;
        height: 100rpx;
        margin-left: 20rpx;
        border-bottom: 1px solid #DCDFE6;
        padding: 12rpx 0;
        border-bottom: 1rpx solid #f0f0f0;
    }
    
    .item input {
        height: 50rpx;
        line-height: 50rpx;
        /* font-family: PingFang SC; uniapp 默认字体不居中 */
        font-size: 36upx;
        font-family: PingFang SC;
        width: 55vw;
    .form-item:last-child {
        border-bottom: none;
    }
    
    .code-decs {
        width: 20vw;
        font-size: 18px;
    .form-label {
        display: flex;
        align-items: center;
        width: 140rpx;
        flex-shrink: 0;
    }
    .label-text {
        font-size: 26rpx;
        color: #303133;
        margin-left: 6rpx;
    }
    .form-input-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        background: #f5f7fa;
        border-radius: 6rpx;
        padding: 0 16rpx;
        height: 60rpx;
    }
    .form-input {
        flex: 1;
        height: 60rpx;
        font-size: 26rpx;
        color: #303133;
    }
    
    .item-right {
        margin-left: auto;
        margin-right: 20rpx;
    /* 列表头部 */
    .list-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16rpx 20rpx;
        background: #ffffff;
        margin-top: 12rpx;
        box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
    }
    
    .mat-list-title {
        height: 80rpx;
        line-height: 80rpx;
        width: 100%;
        background-color: white;
    .header-left {
        display: flex;
        align-items: center;
    }
    .header-title {
        font-size: 28rpx;
        color: #303133;
        font-weight: 600;
    }
    .count-badge {
        background: linear-gradient(135deg, #F4C823 0%, #E6A817 100%);
        border-radius: 16rpx;
        padding: 2rpx 12rpx;
        margin-left: 12rpx;
    }
    .count-text {
        font-size: 20rpx;
        color: #ffffff;
        font-weight: 500;
    }
    /* 库存列表 */
    .list-container {
        padding: 0 20rpx;
    }
    .stock-card {
        background: #ffffff;
        border-radius: 12rpx;
        margin-top: 12rpx;
        box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }
    .card-header {
        display: flex;
        align-items: center;
        padding: 14rpx 16rpx;
        background: linear-gradient(135deg, #F4C823 0%, #E6A817 100%);
    }
    .card-index {
        width: 36rpx;
        height: 36rpx;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22rpx;
        color: #ffffff;
        font-weight: 600;
        margin-right: 12rpx;
    }
    .loc-info {
        flex: 1;
    }
    .loc-no {
        font-size: 26rpx;
        color: #ffffff;
        font-weight: 600;
    }
    .qty-badge {
        background: rgba(255, 255, 255, 0.3);
        padding: 4rpx 14rpx;
        border-radius: 16rpx;
    }
    .qty-text {
        font-size: 24rpx;
        color: #ffffff;
        font-weight: 600;
    }
    /* 卡片内容 */
    .card-body {
        padding: 12rpx 16rpx;
    }
    .info-row {
        display: flex;
        margin-bottom: 8rpx;
    }
    .info-row:last-child {
        margin-bottom: 0;
    }
    .info-col {
        flex: 1;
    }
    .info-col.half {
        width: 50%;
        flex: none;
    }
    .info-label {
        font-size: 20rpx;
        color: #909399;
        display: block;
    }
    .info-value {
        font-size: 24rpx;
        color: #303133;
        display: block;
        margin-top: 2rpx;
    }
    .info-value.code {
        color: #F4C823;
        font-weight: 600;
    }
    .info-value.batch {
        color: #e6a23c;
    }
    /* 空状态 */
    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80rpx 0;
    }
    .empty-text {
        font-size: 26rpx;
        color: #909399;
        margin-top: 16rpx;
    }
    .empty-hint {
        font-size: 22rpx;
        color: #c0c4cc;
        margin-top: 8rpx;
    }
    .bottom-placeholder {
        height: 20rpx;
    }
    /* 底部操作栏 */
    .bottom-bar {
        position: fixed;
        margin-top: 200rpx;
        z-index: 9;
        /* border-top: 1px solid #DCDFE6; */
        text-align: center;
        box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        padding: 16rpx 20rpx;
        background: #ffffff;
        box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
    }
    .btn-reset {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 160rpx;
        height: 72rpx;
        background: #f5f7fa;
        border-radius: 36rpx;
        margin-right: 16rpx;
    }
    .btn-reset .btn-text {
        font-size: 26rpx;
        color: #909399;
        margin-left: 6rpx;
    }
    .btn-submit {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 72rpx;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 36rpx;
    }
    .btn-submit .btn-text {
        font-size: 28rpx;
        color: #ffffff;
        font-weight: 500;
        margin-left: 6rpx;
    }
</style>