#
zjj
2024-07-31 75291ece8be07085269e56210e2d3fe10adb4735
#
5个文件已修改
118 ■■■■ 已修改文件
manifest.json 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/locDetl/locDetl.vue 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/putDown.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -122,5 +122,10 @@
    "uniStatistics" : {
        "enable" : false
    },
    "vueVersion" : "2"
    "vueVersion" : "2",
    "h5" : {
        "router" : {
            "base" : "./"
        }
    }
}
pages/home/home.vue
@@ -31,13 +31,13 @@
                        cuIcon: 'pullup',
                        url: '/pakin/comb'
                    },
                    {
                        title: '入库',
                        name: 'Pakin',
                        color: 'red',
                        cuIcon: 'pullup',
                        url: '/pakin/pakin'
                    },
                    // {
                    //     title: '入库',
                    //     name: 'Pakin',
                    //     color: 'red',
                    //     cuIcon: 'pullup',
                    //     url: '/pakin/pakin'
                    // },
                    {
                        title: '出库',
                        name: 'PutDown',
pages/locDetl/locDetl.vue
@@ -15,12 +15,13 @@
            </view>
        </scroll-view>
        <view>
            <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item)">
            <view class="tag-list" v-for="(item,i) in matList" :key="i">
                <view class="tag">
                    <view style="display: flex;">
                    <view style="display: flex; justify-content: space-between;">
                        <view class="wms-tag" :style="baColor" >商品</view>
                        <checkbox class="wms-tag" :value="item.matnr" :checked="item.checked" @click="set(i)"/>
                    </view>
                </view>
                </view>
                <view class="tag-item">库位号: {{item.locNo}}</view>
                <view class="tag-item">商品编码: {{item.matnr  ? item.matnr : '--'}}</view>
                <view class="tag-item">批号: {{item.batch  ? item.batch : '--'}}</view>
@@ -33,6 +34,8 @@
            </view>
        </view>
        <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
        <view class="buttom"><button size="mini" type="primary" @click="findBySelect()">提取</button></view>
    </view>
</template>
@@ -63,7 +66,7 @@
        onReachBottom() {
            this.status = 'more';
            if (this.tagList == null) {
                this.showMat(this.tagIdNow);
                this.selectloc2();
            }
        },
        onLoad() {
@@ -83,10 +86,14 @@
            // this.showTag(10009)
        },
        methods: {
            set(e) {
                var ck = this.matList[e].checked
                this.matList[e].checked = ck ? false:true
            },
            selectloc(){
                let that = this
                that.matList = []
                that.curr = 1
                uni.request({
                    url: that.baseUrl + '/locDetl/pda/select',
                    data: {
@@ -110,6 +117,54 @@
                            }
                            if (res.data.records.length == 0) {
                                that.status = 'noMore'
                            }
                            for (var i = 0; i < that.matList.length; i++) {
                                that.$set(that.matList[i],'checked',false)
                            }
                            that.baColor = "background-color: #1cbbb4;"
                        } else if (res.code === 403 ) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                        }
                    }
                });
            },
            selectloc2(){
                let that = this
                // that.matList = []
                uni.request({
                    url: that.baseUrl + '/locDetl/pda/select',
                    data: {
                        curr:that.curr,
                        limit: 20,
                        matnr: that.condition
                    },
                    method:"GET",
                    header: {
                        'token':uni.getStorageSync('token'),
                    },
                    success(result) {
                        console.log(result);
                        that.tagList = null
                        var res = result.data
                        if (res.code === 200) {
                            if (res.data.records != null && res.data.records.length > 0) {
                                let list = res.data.records
                                that.matList = that.reload ? list : that.matList.concat(list);
                                that.curr = that.curr + 1
                            }
                            if (res.data.records.length == 0) {
                                that.status = 'noMore'
                            }
                            for (var i = 0; i < that.matList.length; i++) {
                                that.$set(that.matList[i],'checked',false)
                            }
                            that.baColor = "background-color: #1cbbb4;"
                        } else if (res.code === 403 ) {
@@ -242,8 +297,15 @@
                    }
                });
            },
            findBySelect(matnr) {
                this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr});
            findBySelect() {
                var checkedList = []
                for(var i = 0; i < this.matList.length; i++) {
                    var t = !this.matList[i].checked
                    if (this.matList[i].checked) {
                        checkedList.push(this.matList[i])
                    }
                }
                this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: checkedList});
                uni.navigateBack({
                    
                })
@@ -285,4 +347,12 @@
        color: #606266;
        font-size: 14px;
    }
    .aside {
        width: 100rpx;
        /* background-color: #303133; */
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
pages/login/login.vue
@@ -9,7 +9,7 @@
        <!-- logo -->
        <view class="logo">
            <view class="logo-box">
                <image src="../../static/img/logo.png" mode="aspectFit"></image>
                <!-- <image src="../../static/img/logo.png" mode="aspectFit"></image> -->
            </view>
        </view>
        <view class="content">
@@ -361,6 +361,7 @@
        justify-content: center;
    }
    .logo-box {
        height: 50vw;
        margin: auto 0;
    }
    image {
pages/pakin/putDown.vue
@@ -277,8 +277,12 @@
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            that.matData = data.data
                            that.checkMat(that.matData)
                            console.log(data.data)
                            for(var i = 0; i < data.data.length; i++) {
                                that.checkMat(data.data[i])
                            }
                        },
                    },
@@ -290,7 +294,7 @@
                var len = this.dataList.length
                var add = true ,sameItem = false
                for (var i = 0; i < len; i++) {
                    if (mat.locNo == this.dataList[i].locNo) {
                    if (mat.locNo == this.dataList[i].locNo && mat.matnr == this.dataList[i].matnr) {
                        add = false
                    }
                }