#
whycq
2024-04-22 355cbfcf6ebc354cb022afb917cdd7abbae3826d
#
2个文件已修改
69 ■■■■■ 已修改文件
pages/phyz/stationManage/pickAgain.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/stationDetl.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/pickAgain.vue
@@ -8,21 +8,23 @@
                <view>名称:{{orderDetl.maktx}}</view>
                <view>库存数量:{{orderDetl.anfme}}</view>
                <view>订单可出数量:{{orderDetl.stock}}</view>
                <view>入库数量:{{orderDetl.pakinQty}}</view>
                <view>拣料数量:{{orderDetl.count}}</view>
            </view>
            <view class="list-right" @click="addItem(index)">
                <uni-icons type="folder-add" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
        <!-- 垫高 -->
        <view style="height: 100rpx;text-align: center;color: #b9b9b9;"></view>
        
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="addItem" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">入库数量</view>
                    <view class="title">拣料数量</view>
                    <view class="popup-item">
                        <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
                        <uni-number-box :value="count" :step='1' :max="maxCount" color="#747474" @change="changeValue" />
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="addClose">取消</view>
@@ -31,15 +33,9 @@
                </view>
            </uni-popup>
        </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 class="buttom">
            <button size="mini" type="primary" @click="confirmPick('warn')">确认拣料</button>
        </view>
    </view>
</template>
@@ -51,7 +47,11 @@
                dataList: [],
                orderCarList: [],
                pickList: [],
                count: ''
                index: 0,
                count: 0,
                maxCount: 0,
                wrkNo: '',
                locNo: ''
            }
        },
        onShow() {
@@ -64,6 +64,8 @@
            eventChannel.on('item', function(data) {
                console.log(data);
                _this.pickList = data.wrkDetls
                _this.wrkNo = data.wrkDetls[0].wrkNo
                _this.locNo = data.item.sourceLocNo
                _this.getLocDetl(data.item.sourceLocNo)
            })
        },
@@ -95,6 +97,8 @@
                                            k.stock = k.stock >= k.anfme ? k.anfme : k.stock
                                            k['color'] = 'order-sts-start'
                                        }
                                        k['count'] = 0
                                        enbleList.push(k)
                                    }
                                }
@@ -119,36 +123,39 @@
            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) {
                            uni.showToast({ title: '请勿重复添加商品!', icon: "none", position: 'top' })
                            return
                    }
                }
                this.index = index
                this.maxCount = this.dataList[index].stock
                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.dataList[this.index].count = this.count
                this.count = 0
                this.$refs.addItem.close()
            },
            changeValue(value) {
                this.count = value
            },
            // 确认再次拣料
            confirmPick() {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/pick/again/auth`,
                    header: { 'token': uni.getStorageSync('token') },
                    data: JSON.stringify({
                        wrkNo: _this.wrkNo,
                        locNo: _this.locNo,
                        picks: _this.dataList
                    }),
                    method: 'POST',
                    success(res) {
                        res = res.data
                        console.log(res);
                    }
                })
            }
        }
    }
</script>
pages/phyz/stationManage/stationDetl.vue
@@ -563,7 +563,7 @@
                    success(res) {
                        res.eventChannel.emit('item', {
                            item: item,
                            wrkDetls: _this.wrkDetls
                            wrkDetls: _this.wrkDetls,
                        })
                    },
                    events: {