Merge branch 'feature/2.9.42310.01-工资单发放导出PDF' into develop

This commit is contained in:
黎永顺 2023-10-08 09:02:29 +08:00
commit 36dc096e2c
7 changed files with 107 additions and 19 deletions

View File

@ -97,6 +97,13 @@ class ReportList extends Component {
</Dropdown>
}
</div>
{
isShare &&
<div className="ant-ribbon ant-ribbon-placement-end">
<span className="ant-ribbon-text">{getLabel(111, "被分享")}</span>
<div className="ant-ribbon-corner"></div>
</div>
}
</div>
</Col>;
})

View File

@ -31,6 +31,47 @@
justify-content: space-between;
padding: 22px 0 22px 16px;
border: 1px solid #e5e5e5;
position: relative;
.ant-ribbon {
padding: 0 8px;
color: #1677ff;
font-size: 12px;
line-height: 22px;
list-style: none;
position: absolute;
top: 0;
white-space: nowrap;
background-color: #1677ff;
border-radius: 4px;
.ant-ribbon-text {
color: #FFF;
}
.ant-ribbon-corner {
position: absolute;
top: 100%;
width: 8px;
height: 8px;
color: currentcolor;
border: 4px solid;
transform: scaleY(.75);
transform-origin: top;
filter: brightness(75%);
}
}
.ant-ribbon-placement-end {
inset-inline-end: -8px;
border-end-end-radius: 0;
.ant-ribbon-corner {
inset-inline-end: 0;
border-inline-end-color: transparent;
border-block-end-color: transparent;
}
}
.cardLeft {
display: flex;

View File

@ -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 = [

View File

@ -158,9 +158,9 @@ class SalaryStatisticsDetailShareLogDialog extends Component {
title={
<div>
<p>{getLabel(111, "1、分享状态为成功且撤回状态为空时可操作撤回")}</p>
<p>{getLabel(111, "2、撤回后不可重新分享")}</p>
<p>{getLabel(111, "3、分享状态为失败可操作重新分享")}</p>
<p>{getLabel(111, "4、重新分享以当前分享记录的分享报表、有效时间、渠道和说明重新分享分享后自动刷新分享时间和分享状态")}</p>
{/*<p>{getLabel(111, "2、撤回后不可重新分享")}</p>*/}
{/*<p>{getLabel(111, "3、分享状态为失败可操作重新分享")}</p>*/}
{/*<p>{getLabel(111, "4、重新分享以当前分享记录的分享报表、有效时间、渠道和说明重新分享分享后自动刷新分享时间和分享状态")}</p>*/}
</div>
}
/>

View File

@ -384,7 +384,7 @@ export default class SalaryItem extends React.Component {
onCancel={() => this.setState({
syncSalarySetDialog: {
...this.state.syncSalarySetDialog,
visible: false, id: "", title: ""
visible: false, title: ""
}
})}
/>

View File

@ -330,7 +330,7 @@ class AdjustTable extends Component {
};
handleClick = (record) => {
const { status, id, paymentOrganization, billMonth, employeeId } = record;
const { status, id, paymentOrganization, billMonth, employeeId, target } = record;
const { targetOptions } = this.state;
if (status) {
Modal.confirm({
@ -339,7 +339,7 @@ class AdjustTable extends Component {
onOk: () => {
const payload = { id, paymentOrganization, billMonth };
compensationBack(payload).then(async ({ status, data, errormsg }) => {
const { data: categoryTypeOptions } = await compensationCategoryType({ id: _.find(targetOptions, child => child.employeeId == employeeId).target });
const { data: categoryTypeOptions } = await compensationCategoryType({ id: _.find(targetOptions, child => (child.employeeId == employeeId || child.employeeId == target)).target });
if (status) {
message.success(data || "撤回成功");
this.setState({
@ -409,8 +409,14 @@ class AdjustTable extends Component {
if (_.isEmpty(errorMessage)) {
this.setState({
dataSource: _.map(this.state.dataSource, it => {
if (record.target === it.target && record.uuid === it.uuid) {
return { ...it, status: true, id: successIds[0] };
if (record.id === it.id || (!it.id && record.uuid === it.uuid)) {
return {
...it, status: true, id: successIds[0],
targetOptions: _.map([_.find(targetOptions, o => o.employeeId == target)], v => ({
key: v.target.toString(),
showname: v.username
}))
};
}
return { ...it };
})

View File

@ -69,7 +69,7 @@ class AdjustmentDefaultSlide extends Component {
dataIndex: "categoryType", title: "统计调差福利类型(单位)",
render: (text, record) => {
return (
<span>{_.map(record.categoryTypeOptions, it => it.showname).join(",")}</span>
<span>{_.map(_.filter(record.categoryTypeOptions, o => (record.categoryType.split(",").includes(o.key))), it => it.showname).join(",")}</span>
);
}
},