From 1bda9babdf0316852ee5972690742f63c79595d6 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 21 一月 2026 16:54:41 +0800
Subject: [PATCH] 用印管理以及知识库部分逻辑修改

---
 src/pages/index.vue                                    |   21 +
 src/pages.json                                         |   14 +
 src/pages/managementMeetings/sealManagement/index.vue  |  342 ++++++++++++++++++++++++
 src/api/managementMeetings/sealManagement.js           |   28 ++
 src/pages/managementMeetings/knowledgeBase/detail.vue  |   48 +-
 src/pages/managementMeetings/sealManagement/detail.vue |  330 +++++++++++++++++++++++
 6 files changed, 751 insertions(+), 32 deletions(-)

diff --git a/src/api/managementMeetings/sealManagement.js b/src/api/managementMeetings/sealManagement.js
new file mode 100644
index 0000000..f4d4aa2
--- /dev/null
+++ b/src/api/managementMeetings/sealManagement.js
@@ -0,0 +1,28 @@
+import request from "@/utils/request";
+
+// 鏌ヨ鍗扮珷鐢宠鍒楄〃
+export function listSealApplication(page,query) {
+  return request({
+    url: "/sealApplicationManagement/getList",
+    method: "get",
+    params: {
+      ...page,
+      ...query},
+  });
+}
+
+// 淇敼鍗扮珷鐢宠
+export function updateSealApplication(data) {
+  return request({
+    url: "/sealApplicationManagement/update",
+    method: "post",
+    data: data,
+  });
+}
+export function addSealApplication(data) {
+  return request({
+    url: "/sealApplicationManagement/add",
+    method: "post",
+    data: data,
+  });
+}
\ No newline at end of file
diff --git a/src/pages.json b/src/pages.json
index 93cb59a..561ed11 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -380,6 +380,20 @@
       }
     },
     {
+      "path": "pages/managementMeetings/sealManagement/index",
+      "style": {
+        "navigationBarTitleText": "鐢ㄥ嵃绠$悊",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/managementMeetings/sealManagement/detail",
+      "style": {
+        "navigationBarTitleText": "鐢ㄥ嵃璇︽儏",
+        "navigationStyle": "custom"
+      }
+    },
+    {
       "path": "pages/managementMeetings/knowledgeBase/detail",
       "style": {
         "navigationBarTitleText": "鐭ヨ瘑搴撹鎯�",
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 6475d60..8d59b81 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -343,13 +343,17 @@
       label: "鐭ヨ瘑搴�",
     },
     {
-      icon: "/static/images/icon/xietongshenpi@2x.png",
-      label: "鍗忓悓瀹℃壒",
+      icon: "/static/images/icon/qingjiaguanli@2x.png",
+      label: "鐢ㄥ嵃绠$悊",
     },
-    {
-      icon: "/static/images/icon/kehubaifang@2x.png",
-      label: "瀹㈡埛鎷滆",
-    },
+    // {
+    //   icon: "/static/images/icon/xietongshenpi@2x.png",
+    //   label: "鍗忓悓瀹℃壒",
+    // },
+    // {
+    //   icon: "/static/images/icon/kehubaifang@2x.png",
+    //   label: "瀹㈡埛鎷滆",
+    // },
   ]);
 
   // 鐢熶骇绠℃帶鍔熻兘鏁版嵁
@@ -565,6 +569,11 @@
           url: "/pages/managementMeetings/knowledgeBase/index",
         });
         break;
+      case "鐢ㄥ嵃绠$悊":
+        uni.navigateTo({
+          url: "/pages/managementMeetings/sealManagement/index",
+        });
+        break;
       case "鍗忓悓瀹℃壒":
         uni.navigateTo({
           url: "/pages/cooperativeOffice/collaborativeApproval/index",
diff --git a/src/pages/managementMeetings/knowledgeBase/detail.vue b/src/pages/managementMeetings/knowledgeBase/detail.vue
index 0cde8ee..3aae18d 100644
--- a/src/pages/managementMeetings/knowledgeBase/detail.vue
+++ b/src/pages/managementMeetings/knowledgeBase/detail.vue
@@ -156,7 +156,6 @@
   import {
     addKnowledgeBase,
     updateKnowledgeBase,
-    getKnowledgeBaseDetail,
   } from "@/api/managementMeetings/knowledgeBase";
 
   const userStore = useUserStore();
@@ -284,37 +283,19 @@
   const detailType = ref(1);
   const knowledgeId = ref("");
 
-  // 鑾峰彇鐭ヨ瘑璇︽儏
-  const getKnowledgeDetail = id => {
-    loading.value = true;
-    getKnowledgeBaseDetail(id)
-      .then(res => {
-        loading.value = false;
-        if (res.code === 200) {
-          form.value = res.data;
-          equipmentname.value =
-            equipmentOptions.value.find(item => item.value === form.value.type)
-              ?.name || "";
-          statusname.value =
-            statusOptions.value.find(item => item.value === form.value.efficiency)
-              ?.name || "";
-        } else {
-          showToast("鑾峰彇鐭ヨ瘑璇︽儏澶辫触");
-        }
-      })
-      .catch(err => {
-        loading.value = false;
-        showToast("鑾峰彇鐭ヨ瘑璇︽儏澶辫触");
-      });
-  };
-
   onLoad(options => {
     detailType.value = Number(options.detailType);
     knowledgeId.value = options.id || "";
 
     // 濡傛灉鏄紪杈戞垨鏌ョ湅妯″紡锛岃幏鍙栫煡璇嗚鎯�
     if (knowledgeId.value && (detailType.value === 2 || detailType.value === 3)) {
-      getKnowledgeDetail(knowledgeId.value);
+      // getKnowledgeDetail(knowledgeId.value);
+      equipmentname.value =
+        equipmentOptions.value.find(item => item.value === form.value.type)
+          ?.name || "";
+      statusname.value =
+        statusOptions.value.find(item => item.value === form.value.efficiency)
+          ?.name || "";
     }
 
     // 鏌ョ湅妯″紡璁剧疆鍙
@@ -335,6 +316,21 @@
       value: item.value,
       name: item.label,
     }));
+    if (detailType.value === 1) {
+      form.value = {
+        title: "",
+        type: "",
+        scenario: "",
+        efficiency: "",
+        problem: "",
+        solution: "",
+        keyPoints: "",
+        creator: "",
+        usageCount: 0,
+      };
+      equipmentname.value = "";
+      statusname.value = "";
+    }
 
     if (detailType.value != 1) {
       equipmentname.value =
diff --git a/src/pages/managementMeetings/sealManagement/detail.vue b/src/pages/managementMeetings/sealManagement/detail.vue
new file mode 100644
index 0000000..2dd2b55
--- /dev/null
+++ b/src/pages/managementMeetings/sealManagement/detail.vue
@@ -0,0 +1,330 @@
+<template>
+  <view class="client-visit-detail">
+    <PageHeader :title="detailType === 1 ? '鏂板鐭ヨ瘑搴�' : '鐭ヨ瘑搴撹鎯�'"
+                @back="goBack" />
+    <u-form ref="formRef"
+            label-width="90">
+      <!-- 瀹㈡埛淇℃伅 -->
+      <!-- <u-cell-group title="鐭ヨ瘑淇℃伅"> -->
+      <u-form-item label="鐢宠缂栧彿"
+                   prop="applicationNum"
+                   required
+                   border-bottom>
+        <u-input v-model="form.applicationNum"
+                 :readonly="readonly"
+                 placeholder="璇疯緭鍏ョ敵璇风紪鍙�" />
+      </u-form-item>
+      <u-form-item label="鐢宠鏍囬"
+                   prop="title"
+                   required
+                   border-bottom>
+        <u-input v-model="form.title"
+                 :readonly="readonly"
+                 placeholder="璇疯緭鍏ョ敵璇锋爣棰�" />
+      </u-form-item>
+      <u-form-item label="鐢ㄥ嵃绫诲瀷"
+                   prop="sealType"
+                   required
+                   border-bottom>
+        <u-input v-model="equipmentname"
+                 readonly
+                 placeholder="璇烽�夋嫨鐢ㄥ嵃绫诲瀷"
+                 @click="showEquipmentSheet = true" />
+        <template v-if="!readonly"
+                  #right>
+          <up-icon name="arrow-right"
+                   @click="openEquipmentSheet"></up-icon>
+        </template>
+      </u-form-item>
+      <u-form-item label="鐢宠鍘熷洜"
+                   prop="reason"
+                   border-bottom>
+        <u-textarea v-model="form.reason"
+                    type="textarea"
+                    rows="4"
+                    :disabled="readonly"
+                    placeholder="璇疯緭鍏ョ敵璇峰師鍥�" />
+      </u-form-item>
+      <u-form-item label="瀹℃壒浜�"
+                   prop="sealType"
+                   required
+                   border-bottom>
+        <u-input v-model="statusname"
+                 readonly
+                 placeholder="璇烽�夋嫨瀹℃壒浜�"
+                 @click="showStatusSheet = true" />
+        <template v-if="!readonly"
+                  #right>
+          <up-icon name="arrow-right"
+                   @click="showStatusSheet = true"></up-icon>
+        </template>
+      </u-form-item>
+      <u-form-item label="绱ф�ョ▼搴�"
+                   prop="urgency"
+                   required
+                   border-bottom>
+        <u-radio-group v-model="form.urgency"
+                       :disabled="readonly">
+          <u-radio name="normal"
+                   label="鏅��"
+                   size="16" />
+          <u-radio name="urgent"
+                   label="绱ф��"
+                   size="16" />
+          <u-radio name="very-urgent"
+                   label="鐗规��"
+                   size="16" />
+        </u-radio-group>
+      </u-form-item>
+      <!-- </u-cell-group> -->
+      <!-- 鎻愪氦鎸夐挳 -->
+      <view v-if="!readonly"
+            class="footer-btns">
+        <u-button class="cancel-btn"
+                  @click="goBack">鍙栨秷</u-button>
+        <u-button class="sign-btn"
+                  type="primary"
+                  @click="handleSubmit"
+                  :loading="loading">淇濆瓨</u-button>
+      </view>
+    </u-form>
+    <!-- 璁惧閰嶇疆閫夋嫨鍣� -->
+    <up-action-sheet :show="showEquipmentSheet"
+                     :actions="equipmentOptions"
+                     @select="handleEquipmentChange"
+                     @close="showEquipmentSheet = false" />
+    <!-- 鐘舵�侀�夋嫨鍣� -->
+    <up-action-sheet :show="showStatusSheet"
+                     :actions="userList"
+                     @select="onStatusSelect"
+                     @close="showStatusSheet = false" />
+  </view>
+</template>
+
+<script setup>
+  // 鏇挎崲 toast 鏂规硶
+  defineOptions({ name: "meeting-settings-detail" });
+  const showToast = message => {
+    uni.showToast({
+      title: message,
+      icon: "none",
+    });
+  };
+
+  import { ref, onMounted, computed } from "vue";
+  import PageHeader from "@/components/PageHeader.vue";
+  import useUserStore from "@/store/modules/user";
+  import { useDict } from "@/utils/dict";
+  import { onLoad } from "@dcloudio/uni-app";
+  import { userListNoPageByTenantId } from "@/api/system/user";
+
+  import { addSealApplication } from "@/api/managementMeetings/sealManagement";
+
+  const userStore = useUserStore();
+
+  // 琛ㄥ崟鏁版嵁
+  const form = ref({
+    applicationNum: "",
+    title: "",
+    sealType: "",
+    reason: "",
+    approveUserId: "",
+    urgency: "normal",
+    status: "pending",
+  });
+  const { knowledge_type } = useDict("knowledge_type");
+  const knowledgeTypeOptions = computed(() => knowledge_type?.value || []);
+  const equipmentOptions = ref([
+    { value: "official", name: "鍏珷" },
+    { value: "contract", name: "鍚堝悓涓撶敤绔�" },
+    { value: "finance", name: "璐㈠姟涓撶敤绔�" },
+    { value: "legal", name: "娉曚汉绔�" },
+  ]);
+  const statusOptions = ref([
+    { value: "high", name: "鏄捐憲鎻愬崌" },
+    { value: "medium", name: "涓�鑸彁鍗�" },
+    { value: "low", name: "杞诲井鎻愬崌" },
+  ]);
+  //// 椤甸潰鐘舵��
+  const loading = ref(false);
+  const formRef = ref(null);
+  const showEquipmentSheet = ref(false);
+  const showStatusSheet = ref(false);
+  const openEquipmentSheet = () => {
+    showEquipmentSheet.value = true;
+  };
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.navigateBack();
+  };
+  const statusname = ref("");
+  // 鐘舵�侀�夋嫨
+  const onStatusSelect = action => {
+    form.value.approveUserId = action.value;
+    statusname.value = action.name;
+    showStatusSheet.value = false;
+  };
+  const equipmentname = ref("");
+  // 璁惧閰嶇疆閫夋嫨
+  const handleEquipmentChange = val => {
+    form.value.sealType = val.value;
+    equipmentname.value = val.name;
+    showEquipmentSheet.value = false;
+  };
+  // 鎻愪氦琛ㄥ崟
+  const handleSubmit = async () => {
+    if (!form.value.applicationNum) {
+      showToast("璇疯緭鍏ョ敵璇风紪鍙�");
+      return;
+    }
+
+    if (!form.value.title) {
+      showToast("璇疯緭鍏ユ爣棰�");
+      return;
+    }
+
+    if (!form.value.sealType) {
+      showToast("璇烽�夋嫨鐢ㄥ嵃绫诲瀷");
+      return;
+    }
+    if (!form.value.reason) {
+      showToast("璇疯緭鍏ョ敵璇风悊鐢�");
+      return;
+    }
+    if (!statusname.value) {
+      showToast("璇烽�夋嫨瀹℃壒浜�");
+      return;
+    }
+    try {
+      loading.value = true;
+      addSealApplication(form.value).then(res => {
+        if (res.code !== 200) {
+          showToast("淇濆瓨澶辫触锛岃閲嶈瘯");
+          return;
+        }
+        loading.value = false;
+        showToast("淇濆瓨鎴愬姛");
+        setTimeout(() => {
+          goBack();
+        }, 500);
+      });
+    } catch (e) {
+      loading.value = false;
+      console.error("淇濆瓨澶辫触:", e);
+      showToast("淇濆瓨澶辫触锛岃閲嶈瘯");
+    }
+  };
+
+  // 鍒濆鍖栭〉闈㈡暟鎹�
+  const readonly = ref(false);
+  const detailType = ref(1);
+  const knowledgeId = ref("");
+  const userList = ref([]);
+  onLoad(options => {
+    detailType.value = Number(options.detailType);
+    knowledgeId.value = options.id || "";
+
+    // 鏌ョ湅妯″紡璁剧疆鍙
+    if (detailType.value === 3) {
+      readonly.value = true;
+    }
+    userListNoPageByTenantId().then(res => {
+      userList.value = res.data.map(item => ({
+        value: item.userId,
+        name: item.nickName,
+      }));
+    });
+  });
+
+  onMounted(() => {
+    // 浠庢湰鍦板瓨鍌ㄤ腑鑾峰彇鐭ヨ瘑鏁版嵁
+    const knowledgeBase = uni.getStorageSync("knowledgeBase");
+    if (knowledgeBase) {
+      form.value = JSON.parse(JSON.stringify(knowledgeBase));
+    }
+
+    if (detailType.value === 1) {
+      form.value = {
+        applicationNum: "",
+        title: "",
+        sealType: "",
+        reason: "",
+        approveUserId: "",
+        urgency: "normal",
+        status: "pending",
+      };
+      statusname.value = "";
+      equipmentname.value = "";
+    }
+    console.log(form.value, "userList.value");
+
+    if (detailType.value != 1) {
+      equipmentname.value =
+        equipmentOptions.value.find(item => item.value === form.value.sealType)
+          ?.name || "";
+      statusname.value = form.value.approveUserName || "";
+    }
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "@/static/scss/form-common.scss";
+  .client-visit {
+    min-height: 100vh;
+    background: #f8f9fa;
+    padding-bottom: 5rem;
+  }
+
+  .footer-btns {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: #fff;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    padding: 0.75rem 0;
+    box-shadow: 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.05);
+    z-index: 1000;
+  }
+
+  .cancel-btn {
+    font-weight: 400;
+    font-size: 1rem;
+    color: #666;
+    background: #f5f5f5;
+    border: 1px solid #ddd;
+    width: 45%;
+    height: 2.5rem;
+    border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+  }
+
+  .sign-btn {
+    font-weight: 500;
+    font-size: 1rem;
+    color: #fff;
+    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+    border: none;
+    width: 45%;
+    height: 2.5rem;
+    border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+  }
+
+  .location-icon {
+    color: #1989fa;
+    font-size: 1.2rem;
+  }
+
+  /* 绱ф�ョ▼搴﹀崟閫夋鏍峰紡 */
+  :deep(.u-radio-group) {
+    display: flex;
+    align-items: center;
+    gap: 40rpx;
+  }
+
+  :deep(.u-radio) {
+    display: flex;
+    align-items: center;
+  }
+</style>
\ No newline at end of file
diff --git a/src/pages/managementMeetings/sealManagement/index.vue b/src/pages/managementMeetings/sealManagement/index.vue
new file mode 100644
index 0000000..6d92c96
--- /dev/null
+++ b/src/pages/managementMeetings/sealManagement/index.vue
@@ -0,0 +1,342 @@
+<template>
+  <view class="sales-accoun">
+    <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+    <PageHeader title="鐢ㄥ嵃绠$悊"
+                @back="goBack" />
+    <!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
+    <view class="search-section">
+      <view class="search-bar">
+        <view class="search-input">
+          <up-input class="search-text"
+                    placeholder="璇疯緭鍏ョ敵璇锋爣棰�"
+                    v-model="name"
+                    @blur="getList"
+                    clearable />
+        </view>
+        <view class="filter-button"
+              @click="getList">
+          <u-icon name="search"
+                  size="24"
+                  color="#999"></u-icon>
+        </view>
+      </view>
+    </view>
+    <!-- 鎷滆璁板綍鍒楄〃 -->
+    <view class="ledger-list"
+          v-if="visitList.length > 0">
+      <view v-for="(item, index) in visitList"
+            :key="index">
+        <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.title || '-' }}</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.applicationNum || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鐢宠浜�</text>
+              <text class="detail-value">{{ item.createUserName || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鎵�灞為儴闂�</text>
+              <text class="detail-value">{{ item.department || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鐢ㄥ嵃绫诲瀷</text>
+              <text class="detail-value">{{ formatReceiptType(item.sealType) }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鐢宠鏃堕棿</text>
+              <text class="detail-value">{{ item.createTime || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鐘舵��</text>
+              <u-tag size="mini"
+                     :type="getTagClass(item.status)">{{ formatReceiptType1(item.status) }}</u-tag>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鐢宠鍘熷洜</text>
+              <text class="detail-value"><span style="display: block;height: auto;word-break: break-word;">{{ item.reason || '-' }}</span></text>
+            </view>
+          </view>
+          <!-- 鎸夐挳鍖哄煙 -->
+          <view class="action-buttons">
+            <u-button type="info"
+                      size="small"
+                      class="action-btn"
+                      @click="viewDetail(item,3)">
+              鏌ョ湅
+            </u-button>
+            <u-button type="primary"
+                      size="small"
+                      class="action-btn"
+                      v-if="item.status === 'pending'"
+                      @click="confirmApprove(item,true)">
+              瀹℃壒
+            </u-button>
+            <u-button type="error"
+                      size="small"
+                      class="action-btn"
+                      v-if="item.status === 'pending'"
+                      @click="confirmApprove(item,false)">
+              鎷掔粷
+            </u-button>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view v-else
+          class="no-data">
+      <text>鏆傛棤浼氳瀹よ褰�</text>
+    </view>
+    <!-- 娴姩鏂板鎸夐挳 -->
+    <view class="fab-button"
+          @click="addVisit">
+      <up-icon name="plus"
+               size="24"
+               color="#ffffff"></up-icon>
+    </view>
+  </view>
+</template>
+
+<script setup>
+  import { ref, onMounted, computed } from "vue";
+  import { onShow } from "@dcloudio/uni-app";
+  import { useDict } from "@/utils/dict";
+  import PageHeader from "@/components/PageHeader.vue";
+  import {
+    listSealApplication,
+    updateSealApplication,
+  } from "@/api/managementMeetings/sealManagement";
+  import useUserStore from "@/store/modules/user";
+  // 鏇挎崲 toast 鏂规硶
+  defineOptions({ name: "client-visit-index" });
+  const showToast = message => {
+    uni.showToast({
+      title: message,
+      icon: "none",
+    });
+  };
+
+  import dayjs from "dayjs";
+
+  const userStore = useUserStore();
+
+  // 鎼滅储鍏抽敭璇�
+  const name = ref("");
+
+  // 鎷滆璁板綍鏁版嵁
+  const visitList = ref([]);
+
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.navigateBack();
+  };
+  const { knowledge_type } = useDict("knowledge_type");
+  // 鏍煎紡鍖栧洖娆炬柟寮�
+  const formatReceiptType = params => {
+    if (params == "official") {
+      return "鍏珷";
+    } else if (params == "contract") {
+      return "鍚堝悓涓撶敤绔�";
+    } else if (params == "finance") {
+      return "璐㈠姟涓撶敤绔�";
+    } else if (params == "tegal") {
+      return "娉曚汉绔�";
+    } else {
+      return "鏈煡";
+    }
+  };
+  const formatReceiptType1 = params => {
+    if (params == "pending") {
+      return "寰呭鎵�";
+    } else if (params == "approved") {
+      return "宸查�氳繃";
+    } else if (params == "rejected") {
+      return "宸叉嫆缁�";
+    } else {
+      return "鏈煡";
+    }
+  };
+  const getTagClass = type => {
+    if (type == "pending") {
+      return "warning";
+    } else if (type == "approved") {
+      return "success";
+    } else if (type == "rejected") {
+      return "danger";
+    } else {
+      return "info";
+    }
+  };
+  const knowledgeTypeOptions = computed(() => knowledge_type?.value || []);
+  // 鑾峰彇鐭ヨ瘑绫诲瀷鏍囩
+  const getKnowledgeTypeLabel = val => {
+    console.log(knowledgeTypeOptions, "knowledgeTypeOptions");
+    const item = knowledgeTypeOptions.value.find(
+      i => String(i.value) === String(val)
+    );
+    return item ? item.label : val;
+  };
+
+  // 鏌ヨ鍒楄〃
+  const getList = () => {
+    showLoadingToast("鍔犺浇涓�...");
+    const params = {
+      current: -1,
+      size: -1,
+      title: name.value,
+    };
+    listSealApplication(params)
+      .then(res => {
+        const currentFactoryName = userStore.currentFactoryName;
+        if (currentFactoryName) {
+          visitList.value = res.data.records.filter(
+            item => item.department === currentFactoryName
+          );
+        } else {
+          visitList.value = res.data.records;
+        }
+        closeToast();
+      })
+      .catch(() => {
+        closeToast();
+        showToast("鑾峰彇鏁版嵁澶辫触");
+      });
+  };
+
+  // 鏄剧ず鍔犺浇鎻愮ず
+  const showLoadingToast = message => {
+    uni.showLoading({
+      title: message,
+      mask: true,
+    });
+  };
+
+  // 鍏抽棴鎻愮ず
+  const closeToast = () => {
+    uni.hideLoading();
+  };
+
+  // 鏂板鎷滆 - 璺宠浆鍒扮櫥璁伴〉闈�
+  const addVisit = () => {
+    uni.navigateTo({
+      url: "/pages/managementMeetings/sealManagement/detail?detailType=1",
+    });
+  };
+  const confirmApprove = (item, isApprove) => {
+    if (isApprove) {
+      uni.showModal({
+        title: "瀹℃壒纭",
+        content: `纭畾瑕佸鎵硅鐢ㄥ嵃鐢宠鍚楋紵`,
+        success: res => {
+          item.status = "approved";
+          updateSealApplication(item).then(res => {
+            if (res.code == 200) {
+              showToast("瀹℃壒閫氳繃");
+            }
+          });
+        },
+      });
+    } else {
+      uni.showModal({
+        title: "瀹℃壒纭",
+        content: `纭畾瑕佹嫆缁濊鐢ㄥ嵃鐢宠鍚楋紵`,
+        success: res => {
+          item.status = "rejected";
+          updateSealApplication(item).then(res => {
+            if (res.code == 200) {
+              showToast("瀹℃壒鎷掔粷");
+            }
+          });
+        },
+      });
+    }
+  };
+  // 缂栬緫
+  const viewDetail = (item, detailType) => {
+    uni.setStorageSync("knowledgeBase", item);
+    uni.navigateTo({
+      url:
+        "/pages/managementMeetings/sealManagement/detail?detailType=" +
+        detailType +
+        "&id=" +
+        item.id,
+    });
+  };
+
+  // 鍒犻櫎纭
+  const confirmDelete = item => {
+    uni.showModal({
+      title: "鍒犻櫎纭",
+      content: `纭畾瑕佸垹闄ょ煡璇� "${item.title}" 鍚楋紵`,
+      success: res => {
+        if (res.confirm) {
+          // deleteKnowledge(item.id);
+        }
+      },
+    });
+  };
+
+  onMounted(() => {
+    getList();
+  });
+
+  onShow(() => {
+    getList();
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "../../../styles/sales-common.scss";
+
+  // 椤甸潰鐗瑰畾鐨勬牱寮忚鐩�
+  .sales-accoun {
+    min-height: 100vh;
+    background: #f8f9fa;
+    position: relative;
+    padding-bottom: 80px;
+  }
+
+  // 鐗瑰畾鐨勫浘鏍囨牱寮�
+  .document-icon {
+    background: #667eea; // 淇濇寔椤甸潰鐗规湁鐨勮儗鏅壊
+  }
+
+  // 鐗规湁鏍峰紡
+  .visit-status {
+    display: flex;
+    align-items: center;
+  }
+
+  .detail-value {
+    word-break: break-all; // 淇濈暀椤甸潰鐗规湁鐨勬枃鏈崲琛屾牱寮�
+    color: #333; // 淇濇寔椤甸潰鐗规湁鐨勬枃鏈鑹�
+  }
+
+  // 鐘舵�佹牱寮�
+  .status-enabled {
+    color: #28a745; // 淇濇寔椤甸潰鐗规湁鐨勬垚鍔熼鑹�
+  }
+
+  .status-disabled {
+    color: #dc3545; // 淇濇寔椤甸潰鐗规湁鐨勯敊璇鑹�
+  }
+
+  // 鐗瑰畾鐨勬诞鍔ㄦ寜閽牱寮�
+  .fab-button {
+    background: #667eea; // 淇濇寔椤甸潰鐗规湁鐨勮儗鏅壊
+    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); // 淇濇寔椤甸潰鐗规湁鐨勯槾褰辨晥鏋�
+  }
+</style>
+

--
Gitblit v1.9.3