!205 feat(@vben/web-antd): erp 模块除去收款单和付款单功能基本完成
* fix(@vben/web-antd): erp 解决冲突 * fix(@vben/web-antd): erp 更新采购和销售退货表单,修复关联订单选择功能不统一详细可编辑的问题,统一文件名称格式 * feat(@vben/web-antd): erp-finance-account 新增结算账户管理功能,包括表单、列表及相关操作 * feat(@vben/web-antd): erp-sale-return 新增销售退货管理功能,包括退货列表、表单及相关操作 * feat(@vben/web-antd): erp-sale-out 新增销售出库管理功能,包括出库列表、表单及相关操作 * feat(@vben/web-antd): erp-sale-order 新增销售订单管理功能,包括订单列表、表单及相关操作 * feat(@vben/web-antd): erp-sale-customer 新增客户管理功能,包括客户表单、列表及相关操作 * feat(@vben/web-antd): erp-purchase-return 新增采购退货管理功能,包括表单、列表及相关操作 * feat(@vben/web-antd): erp-purchase-in 新增采购入库管理功能,包括表单、列表及相关操作 * feat(@vben/web-antd): erp-stock-check 新增库存盘点单管理功能,包括表单、列表及相关操作 * feat(@vben/web-antd): erp-stock-move 新增库存调拨单管理功能,包括表单、列表及相关操作 * feat(@vben/web-antd): erp-stock-out 新增其它出库单管理功能,包括表单、列表及相关操作 * fix(@vben/web-antd): erp-stock-in 修复提交表单时清空产品项 ID,确保请求成功不报row_xxx报错
This commit is contained in:
214
apps/web-antd/src/views/erp/sale/customer/data.ts
Normal file
214
apps/web-antd/src/views/erp/sale/customer/data.ts
Normal file
@@ -0,0 +1,214 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'id',
|
||||
dependencies: {
|
||||
triggerFields: [''],
|
||||
show: () => false,
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'name',
|
||||
label: '名称',
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
placeholder: '请输入名称',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'contact',
|
||||
label: '联系人',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入联系人',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'mobile',
|
||||
label: '手机号码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入手机号码',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'telephone',
|
||||
label: '联系电话',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入联系电话',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'email',
|
||||
label: '电子邮箱',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入电子邮箱',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'fax',
|
||||
label: '传真',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入传真',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: '状态',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
|
||||
buttonStyle: 'solid',
|
||||
optionType: 'button',
|
||||
},
|
||||
rules: z.number().default(CommonStatusEnum.ENABLE),
|
||||
},
|
||||
{
|
||||
fieldName: 'sort',
|
||||
label: '排序',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
placeholder: '请输入排序',
|
||||
precision: 0,
|
||||
class: 'w-full',
|
||||
},
|
||||
rules: 'required',
|
||||
defaultValue: 0,
|
||||
},
|
||||
{
|
||||
fieldName: 'taxNo',
|
||||
label: '纳税人识别号',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入纳税人识别号',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'taxPercent',
|
||||
label: '税率(%)',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
placeholder: '请输入税率',
|
||||
precision: 0,
|
||||
class: 'w-full',
|
||||
},
|
||||
rules: z.number().min(0).max(100).default(0).optional(),
|
||||
defaultValue: 0,
|
||||
},
|
||||
{
|
||||
fieldName: 'bankName',
|
||||
label: '开户行名称',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入开户行名称',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'bankAccount',
|
||||
label: '开户行账号',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入开户行账号',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'bankAddress',
|
||||
label: '开户行地址',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入开户行地址',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'remark',
|
||||
label: '备注',
|
||||
component: 'Textarea',
|
||||
componentProps: {
|
||||
placeholder: '请输入备注',
|
||||
rows: 1,
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'name',
|
||||
label: '名称',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
fieldName: 'mobile',
|
||||
label: '手机号码',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
fieldName: 'email',
|
||||
label: '邮箱',
|
||||
component: 'Input',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/** 列表的字段 */
|
||||
export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
return [
|
||||
{
|
||||
field: 'name',
|
||||
title: '名称',
|
||||
},
|
||||
{
|
||||
field: 'contact',
|
||||
title: '联系人',
|
||||
},
|
||||
{
|
||||
field: 'mobile',
|
||||
title: '手机号码',
|
||||
},
|
||||
{
|
||||
field: 'telephone',
|
||||
title: '联系电话',
|
||||
},
|
||||
{
|
||||
field: 'email',
|
||||
title: '邮箱',
|
||||
},
|
||||
{
|
||||
field: 'taxNo',
|
||||
title: '纳税人识别号',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
cellRender: {
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 130,
|
||||
fixed: 'right',
|
||||
slots: { default: 'actions' },
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user