ソースを参照

财务批量导入数据后,把报错信息显示到弹窗底部

@dongkboy 1 ヶ月 前
コミット
b132512d2e
2 ファイル変更13 行追加12 行削除
  1. 7 6
      src/views/platform/ticket.vue
  2. 6 6
      src/views/receivable/handingFee/ticket.vue

+ 7 - 6
src/views/platform/ticket.vue

@@ -226,9 +226,11 @@
       </div>
       </div>
       <el-button type="primary" link @click="downloadImportFailedData(importModifyCallback)">下载导入失败文件</el-button>
       <el-button type="primary" link @click="downloadImportFailedData(importModifyCallback)">下载导入失败文件</el-button>
     </div>
     </div>
+      <div v-if="uploadMsg" class="text-red">上传错误信息:{{ uploadMsg }}</div>
+
     <template #footer>
     <template #footer>
-      <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="batchShow = false">取消</el-button>
-      <el-button type="primary" @click="batchShow = false">确定</el-button>
+      <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="batchShow = false,uploadMsg = null">取消</el-button>
+      <el-button type="primary" @click="batchShow = false,uploadMsg = null">确定</el-button>
     </template>
     </template>
   </el-dialog>
   </el-dialog>
   <el-image-viewer v-if="imageShow" :url-list="[bigImageUrl]" @close="imageShow = false" />
   <el-image-viewer v-if="imageShow" :url-list="[bigImageUrl]" @close="imageShow = false" />
@@ -386,6 +388,7 @@ const downloadTemplate = () => {
   })
   })
 }
 }
 let importModifyCallback = ref()// 导入数据回调
 let importModifyCallback = ref()// 导入数据回调
+let uploadMsg = ref(null);//上传失败信息
 const uploadJYFile = async (file) => {
 const uploadJYFile = async (file) => {
   let files = file.raw
   let files = file.raw
   const params = new FormData(); // 声明formData数据类型
   const params = new FormData(); // 声明formData数据类型
@@ -407,10 +410,8 @@ const uploadJYFile = async (file) => {
       type: 'success'
       type: 'success'
     })
     })
   }else{
   }else{
-    ElMessage({
-      message: msg,
-      type: 'error'
-    })
+    uploadMsg.value = msg
+    console.log(uploadMsg.value)
   }
   }
 }
 }
 const getSummaries = (param) => {
 const getSummaries = (param) => {

+ 6 - 6
src/views/receivable/handingFee/ticket.vue

@@ -258,9 +258,10 @@
         </div>
         </div>
         <el-button type="primary" link @click="downloadImportFailedData(importModifyCallback)">下载导入失败文件</el-button>
         <el-button type="primary" link @click="downloadImportFailedData(importModifyCallback)">下载导入失败文件</el-button>
       </div>
       </div>
+      <div v-if="uploadMsg" class="text-red">上传错误信息:{{ uploadMsg }}</div>
       <template #footer>
       <template #footer>
-        <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="batchShow = false">取消</el-button>
-        <el-button type="primary" @click="batchShow = false">确定</el-button>
+        <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="batchShow = false,uploadMsg = null">取消</el-button>
+        <el-button type="primary" @click="batchShow = false,uploadMsg = null">确定</el-button>
       </template>
       </template>
     </el-dialog>
     </el-dialog>
     <el-image-viewer v-if="imageShow" :url-list="[bigImageUrl]" @close="imageShow = false" />
     <el-image-viewer v-if="imageShow" :url-list="[bigImageUrl]" @close="imageShow = false" />
@@ -510,6 +511,8 @@ const uploadImage = async (file, fileList) => {
 
 
 
 
 let importModifyCallback = ref()// 导入数据回调
 let importModifyCallback = ref()// 导入数据回调
+let uploadMsg = ref(null);//上传失败信息
+
 const uploadJYFile = async (file) => {
 const uploadJYFile = async (file) => {
   let files = file.raw
   let files = file.raw
   const params = new FormData(); // 声明formData数据类型
   const params = new FormData(); // 声明formData数据类型
@@ -531,10 +534,7 @@ const uploadJYFile = async (file) => {
       type: 'success'
       type: 'success'
     })
     })
   }else{
   }else{
-    ElMessage({
-      message: msg,
-      type: 'error'
-    })
+    uploadMsg.value = msg
   }
   }
 }
 }
 // 下载导入失败文件
 // 下载导入失败文件