zjj
2025-04-18 ef63279c0a2282c7c54cf8e90fc015fcd36a6ec3
pages/rece/standard.vue
@@ -1,10 +1,10 @@
<template>
   <view class="has-foot">
      <form>
         <view class="cu-form-group margin-top" v-show="!isconfirm">
         <view class="cu-form-group" v-show="!isconfirm">
            <view class="title">物料标签</view>
            <input placeholder="请扫描物料标签" v-model="barcode" focus></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
            <input placeholder="请扫描物料标签" v-model="barcode" @input="search()" focus></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
            <text class='cuIcon-search text-blue' @click="search"></text>
         </view>
@@ -198,9 +198,24 @@
               data,
               msg
            } = await request('/orders/' + this.barcode, {}, "get")
            if (code === 200) {
            if (code === 200) {
               if (Object.keys(data).length === 0){
                  uni.showToast({
                     title: "该标签未查询到数据",
                     icon: "none",
                     position: 'top'
                  })
               }
               this.list.push(...data)
            } else {
            }else if(code == 401){
               setTimeout(() => {
                  uni.removeStorageSync('token');
                  uni.reLaunch({
                     url: "/pages/login/login"
                  });
               }, 1000);
            }else {
               uni.showToast({
                  title: msg,
                  icon: "none",
@@ -211,7 +226,7 @@
         },
         clearCode() {
            this.asncode = ''
            this.barcode = ''
         },
         remove(index) {
            this.list.splice(index, 1);