From 7a0790d8224db45a039bf33d0ef4e24ae879a243 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 30 六月 2026 10:38:05 +0800
Subject: [PATCH] 采购退货重构,添加新增、删除功能;供应商管理新增修改删除功能
---
src/pages/basicData/supplierManage/index.vue | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/pages/basicData/supplierManage/index.vue b/src/pages/basicData/supplierManage/index.vue
index 24aadc8..b20f519 100644
--- a/src/pages/basicData/supplierManage/index.vue
+++ b/src/pages/basicData/supplierManage/index.vue
@@ -48,16 +48,8 @@
<text class="detail-value">{{ item.taxpayerIdentificationNum || "-" }}</text>
</view>
<view class="detail-row">
- <text class="detail-label">鍏徃鐢佃瘽</text>
- <text class="detail-value">{{ item.companyPhone || "-" }}</text>
- </view>
- <view class="detail-row">
- <text class="detail-label">鑱旂郴浜�</text>
- <text class="detail-value">{{ item.contactUserName || "-" }}</text>
- </view>
- <view class="detail-row">
- <text class="detail-label">鑱旂郴鐢佃瘽</text>
- <text class="detail-value">{{ item.contactUserPhone || "-" }}</text>
+ <text class="detail-label">鍏徃鍦板潃</text>
+ <text class="detail-value">{{ item.companyAddress || "-" }}</text>
</view>
<view class="detail-row">
<text class="detail-label">缁存姢浜�</text>
@@ -68,11 +60,18 @@
<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 size="small" class="action-btn" type="error" @click="handleDelete(item)">鍒犻櫎</u-button>
+ </view>
</view>
</view>
</view>
<view v-else class="no-data">
<text>鏆傛棤渚涘簲鍟嗘暟鎹�</text>
+ </view>
+ <view class="fab-button" @click="goAdd">
+ <up-icon name="plus" size="24" color="#ffffff"></up-icon>
</view>
</view>
</template>
@@ -80,10 +79,8 @@
<script setup>
import { reactive, ref } from "vue";
import { onShow } from "@dcloudio/uni-app";
- import useUserStore from "@/store/modules/user";
import { delSupplier, listSupplier } from "@/api/basicData/supplierManageFile";
- const userStore = useUserStore();
const supplierName = ref("");
const list = ref([]);
@@ -123,7 +120,14 @@
isWhite: tabValue.value,
})
.then(res => {
- list.value = res?.data?.records || [];
+ const payload = res?.data;
+ if (Array.isArray(payload)) {
+ list.value = payload;
+ } else if (payload && typeof payload === "object") {
+ list.value = payload.records || payload.rows || [];
+ } else {
+ list.value = [];
+ }
})
.catch(() => {
uni.showToast({ title: "鏌ヨ澶辫触", icon: "error" });
@@ -135,10 +139,6 @@
const handleDelete = item => {
if (!item?.id) return;
- if (item.maintainUserName && item.maintainUserName !== userStore.nickName) {
- uni.showToast({ title: "涓嶅彲鍒犻櫎浠栦汉缁存姢鐨勬暟鎹�", icon: "none" });
- return;
- }
uni.showModal({
title: "鍒犻櫎鎻愮ず",
content: "纭畾瑕佸垹闄ゅ悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
@@ -161,7 +161,6 @@
};
onShow(() => {
- userStore.getInfo();
getList();
});
</script>
--
Gitblit v1.9.3