员工申请加入机构流程
This commit is contained in:
parent
4a08dd6007
commit
5d20fd2669
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<div class="section-divider">
|
||||
<!-- 左侧灰色横线 -->
|
||||
<!-- <div class="left-line"></div> -->
|
||||
<img src="./section.svg" class="divider-icon" />
|
||||
<!-- 标题文字 -->
|
||||
<div class="divider-content">
|
||||
<slot>{{ title }}</slot>
|
||||
</div>
|
||||
<!-- 右侧灰色横线 -->
|
||||
<!-- <div class="right-line"></div> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "SectionDivider",
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: "分组标题",
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.section-divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px 0 30px 20px;
|
||||
}
|
||||
|
||||
/* 蓝色竖线(带圆角) */
|
||||
.divider-line {
|
||||
width: 4px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background-color: #1890ff;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* 标题文字 */
|
||||
.divider-content {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行影响横线对齐 */
|
||||
}
|
||||
|
||||
/* SVG 图标样式 */
|
||||
.divider-icon {
|
||||
width: 18px;
|
||||
/* 与原来蓝色竖线宽度一致 */
|
||||
height: auto;
|
||||
/* 与原来高度一致 */
|
||||
margin-right: 6px;
|
||||
/* 与文字的间距 */
|
||||
}
|
||||
|
||||
/* 左侧灰色横线 */
|
||||
.left-line {
|
||||
width: 20px; /* 宽度20px */
|
||||
height: 1px;
|
||||
background-color: #ddd; /* 灰色 */
|
||||
margin-right: 8px; /* 与蓝色竖线的间距 */
|
||||
}
|
||||
|
||||
/* 右侧灰色横线 */
|
||||
.right-line {
|
||||
width: 60px; /* 宽度50px */
|
||||
height: 1px;
|
||||
background-color: #ddd; /* 灰色 */
|
||||
margin-left: 8px; /* 与文字的间距 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749108734478" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35558" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M153.6 337.92v563.2c0 15.36 20.48 25.6 30.72 15.36l317.44-225.28c5.12-5.12 15.36-5.12 25.6 0l312.32 225.28c15.36 10.24 30.72 0 30.72-15.36v-563.2c0-30.72-25.6-56.32-51.2-56.32H204.8c-25.6 0-51.2 25.6-51.2 56.32z m0-56.32M839.68 204.8H184.32c-15.36 0-30.72-15.36-30.72-30.72v-40.96c0-20.48 15.36-30.72 30.72-30.72h655.36c15.36 0 30.72 10.24 30.72 30.72v40.96c0 15.36-15.36 30.72-30.72 30.72z" p-id="35559" fill="#018FFB"></path></svg>
|
||||
|
After Width: | Height: | Size: 767 B |
|
|
@ -6,6 +6,9 @@ import AIcon from '/@/components/jeecg/AIcon.vue';
|
|||
|
||||
import { Button, JUploadButton } from './Button';
|
||||
|
||||
// 表单分栏标题组件
|
||||
import SectionDivider from '/@/components/SectionDivider/SectionDivider.vue';
|
||||
|
||||
// 按需注册antd的组件
|
||||
import {
|
||||
// Need
|
||||
|
|
@ -69,6 +72,8 @@ export function registerGlobComp(app: App) {
|
|||
|
||||
//仪表盘依赖Tinymce,需要提前加载(没办法按需加载了)
|
||||
app.component(Editor.name, Editor);
|
||||
//表单分栏标题组件
|
||||
app.component('SectionDivider',SectionDivider);
|
||||
// update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】Tinymce异步加载
|
||||
// app.component(
|
||||
// 'Tinymce',
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const render = {
|
|||
renderImage: ({ text }) => {
|
||||
if (!text) {
|
||||
return h(Image, {
|
||||
width: 30,
|
||||
width: 'auto',
|
||||
height: 30,
|
||||
src: '',
|
||||
fallback:
|
||||
|
|
@ -75,7 +75,7 @@ const render = {
|
|||
avatarList.map((item) => {
|
||||
return h(Image, {
|
||||
src: getFileAccessHttpUrl(item),
|
||||
width: 30,
|
||||
width: 'auto',
|
||||
height: 30,
|
||||
style: { marginRight: '5px' },
|
||||
previewMask: () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/admin/employeesAdvisoryInfo/list',
|
||||
save = '/admin/employeesAdvisoryInfo/add',
|
||||
edit = '/admin/employeesAdvisoryInfo/edit',
|
||||
deleteOne = '/admin/employeesAdvisoryInfo/delete',
|
||||
deleteBatch = '/admin/employeesAdvisoryInfo/deleteBatch',
|
||||
importExcel = '/admin/employeesAdvisoryInfo/importExcel',
|
||||
exportXls = '/admin/employeesAdvisoryInfo/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
};
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
import { BasicColumn } from '/@/components/Table';
|
||||
import { FormSchema } from '/@/components/Table';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
import { JVxeTypes, JVxeColumn, JVxeTableInstance } from '/@/components/jeecg/JVxeTable/types';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
align: 'center',
|
||||
dataIndex: 'tel',
|
||||
},
|
||||
{
|
||||
title: '入驻时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: 'center',
|
||||
dataIndex: 'sex',
|
||||
},
|
||||
{
|
||||
title: '民族',
|
||||
align: 'center',
|
||||
dataIndex: 'national',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '出生日期',
|
||||
align: 'center',
|
||||
dataIndex: 'birthDate',
|
||||
customRender: ({ text }) => {
|
||||
text = !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
|
||||
return text;
|
||||
},
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '住址',
|
||||
align: 'center',
|
||||
dataIndex: 'idCardAddress',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
align: 'center',
|
||||
dataIndex: 'idCard',
|
||||
},
|
||||
{
|
||||
title: '婚否',
|
||||
align: 'center',
|
||||
dataIndex: 'maritalStatus',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身高',
|
||||
align: 'center',
|
||||
dataIndex: 'height',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '体重',
|
||||
align: 'center',
|
||||
dataIndex: 'weight',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '健康状况',
|
||||
align: 'center',
|
||||
dataIndex: 'healthStatus',
|
||||
},
|
||||
{
|
||||
title: '政治面貌',
|
||||
align: 'center',
|
||||
dataIndex: 'politicalAppearance',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '紧急联系人姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'contactName',
|
||||
},
|
||||
{
|
||||
title: '紧急联系人电话',
|
||||
align: 'center',
|
||||
dataIndex: 'contactTel',
|
||||
},
|
||||
{
|
||||
title: '健康证正面',
|
||||
align: 'center',
|
||||
dataIndex: 'healthZmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '健康证反面',
|
||||
align: 'center',
|
||||
dataIndex: 'healthFmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '资质证',
|
||||
align: 'center',
|
||||
dataIndex: 'qualificationPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '无犯罪正面',
|
||||
align: 'center',
|
||||
dataIndex: 'noCrimeCertificate',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
tel: { title: '联系电话', order: 0, view: 'text', type: 'string' },
|
||||
status: { title: '状态', order: 1, view: 'text', type: 'string' },
|
||||
content: { title: '审核备注', order: 2, view: 'text', type: 'string' },
|
||||
izEntry: { title: '机构是否入驻', order: 3, view: 'text', type: 'string' },
|
||||
name: { title: '咨询人姓名', order: 4, view: 'text', type: 'string' },
|
||||
sex: { title: '性别', order: 5, view: 'text', type: 'string' },
|
||||
national: { title: '民族', order: 6, view: 'text', type: 'string' },
|
||||
birthDate: { title: '出生日期', order: 7, view: 'date', type: 'string' },
|
||||
idCardAddress: { title: '住址', order: 8, view: 'text', type: 'string' },
|
||||
idCard: { title: '身份证号', order: 9, view: 'text', type: 'string' },
|
||||
issuingAuthority: { title: '签发机关', order: 10, view: 'text', type: 'string' },
|
||||
startTime: { title: '有效开始日期', order: 11, view: 'date', type: 'string' },
|
||||
endTime: { title: '有效结束日期', order: 12, view: 'date', type: 'string' },
|
||||
cardZmPath: { title: '身份证正面', order: 13, view: 'image', type: 'string' },
|
||||
cardFmPath: { title: '身份证反面', order: 14, view: 'image', type: 'string' },
|
||||
maritalStatus: { title: '婚否', order: 15, view: 'text', type: 'string' },
|
||||
height: { title: '身高', order: 16, view: 'text', type: 'string' },
|
||||
weight: { title: '体重', order: 17, view: 'text', type: 'string' },
|
||||
healthStatus: { title: '健康状况', order: 18, view: 'text', type: 'string' },
|
||||
politicalAppearance: { title: '政治面貌', order: 19, view: 'text', type: 'string' },
|
||||
contactName: { title: '紧急联系人姓名', order: 20, view: 'text', type: 'string' },
|
||||
contactTel: { title: '紧急联系人电话', order: 21, view: 'text', type: 'string' },
|
||||
contactRelationship: { title: '紧急联系人与本人关系', order: 22, view: 'text', type: 'string' },
|
||||
hukouType: { title: '户口性质', order: 23, view: 'text', type: 'string' },
|
||||
bankZmPath: { title: '银行卡正面', order: 24, view: 'image', type: 'string' },
|
||||
bankFmPath: { title: '银行卡反面', order: 25, view: 'image', type: 'string' },
|
||||
openingBank: { title: '开户行', order: 26, view: 'text', type: 'string' },
|
||||
bankCard: { title: '银行卡号', order: 27, view: 'text', type: 'string' },
|
||||
healthZmPath: { title: '健康证正面', order: 28, view: 'image', type: 'string' },
|
||||
healthFmPath: { title: '健康证反面', order: 29, view: 'image', type: 'string' },
|
||||
qualificationPath: { title: '资质证(可多张)', order: 30, view: 'image', type: 'string' },
|
||||
noCrimeCertificate: { title: '无犯罪正面', order: 31, view: 'image', type: 'string' },
|
||||
};
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
<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" />
|
||||
</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" />
|
||||
</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>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<NuEmployeesAdvisoryInfoModal ref="registerModal" @success="handleSuccess"></NuEmployeesAdvisoryInfoModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuEmployeesAdvisoryInfo-nuEmployeesAdvisoryInfo" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './NuEmployeesAdvisoryInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuEmployeesAdvisoryInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuEmployeesAdvisoryInfoModal from './components/NuEmployeesAdvisoryInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '员工咨询信息',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
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,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
// {
|
||||
// label: '审核',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// ifShow: record.status == '1'
|
||||
// },
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'nuEmployeesAdvisoryInfo:nu_employees_advisory_info:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
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: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,352 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuEmployeesAdvisoryInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="NuEmployeesAdvisoryInfoForm-cardZmPath" name="cardZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="NuEmployeesAdvisoryInfoForm-cardFmPath" name="cardFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="咨询人姓名" v-bind="validateInfos.name" id="NuEmployeesAdvisoryInfoForm-name" name="name">
|
||||
<!-- <a-input v-model:value="formData.name" placeholder="请输入咨询人姓名" allow-clear disabled ></a-input> -->
|
||||
{{formData.name}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="NuEmployeesAdvisoryInfoForm-sex" name="sex">
|
||||
<!-- <a-input v-model:value="formData.sex" placeholder="请输入性别" allow-clear disabled ></a-input> -->
|
||||
{{formData.sex}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="NuEmployeesAdvisoryInfoForm-national" name="national">
|
||||
<!-- <a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear disabled ></a-input> -->
|
||||
{{formData.national}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.birthDate" id="NuEmployeesAdvisoryInfoForm-birthDate" name="birthDate">
|
||||
<!-- <a-date-picker placeholder="请选择出生日期" v-model:value="formData.birthDate" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{formData.birthDate}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="住址" v-bind="validateInfos.idCardAddress" id="NuEmployeesAdvisoryInfoForm-idCardAddress" name="idCardAddress">
|
||||
<!-- <a-input v-model:value="formData.idCardAddress" placeholder="请输入住址" allow-clear disabled ></a-input> -->
|
||||
{{formData.idCardAddress}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="NuEmployeesAdvisoryInfoForm-idCard" name="idCard">
|
||||
<!-- <a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear disabled ></a-input> -->
|
||||
{{formData.idCard}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="签发机关" v-bind="validateInfos.issuingAuthority" id="NuEmployeesAdvisoryInfoForm-issuingAuthority" name="issuingAuthority">
|
||||
<!-- <a-input v-model:value="formData.issuingAuthority" placeholder="请输入签发机关" allow-clear disabled ></a-input> -->
|
||||
{{formData.issuingAuthority}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效开始日期" v-bind="validateInfos.startTime" id="NuEmployeesAdvisoryInfoForm-startTime" name="startTime">
|
||||
<!-- <a-date-picker placeholder="请选择有效开始日期" v-model:value="formData.startTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{formData.startTime}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效结束日期" v-bind="validateInfos.endTime" id="NuEmployeesAdvisoryInfoForm-endTime" name="endTime">
|
||||
<!-- <a-date-picker placeholder="请选择有效结束日期" v-model:value="formData.endTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{formData.endTime}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="NuEmployeesAdvisoryInfoForm-tel" name="tel">
|
||||
<!-- <a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear disabled ></a-input> -->
|
||||
{{formData.tel}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'其他信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="婚否" v-bind="validateInfos.maritalStatus" id="NuEmployeesAdvisoryInfoForm-maritalStatus" name="maritalStatus">
|
||||
<!-- <a-input v-model:value="formData.maritalStatus" placeholder="请输入婚否" allow-clear disabled ></a-input> -->
|
||||
{{formData.maritalStatus}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="NuEmployeesAdvisoryInfoForm-height" name="height">
|
||||
<!-- <a-input v-model:value="formData.height" placeholder="请输入身高" allow-clear disabled ></a-input> -->
|
||||
{{formData.height}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="NuEmployeesAdvisoryInfoForm-weight" name="weight">
|
||||
<!-- <a-input v-model:value="formData.weight" placeholder="请输入体重" allow-clear disabled ></a-input> -->
|
||||
{{formData.weight}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="NuEmployeesAdvisoryInfoForm-healthStatus" name="healthStatus">
|
||||
<!-- <a-input v-model:value="formData.healthStatus" placeholder="请输入健康状况" allow-clear disabled ></a-input> -->
|
||||
{{formData.healthStatus}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance" id="NuEmployeesAdvisoryInfoForm-politicalAppearance" name="politicalAppearance">
|
||||
<!-- <a-input v-model:value="formData.politicalAppearance" placeholder="请输入政治面貌" allow-clear disabled ></a-input> -->
|
||||
{{formData.politicalAppearance}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouType" id="NuEmployeesAdvisoryInfoForm-hukouType" name="hukouType">
|
||||
<!-- <a-input v-model:value="formData.hukouType" placeholder="请输入户口性质" allow-clear disabled ></a-input> -->
|
||||
{{formData.hukouType}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'联系人信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人姓名" v-bind="validateInfos.contactName" id="NuEmployeesAdvisoryInfoForm-contactName" name="contactName">
|
||||
<!-- <a-input v-model:value="formData.contactName" placeholder="请输入紧急联系人姓名" allow-clear disabled ></a-input> -->
|
||||
{{formData.contactName}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人电话" v-bind="validateInfos.contactTel" id="NuEmployeesAdvisoryInfoForm-contactTel" name="contactTel">
|
||||
<!-- <a-input v-model:value="formData.contactTel" placeholder="请输入紧急联系人电话" allow-clear disabled ></a-input> -->
|
||||
{{formData.contactTel}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="与本人关系" v-bind="validateInfos.contactRelationship" id="NuEmployeesAdvisoryInfoForm-contactRelationship" name="contactRelationship">
|
||||
<!-- <a-input v-model:value="formData.contactRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear disabled ></a-input> -->
|
||||
{{formData.contactRelationship}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'银行卡信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡正面" v-bind="validateInfos.bankZmPath" id="NuEmployeesAdvisoryInfoForm-bankZmPath" name="bankZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡反面" v-bind="validateInfos.bankFmPath" id="NuEmployeesAdvisoryInfoForm-bankFmPath" name="bankFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开户行" v-bind="validateInfos.openingBank" id="NuEmployeesAdvisoryInfoForm-openingBank" name="openingBank">
|
||||
<!-- <a-input v-model:value="formData.openingBank" placeholder="请输入开户行" allow-clear disabled ></a-input> -->
|
||||
{{formData.openingBank}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡号" v-bind="validateInfos.bankCard" id="NuEmployeesAdvisoryInfoForm-bankCard" name="bankCard">
|
||||
<!-- <a-input v-model:value="formData.bankCard" placeholder="请输入银行卡号" allow-clear disabled ></a-input> -->
|
||||
{{formData.bankCard}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'证件信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthZmPath" id="NuEmployeesAdvisoryInfoForm-healthZmPath" name="healthZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证反面" v-bind="validateInfos.healthFmPath" id="NuEmployeesAdvisoryInfoForm-healthFmPath" name="healthFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资质证" v-bind="validateInfos.qualificationPath" id="NuEmployeesAdvisoryInfoForm-qualificationPath" name="qualificationPath">
|
||||
<j-image-upload :fileMax="0" text="无" v-model:value="formData.qualificationPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="无犯罪正面" v-bind="validateInfos.noCrimeCertificate" id="NuEmployeesAdvisoryInfoForm-noCrimeCertificate" name="noCrimeCertificate">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.noCrimeCertificate" disabled ></j-image-upload>
|
||||
</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 JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../NuEmployeesAdvisoryInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
tel: '',
|
||||
name: '',
|
||||
sex: '',
|
||||
national: '',
|
||||
birthDate: '',
|
||||
idCardAddress: '',
|
||||
idCard: '',
|
||||
issuingAuthority: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
cardZmPath: '',
|
||||
cardFmPath: '',
|
||||
maritalStatus: '',
|
||||
height: '',
|
||||
weight: '',
|
||||
healthStatus: '',
|
||||
politicalAppearance: '',
|
||||
contactName: '',
|
||||
contactTel: '',
|
||||
contactRelationship: '',
|
||||
hukouType: '',
|
||||
bankZmPath: '',
|
||||
bankFmPath: '',
|
||||
openingBank: '',
|
||||
bankCard: '',
|
||||
healthZmPath: '',
|
||||
healthFmPath: '',
|
||||
qualificationPath: '',
|
||||
noCrimeCertificate: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 12 } });
|
||||
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) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
|
||||
<a-drawer :title="title" :width="`70vw`" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<NuEmployeesAdvisoryInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuEmployeesAdvisoryInfoForm>
|
||||
<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 NuEmployeesAdvisoryInfoForm from './NuEmployeesAdvisoryInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70vw');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/admin/employeesapply/list',
|
||||
save = '/admin/employeesapply/add',
|
||||
edit = '/admin/employeesapply/edit',
|
||||
deleteOne = '/admin/employeesapply/delete',
|
||||
deleteBatch = '/admin/employeesapply/deleteBatch',
|
||||
importExcel = '/admin/employeesapply/importExcel',
|
||||
exportXls = '/admin/employeesapply/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
};
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
dataIndex: 'name'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: "center",
|
||||
dataIndex: 'sex'
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
align: "center",
|
||||
dataIndex: 'tel'
|
||||
},
|
||||
{
|
||||
title: '申请日期',
|
||||
align: "center",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
align: "center",
|
||||
dataIndex: 'status_dictText'
|
||||
},
|
||||
// {
|
||||
// title: '审核备注',
|
||||
// align: "center",
|
||||
// dataIndex: 'auditContent'
|
||||
// },
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
name: {title: '姓名',order: 0,view: 'text', type: 'string',},
|
||||
sex: {title: '性别',order: 1,view: 'radio', type: 'string',dictCode: '',},
|
||||
tel: {title: '联系电话',order: 4,view: 'text', type: 'string',},
|
||||
createTime: {title: '申请日期',order: 27,view: 'datetime', type: 'string',},
|
||||
status: {title: '申请状态 0历史 1申请中 2通过 3驳回',order: 28,view: 'text', type: 'string',},
|
||||
auditContent: {title: '审核备注',order: 29,view: 'text', type: 'string',},
|
||||
};
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
<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" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="sex">
|
||||
<template #label><span title="性别">性别</span></template>
|
||||
<a-input placeholder="请输入性别" v-model:value="queryParam.sex" allow-clear></a-input>
|
||||
</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>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<EmployeesApplyModal ref="registerModal" @success="handleSuccess"></EmployeesApplyModal>
|
||||
</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 EmployeesApplyModal from './components/EmployeesApplyModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '员工申请',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
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 handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '审核',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'employeesapply:nu_biz_employees_apply:edit',
|
||||
ifShow: record.status == '1'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
|
|
@ -0,0 +1,466 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="EmployeesApplyForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</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">
|
||||
<!-- <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">
|
||||
<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="家庭住址" v-bind="validateInfos.address" id="EmployeesApplyForm-address" name="address">
|
||||
<!-- <a-textarea v-model:value="formData.address" :rows="4" placeholder="请输入家庭住址" disabled /> -->
|
||||
<span>{{ formData.address }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号">
|
||||
<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 /> -->
|
||||
<span>{{ formData.marriedOrNot }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" 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="体重" 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 /> -->
|
||||
<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 /> -->
|
||||
<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 /> -->
|
||||
<span>{{ formData.hukouNature }}</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>
|
||||
<a-col :span="24">
|
||||
<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 :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.idCardPositive"
|
||||
disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.idCardNegative"
|
||||
disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.healthCertificatePositive" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.bankPositive"
|
||||
disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.bankNegative"
|
||||
disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.qualification"
|
||||
disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.noCrimeCertificate" disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'申请审核'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="审核意见" v-bind="validateInfos.status" id="EmployeesApplyForm-status" name="status">
|
||||
<!-- <j-dict-select-tag type="list" v-model:value="formData.status"
|
||||
dictCode="employees_audit_status_form" placeholder="请选择审核意见" allow-clear disabled/> -->
|
||||
<div v-if="disabled">
|
||||
<span v-if="formData.status == 1">待审核</span>
|
||||
<span v-if="formData.status == 2">通过</span>
|
||||
<span v-if="formData.status == 3">拒绝</span>
|
||||
</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-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12" v-show="statusVal == 'auditFaild'">
|
||||
<a-form-item label="审核备注" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
|
||||
name="auditContent">
|
||||
<a-input v-model:value="formData.auditContent" placeholder="请输入审核备注" allow-clear></a-input>
|
||||
</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 formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const activeKey = ref('1')
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
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: '',
|
||||
});
|
||||
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 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 4 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol3 = ref<any>({ xs: { span: 24 }, sm: { span: 2 } });
|
||||
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) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
if (formData.status == '2') {
|
||||
statusVal.value = 'auditPass'
|
||||
}
|
||||
if (formData.status == '3') {
|
||||
statusVal.value = 'auditFaild'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
model.statusVal = statusVal.value
|
||||
if (!disabled.value) {
|
||||
if (!statusVal.value) {
|
||||
createMessage.warning('请选择审批意见');
|
||||
return ;
|
||||
}
|
||||
}
|
||||
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 {}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,373 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer>
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="EmployeesApplyForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</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="请输入姓名" allow-clear></a-input>
|
||||
</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="请输入联系电话" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别"
|
||||
allow-clear />
|
||||
</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="请输入民族" allow-clear></a-input>
|
||||
</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%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="家庭住址" v-bind="validateInfos.address" id="EmployeesApplyForm-address" name="address">
|
||||
<a-textarea v-model:value="formData.address" :rows="4" placeholder="请输入家庭住址" />
|
||||
</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="请选择婚否" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="EmployeesApplyForm-height" name="height">
|
||||
<a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="EmployeesApplyForm-weight" name="weight">
|
||||
<a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" />
|
||||
</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="请选择是否吸烟" allow-clear />
|
||||
</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"
|
||||
placeholder="请选择健康状况" allow-clear />
|
||||
</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"
|
||||
placeholder="请选择政治面貌" allow-clear />
|
||||
</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="请输入户籍所在地" allow-clear></a-input>
|
||||
</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="请输入紧急联系人" allow-clear></a-input>
|
||||
</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="请输入紧急联系人电话" allow-clear></a-input>
|
||||
</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="请输入紧急联系人与本人关系"
|
||||
allow-clear></a-input>
|
||||
</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"
|
||||
placeholder="请选择户口性质" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'申请人身份证'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive" id="EmployeesApplyForm-idCardPositive"
|
||||
name="idCardPositive">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.idCardPositive"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative" id="EmployeesApplyForm-idCardNegative"
|
||||
name="idCardNegative">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.idCardNegative"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="EmployeesApplyForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'银行卡'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive" id="EmployeesApplyForm-bankPositive"
|
||||
name="bankPositive">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.bankPositive"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative" id="EmployeesApplyForm-bankNegative"
|
||||
name="bankNegative">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.bankNegative"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'健康证'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive"
|
||||
id="EmployeesApplyForm-healthCertificatePositive" name="healthCertificatePositive">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.healthCertificatePositive"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证反面" v-bind="validateInfos.healthCertificateNegative"
|
||||
id="EmployeesApplyForm-healthCertificateNegative" name="healthCertificateNegative">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.healthCertificateNegative"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'资质证'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资质证" v-bind="validateInfos.qualification" id="EmployeesApplyForm-qualification"
|
||||
name="qualification">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.qualification"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'其它'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="无犯罪证明" v-bind="validateInfos.noCrimeCertificate"
|
||||
id="EmployeesApplyForm-noCrimeCertificate" name="noCrimeCertificate">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.noCrimeCertificate"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'申请审核'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="审核意见" v-bind="validateInfos.status" id="EmployeesApplyForm-status" name="status">
|
||||
<j-dict-select-tag v-if="disabled" type="list" v-model:value="formData.status"
|
||||
dictCode="employees_audit_status_form" placeholder="请选择审核意见" allow-clear />
|
||||
<a-select v-else v-model:value="statusVal" placeholder="请选择审核意见" style="width: 200px">
|
||||
<a-select-option value="auditPass">审核通过</a-select-option>
|
||||
<a-select-option value="auditFaild">审核不通过</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" v-show="statusVal == 'auditFaild'">
|
||||
<a-form-item label="审核备注" v-bind="validateInfos.auditContent" id="EmployeesApplyForm-auditContent"
|
||||
name="auditContent">
|
||||
<a-input v-model:value="formData.auditContent" placeholder="请输入审核备注" allow-clear></a-input>
|
||||
</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 formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
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: '',
|
||||
});
|
||||
const statusVal = ref('')
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
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) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
if (formData.status == '2') {
|
||||
statusVal.value = 'auditPass'
|
||||
}
|
||||
if (formData.status == '3') {
|
||||
statusVal.value = 'auditFaild'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
model.statusVal = statusVal.value
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<a-drawer :title="title" width="70vw" :visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
|
||||
@close="handleCancel">
|
||||
<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>
|
||||
<EmployeesApplyForm v-if="visible" ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||
</EmployeesApplyForm>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import EmployeesApplyForm from './EmployeesApplyForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '审核';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -0,0 +1,380 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="BizEmployeesInfoForm">
|
||||
<a-card title="基础信息">
|
||||
<a-row>
|
||||
<a-col :span="18">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.name" id="BizEmployeesInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name" placeholder="请输入姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="BizEmployeesInfoForm-sex" name="sex">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="BizEmployeesInfoForm-national" name="national">
|
||||
<a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="BizEmployeesInfoForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="BizEmployeesInfoForm-tel" name="tel">
|
||||
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="入职时间" v-bind="validateInfos.entryTime" id="BizEmployeesInfoForm-entryTime" name="entryTime">
|
||||
<a-date-picker placeholder="请选择入职时间" v-model:value="formData.entryTime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="岗位级别" v-bind="validateInfos.postLevel" id="BizEmployeesInfoForm-postLevel" name="postLevel">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.postLevel" dictCode="post_level" placeholder="请选择岗位级别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="BizEmployeesInfoForm-dateOfBirth" name="dateOfBirth">
|
||||
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="婚否" v-bind="validateInfos.marriedOrNot" id="BizEmployeesInfoForm-marriedOrNot" name="marriedOrNot">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not" placeholder="请选择婚否" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="" v-bind="validateInfos.headPath" id="BizEmployeesInfoForm-headPath" name="headPath">
|
||||
<j-image-upload :fileMax="1" :bizPath="`employeesHead`" text="头像" v-model:value="formData.headPath" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="工资" v-bind="validateInfos.wages" id="BizEmployeesInfoForm-wages" name="wages">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.wages" dictCode="wages" placeholder="请选择工资" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="BizEmployeesInfoForm-height" name="height">
|
||||
<a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="BizEmployeesInfoForm-weight" name="weight">
|
||||
<a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="家庭住址" v-bind="validateInfos.address" id="BizEmployeesInfoForm-address" name="address">
|
||||
<a-input v-model:value="formData.address" placeholder="请输入家庭住址" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="是否吸烟" v-bind="validateInfos.isSmoking" id="BizEmployeesInfoForm-isSmoking" name="isSmoking">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.isSmoking" dictCode="is_smoking" placeholder="请选择是否吸烟" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="BizEmployeesInfoForm-healthStatus" name="healthStatus">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" placeholder="请选择健康状况" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="BizEmployeesInfoForm-houseAddress" name="houseAddress">
|
||||
<a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance" id="BizEmployeesInfoForm-politicalAppearance" name="politicalAppearance">
|
||||
<j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" placeholder="请选择政治面貌" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact" id="BizEmployeesInfoForm-emergencyContact" name="emergencyContact">
|
||||
<a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="联系人电话" v-bind="validateInfos.emergencyTel" id="BizEmployeesInfoForm-emergencyTel" name="emergencyTel">
|
||||
<a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship" id="BizEmployeesInfoForm-emergencyRelationship" name="emergencyRelationship">
|
||||
<a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouNature" id="BizEmployeesInfoForm-hukouNature" name="hukouNature">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" placeholder="请选择户口性质" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="备注" v-bind="validateInfos.content" id="BizEmployeesInfoForm-content" name="content">
|
||||
<a-input v-model:value="formData.content" placeholder="请输入备注" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
<a-card title="证件信息">
|
||||
<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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardPositive" ></j-image-upload>
|
||||
</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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardNegative" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="合同信息">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="合同正面" v-bind="validateInfos.contractPositive" id="BizEmployeesInfoForm-contractPositive" name="contractPositive">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractPositive" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="合同反面" v-bind="validateInfos.contractNegative" id="BizEmployeesInfoForm-contractNegative" name="contractNegative">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractNegative" ></j-image-upload>
|
||||
</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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificatePositive" ></j-image-upload>
|
||||
</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="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificateNegative" ></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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankPositive" ></j-image-upload>
|
||||
</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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankNegative" ></j-image-upload>
|
||||
</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">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.qualification" ></j-image-upload>
|
||||
</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">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.noCrimeCertificate" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</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 '../BizEmployeesInfo.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 formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
name: '',
|
||||
sex: '',
|
||||
national: '',
|
||||
idCard: '',
|
||||
headPath: '',
|
||||
tel: '',
|
||||
entryTime: '',
|
||||
postLevel: '',
|
||||
dateOfBirth: '',
|
||||
marriedOrNot: '',
|
||||
wages: '',
|
||||
height: undefined,
|
||||
weight: undefined,
|
||||
address: '',
|
||||
isSmoking: '',
|
||||
healthStatus: '',
|
||||
houseAddress: '',
|
||||
politicalAppearance: '',
|
||||
emergencyContact: '',
|
||||
emergencyTel: '',
|
||||
emergencyRelationship: '',
|
||||
hukouNature: '',
|
||||
content: '',
|
||||
idCardPositive: '',
|
||||
idCardNegative: '',
|
||||
contractPositive: '',
|
||||
contractNegative: '',
|
||||
healthCertificatePositive: '',
|
||||
healthCertificateNegative: '',
|
||||
bankPositive: '',
|
||||
bankNegative: '',
|
||||
qualification: '',
|
||||
noCrimeCertificate: '',
|
||||
regional: '',
|
||||
serviceTag: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
name: [{ required: true, message: '请输入姓名!' }],
|
||||
idCard: [{ required: false }, { pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', message: '身份证号错误!' }],
|
||||
});
|
||||
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) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,380 +1,456 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="BizEmployeesInfoForm">
|
||||
<a-card title="基础信息">
|
||||
<a-row>
|
||||
<a-col :span="18">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="EmployeesApplyForm">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.name" id="BizEmployeesInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name" placeholder="请输入姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="BizEmployeesInfoForm-sex" name="sex">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="BizEmployeesInfoForm-national" name="national">
|
||||
<a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="BizEmployeesInfoForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="BizEmployeesInfoForm-tel" name="tel">
|
||||
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="入职时间" v-bind="validateInfos.entryTime" id="BizEmployeesInfoForm-entryTime" name="entryTime">
|
||||
<a-date-picker placeholder="请选择入职时间" v-model:value="formData.entryTime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="岗位级别" v-bind="validateInfos.postLevel" id="BizEmployeesInfoForm-postLevel" name="postLevel">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.postLevel" dictCode="post_level" placeholder="请选择岗位级别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="BizEmployeesInfoForm-dateOfBirth" name="dateOfBirth">
|
||||
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="婚否" v-bind="validateInfos.marriedOrNot" id="BizEmployeesInfoForm-marriedOrNot" name="marriedOrNot">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not" placeholder="请选择婚否" allow-clear />
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="6" :push="2">
|
||||
<a-form-item label="头像" v-bind="validateInfos.headPath" id="BizEmployeesInfoForm-headPath"
|
||||
name="headPath">
|
||||
<j-image-upload :fileMax="1" :bizPath="`employeesHead`" text="头像"
|
||||
v-model:value="formData.headPath"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="" v-bind="validateInfos.headPath" id="BizEmployeesInfoForm-headPath" name="headPath">
|
||||
<j-image-upload :fileMax="1" :bizPath="`employeesHead`" text="头像" v-model:value="formData.headPath" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="工资" v-bind="validateInfos.wages" id="BizEmployeesInfoForm-wages" name="wages">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.wages" dictCode="wages" placeholder="请选择工资" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="BizEmployeesInfoForm-height" name="height">
|
||||
<a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="BizEmployeesInfoForm-weight" name="weight">
|
||||
<a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="家庭住址" v-bind="validateInfos.address" id="BizEmployeesInfoForm-address" name="address">
|
||||
<a-input v-model:value="formData.address" placeholder="请输入家庭住址" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="是否吸烟" v-bind="validateInfos.isSmoking" id="BizEmployeesInfoForm-isSmoking" name="isSmoking">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.isSmoking" dictCode="is_smoking" placeholder="请选择是否吸烟" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="BizEmployeesInfoForm-healthStatus" name="healthStatus">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" placeholder="请选择健康状况" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="BizEmployeesInfoForm-houseAddress" name="houseAddress">
|
||||
<a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance" id="BizEmployeesInfoForm-politicalAppearance" name="politicalAppearance">
|
||||
<j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" placeholder="请选择政治面貌" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact" id="BizEmployeesInfoForm-emergencyContact" name="emergencyContact">
|
||||
<a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="联系人电话" v-bind="validateInfos.emergencyTel" id="BizEmployeesInfoForm-emergencyTel" name="emergencyTel">
|
||||
<a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship" id="BizEmployeesInfoForm-emergencyRelationship" name="emergencyRelationship">
|
||||
<a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouNature" id="BizEmployeesInfoForm-hukouNature" name="hukouNature">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" placeholder="请选择户口性质" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="备注" v-bind="validateInfos.content" id="BizEmployeesInfoForm-content" name="content">
|
||||
<a-input v-model:value="formData.content" placeholder="请输入备注" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
<a-card title="证件信息">
|
||||
<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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardPositive" ></j-image-upload>
|
||||
</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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardNegative" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="合同信息">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="合同正面" v-bind="validateInfos.contractPositive" id="BizEmployeesInfoForm-contractPositive" name="contractPositive">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractPositive" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="合同反面" v-bind="validateInfos.contractNegative" id="BizEmployeesInfoForm-contractNegative" name="contractNegative">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractNegative" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<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">
|
||||
<!-- <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">
|
||||
<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="家庭住址" v-bind="validateInfos.address" id="EmployeesApplyForm-address"
|
||||
name="address">
|
||||
<!-- <a-textarea v-model:value="formData.address" :rows="4" placeholder="请输入家庭住址" disabled /> -->
|
||||
<span>{{ formData.address }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号">
|
||||
<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 /> -->
|
||||
<span>{{ formData.marriedOrNot }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" 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="体重" 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 /> -->
|
||||
<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 /> -->
|
||||
<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 /> -->
|
||||
<span>{{ formData.hukouNature }}</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>
|
||||
<a-col :span="24">
|
||||
<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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.idCardPositive" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.idCardNegative" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.healthCertificatePositive"
|
||||
disabled></j-image-upload>
|
||||
</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="3" tab="健康证">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive" id="BizEmployeesInfoForm-healthCertificatePositive" name="healthCertificatePositive">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificatePositive" ></j-image-upload>
|
||||
</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="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificateNegative" ></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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankPositive" ></j-image-upload>
|
||||
</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 :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankNegative" ></j-image-upload>
|
||||
</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">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.qualification" ></j-image-upload>
|
||||
</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">
|
||||
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.noCrimeCertificate" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.bankPositive" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.bankNegative" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.qualification" disabled></j-image-upload>
|
||||
</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 :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.noCrimeCertificate"
|
||||
disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</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 '../BizEmployeesInfo.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 formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
name: '',
|
||||
sex: '',
|
||||
national: '',
|
||||
idCard: '',
|
||||
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 '../BizEmployeesInfo.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 formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
name: '',
|
||||
sex: '',
|
||||
national: '',
|
||||
idCard: '',
|
||||
headPath: '',
|
||||
tel: '',
|
||||
entryTime: '',
|
||||
postLevel: '',
|
||||
dateOfBirth: '',
|
||||
marriedOrNot: '',
|
||||
wages: '',
|
||||
height: undefined,
|
||||
weight: undefined,
|
||||
address: '',
|
||||
isSmoking: '',
|
||||
healthStatus: '',
|
||||
houseAddress: '',
|
||||
politicalAppearance: '',
|
||||
emergencyContact: '',
|
||||
emergencyTel: '',
|
||||
emergencyRelationship: '',
|
||||
hukouNature: '',
|
||||
content: '',
|
||||
idCardPositive: '',
|
||||
idCardNegative: '',
|
||||
contractPositive: '',
|
||||
contractNegative: '',
|
||||
healthCertificatePositive: '',
|
||||
healthCertificateNegative: '',
|
||||
bankPositive: '',
|
||||
bankNegative: '',
|
||||
qualification: '',
|
||||
noCrimeCertificate: '',
|
||||
regional: '',
|
||||
serviceTag: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
name: [{ required: true, message: '请输入姓名!' }],
|
||||
idCard: [{ required: false }, { pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', message: '身份证号错误!' }],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
tel: '',
|
||||
entryTime: '',
|
||||
postLevel: '',
|
||||
dateOfBirth: '',
|
||||
marriedOrNot: '',
|
||||
wages: '',
|
||||
height: undefined,
|
||||
weight: undefined,
|
||||
address: '',
|
||||
isSmoking: '',
|
||||
healthStatus: '',
|
||||
houseAddress: '',
|
||||
politicalAppearance: '',
|
||||
emergencyContact: '',
|
||||
emergencyTel: '',
|
||||
emergencyRelationship: '',
|
||||
hukouNature: '',
|
||||
content: '',
|
||||
idCardPositive: '',
|
||||
idCardNegative: '',
|
||||
contractPositive: '',
|
||||
contractNegative: '',
|
||||
healthCertificatePositive: '',
|
||||
healthCertificateNegative: '',
|
||||
bankPositive: '',
|
||||
bankNegative: '',
|
||||
qualification: '',
|
||||
noCrimeCertificate: '',
|
||||
regional: '',
|
||||
serviceTag: '',
|
||||
});
|
||||
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: 4 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol3 = ref<any>({ xs: { span: 24 }, sm: { span: 2 } });
|
||||
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;
|
||||
});
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
// 解析日期字符串
|
||||
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 {
|
||||
padding: 14px;
|
||||
}
|
||||
.antd-modal-form {
|
||||
// padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,77 +1,87 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<!-- <j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<BizEmployeesInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BizEmployeesInfoForm>
|
||||
</j-modal>
|
||||
</j-modal> -->
|
||||
<a-drawer :title="title" width="70vw" :visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
|
||||
@close="handleCancel">
|
||||
<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>
|
||||
<BizEmployeesInfoForm v-if="visible" ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit"
|
||||
:formBpm="false">
|
||||
</BizEmployeesInfoForm>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import BizEmployeesInfoForm from './BizEmployeesInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import BizEmployeesInfoForm from './BizEmployeesInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('90%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('90%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '入职登记';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '入职登记';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
|||
|
|
@ -337,6 +337,11 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<a-button v-else type="link" class="btnPrivate" @click="openAudioModal(text)">播放</a-button>
|
||||
</template>
|
||||
|
||||
<!-- <template v-if="column.dataIndex === 'previewFile'">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<img v-else :src="getFileAccessHttpUrl(text)" alt="图片不存在" class="cellIamge" />
|
||||
</template> -->
|
||||
<!-- <template v-if="column.dataIndex === 'mp3File'">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<div v-else style="display: flex; align-items: center; gap: 8px;">
|
||||
|
|
|
|||
Loading…
Reference in New Issue