Merge branch 'feature/2.9.42310.01-工资单发放导出PDF' into release/2.9.42310.01
This commit is contained in:
commit
d48fc2991d
|
|
@ -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,43 @@ export default class PayrollGrant extends React.Component {
|
|||
dataIndex: "",
|
||||
display: true,
|
||||
render: (text, record) => {
|
||||
if (record.sendStatus === "1" && salarySendDetailBaseInfo.canSend) {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
||||
撤回
|
||||
</a>
|
||||
);
|
||||
if (record.sendStatus === "1") {
|
||||
if (salarySendDetailBaseInfo.canSend) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<a
|
||||
href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
||||
撤回
|
||||
</a>
|
||||
{
|
||||
salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
} else if (salarySendDetailBaseInfo.canSend) {
|
||||
return (
|
||||
<a
|
||||
|
|
@ -350,7 +378,6 @@ export default class PayrollGrant extends React.Component {
|
|||
getSearchsAdQuick() {
|
||||
const { payrollStore } = this.props;
|
||||
const { salarySendDetailBaseInfo, btnLoading } = payrollStore;
|
||||
const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0";
|
||||
const { selectedKey } = this.state;
|
||||
const handleMenuClick = e => {
|
||||
switch (e.key) {
|
||||
|
|
@ -360,6 +387,9 @@ export default class PayrollGrant extends React.Component {
|
|||
case "4":
|
||||
this.handleExportSelect();
|
||||
break;
|
||||
case "5":
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?salarySendId=${getQueryString("id")}&id=`, "_blank");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -368,6 +398,10 @@ export default class PayrollGrant extends React.Component {
|
|||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="3">全部导出</Menu.Item>
|
||||
<Menu.Item key="4">导出选中</Menu.Item>
|
||||
{
|
||||
selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<Menu.Item key="5">{getLabel(111, "导出PDF")}</Menu.Item>
|
||||
}
|
||||
</Menu>
|
||||
);
|
||||
let btnDom = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue