From 092f67b26c5ab06a479341f5af80ea8e1642d43e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 16:08:24 +0800
Subject: [PATCH] 劳保、售后管理-添加导出功能
---
src/views/customerService/afterSalesHandling/index.vue | 86 ++++++++++++++++++++++++++++++++++--------
1 files changed, 69 insertions(+), 17 deletions(-)
diff --git a/src/views/customerService/afterSalesHandling/index.vue b/src/views/customerService/afterSalesHandling/index.vue
index 50f250e..65a7551 100644
--- a/src/views/customerService/afterSalesHandling/index.vue
+++ b/src/views/customerService/afterSalesHandling/index.vue
@@ -2,22 +2,35 @@
<div class="app-container">
<div class="search_form">
<div>
- <span class="search_title">璁惧鍚嶇О锛�</span>
- <el-input
- v-model="searchForm.name"
- style="width: 240px"
- placeholder="璇疯緭鍏�"
- @change="handleQuery"
+ <span class="search_title">鍙嶉鏃ユ湡锛�</span>
+ <el-date-picker
+ v-model="searchForm.feedbackDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
clearable
- :prefix-icon="Search"
+ @change="handleQuery"
/>
+ <span class="search_title ml10">澶勭悊鏃ユ湡锛�</span>
+ <el-date-picker
+ v-model="searchForm.disDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable
+ @change="handleQuery"
+ />
+ <span style = "margin-left: 10px;" class="search_title">澶勭悊鐘舵�侊細</span>
+ <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="handleQuery" style="width: 140px" clearable>
+ <el-option label="寰呭鐞�" :value="1"></el-option>
+ <el-option label="宸插鐞�" :value="2"></el-option>
+ </el-select>
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
- </div>
- <div>
- <el-button type="primary" @click="openForm('add')">鏂板</el-button>
- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+ <el-button @click="handleOut" style="margin-left: 10px">瀵煎嚭</el-button>
</div>
</div>
<div class="table_list">
@@ -38,8 +51,8 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
-import FormDia from "@/views/customerService/feedbackRegistration/components/formDia.vue";
+import {onMounted, ref, getCurrentInstance, nextTick} from "vue";
+import FormDia from "@/views/customerService/afterSalesHandling/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import {afterSalesServiceDelete, afterSalesServiceListPage} from "@/api/customerService/index.js";
import useUserStore from "@/store/modules/user.js";
@@ -48,7 +61,8 @@
const data = reactive({
searchForm: {
- name: "",
+ feedbackDate: "",
+ disDate: "",
},
});
const { searchForm } = toRefs(data);
@@ -102,20 +116,42 @@
width: 200,
},
{
+ label: "澶勭悊浜�",
+ prop: "disposeNickName",
+ },
+ {
+ label: "澶勭悊缁撴灉",
+ prop: "disRes",
+ width: 200,
+ },
+ {
+ label: "澶勭悊鏃ユ湡",
+ prop: "disDate",
+ width: 150,
+ },
+ {
dataType: "action",
label: "鎿嶄綔",
align: "center",
fixed: 'right',
+ width: 120,
operation: [
{
- name: "缂栬緫",
+ name: "澶勭悊",
type: "text",
clickFun: (row) => {
- openForm("edit", row);
+ openForm("approve", row);
},
disabled: (row) => {
- return row.checkUserId !== userStore.id || row.status !== 1
+ return row.status !== 1
}
+ },
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ openForm("view", row);
+ },
},
],
},
@@ -190,6 +226,22 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/afterSalesService/exportTwo", {}, "鍞悗澶勭悊.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getList();
});
--
Gitblit v1.9.3