From eb2d77e399602e35a4e9d45867f001e3e66c46ea 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, 11 Jul 2023 17:27:45 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?=
=?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/ruleconfig.js | 4 +++
.../pages/payroll/payrollGrant/index.js | 12 +++++++-
pc4mobx/hrmSalary/pages/ruleConfig/index.js | 29 ++++++++++++++++---
3 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js
index 7ff084ce..869b008d 100644
--- a/pc4mobx/hrmSalary/apis/ruleconfig.js
+++ b/pc4mobx/hrmSalary/apis/ruleconfig.js
@@ -55,3 +55,7 @@ export const reportStatisticsReportSave = (params) => {
export const reportGetForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params);
};
+//工资单反馈
+export const saveSalarySendFeedback = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
+};
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
index 0be427d5..104d3c08 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
@@ -9,6 +9,7 @@ import { getSearchs, renderLoading } from "../../../util";
import CustomPaginationTable from "../../../components/customPaginationTable";
import PayrollPartTable from "./payrollPartTable";
import { getPayrollIssuanceProgressBar } from "../../../apis/payroll";
+import { sysConfCodeRule } from "../../../apis/ruleconfig";
import ProgressModal from "../../../components/progressModal";
const getLabel = WeaLocaleProvider.getLabel;
@@ -25,6 +26,7 @@ export default class PayrollGrant extends React.Component {
selectedKey: "0",
progressVisible: false,
progress: 0,
+ showFeedbackColumn: false,
payrollPartModalParams: {
visible: false,
title: "工资单发放",
@@ -49,8 +51,15 @@ export default class PayrollGrant extends React.Component {
isGranted: selectedKey !== "0"
});
getPaySa();
+ this.sysConfCodeRule();
}
+ sysConfCodeRule = () => {
+ sysConfCodeRule({ code: "SALARY_SEND_FEEDBACK" }).then(({ status, data }) => {
+ if (status && data === "1") this.setState({ showFeedbackColumn: data === "1" });
+ });
+ };
+
// 撤回
handleWithdraw = (record) => {
const { payrollStore } = this.props;
@@ -299,11 +308,12 @@ export default class PayrollGrant extends React.Component {
};
getColumns = () => {
+ const { selectedKey, showFeedbackColumn } = this.state;
const { payrollStore } = this.props;
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0";
return _.map([
- ...toJS(columns),
+ ..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))),
{
title: "操作",
key: "",
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
index 6f088528..ed293c72 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
@@ -25,7 +25,8 @@ export default class Index extends Component {
rule: "",
enctry: "",
operateTaxDeclaration: "",
- matchRule: ""
+ matchRule: "",
+ salarySendFeedback: ""
},
showEncryptOperationButton: "",
progressVisible: false,
@@ -53,7 +54,8 @@ export default class Index extends Component {
showEncryptOperationButton,
isOpenEncrypt: enctry,
isOpenTaxDeclaration: operateTaxDeclaration,
- salaryAcctEmployeeRule: matchRule
+ salaryAcctEmployeeRule: matchRule,
+ salarySendFeedback
}
} = appSettings;
this.setState({
@@ -61,7 +63,7 @@ export default class Index extends Component {
showEncryptOperationButton,
saveParams: {
...saveParams,
- ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule
+ ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback
}
});
}
@@ -128,6 +130,16 @@ export default class Index extends Component {
}
});
};
+ saveSalarySendFeedback = () => {
+ API.saveSalarySendFeedback({ confValue: this.state.saveParams.salarySendFeedback })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(22619, "保存成功!"));
+ } else {
+ message.error(errormsg || getLabel(22620, "保存失败!"));
+ }
+ });
+ };
operateTaxDeclarationFunction = () => {
API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"]))
.then(({ status, errormsg }) => {
@@ -227,6 +239,9 @@ export default class Index extends Component {
case "enctry":
this.saveEncryptSetting();
break;
+ case "salarySendFeedback":
+ this.saveSalarySendFeedback();
+ break;
default:
break;
}
@@ -252,7 +267,7 @@ export default class Index extends Component {
employeeOptions,
showEncryptOperationButton
} = this.state;
- const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams;
+ const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback } = saveParams;
return (
+
+
+ this.handleChange("salarySendFeedback", val)}/>
+
+
{
this.state.progressVisible &&
Date: Wed, 12 Jul 2023 10:14:38 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?=
=?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/payroll.js | 4 ++
.../hrmSalary/pages/mobilePayroll/index.js | 41 ++++++++++++++++--
.../hrmSalary/pages/mySalary/mySalaryView.js | 42 ++++++++++++++++++-
.../pages/payroll/payrollGrant/index.js | 1 +
.../templatePreview/computerTemplate/index.js | 1 +
.../pages/payroll/templatePreview/index.less | 33 +++++++++++----
.../templatePreview/phoneTemplate/index.js | 1 +
7 files changed, 108 insertions(+), 15 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js
index 1f9b1d64..6f48f359 100644
--- a/pc4mobx/hrmSalary/apis/payroll.js
+++ b/pc4mobx/hrmSalary/apis/payroll.js
@@ -375,6 +375,10 @@ export const sendMobileCode = (params) => {
export const payrollCheckType = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
};
+//工资单-确认
+export const confirmSalaryBill = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
+};
// 工资单基础设置-获取设置列表
export const getSalaryBillBaseSetForm = (id) => {
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index db4f3c2f..3f0dd6c4 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -1,17 +1,19 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { getQueryString } from "../../util/url";
-import { WeaDialog, WeaError, WeaInput } from "ecCom";
+import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
import { Button, message } from "antd";
import Authority from "../mySalary/authority";
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
import "../payroll/templatePreview/index.less";
import * as API from "../../apis/mySalaryBenefits";
-import { payrollCheckType } from "../../apis/payroll";
+import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll";
import "./index.less";
import CaptchaModal from "../../components/captchaModal";
+import { ConfirmBtns } from "../mySalary/mySalaryView";
+const { getLabel } = WeaLocaleProvider;
@inject("mySalaryStore")
@observer
export default class MobilePayroll extends React.Component {
@@ -104,6 +106,21 @@ export default class MobilePayroll extends React.Component {
}
return params;
};
+ confirmSalaryBill = () => {
+ confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.getMySalaryBill(getQueryString("id"));
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
+ };
+ handleGoFeedback = () => {
+ const { mySalaryBillData } = this.state;
+ const { feedbackWorkflowId } = mySalaryBillData;
+ window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`);
+ };
render() {
const { mySalaryStore: { clearLoading } } = this.props;
@@ -139,7 +156,15 @@ export default class MobilePayroll extends React.Component {
isPreview
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
- />
+ >
+ {
+ (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
+
+ }
+
@@ -152,7 +177,15 @@ export default class MobilePayroll extends React.Component {
isPreview
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
- />
+ >
+ {
+ (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
+
+ }
+
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index bda458fb..dd16b25f 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -6,12 +6,16 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
+import { Button, message } from "antd";
+import { WeaLocaleProvider } from "ecCom";
import Authority from "./authority";
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
-import { payrollCheckType } from "../../apis/payroll";
+import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import "../payroll/templatePreview/index.less";
+const { getLabel } = WeaLocaleProvider;
+
@inject("mySalaryStore")
@observer
class MySalaryView extends Component {
@@ -37,6 +41,25 @@ class MySalaryView extends Component {
}
}
+ confirmSalaryBill = () => {
+ const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props;
+ confirmSalaryBill({ salaryInfoId }).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ getMySalaryBill(Number(salaryInfoId)).then(data => {
+ this.setState({ mySalaryStore: data });
+ });
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
+ };
+ handleGoFeedback = () => {
+ const { mySalaryStore } = this.state;
+ const { feedbackWorkflowId } = mySalaryStore;
+ window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`);
+ };
+
render() {
const { captchaVisible, mySalaryStore } = this.state;
const { params: { salaryInfoId } } = this.props;
@@ -56,7 +79,15 @@ class MySalaryView extends Component {
isPreview isMsgPreview
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
- />
+ >
+ {
+ (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
+
+ }
+
@@ -71,3 +102,10 @@ class MySalaryView extends Component {
}
export default MySalaryView;
+
+export const ConfirmBtns = (props) => {
+ return
+
+
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
index 104d3c08..da625880 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
@@ -612,6 +612,7 @@ export default class PayrollGrant extends React.Component {
{
this.state.progressVisible &&
{
this.setState({ progressVisible: false, progress: 0 });
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js
index 6f2e68c2..0c4c8c07 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js
@@ -109,6 +109,7 @@ export default class ComputerTemplate extends React.Component {
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
}
+ {this.props.children}
);
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
index 52517511..0d2d5dda 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
@@ -85,7 +85,8 @@
margin: 10px;
background-color: #FFF;
padding: 10px;
- .descript-title{
+
+ .descript-title {
display: flex;
align-items: center;
margin-bottom: 10px;
@@ -100,15 +101,18 @@
border: 1px solid #fafafa;
border-bottom: none;
}
- .descriptions-view{
+
+ .descriptions-view {
width: 100%;
- table{
+
+ table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
- border: 1px solid rgba(0,0,0,.06);
- .descriptions-row{
- .descriptions-item-label{
+ border: 1px solid rgba(0, 0, 0, .06);
+
+ .descriptions-row {
+ .descriptions-item-label {
background-color: #fafafa;
padding: 16px 24px;
color: #000000d9;
@@ -116,11 +120,12 @@
font-size: 12px;
line-height: 1.5715;
text-align: start;
- border: 1px solid rgba(0,0,0,.06);
+ border: 1px solid rgba(0, 0, 0, .06);
min-width: 100px;
max-width: 100px;
}
- .descriptions-item-content{
+
+ .descriptions-item-content {
padding: 16px 24px;
display: table-cell;
flex: 1;
@@ -130,10 +135,20 @@
word-break: break-word;
overflow-wrap: break-word;
border-collapse: collapse;
- border: 1px solid rgba(0,0,0,.06);
+ border: 1px solid rgba(0, 0, 0, .06);
}
}
}
}
}
+
+ .space {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+
+ .ant-btn {
+ margin-right: 10px;
+ }
+ }
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
index 0f85d51d..2a572966 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
@@ -100,6 +100,7 @@ export default class PhoneTemplate extends React.Component {
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
}
+ {this.props.children}
);
}