From 04b1a9cfde4049be9a38b9832d5289d4a192c883 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 15 五月 2026 16:29:33 +0800
Subject: [PATCH] 加班申请模块和审批流程公共组件

---
 src/views/procurementManagement/procurementLedger/index.vue |  315 ++++++++++++++++++++++++++++------------------------
 1 files changed, 171 insertions(+), 144 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 55c18db..cffdcc6 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -44,7 +44,8 @@
           </el-form-item>
           <el-form-item>
             <el-button type="primary"
-                       @click="handleQuery"> 鎼滅储 </el-button>
+                       @click="handleQuery"> 鎼滅储
+            </el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -53,11 +54,14 @@
       <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
         <el-button type="primary"
                    @click="openForm('add')">鏂板鍙拌处</el-button>
-        <el-button type="primary" plain @click="handleImport">瀵煎叆</el-button>
+        <el-button type="primary"
+                   plain
+                   @click="handleImport">瀵煎叆</el-button>
         <el-button @click="handleOut">瀵煎嚭</el-button>
         <el-button type="danger"
                    plain
-                   @click="handleDelete">鍒犻櫎</el-button>
+                   @click="handleDelete">鍒犻櫎
+        </el-button>
       </div>
       <el-table :data="tableData"
                 border
@@ -94,7 +98,6 @@
                                prop="availableQuality" />
               <el-table-column label="閫�璐ф暟閲�"
                                prop="returnQuality" />
-                               
               <el-table-column label="绋庣巼(%)"
                                prop="taxRate" />
               <el-table-column label="鍚◣鍗曚环(鍏�)"
@@ -119,11 +122,11 @@
                          show-overflow-tooltip />
         <el-table-column label="閿�鍞悎鍚屽彿"
                          prop="salesContractNo"
-                          width="160"
+                         width="160"
                          show-overflow-tooltip />
         <el-table-column label="渚涘簲鍟嗗悕绉�"
                          prop="supplierName"
-                          width="160"
+                         width="160"
                          show-overflow-tooltip />
         <el-table-column label="椤圭洰鍚嶇О"
                          prop="projectName"
@@ -134,9 +137,8 @@
                          width="100"
                          show-overflow-tooltip>
           <template #default="scope">
-            <el-tag 
-              :type="getApprovalStatusType(scope.row.approvalStatus)"
-              size="small">
+            <el-tag :type="getApprovalStatusType(scope.row.approvalStatus)"
+                    size="small">
               {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
             </el-tag>
           </template>
@@ -174,7 +176,8 @@
             <el-button link
                        type="primary"
                        @click="openForm('edit', scope.row)"
-                       :disabled="scope.row.approvalStatus !== 1 && scope.row.approvalStatus !== 4">缂栬緫</el-button>
+                       :disabled="scope.row.approvalStatus !== 1 && scope.row.approvalStatus !== 4">缂栬緫
+            </el-button>
             <el-button link
                        type="primary"
                        @click="openFileDialog(scope.row)">闄勪欢</el-button>
@@ -189,12 +192,12 @@
                   @pagination="paginationChange" />
     </div>
     <FormDialog v-model="dialogFormVisible"
-               :title="operationType === 'add' ? '鏂板閲囪喘鍙拌处椤甸潰' : '缂栬緫閲囪喘鍙拌处椤甸潰'"
-               :width="'70%'"
-               :operation-type="operationType"
-               @close="closeDia"
-               @confirm="submitForm"
-               @cancel="closeDia">
+                :title="operationType === 'add' ? '鏂板閲囪喘鍙拌处椤甸潰' : '缂栬緫閲囪喘鍙拌处椤甸潰'"
+                :width="'70%'"
+                :operation-type="operationType"
+                @close="closeDia"
+                @confirm="submitForm"
+                @cancel="closeDia">
       <el-form :model="form"
                label-width="140px"
                label-position="top"
@@ -236,7 +239,8 @@
                 <el-option v-for="item in supplierList"
                            :key="item.id"
                            :label="item.supplierName"
-													 :value="item.id" >{{item.supplierName + '---' + item.supplierType}}</el-option>
+                           :value="item.id">{{ item.supplierName + '---' + item.supplierType }}
+                </el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -274,7 +278,15 @@
           <el-col :span="12">
             <el-form-item label="褰曞叆浜猴細"
                           prop="recorderId">
-              <el-input v-model="form.recorderName" placeholder="鑷姩濉厖" disabled />
+              <el-select v-model="form.recorderId"
+                         placeholder="璇烽�夋嫨"
+                         clearable
+                         filterable>
+                <el-option v-for="item in userList"
+                           :key="item.userId"
+                           :label="item.nickName"
+                           :value="item.userId" />
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -294,10 +306,12 @@
           <el-form-item label="浜у搧淇℃伅锛�"
                         prop="entryDate">
             <el-button type="primary"
-                       @click="openProductForm('add')">娣诲姞</el-button>
+                       @click="openProductForm('add')">娣诲姞
+            </el-button>
             <el-button plain
                        type="danger"
-                       @click="deleteProduct">鍒犻櫎</el-button>
+                       @click="deleteProduct">鍒犻櫎
+            </el-button>
           </el-form-item>
           <div class="select-button-group"
                style="width: 500px; margin: 20px 0;"
@@ -321,11 +335,10 @@
                          :value="item.templateName">
                 <div style="display: flex; justify-content: space-between; align-items: center;">
                   <span>{{ item.templateName }}</span>
-                  <el-icon 
-                    v-if="item.id"
-                    class="delete-icon"
-                    @click.stop="handleDeleteTemplate(item)"
-                    style="cursor: pointer; color: #f56c6c; font-size: 14px; margin-left: 8px;">
+                  <el-icon v-if="item.id"
+                           class="delete-icon"
+                           @click.stop="handleDeleteTemplate(item)"
+                           style="cursor: pointer; color: #f56c6c; font-size: 14px; margin-left: 8px;">
                     <Delete />
                   </el-icon>
                 </div>
@@ -397,7 +410,8 @@
             <template #default="scope">
               <el-button link
                          type="primary"
-                         @click="openProductForm('edit', scope.row, scope.$index)">缂栬緫</el-button>
+                         @click="openProductForm('edit', scope.row, scope.$index)">缂栬緫
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -417,52 +431,31 @@
           <el-col :span="24">
             <el-form-item label="闄勪欢鏉愭枡锛�"
                           prop="purchaseLedgerFiles">
-              <el-upload v-model:file-list="fileList"
-                         :action="upload.url"
-                         multiple
-                         ref="fileUpload"
-                         auto-upload
-                         :headers="upload.headers"
-                         :before-upload="handleBeforeUpload"
-                         :on-error="handleUploadError"
-                         :on-success="handleUploadSuccess"
-                         :on-remove="handleRemove">
-                <el-button type="primary">涓婁紶</el-button>
-                <template #tip>
-                  <div class="el-upload__tip">
-                    鏂囦欢鏍煎紡鏀寔
-                    doc锛宒ocx锛寈ls锛寈lsx锛宲pt锛宲ptx锛宲df锛宼xt锛寈ml锛宩pg锛宩peg锛宲ng锛実if锛宐mp锛宺ar锛寊ip锛�7z
-                  </div>
-                </template>
-              </el-upload>
+              <FileUpload v-model:file-list="fileList" />
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </FormDialog>
     <!-- 瀵煎叆寮圭獥 -->
-    <FormDialog
-      v-model="importUpload.open"
-      :title="importUpload.title"
-      :width="'600px'"
-      @close="importUpload.open = false"
-      @confirm="submitImportFile"
-      @cancel="importUpload.open = false"
-    >
-      <el-upload
-        ref="importUploadRef"
-        :limit="1"
-        accept=".xlsx,.xls"
-        :action="importUpload.url"
-        :headers="importUpload.headers"
-        :before-upload="importUpload.beforeUpload"
-        :on-success="importUpload.onSuccess"
-        :on-error="importUpload.onError"
-        :on-progress="importUpload.onProgress"
-        :on-change="importUpload.onChange"
-        :auto-upload="false"
-        drag
-      >
+    <FormDialog v-model="importUpload.open"
+                :title="importUpload.title"
+                :width="'600px'"
+                @close="importUpload.open = false"
+                @confirm="submitImportFile"
+                @cancel="importUpload.open = false">
+      <el-upload ref="importUploadRef"
+                 :limit="1"
+                 accept=".xlsx,.xls"
+                 :action="importUpload.url"
+                 :headers="importUpload.headers"
+                 :before-upload="importUpload.beforeUpload"
+                 :on-success="importUpload.onSuccess"
+                 :on-error="importUpload.onError"
+                 :on-progress="importUpload.onProgress"
+                 :on-change="importUpload.onChange"
+                 :auto-upload="false"
+                 drag>
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">
           灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em>
@@ -470,18 +463,20 @@
         <template #tip>
           <div class="el-upload__tip">
             浠呮敮鎸� xls/xlsx锛屽ぇ灏忎笉瓒呰繃 10MB銆�
-            <el-button link type="primary" @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
+            <el-button link
+                       type="primary"
+                       @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
           </div>
         </template>
       </el-upload>
     </FormDialog>
     <FormDialog v-model="productFormVisible"
-               :title="productOperationType === 'add' ? '鏂板浜у搧' : '缂栬緫浜у搧'"
-               :width="'40%'"
-               :operation-type="productOperationType"
-               @close="closeProductDia"
-               @confirm="submitProduct"
-               @cancel="closeProductDia">
+                :title="productOperationType === 'add' ? '鏂板浜у搧' : '缂栬緫浜у搧'"
+                :width="'40%'"
+                :operation-type="productOperationType"
+                @close="closeProductDia"
+                @confirm="submitProduct"
+                @cancel="closeProductDia">
       <el-form :model="productForm"
                label-width="140px"
                label-position="top"
@@ -536,12 +531,10 @@
                          placeholder="璇烽�夋嫨"
                          clearable
                          @change="mathNum">
-                <el-option label="1"
-                           value="1" />
-                <el-option label="6"
-                           value="6" />
-                <el-option label="13"
-                           value="13" />
+                <el-option v-for="dict in tax_rate"
+                           :key="dict.value"
+                           :label="dict.label"
+                           :value="dict.value" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -640,11 +633,16 @@
         </el-row>
       </el-form>
     </FormDialog>
-    <FileList v-if="fileDialogVisible"  v-model:visible="fileDialogVisible" record-type="purchase_ledger" :record-id="recordId"  />
+    <FileList v-if="fileListDialogVisible"
+              v-model:visible="fileListDialogVisible"
+              record-type="purchase_ledger"
+              :record-id="recordId" />
   </div>
 </template>
 
 <script setup>
+  import FormDialog from "@/components/Dialog/FormDialog.vue";
+  import FileListDialog from "@/components/Dialog/FileListDialog.vue";
   import { getToken } from "@/utils/auth";
   import pagination from "@/components/PIMTable/Pagination.vue";
   import {
@@ -657,8 +655,8 @@
   } from "vue";
   import { Search, Delete } from "@element-plus/icons-vue";
   import { ElMessageBox, ElMessage } from "element-plus";
+  import { userListNoPage } from "@/api/system/user.js";
   import {
-    getSalesLedgerWithProducts,
     addOrUpdateSalesLedgerProduct,
     delProduct,
     delLedgerFile,
@@ -679,18 +677,23 @@
     delPurchaseTemplate,
   } from "@/api/procurementManagement/procurementLedger.js";
   import useFormData from "@/hooks/useFormData.js";
-  const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue"));
+  const FileList = defineAsyncComponent(() =>
+    import("@/components/Dialog/FileList.vue")
+  );
 
   const { proxy } = getCurrentInstance();
+  const { tax_rate } = proxy.useDict("tax_rate");
   const tableData = ref([]);
   const productData = ref([]);
   const selectedRows = ref([]);
   const productSelectedRows = ref([]);
   const modelOptions = ref([]);
+  const userList = ref([]);
   const productOptions = ref([]);
   const salesContractList = ref([]);
   const supplierList = ref([]);
   const tableLoading = ref(false);
+  const fileListDialogVisible = ref(false);
   const page = reactive({
     current: 1,
     size: 100,
@@ -700,6 +703,7 @@
   import useUserStore from "@/store/modules/user";
   import { modelList, productTreeList } from "@/api/basicData/product.js";
   import dayjs from "dayjs";
+  import FileUpload from "@/components/AttachmentUpload/file/index.vue";
 
   const userStore = useUserStore();
 
@@ -712,12 +716,12 @@
   };
 
   // 鑾峰彇瀹℃壒鐘舵�佹爣绛剧被鍨�
-  const getApprovalStatusType = (status) => {
+  const getApprovalStatusType = status => {
     const typeMap = {
-      1: "info",      // 寰呭鏍� - 鐏拌壊
-      2: "warning",   // 瀹℃壒涓� - 姗欒壊
-      3: "success",   // 瀹℃壒閫氳繃 - 缁胯壊
-      4: "danger",    // 瀹℃壒澶辫触 - 绾㈣壊
+      1: "info", // 寰呭鏍� - 鐏拌壊
+      2: "warning", // 瀹℃壒涓� - 姗欒壊
+      3: "success", // 瀹℃壒閫氳繃 - 缁胯壊
+      4: "danger", // 瀹℃壒澶辫触 - 绾㈣壊
     };
     return typeMap[status] || "";
   };
@@ -799,7 +803,8 @@
         form.value.paymentMethod = matchedTemplate.paymentMethod;
       }
       // 妯℃澘鏁版嵁涓殑浜у搧瀛楁鏄� productList锛岄渶瑕佽浆鎹负 productData
-      productData.value = matchedTemplate.productList || matchedTemplate.productData || [];
+      productData.value =
+        matchedTemplate.productList || matchedTemplate.productData || [];
     } else {
       // 鏈尮閰嶅埌宸叉湁妯℃澘锛岃涓烘柊妯℃澘
       currentTemplateId.value = null;
@@ -841,7 +846,6 @@
       salesLedgerId: "",
       projectName: "",
       recorderId: "",
-			recorderName: "",
       entryDate: "",
       productData: [],
       supplierName: "",
@@ -931,7 +935,7 @@
     url: import.meta.env.VITE_APP_BASE_API + "/purchase/ledger/import",
     headers: { Authorization: "Bearer " + getToken() },
     isUploading: false,
-    beforeUpload: (file) => {
+    beforeUpload: file => {
       const isExcel = file.name.endsWith(".xlsx") || file.name.endsWith(".xls");
       const isLt10M = file.size / 1024 / 1024 < 10;
       if (!isExcel) {
@@ -980,7 +984,11 @@
 
   // 涓嬭浇瀵煎叆妯℃澘锛堝鍚庣璺緞涓嶅悓锛屽彲鍦ㄦ澶勮皟鏁达級
   const downloadTemplate = () => {
-    proxy.download("/purchase/ledger/exportTemplate", {}, "閲囪喘鍙拌处瀵煎叆妯℃澘.xlsx");
+    proxy.download(
+      "/purchase/ledger/exportTemplate",
+      {},
+      "閲囪喘鍙拌处瀵煎叆妯℃澘.xlsx"
+    );
   };
 
   const submitImportFile = () => {
@@ -1045,8 +1053,8 @@
     // 妫�鏌ユ槸鍚︽湁浜у搧鏁版嵁
     if (!productData.value || productData.value.length === 0) {
       ElMessage({
-        message: '璇峰厛娣诲姞浜у搧淇℃伅',
-        type: 'warning',
+        message: "璇峰厛娣诲姞浜у搧淇℃伅",
+        type: "warning",
       });
       return;
     }
@@ -1057,11 +1065,15 @@
         supplierId: form.value.supplierId,
         paymentMethod: form.value.paymentMethod,
         recorderId: form.value.recorderId,
-				recorderName: form.value.recorderName,
         projectName: form.value.projectName,
         templateName: templateName.value.trim(),
       };
-      console.log("template params ===>", params, "currentTemplateId:", currentTemplateId.value);
+      console.log(
+        "template params ===>",
+        params,
+        "currentTemplateId:",
+        currentTemplateId.value
+      );
 
       // 濡傛灉 currentTemplateId 鏈夊�硷紝璇存槑褰撳墠鏄�滅紪杈戝凡鏈夋ā鏉库�� 鈫� 璋冪敤鏇存柊鎺ュ彛
       // 鍚﹀垯涓衡�滄柊寤烘ā鏉库�� 鈫� 璋冪敤鏂板鎺ュ彛
@@ -1200,8 +1212,11 @@
         return;
       }
     }
-    
+
     await getTemplateList();
+    await userListNoPage().then(res => {
+      userList.value = res.data;
+    });
     operationType.value = type;
     form.value = {};
     productData.value = [];
@@ -1222,8 +1237,6 @@
         item => item.isWhite === 0
       );
 
-      // 璁剧疆榛樿鍊�
-      form.value.recorderName = userStore.nickName;
       form.value.entryDate = getCurrentDate();
 
       if (type === "add") {
@@ -1244,7 +1257,7 @@
           const purchaseRes = await getPurchaseById({ id: row.id, type: 2 });
           form.value = { ...purchaseRes };
           productData.value = purchaseRes.productData || [];
-          fileList.value = purchaseRes.salesLedgerFiles || [];
+          fileList.value = purchaseRes.storageBlobVOS || [];
         } catch (error) {
           console.error("鍔犺浇閲囪喘鍙拌处鏁版嵁澶辫触:", error);
           proxy.$modal.msgError("鍔犺浇鏁版嵁澶辫触");
@@ -1262,6 +1275,7 @@
       proxy.$modal.msgError("鍔犺浇鍩虹鏁版嵁澶辫触");
     }
   };
+
   // 涓婁紶鍓嶆牎妫�
   function handleBeforeUpload(file) {
     // 鏍℃鏂囦欢澶у皬
@@ -1272,11 +1286,13 @@
     proxy.$modal.loading("姝e湪涓婁紶鏂囦欢锛岃绋嶅��...");
     return true;
   }
+
   // 涓婁紶澶辫触
   function handleUploadError(err) {
     proxy.$modal.msgError("涓婁紶鏂囦欢澶辫触");
     proxy.$modal.closeLoading();
   }
+
   // 涓婁紶鎴愬姛鍥炶皟
   function handleUploadSuccess(res, file, uploadFiles) {
     proxy.$modal.closeLoading();
@@ -1288,6 +1304,7 @@
       proxy.$refs.fileUpload.handleRemove(file);
     }
   }
+
   // 绉婚櫎鏂囦欢
   async function handleRemove(file) {
     if (!file?.id) {
@@ -1309,6 +1326,7 @@
       }
     }
   }
+
   // 鎻愪氦琛ㄥ崟
   const submitForm = () => {
     proxy.$refs["formRef"].validate(valid => {
@@ -1327,11 +1345,7 @@
           proxy.$modal.msgWarning("璇锋坊鍔犱骇鍝佷俊鎭�");
           return;
         }
-        let tempFileIds = [];
-        if (fileList.value.length > 0) {
-          tempFileIds = fileList.value.map(item => item.tempId);
-        }
-        form.value.tempFileIds = tempFileIds;
+        form.value.storageBlobDTOS = fileList.value;
         form.value.type = 2;
 
         // 濡傛灉salesLedgerId涓虹┖锛屽垯涓嶄紶閫抯alesContractNo
@@ -1365,13 +1379,13 @@
     productForm.value = {};
     proxy.resetForm("productFormRef");
     productFormVisible.value = true;
-    
+
     // 鍏堣幏鍙栦骇鍝侀�夐」锛岀‘淇濇暟鎹姞杞藉畬鎴�
     await getProductOptions();
-    
+
     // 绛夊緟 DOM 鏇存柊
     await nextTick();
-    
+
     if (type === "add") {
       productForm.value.isChecked = false;
     }
@@ -1379,7 +1393,7 @@
     if (type === "edit") {
       // 澶嶅埗琛屾暟鎹�
       productForm.value = { ...row };
-      
+
       // 濡傛灉鏄粠妯℃澘鍔犺浇鐨勬暟鎹紝鍙兘娌℃湁 productId 鍜� productModelId
       // 闇�瑕佹牴鎹� productCategory 鍜� specificationModel 鏉ユ煡鎵惧搴旂殑 ID
       if (!productForm.value.productId && productForm.value.productCategory) {
@@ -1390,25 +1404,34 @@
               return nodes[i].value;
             }
             if (nodes[i].children && nodes[i].children.length > 0) {
-              const found = findProductIdByCategory(nodes[i].children, categoryName);
+              const found = findProductIdByCategory(
+                nodes[i].children,
+                categoryName
+              );
               if (found) return found;
             }
           }
           return null;
         };
-        
-        const productId = findProductIdByCategory(productOptions.value, productForm.value.productCategory);
+
+        const productId = findProductIdByCategory(
+          productOptions.value,
+          productForm.value.productCategory
+        );
         if (productId) {
           productForm.value.productId = productId;
           // 鑾峰彇鍨嬪彿鍒楄〃骞剁瓑寰呭畬鎴�
           const modelRes = await modelList({ id: productId });
           modelOptions.value = modelRes;
-          
+
           // 绛夊緟 DOM 鏇存柊
           await nextTick();
-          
+
           // 鏍规嵁 specificationModel 鏌ユ壘 productModelId
-          if (productForm.value.specificationModel && modelOptions.value.length > 0) {
+          if (
+            productForm.value.specificationModel &&
+            modelOptions.value.length > 0
+          ) {
             const modelItem = modelOptions.value.find(
               item => item.model === productForm.value.specificationModel
             );
@@ -1422,15 +1445,15 @@
       } else if (productForm.value.productId) {
         // 濡傛灉鏈� productId锛屾甯稿姞杞藉瀷鍙峰垪琛�
         await getModels(productForm.value.productId);
-        
+
         // 绛夊緟 DOM 鏇存柊
         await nextTick();
-        
+
         if (productForm.value.productModelId) {
           getProductModel(productForm.value.productModelId);
         }
       }
-      
+
       // 鏈�鍚庡啀绛夊緟涓�娆� DOM 鏇存柊锛岀‘淇濇墍鏈夋暟鎹兘宸茶缃�
       await nextTick();
     }
@@ -1479,6 +1502,7 @@
     }
     return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
   };
+
   function convertIdToValue(data) {
     return data.map(item => {
       const { id, children, ...rest } = item;
@@ -1493,6 +1517,7 @@
       return newItem;
     });
   }
+
   // 鎻愪氦浜у搧琛ㄥ崟
   const submitProduct = () => {
     proxy.$refs["productFormRef"].validate(valid => {
@@ -1553,11 +1578,9 @@
           delProduct(ids).then(res => {
             proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
             closeProductDia();
-            getPurchaseById({ id: currentId.value, type: 2 }).then(
-              res => {
-                productData.value = res.productData;
-              }
-            );
+            getPurchaseById({ id: currentId.value, type: 2 }).then(res => {
+              productData.value = res.productData;
+            });
           });
         })
         .catch(() => {
@@ -1588,7 +1611,9 @@
   const handleDelete = () => {
     let ids = [];
     if (selectedRows.value.length > 0) {
-      ids = selectedRows.value.filter(item => item.salesLedgerId === null).map(item => item.id);
+      ids = selectedRows.value
+        .filter(item => item.salesLedgerId === null)
+        .map(item => item.id);
     } else {
       proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
       return;
@@ -1608,6 +1633,7 @@
         proxy.$modal.msg("宸插彇娑�");
       });
   };
+
   // 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
   function getCurrentDate() {
     const today = new Date();
@@ -1616,6 +1642,7 @@
     const day = String(today.getDate()).padStart(2, "0");
     return `${year}-${month}-${day}`;
   }
+
   const mathNum = () => {
     if (!productForm.value.taxRate) {
       proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
@@ -1748,16 +1775,6 @@
     }
   };
 
-  // 鎵撳紑闄勪欢寮圭獥
-  const recordId =ref(0)
-  const fileDialogVisible = ref(false)
-
-  // 鎵撳紑闄勪欢寮规
-  const openFileDialog = async (row) => {
-    recordId.value = row.id
-    fileDialogVisible.value = true
-  }
-
   // 鑾峰彇妯℃澘淇℃伅
   const getTemplateList = async () => {
     let res = await getPurchaseTemplateList();
@@ -1766,13 +1783,19 @@
     }
   };
 
+  // 鎵撳紑闄勪欢寮规
+  const openFileDialog = async row => {
+    recordId.value = row.id;
+    fileListDialogVisible.value = true;
+  };
+
   // 鍒犻櫎妯℃澘
-  const handleDeleteTemplate = async (item) => {
+  const handleDeleteTemplate = async item => {
     if (!item.id) {
       proxy.$modal.msgWarning("鏃犳硶鍒犻櫎璇ユā鏉�");
       return;
     }
-    
+
     try {
       await ElMessageBox.confirm(
         `纭畾瑕佸垹闄ゆā鏉�"${item.templateName}"鍚楋紵`,
@@ -1783,7 +1806,7 @@
           type: "warning",
         }
       );
-      
+
       const res = await delPurchaseTemplate([item.id]);
       if (res && res.code === 200) {
         ElMessage({
@@ -1825,18 +1848,21 @@
     opacity: 0.6;
     background-color: #f5f7fa;
   }
+
   .el-row {
     justify-content: space-between;
     align-items: center;
   }
+
   .no-arrow-select {
     --el-select-suffix-icon-color: transparent; /* 闅愯棌榛樿涓嬫媺绠ご */
   }
+
   .select-button-group {
     display: flex;
     align-items: center;
   }
-  
+
   // 瀹℃壒浜鸿妭鐐瑰鍣ㄦ牱寮�
   .approver-nodes-container {
     display: flex;
@@ -1847,7 +1873,7 @@
     border-radius: 4px;
     border: 1px solid #e4e7ed;
   }
-  
+
   .approver-node-item {
     flex: 0 0 calc(33.333% - 12px);
     min-width: 200px;
@@ -1856,41 +1882,42 @@
     border-radius: 4px;
     border: 1px solid #dcdfe6;
     transition: all 0.3s;
-    
+
     &:hover {
       border-color: #409eff;
       box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
     }
   }
-  
+
   .approver-node-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 8px;
   }
-  
+
   .approver-node-label {
     font-size: 13px;
     font-weight: 500;
     color: #606266;
   }
-  
+
   @media (max-width: 1200px) {
     .approver-node-item {
       flex: 0 0 calc(50% - 8px);
     }
   }
-  
+
   @media (max-width: 768px) {
     .approver-node-item {
       flex: 0 0 100%;
     }
   }
-  
+
   // 鍒犻櫎鍥炬爣鏍峰紡
   .delete-icon {
     transition: all 0.3s;
+
     &:hover {
       color: #f56c6c !important;
       transform: scale(1.2);

--
Gitblit v1.9.3