From 7c2cdcbc7f5585b96fba76a07b0e4417a09c4d7e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 02 六月 2026 11:06:10 +0800
Subject: [PATCH] 新疆马铃薯 1.过程检验下载添加3个模版

---
 src/views/officeProcessAutomation/HrManage/staff-archive/components/JobInfoSection.vue |  176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 176 insertions(+), 0 deletions(-)

diff --git a/src/views/officeProcessAutomation/HrManage/staff-archive/components/JobInfoSection.vue b/src/views/officeProcessAutomation/HrManage/staff-archive/components/JobInfoSection.vue
new file mode 100644
index 0000000..be33436
--- /dev/null
+++ b/src/views/officeProcessAutomation/HrManage/staff-archive/components/JobInfoSection.vue
@@ -0,0 +1,176 @@
+<template>
+  <el-card class="form-card" shadow="never">
+    <template #header>
+      <span class="card-title">
+        <span class="card-title-line">|</span>
+        鍦ㄨ亴淇℃伅
+      </span>
+    </template>
+
+    <!-- 绗竴琛岋細鍚堝悓寮�濮� / 鍚堝悓缁撴潫 / 璇曠敤鏈� / 杞 -->
+    <el-row :gutter="24">
+      <el-col :span="6">
+        <el-form-item label="鍏ヨ亴鏃ユ湡" prop="contractStartTime">
+          <el-date-picker
+            v-model="form.contractStartTime"
+            type="date"
+            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            placeholder="璇烽�夋嫨"
+            style="width: 100%"
+            clearable
+            @change="calculateContractTerm"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item
+          label="鍚堝悓缁撴潫鏃ユ湡"
+          prop="contractEndTime"
+          required
+          :rules="[
+            {
+              required: true,
+              message: '璇烽�夋嫨鍚堝悓缁撴潫鏃ユ湡',
+              trigger: 'change',
+            },
+          ]"
+        >
+          <el-date-picker
+            v-model="form.contractEndTime"
+            type="date"
+            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            placeholder="璇烽�夋嫨"
+            style="width: 100%"
+            clearable
+            @change="calculateContractTerm"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="璇曠敤鏈燂紙鏈堬級" prop="probationPeriod">
+          <el-input-number
+            v-model="form.proTerm"
+            :min="0"
+            :max="24"
+            :precision="0"
+            :step="1"
+            style="width: 100%"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="杞鏃ユ湡" prop="positiveDate">
+          <el-date-picker
+            v-model="form.positiveDate"
+            type="date"
+            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            placeholder="璇烽�夋嫨"
+            style="width: 100%"
+            clearable
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    <!-- 绗簩琛岋細閮ㄩ棬 / 宀椾綅 / 鍩烘湰宸ヨ祫 -->
+    <el-row :gutter="24">
+      <el-col :span="8">
+        <el-form-item label="閮ㄩ棬" prop="sysDeptId">
+          <el-tree-select
+            v-model="form.sysDeptId"
+            :data="deptOptions"
+            check-strictly
+            :render-after-expand="false"
+            placeholder="璇烽�夋嫨"
+            style="width: 100%"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="8">
+        <el-form-item label="宀椾綅" prop="sysPostId">
+          <el-select
+            v-model="form.sysPostId"
+            placeholder="璇烽�夋嫨"
+            clearable
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in postOptions"
+              :key="item.postId"
+              :label="item.postName"
+              :value="item.postId"
+              :disabled="item.status === '1'"
+            />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="8">
+        <el-form-item label="鍩烘湰宸ヨ祫" prop="basicSalary">
+          <el-input-number
+            v-model="form.basicSalary"
+            :min="0"
+            :max="999999"
+            :precision="2"
+            :step="100"
+            style="width: 100%"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-card>
+</template>
+
+<script setup>
+import { toRefs } from "vue";
+
+const props = defineProps({
+  form: { type: Object, required: true },
+  postOptions: { type: Array, default: () => [] },
+  deptOptions: { type: Array, default: () => [] },
+});
+
+const { form, postOptions, deptOptions } = toRefs(props);
+
+// 璁$畻鍚堝悓骞撮檺
+const calculateContractTerm = () => {
+  if (form.value.contractStartTime && form.value.contractEndTime) {
+    const startDate = new Date(form.value.contractStartTime);
+    const endDate = new Date(form.value.contractEndTime);
+
+    if (endDate > startDate) {
+      // 璁$畻骞翠唤宸�
+      const yearDiff = endDate.getFullYear() - startDate.getFullYear();
+      const monthDiff = endDate.getMonth() - startDate.getMonth();
+      const dayDiff = endDate.getDate() - startDate.getDate();
+
+      let years = yearDiff;
+
+      // 濡傛灉缁撴潫鏃ユ湡鐨勬湀鏃ュ皬浜庡紑濮嬫棩鏈熺殑鏈堟棩锛屽垯鍑忓幓1骞�
+      if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
+        years = yearDiff - 1;
+      }
+
+      form.value.contractTerm = Math.max(0, years);
+    } else {
+      form.value.contractTerm = 0;
+    }
+  } else {
+    form.value.contractTerm = 0;
+  }
+};
+</script>
+
+<style scoped>
+.form-card {
+  margin-bottom: 16px;
+}
+
+.card-title-line {
+  color: #f56c6c;
+  margin-right: 4px;
+}
+</style>
+

--
Gitblit v1.9.3