#
whycq
2024-12-04 bd259119cd14eff50b84a8471198ba35cba649ba
#
4个文件已修改
2个文件已添加
257 ■■■■■ 已修改文件
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/out/checkOut.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/out/orderGift.vue 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/out/orderGiftDetls.vue 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,8 +2,8 @@
    "name" : "中扬WMS",
    "appid" : "__UNI__DA5854D",
    "description" : "",
    "versionName" : "2024072201",
    "versionCode" : 103,
    "versionName" : "20241203A",
    "versionCode" : 111,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages.json
@@ -233,6 +233,24 @@
                "enablePullDownRefresh" : false
            }
        }
        ,{
            "path" : "pages/out/orderGift",
            "style" :
            {
                "navigationBarTitleText": "核对单据管理",
                "enablePullDownRefresh": false
            }
        }
        ,{
            "path" : "pages/out/orderGiftDetls",
            "style" :
            {
                "navigationBarTitleText": "单据明细",
                "enablePullDownRefresh": false
            }
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
pages/home/home.vue
@@ -59,6 +59,13 @@
                        cuIcon: 'pullup',
                        url: '/out/handIn'
                    },
                    {
                        title: '核对单据',
                        name: 'orderGift',
                        color: 'orange',
                        cuIcon: 'pullup',
                        url: '/out/orderGift'
                    },
                    // {
                    //     title: '组托入库',
                    //     name: 'pakin',
pages/out/checkOut.vue
@@ -2,7 +2,7 @@
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs">箱号:</view>
                <view class="code-decs">条码:</view>
                <textarea style="background-color: #f0f0f0;max-height: 100rpx;padding: 4px;margin: 4px;"
                    type="textarea" placeholder=" 扫码 / 输入" maxlength="1000" v-model="barcode" :focus="barcodeFocus" 
                    @input="analysis()" />
@@ -513,7 +513,7 @@
    .item {
        display: flex;
        align-items: center;
        height: 100rpx;
        height: 130rpx;
        margin-left: 20rpx;
        border-bottom: 1px solid #DCDFE6;
    }
@@ -545,7 +545,7 @@
        width: 100%;
        background-color: white;
        position: fixed;
        margin-top: 100rpx;
        margin-top: 130rpx;
        z-index: 9;
        /* border-top: 1px solid #DCDFE6; */
        text-align: center;
pages/out/orderGift.vue
New file
@@ -0,0 +1,127 @@
<template>
    <view>
        <view class="code">
            <uni-search-bar :focus="searchValueFocus" v-model="searchValue"
                maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear" placeholder="输入 / 扫描 订单号">
            </uni-search-bar>
            <view class="list" v-for="(item,index) in dataList">
                <view class="list-left">
                    <view >
                        <text style="">单据编号:</text>
                        <text style="font-size: 18px;font-weight: 600;color: #333;">{{item.orderNo}}</text>
                    </view>
                    <view>类型:{{item.docType$}}</view>
                    <view>创建时间:{{item.createTime$}}</view>
                </view>
                <view class="list-right" @click="toDetls(index)">
                    <uni-icons type="right" size="25"  color="#55aaff"></uni-icons>
                </view>
            </view>
        </view>
        <view style="height: 20px;"></view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                searchValue: '',
                searchValueFocus: false,
                dataList: [],
                data: {
                    curr: 1,
                    limit: 10,
                    order_no: '',
                }
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.getOrder()
        },
        // 下拉刷新
        onReachBottom() {
            this.status = 'more';
            this.getOrder(this.searchValue,10);
        },
        methods: {
            getOrder(threeCode,limit) {
                let _this = this
                _this.data.order_no = threeCode
                _this.data.limit = limit
                uni.request({
                    url: `${_this.baseUrl}/orderGift/head/page/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: _this.data,
                    method:'GET',
                    success(res) {
                        res = res.data
                        console.log(res);
                        if (res.code === 200) {
                            let list = res.data.records
                            _this.dataList =  _this.dataList.concat(list);
                            _this.data.curr = _this.data.curr + 1
                        }
                    }
                })
            },
            searchValueInput2() {
                this.dataList = []
                this.data.curr = 1
                if (this.searchValue.length == 0) {
                    this.getOrder(this.searchValue,10)
                } else {
                    this.getOrder(this.searchValue,10)
                }
            },
            clear() {
                this.dataList = []
                this.data.curr = 1
                setTimeout(()=> {
                    this.getOrder(this.searchValue,10)
                },300)
            },
            toDetls(index) {
                let _this = this
                uni.navigateTo({
                    url: './orderGiftDetls',
                    success(res) {
                        res.eventChannel.emit('item', {
                            item: _this.dataList[index]
                        })
                    },
                })
            }
        }
    }
</script>
<style>
    .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;
    }
</style>
pages/out/orderGiftDetls.vue
New file
@@ -0,0 +1,95 @@
<template>
    <view>
        <view class="list" v-for="(item,index) in detls">
            <view class="list-left">
                <view>规格:{{item.matnr}}</view>
                <view>箱号:{{item.batch}}</view>
                <view>卷号:{{item.model}}</view>
                <view>长度:{{item.price}}</view>
                <view>净重:{{item.weight}}</view>
                <view>毛重:{{item.volume}}</view>
                <view>接头:{{item.specs}}</view>
                <view>是否确认:<uni-tag :text="item.source$" :type="item.deadTimeType"></uni-tag></view>
            </view>
        </view>
        <view style="height: 20rpx;"></view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                detls: [],
                deadTimeType: 'primary'
            }
        },
        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.getDetls(data.item.id)
            })
        },
        methods: {
            getDetls(id) {
                let _this = this
                let data = {
                    curr: 1,
                    limit: 9999,
                    order_id: id
                }
                uni.request({
                    url: `${_this.baseUrl}/orderDetlGift/list/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: data,
                    method:'GET',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            for (let k of res.data.records) {
                                if (k.source === 1) {
                                    k['deadTimeType'] = "primary"
                                } else {
                                    k['deadTimeType'] = "error"
                                }
                            }
                            _this.detls = res.data.records
                        }
                    }
                })
            }
        }
    }
</script>
<style>
    .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;
    }
</style>