From c1a0fcdf595511bf762b7af2fc81c2726bc2ac4a Mon Sep 17 00:00:00 2001 From: wangyan <3594713855@qq.com> Date: Mon, 26 Aug 2024 16:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quickInterceptService.js | 15 ++-- src/views/douyin/after_sale/index.vue | 69 ++++++++++++++++++- .../douyin/quick_intercept_service/index.vue | 48 ++++++++++++- 3 files changed, 125 insertions(+), 7 deletions(-) diff --git a/src/api/quickInterceptService.js b/src/api/quickInterceptService.js index d41996e..3863d03 100644 --- a/src/api/quickInterceptService.js +++ b/src/api/quickInterceptService.js @@ -1,21 +1,28 @@ import request from '@/utils/request' -export function add(data) { +export function add (data) { return request({ url: 'api/quickInterceptService', method: 'post', data }) } +export function importQuickInterceptService (data) { + return request({ + url: 'api/quickInterceptService/importQuickInterceptService', + method: 'post', + data + }) +} -export function del(id) { +export function del (id) { return request({ url: 'api/quickInterceptService/' + id, method: 'delete' }) } -export function edit(data) { +export function edit (data) { return request({ url: 'api/quickInterceptService', method: 'put', @@ -23,7 +30,7 @@ export function edit(data) { }) } -export function downloadQuickInterceptService(params) { +export function downloadQuickInterceptService (params) { return request({ url: 'api/quickInterceptService/download', method: 'get', diff --git a/src/views/douyin/after_sale/index.vue b/src/views/douyin/after_sale/index.vue index c62d026..70670f4 100644 --- a/src/views/douyin/after_sale/index.vue +++ b/src/views/douyin/after_sale/index.vue @@ -32,6 +32,38 @@ 取 消 + + + +
将文件拖到此处,或点击上传
+
+ +
@@ -137,7 +169,7 @@ >退货退款查询 售后订单导入 + 退回物流单号导入
@@ -305,6 +346,18 @@ export default { // 上传的地址 url: "/api/douyinAfterSales/importAfterSaleData" }, + upload2: { + // 是否显示弹出层(用户导入) + open: false, + // 弹出层标题(用户导入) + title: "", + // 是否禁用上传 + isUploading: false, + // 设置上传的请求头部 + headers: { Authorization: "Bearer " + getToken() }, + // 上传的地址 + url: "/api/douyinAfterSales/importRefundData" + }, quanxian: false, afterSalesTypeArr: [], shopNameArr: [], @@ -402,10 +455,17 @@ export default { this.upload.title = "售后订单导入"; this.upload.open = true; }, + handleImport2() { + this.upload2.title = "退回物流单号导入"; + this.upload2.open = true; + }, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { this.upload.isUploading = true; }, + handleFileUploadProgress2(event, file, fileList) { + this.upload2.isUploading = true; + }, // 文件上传成功处理 handleFileSuccess(response, file, fileList) { this.upload.open = false; @@ -414,6 +474,13 @@ export default { this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); this.init(); }, + handleFileSuccess2(response, file, fileList) { + this.upload2.open = false; + this.upload2.isUploading = false; + this.$refs.upload2.clearFiles(); + this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); + this.init(); + }, // 提交上传文件 submitFileForm() { this.$refs.upload.submit(); diff --git a/src/views/douyin/quick_intercept_service/index.vue b/src/views/douyin/quick_intercept_service/index.vue index 76c3fa4..71dfaee 100644 --- a/src/views/douyin/quick_intercept_service/index.vue +++ b/src/views/douyin/quick_intercept_service/index.vue @@ -124,6 +124,15 @@ @click="toQuery" >搜索 + 处理 { + this.processLoading = true; + importQuickInterceptService(this.templateSelection) + .then(res => { + this.processLoading = false; + + this.$notify({ + title: "操作成功", + type: "success", + duration: 2500 + }); + this.templateSelection = ""; + this.init(); + }) + .catch(err => { + this.processLoading = false; + }); + }) + .catch(() => {}); + }, + submitFileForm() { + this.$refs.upload.submit(); + }, handleImport() { this.upload.title = "导入"; this.upload.open = true;