Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

ljy121 1 gadu atpakaļ
vecāks
revīzija
8fca01007e

+ 7 - 1
client/src/utils/dict.ts

@@ -151,5 +151,11 @@ export enum DICT_TYPE {
   ABILITY_LEVEL = 'ABILITY_LEVEL',
   INVOICE_OUT_STATUS = 'INVOICE_OUT_STATUS',
   INVOICE_TYPE = 'invoice_type',
-  SUBCONTRACT_SING_TYPE = 'subContract_sign_type' //待定
+  SUBCONTRACT_SING_TYPE = 'subContract_sign_type', //待定
+  NATION_TYPE = 'nation_type', //民族
+  HY_TYPES = 'hy_type', //婚姻状况
+  HK_TYPES = 'hk_type', //户口性质
+  POLITY_TYPES = 'polity_type', //政治面貌
+  STAFF_STATE_TYPES = 'staff_state_type',
+  SEX_TYPES = 'sex_type'
 }

+ 1 - 1
client/src/views/OaSystem/attendanceCenter/attendAuth.ts

@@ -259,7 +259,7 @@ export function depSort(arrs: any, childs: any) {
  * @param {Array} attrArr 需要提取的公共属性数组(默认是除了childs的全部属性)(可不写)
  * @returns
  */
-export function arrFlatten(arrs, childs, attrArr) {
+export function arrFlatten(arrs, childs, attrArr = []) {
   let attrList: any = []
   if (!Array.isArray(arrs) && !arrs.length) return []
   if (typeof childs !== 'string') return []

+ 256 - 0
client/src/views/OaSystem/personnelManagement/rchbkPage/common.ts

@@ -0,0 +1,256 @@
+import type { FormRules } from 'element-plus'
+export const form = ref({
+  id: '',
+  nickname: '',
+  userId: '',
+  state: null,
+  zzmm: null,
+  hkxz: null,
+  byxx: '',
+  bysj: '',
+  zgxl: null,
+  major: '',
+  cjgzsj: '',
+  rgssj: '',
+  lzsj: '',
+  sex: null,
+  nation: '',
+  birthday: '',
+  cardid: '',
+  hkszd: '',
+  hyzk: null,
+  mobilePhone: '',
+  zdr: '',
+  jjlxrhm: '',
+  jjlxrxm: '',
+  jjlxrgx: null,
+  ssbm: '',
+  drzw: '',
+  zc: '',
+  zzsj: '',
+  htdqs: '',
+  qdgsid: '',
+  nldj: '',
+  deptName: '',
+  deptId: '',
+  qdgs: '',
+  zdrmc: '',
+  loginName: '',
+  khyh: '',
+  yhzh: '',
+  hz: '',
+  cssl: null,
+  nj: null,
+  htqdsj: '',
+  syq: null,
+  xjzdz: '',
+  familyList: []
+})
+
+export const familyColumns: {
+  title: string
+  key: string
+}[] = [
+  {
+    title: '姓名',
+    key: 'name'
+  },
+  {
+    title: '性别',
+    key: 'xb'
+  },
+  {
+    title: '住址',
+    key: 'zz'
+  },
+  {
+    title: '工作单位',
+    key: 'gzdw'
+  },
+  {
+    title: '联系电话',
+    key: 'lxdh'
+  },
+  {
+    title: '与员工关系',
+    key: 'gx'
+  }
+]
+
+export const rules = reactive<FormRules>({
+  cardid: [
+    {
+      required: true,
+      message: '身份证不能为空!',
+      trigger: 'change'
+    }
+  ],
+  mobilePhone: [
+    {
+      required: true,
+      message: '手机号不能为空!',
+      trigger: 'change'
+    }
+  ],
+  sex: [
+    {
+      required: true,
+      message: '性别不能为空!',
+      trigger: 'change'
+    }
+  ],
+  nation: [
+    {
+      required: true,
+      message: '民族不能为空!',
+      trigger: 'change'
+    }
+  ],
+  birthday: [
+    {
+      required: true,
+      message: '出生日期不能为空!',
+      trigger: 'change'
+    }
+  ],
+  hyzk: [
+    {
+      required: true,
+      message: '婚姻状况不能为空!',
+      trigger: 'change'
+    }
+  ],
+  hkxz: [
+    {
+      required: true,
+      message: '户口性质不能为空!',
+      trigger: 'change'
+    }
+  ],
+  zzmm: [
+    {
+      required: true,
+      message: '政治面貌不能为空!',
+      trigger: 'change'
+    }
+  ],
+  drzw: [
+    {
+      required: true,
+      message: '在岗职位不能为空!',
+      trigger: 'change'
+    }
+  ],
+  state: [
+    {
+      required: true,
+      message: '状态不能为空!',
+      trigger: 'change'
+    }
+  ],
+  cjgzsj: [
+    {
+      required: true,
+      message: '参加工作时间不能为空!',
+      trigger: 'change'
+    }
+  ],
+  htqdsj: [
+    {
+      required: true,
+      message: '合同签订时间不能为空!',
+      trigger: 'change'
+    }
+  ],
+  htdqs: [
+    {
+      required: true,
+      message: '合同到期时间不能为空!',
+      trigger: 'change'
+    }
+  ],
+  rgssj: [
+    {
+      required: true,
+      message: '入职时间不能为空!',
+      trigger: 'change'
+    }
+  ],
+  cssl: [
+    {
+      required: true,
+      message: '初始司龄不能为空!',
+      trigger: 'change'
+    }
+  ],
+  nj: [
+    {
+      required: true,
+      message: '年限不能为空!',
+      trigger: 'change'
+    }
+  ],
+  hkszd: [
+    {
+      required: true,
+      message: '户口所在地不能为空!',
+      trigger: 'change'
+    }
+  ],
+  xjzdz: [
+    {
+      required: true,
+      message: '现居住地址不能为空!',
+      trigger: 'change'
+    }
+  ],
+  byxx: [
+    {
+      required: true,
+      message: '毕业院校不能为空!',
+      trigger: 'change'
+    }
+  ],
+  bysj: [
+    {
+      required: true,
+      message: '毕业时间不能为空!',
+      trigger: 'change'
+    }
+  ],
+  major: [
+    {
+      required: true,
+      message: '专业不能为空!',
+      trigger: 'change'
+    }
+  ],
+  zgxl: [
+    {
+      required: true,
+      message: '最高学历不能为空!',
+      trigger: 'change'
+    }
+  ],
+  jjlxrxm: [
+    {
+      required: true,
+      message: '紧急联系人姓名不能为空!',
+      trigger: 'change'
+    }
+  ],
+  jjlxrhm: [
+    {
+      required: true,
+      message: '紧急联系人电话不能为空!',
+      trigger: 'change'
+    }
+  ],
+  jjlxrgx: [
+    {
+      required: true,
+      message: '紧急联系人关系不能为空!',
+      trigger: 'change'
+    }
+  ]
+})

+ 436 - 11
client/src/views/OaSystem/personnelManagement/rchbkPage/index.vue

@@ -86,10 +86,11 @@
             {{ getDictLabel(DICT_TYPE.ABILITY_LEVEL, scope.row.djcd) }}
           </template>
         </el-table-column>
-        <el-table-column label="操作" width="80" fixed="right">
+        <el-table-column label="操作" width="180" align="center" fixed="right">
           <template #default="scope">
-            <div class="operateBtn" @click="operateClick(scope.row)">
-              <span>查看</span>
+            <div class="operateBtn">
+              <span @click="lookClick(scope.row)">查看</span>
+              <span @click="operateClick(scope.row)" style="margin-left: 20px">报到</span>
             </div>
           </template>
         </el-table-column>
@@ -106,6 +107,324 @@
         />
       </div>
     </div>
+    <el-dialog v-model="dialogVisible" title="入职办理" width="1200px">
+      <div class="dialog_content">
+        <el-form :model="form" ref="formEl" :rules="rules" label-width="120px">
+          <h4 class="title_form">基本信息</h4>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="员工姓名">
+                <el-input v-model="form.nickname" :disabled="true" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="身份证号" prop="cardid">
+                <el-input v-model="form.cardid" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="手机号" prop="mobilePhone">
+                <el-input v-model="form.mobilePhone" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="性别" prop="sex">
+                <el-select v-model="form.sex" style="width: 100%">
+                  <el-option
+                    v-for="item in sexTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="民族" prop="nation">
+                <el-select v-model="form.nation" style="width: 100%">
+                  <el-option
+                    v-for="item in nationTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="出生日期" prop="birthday">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.birthday"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="婚姻状况" prop="hyzk">
+                <el-select v-model="form.hyzk" style="width: 100%">
+                  <el-option
+                    v-for="item in hyTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="户口性质" prop="hkxz">
+                <el-select v-model="form.hkxz" style="width: 100%">
+                  <el-option
+                    v-for="item in hkTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="政治面貌" prop="zzmm">
+                <el-select v-model="form.zzmm" style="width: 100%">
+                  <el-option
+                    v-for="item in polityTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="在岗职位" prop="drzw">
+                <el-select v-model="form.drzw" style="width: 100%">
+                  <el-option
+                    v-for="item in postTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="状态" prop="state">
+                <el-select v-model="form.state" style="width: 100%">
+                  <el-option
+                    v-for="item in staffStateTypes"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="参加工作时间" prop="cjgzsj">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.cjgzsj"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="htqdsj">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.htqdsj"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="合同到期时间" prop="htdqs">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.htdqs"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="入职时间" prop="rgssj">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.rgssj"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="初始司龄(年)" prop="cssl">
+                <el-input v-model="form.cssl" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="年限(天)" prop="nj">
+                <el-input v-model="form.nj" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="户口所在地" prop="hkszd">
+                <el-input v-model="form.hkszd" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="现居住地址" prop="xjzdz">
+                <el-input v-model="form.xjzdz" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="签订公司">
+                <TreeSelectV2
+                  :data="assigneeTree"
+                  :props="{ label: 'name', value: 'id' }"
+                  v-model="form.qdgsid"
+                  :filter-method="filterNodeMethod"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="所属部门">
+                <DeptTree v-model="form.ssbm" placeholder="请选择所属部门" style="width: 100%" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="指导人">
+                <UserOrgTree v-model="form.zdr" placeholder="请选择指导人" style="width: 100%" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="试用期(月)">
+                <el-input v-model="form.syq" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8" />
+          </el-row>
+          <h4 class="title_form">工资卡信息</h4>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="开户银行">
+                <el-input v-model="form.khyh" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="银行卡号">
+                <el-input v-model="form.yhzh" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <h4 class="title_form">教育信息</h4>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="毕业院校" prop="byxx">
+                <el-input v-model="form.byxx" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="毕业时间" prop="bysj">
+                <el-date-picker
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  v-model="form.bysj"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="专业" prop="major">
+                <el-input v-model="form.major" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="最高学历" prop="zgxl">
+                <el-input v-model="form.zgxl" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <h4 class="title_form">紧急联系人信息</h4>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="联系人姓名" prop="jjlxrxm">
+                <el-input v-model="form.jjlxrxm" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="联系人电话" prop="jjlxrhm">
+                <el-input v-model="form.jjlxrhm" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="联系人关系" prop="jjlxrgx">
+                <el-input v-model="form.jjlxrgx" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div class="title_box">
+          <h4 class="title_form">家庭成员信息</h4>
+          <el-button type="primary" @click="addFamilyHandle">新增</el-button>
+        </div>
+        <div class="tableBox">
+          <el-table :data="familyTables" :border="true">
+            <el-table-column
+              v-for="(item, index) in familyColumns"
+              :label="item['title']"
+              :key="index"
+            >
+              <template #default="scope">
+                <el-input v-model="scope.row[item.key]" :disabled="scope.row['disabled']" />
+              </template>
+            </el-table-column>
+            <el-table-column label="操作">
+              <template #default="scope">
+                <div class="operateBtn">
+                  <span @click="saveFamilyHandle(scope.row)">{{
+                    scope.row.disabled ? '编辑' : '保存'
+                  }}</span>
+                  <span
+                    @click="deleteFamilyHandle(scope.row, scope.$index)"
+                    style="margin-left: 20px"
+                  >
+                    删除
+                  </span>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogVisible = false">取消</el-button>
+          <el-button type="primary" @click="submitHandle"> 提交 </el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -119,11 +438,25 @@ import TableLayout from '../../oaViews/layout/TableLayout.vue'
 import { formatDate } from '@/utils/formatTime'
 import * as DeptApi from '@/api/system/dept'
 import { arrFlatten } from '@/views/OaSystem/attendanceCenter/attendAuth'
+import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
+import DeptTree from '@/views/OaSystem/components/DeptTree/index.vue'
+import TreeSelectV2 from '@/components/TreeSelectV2/index.vue'
+import { filterNodeMethod } from '@/utils/tree'
+import { useQuery } from '@tanstack/vue-query'
+import { queryCompanyTree } from '@/service/contract'
+import { form, familyColumns, rules } from './common'
 
 defineOptions({ name: 'RchbkPage' })
 
 const postType = getDictOptions(DICT_TYPE.POST_TYPE)
 const level = getDictOptions(DICT_TYPE.ABILITY_LEVEL)
+const nationTypes = getDictOptions(DICT_TYPE.NATION_TYPE)
+const hyTypes = getDictOptions(DICT_TYPE.HY_TYPES)
+const hkTypes = getDictOptions(DICT_TYPE.HK_TYPES)
+const polityTypes = getDictOptions(DICT_TYPE.POLITY_TYPES)
+const postTypes = getDictOptions(DICT_TYPE.POST_TYPE)
+const staffStateTypes = getDictOptions(DICT_TYPE.STAFF_STATE_TYPES)
+const sexTypes = getDictOptions(DICT_TYPE.SEX_TYPES)
 
 const router = useRouter()
 
@@ -145,11 +478,6 @@ const formData = ref<{
   djcd: ''
 })
 
-// 部门切换时
-const deptOnChange = (id) => {
-  formData.value.deptId = id
-}
-
 const loading = ref(true) // 列表的加载中
 const total = ref(0) // 列表的总页数
 const list = ref([]) // 列表的数
@@ -162,15 +490,21 @@ const initTreeDeps = async () => {
   })
 }
 
+/***
+ * 查询受托方数据
+ * **/
+const { data: assigneeTree } = useQuery(['assigneeTree'], async () => await queryCompanyTree(), {
+  staleTime: Infinity
+})
 /** 查询列表 */
 const queryListByPage = async () => {
   loading.value = true
   try {
     const urlApi = `/interview/page`
     const sendData = {
-      ...formData
+      ...formData.value
     }
-    const result = await request.get({ url: urlApi, params: sendData._rawValue }, '/business')
+    const result = await request.get({ url: urlApi, params: sendData }, '/business')
     list.value = result['list']
     total.value = result['total']
     loading.value = false
@@ -179,7 +513,7 @@ const queryListByPage = async () => {
   }
 }
 
-const operateClick = (row: any) => {
+const lookClick = (row: any) => {
   router.push({
     path: '/processLook',
     query: {
@@ -190,7 +524,63 @@ const operateClick = (row: any) => {
     }
   })
 }
+const dialogVisible = ref<boolean>(false)
+const operateClick = (row: any) => {
+  dialogVisible.value = true
+  form.value.userId = row.userId
+  form.value.nickname = row.nickname
+}
+const formEl = ref<any>(null)
+const submitHandle = async () => {
+  await formEl.value.validate((valid, fields) => {
+    if (valid) {
+      console.log('submit!')
+      insertStaffRecords()
+    } else {
+      console.log('error submit!', fields)
+    }
+  })
+}
+/** 新增入职人员 */
+const insertStaffRecords = async () => {
+  try {
+    const urlApi = `/adm/staff-records/insert`
+    form.value.familyList = familyTables.value as never[]
+    const result = await request.post({ url: urlApi, data: form.value })
+    dialogVisible.value = false
+    queryListByPage()
+  } catch (error) {
+    loading.value = false
+  }
+}
 
+interface FamilyType {
+  name: string
+  xb: string
+  gzdw: string
+  zz: string
+  lxdh: string
+  gx: string
+  disabled: boolean
+}
+const familyTables = ref<FamilyType[]>([])
+const addFamilyHandle = () => {
+  familyTables.value.push({
+    name: '',
+    xb: '',
+    gzdw: '',
+    zz: '',
+    lxdh: '',
+    gx: '',
+    disabled: false
+  })
+}
+const saveFamilyHandle = (item) => {
+  item.disabled = !item.disabled
+}
+const deleteFamilyHandle = (item, index) => {
+  familyTables.value.splice(index, 1)
+}
 /** 搜索按钮操作 */
 const onSearchHandle = (): void => {
   queryListByPage()
@@ -207,3 +597,38 @@ onMounted(() => {
   queryListByPage()
 })
 </script>
+
+<style lang="scss" scoped>
+.dialog_content {
+  padding: 0px 20px;
+}
+.title_box {
+  display: flex;
+  justify-content: space-between;
+}
+.title_form {
+  font-size: 18px;
+  margin-bottom: 15px;
+}
+.operateBtn {
+  display: flex;
+  cursor: pointer;
+  align-items: center;
+  justify-content: center;
+  width: auto !important;
+  span {
+    color: #2e77e6;
+    white-space: nowrap;
+  }
+}
+.tableBox {
+  :deep(.el-input.is-disabled .el-input__wrapper) {
+    background: none !important;
+    box-shadow: none !important;
+  }
+  :deep(.el-input.is-disabled .el-input__inner) {
+    color: #333 !important;
+    -webkit-text-fill-color: #333 !important;
+  }
+}
+</style>

+ 2 - 3
zjugis-business/src/main/java/com/zjugis/business/flow/resign/service/impl/ResignServiceImpl.java

@@ -38,8 +38,7 @@ import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import static com.zjugis.business.enums.ErrorCodeConstants.REGULAR_NOT_EXISTS;
-import static com.zjugis.business.enums.ErrorCodeConstants.RESIGN_NOT_EXISTS;
+import static com.zjugis.business.enums.ErrorCodeConstants.*;
 import static com.zjugis.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
 
@@ -114,7 +113,7 @@ public class ResignServiceImpl implements ResignService {
     public void update(ResignPageReqVO vo) {
         validateExists(vo.getId());
         if(CollectionUtil.isEmpty(vo.getFinishedList()) || CollectionUtil.isEmpty(vo.getUnfinishedList())){
-            throw exception(RESIGN_NOT_EXISTS);
+            throw exception(RESIGN_DETAIL_NOT_EXISTS);
         }
         ResignDO resignDO = ResignConvert.INSTANCE.convert(vo);
         resignDAO.updateById(resignDO);