Merge branch 'release/2.15.2.2409.01' into release/2.15.2.2409.01-个税
This commit is contained in:
commit
9919bf627b
|
|
@ -1,3 +1,4 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { WeaButtonIcon, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
|
||||
|
|
|
|||
|
|
@ -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,23 +42,25 @@ class Index extends Component {
|
|||
const { data: taxAgentOption } = await API.getAdminTaxAgentList();
|
||||
API.getCreateForm().then(({ data }) => {
|
||||
this.setState({
|
||||
conditions: [
|
||||
..._.map(salaryFileConditions, item => ({
|
||||
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),
|
||||
...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 }))
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
|
||||
...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)],
|
||||
|
|
@ -68,11 +69,8 @@ class Index extends Component {
|
|||
labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "",
|
||||
viewAttr: 2
|
||||
})),
|
||||
title: "", col: 2,
|
||||
defaultshow: true
|
||||
}
|
||||
]
|
||||
})), 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>
|
||||
|
|
@ -137,7 +135,7 @@ class Index extends Component {
|
|||
return (<WeaSlideModal
|
||||
className="variable_salary_file_dialog" {...this.props} direction="right" onClose={() => onClose()}
|
||||
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
|
||||
content={<div className="form-dialog-layout">{getSearchs(VSSalaryFileForm, conditions)}</div>}
|
||||
content={<div className="form-dialog-layout">{getSearchs(VSSalaryFileForm, conditions, 2, false)}</div>}
|
||||
/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,14 +24,18 @@ const WeaTableComx = WeaTableNew.WeaTable;
|
|||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("baseTableStore")
|
||||
@observer
|
||||
@inject("baseTableStore") @observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: [],
|
||||
selectedRowKeys: [], condtions: [], showSearchAd: false
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
selectedRowKeys: [],
|
||||
condtions: [],
|
||||
showSearchAd: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +47,8 @@ class Index extends Component {
|
|||
...item, items: _.map(item.items, child => {
|
||||
if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child, label: getLabel(child.lanId, child.label),
|
||||
...child,
|
||||
label: getLabel(child.lanId, child.label),
|
||||
options: _.map(taxAgentOption, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
|
|
@ -113,8 +118,7 @@ class Index extends Component {
|
|||
const { list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -125,9 +129,7 @@ class Index extends Component {
|
|||
};
|
||||
handleDelete = (ids) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认删除吗?"),
|
||||
onOk: () => {
|
||||
title: getLabel(111, "信息确认"), content: getLabel(111, "确认删除吗?"), onOk: () => {
|
||||
API.deleteVariableSalary({ ids }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "删除成功"));
|
||||
|
|
@ -142,21 +144,27 @@ class Index extends Component {
|
|||
getColumns = () => {
|
||||
const { baseTableStore: { SFTableStore }, showOperateBtn } = this.props;
|
||||
const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||
dataIndex: it.dataIndex, title: it.title, align: "left",
|
||||
width: 150, ellipsis: true
|
||||
dataIndex: it.dataIndex, title: it.title, align: "left", width: 150, ellipsis: true
|
||||
}));
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
columns, showOperateBtn, dataSource: this.state.dataSource, scrollHeight: 95,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "variableSalary", selectedRowKeys: this.state.selectedRowKeys
|
||||
columns,
|
||||
showOperateBtn,
|
||||
dataSource: this.state.dataSource,
|
||||
scrollHeight: 95,
|
||||
pageInfo: this.state.pageInfo,
|
||||
unitTableType: "variableSalary",
|
||||
selectedRowKeys: this.state.selectedRowKeys
|
||||
});
|
||||
}
|
||||
return columns;
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"),
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"操作": getLabel(30585, "操作"),
|
||||
"编辑": getLabel(111, "编辑"),
|
||||
"共": getLabel(18609, "共"),
|
||||
"条": getLabel(18256, "条"),
|
||||
"删除": getLabel(111, "删除")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
|
|
@ -172,15 +180,18 @@ class Index extends Component {
|
|||
if (dom && dataSource.length > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 46 + 108 : dataSource.length < 10 ? dataSource.length * 46 + 108 : parseFloat(dom.style.height) - 62;
|
||||
}
|
||||
return (
|
||||
<React.Fragment>
|
||||
return (<React.Fragment>
|
||||
<div className="extraFormQuery form-dialog-layout">
|
||||
{getSearchs(VExtraSalryForm, condtions, 2, false, () => this.getVariableSalaryList())}
|
||||
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.getVariableSalaryList()}/>
|
||||
onAdvanceSearch={this.getVariableSalaryList}/>
|
||||
</div>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.handleAdvanceSearch}/>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })}
|
||||
onAdSearch={() => {
|
||||
this.openAdvanceSearch();
|
||||
this.getVariableSalaryList();
|
||||
}}/>
|
||||
</div>
|
||||
<div style={{ height: height + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
|
|
@ -194,8 +205,7 @@ class Index extends Component {
|
|||
</div>
|
||||
<WeaTableComx style={{ display: "none" }} comsWeaTableStore={SFTableStore} needScroll={true}
|
||||
columns={this.getColumns()}/>
|
||||
</React.Fragment>
|
||||
);
|
||||
</React.Fragment>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ export const salaryFileConditions = [
|
|||
labelcol: 8,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
SFDialog: {
|
||||
...this.state.SFDialog, visible: true, detail,
|
||||
title: _.isEmpty(detail) ? getLabel(111, "新增薪资档案") : getLabel(111, "编辑薪资档案")
|
||||
title: _.isEmpty(detail) ? getLabel(111, "新增浮动数据") : getLabel(111, "编辑浮动数据")
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue