custom/领悦业务线
This commit is contained in:
parent
0f3c40280c
commit
4ec1a851b9
|
|
@ -55,7 +55,7 @@ class Layout extends Component {
|
|||
fycdgsqc: (field, textAreaProps, form, formParams) => {
|
||||
return (<CustomSelect value={formParams.fycdgsqc} options={field.options}
|
||||
onChange={v => {
|
||||
v && form.updateFields({ fycdgsqc: { value: v } });
|
||||
form.updateFields({ fycdgsqc: { value: v } });
|
||||
onChange();
|
||||
}}/>);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ export default class BaseReportList extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false, selectedRowKeys: [], sumDataSource: {}, payload: {}, visible: false,
|
||||
voucherDialog: { visible: false, ffgsqcLabel: props.ffgsqcLabel, type: props.type }
|
||||
loading: false, selectedRowKeys: [], sumDataSource: {}, payload: {}, visible: false
|
||||
};
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
|
@ -80,7 +79,7 @@ export default class BaseReportList extends Component {
|
|||
};
|
||||
|
||||
getLYList = (updateSum = false) => {
|
||||
const { form, type } = this.props, { pageInfo, selectedRowKeys } = this.state;
|
||||
const { form, type } = this.props, { pageInfo, selectedRowKeys, sumDataSource } = this.state;
|
||||
const payload = {
|
||||
...pageInfo, ...form.getFormParams(),
|
||||
fycdgsqc: form.getFormParams().fycdgsqc ? form.getFormParams().fycdgsqc.split(",") : []
|
||||
|
|
@ -96,13 +95,13 @@ export default class BaseReportList extends Component {
|
|||
}, () => {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo: this.state.pageInfo, selectedRowKeys, unitTableType: "custom_lingyue",
|
||||
columns: traverseCols(columns), showTotalCell: true, sumDataSource: {},
|
||||
columns: traverseCols(columns), showTotalCell: true, sumDataSource,
|
||||
scrollHeight: !_.isEmpty(dataSource) ? 195 : 0
|
||||
});
|
||||
});
|
||||
!updateSum && this.getLYListSum({
|
||||
dataSource, pageInfo: { current, pageSize, total }, selectedRowKeys, unitTableType: "custom_lingyue",
|
||||
columns: traverseCols(columns), showTotalCell: true, sumDataSource: {},
|
||||
columns: traverseCols(columns), showTotalCell: true, sumDataSource,
|
||||
scrollHeight: !_.isEmpty(dataSource) ? 195 : 0
|
||||
}, payload);
|
||||
} else {
|
||||
|
|
@ -113,7 +112,9 @@ export default class BaseReportList extends Component {
|
|||
getLYListSum = (result = {}, payload) => {
|
||||
const { type } = this.props;
|
||||
interfaceType[type]["sum"](payload).then(({ status, data }) => {
|
||||
if (status) this.postMessageToChild({ ...result, sumDataSource: data.sumRow });
|
||||
if (status) this.setState({ sumDataSource: data.sumRow }, () => this.postMessageToChild({
|
||||
...result, sumDataSource: data.sumRow
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue