Merge branch 'hotfix/2.9.42310.02' into release/2.9.42310.01-个税
This commit is contained in:
commit
963b5492ef
|
|
@ -152,7 +152,10 @@ class EditCalcTable extends Component {
|
||||||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
||||||
columns: _.map(traverse(columns), (it, idx) => ({ ...it, fixed: idx < 2 ? "left" : false }))
|
columns: _.every(traverse(columns), (it, idx) => !it.fixed) ? _.map(traverse(columns), (it, idx) => ({
|
||||||
|
...it,
|
||||||
|
fixed: idx < 2 ? "left" : false
|
||||||
|
})) : traverse(columns)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -201,11 +204,12 @@ const traverse = (arr) => {
|
||||||
if (!_.isEmpty(item.children)) {
|
if (!_.isEmpty(item.children)) {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px", ellipsis: true,
|
title: item.text, width: item.width + "px", ellipsis: true,
|
||||||
dataIndex: item.column, children: traverse(item.children)
|
dataIndex: item.column, children: traverse(item.children),
|
||||||
|
fixed: item.fixed || false
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px",
|
title: item.text, width: item.width + "px", fixed: item.fixed || false,
|
||||||
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus
|
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,20 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
}, () => {
|
}, () => {
|
||||||
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
|
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
|
||||||
cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] }).then();
|
cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] })
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
const payload = {
|
||||||
|
exportData: getURLParameters(exportTempUrl).exportData,
|
||||||
|
salaryAcctRecordId, salaryItemIds: salaryItems
|
||||||
|
};
|
||||||
|
this.setState(({
|
||||||
|
exportTempUrl: `/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?${convertToUrlString(payload)}`
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
||||||
|
|
@ -634,7 +634,7 @@ class Index extends Component {
|
||||||
});
|
});
|
||||||
}}>调薪</Button>);
|
}}>调薪</Button>);
|
||||||
}
|
}
|
||||||
selectedKey !== "stop" && arrList.push(<Button type="primary" onClick={this.handleSave}>保存</Button>);
|
(showOperateBtn && selectedKey !== "stop") && arrList.push(<Button type="primary" onClick={this.handleSave}>保存</Button>);
|
||||||
return arrList;
|
return arrList;
|
||||||
};
|
};
|
||||||
//切换tab
|
//切换tab
|
||||||
|
|
@ -730,7 +730,7 @@ class Index extends Component {
|
||||||
paysetParams,
|
paysetParams,
|
||||||
extEmpsWitch
|
extEmpsWitch
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { payrollFilesStore: { tableStore } } = this.props;
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const renderSearch = () => {
|
const renderSearch = () => {
|
||||||
const searchItems = [
|
const searchItems = [
|
||||||
{ com: this.Input("姓名", "username") },
|
{ com: this.Input("姓名", "username") },
|
||||||
|
|
@ -871,6 +871,7 @@ class Index extends Component {
|
||||||
<SalaryFileViewSlide
|
<SalaryFileViewSlide
|
||||||
id={slideParams.id}
|
id={slideParams.id}
|
||||||
selectedKey={selectedKey}
|
selectedKey={selectedKey}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
handleSetpay={this.handleSetpay}
|
handleSetpay={this.handleSetpay}
|
||||||
paysetParams={paysetParams}
|
paysetParams={paysetParams}
|
||||||
onChangePaySetParams={(res) => {
|
onChangePaySetParams={(res) => {
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export default class SalaryItemChangeList extends React.Component {
|
||||||
|
|
||||||
// 获取Columns
|
// 获取Columns
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { salaryFileStore: { singleSalaryItemList }, selectedKey } = this.props;
|
const { salaryFileStore: { singleSalaryItemList }, selectedKey, showOperateBtn } = this.props;
|
||||||
let columns = [];
|
let columns = [];
|
||||||
if (singleSalaryItemList.columns) {
|
if (singleSalaryItemList.columns) {
|
||||||
columns = _.map([...singleSalaryItemList.columns], o => {
|
columns = _.map([...singleSalaryItemList.columns], o => {
|
||||||
|
|
@ -83,7 +83,7 @@ export default class SalaryItemChangeList extends React.Component {
|
||||||
}
|
}
|
||||||
return { ...o, width, render: text => (<span title={text}>{text}</span>) };
|
return { ...o, width, render: text => (<span title={text}>{text}</span>) };
|
||||||
});
|
});
|
||||||
if (selectedKey === "fixed") {
|
if (showOperateBtn && selectedKey === "fixed") {
|
||||||
columns = [...columns, {
|
columns = [...columns, {
|
||||||
dataIndex: "operate", fixed: "right", width: 120, title: "操作",
|
dataIndex: "operate", fixed: "right", width: 120, title: "操作",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,8 @@ export default class SalaryFileViewSlide extends React.Component {
|
||||||
salaryFileStore: { detailForm, adjustSalaryItems, setAdjustSalaryItems },
|
salaryFileStore: { detailForm, adjustSalaryItems, setAdjustSalaryItems },
|
||||||
selectedKey,
|
selectedKey,
|
||||||
handleSetpay,
|
handleSetpay,
|
||||||
paysetParams
|
paysetParams,
|
||||||
|
showOperateBtn
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { baseInfo } = detailForm;
|
const { baseInfo } = detailForm;
|
||||||
const items = [
|
const items = [
|
||||||
|
|
@ -189,7 +190,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
this.state.selectedTab === "0" ?
|
this.state.selectedTab === "0" ?
|
||||||
<SalaryItemChangeList id={this.props.id} selectedKey={selectedKey}/> :
|
<SalaryItemChangeList id={this.props.id} selectedKey={selectedKey} showOperateBtn={showOperateBtn}/> :
|
||||||
<TaxAgentChangeList id={this.props.id}/>
|
<TaxAgentChangeList id={this.props.id}/>
|
||||||
}
|
}
|
||||||
</WeaSearchGroup>
|
</WeaSearchGroup>
|
||||||
|
|
|
||||||
|
|
@ -226,8 +226,7 @@ export default class SalaryItem extends React.Component {
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={handleMenuClick}>
|
<Menu onClick={handleMenuClick}>
|
||||||
<Menu.Item key="1">系统薪资项</Menu.Item>
|
<Menu.Item key="2">{getLabel(111, "新增自定义薪资项")}</Menu.Item>
|
||||||
<Menu.Item key="2">自定义薪资项</Menu.Item>
|
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
@ -236,7 +235,8 @@ export default class SalaryItem extends React.Component {
|
||||||
return (<div style={{ display: "inline-block" }}>
|
return (<div style={{ display: "inline-block" }}>
|
||||||
{
|
{
|
||||||
(showOperateBtn || showSalaryItemBtn) &&
|
(showOperateBtn || showSalaryItemBtn) &&
|
||||||
<Dropdown.Button overlay={menu} type="primary" style={{ marginRight: "10px" }}>新增</Dropdown.Button>
|
<Dropdown.Button overlay={menu} type="primary" onClick={() => handleMenuClick({ key: "1" })}
|
||||||
|
style={{ marginRight: "10px" }}>{getLabel(111, "新增系统薪资项")}</Dropdown.Button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(showOperateBtn || showSalaryItemBtn) &&
|
(showOperateBtn || showSalaryItemBtn) &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue