#
zjj
2024-07-31 75291ece8be07085269e56210e2d3fe10adb4735
pages/mat/matSelected.vue
@@ -64,11 +64,14 @@
         eventChannel.on('mat', function(data) {
            that.mat = data.data
            console.log(data.data);
            if (data.data.maxNum) {
            if (data.data.maxNum > 0) {
               that.mat.anfme = data.data.maxNum
            } else {
               that.max = data.data.maxNum
            } else if (data.data.maxNum == 0) {
               uni.showToast({title: '当前物料最大可入数量为 0', icon: "none", position: 'top'});
               that.mat.anfme = 0
            }
               that.max = data.data.maxNum
            }
            
         })
         
@@ -83,12 +86,15 @@
         },
         changeValue(value) {
            this.mat.anfme = value
            console.log(this.mat);
         },
         back() {
            if (this.mat.anfme === 0) {
               uni.showToast({title: '请输入数量', icon: "none", position: 'top'});
               return;
            }
            console.log(this.mat);
            this.getOpenerEventChannel().emit('matList', {data: this.mat});
            uni.navigateBack({