员工管理-审核管理,列表页面语句调整,增加审核历史接口

This commit is contained in:
曹磊 2026-02-06 16:54:27 +08:00
parent be0282a1e2
commit fd2d25510c
9 changed files with 1331 additions and 83 deletions

View File

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api {
list = '/admin/employeesapply/list',
listPage = '/admin/employeesapply/listPage',
getModifyInfo = '/admin/employeesapply/getModifyInfo',
save = '/admin/employeesapply/add',
edit = '/admin/employeesapply/edit',
@ -14,6 +15,7 @@ enum Api {
exportXls = '/admin/employeesapply/exportXls',
invide = '/admin/employeesapply/invide',
audit = '/admin/employeesapply/audit',
getModifyHistoryInfo = '/admin/employeesapply/getModifyHistoryInfo',
}
/**
@ -32,6 +34,7 @@ export const getImportUrl = Api.importExcel;
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const listPage = (params) => defHttp.get({ url: Api.listPage, params });
/**
@ -98,4 +101,8 @@ export const getModifyInfo = (params) => {
*/
export const auditSubmit = (params) => {
return defHttp.post({ url: Api.audit, params });
};
};
export const getModifyHistoryInfo = (params) => {
return defHttp.post({ url: Api.getModifyHistoryInfo, params });
};

View File

@ -124,14 +124,14 @@ export const applyObj = {
qualification: '资质证',
noCrimeCertificate: '无犯罪证明',
regional: '区域',
delFlag: '是否删除 0未删除 1删除',
delFlag: '是否删除',
createTime: '申请日期',
updateBy: '更新人',
updateTime: '更新日期',
status: '申请状态 1申请中 2通过 3驳回',
status: '申请状态',
auditContent: '审核备注',
izHistory: '是否历史数据',
applyType: '申请类型 0被邀请 1主动申请 2信息变更',
applyType: '申请类型',
startTime: '有效开始日期',
endTime: '有效结束日期',
currentAddress: '现住址',

View File

@ -12,19 +12,18 @@
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="paramsTime">
<template #label><span title="申请日期">申请日期</span></template>
<a-date-picker v-model:value="queryParam.paramsTime" placeholder="请选择申请日期" value-format="YYYY-MM-DD"
allow-clear />
<a-form-item name="tel">
<template #label><span title="电话">电话</span></template>
<JInput v-model:value="queryParam.tel" placeholder="请输入电话" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="status">
<template #label><span title="审核状态">审核状态</span></template>
<a-select v-model:value="queryParam.status" placeholder="请选择审核状态" style="width: 200px" :disabled="false">
<a-select-option value="1">确认</a-select-option>
<a-select-option value="2">申请通过</a-select-option>
<a-select-option value="3">申请驳回</a-select-option>
<a-select-option value="1">审核</a-select-option>
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
@ -56,14 +55,15 @@
</template>
<template v-if="column.dataIndex === 'status'">
<span v-if="record.status == '1'">待审核</span>
<span v-else-if="record.status == '2'">申请通过</span>
<span v-else-if="record.status == '3'">申请驳回</span>
<span v-else-if="record.status == '2'">审核通过</span>
<span v-else-if="record.status == '3'">审核驳回</span>
<span v-else></span>
</template>
</template>
</BasicTable>
<!-- 表单区域 -->
<EmployeesApplyModal ref="registerModal" @success="handleSuccess"></EmployeesApplyModal>
<EmployeesAuditHistoryModal ref="registerHistoryModal" @success="handleSuccess"></EmployeesAuditHistoryModal>
</div>
</template>
@ -72,9 +72,10 @@ import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './EmployeesApply.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './EmployeesApply.api';
import { listPage, deleteOne, batchDelete, getImportUrl, getExportUrl } from './EmployeesApply.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import EmployeesApplyModal from './components/EmployeesApplyModal.vue'
import EmployeesAuditHistoryModal from './EmployeesAuditHistoryModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
@ -82,17 +83,18 @@ const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerHistoryModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '员工申请',
api: list,
title: '员工审批',
api: listPage,
columns,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 140,
width: 240,
fixed: 'right',
},
scroll: { y: '58vh' },
@ -102,7 +104,6 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
pageSizeOptions: ['15', '50', '70', '100'],
},
beforeFetch: async (params) => {
queryParam.applyType = '1,2'
return Object.assign(params, queryParam);
},
},
@ -160,6 +161,14 @@ function handleDetail(record: Recordable) {
registerModal.value.edit(record);
}
/**
* 审核历史详情
*/
function handleHistoryList(record: Recordable) {
registerHistoryModal.value.disableSubmit = true;
registerHistoryModal.value.edit(record);
}
/**
* 成功回调
*/
@ -177,15 +186,19 @@ function getTableAction(record) {
onClick: handleDetail.bind(null, record),
},
{
label: '入驻审核',
label: '员工入驻审核',
onClick: handleEdit.bind(null, record),
ifShow: record.status == 1 && (record.modifyStatus == null || record.modifyStatus == undefined) && record.izHistory == 'N'
},
{
label: '变更审核',
label: '信息变更审核',
onClick: handleUpEdit.bind(null, record),
ifShow: record.status == 1 && record.modifyStatus == 1 && record.izHistory == 'N'
},
{
label: '审核历史',
onClick: handleHistoryList.bind(null, record),
},
];
}

View File

@ -0,0 +1,259 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="name">
<template #label><span title="姓名">姓名</span></template>
<JInput v-model:value="queryParam.name" placeholder="请输入姓名" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="tel">
<template #label><span title="电话">电话</span></template>
<JInput v-model:value="queryParam.tel" placeholder="请输入电话" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="status">
<template #label><span title="审核状态">状态</span></template>
<a-select v-model:value="queryParam.status" placeholder="请选择审核状态" style="width: 200px" :disabled="false">
<a-select-option value="1">待审核</a-select-option>
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" v-auth="'employeesapply:nu_biz_employees_apply:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'dateOfBirth'">
<span>{{ handleComputedAge(text) }}</span>
</template>
<template v-if="column.dataIndex === 'status'">
<span v-if="record.status == '1'">待审核</span>
<span v-else-if="record.status == '2'">申请通过</span>
<span v-else-if="record.status == '3'">申请驳回</span>
<span v-else></span>
</template>
</template>
</BasicTable>
<!-- 表单区域 -->
<EmployeesApplyHistoryModal ref="registerModal" @success="handleSuccess"></EmployeesApplyHistoryModal>
</div>
</template>
<script lang="ts" name="employeesapply-employeesApply" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './EmployeesApply.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './EmployeesApply.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import EmployeesApplyHistoryModal from './components/EmployeesApplyHistoryModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import { useMessage } from '/@/hooks/web/useMessage';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerHistoryModal = ref();
const employeeId = ref<any>('');
const userStore = useUserStore();
const { createMessage } = useMessage();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '员工审批',
api: list,
columns,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 100,
fixed: 'right',
},
// scroll: { y: '58vh' },
// pagination: {
// current: 1,
// pageSize: 15,
// pageSizeOptions: ['15', '50', '70', '100'],
// },
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
// exportConfig: {
// name: "",
// url: getExportUrl,
// params: queryParam,
// },
// importConfig: {
// url: getImportUrl,
// success: handleSuccess
// },
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xxl: 4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 详情
*/
function handleDetail(record: Recordable) {
console.log("🚀 ~ handleDetail ~ record:", record)
if(record.applyType == '2'){
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}else if(record.applyType == '1'){
registerModal.value.disableSubmit = true;
registerModal.value.editDitail(record);
}else{
createMessage.error('错误数据,请联系管员');
}
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 查询
*/
function searchQuery() {
queryParam.employeeId = employeeId.value;
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
searchQuery();
}
function handleComputedAge(ageText) {
//
if (!ageText || typeof ageText !== 'string') {
return NaN;
}
//
const birthDate = new Date(ageText);
// '2025-99-99'
if (isNaN(birthDate.getTime())) {
return NaN;
}
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
const dayDiff = today.getDate() - birthDate.getDate();
// 1
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
age--;
}
return age >= 0 ? age : 0; //
}
//
function init(record) {
console.log("🚀 ~ init ~ record:", record)
employeeId.value = record.employeeId;
searchQuery();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
margin-bottom: 14px;
.table-page-search-submitButtons {
display: block;
margin-bottom: 14px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 14px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style>

View File

@ -0,0 +1,94 @@
<template>
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<EmployeesAuditHistoryList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</EmployeesAuditHistoryList>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import EmployeesAuditHistoryList from './EmployeesAuditHistoryList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<string>('1400');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const upInfoForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = "审核历史";
visible.value = true;
nextTick(() => {
registerForm.value.init(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
/**
* 信息变更确认
*/
function handleUpInfoOk() {
upInfoForm.value.submitForm();
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -0,0 +1,507 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="true">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="EmployeesApplyForm">
<a-row class="card-class">
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<SectionDivider :title="'基本信息'" />
<!-- <span>基本信息</span> -->
</a-col>
<a-col :span="12">
<a-form-item label="姓名" v-bind="validateInfos.name" id="EmployeesApplyForm-name" name="name">
<a-input v-model:value="formData.name" placeholder="请输入姓名" disabled allow-clear></a-input>
<!-- <span>{{ formData.name }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="EmployeesApplyForm-tel" name="tel">
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" disabled allow-clear></a-input>
<!-- <span>{{ formData.tel }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="性别" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
<a-input v-model:value="formData.sex" placeholder="请输入性别" disabled allow-clear></a-input>
<!-- <j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" disabled
allow-clear /> -->
<!-- <span>{{ formData.sex }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="年龄" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
<a-input v-model:value="ageVal" placeholder="请输入年龄" disabled allow-clear></a-input>
<!-- <span> {{ handleComputedAge(formData.dateOfBirth) }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="EmployeesApplyForm-dateOfBirth"
name="dateOfBirth">
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD"
style="width: 100%" disabled allow-clear />
<!-- <span>{{ formData.dateOfBirth }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="民族" v-bind="validateInfos.national" id="EmployeesApplyForm-national" name="national">
<a-input v-model:value="formData.national" placeholder="请输入民族" disabled allow-clear></a-input>
<!-- <span>{{ formData.national }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号">
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" disabled allow-clear></a-input>
<!-- <span>{{ formData.idCard }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="婚否" v-bind="validateInfos.marriedOrNot" id="EmployeesApplyForm-marriedOrNot"
name="marriedOrNot">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not"
placeholder="请选择婚否" disabled allow-clear /> -->
<a-input v-model:value="formData.marriedOrNot" placeholder="请输入婚否" disabled allow-clear></a-input>
<!-- <span>{{ formData.marriedOrNot }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身高(cm)" v-bind="validateInfos.height" id="EmployeesApplyForm-height" name="height">
<a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" disabled />
<!-- <span>{{ formData.height }}cm</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="体重(kg)" v-bind="validateInfos.weight" id="EmployeesApplyForm-weight" name="weight">
<a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" disabled />
<!-- <span>{{ formData.weight }}kg</span> -->
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="是否吸烟" v-bind="validateInfos.isSmoking" id="EmployeesApplyForm-isSmoking"
name="isSmoking">
<j-dict-select-tag type='radio' v-model:value="formData.isSmoking" dictCode="is_smoking"
placeholder="请选择是否吸烟" disabled allow-clear />
<span>{{ formData.isSmoking }}</span>
</a-form-item>
</a-col> -->
<a-col :span="12">
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="EmployeesApplyForm-healthStatus"
name="healthStatus">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" disabled
placeholder="请选择健康状况" allow-clear /> -->
<a-input v-model:value="formData.healthStatus" placeholder="请输入健康状况" style="width: 100%" disabled />
<!-- <span>{{ formData.healthStatus }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance"
id="EmployeesApplyForm-politicalAppearance" name="politicalAppearance">
<!-- <j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" disabled
placeholder="请选择政治面貌" allow-clear /> -->
<a-input v-model:value="formData.politicalAppearance" placeholder="请输入政治面貌" style="width: 100%"
disabled />
<!-- <span>{{ formData.politicalAppearance }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="EmployeesApplyForm-houseAddress"
name="houseAddress">
<a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" disabled allow-clear></a-input>
<!-- <span>{{ formData.houseAddress }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact"
id="EmployeesApplyForm-emergencyContact" name="emergencyContact">
<a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" disabled
allow-clear></a-input>
<!-- <span>{{ formData.emergencyContact }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="紧急联系人电话" v-bind="validateInfos.emergencyTel" id="EmployeesApplyForm-emergencyTel"
name="emergencyTel">
<a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" disabled allow-clear></a-input>
<!-- <span>{{ formData.emergencyTel }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship"
id="EmployeesApplyForm-emergencyRelationship" name="emergencyRelationship">
<a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" disabled
allow-clear></a-input>
<!-- <span>{{ formData.emergencyRelationship }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="户口性质" v-bind="validateInfos.hukouNature" id="EmployeesApplyForm-hukouNature"
name="hukouNature">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" disabled
placeholder="请选择户口性质" allow-clear /> -->
<a-input v-model:value="formData.hukouNature" placeholder="请输入户口性质" disabled allow-clear></a-input>
<!-- <span>{{ formData.hukouNature }}</span> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="现住址" v-bind="validateInfos.currentAddress" id="EmployeesApplyForm-currentAddress"
name="currentAddress">
<a-input v-model:value="formData.currentAddress" placeholder="请输入现住址" disabled allow-clear></a-input>
<!-- <span>{{ formData.currentAddress }}</span> -->
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer>
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
name="EmployeesApplyForm">
<a-row class="card-class">
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<SectionDivider :title="'证件信息'" />
</a-col>
<a-col :span="23" :push="1">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="身份证">
<a-row>
<a-col :span="12">
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive"
id="BizEmployeesInfoForm-idCardPositive" name="idCardPositive">
<j-image-upload v-if="!!formData.idCardPositive" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.idCardPositive" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative"
id="BizEmployeesInfoForm-idCardNegative" name="idCardNegative">
<j-image-upload v-if="!!formData.idCardNegative" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.idCardNegative" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="3" tab="健康证">
<a-row>
<a-col :span="12">
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive"
id="BizEmployeesInfoForm-healthCertificatePositive" name="healthCertificatePositive">
<j-image-upload v-if="!!formData.healthCertificatePositive" :fileMax="1"
:bizPath="`employeesZzxx`" :value="opeMediaAddress + formData.healthCertificatePositive"
disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="健康证反面" v-bind="validateInfos.healthCertificateNegative"
id="BizEmployeesInfoForm-healthCertificateNegative" name="healthCertificateNegative">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.healthCertificateNegative" disabled></j-image-upload>
</a-form-item>
</a-col> -->
</a-row>
</a-tab-pane>
<a-tab-pane key="4" tab="银行卡">
<a-row>
<a-col :span="12">
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive"
id="BizEmployeesInfoForm-bankPositive" name="bankPositive">
<j-image-upload v-if="!!formData.bankPositive" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.bankPositive" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative"
id="BizEmployeesInfoForm-bankNegative" name="bankNegative">
<j-image-upload v-if="!!formData.bankNegative" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.bankNegative" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="5" tab="资质证件">
<a-row>
<a-col :span="24">
<a-form-item label="资质证" v-bind="validateInfos.qualification"
id="BizEmployeesInfoForm-qualification" name="qualification" :labelCol="labelCol3">
<j-image-upload v-if="!!formData.qualification" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.qualification" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="6" tab="无犯罪证明">
<a-row>
<a-col :span="24">
<a-form-item label="无犯罪证明" v-bind="validateInfos.noCrimeCertificate"
id="BizEmployeesInfoForm-noCrimeCertificate" name="noCrimeCertificate" :labelCol="labelCol3">
<j-image-upload v-if="!!formData.noCrimeCertificate" :fileMax="1" :bizPath="`employeesZzxx`"
:value="opeMediaAddress + formData.noCrimeCertificate" disabled></j-image-upload>
<span v-else>未上传</span>
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="EmployeesApplyForm">
<a-row class="card-class">
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<div>
<SectionDivider :title="'审核信息'" />
</div>
</a-col>
<a-col :span="8">
<a-form-item label="审核状态" v-bind="validateInfos.status" id="EmployeesApplyForm-status"
name="status">
<!-- <a-input v-model:value="formData.applyStatus" placeholder="请输入审核状态" ></a-input> -->
<a-select v-model:value="formData.status" placeholder="请选择审核状态" style="width: 200px"
:disabled="false">
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="16" v-show="formData.status == 3">
<a-form-item label="驳回原因" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
name="auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因" rows="4"></a-textarea>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../EmployeesApply.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const activeKey = ref('1')
const ageVal = ref()
const formData = reactive<Record<string, any>>({
id: '',
openId: '',
employeeId: '',
name: '',
sex: '',
national: '',
idCard: '',
tel: '',
dateOfBirth: '',
marriedOrNot: '',
height: undefined,
weight: undefined,
address: '',
isSmoking: '',
healthStatus: '',
houseAddress: '',
politicalAppearance: '',
emergencyContact: '',
emergencyTel: '',
emergencyRelationship: '',
hukouNature: '',
idCardPositive: '',
idCardNegative: '',
healthCertificatePositive: '',
healthCertificateNegative: '',
bankPositive: '',
bankNegative: '',
qualification: '',
noCrimeCertificate: '',
regional: '',
createTime: '',
status: '',
auditContent: '',
applyType: '',
startTime: '',
endTime: '',
currentAddress: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol3 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
ageVal.value = handleComputedAge(record.dateOfBirth)
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
let model = formData;
try {
if (!model.status || model.status == '1') {
createMessage.warning('请选择审核状态');
}
if (model.status == '3' && !model.auditContent) {
createMessage.warning('请填写驳回原因');
}
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
confirmLoading.value = true;
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
function handleComputedAge(ageText) {
//
if (!ageText || typeof ageText !== 'string') {
return NaN;
}
//
const birthDate = new Date(ageText);
// '2025-99-99'
if (isNaN(birthDate.getTime())) {
return NaN;
}
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
const dayDiff = today.getDate() - birthDate.getDate();
// 1
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
age--;
}
return age >= 0 ? age : 0; //
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {}
.card-class {
padding-top: 24px;
padding-bottom: 24px;
padding-left: 14px;
padding-right: 14px;
// background-color: rgba(255, 255, 255, 0.9);
background-color: #fcfdff;
border-radius: 10px;
// box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;
margin-bottom: 14px;
}
</style>

View File

@ -261,54 +261,25 @@
<a-row class="card-class">
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<div>
<SectionDivider :title="'申请审核'" />
<SectionDivider :title="'审核信息'" />
</div>
</a-col>
<a-col :span="12">
<a-form-item :label="formData.applyType == 0 ? '邀请意见' : '审核意见'" v-bind="validateInfos.status"
id="EmployeesApplyForm-status" name="status">
<div v-if="disabled">
<!-- 被邀请 -->
<!-- <div v-if="formData.applyType == 0">
<span v-if="formData.status == 1"><a-input :value="'待确认'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 2"><a-input :value="'已接受'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 3"><a-input :value="'已拒绝'" disabled allow-clear></a-input></span>
</div> -->
<!-- 主动申请 -->
<!-- <div v-if="formData.applyType == 1"> -->
<div>
<span v-if="formData.status == 1"><a-input :value="'待审核'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 2"><a-input :value="'申请通过'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 3"><a-input :value="'申请驳回'" disabled allow-clear></a-input></span>
</div>
</div>
<a-select v-else v-model:value="statusVal" placeholder="请选择审核意见" style="width: 200px" :disabled="false">
<a-select-option value="auditPass">申请通过</a-select-option>
<a-select-option value="auditFaild">申请驳回</a-select-option>
<a-col :span="8">
<a-form-item label="审核状态" v-bind="validateInfos.status" id="EmployeesApplyForm-status"
name="status">
<!-- <a-input v-model:value="formData.applyStatus" placeholder="请输入审核状态" ></a-input> -->
<a-select v-model:value="formData.status" placeholder="请选择审核状态" style="width: 200px"
:disabled="false">
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-show="formData.auditContent || statusVal == 'auditFaild'">
<!-- 被邀请 -->
<div v-if="formData.applyType == 0">
<!-- <a-form-item label="拒绝原因" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
name="auditContent">
<a-textarea v-if="!disabled" :autosize="{ minRows: 3 }" maxlength="50" show-count
v-model:value="formData.auditContent" allow-clear></a-textarea>
<span v-else>{{ formData.auditContent }} </span>
</a-form-item> -->
</div>
<!-- 主动申请 -->
<div v-if="formData.applyType == 1 && formData.status != 2">
<a-form-item label="驳回原因" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
name="auditContent">
<a-textarea v-if="!disabled" :autosize="{ minRows: 3 }" maxlength="50" show-count
v-model:value="formData.auditContent" allow-clear placeholder="请输入驳回原因"></a-textarea>
<!-- <span v-else>{{ formData.auditContent }}</span> -->
<span v-else><a-textarea v-model:value="formData.auditContent" :autosize="{ minRows: 3 }"
placeholder="请输入紧急联系人电话" disabled allow-clear></a-textarea></span>
</a-form-item>
</div>
<a-col :span="16" v-show="formData.status == 3">
<a-form-item label="驳回原因" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
name="auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因" rows="4"></a-textarea>
</a-form-item>
</a-col>
</a-row>
</a-form>
@ -378,7 +349,6 @@ const formData = reactive<Record<string, any>>({
endTime: '',
currentAddress: '',
});
const statusVal = ref('')
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
@ -388,10 +358,11 @@ const labelCol3 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
status: [{ required: true, message: '请选择审核状态!' },],
auditContent: [
{
validator: async (_rule, value) => {
if (statusVal.value === 'auditFaild' && !value) {
if (formData.status === '3' && !value) {
return Promise.reject('请输入驳回原因!');
}
return Promise.resolve();
@ -412,10 +383,6 @@ const disabled = computed(() => {
}
return props.formDisabled;
});
setInterval(() => {
console.log("🌊 ~ disabled:", disabled)
}, 2000)
/**
* 新增
@ -438,14 +405,9 @@ function edit(record) {
tmpData[key] = record[key]
}
})
tmpData.status = null;
//
Object.assign(formData, tmpData);
if (formData.status == '2') {
statusVal.value = 'auditPass'
}
if (formData.status == '3') {
statusVal.value = 'auditFaild'
}
});
}
@ -453,7 +415,14 @@ function edit(record) {
* 提交数据
*/
async function submitForm() {
let model = formData;
try {
if (!model.status || model.status == '1') {
createMessage.warning('请选择审核状态');
}
if (model.status == '3' && !model.auditContent) {
createMessage.warning('请填写驳回原因');
}
//
await validate();
} catch ({ errorFields }) {
@ -465,9 +434,10 @@ async function submitForm() {
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
@ -482,13 +452,7 @@ async function submitForm() {
}
}
}
model.statusVal = statusVal.value
if (!disabled.value) {
if (!statusVal.value) {
createMessage.warning('请选择审批意见');
return;
}
}
confirmLoading.value = true;
await saveOrUpdate(model, isUpdate.value)
.then((res) => {

View File

@ -0,0 +1,294 @@
<template>
<div class="container2">
<a-row>
<a-col :span="24" >
<a-table :dataSource="filteredTableData" :columns="columns" :pagination="false" bordered size="small"
:rowClassName="setRowClassName">
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'd1'">
<span>{{ applyObj[record.d1] }}</span>
</template>
<template v-if="column.dataIndex === 'd2' && isImg(record.d1)">
<JImageUpload v-if="!!record.d2" :fileMax="1" :value="opeMediaAddress + record.d2" disabled>
</JImageUpload>
<span v-else>未上传</span>
</template>
<template v-if="column.dataIndex === 'd3' && isImg(record.d1)">
<JImageUpload v-if="!!record.d3" :fileMax="1" :value="opeMediaAddress + record.d3" disabled>
</JImageUpload>
<span v-else>未上传</span>
</template>
<template
v-if="column.dataIndex === 'd2' && (record.d1 == 'orgProvince' || record.d1 == 'orgCity' || record.d1 == 'orgDistrict')">
<span>{{ provinceOptions[record.d2] }}</span>
</template>
<template
v-if="column.dataIndex === 'd3' && (record.d1 == 'orgProvince' || record.d1 == 'orgCity' || record.d1 == 'orgDistrict')">
<span>{{ provinceOptions[record.d3] }}</span>
</template>
<template v-if="column.dataIndex === 'd2' && record.d1 == 'orgBuildingArea'">
<span>{{ record.d2 }}</span>
</template>
<template v-if="column.dataIndex === 'd3' && record.d1 == 'orgBuildingArea'">
<span>{{ record.d3 }}</span>
</template>
<template v-if="column.dataIndex === 'd2' && record.d1 == 'endTime'">
<span>{{ record.d2 == '9999-12-31' ? '长期' : record.d2 }}</span>
</template>
<template v-if="column.dataIndex === 'd3' && record.d1 == 'endTime'">
<span>{{ record.d3 == '9999-12-31' ? '长期' : record.d3 }}</span>
</template>
</template>
</a-table>
</a-col>
</a-row>
<JFormContainer :disabled="true">
<template #detail>
<a-form style="margin-top: 14px;height: 100px;" ref="formRef" layout="horizontal" :model="formData"
:label-col="labelCol" :wrapper-col="wrapperCol" >
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核状态" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核状态">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, computed, onMounted } from 'vue';
import { Table as ATable, Input, Row, Col, Form } from 'ant-design-vue';
import { applyObj } from '../EmployeesApply.data'
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getModifyHistoryInfo, auditSubmit } from '../EmployeesApply.api';
import { useMessage } from '/@/hooks/web/useMessage';
import { initDictOptions } from '/@/utils/dict';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const AForm = Form;
const AFormItem = Form.Item;
const useForm = Form.useForm;
const { createMessage } = useMessage();
//
const labelCol = { span: 6 }; //
const wrapperCol = { span: 18 }; //
const isImg = (v_) => {
return v_ == 'idCardPositive' || v_ == 'idCardNegative' || v_ == 'healthCertificatePositive' || v_ == 'bankPositive' || v_ == 'bankNegative' || v_ == 'qualification' || v_ == 'noCrimeCertificate'
}
const provinceOptions = ref({})
const formData = reactive<Record<string, any>>({
status: undefined,
auditContent: '',
id: '',
pkId: ''
});
const validatorRules = reactive({
})
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
const tableData = ref([]);
const emit = defineEmits(['ok']);
//
const filteredTableData = computed(() => {
return tableData.value.filter(item =>
item.d1 !== 'id'
&& item.d1 !== 'employeeId'
&& item.d1 !== 'openId'
&& item.d1 !== 'address'
&& item.d1 !== 'isSmoking'
&& item.d1 !== 'healthCertificateNegative'
&& item.d1 !== 'regional'
&& item.d1 !== 'createTime'
&& item.d1 !== 'updateBy'
&& item.d1 !== 'updateTime'
&& item.d1 !== 'modifyStatus'
&& item.d1 !== 'openingBank'
&& item.d1 !== 'bankCard'
&& item.d1 !== 'startTime'
&& item.d1 !== 'endTime'
&& item.d1 !== 'status'
&& item.d1 !== 'auditContent'
&& item.d1 !== 'delFlag'
&& item.d1 !== 'izHistory'
&& item.d1 !== 'applyType'
);
});
const columns = [
{
title: '名称',
dataIndex: 'd1',
key: 'd1',
width: 150,
},
{
title: '变更前',
dataIndex: 'd2',
key: 'd2',
},
{
title: '变更后',
dataIndex: 'd3',
key: 'd3',
}
];
//
const setRowClassName = (record) => {
return record.d2 !== record.d3 && record.d1 !== 'createTime' ? 'highlight-row' : '';
};
const fieldMap = {
id: 'id',
openId: 'openId',
employeeId: 'employeeId',
name: 'name',
sex: 'sex',
national: 'national',
idCard: 'idCard',
tel: 'tel',
dateOfBirth: 'dateOfBirth',
marriedOrNot: 'marriedOrNot',
height: 'height',
weight: 'weight',
address: 'address',
isSmoking: 'isSmoking',
healthStatus: 'healthStatus',
houseAddress: 'houseAddress',
politicalAppearance: 'politicalAppearance',
emergencyContact: 'emergencyContact',
emergencyTel: 'emergencyTel',
emergencyRelationship: 'emergencyRelationship',
hukouNature: 'hukouNature',
idCardPositive: 'idCardPositive',
idCardNegative: 'idCardNegative',
healthCertificatePositive: 'healthCertificatePositive',
healthCertificateNegative: 'healthCertificateNegative',
bankPositive: 'bankPositive',
bankNegative: 'bankNegative',
openingBank: 'openingBank',
bankCard: 'bankCard',
qualification: 'qualification',
noCrimeCertificate: 'noCrimeCertificate',
regional: 'regional',
startTime: 'startTime',
endTime: 'endTime',
currentAddress: 'currentAddress',
};
async function show(record) {
console.log("🌊 ~ show ~ record:", record)
let data = await getModifyHistoryInfo({ id: record.id })
console.log("🌊 ~ show ~ data:", data)
formData.id = record.id
formData.employeeId = record.employeeId
if(record.status == '3'){
formData.status = 'modifyFail'
}else if(record.status == '2'){
formData.status = 'modifyPass'
}
formData.auditContent = record.auditContent
// idpkIdformData
Object.keys(fieldMap).forEach(fieldName => {
const record = data.find(item => item.d1 === fieldName);
if (record) {
formData[fieldName] = record.d3;
}
});
tableData.value = data.map(item => ({
...item,
// null/undefined
d2: item.d2 ?? '',
d3: item.d3 ?? ''
}));
}
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
console.log("🌊 ~ submitForm ~ formData:", formData)
if (formData.startTime) {
formData.startTime = formData.startTime.replace(/-/g, '.');
}
if (formData.endTime) {
formData.endTime = formData.endTime.replace(/-/g, '.');
}
auditSubmit(formData)
.then((res) => {
emit('ok');
})
}
// numberValues
onMounted(async () => {
const dictData = await initDictOptions('sys_category,name,id,first_letter is not null order by code asc', '');
dictData.reduce((prev, next) => {
if (next) {
provinceOptions.value[next['value']] = next['text'] || next['label']
}
return prev;
}, []);
});
defineExpose({
show,
submitForm
});
</script>
<style lang="less" scoped>
.container2 {
// padding: 16px;
}
.antd-modal-form {
// padding: 14px;
}
:deep(.ant-table-cell) {
padding: 8px 12px !important;
}
//
:deep(.highlight-row) {
background-color: #fff1f0 !important; //
}
//
:deep(.ant-form-item) {
// margin-bottom: 16px;
}
:deep(.ant-table-cell-row-hover) {
// border: 1px solid red;
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<EmployeesApplyHistoryForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</EmployeesApplyHistoryForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
<a-drawer :title="title" :width="width" v-model:visible="visibleDetail" :closable="true"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<EmployeesApplyDetailForm ref="registerFormDetail" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</EmployeesApplyDetailForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancelDetail">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import EmployeesApplyHistoryForm from './EmployeesApplyHistoryForm.vue'
import EmployeesApplyDetailForm from './EmployeesApplyDetailForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<string>('800');
const visible = ref<boolean>(false);
const visibleDetail = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const registerFormDetail = ref();
const upInfoForm = ref();
const upInfoVisible = ref<boolean>(false);
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = "审核历史比对";
visible.value = true;
nextTick(() => {
registerForm.value.show(record);
});
}
function editDitail(record) {
title.value = "详情";
visibleDetail.value = true;
nextTick(() => {
registerFormDetail.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
function handleCancelDetail() {
visibleDetail.value = false;
}
/**
* 信息变更确认
*/
function handleUpInfoOk() {
upInfoForm.value.submitForm();
}
defineExpose({
edit,
editDitail,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>