Prechádzať zdrojové kódy

fix:修改前端代码

lupeng 3 mesiacov pred
rodič
commit
08cd6b5785
1 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 5 4
      src/views/quality/outsource/index.vue

+ 5 - 4
src/views/quality/outsource/index.vue

@@ -198,7 +198,7 @@
       </el-form-item>
       <el-form-item style="margin-left: 45%">
         <el-button type="primary" @click="tdmUpload" :loading="isLoading"
-        >保存</el-button
+        >同步tBom</el-button
         >
       </el-form-item>
       </el-form>
@@ -221,7 +221,6 @@ import {
 const fileUrl = ref();
 const fileNameList = ref([]);
 const tBom=ref({});
-import {ElMessageBox} from "element-plus";
 const testFiles = () => {
   tBom.value.filePath = fileUrl.value;
   tBom.value.fileName = fileNameList.value[0];
@@ -253,8 +252,10 @@ const dialog = reactive({
   type: 0,
 });
 const tdmUpload =()=>{
-  if(tBom||tBom.value){
-    ELMessage.error("没有上传文件!");
+  console.log(tBom.value);
+  if(!tBom||!tBom.value||!tBom.value.filePath){
+    ElMessage.error("没有上传文件!");
+    return;
   }
   isLoading.value=true;
   sendTdmTBom(tBom.value).then(