From b2c00a52ad093abb024cd6e7be8c06c7748db114 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 09 三月 2026 13:05:17 +0800
Subject: [PATCH] 入库管理:新增原料入库增加入库时间

---
 src/views/personnelManagement/contractManagement/index.vue |   70 +++-------------------------------
 1 files changed, 7 insertions(+), 63 deletions(-)

diff --git a/src/views/personnelManagement/contractManagement/index.vue b/src/views/personnelManagement/contractManagement/index.vue
index 10cd508..1d2aab7 100644
--- a/src/views/personnelManagement/contractManagement/index.vue
+++ b/src/views/personnelManagement/contractManagement/index.vue
@@ -70,15 +70,14 @@
 </template>
 
 <script setup>
-import { Search, UploadFilled } from "@element-plus/icons-vue";
-import { onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick } from "vue";
+import { Search } from "@element-plus/icons-vue";
+import { onMounted, ref } from "vue";
 import FormDia from "@/views/personnelManagement/contractManagement/components/formDia.vue";
 import { ElMessageBox } from "element-plus";
-import { staffOnJobListPage, staffOnJobExportCopy } from "@/api/personnelManagement/employeeRecord.js";
+import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
 import dayjs from "dayjs";
 import { getToken } from "@/utils/auth.js";
 import FilesDia from "./filesDia.vue";
-import axios from "axios";
 const data = reactive({
   searchForm: {
     staffName: "",
@@ -184,7 +183,7 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: 'right',
-    width: 180,
+    width: 120,
     operation: [
       {
         name: "璇︽儏",
@@ -192,21 +191,7 @@
         clickFun: (row) => {
           openForm("edit", row);
         },
-      },
-      {
-        name: "闄勪欢",
-        type: "text",
-        clickFun: (row) => {
-          openFilesFormDia(row);
-        },
-      },
-      {
-        name: "涓嬭浇鍚堝悓",
-        type: "text",
-        clickFun: (row) => {
-          handleDownloadContract(row);
-        },
-      },
+      }
     ],
   },
 ]);
@@ -253,6 +238,7 @@
   tableLoading.value = true;
   const params = { ...searchForm.value, ...page };
   params.entryDate = undefined
+  params.staffState = 1
   staffOnJobListPage(params).then(res => {
     tableLoading.value = false;
     tableData.value = res.data.records
@@ -280,52 +266,10 @@
     type: "warning",
   })
     .then(() => {
-      proxy.download("/staff/staffOnJob/export", {}, "鍚堝悓绠$悊.xlsx");
+      proxy.download("/staff/staffOnJob/export", {staffState: 1}, "鍚堝悓绠$悊.xlsx");
     })
     .catch(() => {
       proxy.$modal.msg("宸插彇娑�");
-    });
-};
-// 涓嬭浇鍚堝悓
-const handleDownloadContract = (row) => {
-  const fileName = `${row.staffName || "鍚堝悓"}鍔冲姩鍚堝悓.docx`;
-  proxy.$modal?.loading?.("姝e湪鐢熸垚鍚堝悓锛岃绋嶅��...");
-  staffOnJobExportCopy({ ...row })
-    .then((res) => {
-      proxy.$modal?.closeLoading?.();
-      if (res?.code === 200 && res?.msg) {
-        const javaApi = proxy.javaApi || import.meta.env.VITE_JAVA_API || "";
-        const downloadPath = res.msg.startsWith("/") ? res.msg : `/${res.msg}`;
-        const downloadUrl = `${javaApi}${downloadPath}`;
-        axios({
-          url: downloadUrl,
-          method: "get",
-          responseType: "blob",
-          headers: { Authorization: "Bearer " + getToken() }
-        })
-          .then((resp) => {
-            const blob = new Blob([resp.data], {
-              type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
-            });
-            const url = window.URL.createObjectURL(blob);
-            const link = document.createElement("a");
-            link.href = url;
-            link.download = fileName;
-            document.body.appendChild(link);
-            link.click();
-            document.body.removeChild(link);
-            window.URL.revokeObjectURL(url);
-          })
-          .catch(() => {
-            proxy.$modal.msgError("鍚堝悓涓嬭浇澶辫触锛岃绋嶅悗閲嶈瘯");
-          });
-      } else {
-        proxy.$modal.msgError(res?.msg || "鍚堝悓鐢熸垚澶辫触");
-      }
-    })
-    .catch(() => {
-      proxy.$modal?.closeLoading?.();
-      proxy.$modal.msgError("鍚堝悓鐢熸垚澶辫触锛岃绋嶅悗閲嶈瘯");
     });
 };
 const upload = reactive({

--
Gitblit v1.9.3