#
whycq
2024-04-11 35a6571ff25e5da94784d228d6bb73df768013d7
#
2个文件已修改
1个文件已添加
162 ■■■■■ 已修改文件
pages.json 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/orderOut/orderList.vue 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/orderOut/orderOutSelect.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -596,6 +596,15 @@
            }
            
        }
        ,{
            "path" : "pages/phyz/orderOut/orderList",
            "style" :
            {
                "navigationBarTitleText": "待出列表",
                "enablePullDownRefresh": false
            }
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
pages/phyz/orderOut/orderList.vue
New file
@@ -0,0 +1,127 @@
<template>
    <view>
        <view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index">
            <view class="list-left" style="display: flex;flex-direction: column;">
                <!-- 上 -->
                <view>
                    <view class="detl-threeCode">{{orderDetl.threeCode}}</view>
                    <view class="detl-locNo">{{orderDetl.locNo}}</view>
                </view>
                <!-- 中 -->
                <view style="display: flex;">
                    <view style="flex: 1;">
                        <view>主单号:{{orderDetl.orderNo}}</view>
                        <view>编号:{{orderDetl.matnr}}</view>
                        <view>名称:{{orderDetl.maktx}}</view>
                        <view>库存数量:{{orderDetl.anfme}}</view>
                    </view>
                    <view class="out-btn">
                        <view>出库</view>
                    </view>
                </view>
                <!-- 下 -->
            </view>
            <!-- <view class="list-right" @click="goToLocDetl(orderDetl)">
                <uni-icons type="right" size="25"  color="#fff"></uni-icons>
            </view> -->
        </view>
        <!-- 垫高 -->
        <view style="height: 340rpx;text-align: center;color: #b9b9b9;">
            - 已经到底了 -
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                dataList: [],
                count: 0,
                index: 0,
                barcode: '',
                agvDevp: '',
            }
        },
        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) {
                console.log(data.item);
                _this.getLocDetl(data.item.orderNo,data.item.threeCode,data.item.matnr)
            })
        },
        methods: {
            getLocDetl(orderNo,threeCode,matnr) {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/query/locDetl/v1`,
                    header: { 'token': uni.getStorageSync('token') },
                    data: {
                        orderNo: orderNo,
                        threeCode: threeCode ,
                        matnr: matnr
                    },
                    method: 'POST',
                    success(res) {
                        res = res.data
                        console.log(res);
                        if (res.code === 200) {
                            for (let k of res.data) {
                                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'
                                }
                            }
                            _this.dataList = res.data
                        }
                    }
                })
            }
        }
    }
</script>
<style>
    @import url('../../../static/css/common/order.css');
    .list-font-color {
        color: #fff;
        /* background-color: #33bb44; */
    }
    .order-sts-start {
        background-color: #3eb689;
    }
    .order-sts-working {
        background-color: #ff9d46;
    }
    .order-sts-end {
        background-color: #ff7356;
    }
    .detl-threeCode {
        font-size: 28px;
        font-weight: bold;
    }
    .detl-locNo {
        font-size: 20px;
        font-weight: bold;
    }
    .out-btn {
        background-color: #3e82ff;
        height: 120rpx;
        width: 120rpx;
        line-height: 120rpx;
        text-align: center;
        border-radius: 50%;
        margin-left: 20rpx;
        margin-right: 20rpx;
    }
</style>
pages/phyz/orderOut/orderOutSelect.vue
@@ -20,7 +20,7 @@
                <view>订单数量:{{orderDetl.anfme}}</view>
                <view>已出数量:{{orderDetl.qty}}</view>
            </view>
            <view class="list-right" @click="addItem(index)">
            <view class="list-right" @click="goToLocDetl(orderDetl)">
                <uni-icons type="right" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
@@ -35,7 +35,7 @@
                主单号
            </view>
            <uni-search-bar v-model="searchValue2" style="width: 100%;"
                maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear" placeholder="输入 / 扫描 订单号">
                maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear2" placeholder="输入 / 扫描 订单号">
            </uni-search-bar>
        </view>
    </view>
@@ -77,7 +77,7 @@
                
                _this.data.limit = limit
                uni.request({
                    url: `${_this.baseUrl}/orderDetl/pakout/list/authV2`,
                    url: `${_this.baseUrl}/orderDetl/pakout/list/authV3`,
                    header: {'token': uni.getStorageSync('token')},
                    data: _this.data,
                    method: 'GET',
@@ -125,6 +125,26 @@
                }
                
            },
            clear2() {
                this.searchValue2 = ''
                this.getOrderDetlList(this.searchValue1,'',999999)
            },
            goToLocDetl(item) {
                let _this = this
                uni.navigateTo({
                    url: './orderList',
                    success(res) {
                        res.eventChannel.emit('item', {
                            item: item
                        })
                    },
                    events: {
                        acceptDataFromOpenedPage: function(data) {
                            console.log(data);
                        }
                    }
                })
            }
            
        }
    }