skyouc
2025-01-15 b2455e18b7880638faeda23cb559e7741b734339
#
拍灯容器流动流程修改
发货确认功能开发
部分功能优化
1个文件已添加
2个文件已修改
519 ■■■■ 已修改文件
pages/order/orderOutConfirm.vue 288 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/pickOrderList.vue 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/putOn.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderOutConfirm.vue
@@ -1,17 +1,41 @@
<template>
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs">订单号:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="barcodeFocus"
                    @input="barcodeInput()">
            </view>
            <uni-section title="商品列表" type="line" class="mat-list-title"></uni-section>
            <uni-row :gutter="10" v-if="range.length > 0">
                <checkbox-group @change="checkboAll">
                    <uni-col :span="3" style="padding: 10px;">
                        <checkbox value="全选" checked></checkbox>
                    </uni-col>
                    <uni-col :span="20">
                    </uni-col>
                </checkbox-group>
            </uni-row>
        </view>
        <view class="list-view">
            <scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
                <view>
                    <uni-row :gutter="10">
                        <uni-col :span="3" style="margin: auto;align-items: center;justify-content: center;">
                            <uni-data-checkbox mode="list" icon="left" v-model="value" :localdata="range" @change="change" :multiple="true" />
                        </uni-col>
                        <uni-col :span="20">
                            <view>1112244</view>
                        </uni-col>
                    </uni-row>
                </view>
                <checkbox-group @change="checkboxChange">
                    <label class="order__list" v-for="(item, index) in range" :key="index">
                        <view class="order__list__right">
                            <checkbox :value="item.id" :checked="item.checked" style="transform:scale(0.7)" />
                        </view>
                        <view class="order__list__left">
                            <view>No:{{index + 1}}</view>
                            <view>订单号:{{item.orderNo}}</view>
                            <view>波次号:{{item.waveNo}}</view>
                            <view>料号:{{item.matnr}}</view>
                            <view>批号:{{item.batch}}</view>
                            <view>订单数量:{{item.anfme}}</view>
                            <view>实发数量:{{item.workQty}}</view>
                        </view>
                    </label>
                </checkbox-group>
            </scroll-view>
        </view>
        <!-- 底部操作按钮 -->
@@ -38,29 +62,132 @@
    export default {
        data() {
            return {
                barcodeFocus: '',
                orderNo: '',
                msgType1: 'success',
                msgType: 'success',
                messageText: '',
                title: '',
                content: '',
                dataList: [],
                dataList: [{}],
                barcode: '',
                matFocus: '',
                value: 0,
                range: [{"value": 0,"texts": "篮球"    },{"value": 1,"texts": "足球"},{"value": 2,"texts": "游泳"}]
                value: '0',
                range: []
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
        },
        methods: {
            change(data) {
                console.log(data)
            }
            barcodeInput() {
                let that = this
                setTimeout(() => {
                    that.getOrderDetl()
                }, 600)
            },
            /**
             * 获取发货订单明细信息
             */
            getOrderDetl() {
                if (this.orderNo.trim() == undefined || this.orderNo.trim() == null || this.orderNo == '') {
                    this.messageToggle('error', '订单编码不能为空!!')
                    return
                }
                let that = this
                this.$toast.loading('加载中...')
                uni.request({
                    url: that.baseUrl + '/pda/shipping/order/detl',
                    data: JSON.stringify({
                        orderNo: this.orderNo.trim(),
                    }),
                    method: 'POST',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    success(result) {
                        var res = result.data
                        if (res.code === 200) {
                            that.messageToggle('success', '数据拉取成功!!')
                            that.range = res.data.map(item => {
                                return {...item, checked: true}
                            })
                        } else {
                            that.messageText = res.msg
                            that.messageToggle('error')
                        }
                    },
                    complete() {
                        that.resst()
                        that.$toast.hideLoading()
                    }
                });
            },
            /**
             * 输入框重置
             */
            resst() {
                this.orderNo = ''
            },
            /**
             * checkbox选中事件
             * @param {Object} e
             */
            checkboxChange: function (e) {
                var items = this.range,    values = e.detail.value;
                for (var i = 0, lenI = items.length; i < lenI; ++i) {
                    const item = items[i]
                    if(values.indexOf(item.id) >= 0){
                        this.$set(item,'checked',true)
                    }else {
                        this.$set(item,'checked',false)
                    }
                }
            },
            /**
             * checkbox全选事件
             * @param {Object} e
             */
            checkboAll(e) {
                let detl = e.detail.value
                if (detl.length < 1) {
                    this.range.map(item => {
                       return item.checked = false
                    })
                } else {
                    this.range.map(item => {
                       return item.checked = true
                    })
                }
            },
            //dialog弹框信息
            dialogToggle(type,title, msg) {
                this.msgType = type
                this.title = title
                this.content = msg
                this.$refs.combConfirm.open()
            },
            //消息弹框
            messageToggle(type, msg) {
                this.msgType1 = type
                if (msg != undefined || msg != null) {
                    this.messageText = msg
                }
                this.$refs.message.open()
            },
        }
    }
</script>
<style>
    @import url('../../static/css/wms.css/wms.css');
    
    .uni-section {
        margin-top: 0rpx;
@@ -69,79 +196,84 @@
            font-size: 16px !important;
        }
    }
    .buttom uni-button {
        width: 60%;
    }
    .list-view {
        width: 100%;
        position: relative;
        .uni-data-checklist .checklist-group .checklist-box.is--list {
            padding-left: 30rpx;
        }
    }
    .list {
        display: flex;
        min-height: 80rpx;
        background-color: #FFF;
        margin: 20rpx;
        border-radius: 20rpx;
        box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
    }
    .list:first-child {
        margin-top: 300rpx;
    }
    .list:last-child {
        margin-bottom: 120rpx;
    }
    .code {
        width: 100%;
        position: fixed;
        top: 76rpx;
        position: sticky;
        background: white;
        min-height: 200rpx;
        background-color: #FFF;
        z-index: 10;
    }
    .item {
        display: flex;
        align-items: center;
        height: 100rpx;
        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: 18px;
        color: #303133;
    }
        z-index: 10;
        .item {
            display: flex;
            align-items: center;
            height: 100rpx;
            margin-left: 20rpx;
            border-bottom: 1px solid #DCDFE6;
            .code-decs {
                width: 20vw;
                font-size: 18px;
                color: #303133;
            }
        }
        .item input {
            height: 50rpx;
            line-height: 50rpx;
            /* font-family: PingFang SC; uniapp 默认字体不居中 */
            font-size: 36upx;
            font-family: PingFang SC;
            width: 55vw;
        }
        .mat-list-title {
            height: 80rpx;
            line-height: 80rpx;
            font-size: 24px;
            width: 100%;
            background: white;
            font-weight: 500;
        }
    }
    .list-view {
        padding-bottom: 92rpx;
    }
    
    .item-right {
        margin-left: auto;
        margin-right: 20rpx;
    }
    .mat-list-title {
        height: 80rpx;
        position: fixed;
        line-height: 80rpx;
        font-size: 24px;
        width: 100%;
        background: white;
        font-weight: 500;
    .order__list {
        margin: 20rpx;
        font-size: 14px;
        background-color: #fff;
        border-radius: 20rpx;
        border: 1px solid #eeeeee;
        display: flex;
        position: relative;
        background-color: #3eb689;
        color: #FFF;
    }
    .order__list__left {
        flex: 1;
        padding: 20rpx;
        position: relative;
    }
    .order__list__right {
        width: 70rpx;
        border-right: 1rpx solid #eeeeee;
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
pages/order/pickOrderList.vue
New file
@@ -0,0 +1,225 @@
<template>
    <view>
        <view class="status_bar">
            <!-- 这里是状态栏 -->
        </view>
        <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="订单物料" @clickLeft="back"  :fixed="true"
            :border="false" rightWidth="160rpx" leftWidth="160rpx"
            >
            <block slot="right">
                <view class="city">
                    <view>
                        <text class="uni-nav-bar-text">{{store}}</text>
                    </view>
                </view>
            </block>
         </uni-nav-bar>
        <view class="code">
            <view style="display: flex;align-items: center;">
                <view style="width: 70rpx;padding-left: 20rpx;" @click="changeST">{{searchType}}</view>
                <view style="flex: 1;margin-left: -8rpx;">
                    <uni-search-bar  v-model="searchValue"
                        maxlength="500" ancel="cancel" @confirm="getMatList()" @clear="clear" placeholder="输入 / 扫描">
                    </uni-search-bar>
                </view>
            </view>
            <view class="code-title">
                <view style="flex: 1;"></view>
                <view style="flex: 1;width: 100%;text-align: center;margin: 16rpx 0;">{{searchValue}} 总数量:- {{total}} -</view>
                <view style="flex: 1;display: flex;align-items: center;"><button size="mini" type="primary" @click="allSelect()">{{seltitle}}</button></view>
            </view>
        </view>
        <view class="order__list" v-for="(orderDetl,index) in dataList" :key="index">
            <view class="order__list__left">
                <view>No:{{index + 1}}</view>
                <view>订单号:{{orderDetl.orderNo}}</view>
                <view>料号:{{orderDetl.matnr}}</view>
                <view>料名:{{orderDetl.maktx}}</view>
                <view>批号:{{orderDetl.batch}}</view>
                <view>可用数量:{{orderDetl.count}}</view>
            </view>
            <view class="order__list__right">
                <!-- <view class="order__list__right" @click="addItem(orderDetl)"> -->
                <label @click="checkboxChange(orderDetl)">
                    <checkbox :value="orderDetl.matnr" :checked="orderDetl.checked" style="transform:scale(0.7)" /><text></text>
                </label>
            </view>
        </view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" type="primary" @click="addItems()">提取</button>
        </view>
        <view style="height: 100rpx;width: 100%;text-align: center;line-height: 100rpx;">- 已经到底了 -</view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                storeId: 0,
                store: '',
                total: 0,
                searchType: '物料',
                searchValue: '',
                dataList: [],
                selectedList: [],
                seltitle: '全选'
            }
        },
        onShow() {
            let _this = this
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.storeId = uni.getStorageSync('store')
            if (this.storeId == 1) {
                this.store = '宁波仓'
            }
            if (this.storeId == 2) {
                this.store = '新昌仓'
            }
            const eventChannel = this.getOpenerEventChannel();
            eventChannel.on('matList', function(data) {
                _this.selectedList = data.matList
            })
            this.getMatList()
        },
        methods: {
            back() { uni.navigateBack({}) },
            checkboxChange(e) {
                let items = this.dataList,
                values = e.matnr;
                if (e.checked) {
                    this.$set(e,'checked',false)
                } else {
                    this.$set(e,'checked',true)
                }
                var count = 0
                for (let k of items) {
                    if (k.checked) {
                        count++
                    }
                }
                if (count == items.length && count > 0) {
                    this.seltitle = '取消全选'
                } else {
                    this.seltitle = '全选'
                }
            },
            allSelect() {
                if (this.seltitle == '全选') {
                    for (let k of this.dataList) {
                        k.checked = true
                    }
                    this.seltitle = '取消全选'
                } else {
                    for (let k of this.dataList) {
                        k.checked = false
                    }
                    this.seltitle = '全选'
                }
            },
            set(e) {
                var ck = this.dataList[e].checked
                this.dataList[e].checked = ck ? false : true
            },
            changeST() {
                if (this.searchType == '物料') this.searchType = '订单'
                else this.searchType = '物料'
            },
            getMatList() {
                let that = this
                let searchParam = {}
                if (this.searchType == '物料') searchParam = {matnr: that.searchValue}
                else searchParam = {orderNo: that.searchValue}
                console.log(searchParam);
                uni.request({
                    url: that.baseUrl + '/mobile/pick/mat/list',
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    data: searchParam,
                    method: 'GET',
                    success(res) {
                        res = res.data;
                        if (res.code === 200) {
                            that.total = res.data.length
                            const result1 = res.data.filter(obj1 =>
                                !that.selectedList.some(obj2 => obj1.matnr === obj2.matnr && obj1.orderNo === obj2.orderNo)
                            );
                            that.dataList = result1
                            that.total = result1.length
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                            setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                        }
                    }
                })
            },
            addItems() {
                let pickList = []
                for (let k of this.dataList) {
                    if (k.checked) {
                        pickList.push(k)
                    }
                }
                this.getOpenerEventChannel().emit('pickList', {data: pickList});
                uni.navigateBack({
                })
            },
            // addItem(mat) {
            //     this.getOpenerEventChannel().emit('sMat', {data: mat});
            //     uni.navigateBack({
            //     })
            // }
        }
    }
</script>
<style>
    @import url('../../static/css/wms.css/wms.css');
    .code {
        background-color: #d9d9d9;
        z-index: 99;
        position: sticky;
        top: 0rpx;
        left: 0;
    }
    .code-title {
        display: flex;
    }
    .order__list {
        margin: 20rpx;
        font-size: 14px;
        background-color: #fff;
        border-radius: 20rpx;
        border: 1px solid #eeeeee;
        display: flex;
        position: relative;
        background-color: #3eb689;
        color: #FFF;
    }
    .order__list__left {
        flex: 1;
        padding: 20rpx;
        position: relative;
    }
    .order__list__right {
        width: 70rpx;
        border-left: 1px solid #eeeeee;
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
pages/pakin/putOn.vue
@@ -17,9 +17,7 @@
        </view>
        <view class="list-view">
            <scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
                        <uni-data-checkbox mode="list" icon="left" v-model="value" :localdata="range" @change="change"></uni-data-checkbox>
                <!-- <view class="list" v-for="(item,i) in dataList" :key="i">
                <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>
@@ -48,7 +46,7 @@
                            <view class="left-item">{{item.anfme}}</view>
                        </view>
                    </view>
                </view> -->
                </view>
            </scroll-view>
        </view>
        <!-- 底部操作按钮 -->