From 357291a906de883ccf0b29f6113126c6c58af2ca Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期一, 23 三月 2026 17:01:39 +0800
Subject: [PATCH] 禁止提交.vscode配置文件

---
 src/pages/basicData/supplierManage/index.vue |  197 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 197 insertions(+), 0 deletions(-)

diff --git a/src/pages/basicData/supplierManage/index.vue b/src/pages/basicData/supplierManage/index.vue
new file mode 100644
index 0000000..a7c01a0
--- /dev/null
+++ b/src/pages/basicData/supplierManage/index.vue
@@ -0,0 +1,197 @@
+<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>
+    <view class="search-section">
+      <view class="search-bar">
+        <view class="search-input">
+          <up-input
+            class="search-text"
+            placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О"
+            v-model="supplierName"
+            @change="getList"
+            clearable
+          />
+        </view>
+        <view class="filter-button" @click="getList">
+          <up-icon name="search" size="24" color="#999"></up-icon>
+        </view>
+      </view>
+    </view>
+    <view class="tabs-section">
+      <up-tabs
+        v-model="tabValue"
+        :list="tabList"
+        itemStyle="width: 50%;height: 80rpx;"
+        @change="onTabChange"
+      >
+      </up-tabs>
+    </view>
+    <view class="ledger-list" v-if="list.length > 0">
+      <view v-for="item in list" :key="item.id">
+        <view class="ledger-item">
+          <view class="item-header">
+            <view class="item-left">
+              <view class="document-icon">
+                <up-icon name="file-text" size="16" color="#ffffff"></up-icon>
+              </view>
+              <text class="item-id">{{ item.supplierName || "-" }}</text>
+            </view>
+          </view>
+          <up-divider></up-divider>
+          <view class="item-details">
+            <view class="detail-row">
+              <text class="detail-label">渚涘簲鍟嗙被鍨�</text>
+              <text class="detail-value">{{ item.supplierType || "-" }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">绾崇◣浜鸿瘑鍒彿</text>
+              <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>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">缁存姢浜�</text>
+              <text class="detail-value">{{ item.maintainUserName || "-" }}</text>
+            </view>
+            <view class="detail-row">
+              <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>
+    </view>
+    <view v-else class="no-data">
+      <text>鏆傛棤渚涘簲鍟嗘暟鎹�</text>
+    </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([]);
+
+  const tabList = reactive([
+    { name: "姝e父渚涘簲鍟�", value: 0 },
+    { name: "榛戝悕鍗�", value: 1 },
+  ]);
+  const tabValue = ref(0);
+
+  const page = {
+    current: -1,
+    size: -1,
+  };
+
+  const goBack = () => {
+    uni.navigateBack();
+  };
+
+  const goAdd = () => {
+    uni.navigateTo({ url: "/pages/basicData/supplierManage/edit" });
+  };
+
+  const goEdit = item => {
+    uni.navigateTo({ url: `/pages/basicData/supplierManage/edit?id=${item.id}` });
+  };
+
+  const onTabChange = val => {
+    tabValue.value = val.value;
+    getList();
+  };
+
+  const getList = () => {
+    uni.showLoading({ title: "鍔犺浇涓�...", mask: true });
+    listSupplier({
+      ...page,
+      supplierName: supplierName.value,
+      isWhite: tabValue.value,
+    })
+      .then(res => {
+        list.value = res?.data?.records || [];
+      })
+      .catch(() => {
+        uni.showToast({ title: "鏌ヨ澶辫触", icon: "error" });
+      })
+      .finally(() => {
+        uni.hideLoading();
+      });
+  };
+
+  const handleDelete = item => {
+    if (!item?.id) return;
+    if (item.maintainUserName && item.maintainUserName !== userStore.nickName) {
+      uni.showToast({ title: "涓嶅彲鍒犻櫎浠栦汉缁存姢鐨勬暟鎹�", icon: "none" });
+      return;
+    }
+    uni.showModal({
+      title: "鍒犻櫎鎻愮ず",
+      content: "纭畾瑕佸垹闄ゅ悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
+      success: res => {
+        if (!res.confirm) return;
+        uni.showLoading({ title: "鍒犻櫎涓�...", mask: true });
+        delSupplier([item.id])
+          .then(() => {
+            uni.showToast({ title: "鍒犻櫎鎴愬姛", icon: "success" });
+            getList();
+          })
+          .catch(() => {
+            uni.showToast({ title: "鍒犻櫎澶辫触", icon: "error" });
+          })
+          .finally(() => {
+            uni.hideLoading();
+          });
+      },
+    });
+  };
+
+  onShow(() => {
+    userStore.getInfo();
+    getList();
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "@/styles/procurement-common.scss";
+
+  .tabs-section {
+    background: #fff;
+    padding: 0 12px 8px 12px;
+  }
+</style>

--
Gitblit v1.9.3