|
@@ -54,6 +54,12 @@
|
|
label: 'id',
|
|
label: 'id',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ field: 'userId',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ show: false,
|
|
|
|
+ label: 'userId',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
field: 'incrementTypeId',
|
|
field: 'incrementTypeId',
|
|
component: 'ApiSelect',
|
|
component: 'ApiSelect',
|
|
label: '权益类型',
|
|
label: '权益类型',
|
|
@@ -74,9 +80,11 @@
|
|
},
|
|
},
|
|
onChange: (value) => {
|
|
onChange: (value) => {
|
|
console.log('onChange', value);
|
|
console.log('onChange', value);
|
|
|
|
+ let { monthQy = 1, count = 1 } = getFieldsValue()
|
|
|
|
+ let unitStr = value == '3' ? '个月' : '年';
|
|
updateSchema([
|
|
updateSchema([
|
|
{ field: 'monthQy', ifShow: true, componentProps: { options: showOptions( value == '3' ? 12 : 5), } },
|
|
{ field: 'monthQy', ifShow: true, componentProps: { options: showOptions( value == '3' ? 12 : 5), } },
|
|
- { field: 'incrementEndTime', componentProps: { disabled: value == '3' } },
|
|
|
|
|
|
+ { field: 'count', suffix: ( count * monthQy ) + unitStr }
|
|
]);
|
|
]);
|
|
setFieldsValue({
|
|
setFieldsValue({
|
|
monthQy: 1,
|
|
monthQy: 1,
|
|
@@ -122,10 +130,10 @@
|
|
componentProps: {
|
|
componentProps: {
|
|
options: showOptions(5),
|
|
options: showOptions(5),
|
|
onChange: (data) => {
|
|
onChange: (data) => {
|
|
- let { incrementTypeId, counts = 1 } = getFieldsValue()
|
|
|
|
|
|
+ let { incrementTypeId, count = 1 } = getFieldsValue()
|
|
let unit = incrementTypeId == '3' ? 'month' : 'year'
|
|
let unit = incrementTypeId == '3' ? 'month' : 'year'
|
|
let unitStr = incrementTypeId == '3' ? '个月' : '年';
|
|
let unitStr = incrementTypeId == '3' ? '个月' : '年';
|
|
- updateSchema({ field: 'counts', suffix: ( counts * data ) + unitStr });
|
|
|
|
|
|
+ updateSchema({ field: 'count', suffix: ( count * data ) + unitStr });
|
|
setFieldsValue({
|
|
setFieldsValue({
|
|
incrementEndTime: dayjs().add(data, unit).format('YYYY-MM-DD'),
|
|
incrementEndTime: dayjs().add(data, unit).format('YYYY-MM-DD'),
|
|
});
|
|
});
|
|
@@ -136,7 +144,7 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- field: 'counts',
|
|
|
|
|
|
+ field: 'count',
|
|
component: 'InputNumber',
|
|
component: 'InputNumber',
|
|
label: '新增权益数',
|
|
label: '新增权益数',
|
|
required: true,
|
|
required: true,
|
|
@@ -146,7 +154,7 @@
|
|
onChange: (data = 1) => {
|
|
onChange: (data = 1) => {
|
|
let { incrementTypeId, monthQy = 1 } = getFieldsValue();
|
|
let { incrementTypeId, monthQy = 1 } = getFieldsValue();
|
|
let unit = incrementTypeId == '3' ? '个月' : '年';
|
|
let unit = incrementTypeId == '3' ? '个月' : '年';
|
|
- updateSchema({ field: 'counts', suffix: ( monthQy * data ) + unit });
|
|
|
|
|
|
+ updateSchema({ field: 'count', suffix: ( monthQy * data ) + unit });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
colProps: {
|
|
colProps: {
|
|
@@ -239,13 +247,9 @@
|
|
console.log('validate', params);
|
|
console.log('validate', params);
|
|
const apiData = {
|
|
const apiData = {
|
|
...params,
|
|
...params,
|
|
- userId: params.id,
|
|
|
|
- incrementEndTime: params.incrementEndTime,
|
|
|
|
- count: params.counts,
|
|
|
|
};
|
|
};
|
|
const res = await submitUrl(apiData);
|
|
const res = await submitUrl(apiData);
|
|
overviewInfo.value.incrementCount = overviewInfo.value.incrementCount + apiData.count;
|
|
overviewInfo.value.incrementCount = overviewInfo.value.incrementCount + apiData.count;
|
|
- console.log('res', res);
|
|
|
|
otherInfo.updateOverviewInfo();
|
|
otherInfo.updateOverviewInfo();
|
|
closeModal();
|
|
closeModal();
|
|
resetFields();
|
|
resetFields();
|