From 481e405e566642a93394b1e28af023448286d599 Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期四, 26 三月 2026 17:53:17 +0800
Subject: [PATCH] refactor: 移除多个页面的编辑、删除及新增功能按钮
---
src/pages/basicData/supplierManage/index.vue | 23 -----------
src/pages/financialManagement/revenueManagement/index.vue | 31 ---------------
src/pages/customerService/feedbackRegistration/index.vue | 18 ++------
src/pages/financialManagement/expenseManagement/index.vue | 3 +
src/pages/customerService/afterSalesHandling/index.vue | 2 -
src/pages/procurementManagement/purchaseReturnOrder/index.vue | 20 ---------
6 files changed, 10 insertions(+), 87 deletions(-)
diff --git a/src/pages/basicData/supplierManage/index.vue b/src/pages/basicData/supplierManage/index.vue
index a7c01a0..24aadc8 100644
--- a/src/pages/basicData/supplierManage/index.vue
+++ b/src/pages/basicData/supplierManage/index.vue
@@ -1,16 +1,6 @@
<template>
<view class="sales-account">
- <PageHeader title="渚涘簲鍟嗙鐞�" @back="goBack">
- <template #right>
- <up-button
- type="primary"
- size="small"
- text="鏂板"
- :customStyle="{ marginRight: '12px' }"
- @click="goAdd"
- />
- </template>
- </PageHeader>
+ <PageHeader title="渚涘簲鍟嗙鐞�" @back="goBack"/>
<view class="search-section">
<view class="search-bar">
<view class="search-input">
@@ -77,17 +67,6 @@
<text class="detail-label">缁存姢鏃堕棿</text>
<text class="detail-value">{{ item.maintainTime || "-" }}</text>
</view>
- </view>
- <view class="action-buttons">
- <u-button size="small" class="action-btn" @click="goEdit(item)">缂栬緫</u-button>
- <u-button
- type="error"
- size="small"
- class="action-btn"
- @click="handleDelete(item)"
- >
- 鍒犻櫎
- </u-button>
</view>
</view>
</view>
diff --git a/src/pages/customerService/afterSalesHandling/index.vue b/src/pages/customerService/afterSalesHandling/index.vue
index 1fa568a..7a3138d 100644
--- a/src/pages/customerService/afterSalesHandling/index.vue
+++ b/src/pages/customerService/afterSalesHandling/index.vue
@@ -61,9 +61,7 @@
</view>
<up-divider></up-divider>
<view class="detail-buttons">
- <up-button size="small" type="primary" v-if="item.status === 1" @click.stop="openHandleForm('approve', item)">澶勭悊</up-button>
<up-button size="small" type="primary" plain @click.stop="openHandleForm('view', item)">鏌ョ湅</up-button>
- <up-button size="small" type="info" plain @click.stop="openFiles(item)">闄勪欢</up-button>
</view>
</view>
</view>
diff --git a/src/pages/customerService/feedbackRegistration/index.vue b/src/pages/customerService/feedbackRegistration/index.vue
index e2a681e..9f73b42 100644
--- a/src/pages/customerService/feedbackRegistration/index.vue
+++ b/src/pages/customerService/feedbackRegistration/index.vue
@@ -30,7 +30,7 @@
<!-- 鍞悗鍗曞垪琛� -->
<view class="ledger-list" v-if="tableData.length > 0">
- <view v-for="(item, index) in tableData" :key="index" class="ledger-item" @click="handleRowClick(item)">
+ <view v-for="(item, index) in tableData" :key="index" class="ledger-item">
<view class="item-header">
<view class="item-left">
<view class="document-icon">
@@ -74,19 +74,10 @@
</view>
</view>
<up-divider v-if="canEdit(item)"></up-divider>
- <view class="detail-buttons" v-if="canEdit(item)">
- <up-button size="small" type="primary" plain @click.stop="openForm('edit', item)">缂栬緫</up-button>
- <up-button size="small" type="error" plain @click.stop="handleDelete(item)">鍒犻櫎</up-button>
- </view>
</view>
</view>
<view v-else class="no-data">
<text>鏆傛棤鍞悗鐧昏鏁版嵁</text>
- </view>
-
- <!-- 娴姩鎿嶄綔鎸夐挳 -->
- <view class="fab-button" @click="openForm('add')">
- <up-icon name="plus" size="24" color="#ffffff"></up-icon>
</view>
</view>
</template>
@@ -179,10 +170,11 @@
const getStats = () => {
getSalesLedgerDetail({}).then((res) => {
if (res.code === 200) {
+ console.log(res.data);
const statsData = Array.isArray(res.data) ? res.data : [];
- statsList.value[0].count = getStatsCountByStatus(statsData, 3);
- statsList.value[1].count = getStatsCountByStatus(statsData, 2);
- statsList.value[2].count = getStatsCountByStatus(statsData, 1);
+ statsList.value[0].count = getStatsCountByStatus(statsData, 3) || 0;
+ statsList.value[1].count = getStatsCountByStatus(statsData, 2) || 0;
+ statsList.value[2].count = getStatsCountByStatus(statsData, 1) || 0;
}
});
};
diff --git a/src/pages/financialManagement/expenseManagement/index.vue b/src/pages/financialManagement/expenseManagement/index.vue
index d73c91c..68a47cf 100644
--- a/src/pages/financialManagement/expenseManagement/index.vue
+++ b/src/pages/financialManagement/expenseManagement/index.vue
@@ -85,8 +85,9 @@
uni.navigateBack();
};
-syncDict();
onShow(() => {
+syncDict();
+
getList();
});
</script>
diff --git a/src/pages/financialManagement/revenueManagement/index.vue b/src/pages/financialManagement/revenueManagement/index.vue
index a23272a..f08f2e7 100644
--- a/src/pages/financialManagement/revenueManagement/index.vue
+++ b/src/pages/financialManagement/revenueManagement/index.vue
@@ -90,41 +90,12 @@
return n.toFixed(2);
};
-const goAdd = () => {
- uni.navigateTo({ url: "/pages/financialManagement/revenueManagement/edit?type=add" });
-};
-const goEdit = (row) => {
- uni.navigateTo({ url: `/pages/financialManagement/revenueManagement/edit?type=edit&id=${row.id}` });
-};
-const confirmDelete = (row) => {
- uni.showModal({
- title: "鎻愮ず",
- content: "纭鍒犻櫎璇ヨ褰曪紵",
- success: async (r) => {
- if (r.confirm) {
- const ids = Array.isArray(row) ? row.map(i=>i.id) : [row.id];
- const res = await delAccountIncome(ids);
- if (res?.code === 200) getList();
- }
- },
- });
-};
-
-const onIncomeTypeConfirm = (e) => {
- const item = incomeTypes.value[e.value[0]];
- if (item) form.incomeType = item.value;
-};
-const onMethodConfirm = (e) => {
- const item = paymentMethods.value[e.value[0]];
- if (item) form.incomeMethod = item.value;
-};
-
const goBack = () => {
uni.navigateBack();
};
-syncDict();
onShow(() => {
+ syncDict();
getList();
});
</script>
diff --git a/src/pages/procurementManagement/purchaseReturnOrder/index.vue b/src/pages/procurementManagement/purchaseReturnOrder/index.vue
index 2cd1a14..31bda94 100644
--- a/src/pages/procurementManagement/purchaseReturnOrder/index.vue
+++ b/src/pages/procurementManagement/purchaseReturnOrder/index.vue
@@ -1,16 +1,6 @@
<template>
<view class="sales-account">
- <PageHeader title="閲囪喘閫�璐у崟" @back="goBack">
- <template #right>
- <up-button
- type="primary"
- size="small"
- text="鏂板"
- :customStyle="{ marginRight: '12px' }"
- @click="goAdd"
- />
- </template>
- </PageHeader>
+ <PageHeader title="閲囪喘閫�璐у崟" @back="goBack"/>
<view class="search-section">
<view class="search-bar">
<view class="search-input">
@@ -63,14 +53,6 @@
</view>
<view class="action-buttons">
<u-button size="small" class="action-btn" @click="goView(item)">璇︽儏</u-button>
- <u-button
- type="error"
- size="small"
- class="action-btn"
- @click="handleDelete(item)"
- >
- 鍒犻櫎
- </u-button>
</view>
</view>
</view>
--
Gitblit v1.9.3