Bläddra i källkod

feat:去掉二维码带id校验扫码仪器是否为上机仪器

liuzhenlin 2 veckor sedan
förälder
incheckning
2f12b1db8e
1 ändrade filer med 25 tillägg och 22 borttagningar
  1. 25 22
      src/view/instr/appointList/soonGeton/index.vue

+ 25 - 22
src/view/instr/appointList/soonGeton/index.vue

@@ -21,7 +21,7 @@
           </div>
           <div class="flex">
             <van-button style="width: 80px; height: 30px; margin: 0; font-size: 14px" class="scan-txt" type="primary"
-              size="small" :disabled="loading" v-if="['10', '20', '30', '50','60','70'].includes(v.controlMode)"
+              size="small" :disabled="loading" v-if="['10', '20', '30', '50', '60', '70'].includes(v.controlMode)"
               @click="handleGetOn(v)">
               {{ v.controlMode == '10' ? '上机' : '扫码上机' }}
             </van-button>
@@ -219,27 +219,30 @@ export default {
      * appointRow 当前预约信息
      */
     async handleCodeInfo(content, appointRow) {
-      if (content.includes('id')) {
-        if (JSON.parse(content).id == appointRow.instId) {
-          this.handleGetOnByAppointId(appointRow.id)
-        } else {
-          this.loading = false
-          showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
-        }
-      } else {
-        // 拿到解码信息(仪器编码)获取仪器id
-        const [instErr, instRes] = await to(instApi.getIdByTerminal({ terminal: content }))
-        if (instErr) {
-          this.loading = false
-          return
-        }
-        if (instRes.data.id == appointRow.instId) {
-          this.handleGetOnByAppointId(appointRow.id)
-        } else {
-          this.loading = false
-          showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
-        }
-      }
+      // if (content.includes('id')) {
+      //   if (JSON.parse(content).id == appointRow.instId) {
+      //     this.handleGetOnByAppointId(appointRow.id)
+      //   } else {
+      //     this.loading = false
+      //     showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
+      //   }
+      // } else {
+      //   // 拿到解码信息(仪器编码)获取仪器id
+      //   const [instErr, instRes] = await to(instApi.getIdByTerminal({ terminal: content }))
+      //   if (instErr) {
+      //     this.loading = false
+      //     return
+      //   }
+      //   if (instRes.data.id == appointRow.instId) {
+      //     this.handleGetOnByAppointId(appointRow.id)
+      //   } else {
+      //     this.loading = false
+      //     showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
+      //   }
+      // }
+      console.log(content)
+      // 不管有没有 id 都不要再校验“扫码机器不是预约机器”,直接上机
+      this.handleGetOnByAppointId(appointRow.id)
     },
 
     //蓝牙 重新解码函数,获取解码内容之后 执行跳转操作