feat:【mall 商城】快递公司的迁移(ele 100%)

This commit is contained in:
YunaiV
2025-10-11 21:00:23 +08:00
parent a46fa6442c
commit 53195748b8
3 changed files with 35 additions and 7 deletions

View File

@@ -21,12 +21,18 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'Input',
fieldName: 'code',
label: '公司编码',
componentProps: {
placeholder: '请输入快递编码',
},
rules: 'required',
},
{
component: 'Input',
fieldName: 'name',
label: '公司名称',
componentProps: {
placeholder: '请输入快递名称',
},
rules: 'required',
},
{
@@ -34,6 +40,7 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'logo',
label: '公司 logo',
rules: 'required',
help: '推荐 180x180 图片分辨率',
},
{
fieldName: 'sort',
@@ -41,6 +48,9 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'InputNumber',
componentProps: {
min: 0,
placeholder: '请输入显示顺序',
controlsPosition: 'right',
class: '!w-full',
},
rules: 'required',
},
@@ -65,18 +75,27 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'name',
label: '快递公司名称',
component: 'Input',
componentProps: {
placeholder: '请输入快递公司名称',
allowClear: true,
},
},
{
fieldName: 'code',
label: '快递公司编号',
component: 'Input',
componentProps: {
placeholder: '请输入快递公司编号',
allowClear: true,
},
},
{
fieldName: 'status',
label: '状态',
component: 'Select',
componentProps: {
clearable: true,
placeholder: '请选择状态',
allowClear: true,
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
},
@@ -89,18 +108,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'id',
title: '编号',
minWidth: 100,
},
{
field: 'code',
title: '公司编码',
minWidth: 120,
},
{
field: 'name',
title: '公司名称',
minWidth: 150,
},
{
field: 'logo',
title: '公司 logo',
minWidth: 120,
cellRender: {
name: 'CellImage',
},
@@ -108,10 +131,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'sort',
title: '显示顺序',
minWidth: 100,
},
{
field: 'status',
title: '状态',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },
@@ -120,6 +145,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'createTime',
title: '创建时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{