From 7b07502d1be3d9abb4c1deb6d40df84c17a41a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Mon, 5 Aug 2024 23:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8E=9F=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/dataConfirm/index.vue | 58 ++++-- src/views/order/view-mail.vue | 248 ++++++++++++++++++++++++++ 2 files changed, 296 insertions(+), 10 deletions(-) create mode 100644 src/views/order/view-mail.vue diff --git a/src/views/order/dataConfirm/index.vue b/src/views/order/dataConfirm/index.vue index 39b4445..4b7b16a 100644 --- a/src/views/order/dataConfirm/index.vue +++ b/src/views/order/dataConfirm/index.vue @@ -13,7 +13,7 @@
-
+
{{item.from && item.from.email}}
{{item.subject}}
{{item.text}}
@@ -40,13 +40,13 @@
{{emailParams.sent_at}}
- 手动同步 - 查看原邮件 + 手动同步 + 查看原邮件 确认维保 @@ -272,8 +272,8 @@ export default { console.log('加载更多') }, - emailChange(item) { - this.emailId = item.id; + emailChange(item,isChange) { + this.emailId = isChange?item.id:this.emailId>0?this.emailId:item.id; this.getEmailData(); }, async getEmailData() { @@ -294,15 +294,53 @@ export default { this.loading = false; }, - async allDefend() { + async getDetailIds() { + let ids = new Array(); let params = { - ids:this.selection.map(em=> em.id) - }; - const res = await this.$API.orders.order.mail.confirm.post(params); + mail_data_id:this.emailId + } + const res = await this.$API.orders.order.mail.detailIds.post(params); + if(res.code == 200){ + ids = res.data; + } + return ids; + }, + async allDefend(type) { + let res = {}; + if(type == "all"){ + const ids = await this.getDetailIds(); + if(ids){ + let params = { + mail_data_id:this.emailId, + ids:ids + }; + res = await this.$API.orders.order.mail.confirm.post(params); + } + }else{ + let params = { + mail_data_id:this.emailId, + ids:this.selection.map(em=> em.id) + }; + res = await this.$API.orders.order.mail.confirm.post(params); + } if(res.code == 200){ await this.getData(); } }, + async manualClick() { + const res = await this.$API.orders.order.mail.manual.post(); + if(res.code == 200){ + await this.getData(); + } + }, + seeEmail(){ + this.$router.push({ + path: '/order/view-mail', + query: { + id: this.emailId, + } + }) + }, getSelectData(){ diff --git a/src/views/order/view-mail.vue b/src/views/order/view-mail.vue new file mode 100644 index 0000000..ebb4501 --- /dev/null +++ b/src/views/order/view-mail.vue @@ -0,0 +1,248 @@ + + + + +