소스 검색

fix:修改前端代码

lupeng 3 달 전
부모
커밋
08cd6b5785
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  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(