From 4bb3bc403a9748da83ab9c0f1bbebfaaac330285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 26 Sep 2023 16:38:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feature/2.9.42310.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=AF=BC=E5=87=BAPDF=2020230926?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollGrant/index.js | 48 +++++++++++++++---- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index d52797f0..7818af09 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -306,7 +306,6 @@ export default class PayrollGrant extends React.Component { const { selectedKey, showFeedbackColumn } = this.state; const { payrollStore } = this.props; const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore; - const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0"; return _.map([ ..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))), { @@ -315,14 +314,37 @@ export default class PayrollGrant extends React.Component { dataIndex: "", display: true, render: (text, record) => { - if (record.sendStatus === "1" && salarySendDetailBaseInfo.canSend) { - return ( - this.handleWithdraw({ ids: [record.id] })}> - 撤回 - - ); + if (record.sendStatus === "1") { + if (salarySendDetailBaseInfo.canSend) { + return ( + + this.handleWithdraw({ ids: [record.id] })}> + 撤回 + + { + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?id=${record.id}`, "_blank"); + }}> + {getLabel(111, "导出PDF")} + + + ); + } else { + return ( + + { + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?id=${record.id}`, "_blank"); + }}> + {getLabel(111, "导出PDF")} + + + ); + } } else if (salarySendDetailBaseInfo.canSend) { return ( { switch (e.key) { @@ -360,6 +381,9 @@ export default class PayrollGrant extends React.Component { case "4": this.handleExportSelect(); break; + case "5": + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?salarySendId=${getQueryString("id")}`, "_blank"); + break; default: break; } @@ -368,6 +392,10 @@ export default class PayrollGrant extends React.Component { 全部导出 导出选中 + { + selectedKey === "1" && + {getLabel(111, "导出PDF")} + } ); let btnDom = [ From 3d8bef9147ac8b9fca1c1c20f989b0a664374caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 27 Sep 2023 09:21:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feature/2.9.42310.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=AF=BC=E5=87=BAPDF=2020230926?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 7818af09..b6d505a2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -326,7 +326,7 @@ export default class PayrollGrant extends React.Component { { - window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?id=${record.id}`, "_blank"); + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); }}> {getLabel(111, "导出PDF")} @@ -338,7 +338,7 @@ export default class PayrollGrant extends React.Component { { - window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?id=${record.id}`, "_blank"); + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); }}> {getLabel(111, "导出PDF")} @@ -382,7 +382,7 @@ export default class PayrollGrant extends React.Component { this.handleExportSelect(); break; case "5": - window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/send/exportPdf?salarySendId=${getQueryString("id")}`, "_blank"); + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?salarySendId=${getQueryString("id")}&id=`, "_blank"); break; default: break; From 486254601ffa1376e1e972bbdb4a39f9777ff122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 27 Sep 2023 14:35:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feature/2.9.42310.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=AF=BC=E5=87=BAPDF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollGrant/index.js | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index b6d505a2..ff091152 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -323,25 +323,31 @@ export default class PayrollGrant extends React.Component { onClick={() => this.handleWithdraw({ ids: [record.id] })}> 撤回 - { - window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); - }}> - {getLabel(111, "导出PDF")} - + { + salarySendDetailBaseInfo.showPdfBtn && + { + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); + }}> + {getLabel(111, "导出PDF")} + + } ); } else { return ( - { - window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); - }}> - {getLabel(111, "导出PDF")} - + { + salarySendDetailBaseInfo.showPdfBtn && + { + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank"); + }}> + {getLabel(111, "导出PDF")} + + } ); } @@ -393,7 +399,7 @@ export default class PayrollGrant extends React.Component { 全部导出 导出选中 { - selectedKey === "1" && + selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn && {getLabel(111, "导出PDF")} }