#
whycq
2024-04-28 5a29707780e00b600afd053b62d38af5d267102b
pages/phyz/orderOut/orderCheck.vue
@@ -35,7 +35,7 @@
               <!-- 标题 -->
               <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="data.anfme" :step='1' :min="0" :max="count" color="#747474" @change="changeValue" />
               </view>
               <view class="btn">
                  <view class="btn-left" @click="addClose">取消</view>
@@ -63,7 +63,7 @@
            count: 0
         }
      },
      onLoad() {
      onShow() {
         let _this = this
         this.baseUrl = uni.getStorageSync('baseUrl');
         this.token = uni.getStorageSync('token');
@@ -71,7 +71,6 @@
         const eventChannel = this.getOpenerEventChannel();
         // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
         eventChannel.on('mat', function(data) {
            console.log(data);
            let ids = [data.mat.id]
            _this.getPakoutList(ids,data.mat.locNo)
         })
@@ -99,11 +98,17 @@
                        if (locNo == k.locNo) {
                           k['isOpen'] = false
                           _this.count = k.anfme
                           k.anfme = 0
                           _this.data = k
                           return
                        }
                     }
                  }
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
         },
@@ -122,6 +127,11 @@
         },
         combConfirm() {
            let _this = this
            if (_this.data.anfme == 0) {
               uni.showToast({ title: '出库数量不能为0!', icon: "error", position: 'top'})
               return
            }
            uni.showLoading({})
            let combList = []
            combList.push(_this.data)
            uni.request({
@@ -131,14 +141,19 @@
               method: 'POST',
               success(res) {
                  res = res.data
                  console.log(res);
                  if (res.code === 200) {
                     uni.hideLoading({})
                     uni.showToast({ title: '出库成功', icon: "success", position: 'top'})
                     setTimeout(()=> {
                        uni.navigateBack({
                           delta: 2
                        });
                     },700)
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })