##
whycq
2022-05-09 dcb4247056504024bdb9f685776e27e45d174b67
pages/basics/outPakin.vue
@@ -57,6 +57,12 @@
            <button class="cu-btn lg pakin-btn bg-blue" @click="comb()">组托</button>
         </view>
      </view>
      <view>
         <!-- 提示信息弹窗 -->
         <uni-popup ref="message" type="message">
            <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
         </uni-popup>
      </view>
   </view>
</template>
@@ -74,7 +80,9 @@
            matnr:'',
            matList:[],
            result: '',
            listLen:0
            listLen:0,
            msgType: 'success',
            messageText: '这是一条成功提示',
         }
      },
      mounted(){
@@ -84,7 +92,12 @@
         this.basePORT = UPORT
      },
      methods: {
         getListLength() {
         messageToggle(type) {
            this.msgType = type
            this.messageText = `这是一条${type}消息提示`
            this.$refs.message.open()
         },
         getListLength() { // 下角标倒序
            this.listLen = this.matList.length
         },
         focuss() {
@@ -106,15 +119,17 @@
         },
         removeMatnr() {
            this.matnr = ''
            uni.vibrateShort();
            this.focus = false;
            this.$nextTick(function() {
               this.focus = true;
            });
            uni.vibrateShort();
         },
         remove(item,index) {
            this.matList.splice(index,1)
            this.listLen = this.matList.length
            this.messageToggle('success')
            this.messageText = '删除成功'
            uni.vibrateShort();
         },
         comb() {
@@ -205,22 +220,26 @@
                        mat['anfme'] = 1
                        for(let i = 0;i < that.matList.length;i++) {
                           if(that.matList[i].batch == str[2]) {
                              that.messageToggle('warn');
                              that.messageText = '重复扫描';
                              add = false;
                              break;
                           }
                        }
                     }
                     if(add) {
                        that.messageToggle('success');
                        that.messageText = '检索成功';
                        that.focus = false;
                        that.$nextTick(function() {
                           that.focus = true;
                        });
                        that.listLen = that.matList.length;
                        uni.hideKeyboard();
                        that.matList.unshift(res.data)
                     }
                     that.focus = false;
                     that.$nextTick(function() {
                        that.focus = true;
                     });
                     uni.hideKeyboard();
                  that.listLen = that.matList.length
                  } else if (res.code == 403) {
                     that.messageToggle('warn')
                     that.messageToggle('error')
                     that.messageText = res.msg
                     setTimeout(() => {
                        uni.reLaunch({
@@ -228,7 +247,7 @@
                        });
                     }, 1000);
                  } else {
                     that.messageToggle('warn')
                     that.messageToggle('error')
                     that.messageText = res.msg
                     // uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }