diff --git a/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.api.ts b/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.api.ts new file mode 100644 index 0000000..c2e43be --- /dev/null +++ b/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/bizEmployeesInfo/bizEmployeesInfo/list', + save='/bizEmployeesInfo/bizEmployeesInfo/add', + edit='/bizEmployeesInfo/bizEmployeesInfo/edit', + deleteOne = '/bizEmployeesInfo/bizEmployeesInfo/delete', + deleteBatch = '/bizEmployeesInfo/bizEmployeesInfo/deleteBatch', + importExcel = '/bizEmployeesInfo/bizEmployeesInfo/importExcel', + exportXls = '/bizEmployeesInfo/bizEmployeesInfo/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 }); +} diff --git a/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.data.ts b/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.data.ts new file mode 100644 index 0000000..64e61a4 --- /dev/null +++ b/src/views/biz/bizEmployeesInfo/BizEmployeesInfo.data.ts @@ -0,0 +1,234 @@ +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_dictText' + }, + { + title: '民族', + align: "center", + dataIndex: 'national' + }, + { + title: '身份证号', + align: "center", + dataIndex: 'idCard' + }, + { + title: '联系电话', + align: "center", + dataIndex: 'tel' + }, + { + title: '入职时间', + align: "center", + dataIndex: 'entryTime', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, + { + title: '岗位级别', + align: "center", + dataIndex: 'postLevel_dictText' + }, + { + title: '出生日期', + align: "center", + dataIndex: 'dateOfBirth', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, + { + title: '婚否', + align: "center", + dataIndex: 'marriedOrNot_dictText' + }, + { + title: '工资', + align: "center", + dataIndex: 'wages_dictText' + }, + { + title: '身高', + align: "center", + dataIndex: 'height' + }, + { + title: '体重', + align: "center", + dataIndex: 'weight' + }, + { + title: '家庭住址', + align: "center", + dataIndex: 'address' + }, + { + title: '是否吸烟', + align: "center", + dataIndex: 'isSmoking_dictText' + }, + { + title: '健康状况', + align: "center", + dataIndex: 'healthStatus_dictText' + }, + { + title: '户籍所在地', + align: "center", + dataIndex: 'houseAddress' + }, + { + title: '政治面貌', + align: "center", + dataIndex: 'politicalAppearance_dictText' + }, + { + title: '紧急联系人', + align: "center", + dataIndex: 'emergencyContact' + }, + { + title: '紧急联系人电话', + align: "center", + dataIndex: 'emergencyTel' + }, + { + title: '紧急联系人与本人关系', + align: "center", + dataIndex: 'emergencyRelationship' + }, + { + title: '户口性质', + align: "center", + dataIndex: 'hukouNature_dictText' + }, + { + title: '备注', + align: "center", + dataIndex: 'content' + }, + { + title: '身份证正面', + align: "center", + dataIndex: 'idCardPositive', + customRender: render.renderImage, + }, + { + title: '身份证反面', + align: "center", + dataIndex: 'idCardNegative', + customRender: render.renderImage, + }, + { + title: '合同正面', + align: "center", + dataIndex: 'contractPositive', + customRender: render.renderImage, + }, + { + title: '合同反面', + align: "center", + dataIndex: 'contractNegative', + customRender: render.renderImage, + }, + { + title: '健康证正面', + align: "center", + dataIndex: 'healthCertificatePositive', + customRender: render.renderImage, + }, + { + title: '健康证反面', + align: "center", + dataIndex: 'healthCertificateNegative', + customRender: render.renderImage, + }, + { + title: '银行卡正面', + align: "center", + dataIndex: 'bankPositive', + customRender: render.renderImage, + }, + { + title: '银行卡反面', + align: "center", + dataIndex: 'bankNegative', + customRender: render.renderImage, + }, + { + title: '资质证', + align: "center", + dataIndex: 'qualification', + customRender: render.renderImage, + }, + { + title: '无犯罪证明', + align: "center", + dataIndex: 'noCrimeCertificate', + customRender: render.renderImage, + }, + { + title: '区域', + align: "center", + dataIndex: 'regional' + }, + { + title: '服务标签', + align: "center", + dataIndex: 'serviceTag' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + name: {title: '姓名',order: 0,view: 'text', type: 'string',}, + sex: {title: '性别',order: 1,view: 'radio', type: 'string',dictCode: 'sex',}, + national: {title: '民族',order: 2,view: 'text', type: 'string',}, + idCard: {title: '身份证号',order: 3,view: 'text', type: 'string',}, + tel: {title: '联系电话',order: 4,view: 'text', type: 'string',}, + entryTime: {title: '入职时间',order: 5,view: 'date', type: 'string',}, + postLevel: {title: '岗位级别',order: 6,view: 'radio', type: 'string',dictCode: 'post_level',}, + dateOfBirth: {title: '出生日期',order: 7,view: 'date', type: 'string',}, + marriedOrNot: {title: '婚否',order: 8,view: 'radio', type: 'string',dictCode: 'married_or_not',}, + wages: {title: '工资',order: 9,view: 'radio', type: 'string',dictCode: 'wages',}, + height: {title: '身高',order: 10,view: 'number', type: 'number',}, + weight: {title: '体重',order: 11,view: 'number', type: 'number',}, + address: {title: '家庭住址',order: 12,view: 'text', type: 'string',}, + isSmoking: {title: '是否吸烟',order: 13,view: 'radio', type: 'string',dictCode: 'is_smoking',}, + healthStatus: {title: '健康状况',order: 14,view: 'radio', type: 'string',dictCode: 'health_status',}, + houseAddress: {title: '户籍所在地',order: 15,view: 'text', type: 'string',}, + politicalAppearance: {title: '政治面貌',order: 16,view: 'list', type: 'string',dictCode: 'political_appearance',}, + emergencyContact: {title: '紧急联系人',order: 17,view: 'text', type: 'string',}, + emergencyTel: {title: '紧急联系人电话',order: 18,view: 'text', type: 'string',}, + emergencyRelationship: {title: '紧急联系人与本人关系',order: 19,view: 'text', type: 'string',}, + hukouNature: {title: '户口性质',order: 20,view: 'radio', type: 'string',dictCode: 'hukou_nature',}, + content: {title: '备注',order: 21,view: 'text', type: 'string',}, + idCardPositive: {title: '身份证正面',order: 22,view: 'image', type: 'string',}, + idCardNegative: {title: '身份证反面',order: 23,view: 'image', type: 'string',}, + contractPositive: {title: '合同正面',order: 24,view: 'image', type: 'string',}, + contractNegative: {title: '合同反面',order: 25,view: 'image', type: 'string',}, + healthCertificatePositive: {title: '健康证正面',order: 26,view: 'image', type: 'string',}, + healthCertificateNegative: {title: '健康证反面',order: 27,view: 'image', type: 'string',}, + bankPositive: {title: '银行卡正面',order: 28,view: 'image', type: 'string',}, + bankNegative: {title: '银行卡反面',order: 29,view: 'image', type: 'string',}, + qualification: {title: '资质证',order: 30,view: 'image', type: 'string',}, + noCrimeCertificate: {title: '无犯罪证明',order: 31,view: 'image', type: 'string',}, + regional: {title: '区域',order: 32,view: 'text', type: 'string',}, + serviceTag: {title: '服务标签',order: 33,view: 'text', type: 'string',}, +}; diff --git a/src/views/biz/bizEmployeesInfo/BizEmployeesInfoList.vue b/src/views/biz/bizEmployeesInfo/BizEmployeesInfoList.vue new file mode 100644 index 0000000..0dc7a5a --- /dev/null +++ b/src/views/biz/bizEmployeesInfo/BizEmployeesInfoList.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoForm.vue b/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoForm.vue new file mode 100644 index 0000000..949418a --- /dev/null +++ b/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoForm.vue @@ -0,0 +1,380 @@ + + + + + diff --git a/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoModal.vue b/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoModal.vue new file mode 100644 index 0000000..a21000a --- /dev/null +++ b/src/views/biz/bizEmployeesInfo/components/BizEmployeesInfoModal.vue @@ -0,0 +1,77 @@ + + + + + +