#
whycq
2024-09-23 de3d8e8e749b3a09f99575c0c966203d26115fdb
#
3个文件已修改
5个文件已添加
2038 ■■■■■ 已修改文件
pages.json 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderCar.vue 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderIn.vue 533 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderPakin4.vue 596 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/unFullpltList.vue 444 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/css/order.css 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/css/wms.css/wms.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -238,6 +238,42 @@
                "navigationBarTitleText" : "并板组托"
            }
        }
        ,{
            "path" : "pages/order/orderPakin4",
            "style" :
            {
                "navigationBarTitleText": "销售单入库",
                "enablePullDownRefresh": false
            }
        }
        ,{
            "path" : "pages/order/orderIn",
            "style" :
            {
                "navigationBarTitleText": "销售单入库",
                "enablePullDownRefresh": false
            }
        }
        ,{
            "path" : "pages/order/orderCar",
            "style" :
            {
                "navigationBarTitleText": "待组托列表",
                "enablePullDownRefresh": false
            }
        }
        ,{
            "path" : "pages/order/unFullpltList",
            "style" :
            {
                "navigationBarTitleText": "可并板",
                "enablePullDownRefresh": false
            }
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
pages/home/home.vue
@@ -46,6 +46,13 @@
                        url: '/order/orderPakin'
                    },
                    {
                        title: '销售单入库',
                        name: 'orderIn',
                        color: 'blue',
                        cuIcon: 'pullup',
                        url: '/order/orderIn'
                    },
                    {
                        title: 'Bom入库单',
                        name: 'orderBomPakin',
                        color: 'red',
pages/order/orderCar.vue
New file
@@ -0,0 +1,295 @@
<template>
    <view>
        <view class="list list-font-color shop-car" :class="orderDetl.color" v-for="(orderDetl,index) in orderCarList" :key="index">
            <view class="list-left">
                <view class="detl-threeCode">{{orderDetl.threeCode}}</view>
                <view>主单号:{{orderDetl.orderNo}}</view>
                <view>编号:{{orderDetl.matnr}}</view>
                <view>名称:{{orderDetl.maktx}}</view>
                <view>总数量:{{orderDetl.anfme}}</view>
                <view>入库数量:{{orderDetl.pakinQty}}</view>
            </view>
            <view class="list-right" @click="chageDetl(index)">
                <uni-icons type="settings" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
        <!-- 垫高 -->
        <view style="height: 120rpx;"></view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" type="primary" @click="agvStart('warn')">确认组托</button>
        </view>
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="chageDetl" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">入库数量</view>
                    <view class="popup-item">
                        <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="remove()">移除物料</view>
                        <view class="btn-right" @click="changeCount()">修改数量</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="agvStart" 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" focus="true" v-model="barcode"></view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">满板:</view>
                        <view class="popup-item-right" style="border: none;">
                            <radio-group @change="isFullPlt">
                                <label>
                                    <radio :checked="ck1" style="transform: scale(0.7)"/><text>是</text>
                                </label>
                                <label>
                                    <radio :checked="ck2" style="margin-left: 50rpx;transform: scale(0.7);"/><text>否</text>
                                </label>
                            </radio-group>
                        </view>
                    </view>
                    <view class="btn">
                        <button class="btn-left" @click="agvStartClose()">取消</button>
                        <button class="btn-right" @click="agvStartConfirm()" :disabled="agvStartDis">组托</button>
                    </view>
                </view>
            </uni-popup>
        </view>
    </view>
</template>
<script>
    // todo: 购物车优化,存储购物车内容,退出页面再进后购物车还在
    export default {
        data() {
            return {
                orderCarList: [],
                count: 0,
                index: 0,
                barcode: '',
                agvDevp: '',
                agvStartDis: false,
                ck1: false,
                ck2: true,
                fullPlt: 'N',
            }
        },
        onShow() {
            let _this = this
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
            const eventChannel = this.getOpenerEventChannel();
            // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
            eventChannel.on('item', function(data) {
                _this.orderCarList = data.item
                console.log(data.item);
            })
        },
        methods: {
            // 是否满板
            isFullPlt() {
                var temp = this.ck1
                this.ck1 = this.ck2
                this.ck2 = temp
                if (this.ck1) {
                    this.fullPlt = '1'
                } else {
                    this.fullPlt = '0'
                }
            },
            chageDetl(index) {
                this.index = index
                this.count = this.orderCarList[index].pakinQty
                this.$refs.chageDetl.open()
            },
            // 修改数量
            changeCount() {
                if (this.count > this.orderCarList[this.index].anfme) {
                    uni.showToast({ title: '数量不合法!', icon: "none", position: 'top' })
                    return
                }
                this.orderCarList[this.index].pakinQty = this.count
                this.$forceUpdate() // 强制刷新
                this.$refs.chageDetl.close()
            },
            // 移除物料
            remove() {
                this.orderCarList.splice(this.index, 1)
                this.$refs.chageDetl.close()
            },
            changeValue(value) {
                this.count = value
            },
            agvStart() {
                this.$refs.agvStart.open()
            },
            agvStartClose() {
                this.barcode = ''
                this.agvDevp = ''
                this.$refs.agvStart.close()
            },
            agvStartConfirm() {
                this.barcode = this.barcode.replace(/\s+/g, '')
                let _this = this
                if (_this.barcode === '') {
                    uni.showToast({ title: '托盘码为空!', icon: "error", position: 'top' })
                    return;
                }
                if (_this.orderCarList.length === 0) {
                    uni.showToast({ title: '组托列表为空!', icon: "error", position: 'top' })
                    return;
                }
                for (let k of _this.orderCarList) {
                    if (k.pakinQty == 0) {
                        uni.showToast({ title: `${k.matnr}数量不能为 0 !`, icon: "error", position: 'top' })
                        return;
                    }
                }
                let combMat = { orderNo:'', barcode: '', locNo: '', combMats: [] }
                let combMats = []
                // for (let item of _this.orderCarList) {
                //     combMat.orderNo = item.orderNo
                //     combMat.barcode = _this.barcode
                //     combMat.locNo = _this.agvDevp
                //     combMat.combMats = []
                //     let combM = {csocode: item.threeCode,isoseq: item.deadTime,matnr: item.matnr,batch: item.batch,anfme: item.pakinQty,maktx: item.maktx,specs: item.specs,processSts: item.processSts}
                //     combMat.combMats.push(combM)
                //     combMats.push({...combMat})
                // }
                for    (let detl of _this.orderCarList) {
                    detl.anfme = detl.pakinQty
                    combMats.push(detl)
                }
                this.comb(combMats)
            },
            comb(combMats) {
                let _this = this;
                this.agvStartDis = true
                uni.request({
                    url: _this.baseUrl + '/mobile/comb/auth3',
                    data: JSON.stringify({
                        barcode: _this.barcode,
                        isFull: _this.fullPlt,
                        combMats: combMats
                    }),
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        _this.agvStartDis = false
                        if (res.code === 200) {
                            _this.orderCarList = []
                            _this.$refs.agvStart.close()
                            uni.showToast({ title: '启动成功!', icon: "success", position: 'top' })
                            setTimeout(()=> {
                                _this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: 1});
                                uni.navigateBack({})
                            },1000)
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                        }
                    },
                    fail(res) {
                        _this.agvStartDis = false
                    }
                });
            },
        }
    }
</script>
<style>
    @import url('../../static/css/order.css');
    .shop-car {
        background-color: #2299ff;
        color: #fff;
    }
    .detl-threeCode {
        font-size: 28px;
        font-weight: bold;
    }
    .popup {
        width: 80vw;
        min-height: 100rpx;
        background-color: #FFF;
        border-radius: 25rpx;
        position: relative;
    }
    .title {
        height: 100rpx;
        line-height: 100rpx;
        width: 100%;
        color: #606266;
        text-align: center;
        font-size: 16px;
    }
    .popup-item {
        height: 80rpx;
        line-height: 80rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .popup-item-left {
        width: 20vw;
        padding-right: 20rpx;
        text-align: right;
        color: #606266;
    }
    .popup-item-right {
        display: flex;
        align-items: center;
        width: 50vw;
        height: 50rpx;
        padding: 2px 5px;
        border: 1px solid #E4E7ED;
        border-radius: 5rpx;
    }
    .popup-item-right input{
        color: #606266;
    }
    .btn {
        display: flex;
        height: 90rpx;
        margin-top: 20rpx;
        border-top: 1px solid #DCDFE6;
        justify-content: center;
        align-items: center;
    }
    .btn-left {
        display: flex;
        flex: 1;
        height: 100%;
        justify-content: center;
        align-items: center;
        color: #e2231a;
        border-right: 1px solid #DCDFE6;
    }
    .btn-right {
        display: flex;
        flex: 1;
        height: 100%;
        justify-content: center;
        align-items: center;
        color: #409EFF;
    }
</style>
pages/order/orderIn.vue
New file
@@ -0,0 +1,533 @@
<template>
    <view>
        <view class="search-box">
            <uni-search-bar
                v-model="searchVal"
                maxlength="500"
                ancel="cancel"
                placeholder="输入 / 扫描 订单号"
                @confirm="search()"
                @clear="clear" >
            </uni-search-bar>
            <view class="search-box-info">
                <view></view>
                <view style="width: 100%;text-align: center;margin: 16rpx 0;">{{searchVal}} 总数量:- {{total}} -</view>
                <view style="width: 100rpx;margin: 16rpx 0;" @click="filter()">筛选</view>
            </view>
        </view>
        <view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index">
            <view class="list-left">
                <view>单据编号:{{orderDetl.orderNo}}</view>
                <view>销售单号:{{orderDetl.threeCode}}</view>
                <view>商品编号:{{orderDetl.matnr}}</view>
                <view>商品名称:{{orderDetl.maktx}}</view>
                <view>批号:{{orderDetl.batch}}</view>
                <view>组件号:{{orderDetl.bomCode}}</view>
                <view>订单数量:{{orderDetl.anfme}}</view>
                <view>已作业数量:{{orderDetl.qty}}</view>
            </view>
            <view class="list-right" @click="checkIsFull(index)">
                <uni-icons type="folder-add" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
        <view class="shop-car" @click="orderCar()">
            <view class="car-left">
                <uni-icons type="cart-filled" size="35"  color="#fff"></uni-icons>
            </view>
            <view class="car-right">
                <text>{{orderCarList.length}}</text>
            </view>
        </view>
        <view style="height: 50rpx;"></view>
        <!-- 添加物料弹窗 -->
        <view>
            <uni-popup ref="addItem" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">入库数量</view>
                    <view class="popup-item">
                        <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="addClose">取消</view>
                        <view class="btn-right" @click="addConfirm()">添加</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 选择并板 或 直接入库 -->
        <view>
            <uni-popup ref="chose" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">警告</view>
                    <view class="popup-item">
                        <text>当前物料可并板</text>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="choseClose">去组托</view>
                        <view class="btn-right" @click="choseConfirm()">去并板</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 筛选弹窗 -->
        <view>
            <uni-popup ref="filter" type="dialog">
                <view class="filter-popup">
                    <!-- 标题 -->
                    <view class="title">筛选</view>
                    <view class="popup-item" style="background-color: #dfdfdf;">
                        <view class="item-cl">
                            <view>主订单号:</view>
                            <input type="text" v-model="orderNo">
                        </view>
                    </view>
                    <view class="popup-item" style="background-color: #dfdfdf;">
                        <view class="item-cl">
                            <view>商品编号:</view>
                            <input type="text" v-model="matnr">
                        </view>
                    </view>
                    <view class="popup-item" style="background-color: #dfdfdf;">
                        <view class="item-cl">
                            <view>商品名称:</view>
                            <input type="text" v-model="maktx">
                        </view>
                    </view>
                    <view class="popup-item" style="background-color: #dfdfdf;">
                        <view class="item-cl">
                            <view>商品种类:</view>
                            <input type="text" v-model="brand">
                        </view>
                    </view>
                    <view class="btn filter-btn">
                        <view class="btn-left" @click="filterClose">重置</view>
                        <view class="btn-right" @click="filterConfirm()">确认</view>
                    </view>
                </view>
            </uni-popup>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                dataList: [],
                orderCarList: [],
                searchVal: '',
                total: '',
                orderNo: '',
                matnr: '',
                maktx: '',
                brand: '',
                count: 0,
                index: '',
                locMast: '',
                detls: '',
                data: {
                    curr: 1,
                    limit: 100,
                    three_code: '',
                    matnr: '',
                    maktx: '',
                    order_no: '',
                    brand: ''
                },
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.searchVal = uni.getStorageSync('searchVal');
            this.getDataList(this.searchVal,10)
        },
        methods: {
            search() {
                this.dataList = []
                this.data.curr = 1
                uni.setStorageSync('searchVal', this.searchVal);
                if (this.searchVal.length == 0) {
                    this.getDataList(this.searchVal,10)
                }
            },
            clear() {
            },
            getDataList(threeCode,limit) {
                let _this = this
                uni.showLoading({})
                _this.mask = true
                _this.data.three_code = threeCode
                _this.data.limit = limit
                uni.request({
                    url: `${_this.baseUrl}/orderPakin/page/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: _this.data,
                    method: 'GET',
                    success(res) {
                        uni.hideLoading({})
                        res = res.data
                        if (res.code === 200) {
                            for (let k of res.data.records) {
                                if (k.anfme > k.qty && k.qty == 0) {
                                    k['color'] = 'order-sts-start'
                                } else if (k.anfme > k.qty && k.qty != 0) {
                                    k['color'] = 'order-sts-working'
                                } else {
                                    k['color'] = 'order-sts-end'
                                }
                            }
                            let list = res.data.records
                            _this.dataList =  _this.dataList.concat(list);
                            _this.data.curr = _this.data.curr + 1
                            _this.total = res.data.total
                            _this.mask = false
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                        }
                    }
                })
            },
            filter() {
                this.$refs.filter.open('bottom')
            },
            filterConfirm() {
            },
            filterClose() {
            },
            // 跳转可并板
            unfullplt(locMasts,detls) {
                let _this = this
                uni.navigateTo({
                    url: './unFullpltList',
                    success(res) {
                        res.eventChannel.emit('locMasts', {
                            locMasts: locMasts
                        })
                        res.eventChannel.emit('detls', {
                            detls: detls
                        })
                    },
                    events: {
                        acceptDataFromOpenedPage: function(data) {
                            if (data.data == 1) {
                                setTimeout(()=>{
                                    _this.dataList = []
                                    _this.getDataList(_this.searchVal,10)
                                },200)
                            }
                        }
                    }
                })
            },
            // 点击前往 待组托列表
            orderCar() {
                let _this = this
                if (_this.orderCarList.length === 0) {
                    uni.showToast({ title: '请添加入库商品!', icon: "none", position: 'top' })
                    return
                }
                uni.navigateTo({
                    url: './orderCar',
                    success(res) {
                        res.eventChannel.emit('item', {
                            item: _this.orderCarList
                        })
                    },
                    events: {
                        acceptDataFromOpenedPage: function(data) {
                            if (data.data == 1) {
                                _this.orderCarList = []
                                _this.getOrderDetlList(uni.getStorageSync('threeCode'),10)
                            }
                        }
                    }
                })
            },
            checkIsFull(index) {
                let _this = this
                let item = _this.dataList[index]
                uni.request({
                    url: `${_this.baseUrl}/mobile/check/fullplt/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: item,
                    method: 'POST',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            _this.index = index
                            _this.locMast = res.data
                            _this.detls = item
                            _this.$refs.chose.open('center')
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            _this.addItem(index)
                        }
                    }
                })
            },
            choseClose() {
                this.addItem(this.index)
                this.$refs.chose.close()
            },
            choseConfirm() {
                this.unfullplt(this.locMast,this.detls)
                this.$refs.chose.close()
            },
            // 添加入库商品至 待组托列表
            addItem(index) {
                // 判断添加的商品是否和已经添加的重复
                let dataList = this.dataList
                for (let k of this.orderCarList) {
                    if (k.orderNo == dataList[index].orderNo
                        && k.threeCode == dataList[index].threeCode
                        && k.matnr == dataList[index].matnr
                        && k.bomCode == dataList[index].bomCode) {
                            uni.showToast({ title: '请勿重复添加商品!', icon: "none", position: 'top' })
                            return
                    }
                }
                this.index = index
                this.$refs.addItem.open()
            },
            addClose() {
                this.$refs.addItem.close()
                this.count = 0
            },
            addConfirm() {
                if (this.count == 0) {
                    uni.showToast({ title: '为不必要的麻烦,请填写数量!', icon: "none", position: 'top' })
                    return
                }
                this.dataList[this.index]['used'] = true
                this.dataList[this.index]['pakinQty'] = this.count
                this.orderCarList.push(this.dataList[this.index])
                this.index = 0
                this.count = 0
                this.$refs.addItem.close()
            },
            changeValue(value) {
                this.count = value
            },
        }
    }
</script>
<style>
    .search-box {
        background-color: #d9d9d9;
        z-index: 99;
        position: sticky;
        top: 0rpx;
        left: 0;
    }
    .search-box-info {
        display: flex;
        justify-content: space-around;
    }
    .city-btn {
        margin-left: 10px;
        color: #007aff;
        font-size: 16px;
        font-weight: bold;
    }
    .filter-popup {
        width: 100%;
        height: 80vh;
        background-color: #FFF;
        position: relative;
        border-radius: 30rpx 30rpx 0rpx 0rpx;
    }
    .filter-popup-item {
        height: 100%;
        width: 100%;
        background-color: #c9cdd5;
    }
    .filter-popup-item-left {
        width: 30%;
        height: 100%;
        background-color: #DCDFE6;
    }
    .filter-btn {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        background-color: #FFF;
    }
    .title {
        height: 100rpx;
        line-height: 100rpx;
        width: 100%;
        color: #606266;
        text-align: center;
        font-size: 16px;
    }
    .popup-item {
        height: 80rpx;
        line-height: 80rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .popup-item-left {
        width: 16vw;
        padding-right: 20rpx;
        text-align: right;
        color: #606266;
    }
    .popup-item-right {
        display: flex;
        align-items: center;
        width: 50vw;
        height: 50rpx;
        padding: 2px 5px;
        border: 1px solid #E4E7ED;
        border-radius: 5rpx;
    }
    .popup-item-right input{
        color: #606266;
    }
    .btn {
        display: flex;
        height: 90rpx;
        margin-top: 20rpx;
        border-top: 1px solid #DCDFE6;
        justify-content: center;
        align-items: center;
    }
    .btn-left {
        display: flex;
        flex: 1;
        height: 100%;
        justify-content: center;
        align-items: center;
        color: #606266;
        border-right: 1px solid #DCDFE6;
    }
    .btn-right {
        display: flex;
        flex: 1;
        justify-content: center;
        align-items: center;
        color: #409EFF;
    }
    .item-cl {
        display: flex;align-items: center;
    }
    .item-cl input {
        border-bottom: 1px solid #b9b9b9;
    }
    .list {
        margin: 20rpx;
        font-size: 14px;
        background-color: #fff;
        border-radius: 20rpx;
        border: 1px solid #eeeeee;
        display: flex;
        position: relative;
    }
    .list-left {
        flex: 1;
        padding: 20rpx;
        position: relative;
    }
    .list-right {
        width: 70rpx;
        border-left: 1px solid #eeeeee;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .list-font-color {
        /* color: #fff; */
        background-color: #33bb44;
    }
    .shop-car {
        position: fixed;
        left: 22rpx;
        bottom: 150rpx;
        background-color: #2299ff;
        width: 260rpx;
        height: 90rpx;
        display: flex;
        align-items: center;
        box-shadow: 0 0 10px 5px rgba(0, 0, 0, .6);
        border-radius: 10rpx;
        color: #fff;
        font-size: 28px;
        font-weight: bold;
    }
    .car-left {
        padding: 16rpx;
        flex: 5;
    }
    .car-right {
        flex: 4;
    }
    .popup {
        width: 80vw;
        min-height: 100rpx;
        background-color: #FFF;
        border-radius: 25rpx;
        position: relative;
    }
    .title {
        height: 100rpx;
        line-height: 100rpx;
        width: 100%;
        color: #606266;
        text-align: center;
        font-size: 16px;
    }
    .popup-item {
        height: 80rpx;
        line-height: 80rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .popup-item-left {
        width: 16vw;
        padding-right: 20rpx;
        text-align: right;
        color: #606266;
    }
    .popup-item-right {
        display: flex;
        align-items: center;
        width: 50vw;
        height: 50rpx;
        padding: 2px 5px;
        border: 1px solid #E4E7ED;
        border-radius: 5rpx;
    }
    .popup-item-right input{
        color: #606266;
    }
</style>
pages/order/orderPakin4.vue
New file
@@ -0,0 +1,596 @@
<template>
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs" style="width: 25vw;">入库单号:</view>
                <view style="flex: 1;">
                    <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="orderNoFocus">
                </view>
                <view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;">
                    <uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons>
                </view>
            </view>
            <view class="item">
                <view class="code-decs" style="width: 25vw;">销售订单:</view>
                <view style="flex: 1;">
                    <input type="text" placeholder=" 扫码 / 输入" v-model="threeCode" :focus="threeCodeFocus">
                </view>
                <view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;">
                    <uni-icons type="clear" color="#c1c1c1" @click="clearThreeCode()"></uni-icons>
                </view>
            </view>
            <view class="item">
                <view class="code-decs">组件号:</view>
                <view style="flex: 1;">
                    <input type="text" placeholder=" 扫码 / 输入" v-model="bomCode" :focus="bomCodeFocus">
                </view>
                <view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;">
                    <uni-icons type="clear" color="#c1c1c1" @click="clearBomCode()"></uni-icons>
                </view>
            </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>
            <view class="item">
                <view class="code-decs" style="width: 25vw;">是否满板:</view>
                <radio-group @change="isFullPlt">
                    <label>
                        <radio :checked="ck1" style="transform: scale(0.7)"/><text>是</text>
                    </label>
                    <label>
                        <radio :checked="ck2" style="margin-left: 50rpx;transform: scale(0.7);"/><text>否</text>
                    </label>
                </radio-group>
            </view>
        </view>
        <view class="mat-list-title">
            商品列表
        </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>
                    </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>
                    </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>
                <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>
        </scroll-view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" @click="reset('warn')">重置</button>
            <button size="mini" type="primary" @click="combConfirm('warn')">组托</button>
        </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>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">批号:</view>
                        <view class="popup-item-right"><input type="text" v-model="batch"></view>
                    </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;">
                            <uni-number-box :value="count" :step='0.01' :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>
            </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>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                barcode: '',
                orderNo: '',
                threeCode: '',
                bomCode: '',
                dataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
                batch: '',
                weight: '',
                msgType1: 'success',
                msgType: 'success',
                messageText: '',
                title: '',
                content: '',
                orderNoFocus: true,
                threeCodeFocus: false,
                bomCodeFocus: false,
                barcodeFocus: false,
                matFocus: false,
                matData: '',
                removeNum: 0,
                ck1: false,
                ck2: true,
                fullPlt: 'N',
            }
        },
        onLoad() {
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
        },
        methods: {
            // 是否满板
            isFullPlt() {
                var temp = this.ck1
                this.ck1 = this.ck2
                this.ck2 = temp
                if (this.ck1) {
                    this.fullPlt = '1'
                } else {
                    this.fullPlt = '0'
                }
            },
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
            },
            clearOrderNo() {
                this.orderNo = ''
                let that = this;
                that.orderNoFocus = false;
                setTimeout(() => {
                    that.orderNo = '';
                    that.orderNoFocus = true;
                }, 100);
            },
            orderNoInput() {
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.orderNo.length
                    this.barcodeFocuss()
                }, 200)
            },
            // barcode input 事件
            barcodeInput() {
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.barcode.length
                    if (len != 8) {
                        uni.showToast({
                            title: '托盘码有误请重试',
                            icon: "none",
                            position: 'top'
                        });
                        this.barcodeFocuss()
                        return;
                    }
                    this.focuss()
                }, 200)
            },
            // 托盘码有误重置
            barcodeFocuss() {
                let that = this;
                that.barcodeFocus = false;
                setTimeout(() => {
                    that.barcode = '';
                    that.barcodeFocus = true;
                }, 100);
            },
            // 商品光标清空重置
            focuss() {
                this.focus = false;
                setTimeout(() => {
                    this.matnr = '';
                    this.matFocus = true;
                }, 100);
            },
            // 搜索物料
            findMat() {
                let that = this
                uni.request({
                    url: that.baseUrl + '/mat/auth',
                    data: {
                        matnr: that.matnr
                    },
                    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
                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 = ''
            },
            checkMat(mat) {
                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
                            }
                        }
                        // 相同物料 不同批号  新加列表
                        if (mat.batch != this.dataList[i].batch) {
                            this.$forceUpdate() // 强制刷新
                            if (sameItem) {
                                add = false
                            } else {
                                add = true
                            }
                        } else {
                            // 相同物料相同批号 数量累加
                            this.dataList[i].anfme += mat.anfme
                            this.$forceUpdate() // 强制刷新
                            add = false
                        }
                    }
                }
                if (add) {
                    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()
            },
            eject(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)
            },
            // 确认移除
            removeConfirm() {
                this.messageText = "移除成功"
                this.messageToggle('success')
                this.dataList.splice(this.removeNum, 1)
            },
            // 取消移除
            removeClose() {
                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()
            },
            reviseClose() {
                this.$refs.revise.close()
            },
            changeValue(value) {
                this.count = value
            },
            combConfirm(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否现在组托!'
                this.$refs.combConfirm.open()
            },
            combClose() {
                this.$refs.combConfirm.close()
            },
            comb() {
                uni.vibrateShort();
                let that = this;
                if (that.orderNo === '') {
                    this.messageText = "请输入订单条码"
                    this.messageToggle('error')
                    return;
                }
                if (that.barcode === '') {
                    this.messageText = "请扫描托盘条码"
                    this.messageToggle('error')
                    return;
                }
                if (that.dataList.length === 0) {
                    this.messageText = "请添加商品列表"
                    this.messageToggle('error')
                    return;
                }
                for (var i = 0; i < that.dataList.length; i++) {
                    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/auth3',
                    data: JSON.stringify({
                        orderNo: that.orderNo,
                        threeCode: that.threeCode,
                        bomCode: that.bomCode,
                        barcode: that.barcode,
                        isFull: that.fullPlt,
                        combMats: that.dataList
                    }),
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        if (res.code === 200) {
                            that.resst();
                            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')
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else {
                            that.messageText = res.msg
                            that.messageToggle('error')
                        }
                    }
                });
            },
            reset(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否重置!'
                this.$refs.resetConfirm.open()
            },
            // 确认重置
            resetConfirm() {
                this.dataList = []
                this.messageText = "重置完成"
                this.messageToggle('success')
            },
            // 取消重置
            resetClose() {
            },
            // 清空
            resst() {
                this.orderNo = ''
                this.dataList = []
                this.barcode = ''
                let that = this;
                that.orderNoFocus = false;
                setTimeout(() => {
                    that.orderNo = '';
                    that.orderNoFocus = true;
                }, 100);
            },
        }
    }
</script>
<style>
    @import url('../../static/css/wms.css/wms.css');
    .code {
        width: 100%;
        /* position: fixed; */
        min-height: 210rpx;
        background-color: #FFF;
        z-index: 10;
    }
    .list:first-child {
        margin-top: 20rpx;
    }
    .item {
        display: flex;
        align-items: center;
        height: 70rpx;
        margin-left: 20rpx;
        border-bottom: 1px solid #DCDFE6;
    }
    .item input {
        height: 50rpx;
        line-height: 50rpx;
        /* font-family: PingFang SC; uniapp 默认字体不居中 */
        font-size: 36upx;
        font-family: PingFang SC;
        width: 55vw;
    }
    .code-decs {
        width: 20vw;
        font-size: 15px;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: 700;
        color: #303133;
    }
    .item-right {
        margin-left: auto;
        margin-right: 20rpx;
    }
    .mat-list-title {
        height: 80rpx;
        line-height: 80rpx;
        width: 100%;
        background-color: white;
        /* position: fixed; */
        /* margin-top: 420rpx; */
        z-index: 9;
        /* border-top: 1px solid #DCDFE6; */
        text-align: center;
        box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.1);
    }
</style>
pages/order/unFullpltList.vue
New file
@@ -0,0 +1,444 @@
<template>
    <view>
        <view class="list list-font-color shop-car" :class="orderDetl.color" v-for="(orderDetl,index) in orderCarList" :key="index">
            <view class="list-left">
                <view class="detl-threeCode">{{orderDetl.threeCode}}</view>
                <view>库位号:{{orderDetl.locNo}}</view>
                <view>库位状态:{{orderDetl.locSts}}</view>
                <view>满板:{{orderDetl.fullPlt}}</view>
            </view>
            <view class="list-right" @click="chageDetl(orderDetl)">
                <uni-icons type="upload-filled" size="25"  color="#fff" v-if="orderDetl.locSts == 'F'"></uni-icons>
                <uni-icons type="upload-filled" size="25"  color="#fff" v-if="orderDetl.locSts == 'R' || orderDetl.locSts == 'S' || orderDetl.locSts == 'Q'"></uni-icons>
                <uni-icons type="download" size="25"  color="#fff" v-if="orderDetl.locSts == 'P'"></uni-icons>
            </view>
        </view>
        <!-- 垫高 -->
        <view style="height: 120rpx;"></view>
        <!-- 底部操作按钮 -->
        <!-- <view class="buttom">
            <button size="mini" type="primary" @click="agvStart('warn')">确认组托</button>
        </view> -->
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="chageDetl" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">入库数量</view>
                    <view class="popup-item">
                        <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="remove()">移除物料</view>
                        <view class="btn-right" @click="changeCount()">修改数量</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="stapop" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">站点选择</view>
                    <view class="popup-item">
                        <uni-combox style="height: 20px;" :candidates="staNos" placeholder="请选择补料出库站点" v-model="staNo"></uni-combox>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="mergeOutCancel()">取消</view>
                        <view class="btn-right" @click="mergeOut()">并板出库</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="merge" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">站点选择</view>
                    <view class="popup-item">
                        <view class="popup-item-left">数量:</view>
                        <view class="popup-item-right" style="border: none;">
                            <uni-number-box :value="anfme" :step='1' :max="maxAnfme" color="#747474" @change="changeValue2" />
                        </view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">满板:</view>
                        <view class="popup-item-right" style="border: none;">
                            <radio-group @change="isFullPlt">
                                <label>
                                    <radio :checked="ck1" style="transform: scale(0.7)"/><text>是</text>
                                </label>
                                <label>
                                    <radio :checked="ck2" style="margin-left: 50rpx;transform: scale(0.7);"/><text>否</text>
                                </label>
                            </radio-group>
                        </view>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="mergeCancel()">取消</view>
                        <view class="btn-right" @click="mergeConfirm()">确认并板</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="agvStart" 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" focus="true" v-model="barcode"></view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">满板:</view>
                        <view class="popup-item-right" style="border: none;">
                            <radio-group @change="isFullPlt">
                                <label>
                                    <radio :checked="ck1" style="transform: scale(0.7)"/><text>是</text>
                                </label>
                                <label>
                                    <radio :checked="ck2" style="margin-left: 50rpx;transform: scale(0.7);"/><text>否</text>
                                </label>
                            </radio-group>
                        </view>
                    </view>
                    <view class="btn">
                        <button class="btn-left" @click="agvStartClose()">取消</button>
                        <button class="btn-right" @click="agvStartConfirm()" :disabled="agvStartDis">组托</button>
                    </view>
                </view>
            </uni-popup>
        </view>
    </view>
</template>
<script>
    // todo: 购物车优化,存储购物车内容,退出页面再进后购物车还在
    export default {
        data() {
            return {
                orderCarList: [],
                count: 0,
                index: 0,
                barcode: '',
                agvDevp: '',
                agvStartDis: false,
                ck1: false,
                ck2: true,
                fullPlt: 'N',
                locNo: '',
                staNo: '',
                staNos: [100,200,300],
                detls: '',
                anfme: 0,
                maxAnfme: 0
            }
        },
        onShow() {
            let _this = this
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
            const eventChannel = this.getOpenerEventChannel();
            // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
            eventChannel.on('locMasts', function(data) {
                _this.orderCarList = data.locMasts
            })
            eventChannel.on('detls', function(data) {
                _this.detls = data.detls
                _this.maxAnfme = data.detls.anfme - data.detls.qty
            })
        },
        methods: {
            // 是否满板
            isFullPlt() {
                var temp = this.ck1
                this.ck1 = this.ck2
                this.ck2 = temp
                if (this.ck1) {
                    this.fullPlt = '1'
                } else {
                    this.fullPlt = '0'
                }
            },
            chageDetl(locMast) {
                // 库位状态为 F 可出库
                // 库位状态为 R,S,Q  不可操作
                // 库位状态为 P 并板组托操作
                let _this = this
                switch (locMast.locSts) {
                    case 'F':
                        this.locNo = locMast.locNo
                        this.$refs.stapop.open('center')
                        break;
                    case 'P':
                        this.locNo = locMast.locNo
                        this.barcode = locMast.barcode
                        this.$refs.merge.open('center')
                        break;
                }
            },
            // 并板出库
            mergeOut() {
                // 选择出库站,提交出库库位号
                let _this = this
                uni.request({
                    url: _this.baseUrl + '/mobile/merge/out/auth',
                    data: {locNo: _this.locNo,
                        staNo: _this.staNo,},
                    method: 'GET',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        console.log(res);
                        _this.agvStartDis = false
                        if (res.code === 200) {
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                        }
                    },
                    fail(res) {
                        _this.agvStartDis = false
                    }
                });
            },
            // 并板组托
            mergeConfirm() {
                let _this = this
                let combMats = []
                _this.detls['locNo'] = _this.locNo
                _this.detls.anfme = _this.anfme
                combMats.push(_this.detls)
                uni.request({
                    url: _this.baseUrl + '/mobile/merge/comb2/auth',
                    data: JSON.stringify({
                        barcode: _this.barcode,
                        isFull: _this.fullPlt,
                        combMats: combMats
                    }),
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        _this.agvStartDis = false
                        if (res.code === 200) {
                            _this.$refs.merge.close()
                            uni.showToast({ title: res.msg, icon: "success", position: 'top' })
                            setTimeout(()=> {
                                _this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: 1});
                                uni.navigateBack({
                                    delta:2
                                })
                            },1000)
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                        }
                    },
                    fail(res) {
                        _this.agvStartDis = false
                    }
                });
            },
            // 修改数量
            changeCount() {
                if (this.count > this.orderCarList[this.index].anfme) {
                    uni.showToast({ title: '数量不合法!', icon: "none", position: 'top' })
                    return
                }
                this.orderCarList[this.index].pakinQty = this.count
                this.$forceUpdate() // 强制刷新
                this.$refs.chageDetl.close()
            },
            // 移除物料
            remove() {
                this.orderCarList.splice(this.index, 1)
                this.$refs.chageDetl.close()
            },
            changeValue(value) {
                this.count = value
            },
            changeValue2(value) {
                this.anfme = value
            },
            agvStart() {
                this.$refs.agvStart.open()
            },
            agvStartClose() {
                this.barcode = ''
                this.agvDevp = ''
                this.$refs.agvStart.close()
            },
            agvStartConfirm() {
                this.barcode = this.barcode.replace(/\s+/g, '')
                let _this = this
                if (_this.barcode === '') {
                    uni.showToast({ title: '托盘码为空!', icon: "error", position: 'top' })
                    return;
                }
                if (_this.orderCarList.length === 0) {
                    uni.showToast({ title: '组托列表为空!', icon: "error", position: 'top' })
                    return;
                }
                for (let k of _this.orderCarList) {
                    if (k.pakinQty == 0) {
                        uni.showToast({ title: `${k.matnr}数量不能为 0 !`, icon: "error", position: 'top' })
                        return;
                    }
                }
                let combMat = { orderNo:'', barcode: '', locNo: '', combMats: [] }
                let combMats = []
                // for (let item of _this.orderCarList) {
                //     combMat.orderNo = item.orderNo
                //     combMat.barcode = _this.barcode
                //     combMat.locNo = _this.agvDevp
                //     combMat.combMats = []
                //     let combM = {csocode: item.threeCode,isoseq: item.deadTime,matnr: item.matnr,batch: item.batch,anfme: item.pakinQty,maktx: item.maktx,specs: item.specs,processSts: item.processSts}
                //     combMat.combMats.push(combM)
                //     combMats.push({...combMat})
                // }
                for    (let detl of _this.orderCarList) {
                    detl.anfme = detl.pakinQty
                    combMats.push(detl)
                }
                this.comb(combMats)
            },
            comb(combMats) {
                let _this = this;
                this.agvStartDis = true
                uni.request({
                    url: _this.baseUrl + '/mobile/comb/auth3',
                    data: JSON.stringify({
                        barcode: _this.barcode,
                        isFull: _this.fullPlt,
                        combMats: combMats
                    }),
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        _this.agvStartDis = false
                        if (res.code === 200) {
                            _this.orderCarList = []
                            _this.$refs.agvStart.close()
                            uni.showToast({ title: '启动成功!', icon: "success", position: 'top' })
                            setTimeout(()=> {
                                _this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: 1});
                                uni.navigateBack({})
                            },1000)
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                        }
                    },
                    fail(res) {
                        _this.agvStartDis = false
                    }
                });
            },
        }
    }
</script>
<style>
    @import url('../../static/css/order.css');
    .shop-car {
        background-color: #2299ff;
        color: #fff;
    }
    .detl-threeCode {
        font-size: 28px;
        font-weight: bold;
    }
    .popup {
        width: 80vw;
        min-height: 100rpx;
        background-color: #FFF;
        border-radius: 25rpx;
        position: relative;
    }
    .title {
        height: 100rpx;
        line-height: 100rpx;
        width: 100%;
        color: #606266;
        text-align: center;
        font-size: 16px;
    }
    .popup-item {
        height: 80rpx;
        line-height: 80rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .popup-item-left {
        width: 20vw;
        padding-right: 20rpx;
        text-align: right;
        color: #606266;
    }
    .popup-item-right {
        display: flex;
        align-items: center;
        width: 50vw;
        height: 50rpx;
        padding: 2px 5px;
        border: 1px solid #E4E7ED;
        border-radius: 5rpx;
    }
    .popup-item-right input{
        color: #606266;
    }
    .btn {
        display: flex;
        height: 90rpx;
        margin-top: 20rpx;
        border-top: 1px solid #DCDFE6;
        justify-content: center;
        align-items: center;
    }
    .btn-left {
        display: flex;
        flex: 1;
        height: 100%;
        justify-content: center;
        align-items: center;
        color: #e2231a;
        border-right: 1px solid #DCDFE6;
    }
    .btn-right {
        display: flex;
        flex: 1;
        height: 100%;
        justify-content: center;
        align-items: center;
        color: #409EFF;
    }
</style>
static/css/order.css
New file
@@ -0,0 +1,125 @@
    .container {
        position: relative;
    }
    .code {
        background-color: #d9d9d9;
        z-index: 99;
        position: sticky;
        top: 0rpx;
        left: 0;
    }
    .code-title {
        display: flex;
        justify-content: space-around;
        /* height: 50rpx; */
    }
    .list {
        margin: 20rpx;
        font-size: 14px;
        background-color: #fff;
        border-radius: 20rpx;
        border: 1px solid #eeeeee;
        display: flex;
        position: relative;
    }
    .card-id {
        position: absolute;
        right: 10rpx;
        top: 20rpx;
        padding: 5rpx 10rpx;
        line-height: 1.2;
        text-align: center;
        color: #eeeeee;
        background-color: #30ddb2;
        border-radius: 50%;
        font-size: 10px;
    }
    .list-left {
        flex: 1;
        padding: 20rpx;
        position: relative;
    }
    .list-right {
        width: 70rpx;
        border-left: 1px solid #eeeeee;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .buttom {
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100rpx;
        background-color: #FFF;
        box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2) ;
    }
    .card-status-1 {
        position: absolute;
        right: 20rpx;
        top: 30rpx;
        padding: 4rpx 20rpx;
        text-align: center;
        font-size: 10px;
        color: #f5222d;
        background-color: #fff1f0;
        border: 1px solid #ffa39e;
        border-radius: 6rpx;
    }
    .card-status-2 {
        position: absolute;
        right: 20rpx;
        top: 30rpx;
        padding: 4rpx 20rpx;
        text-align: center;
        font-size: 10px;
        color: #52c41a;
        background-color: #f6ffed;
        border: 1px solid #b7eb8f;
        border-radius: 6rpx;
    }
    .card-status-4 {
        position: absolute;
        right: 20rpx;
        top: 30rpx;
        padding: 4rpx 20rpx;
        text-align: center;
        font-size: 10px;
        color: #1890ff;
        background-color: #e6f7ff;
        border: 1px solid #91d5ff;
        border-radius: 6rpx;
    }
    .dropdown {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0rpx 20rpx;
        border-bottom: 1px solid #d9d9d9;
    }
    .dropdown-content {
        position: absolute;
        top: calc(100% + 15rpx);
        left: 0;
        width: calc(100% - 20rpx);
        max-height: 300rpx;
        background-color: #fff;
        box-shadow: 0 0px 6px rgba(0, 0, 0, 0.3);
        border-radius: 8rpx;
        z-index: 10;
    }
    .dropdown-item {
        margin: 12rpx;
        padding: 12rpx;
        line-height: 1;
        font-size: 32rpx;
        color: #3a3a3a;
    }
    .mt-flex {
        display: flex;
        align-items: center;
    }
static/css/wms.css/wms.css
@@ -5,7 +5,7 @@
    margin: 20rpx 20rpx;
    border-radius: 20rpx;
    box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
    padding: 10rpx;
    padding: 20rpx;
}
.list:first-child {
    margin-top: 320rpx;