lijingjia 5 months ago
commit 7c5fbe6119

@ -8,6 +8,10 @@ enum Api {
GetOrgInfo = '/mainApi/Org/GetOrgInfo',
GetOrgTree = '/mainApi/Org/GetOrgTree',
GetOrgList = '/mainApi/Common/GetOrgList',
GetBankList = '/mainApi/Bank/GetBankList',
EditBank = '/mainApi/Bank/EditBank',
GetBankInfo = '/mainApi/Bank/GetBankInfo',
}
export function getOrgList(data: PageRequest) {
return request<DataResult>({
@ -45,3 +49,25 @@ export function getOrgListData(query: { id: string }) {
params: query,
})
}
export function getBankList(data: any) {
return request<DataResult>({
url: Api.GetBankList,
method: 'post',
data,
})
}
export function editBank(data: any) {
return request<DataResult>({
url: Api.EditBank,
method: 'post',
data,
})
}
export function getBankInfo(query: { id: string }) {
return request<DataResult>({
url: Api.GetBankInfo,
method: 'get',
params: query,
})
}

@ -67,12 +67,26 @@ export const schemas: FormSchema[] = [
// valueField: 'id',
// },
},
// {
// field: 'isLocking',
// component: 'Switch',
// label: '账单状态',
// defaultValue: false,
// colProps: { span: 2 },
// },
{
field: 'isLocking',
component: 'Switch',
label: '账单状态',
defaultValue: false,
component: 'Select',
label: '业务锁定',
colProps: { span: 2 },
dynamicDisabled: true,
defaultValue: false,
componentProps: {
options: [
{ label: '否', value: false },
{ label: '是', value: true },
],
},
},
{
field: 'isNoTax',

@ -348,6 +348,9 @@
businessIds: [],
}
let res = await EditCheckBill(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
}
id.value = res.data
}
function waitFor() {

@ -0,0 +1,124 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { BankformSchema } from './columns'
import { editBank, getBankInfo } from '/@/api/system/org'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const linkId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: BankformSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
console.log(data, 1111111111)
// initData().then(async () => {
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
linkId.value = data.linkId ? data.linkId : ''
if (unref(isUpdate)) {
rowId.value = data.record.id ? data.record.id : data.record.value
const res: API.DataResult = await getBankInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
// })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增账户信息' : '编辑账户信息'))
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
values.linkId = values.linkId ? values.linkId : linkId.value
const res: API.DataResult = await editBank(values)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await getBankInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -3,11 +3,36 @@
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="30%"
width="60%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<a-tabs @change="tabChange" v-model:activeKey="activeKey" tab-position="left">
<a-tab-pane key="0" tab="机构信息">
<BasicForm @register="registerForm" />
</a-tab-pane>
<a-tab-pane key="1" tab="账户信息" force-render>
<BasicTable @register="registerBankTable">
<template #toolbar>
<a-button type="primary" @click="AddBank"> </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: EditBank.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</a-tab-pane>
</a-tabs>
<BankModal @register="registerBankModal" @success="handleSuccess" />
<!--右下角按钮-->
<template #footer>
<a-button
@ -39,11 +64,12 @@
</template>
<script lang="ts" setup>
import { ref, computed, unref, h } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicModal, useModalInner, useModal } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { editOrg, getOrgInfo, getOrgTree } from '/@/api/system/org'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formSchema, BankColumns } from './columns'
import BankModal from './BankModal.vue'
import { editOrg, getOrgInfo, getOrgTree, getBankList } from '/@/api/system/org'
import { useUserStore } from '/@/store/modules/user'
import { useMessage } from '/@/hooks/web/useMessage'
import { propTypes } from '/@/utils/propTypes'
@ -56,33 +82,34 @@
const loading = ref(false)
const rowId = ref('')
const treeData = ref([])
const activeKey = ref('0')
const linkId = ref()
const { createMessage } = useMessage()
const [
registerForm,
{ reload, resetFields, setFieldsValue, validate, updateSchema, getFieldsValue },
] = useForm({
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
activeKey.value = '0'
linkId.value = ''
rowId.value = ''
resetFields()
reload()
initData().then(async () => {
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id ? data.record.id : data.record.value
const res: API.DataResult = await getOrgInfo({ id: unref(rowId) })
if (res.succeeded) {
linkId.value = res.data.id
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
reload()
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
@ -93,12 +120,6 @@
} else {
updateSchema({ field: 'isDepartment', componentProps: { disabled: false } })
}
// if (!props.ParentId) {
// updateSchema({ field: 'parentId', show: false })
// } else {
// updateSchema({ field: 'parentId', show: false })
// }
})
})
async function initData() {
@ -137,7 +158,6 @@
// loading.value = true;
// values.roleIds = values.roleIds.split(',')
// values.orgIds = values.orgIds.split(',')
console.log(values)
if (!values.parentId) {
values.parentId = props.ParentId == '' ? 0 : props.ParentId
@ -175,4 +195,69 @@
})
}
}
const [registerBankTable, { reload, getPaginationRef }] = useTable({
title: '账户信息',
immediate: false,
api: async (p) => {
const res: API.DataResult = await getBankList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
condition.push({
FieldName: 'linkId',
FieldValue: linkId.value,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
pagination: true,
canResize: true,
resizeHeightOffset: 330,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
columns: BankColumns,
})
const [registerBankModal, { openModal }] = useModal()
function AddBank() {
openModal(true, {
isParent: false,
isUpdate: false,
linkId: linkId.value,
})
}
function EditBank(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
// ParentId.value = 0
initData()
reload()
}
function tabChange(e) {
if (e == 1 && !rowId.value) {
createMessage.warning('请先保存基础信息')
activeKey.value = '0'
}
}
</script>

@ -6,6 +6,16 @@ export const columns: BasicColumn[] = [
dataIndex: 'orgName',
width: 200,
},
{
title: '机构全称',
dataIndex: 'orgFullName',
width: 200,
},
{
title: '机构英文名称',
dataIndex: 'orgEnName',
width: 200,
},
{
title: '负责人',
dataIndex: 'leader',
@ -16,6 +26,76 @@ export const columns: BasicColumn[] = [
dataIndex: 'tel',
width: 150,
},
{
title: '地址',
dataIndex: 'address',
width: 150,
},
{
title: '英文地址',
dataIndex: 'enAddress',
width: 150,
},
{
title: '邮政编码',
dataIndex: 'postCode',
width: 150,
},
{
title: '办公电话',
dataIndex: 'officePhone',
width: 150,
},
{
title: '传真',
dataIndex: 'fax',
width: 150,
},
{
title: '电子邮箱',
dataIndex: 'email',
width: 150,
},
{
title: '公司网址',
dataIndex: 'webSiteUrl',
width: 150,
},
{
title: '工商登记号',
dataIndex: 'licenseCode',
width: 150,
},
{
title: '税务登记号',
dataIndex: 'taxCode',
width: 150,
},
{
title: '票号头字符',
dataIndex: 'banksHead',
width: 150,
},
{
title: '本地货币',
dataIndex: 'localCurrency',
width: 150,
},
{
title: '发票抬头',
dataIndex: 'invoiceTitle',
width: 150,
},
{
title: '支票抬头',
dataIndex: 'chequeTitle',
width: 150,
},
{
title: '财务软件代码',
dataIndex: 'financeSoftCode',
width: 150,
},
{
title: '排序',
dataIndex: 'orderNo',
@ -54,7 +134,25 @@ export const searchFormSchema: FormSchema[] = [
field: 'OrgName',
label: '机构名称',
component: 'Input',
colProps: { span: 6 },
colProps: { span: 4 },
},
{
field: 'orgEnName',
label: '机构英文名称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'tel',
label: '电话',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'address',
label: '地址',
component: 'Input',
colProps: { span: 4 },
},
]
export const formSchema: FormSchema[] = [
@ -97,7 +195,7 @@ export const formSchema: FormSchema[] = [
replaceFields: { children: 'children', title: 'value', key: 'value', value: 'value' },
},
colProps: {
span: 20,
span: 6,
},
show: ({ values }) => {
return !!values.id
@ -109,7 +207,25 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 20,
span: 6,
},
},
{
label: '机构全称',
field: 'orgFullName',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '机构英文名称',
field: 'orgEnName',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
@ -118,7 +234,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 20,
span: 6,
},
},
{
@ -127,7 +243,133 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 20,
span: 6,
},
},
{
label: '地址',
field: 'address',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '英文地址',
field: 'enAddress',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '邮政编码',
field: 'postCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '办公电话',
field: 'officePhone',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '传真',
field: 'fax',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '电子邮箱',
field: 'email',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '公司网址',
field: 'webSiteUrl',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '工商登记号',
field: 'licenseCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '税务登记号',
field: 'taxCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '票号头字符',
field: 'banksHead',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '本地货币',
field: 'localCurrency',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '发票抬头',
field: 'invoiceTitle',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '支票抬头',
field: 'chequeTitle',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: '财务软件代码',
field: 'financeSoftCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
@ -136,7 +378,7 @@ export const formSchema: FormSchema[] = [
component: 'InputNumber',
defaultValue: '',
colProps: {
span: 20,
span: 6,
},
},
{
@ -152,7 +394,7 @@ export const formSchema: FormSchema[] = [
},
defaultValue: false,
colProps: {
span: 20,
span: 6,
},
},
{
@ -168,156 +410,233 @@ export const formSchema: FormSchema[] = [
},
defaultValue: 0,
colProps: {
span: 20,
span: 6,
},
},
]
export const BankColumns: BasicColumn[] = [
{
title: '代码',
dataIndex: 'codeName',
width: 230,
align: 'left',
},
{
title: '币别',
dataIndex: 'currency',
width: 230,
align: 'left',
},
{
title: '银行名称',
dataIndex: 'bankName',
width: 230,
align: 'left',
},
{
title: '银行名称2',
dataIndex: 'bankName2',
width: 230,
align: 'left',
},
{
title: '银行账户',
dataIndex: 'bankAccountNo',
width: 230,
align: 'left',
},
{
title: '户头名称',
dataIndex: 'accountName',
width: 230,
align: 'left',
},
{
title: '科目代码',
dataIndex: 'subjectCode',
width: 230,
align: 'left',
},
{
title: '财务软件代码',
dataIndex: 'financeSoftCode',
width: 230,
align: 'left',
},
{
title: '是否默认',
dataIndex: 'isDefault',
width: 100,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '排序',
dataIndex: 'orderNo',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
width: 100,
customRender: ({ text }) => {
if (text === 0) {
return <Tag color="success"></Tag>
} else if (text === 1) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '备注',
dataIndex: 'note',
width: 100,
},
]
export const BankformSchema: FormSchema[] = [
{
field: 'divider-selects',
component: 'Divider',
label: '账户信息',
colProps: {
span: 24,
},
},
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'linkId',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '代码',
field: 'codeName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '币别',
field: 'currency',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '银行名称',
field: 'bankName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '银行名称2',
field: 'bankName2',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '银行账户',
field: 'bankAccountNo',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '户头名称',
field: 'accountName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '科目代码',
field: 'subjectCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '财务软件代码',
field: 'financeSoftCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '排序',
field: 'orderNo',
component: 'InputNumber',
defaultValue: '',
colProps: {
span: 12,
},
},
{
field: 'isDefault',
component: 'RadioButtonGroup',
label: '是否默认',
required: true,
componentProps: {
options: [
// { label: '是', value: 1 },
// { label: '否', value: 0 },
{ label: '是', value: true },
{ label: '否', value: false },
],
},
defaultValue: true,
colProps: {
span: 6,
},
},
{
field: 'status',
component: 'RadioButtonGroup',
label: '状态',
required: true,
componentProps: {
options: [
{ label: '启用', value: 0 },
{ label: '禁用', value: 1 },
],
},
defaultValue: 0,
colProps: {
span: 6,
},
},
// {
// field: 'userCode',
// label: '机构唯一码',
// component: 'Input',
// required: true,
// colProps: { span: 12 },
// dynamicDisabled: ({ values }) => {
// return !!values.id
// },
// },
// {
// field: 'sex',
// component: 'RadioButtonGroup',
// label: '性别',
// required: true,
// componentProps: {
// options: [
// { label: '男', value: 1 },
// { label: '女', value: 2 },
// ],
// },
// defaultValue: 1,
// colProps: {
// span: 8,
// },
// },
// {
// field: 'userName',
// label: '机构名称',
// component: 'Input',
// required: true,
// colProps: { span: 12 },
// },
// {
// field: 'userType',
// label: '机构类型',
// component: 'RadioButtonGroup',
// required: true,
// colProps: {
// span: 24
// },
// defaultValue: 2,
// componentProps: {
// options: [
// // { label: '超级管理员', value: 0, disabled: true },
// { label: '管理员', value: 1 },
// { label: '普通机构', value: 2 },
// ],
// },
// },
// {
// field: 'pinYinCode',
// label: '助记码',
// component: 'Input',
// colProps: { span: 12 },
// dynamicDisabled: () => {
// return true
// },
// },
// {
// field: 'password',
// label: '密码',
// component: 'Input',
// colProps: { span: 12 },
// defaultValue: '0000',
// // dynamicDisabled: () => {
// // return true
// // },
// itemProps: {
// extra: '请设置复杂密码!',
// },
// },
// {
// field: 'birthday',
// label: '出生日期',
// component: 'DatePicker',
// // required: true,
// colProps: {
// span: 24
// },
// componentProps: {},
// },
// {
// field: 'nickName',
// label: '机构昵称',
// component: 'Input',
// required: true,
// colProps: { span: 12 },
// },
// {
// field: 'phone',
// label: '手机号',
// component: 'Input',
// colProps: { span: 12 },
// },
// {
// field: 'email',
// label: '邮箱',
// component: 'Input',
// colProps: { span: 12 },
// },
// {
// field: 'duty',
// label: '职位',
// component: 'Input',
// colProps: { span: 12 },
// },
// {
// field: 'note',
// label: '备注',
// component: 'InputTextArea',
// colProps: { span: 24 },
// // ifShow: ({ values }) => !isButton(values.menuType),
// },
// {
// field: 'divider-selects',
// component: 'Divider',
// label: '附属信息',
// componentProps: {},
// colProps: {
// span: 24,
// },
// },
// {
// field: 'roleIds',
// label: '所属角色',
// component: 'ApiSelect',
// // required: true,
// defaultValue: [],
// colProps: { span: 12 },
// componentProps: {
// // mode: 'multiple',
// api: getRoleList,
// resultField: 'data',
// },
// },
// {
// field: 'orgIds',
// label: '所属机构',
// component: 'ApiSelect',
// // required: true,
// defaultValue: [],
// colProps: { span: 12 },
// componentProps: {
// mode: 'multiple',
// api: getOrgList,
// resultField: 'data',
// },
// },
]

@ -63,11 +63,11 @@
// api: getSysDictTypeList,
api: async (p) => {
const res: API.DataResult = await getOrgList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
resizeHeightOffset: 50,
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
@ -92,6 +92,27 @@
ConditionalType: 1,
})
}
if (!!data.orgEnName) {
condition.push({
FieldName: 'orgEnName',
FieldValue: data.orgEnName,
ConditionalType: 1,
})
}
if (!!data.tel) {
condition.push({
FieldName: 'tel',
FieldValue: data.tel,
ConditionalType: 1,
})
}
if (!!data.address) {
condition.push({
FieldName: 'address',
FieldValue: data.address,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
@ -111,7 +132,7 @@
indexColumnProps: {
fixed: 'left',
},
canResize: false,
canResize: true,
actionColumn: {
width: 80,
title: '操作',

@ -3,7 +3,7 @@
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="50%"
width="60%"
@register="registerModal"
@ok="handleSave"
>

@ -57,10 +57,30 @@ export const columns: BasicColumn[] = [
},
},
{
title: '手机',
title: '手机',
dataIndex: 'phone',
width: 200,
},
{
title: '电话',
dataIndex: 'tel',
width: 200,
},
{
title: '办公电话',
dataIndex: 'officePhone',
width: 200,
},
{
title: '传真',
dataIndex: 'fax',
width: 200,
},
{
title: '财务软件代码',
dataIndex: 'financeSoftCode',
width: 200,
},
{
title: '创建时间',
dataIndex: 'createTime',
@ -115,11 +135,18 @@ export const formSchema: FormSchema[] = [
label: '用户唯一码',
component: 'Input',
required: true,
colProps: { span: 12 },
colProps: { span: 6 },
dynamicDisabled: ({ values }) => {
return !!values.id
},
},
{
field: 'userName',
label: '用户名称',
component: 'Input',
required: true,
colProps: { span: 6 },
},
{
field: 'sex',
component: 'RadioButtonGroup',
@ -133,23 +160,16 @@ export const formSchema: FormSchema[] = [
},
defaultValue: 1,
colProps: {
span: 8,
span: 6,
},
},
{
field: 'userName',
label: '用户名称',
component: 'Input',
required: true,
colProps: { span: 12 },
},
{
field: 'userType',
label: '用户类型',
component: 'RadioButtonGroup',
required: true,
colProps: {
span: 12,
span: 6,
},
defaultValue: 2,
componentProps: {
@ -164,7 +184,7 @@ export const formSchema: FormSchema[] = [
field: 'pinYinCode',
label: '助记码',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 6 },
dynamicDisabled: () => {
return true
},
@ -173,7 +193,7 @@ export const formSchema: FormSchema[] = [
field: 'password',
label: '密码',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 6 },
defaultValue: '',
required: true,
// dynamicDisabled: () => {
@ -188,7 +208,7 @@ export const formSchema: FormSchema[] = [
label: '出生日期',
component: 'DatePicker',
colProps: {
span: 12,
span: 6,
},
componentProps: {
style: {
@ -201,26 +221,50 @@ export const formSchema: FormSchema[] = [
label: '用户昵称',
component: 'Input',
required: true,
colProps: { span: 12 },
colProps: { span: 6 },
},
{
field: 'phone',
label: '手机号',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 6 },
},
{
field: 'email',
label: '邮箱',
component: 'Input',
rules: [{ type: 'email', message: t('请填写正确的邮箱地址') }],
colProps: { span: 12 },
colProps: { span: 6 },
},
{
field: 'tel',
label: '电话',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'officePhone',
label: '办公电话',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'fax',
label: '传真',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'financeSoftCode',
label: '财务软件代码',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'duty',
label: '职位',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 6 },
},
{
field: 'note',
@ -300,7 +344,7 @@ export const formSchema: FormSchema[] = [
component: 'Select',
required: true,
defaultValue: [],
colProps: { span: 12 },
colProps: { span: 6 },
componentProps: ({ formActionType }) => {
return {
mode: 'multiple',
@ -331,7 +375,7 @@ export const formSchema: FormSchema[] = [
required: true,
component: 'Select',
defaultValue: '',
colProps: { span: 12 },
colProps: { span: 6 },
componentProps: ({ formActionType }) => {
return {
options: selectOrgList,
@ -360,7 +404,7 @@ export const formSchema: FormSchema[] = [
label: '默认部门',
component: 'Select',
defaultValue: '',
colProps: { span: 12 },
colProps: { span: 6 },
componentProps: {
options: selectDeptList,
allowClear: true,
@ -375,7 +419,7 @@ export const formSchema: FormSchema[] = [
component: 'ApiSelect',
// required: true,
defaultValue: [],
colProps: { span: 12 },
colProps: { span: 6 },
componentProps: {
mode: 'multiple',
api: getRoleList,

Loading…
Cancel
Save