release/3.0.1.2504.01-合并业务线
This commit is contained in:
parent
1cbb7ce943
commit
950fa50d26
|
|
@ -40,3 +40,7 @@ export const pushRecords = (params) => {
|
|||
export const withdrawRecords = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/withdraw", params);
|
||||
};
|
||||
//创建推送记录
|
||||
export const createPushRecords = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/create", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
import moment from "moment";
|
||||
import FormInfo from "../../../../components/FormInfo";
|
||||
import { RQconditions } from "../../conditions";
|
||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||
import { getSalaryAcctList } from "../../../../apis/calculate";
|
||||
import { createPushRecords } from "../../../../apis/datapush";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { Button, message } from "antd";
|
||||
import moment from "moment";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -73,7 +74,16 @@ class CreatePushRecordDialog extends Component {
|
|||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
save = (record) => {
|
||||
console.log(record);
|
||||
this.setState({ loading: true });
|
||||
createPushRecords({ salaryAcctRecordIds: [record.id] }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
@ -117,14 +127,18 @@ class CreatePushRecordDialog extends Component {
|
|||
return [{ com: coms, col: 2 }];
|
||||
}
|
||||
};
|
||||
console.log(this.refs.recordRef);
|
||||
return (<WeaDialog {...this.props} style={{ width: 1000 }} initLoadCss className="record-dialog"
|
||||
title={getLabel(111, "创建推送记录")} ref="recordRef" buttons={[
|
||||
const scrollHeight = this.refs.recordRef ? this.refs.recordRef.state.height - 162 : 606;
|
||||
|
||||
return (<WeaDialog {...this.props} initLoadCss className="record-dialog" title={getLabel(111, "创建推送记录")}
|
||||
ref="recordRef" style={{
|
||||
width: 1000, height: 606, minHeight: 200, minWidth: 380, maxHeight: "70%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={[
|
||||
<Button onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
|
||||
]}>
|
||||
<FormInfo className="record-form" center={false} itemRender={itemRender} colCount={2}
|
||||
form={form} formFields={conditions} childrenComponents={childrenComponents}/>
|
||||
<WeaTable className="wea-browser-table-cursor" rowKey="id" scroll={{ y: "calc(100vh - 152px)" }}
|
||||
<WeaTable className="wea-browser-table-cursor" rowKey="id" scroll={{ y: scrollHeight + "px" }}
|
||||
dataSource={dataSource} loading={loading} pagination={pagination} columns={columns}
|
||||
onRowClick={this.save}/>
|
||||
</WeaDialog>);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ class Index extends Component {
|
|||
<PushDetailDialog {...pushDetailDialog} onClose={() => this.setState({
|
||||
pushDetailDialog: { ...pushDetailDialog, visible: false }
|
||||
})}/>
|
||||
<CreatePushRecordDialog visible={visible} onCancel={() => this.setState({ visible: false })}/>
|
||||
<CreatePushRecordDialog visible={visible} onSuccess={this.handleAdvanceSearch}
|
||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
||||
</WeaReqTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue