|
|
@@ -56,7 +56,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="info-row">
|
|
|
- <button class="btn btn-second" @click="upload">
|
|
|
+ <button class="btn btn-second" @click="upload(item.statusRecordCount === item.totalRecord)">
|
|
|
上传数据
|
|
|
</button>
|
|
|
</view>
|
|
|
@@ -74,7 +74,7 @@
|
|
|
import { downloadDataFromAPI, uploadDataToAPI } from '@/utils/dataProcessor';
|
|
|
|
|
|
// 产品号输入框数据
|
|
|
- const productNo = ref('YH07202507000005');
|
|
|
+ const productNo = ref('');
|
|
|
|
|
|
const backPressOptions = reactive({
|
|
|
from: 'backbutton'
|
|
|
@@ -187,6 +187,12 @@
|
|
|
}
|
|
|
|
|
|
const upload = async (e : any) => {
|
|
|
+ if(e == false) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '当前任务还未完成!',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
+ }
|
|
|
console.log("开始上传...")
|
|
|
uploadDataToAPI(productNo.value, () => {
|
|
|
// 回调函数中执行刷新,确保数据都保存好,进度条跑完
|