custom/领悦
This commit is contained in:
parent
658f4fa64f
commit
3bbe58562c
|
|
@ -20,7 +20,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
visible: false, dropdownWidth: 200, value: props.value || ""
|
||||
visible: false, dropdownWidth: 200, value: props.value ? props.value.split(",") : []
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
|
@ -40,12 +40,11 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { dropdownWidth, visible } = this.state;
|
||||
const { options, defaultValue, value } = this.props;
|
||||
const { dropdownWidth, visible, value } = this.state;
|
||||
const { options = [], defaultValue } = this.props;
|
||||
const clsname = classNames({
|
||||
"wea-associative-search-mult": true
|
||||
});
|
||||
console.log(value);
|
||||
return (
|
||||
<div className={`customMuiSelect wea-associative-search ${clsname}`} ref="customSelectMui">
|
||||
<Select
|
||||
|
|
|
|||
|
|
@ -12,4 +12,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ant-select-selection--multiple {
|
||||
max-height: 28px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
|||
import { Button, message } from "antd";
|
||||
import { vouchersConditions } from "./conditions";
|
||||
import { commonEnumList } from "../../../../apis/ruleconfig";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -48,7 +48,7 @@ class GenerateVouchersDialog extends Component {
|
|||
};
|
||||
save = () => {
|
||||
const { LYStore: { form }, ffgsqc, salaryMonth, ffgsqcLabel } = this.props;
|
||||
const payload = { ...form.getFormParams(), salaryMonth, ffgsqc };
|
||||
let payload = { ...form.getFormParams(), salaryMonth, ffgsqc };
|
||||
if (!salaryMonth) {
|
||||
message.warning(getLabel(111, "薪资所属月参数不能为空"));
|
||||
return;
|
||||
|
|
@ -59,7 +59,11 @@ class GenerateVouchersDialog extends Component {
|
|||
}
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/customPage_vouchers_lingyue?${convertToUrlString(payload)}`, "_blank");
|
||||
const { ffgsqc } = payload;
|
||||
_.forEach(ffgsqc.split(","), item => {
|
||||
payload = { ...payload, ffgsqc: item };
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/customPage_vouchers_lingyue?${convertToUrlString(payload)}`, "_blank");
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class List extends Component {
|
|||
|
||||
getLYList = (isSum = true) => {
|
||||
const { query, type, onInit } = this.props, { pageInfo, selectedRowKeys } = this.state;
|
||||
const payload = { ...pageInfo, ...query };
|
||||
const payload = { ...pageInfo, ...query, ffgsqc: query.ffgsqc ? query.ffgsqc.split(",") : [] };
|
||||
this.setState({ loading: true });
|
||||
interfaceType[type]["list"](payload).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
|
|||
|
|
@ -33,9 +33,8 @@ class Layout extends Component {
|
|||
onChange={value => onChange({ ...query, salaryMonth: value, isQuery: !isQuery })}/>
|
||||
</WeaFormItem>,
|
||||
<WeaFormItem label={ffgsqcLabel} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<CustomSelect options={companyOpts} onChange={(val) => console.log(val)}/>
|
||||
{/*<WeaInputSearch value={ffgsqc} onChange={value => onChange({ ...query, ffgsqc: value })}*/}
|
||||
{/* onSearch={() => onChange({ ...query, isQuery: !isQuery })}/>*/}
|
||||
<CustomSelect value={ffgsqc} options={companyOpts}
|
||||
onChange={value => onChange({ ...query, ffgsqc: value, isQuery: !isQuery })}/>
|
||||
</WeaFormItem>
|
||||
];
|
||||
const dropMenuDatas = [
|
||||
|
|
|
|||
|
|
@ -19,23 +19,34 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false
|
||||
query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false,
|
||||
companyOpts: []
|
||||
};
|
||||
this.listRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
API.getLYPermission().then(({ status, data }) => this.setState({ lyAuth: !!status && !!data }));
|
||||
this.getSIReportGmgsList();
|
||||
}
|
||||
|
||||
getSIReportGmgsList = () => {
|
||||
const { query } = this.state;
|
||||
const { salaryMonth } = query;
|
||||
API.getSIReportGmgsList({ salaryMonth }).then(({ status, data }) => {
|
||||
if (status) this.setState({ companyOpts: _.map(data, o => ({ ...o, name: o.content })) });
|
||||
});
|
||||
};
|
||||
|
||||
handleLayoutChange = ({ isQuery, ...val }) => this.setState({ query: { ...this.state.query, ...val } },
|
||||
() => this.setState({ isQuery }));
|
||||
|
||||
render() {
|
||||
const { query, isQuery, lyAuth } = this.state;
|
||||
const { query, isQuery, lyAuth, companyOpts } = this.state;
|
||||
return (
|
||||
<Layout title={getLabel(111, "社保公积金汇总表")} query={query} onChange={this.handleLayoutChange}
|
||||
listRef={this.listRef} isQuery={isQuery} lyAuth={lyAuth} ffgsqcLabel={getLabel(111, "购买公司全称")}>
|
||||
companyOpts={companyOpts} listRef={this.listRef}
|
||||
isQuery={isQuery} lyAuth={lyAuth} ffgsqcLabel={getLabel(111, "购买公司全称")}>
|
||||
<List query={query} isQuery={isQuery} type="socialFundSum" ref={dom => this.listRef = dom}
|
||||
onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")}/>
|
||||
</Layout>
|
||||
|
|
|
|||
Loading…
Reference in New Issue