ZN
6 天以前 481e405e566642a93394b1e28af023448286d599
refactor: 移除多个页面的编辑、删除及新增功能按钮

- 统一移除采购退货单、供应商管理、售后处理、售后登记等页面的新增、编辑、删除按钮
- 将财务模块的字典同步调用移入 onShow 生命周期,避免重复执行
- 简化页面交互,仅保留查看等核心操作
已修改6个文件
97 ■■■■ 文件已修改
src/pages/basicData/supplierManage/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/customerService/afterSalesHandling/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/customerService/feedbackRegistration/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/financialManagement/expenseManagement/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/financialManagement/revenueManagement/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/purchaseReturnOrder/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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>
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;
    }
  });
};
src/pages/financialManagement/expenseManagement/index.vue
@@ -85,8 +85,9 @@
  uni.navigateBack();
};
syncDict();
onShow(() => {
syncDict();
  getList();
});
</script>
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>
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>