Commit cf99d9e8 authored by baixian's avatar baixian

积分管理

parent 6c9749d1
......@@ -14,10 +14,19 @@ class Integralsetting extends React.Component {
this.props.form.validateFields((err, values) => {
if (!err) {
const params = [];
// eslint-disable-next-line no-empty
for (let i = 0; i < values; i++) {
const arr = Object.keys(values).length;
const obj = {};
for (let i = 1; i <= arr; i++) {
const value = `daily_limit${i}`;
const value1 = `single${i}`;
if (values[value]) {
obj[i] = {
daily_limit: values[value],
single: values[value1],
};
}
}
console.log('Received values of form: ', values);
console.log('Received values of form: ', obj);
}
});
}
......@@ -27,6 +36,9 @@ class Integralsetting extends React.Component {
onChange =(value) => {
console.log(value);
}
onChangeNumber =(value) => {
console.log(value);
}
render() {
const {
staticcenter,
......@@ -64,7 +76,7 @@ class Integralsetting extends React.Component {
每日打卡 <span className={pageStyle.checkboxTip}>(学员每日登录打卡)</span>
</div>
<div className={pageStyle.formItem}>
<Form.Item className={pageStyle.formflex} label="获得" >{getFieldDecorator('single1', { initialValue: 2 })(<InputNumber style={{ width: 90 }} min={0} />)}
<Form.Item className={pageStyle.formflex} label="获得" >{getFieldDecorator('single1', { initialValue: 2 })(<InputNumber onChange={this.onChangeNumber} style={{ width: 90 }} min={0} />)}
<span className="ant-form-text"> 积分</span>
</Form.Item>
<Form.Item className={pageStyle.formflex} label="每日" >
......
......@@ -114,6 +114,9 @@ class StoreMgt extends React.Component {
}
editCoupon = (record) => {
const { dispatch } = this.props;
this.setState({
isEdit: 1,
});
dispatch({
type: 'integral/integralModelGoodEdit',
payload: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment