custom/领悦业务线
This commit is contained in:
parent
b33b9990b1
commit
70f2d606fd
|
|
@ -67,7 +67,7 @@ export default class FormInfo extends Component {
|
|||
}
|
||||
}
|
||||
coms != null && formItems.push({
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>), hide: field.hide,
|
||||
col
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import FormInfo from "../../../components/FormInfo";
|
|||
import { getffgsAllList } from "../../../apis/custom-apis/lingyue";
|
||||
import { baseConditions } from "./components/conditions";
|
||||
import CustomSelect from "../../../components/CustomSelect";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import moment from "moment";
|
||||
import { Button } from "antd";
|
||||
|
|
@ -28,22 +29,29 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.init();
|
||||
const promise = this.init();
|
||||
}
|
||||
|
||||
init = () => {
|
||||
getffgsAllList().then(({ status, data }) => {
|
||||
if (status) this.setState({
|
||||
conditions: _.map(baseConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "fycdgsqc") {
|
||||
return { ...o, options: _.map(data, o => ({ ...o, name: o.content })) };
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label), value: moment().format("YYYY-MM") };
|
||||
})
|
||||
}))
|
||||
}, () => this.props.form.initFormFields(this.state.conditions));
|
||||
});
|
||||
init = async () => {
|
||||
const [{ data: fycdgsOptions }, { data: taxAgentList }] = await Promise.all([
|
||||
getffgsAllList(),
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
]);
|
||||
this.setState({
|
||||
conditions: _.map(baseConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "fycdgsqc") {
|
||||
return { ...o, options: _.map(fycdgsOptions, o => ({ ...o, name: o.content })) };
|
||||
} else if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o, hide: this.props.type === "salaryStatistic",
|
||||
options: _.map(taxAgentList, o => ({ key: String(o.id), showname: o.name }))
|
||||
};
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label), value: moment().format("YYYY-MM") };
|
||||
})
|
||||
}))
|
||||
}, () => this.props.form.initFormFields(this.state.conditions));
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
@ -62,13 +70,17 @@ class Layout extends Component {
|
|||
salaryMonth: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
||||
onChange={onChange}/>);
|
||||
},
|
||||
taxAgentIds: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
||||
onChange={onChange}/>);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTop title={title} icon={<i className="icon-coms-fa"/>} buttons={buttons} showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" className="custom_salary_lingyue">
|
||||
<div className="lingyue-body">
|
||||
<FormInfo className="baseLayoutQuery_lingyue" center={false} colCount={2} form={form}
|
||||
<FormInfo className="baseLayoutQuery_lingyue" center={false} colCount={3} form={form}
|
||||
formFields={conditions} itemRender={itemRender}/>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ export default class BaseReportList extends Component {
|
|||
const { form, type } = this.props, { pageInfo, selectedRowKeys, sumDataSource } = this.state;
|
||||
const payload = {
|
||||
...pageInfo, ...form.getFormParams(),
|
||||
fycdgsqc: form.getFormParams().fycdgsqc ? form.getFormParams().fycdgsqc.split(",") : []
|
||||
fycdgsqc: form.getFormParams().fycdgsqc ? form.getFormParams().fycdgsqc.split(",") : [],
|
||||
taxAgentIds: form.getFormParams().taxAgentIds ? form.getFormParams().taxAgentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
interfaceType[type]["list"](payload).then(({ status, data, errormsg }) => {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ export const baseConditions = [
|
|||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["salaryMonth"],
|
||||
fieldcol: 16,
|
||||
|
|
@ -55,7 +54,18 @@ export const baseConditions = [
|
|||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 16,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
multiple: true,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["fycdgsqc"],
|
||||
fieldcol: 16,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const { isQuery } = this.state;
|
||||
return (<BaseLayout title={getLabel(111, "薪资发放表")} form={form} onExport={this.handleExport}
|
||||
onChange={() => this.setState({ isQuery: !isQuery })}>
|
||||
onChange={() => this.setState({ isQuery: !isQuery })} type="paymentReport">
|
||||
<BaseReportList form={form} type="paymentReport" isQuery={isQuery}/>
|
||||
</BaseLayout>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { isQuery } = this.state;
|
||||
return (<BaseLayout title={getLabel(111, "薪资统计表(部门)")} form={form} onExport={this.handleExport}
|
||||
onChange={() => this.setState({ isQuery: !isQuery })}>
|
||||
return (<BaseLayout title={getLabel(111, "薪酬汇总表(人力)")} form={form} onExport={this.handleExport}
|
||||
onChange={() => this.setState({ isQuery: !isQuery })} type="salaryStatistic">
|
||||
<BaseReportList form={form} type="salaryStatistic" isQuery={isQuery}/>
|
||||
</BaseLayout>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const { isQuery } = this.state;
|
||||
return (<BaseLayout title={getLabel(111, "薪资报税表")} form={form} onExport={this.handleExport}
|
||||
onChange={() => this.setState({ isQuery: !isQuery })}>
|
||||
onChange={() => this.setState({ isQuery: !isQuery })} type="taxReturn">
|
||||
<BaseReportList form={form} type="taxReturn" isQuery={isQuery}/>
|
||||
</BaseLayout>);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue