|
@@ -24,6 +24,12 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
|
|
|
|
return {
|
|
|
crudOptions: {
|
|
|
+ table: {
|
|
|
+ height: 800,
|
|
|
+ },
|
|
|
+ container: {
|
|
|
+ fixedHeight: false
|
|
|
+ },
|
|
|
request: {
|
|
|
pageRequest,
|
|
|
addRequest,
|
|
@@ -70,28 +76,39 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
|
},
|
|
|
},
|
|
|
columns: {
|
|
|
- _index: {
|
|
|
- title: '序号',
|
|
|
- form: { show: false },
|
|
|
- column: {
|
|
|
- //type: 'index',
|
|
|
- align: 'center',
|
|
|
- width: '70px',
|
|
|
- columnSetDisabled: true, //禁止在列设置中选择
|
|
|
- formatter: (context) => {
|
|
|
- //计算序号,你可以自定义计算规则,此处为翻页累加
|
|
|
- let index = context.index ?? 1;
|
|
|
- let pagination = crudExpose!.crudBinding.value.pagination;
|
|
|
- // @ts-ignore
|
|
|
- return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1;
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ // _index: {
|
|
|
+ // title: '序号',
|
|
|
+ // form: { show: false },
|
|
|
+ // column: {
|
|
|
+ // //type: 'index',
|
|
|
+ // align: 'center',
|
|
|
+ // width: '70px',
|
|
|
+ // columnSetDisabled: true, //禁止在列设置中选择
|
|
|
+ // formatter: (context) => {
|
|
|
+ // //计算序号,你可以自定义计算规则,此处为翻页累加
|
|
|
+ // let index = context.index ?? 1;
|
|
|
+ // let pagination = crudExpose!.crudBinding.value.pagination;
|
|
|
+ // // @ts-ignore
|
|
|
+ // return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1;
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // },
|
|
|
name: {
|
|
|
title: '广告组合',
|
|
|
column: {
|
|
|
width: '150px'
|
|
|
- }
|
|
|
+ },
|
|
|
+ search: {
|
|
|
+ show: true,
|
|
|
+ component: {
|
|
|
+ props: {
|
|
|
+ clearable: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ form: {
|
|
|
+ rules: [{required: true, message:'必填项'}]
|
|
|
+ }
|
|
|
},
|
|
|
state: {
|
|
|
title: '状态',
|
|
@@ -101,22 +118,59 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
|
{value:'enabled', label:'投放中'},
|
|
|
{value:'disable', label:'禁用'},
|
|
|
]
|
|
|
- })
|
|
|
+ }),
|
|
|
+ form: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
},
|
|
|
- // servingStatus: {
|
|
|
- // title: ''
|
|
|
- // },
|
|
|
+ budget_policy: {
|
|
|
+ title: '预算类型',
|
|
|
+ type: 'dict-select',
|
|
|
+ dict: dict({
|
|
|
+ data: [
|
|
|
+ { value: '', label: '无预算上限' },
|
|
|
+ { value: 'dateRange', label: '日期范围' },
|
|
|
+ { value: 'monthlyRecurring', label: '按月' },
|
|
|
+ ]
|
|
|
+ }),
|
|
|
+ form: {
|
|
|
+ value: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
budget_startDate: {
|
|
|
- title: '开始日期'
|
|
|
+ title: '开始日期',
|
|
|
+ type: 'date',
|
|
|
+ form: {
|
|
|
+ show: compute(context => context.form.budget_policy === "dateRange"),
|
|
|
+ rules: [{required: true, message:'必填项'}]
|
|
|
+ }
|
|
|
},
|
|
|
budget_endDate: {
|
|
|
- title: '结束日期'
|
|
|
+ title: '结束日期',
|
|
|
+ type: 'date',
|
|
|
+ form: {
|
|
|
+ show: compute(context => context.form.budget_policy !== '')
|
|
|
+ }
|
|
|
},
|
|
|
budget_amount: {
|
|
|
- title: '预算'
|
|
|
+ title: '预算',
|
|
|
+ type: 'number',
|
|
|
+ form: {
|
|
|
+ value: 0,
|
|
|
+ show: compute(context => context.form.budget_policy !== ''),
|
|
|
+ rules: [{required: true, message:'必填项'}],
|
|
|
+ component: {
|
|
|
+ min: 0,
|
|
|
+ precision: 2,
|
|
|
+ controlsPosition: "right"
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
inBudget: {
|
|
|
- title: '是否预算内'
|
|
|
+ title: '是否预算内',
|
|
|
+ form: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
},
|
|
|
...BaseColumn
|
|
|
},
|