From db42d47f5692ef64e5436c5a6d29dcb537b44596 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 26 一月 2026 16:36:13 +0800
Subject: [PATCH] 浪潮对接单点登录:mis调整

---
 src/views/salesManagement/deliveryLedger/index.vue |  661 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 661 insertions(+), 0 deletions(-)

diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
new file mode 100644
index 0000000..688741b
--- /dev/null
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -0,0 +1,661 @@
+<template>
+  <div class="app-container">
+    <div class="search_form">
+      <el-form :model="searchForm" :inline="true">
+        <el-form-item label="閿�鍞鍗曞彿锛�">
+          <el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search" style="width: 200px"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="杞︾墝鍙凤細">
+          <el-input v-model="searchForm.shippingCarNumber" placeholder="璇疯緭鍏�" clearable prefix-icon="Search" style="width: 200px"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="蹇�掑崟鍙凤細">
+          <el-input v-model="searchForm.expressNumber" placeholder="璇疯緭鍏�" clearable prefix-icon="Search" style="width: 200px"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="handleQuery"> 鎼滅储 </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table_list">
+      <div class="actions">
+        <div></div>
+        <div>
+          <el-button @click="handleOut">瀵煎嚭</el-button>
+          <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+        </div>
+      </div>
+      <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
+        :row-key="(row) => row.id" style="width: 100%" height="calc(100vh - 21.5em)">
+        <el-table-column align="center" type="selection" width="55" />
+        <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+        <el-table-column label="閿�鍞鍗�" prop="salesContractNo" show-overflow-tooltip />
+        <el-table-column label="鍙戣揣璁㈠崟鍙�" prop="shippingNo" show-overflow-tooltip />
+        <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip />
+        <el-table-column label="鍙戣揣鏃堕棿" prop="shippingDate" show-overflow-tooltip />
+        <el-table-column label="鍙戣揣杞︾墝鍙�" prop="shippingCarNumber" show-overflow-tooltip />
+        <el-table-column label="蹇�掑叕鍙�" prop="expressCompany" show-overflow-tooltip />
+        <el-table-column label="蹇�掑崟鍙�" prop="expressNumber" show-overflow-tooltip />
+        <el-table-column label="瀹℃牳鐘舵��" prop="status" align="center" width="120">
+          <template #default="scope">
+            <el-tag :type="getApprovalStatusType(scope.row.status)">
+              {{ getApprovalStatusText(scope.row.status) }}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" label="鎿嶄綔" width="150" align="center">
+          <template #default="scope">
+            <el-button 
+              link 
+              type="primary" 
+              size="small" 
+              :disabled="!isApproved(scope.row.status)"
+              @click="openForm('edit', scope.row)">缂栬緫</el-button>
+            <el-button 
+              link 
+              type="danger" 
+              size="small" 
+              :disabled="!isApproved(scope.row.status)"
+              @click="handleDeleteSingle(scope.row)">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
+        :page="page.current" :limit="page.size" @pagination="paginationChange" />
+    </div>
+    <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板鍙戣揣鍙拌处' : '缂栬緫鍙戣揣鍙拌处'" width="40%"
+      @close="closeDia">
+      <el-form :model="form" label-width="120px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="24">
+            <el-form-item label="鍙戣揣绫诲瀷锛�" prop="type">
+              <el-select
+                v-model="form.type"
+                placeholder="璇烽�夋嫨鍙戣揣绫诲瀷"
+                style="width: 100%"
+                @change="handleShippingTypeChange"
+              >
+                <el-option label="璐ц溅" value="璐ц溅" />
+                <el-option label="蹇��" value="蹇��" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="24">
+            <el-form-item label="鍙戣揣鏃ユ湡锛�" prop="shippingDate">
+              <el-date-picker
+                style="width: 100%"
+                v-model="form.shippingDate"
+                value-format="YYYY-MM-DD"
+                format="YYYY-MM-DD"
+                type="date"
+                placeholder="璇烽�夋嫨鍙戣揣鏃ユ湡"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="24" v-if="form.type === '璐ц溅'">
+            <el-form-item label="鍙戣揣杞︾墝鍙凤細" prop="shippingCarNumber">
+              <el-input
+                v-model="form.shippingCarNumber"
+                placeholder="璇疯緭鍏ュ彂璐ц溅鐗屽彿"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" v-else>
+            <el-form-item label="蹇�掑叕鍙革細" prop="expressCompany">
+              <el-input
+                v-model="form.expressCompany"
+                placeholder="璇疯緭鍏ュ揩閫掑叕鍙�"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30" v-if="form.type === '蹇��'">
+          <el-col :span="24">
+            <el-form-item label="蹇�掑崟鍙凤細" prop="expressNumber">
+              <el-input
+                v-model="form.expressNumber"
+                placeholder="璇疯緭鍏ュ揩閫掑崟鍙�"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="24">
+            <el-form-item label="鍙戣揣鍥剧墖锛�">
+              <el-upload 
+                v-model:file-list="deliveryFileList" 
+                :action="upload.url" 
+                multiple 
+                ref="deliveryFileUpload" 
+                auto-upload
+                :headers="upload.headers" 
+                :data="{ type: 9 }"
+                :before-upload="handleDeliveryBeforeUpload" 
+                :on-error="handleDeliveryUploadError"
+                :on-success="handleDeliveryUploadSuccess" 
+                :on-remove="handleDeliveryRemove"
+                list-type="picture-card"
+                :limit="9"
+                accept="image/png,image/jpeg,image/jpg"
+              >
+                <el-icon class="avatar-uploader-icon"><Plus /></el-icon>
+                <template #tip>
+                  <div class="el-upload__tip">
+                    鏀寔 jpg銆乯peg銆乸ng 鏍煎紡锛屾渶澶氫笂浼� 9 寮狅紝鍗曞紶澶у皬涓嶈秴杩� 10MB
+                  </div>
+                </template>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import pagination from "@/components/PIMTable/Pagination.vue";
+import { onMounted, ref, reactive, toRefs, getCurrentInstance } from "vue";
+import { ElMessageBox } from "element-plus";
+import { Plus } from "@element-plus/icons-vue";
+import { getToken } from "@/utils/auth";
+import { getCurrentDate } from "@/utils/index.js";
+import {
+  deliveryLedgerListPage,
+  addOrUpdateDeliveryLedger,
+  delDeliveryLedger,
+} from "@/api/salesManagement/deliveryLedger.js";
+import { delLedgerFile } from "@/api/salesManagement/salesLedger.js";
+ 
+
+const { proxy } = getCurrentInstance();
+const tableData = ref([]);
+const selectedRows = ref([]);
+const tableLoading = ref(false);
+const salesOrderOptions = ref([]);
+const page = reactive({
+  current: 1,
+  size: 100,
+});
+const total = ref(0);
+const deliveryFileList = ref([]);
+const javaApi = proxy.javaApi;
+
+// 涓婁紶閰嶇疆
+const upload = reactive({
+  // 涓婁紶鐨勫湴鍧�
+  url: import.meta.env.VITE_APP_BASE_API + "/file/upload",
+  // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+  headers: { Authorization: "Bearer " + getToken() },
+});
+
+// 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
+const operationType = ref("");
+const dialogFormVisible = ref(false);
+const data = reactive({
+  searchForm: {
+    salesContractNo: "", // 閿�鍞鍗曞彿
+    shippingCarNumber: "", // 杞︾墝鍙�
+    expressNumber: "", // 蹇�掑崟鍙�
+  },
+  form: {
+    id: null,
+    salesContractNo: "",
+    customerName: "",
+    type: "璐ц溅", // 璐ц溅, 蹇��
+    shippingDate: "",
+    shippingCarNumber: "",
+    expressCompany: "",
+    expressNumber: "", // 蹇�掑崟鍙�
+  },
+  rules: {
+    salesContractNo: [{ required: true, message: "璇烽�夋嫨閿�鍞鍗�", trigger: "change" }],
+    customerName: [{ required: true, message: "璇疯緭鍏ュ鎴峰悕绉�", trigger: "blur" }],
+    type: [
+      { required: true, message: "璇烽�夋嫨鍙戣揣绫诲瀷", trigger: "change" }
+    ],
+    shippingDate: [{ required: true, message: "璇烽�夋嫨鍙戣揣鏃堕棿", trigger: "change" }],
+    shippingCarNumber: [
+      { validator: (_, value, callback) => validateShippingCarNumber(value, callback), trigger: "blur" }
+    ],
+    expressCompany: [
+      { validator: (_, value, callback) => validateExpressCompany(value, callback), trigger: "blur" }
+    ],
+  },
+});
+const { form, rules } = toRefs(data);
+const { searchForm } = toRefs(data);
+
+ 
+
+// 鏌ヨ鍒楄〃
+const handleQuery = () => {
+  page.current = 1;
+  getList();
+};
+
+const paginationChange = (obj) => {
+  page.current = obj.page;
+  page.size = obj.limit;
+  getList();
+};
+
+const getList = () => {
+  tableLoading.value = true;
+  deliveryLedgerListPage({ ...searchForm.value, ...page })
+    .then((res) => {
+      tableLoading.value = false;
+      tableData.value = res.data.records || [];
+      total.value = res.data.total || 0;
+    })
+    .catch(() => {
+      tableLoading.value = false;
+    });
+};
+
+// 閿�鍞鍗曞彉鍖栨椂鑷姩濉厖瀹㈡埛鍚嶇О
+const handleSalesOrderChange = (value) => {
+  const selectedOrder = salesOrderOptions.value.find(item => item.salesContractNo === value);
+  if (selectedOrder) {
+    form.value.customerName = selectedOrder.customerName;
+  }
+};
+
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鎵撳紑寮规
+const openForm = async (type, row) => {
+  // 缂栬緫鏃舵鏌ュ鏍哥姸鎬�
+  if (type === 'edit' && row && !isApproved(row.status)) {
+    proxy.$modal.msgWarning("鍙兘缂栬緫瀹℃牳閫氳繃鐨勬暟鎹�");
+    return;
+  }
+  
+  operationType.value = type;
+  const baseUrl = import.meta.env.VITE_APP_BASE_API;
+  
+  if (type === 'edit' && row) {
+    form.value = {
+      id: row.id ?? null,
+      salesContractNo: row.salesContractNo ?? "",
+      customerName: row.customerName ?? "",
+      type: row.type || "璐ц溅",
+      shippingDate: row.shippingDate || getCurrentDate(),
+      shippingCarNumber: row.shippingCarNumber ?? "",
+      expressCompany: row.expressCompany ?? "",
+      expressNumber: row.expressNumber ?? "",
+    };
+    // 濡傛灉鏈夊浘鐗囷紝灏� commonFileList 杞崲涓烘枃浠跺垪琛ㄦ牸寮�
+    if (row.commonFileList && Array.isArray(row.commonFileList) && row.commonFileList.length > 0) {
+      deliveryFileList.value = row.commonFileList.map((file, index) => {
+        // 澶勭悊 URL锛氬皢 Windows 璺緞杞崲涓哄彲璁块棶鐨� URL
+        let fileUrl = file.url || '';
+        console.log('鍘熷 URL:', fileUrl);
+        
+        // 濡傛灉 URL 鏄� Windows 璺緞鏍煎紡锛堝寘鍚弽鏂滄潬锛夛紝闇�瑕佽浆鎹�
+        if (fileUrl && fileUrl.indexOf('\\') > -1) {
+          // 鏌ユ壘 uploads 鍏抽敭瀛楃殑浣嶇疆锛屼粠閭i噷寮�濮嬫彁鍙栫浉瀵硅矾寰�
+          const uploadsIndex = fileUrl.toLowerCase().indexOf('uploads');
+          if (uploadsIndex > -1) {
+            // 浠� uploads 寮�濮嬫彁鍙栬矾寰勶紝骞跺皢鍙嶆枩鏉犳浛鎹负姝f枩鏉�
+            const relativePath = fileUrl.substring(uploadsIndex).replace(/\\/g, '/');
+            fileUrl = '/' + relativePath;
+            console.log('杞崲鍚庣殑鐩稿璺緞:', fileUrl);
+          } else {
+            // 濡傛灉娌℃湁鎵惧埌 uploads锛屾彁鍙栨渶鍚庝竴涓洰褰曞拰鏂囦欢鍚�
+            const parts = fileUrl.split('\\');
+            const fileName = parts[parts.length - 1];
+            fileUrl = '/uploads/' + fileName;
+            console.log('鏈壘鍒� uploads锛屼娇鐢ㄦ枃浠跺悕:', fileUrl);
+          }
+        }
+        
+        // 纭繚鎵�鏈夐潪 http 寮�澶寸殑 URL 閮芥嫾鎺� baseUrl
+        if (fileUrl && !fileUrl.startsWith('http')) {
+          // 纭繚璺緞浠� / 寮�澶�
+          if (!fileUrl.startsWith('/')) {
+            fileUrl = '/' + fileUrl;
+          }
+          // 鎷兼帴 baseUrl
+          fileUrl = javaApi + fileUrl;
+          console.log('鏈�缁堟嫾鎺ョ殑 URL:', fileUrl);
+        }
+        
+        return {
+          uid: file.id || Date.now() + index,
+          name: file.name || `image_${index + 1}.jpg`,
+          url: fileUrl,
+          status: 'success',
+          response: {
+            code: 200,
+            data: {
+              tempId: file.id,
+              url: fileUrl
+            }
+          },
+          tempId: file.id // 淇濆瓨鏂囦欢ID锛岀敤浜庢彁浜ゆ椂浣跨敤
+        };
+      });
+    } else {
+      deliveryFileList.value = [];
+    }
+  } else {
+    form.value = {
+      id: null,
+      salesContractNo: "",
+      customerName: "",
+      type: "璐ц溅",
+      shippingDate: getCurrentDate(),
+      shippingCarNumber: "",
+      expressCompany: "",
+      expressNumber: "",
+    };
+    deliveryFileList.value = [];
+  }
+  
+  dialogFormVisible.value = true;
+};
+
+// 鎻愪氦琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs["formRef"].validate((valid) => {
+    if (valid) {
+      let tempFileIds = [];
+      if (deliveryFileList.value !== null && deliveryFileList.value.length > 0) {
+        tempFileIds = deliveryFileList.value.map((item) => item.tempId);
+      }
+      const payload = {
+        id: form.value.id,
+        type: form.value.type,
+        shippingDate: form.value.shippingDate,
+        shippingCarNumber: form.value.type === "璐ц溅" ? form.value.shippingCarNumber : "",
+        expressCompany: form.value.type === "蹇��" ? form.value.expressCompany : "",
+        expressNumber: form.value.type === "蹇��" ? form.value.expressNumber : "",
+        tempFileIds: tempFileIds,
+      };
+      addOrUpdateDeliveryLedger(payload).then((res) => {
+        proxy.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+        closeDia();
+        getList();
+      });
+    }
+  });
+};
+
+// 鍏抽棴寮规
+const closeDia = () => {
+  proxy.resetForm("formRef");
+  deliveryFileList.value = []; // 娓呯┖鏂囦欢鍒楄〃
+  dialogFormVisible.value = false;
+};
+
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.download("/shippingInfo/export", {}, "鍙戣揣鍙拌处.xlsx");
+    })
+    .catch(() => {
+      proxy.$modal.msg("宸插彇娑�");
+    });
+};
+
+// 鎵归噺鍒犻櫎
+const handleDelete = () => {
+  if (selectedRows.value.length === 0) {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  
+  // 妫�鏌ラ�変腑鐨勮鏄惁閮芥槸"瀹℃牳閫氳繃"鐘舵��
+  const notApprovedRows = selectedRows.value.filter(row => !isApproved(row.status));
+  if (notApprovedRows.length > 0) {
+    proxy.$modal.msgWarning("鍙兘鍒犻櫎瀹℃牳閫氳繃鐨勬暟鎹�");
+    return;
+  }
+  
+  const ids = selectedRows.value.map((item) => item.id);
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      delDeliveryLedger(ids).then((res) => {
+        proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+        getList();
+      });
+    })
+    .catch(() => {
+      proxy.$modal.msg("宸插彇娑�");
+    });
+};
+
+// 鍗曚釜鍒犻櫎
+const handleDeleteSingle = (row) => {
+  // 妫�鏌ユ槸鍚︿负"瀹℃牳閫氳繃"鐘舵��
+  if (!isApproved(row.deliveryLedger)) {
+    proxy.$modal.msgWarning("鍙兘鍒犻櫎瀹℃牳閫氳繃鐨勬暟鎹�");
+    return;
+  }
+  
+  ElMessageBox.confirm("姝ゆ搷浣滃皢鍒犻櫎璇ヨ褰曪紝鏄惁纭锛�", "鍒犻櫎", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      delDeliveryLedger([row.id]).then((res) => {
+        proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+        getList();
+      });
+    })
+    .catch(() => {
+      proxy.$modal.msg("宸插彇娑�");
+    });
+};
+
+// 鍙戣揣绫诲瀷鏍¢獙锛氳揣杞︽椂瑕佹眰杞︾墝锛屽揩閫掓椂瑕佹眰蹇�掑叕鍙�
+const validateShippingCarNumber = (value, callback) => {
+  if (form.value.type === "璐ц溅") {
+    if (!value) return callback(new Error("璇疯緭鍏ュ彂璐ц溅鐗屽彿"));
+  }
+  callback();
+};
+const validateExpressCompany = (value, callback) => {
+  if (form.value.type === "蹇��") {
+    if (!value) return callback(new Error("璇疯緭鍏ュ揩閫掑叕鍙�"));
+  }
+  callback();
+};
+
+// 鍙戣揣鍥剧墖涓婁紶鍓嶆牎妫�
+function handleDeliveryBeforeUpload(file) {
+  // 鏍℃鏂囦欢绫诲瀷
+  const isImage = file.type === 'image/png' || file.type === 'image/jpeg' || file.type === 'image/jpg';
+  if (!isImage) {
+    proxy.$modal.msgError("鍙兘涓婁紶 jpg銆乯peg銆乸ng 鏍煎紡鐨勫浘鐗�!");
+    return false;
+  }
+  // 鏍℃鏂囦欢澶у皬
+  const isLt10M = file.size / 1024 / 1024 < 10;
+  if (!isLt10M) {
+    proxy.$modal.msgError("涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃 10MB!");
+    return false;
+  }
+  proxy.$modal.loading("姝e湪涓婁紶鍥剧墖锛岃绋嶅��...");
+  return true;
+}
+// 鍙戣揣鍥剧墖涓婁紶澶辫触
+function handleDeliveryUploadError(err) {
+  proxy.$modal.msgError("涓婁紶鍥剧墖澶辫触");
+  proxy.$modal.closeLoading();
+}
+// 鍙戣揣鍥剧墖涓婁紶鎴愬姛鍥炶皟
+function handleDeliveryUploadSuccess(res, file, uploadFiles) {
+  proxy.$modal.closeLoading();
+  if (res.code === 200) {
+    file.tempId = res.data.tempId;
+    proxy.$modal.msgSuccess("涓婁紶鎴愬姛");
+  } else {
+    proxy.$modal.msgError(res.msg);
+    proxy.$refs.deliveryFileUpload.handleRemove(file);
+  }
+}
+// 绉婚櫎鍙戣揣鍥剧墖
+function handleDeliveryRemove(file) {
+  console.log('file--', file)
+  // 濡傛灉鏄紪杈戞ā寮忎笖鏂囦欢鏈� id锛岄渶瑕佽皟鐢ㄦ帴鍙e垹闄�
+  if (operationType.value === "edit") {
+    let ids = [];
+    ids.push(file.uid);
+    delLedgerFile(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      // 浠庢枃浠跺垪琛ㄤ腑绉婚櫎
+      const index = deliveryFileList.value.findIndex(item => item.uid === file.uid);
+      if (index > -1) {
+        deliveryFileList.value.splice(index, 1);
+      }
+    }).catch(() => {
+      proxy.$modal.msgError("鍒犻櫎澶辫触");
+    });
+  } else {
+    // 鏂板妯″紡鎴栨病鏈� id 鐨勬枃浠讹紝鐩存帴浠庡垪琛ㄤ腑绉婚櫎
+    const index = deliveryFileList.value.findIndex(item => item.uid === file.uid);
+    if (index > -1) {
+      deliveryFileList.value.splice(index, 1);
+    }
+  }
+}
+
+// 鍙戣揣绫诲瀷鍒囨崲鏃舵竻绌哄搴斿瓧娈�
+const handleShippingTypeChange = (val) => {
+  if (val === "璐ц溅") {
+    form.value.expressCompany = "";
+    form.value.expressNumber = "";
+  } else {
+    form.value.shippingCarNumber = "";
+  }
+};
+
+// 鑾峰彇瀹℃牳鐘舵�佹枃鏈�
+const getApprovalStatusText = (status) => {
+  if (status === null || status === undefined || status === '') {
+    return '寰呭鏍�';
+  }
+  // 濡傛灉鏄暟瀛�
+  if (typeof status === 'number') {
+    const statusMap = {
+      0: '寰呭鏍�',
+      1: '瀹℃牳涓�',
+      2: '瀹℃牳鎷掔粷',
+      3: '瀹℃牳閫氳繃'
+    };
+    return statusMap[status] || '寰呭鏍�';
+  }
+  // 濡傛灉鏄瓧绗︿覆锛岀洿鎺ヨ繑鍥炴垨鏄犲皠
+  const statusStr = String(status).trim();
+  const statusTextMap = {
+    '寰呭鏍�': '寰呭鏍�',
+    '瀹℃牳涓�': '瀹℃牳涓�',
+    '瀹℃牳鎷掔粷': '瀹℃牳鎷掔粷',
+    '瀹℃牳閫氳繃': '瀹℃牳閫氳繃',
+    '0': '寰呭鏍�',
+    '1': '瀹℃牳涓�',
+    '2': '瀹℃牳鎷掔粷',
+    '3': '瀹℃牳閫氳繃'
+  };
+  return statusTextMap[statusStr] || statusStr || '寰呭鏍�';
+};
+
+// 鑾峰彇瀹℃牳鐘舵�佹爣绛剧被鍨嬶紙棰滆壊锛�
+const getApprovalStatusType = (status) => {
+  if (status === null || status === undefined || status === '') {
+    return 'info';
+  }
+  // 濡傛灉鏄暟瀛�
+  if (typeof status === 'number') {
+    const typeMap = {
+      0: 'info',      // 寰呭鏍� - 鐏拌壊
+      1: 'warning',   // 瀹℃牳涓� - 榛勮壊
+      2: 'danger',    // 瀹℃牳鎷掔粷 - 绾㈣壊
+      3: 'success'    // 瀹℃牳閫氳繃 - 缁胯壊
+    };
+    return typeMap[status] || 'info';
+  }
+  // 濡傛灉鏄瓧绗︿覆
+  const statusStr = String(status).trim();
+  const typeTextMap = {
+    '寰呭鏍�': 'info',
+    '瀹℃牳涓�': 'warning',
+    '瀹℃牳鎷掔粷': 'danger',
+    '瀹℃牳閫氳繃': 'success',
+    '0': 'info',
+    '1': 'warning',
+    '2': 'danger',
+    '3': 'success'
+  };
+  return typeTextMap[statusStr] || 'info';
+};
+
+// 妫�鏌ュ鏍哥姸鎬佹槸鍚︿负"瀹℃牳閫氳繃"
+const isApproved = (status) => {
+  if (status === null || status === undefined || status === '') {
+    return false;
+  }
+  // 濡傛灉鏄暟瀛楋紝3 琛ㄧず瀹℃牳閫氳繃
+  if (typeof status === 'number') {
+    return status === 3;
+  }
+  // 濡傛灉鏄瓧绗︿覆
+  const statusStr = String(status).trim();
+  return statusStr === '瀹℃牳閫氳繃' || statusStr === '3';
+};
+
+onMounted(() => {
+  getList();
+});
+</script>
+
+<style scoped lang="scss">
+.table_list {
+  margin-top: unset;
+}
+
+.actions {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 10px;
+}
+
+// 闅愯棌鍥剧墖涓婁紶缁勪欢鐨勯瑙堟寜閽紙鏀惧ぇ闀滐級
+:deep(.el-upload-list--picture-card .el-upload-list__item-actions) {
+  .el-upload-list__item-preview {
+    display: none;
+  }
+}
+</style>
+

--
Gitblit v1.9.3