skyouc
2025-01-17 8b8e38d50c96bedbacc7f8a6ca73f5d7f0393777
#  页面报错修复
2个文件已修改
98 ■■■■ 已修改文件
pages/order/orderOutConfirm.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/stock/orderBindSeed.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderOutConfirm.vue
@@ -21,7 +21,7 @@
        <view class="list-view">
            <scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
                <checkbox-group @change="checkboxChange">
                    <label class="order__list" v-for="(item, index) in range" :key="index">
                    <label :class="item.workQty == item.anfme ? 'order__list' : 'order-list-cell'"  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>
@@ -46,7 +46,7 @@
        <view>
            <uni-popup ref="combConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
                    @confirm="comb" @close="combClose"></uni-popup-dialog>
                    @confirm="shippingConfirm" @close="combClose"></uni-popup-dialog>
            </uni-popup>
        </view>
        <view>
@@ -69,7 +69,7 @@
                messageText: '',
                title: '',
                content: '',
                dataList: [{}],
                shipping: [],
                barcode: '',
                matFocus: '',
                value: '0',
@@ -86,7 +86,7 @@
                let that = this
                setTimeout(() => {
                    that.getOrderDetl()
                }, 600)
                }, 700)
            },
            /**
             * 获取发货订单明细信息
@@ -121,7 +121,6 @@
                        }
                    },
                    complete() {
                        that.resst()
                        that.$toast.hideLoading()
                    }
                });
@@ -132,6 +131,7 @@
             */
            resst() {
                this.orderNo = ''
                this.shipping = []
            },
            /**
             * checkbox选中事件
@@ -162,6 +162,60 @@
                    this.range.map(item => {
                       return item.checked = true
                    })
                }
            },
            //确认发货
            shippinged() {
                if (this.orderNo == undefined || this.orderNo == null || this.orderNo.trim() == '') {
                    this.messageToggle('error', '订单编码不能为空!!')
                    return
                }
                let that = this
                this.$toast.loading('加载中...')
                uni.request({
                    url: that.baseUrl + '/pda/shipping/confirm',
                    data: JSON.stringify(that.shipping),
                    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()
                    }
                });
            },
            combConfirm() {
                this.dialogToggle('dialog', '确认', '是否确认发货?')
            },
            shippingConfirm(type) {
                if (this.range == null) {
                    this.messageToggle('error', '发货单数据为空!!');
                    return
                }
                /**过滤未选中订单明细*/
                this.shipping = this.range.filter(item => {
                    return item.checked == true
                })
                if (this.shipping != null && this.shipping.length > 0) {
                    this.shippinged()
                }
            },
            
@@ -263,6 +317,19 @@
        background-color: #3eb689;
        color: #FFF;
    }
    .order-list-cell {
        margin: 20rpx;
        font-size: 14px;
        border-radius: 20rpx;
        border: 1px solid #eeeeee;
        display: flex;
        position: relative;
        background-color: #FD4D11;
        color: #FFF;
    }
    .order__list__left {
        flex: 1;
        padding: 20rpx;
pages/stock/orderBindSeed.vue
@@ -43,6 +43,7 @@
                range: [],
                orderNo: '',
                barcode: '',
                siteNo: '',
                msgType1: '',
                messageText: '',
                msgType: '',
@@ -58,9 +59,12 @@
        },
        
        methods: {
            /**
             * 获取当前播种墙所有库位
             */
            getSeedLocs() {
                let that = this
                toast.loading('加载中')
                this.$toast.loading('加载中')
                uni.request({
                    url: this.baseUrl +  '/pda/pick/seed/locs',
                    header: {
@@ -80,7 +84,7 @@
                        }
                    },
                    complete() {
                        toast.hideLoading()
                        that.$toast.hideLoading()
                    }
                    
                })
@@ -110,7 +114,7 @@
                if (type == undefined || type == null || type == null) {
                    type = 'bind'
                }
                toast.loading('绑定中..')
                this.$toast.loading('绑定中..')
                uni.request({
                    url: that.baseUrl +  "/pda/pick/seed/bind",
                    data: {barcode: that.barcode, orderNo: that.orderNo, siteNo: that.siteNo, type: type},
@@ -121,22 +125,21 @@
                    success(res) {
                        let result = res.data;
                        if (result.code === 200) {
                            toast.hideLoading()
                            this.messageToggle('success', '绑定成功!')
                            that.messageToggle('success', '绑定成功!')
                        } else {
                            toast.hideLoading()
                            this.messageToggle('error', result.msg)
                            that.messageToggle('error', result.msg)
                        }
                    },
                    fail(res) {
                        toast.hideLoading()
                        this.messageToggle('error', '服务器错误')
                        that.messageToggle('error', '服务器错误')
                        
                    },
                    complete() {
                        that.barcode = ''
                        that.orderNo = ''
                        that.siteNo = ''
                        that.$toast.hideLoading()
                    }
                })
            },