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