From 263b4a60670671cef5445b102e670c40ba34a162 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 30 六月 2026 15:11:11 +0800
Subject: [PATCH] 特种设备管理模块开发
---
src/pages/basicData/supplierManage/index.vue | 52 +++++++++++++++-------------------------------------
1 files changed, 15 insertions(+), 37 deletions(-)
diff --git a/src/pages/basicData/supplierManage/index.vue b/src/pages/basicData/supplierManage/index.vue
index a7c01a0..b20f519 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">
@@ -58,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>
@@ -80,14 +62,7 @@
</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>
+ <u-button size="small" class="action-btn" type="error" @click="handleDelete(item)">鍒犻櫎</u-button>
</view>
</view>
</view>
@@ -95,16 +70,17 @@
<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>
<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([]);
@@ -144,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" });
@@ -156,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: "纭畾瑕佸垹闄ゅ悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
@@ -182,7 +161,6 @@
};
onShow(() => {
- userStore.getInfo();
getList();
});
</script>
--
Gitblit v1.9.3