#
whycq
2022-05-11 f0aa0f9247de70d1cee3f4957b1be8416640e320
pages/basics/checkout.vue
@@ -98,6 +98,11 @@
         this.getOutBound();
      },
      methods: {
         messageToggle(type) {
            this.msgType = type
            this.messageText = `这是一条${type}消息提示`
            this.$refs.message.open()
         },
         choseStaNo() {
            for (var i = 0;i < this.staNoList.length; i++) {
               if (this.desc == this.staNoList[i].desc) {
@@ -204,20 +209,35 @@
                  'token':uni.getStorageSync('token')
                },
               success(result) {
                  var res = result.data;
                  if(res.data) {
                     for(let i = 0;i<that.matList.length;i++) {
                        for (let j = 0;j < res.data.length; j++) {
                           if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
                              res.data.splice(j,1)
                  if(res.code === 200 ) {
                     if(res.data) {
                        for(let i = 0;i<that.matList.length;i++) {
                           for (let j = 0;j < res.data.length; j++) {
                              if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
                                 res.data.splice(j,1)
                              }
                           }
                        }
                        that.matList = res.data.concat(that.matList)
                        that.listLen = that.matList.length;
                        that.focus = false;
                        that.$nextTick(function() {
                           that.focus = true;
                        });
                        that.matnr = ''
                     }
                     that.matList = res.data.concat(that.matList)
                     that.listLen = that.matList.length;
                     // that.matList = that.matList.concat(res.data)
                  } else if (res.code == 403) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../login/login'
                        });
                     }, 1000);
                  } else {
                     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
               }
            });
         },