custom-艾志工业-合并个税

This commit is contained in:
黎永顺 2023-10-30 15:43:12 +08:00
parent dc93634385
commit 7d0a4872dd
4 changed files with 29 additions and 26 deletions

View File

@ -193,7 +193,7 @@ class Index extends Component {
const { dataSource, pageInfo, selectedKey, selectedRowKeys } = this.state;
if (type === "init") {
this.postMessageToChild({
columns, dataSource, showOperateBtn: !isDepAuth && showOperateBtn,
columns, dataSource, showOperateBtn: showOperateBtn,
selectedKey, showSum: false, pageInfo, selectedRowKeys
});
} else if (type === "turn") {
@ -398,7 +398,7 @@ class Index extends Component {
getRightOptionBtns = () => {
const { selectedKey, importType, selectedRowKeys, searchItemsValue, pageInfo } = this.state;
const { taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
if (selectedKey === "pending" && (!isDepAuth && showOperateBtn)) {
if (selectedKey === "pending" && showOperateBtn) {
return [
<Button type="primary" onClick={() => {
this.importRef.handleMenuClick({ key: "PENDING" });
@ -425,7 +425,7 @@ class Index extends Component {
}}/></Button>
</Dropdown>
];
} else if (selectedKey === "fixed" && (!isDepAuth && showOperateBtn)) {
} else if (selectedKey === "fixed" && showOperateBtn) {
return [
<WeaHelpfulTip
width={300}
@ -454,7 +454,7 @@ class Index extends Component {
}}/></Button>
</Dropdown>
];
} else if (selectedKey === "suspend" && (!isDepAuth && showOperateBtn)) {
} else if (selectedKey === "suspend" && showOperateBtn) {
return [
<Dropdown overlay={
<AllWithoutPay
@ -491,7 +491,7 @@ class Index extends Component {
}}/></Button>
</Dropdown>
];
} else if (selectedKey === "stop" && (!isDepAuth && showOperateBtn)) {
} else if (selectedKey === "stop" && showOperateBtn) {
return [
<Dropdown overlay={
<BatchSuspendsPay
@ -516,7 +516,7 @@ class Index extends Component {
}}/></Button>
</Dropdown>
];
} else if (selectedKey === "ext" && (!isDepAuth && showOperateBtn)) {
} else if (selectedKey === "ext" && showOperateBtn) {
return [
<WeaHelpfulTip
width={300}
@ -551,7 +551,7 @@ class Index extends Component {
ellipsis: true
}));
this.postMessageToChild({
columns, showOperateBtn: (!isDepAuth && showOperateBtn), selectedKey: this.state.selectedKey,
columns, showOperateBtn: showOperateBtn, selectedKey: this.state.selectedKey,
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
showSum: false, pageInfo: this.state.pageInfo
});
@ -618,13 +618,13 @@ class Index extends Component {
const { slideParams: { id }, salaryAdjustmentInfo, selectedKey } = this.state;
const { isShow, url } = salaryAdjustmentInfo;
let arrList = [];
if ((!isDepAuth && showOperateBtn) && isShow === "true" && selectedKey === "fixed") {
if (showOperateBtn && isShow === "true" && selectedKey === "fixed") {
arrList.push(<Button type="primary" onClick={() => {
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
window.open(`${linkUrl}&salaryArchiveId=${id}`);
}}>发起调薪</Button>);
}
if ((!isDepAuth && showOperateBtn) && (selectedKey === "fixed" || selectedKey === "ext")) {
if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) {
arrList.push(<Button type="primary" onClick={() => {
this.setState({
adjLogRecordDialog: {
@ -634,7 +634,8 @@ class Index extends Component {
});
}}>调薪</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;
};
//切换tab
@ -730,7 +731,7 @@ class Index extends Component {
paysetParams,
extEmpsWitch
} = this.state;
const { payrollFilesStore: { tableStore } } = this.props;
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
const renderSearch = () => {
const searchItems = [
{ com: this.Input("姓名", "username") },
@ -870,6 +871,7 @@ class Index extends Component {
content={
<SalaryFileViewSlide
id={slideParams.id}
showOperateBtn={showOperateBtn}
selectedKey={selectedKey}
handleSetpay={this.handleSetpay}
paysetParams={paysetParams}

View File

@ -59,7 +59,7 @@ export default class SalaryItemChangeList extends React.Component {
// 获取Columns
getColumns = () => {
const { salaryFileStore: { singleSalaryItemList }, selectedKey } = this.props;
const { salaryFileStore: { singleSalaryItemList }, selectedKey, showOperateBtn } = this.props;
let columns = [];
if (singleSalaryItemList.columns) {
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>) };
});
if (selectedKey === "fixed") {
if (showOperateBtn && selectedKey === "fixed") {
columns = [...columns, {
dataIndex: "operate", fixed: "right", width: 120, title: "操作",
render: (text, record) => {

View File

@ -89,7 +89,8 @@ export default class SalaryFileViewSlide extends React.Component {
salaryFileStore: { detailForm, adjustSalaryItems, setAdjustSalaryItems },
selectedKey,
handleSetpay,
paysetParams
paysetParams,
showOperateBtn
} = this.props;
const { baseInfo } = detailForm;
const items = [
@ -199,7 +200,7 @@ export default class SalaryFileViewSlide extends React.Component {
>
{
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}/>
}
</WeaSearchGroup>

View File

@ -163,29 +163,29 @@ export default class Archives extends React.Component {
return (
<div className="optWrapper">
<a href="javascript:void(0);" className="mr10"
onClick={() => this.handleEdit(record)}>{((!isDepAuth || showOperateBtn) && selectedKey !== "stop") ? "编辑" : "查看"}</a>
onClick={() => this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"}</a>
{
(!isDepAuth && showOperateBtn) && selectedKey === "pending" &&
showOperateBtn && selectedKey === "pending" &&
<a href="javascript:void(0);" className="mr10"
onClick={() => this.stayAddToPay([record.baseInfo])}>增员</a>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "suspend" &&
showOperateBtn && selectedKey === "suspend" &&
<a href="javascript:void(0);" className="mr10"
onClick={() => this.stayDelToStop([record.baseInfo])}>减员</a>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
<a href="javascript:void(0);" className="mr10"
onClick={() => this.deleteSocialArchive([record.baseInfo])}>删除档案</a>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
<a href="javascript:void(0);"
onClick={() => this.cancelStopPayment([record.baseInfo])}>取消停缴</a>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "pending" &&
showOperateBtn && selectedKey === "pending" &&
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
@ -223,7 +223,7 @@ export default class Archives extends React.Component {
</Popover>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "suspend" &&
showOperateBtn && selectedKey === "suspend" &&
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
@ -242,7 +242,7 @@ export default class Archives extends React.Component {
</Popover>
}
{
(!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
@ -821,7 +821,7 @@ export default class Archives extends React.Component {
>
<WeaTab
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(tabCondition) : tabCondition}
buttons={(!isDepAuth && showOperateBtn) ? btns : []}
buttons={showOperateBtn ? btns : []}
counts={tabCount}
countParam="groupid" //数量
keyParam="viewcondition" //主键
@ -887,9 +887,9 @@ export default class Archives extends React.Component {
}
editable={false}
selectedTab={selectedTab}
showOperateBtn={!isDepAuth && showOperateBtn}
showOperateBtn={showOperateBtn}
customOperate={
((!isDepAuth && showOperateBtn) && selectedKey !== "stop" && selectedTab != 0) ?
(showOperateBtn && selectedKey !== "stop" && selectedTab != 0) ?
[<Button type="primary" onClick={() => this.handleEditSlideSave()}>保存</Button>] : []
}
subItemChange={selectedTab => this.setState({ selectedTab })}