From 04d6024553ac73e67148ce578cb01b541eebd02a Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 18 五月 2026 16:37:56 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' into dev-new_pro_OA
---
src/views/customerService/expiryAfterSales/index.vue | 87 +++++++++++++++++++++++++------------------
1 files changed, 51 insertions(+), 36 deletions(-)
diff --git a/src/views/customerService/expiryAfterSales/index.vue b/src/views/customerService/expiryAfterSales/index.vue
index df44504..9966785 100644
--- a/src/views/customerService/expiryAfterSales/index.vue
+++ b/src/views/customerService/expiryAfterSales/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">涓存湡鏃ユ湡锛�</span>
<el-date-picker
@@ -34,11 +34,12 @@
>閲嶇疆</el-button
>
</div>
+ <div class="table_actions">
+ <el-button type="primary" @click="openForm('add')">鏂板</el-button>
+ <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
+ </div>
</div>
- <div class="table_actions" style="margin-bottom: 10px;">
- <el-button type="primary" @click="openForm('add')">鏂板</el-button>
- <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
- </div>
+
<div class="table_list">
<PIMTable
rowKey="id"
@@ -59,7 +60,7 @@
<template #operation="{ row }">
<el-button type="primary" link @click="openForm('view', row)">鏌ョ湅</el-button>
- <el-button type="primary" link @click="openForm('edit', row)" v-if="row.status === 1">缂栬緫</el-button>
+ <el-button type="primary" link @click="openForm('handle', row)" v-if="row.status === 1">澶勭悊</el-button>
</template>
</PIMTable>
</div>
@@ -72,7 +73,7 @@
import {onMounted, ref} from "vue";
import FormDia from "@/views/customerService/expiryAfterSales/components/formDia.vue";
import {ElMessageBox} from "element-plus";
-// import {expiryAfterSalesDelete, expiryAfterSalesListPage} from "@/api/customerService/index.js"; // 鏆傛椂娉ㄩ噴鎺夛紝浣跨敤鍋囨暟鎹�
+import {expiryAfterSalesDelete, expiryAfterSalesListPage} from "@/api/customerService/index.js";
import useUserStore from "@/store/modules/user.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore()
@@ -127,7 +128,8 @@
label: "澶勭悊鐘舵��",
prop: "status",
width: "",
- slot: true,
+ dataType: "slot",
+ slot: "status",
},
{
label: "澶勭悊浜�",
@@ -142,7 +144,8 @@
{
label: "鎿嶄綔",
prop: "operation",
- slot: true,
+ dataType: "slot",
+ slot: "operation",
width: "200",
},
],
@@ -190,21 +193,39 @@
// 鑾峰彇鍒楄〃鏁版嵁
const getList = () => {
tableLoading.value = true;
- // 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
- // expiryAfterSalesListPage({
- // ...searchForm.value,
- // current: page.value.current,
- // size: page.value.size
- // }).then(res => {
- // tableData.value = res.data.records;
- // page.value.total = res.data.total;
- // tableLoading.value = false;
- // });
-
- // 鏆傛椂杩斿洖绌烘暟鎹�
- tableData.value = [];
- page.value.total = 0;
- tableLoading.value = false;
+ // 鏋勯�犳煡璇㈠弬鏁帮紝鏄犲皠鍓嶇瀛楁鍒板悗绔瓧娈�
+ const queryParams = {
+ expireDate: searchForm.value.expiryDate,
+ disDate: searchForm.value.handleDate,
+ status: searchForm.value.status,
+ current: page.value.current,
+ size: page.value.size
+ };
+
+ expiryAfterSalesListPage(queryParams).then(res => {
+ // 鏄犲皠鍚庣杩斿洖鏁版嵁鍒板墠绔〃鏍�
+ tableData.value = res.data.records.map(item => ({
+ id: item.id,
+ productName: item.productName,
+ batchNumber: item.batchNumber,
+ expiryDate: item.expireDate,
+ stockQuantity: item.stockQuantity,
+ customerName: item.customerName,
+ contactPhone: item.contactPhone,
+ problemDesc: item.disRes,
+ status: item.status,
+ handlerId: item.disposeUserId,
+ handlerName: item.disposeNickName,
+ handleResult: item.disposeResult,
+ handleDate: item.disDate
+ }));
+ page.value.total = res.data.total;
+ tableLoading.value = false;
+ }).catch(error => {
+ console.error('鑾峰彇鍒楄〃鏁版嵁澶辫触:', error);
+ tableLoading.value = false;
+ proxy.$modal.msgError('鑾峰彇鏁版嵁澶辫触锛岃绋嶅悗閲嶈瘯');
+ });
};
// 鎵撳紑寮规
@@ -230,18 +251,12 @@
})
.then(() => {
tableLoading.value = true;
- // 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
- // expiryAfterSalesDelete(ids).then(() => {
- // proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- // getList();
- // }).finally(() => {
- // tableLoading.value = false;
- // });
-
- // 鏆傛椂妯℃嫙鍒犻櫎鎴愬姛
- tableLoading.value = false;
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
+ expiryAfterSalesDelete(ids).then(() => {
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ getList();
+ }).finally(() => {
+ tableLoading.value = false;
+ });
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3