Sfoglia il codice sorgente

feat(系统管理): 员工档案子表完善与合同枚举中文映射

1. 员工状态改用 hr_user_status 字典,新增/编辑、列表、搜索联动;2. 员工档案子表(教育经历、银行卡、社保、证照、奖惩)增删改完善,教育经历为空时用主表旧字段回填;3. 劳动合同列表补充类型/状态/签署状态中文映射与日期格式化;4. 标签宽度调整避免折行。
lihaiting 20 ore fa
parent
commit
b4097ef0b4

+ 3 - 18
src/components/select/organization/components/org-user-edit.vue

@@ -31,20 +31,13 @@
             </el-select>
           </el-form-item>
           <el-form-item label="员工状态:" prop="status">
-            <el-select
+            <DictSelection
+              dictName="员工状态"
               clearable
               class="ele-block"
               v-model="form.status"
               placeholder="请选择员工状态"
-            >
-              <el-option
-                v-for="item in statusOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
+            ></DictSelection>
           </el-form-item>
           <el-form-item label="籍贯:" prop="city">
             <regions-select
@@ -259,14 +252,6 @@
         // 是否是修改
         isUpdate: false,
         city: '',
-        statusOptions: [
-          { value: 1, label: '全职' },
-          { value: 2, label: '兼职' },
-          { value: 3, label: '实习' },
-          { value: 4, label: '正式' },
-          { value: 5, label: '试用' },
-          { value: 6, label: '离职' }
-        ],
         accountList: []
       };
     },

+ 4 - 2
src/enum/dict.js

@@ -89,7 +89,8 @@ export default {
   实验模板样式: 'experiment_template_style',
   表计类型: 'meter_type',
   印章类型: 'main_seal_type',
-  支付类型: 'payment_type'
+  支付类型: 'payment_type',
+  员工状态: 'hr_user_status'
 };
 
 export const numberList = [
@@ -105,7 +106,8 @@ export const numberList = [
   'id_type',
   'rule_status',
   'ledger',
-  'purchase_origin'
+  'purchase_origin',
+  'hr_user_status'
 ];
 //审核状态
 export const reviewStatus = {

File diff suppressed because it is too large
+ 318 - 471
src/views/system/organization/components/org-user-edit.vue


+ 8 - 10
src/views/system/organization/components/org-user-list.vue

@@ -251,6 +251,7 @@
     },
     created() {
       this.requestDict('岗位');
+      this.requestDict('员工状态');
       getFactoryarea({
         pageNum: 1,
         size: 999,
@@ -355,10 +356,10 @@
             sortable: 'custom',
             width: 80,
             formatter: (_row, _column, cellValue) => {
-              const dom = this.statusOptions.find((item) => {
+              const dom = this.statusList.find((item) => {
                 return item.value == cellValue;
               });
-              return dom ? dom.label : '';
+              return dom ? dom.label : _row.statusName || '';
             }
           },
           {
@@ -405,6 +406,11 @@
             showOverflowTooltip: true
           }
         ];
+      },
+      // 员工状态字典(hr_user_status)
+      statusList() {
+        const list = this.getDictListByName('员工状态');
+        return Array.isArray(list) ? list : [];
       }
     },
     data() {
@@ -485,14 +491,6 @@
         current: null,
         // 是否显示编辑弹窗
         showEdit: false,
-        statusOptions: [
-          { value: 1, label: '全职' },
-          { value: 2, label: '兼职' },
-          { value: 3, label: '实习' },
-          { value: 4, label: '正式' },
-          { value: 5, label: '试用' },
-          { value: 6, label: '离职' }
-        ],
         pageSize: this.$store.state.tablePageSize,
         cacheKeyUrl: 'ef00833a-system-organization',
         selection: []

+ 2 - 9
src/views/system/organization/components/org-user-search.vue

@@ -46,15 +46,8 @@
           {
             label: '状态:',
             value: 'status',
-            type: 'select',
-            planList: [
-              { value: 1, label: '全职' },
-              { value: 2, label: '兼职' },
-              { value: 3, label: '实习' },
-              { value: 4, label: '正式' },
-              { value: 5, label: '试用' },
-              { value: 6, label: '离职' }
-            ],
+            type: 'DictSelection',
+            dictName: '员工状态',
             placeholder: '请选择'
           }
         ];

Some files were not shown because too many files changed in this diff