|
@@ -122,7 +122,7 @@ const visible = ref(false);
|
|
|
const fullLoading = ref(false);
|
|
|
const addType = ref(1);
|
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
|
-const workOrderDialog = ref(null);
|
|
|
+const workOrderDialog = ref();
|
|
|
const checksuccess = ref(0);
|
|
|
const setchecksuccess = (val)=>{
|
|
|
checksuccess.value = val;
|
|
@@ -271,12 +271,17 @@ function handleBeforeUpload(file) {
|
|
|
const formData = new FormData();
|
|
|
formData.append("file", file);
|
|
|
if(checksuccess.value === 0){
|
|
|
- return checkInput(formData).then(res =>{
|
|
|
+
|
|
|
+ checkInput(formData).then(res =>{
|
|
|
fullLoading.value = false;
|
|
|
inputData.value = res.data;
|
|
|
- workOrderDialog.value.open()
|
|
|
- return false;
|
|
|
- })
|
|
|
+ if(res.data != null){
|
|
|
+ return Promise.resolve()
|
|
|
+ }
|
|
|
+ }).then(()=>{
|
|
|
+ workOrderDialog.value.open()
|
|
|
+ })
|
|
|
+ return false;
|
|
|
}
|
|
|
if (
|
|
|
file.type !==
|