LAPTOP-FO2T5SIU\35838 7 months ago
parent
commit
fc6f952184
1 changed files with 22 additions and 1 deletions
  1. 22 1
      src/views/customerManagement/component/uploadCost.vue

+ 22 - 1
src/views/customerManagement/component/uploadCost.vue

@@ -195,7 +195,28 @@ export default {
             this.file = null
         },
         exportError() {
-
+            const _this = this
+            _this.excelFlag = true
+            if (!this.tableData.length) {
+                this.$message.error('失败记录为空!')
+                return
+            }
+            axios({
+                headers: {
+                    'MVVM-Key': String(new Date().getTime()),
+                    xx: 'anything'
+                },
+                method: 'post',
+                url: constant.BASE_URI + '/CustomerManagementController/errorListExport',
+                responseType: 'blob',
+                data: this.tableData
+            }).then(res => {
+                this.downloadExcel(res.data, '失败记录.xlsx')
+                _this.excelFlag = false
+            }).catch((err) => {
+                console.log(err)
+                _this.excelFlag = false
+            })
         },
         s2ab(s) {
             var cuf