From 7d0a4872dd54ad91608e4a98007f2d13080d0970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 30 Oct 2023 15:43:12 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E8=89=BE=E5=BF=97=E5=B7=A5=E4=B8=9A-?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 24 ++++++++++--------- .../pages/salaryFile/salaryItemChangeList.js | 4 ++-- .../pages/salaryFile/saralyFileViewSlide.js | 5 ++-- .../socialSecurityBenefits/archives/index.js | 22 ++++++++--------- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 6430a5ed..b60c7750 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -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 [ ]; - } else if (selectedKey === "fixed" && (!isDepAuth && showOperateBtn)) { + } else if (selectedKey === "fixed" && showOperateBtn) { return [ ]; - } else if (selectedKey === "suspend" && (!isDepAuth && showOperateBtn)) { + } else if (selectedKey === "suspend" && showOperateBtn) { return [ ]; - } else if (selectedKey === "stop" && (!isDepAuth && showOperateBtn)) { + } else if (selectedKey === "stop" && showOperateBtn) { return [ ]; - } else if (selectedKey === "ext" && (!isDepAuth && showOperateBtn)) { + } else if (selectedKey === "ext" && showOperateBtn) { return [ { const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`; window.open(`${linkUrl}&salaryArchiveId=${id}`); }}>发起调薪); } - if ((!isDepAuth && showOperateBtn) && (selectedKey === "fixed" || selectedKey === "ext")) { + if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) { arrList.push(); } - selectedKey !== "stop" && arrList.push(); + (showOperateBtn && selectedKey !== "stop") && arrList.push(); 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={ { - 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 => ({text}) }; }); - if (selectedKey === "fixed") { + if (showOperateBtn && selectedKey === "fixed") { columns = [...columns, { dataIndex: "operate", fixed: "right", width: 120, title: "操作", render: (text, record) => { diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index f3c01f9a..1f733f6e 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -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" ? - : + : } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index cd7a683a..d7bca84d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -163,29 +163,29 @@ export default class Archives extends React.Component { return (
this.handleEdit(record)}>{((!isDepAuth || showOperateBtn) && selectedKey !== "stop") ? "编辑" : "查看"} + onClick={() => this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"} { - (!isDepAuth && showOperateBtn) && selectedKey === "pending" && + showOperateBtn && selectedKey === "pending" && this.stayAddToPay([record.baseInfo])}>增员 } { - (!isDepAuth && showOperateBtn) && selectedKey === "suspend" && + showOperateBtn && selectedKey === "suspend" && this.stayDelToStop([record.baseInfo])}>减员 } { - (!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" && + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" && this.deleteSocialArchive([record.baseInfo])}>删除档案 } { - (!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete !== "1" && + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" && this.cancelStopPayment([record.baseInfo])}>取消停缴 } { - (!isDepAuth && showOperateBtn) && selectedKey === "pending" && + showOperateBtn && selectedKey === "pending" && } { - (!isDepAuth && showOperateBtn) && selectedKey === "suspend" && + showOperateBtn && selectedKey === "suspend" && } { - (!isDepAuth && showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" && + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" && this.handleEditSlideSave()}>保存] : [] } subItemChange={selectedTab => this.setState({ selectedTab })}