release/2.15.2.2409.01
This commit is contained in:
parent
600bba8619
commit
1a0f594753
|
|
@ -18,8 +18,7 @@ import * as API from "../../../../apis/variableSalary";
|
|||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("baseTableStore")
|
||||
@observer
|
||||
@inject("baseTableStore") @observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -43,36 +42,35 @@ class Index extends Component {
|
|||
const { data: taxAgentOption } = await API.getAdminTaxAgentList();
|
||||
API.getCreateForm().then(({ data }) => {
|
||||
this.setState({
|
||||
conditions: [
|
||||
..._.map(salaryFileConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || "",
|
||||
options: _.map(taxAgentOption, (o, i) => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
conditions: [..._.map(salaryFileConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || ""
|
||||
...o,
|
||||
viewAttr: !_.isEmpty(detail) ? 1 : 3,
|
||||
label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || "",
|
||||
options: _.map(taxAgentOption, (o, i) => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
})
|
||||
})),
|
||||
{
|
||||
items: _.map(data, o => ({
|
||||
conditionType: "INPUT",
|
||||
domkey: [String(o.id)],
|
||||
fieldcol: 14,
|
||||
label: o.name,
|
||||
labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "",
|
||||
viewAttr: 2
|
||||
})),
|
||||
title: "", col: 2,
|
||||
defaultshow: true
|
||||
}
|
||||
]
|
||||
}
|
||||
return {
|
||||
...o,
|
||||
viewAttr: !_.isEmpty(detail) ? 1 : 3,
|
||||
label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || ""
|
||||
};
|
||||
})
|
||||
})), {
|
||||
items: _.map(data, o => ({
|
||||
conditionType: "INPUT",
|
||||
domkey: [String(o.id)],
|
||||
fieldcol: 14,
|
||||
label: o.name,
|
||||
labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "",
|
||||
viewAttr: 2
|
||||
})), title: "", col: 2, defaultshow: true
|
||||
}]
|
||||
}, () => {
|
||||
VSSalaryFileForm.initFormFields(this.state.conditions);
|
||||
if (!_.isEmpty(detail)) {
|
||||
|
|
@ -98,7 +96,7 @@ class Index extends Component {
|
|||
}, {});
|
||||
};
|
||||
save = () => {
|
||||
const { baseTableStore: { VSSalaryFileForm }, onSearch, id } = this.props;
|
||||
const { baseTableStore: { VSSalaryFileForm }, onSearch, detail: { id } } = this.props;
|
||||
VSSalaryFileForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = VSSalaryFileForm.getFormParams();
|
||||
|
|
@ -119,7 +117,7 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { loading } = this.state, { title, detail } = this.props;
|
||||
const { loading } = this.state, { title } = this.props;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue