duy 10 月之前
父节点
当前提交
049623585b
共有 1 个文件被更改,包括 8 次插入9 次删除
  1. 8 9
      pages/putStorage/putStorage.vue

+ 8 - 9
pages/putStorage/putStorage.vue

@@ -54,7 +54,7 @@
                 停止扫描</button>
                 停止扫描</button>
             <button class="btn" type="default" @click="toReport" :loading="reportLoad">
             <button class="btn" type="default" @click="toReport" :loading="reportLoad">
                 <uni-icons type="upload"></uni-icons>
                 <uni-icons type="upload"></uni-icons>
-                一键生成报告</button>
+                一键检测</button>
         </view>
         </view>
 
 
     </view>
     </view>
@@ -194,21 +194,21 @@
             codeIds.value = epcs.join(',')
             codeIds.value = epcs.join(',')
         }
         }
 
 
-        getResult(type)
+        getResult(type,codeIds.value)
 
 
     }
     }
     const storageIds = ref('')
     const storageIds = ref('')
     //获取扫描结果
     //获取扫描结果
-    const getResult = async (type) => {
+    const getResult = async (type,ids) => {
         console.log('发请求', type);
         console.log('发请求', type);
-        console.log(codeIds.value, 'codeIds.value');
+        console.log(ids, 'ids');
         const {
         const {
             response,
             response,
             error,
             error,
             code,
             code,
             data
             data
         } = await mainApi.getSelectRfidListById({
         } = await mainApi.getSelectRfidListById({
-            rids: codeIds.value,
+            rids:ids,
             state: type
             state: type
         });
         });
         //处理数据
         //处理数据
@@ -285,7 +285,7 @@
                 duration: 2000,
                 duration: 2000,
                 mask: true
                 mask: true
             });
             });
-            getResult().then();
+            getResult(storageIds.value,1).then();
         } else {
         } else {
             uni.showToast({
             uni.showToast({
                 title: '操作失败',
                 title: '操作失败',
@@ -312,7 +312,6 @@
             return;
             return;
         }
         }
         reportLoad.value = true;
         reportLoad.value = true;
-        console.log(listArr.value[0].id, 'listArr.value[0].id');
         if (storageIds.value.length < 1) {
         if (storageIds.value.length < 1) {
             return;
             return;
         }
         }
@@ -322,7 +321,7 @@
             msg,
             msg,
             response
             response
         } = await mainApi.update({
         } = await mainApi.update({
-            id: listArr.value[0].id,
+            id: storageIds.value,
             sampleStatus: 4,
             sampleStatus: 4,
             expCount: 0
             expCount: 0
         });
         });
@@ -334,7 +333,7 @@
                 duration: 2000,
                 duration: 2000,
                 mask: true
                 mask: true
             });
             });
-            getResult().then();
+            getResult(2,storageIds.value).then();
         } else {
         } else {
             uni.showToast({
             uni.showToast({
                 title: '操作失败',
                 title: '操作失败',