#
whycq
2024-07-25 77f30ad3d40b85cdbaf636c89b780964b4dd39a7
pages/order/orderPickConfirm.vue
@@ -217,12 +217,8 @@
            let that = this
            uni.request({
               url: that.baseUrl + '/mobile/loc/f/list',
               header: {
                  'token': uni.getStorageSync('token')
               },
               data: {
                  locNo: that.locNo
               },
               header: { 'token': uni.getStorageSync('token') },
               data: { locNo: that.locNo },
               method: 'GET',
               success(res) {
                  res = res.data;
@@ -233,6 +229,11 @@
                        list.push(item.locNo)
                     })
                     that.locNoList = list;
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                     setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                  }
               }
            })
@@ -254,6 +255,11 @@
                        list.push(item.stnNo)
                     })
                     that.staList = list;
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                     setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                  }
               }
            })
@@ -277,6 +283,11 @@
                     for (var i = 0; i < that.dataList.length; i++) {
                        that.$set(that.dataList[i], 'checked', false)
                     }
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                     setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'center' })
                  }
               }
            })
@@ -289,7 +300,6 @@
                  checkedList.push(this.dataList[i])
               }
            }
            this.checkedDataList = checkedList;
            this.switchCheckedList()
         },
@@ -297,8 +307,6 @@
            this.dataList = this.checkedDataList;
            this.showChecked = true;
         },
         checkboxChange: function(e) {},
         messageToggle(type) {
            this.msgType1 = type
@@ -314,24 +322,20 @@
            uni.vibrateShort();
            let that = this;
            if (that.checkedDataList.length === 0) {
               this.messageText = "请添加商品列表"
               this.messageToggle('error')
               uni.showToast({ title: "请选择并板商品", icon: "error", position: 'center' })
               return;
            }
            if (that.locNo == '') {
               this.messageText = "库位号不能为空"
               this.messageToggle('error')
               uni.showToast({ title: "库位号不能为空", icon: "error", position: 'center' })
               return;
            }
            if (that.sta == '') {
               this.messageText = "站点不能为空"
               this.messageToggle('error')
               uni.showToast({ title: "站点不能为空", icon: "error", position: 'center' })
               return;
            }
            for (var i = 0; i < that.checkedDataList.length; i++) {
               if (that.checkedDataList[i].useCount == 0 || that.checkedDataList[i].useCount == '') {
                  this.messageText = that.checkedDataList[i].matnr + '并板数量不能为0'
                  this.messageToggle('error')
                  uni.showToast({ title: "并板数量不能为0", icon: "error", position: 'center' })
                  return;
               }
            }
@@ -341,7 +345,6 @@
                  staNo: that.sta,
                  list: that.checkedDataList
            }
            console.log(param);
            uni.request({
               url: that.baseUrl + '/mobile/pick/in',
               data: JSON.stringify(param),
@@ -353,19 +356,12 @@
                  var res = result.data
                  if (res.code === 200) {
                     that.resst();
                     that.messageText = "并板成功"
                     that.messageToggle('success')
                     uni.showToast({ title: "并板成功", icon: "success", position: 'center' })
                  } else if (res.code == 403) {
                     that.messageText = res.msg
                     that.messageToggle('error')
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../login/login'
                        });
                     }, 1000);
                     uni.showToast({ title: res.msg, icon: "success", position: 'center' })
                     setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                  } else {
                     that.messageText = res.msg
                     that.messageToggle('error')
                     uni.showToast({ title: res.msg, icon: "success", position: 'center' })
                  }
               }
            });
@@ -434,6 +430,8 @@
         resst() {
            this.dataList = []
            this.checkedDataList = []
            this.locNo = ''
            this.sta = ''
         },
         combClose() {
            this.$refs.combConfirm.close()