Merge branch 'feature/工资单反馈' into develop
# Conflicts: # pc4mobx/hrmSalary/pages/mobilePayroll/index.js # pc4mobx/hrmSalary/pages/ruleConfig/index.js
This commit is contained in:
commit
ed53bb6a9e
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -63,3 +63,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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@ 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 { payrollCheckType, confirmSalaryBill } from "../../apis/payroll";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
||||
import PassSetDialog from "./passSetDialog";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
|
|
@ -113,6 +114,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, pwdForm } } = this.props;
|
||||
|
|
@ -156,7 +172,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") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</PhoneTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
@ -169,7 +193,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") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</ComputerTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
|
|||
|
|
@ -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") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</ComputerTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
@ -71,3 +102,10 @@ class MySalaryView extends Component {
|
|||
}
|
||||
|
||||
export default MySalaryView;
|
||||
|
||||
export const ConfirmBtns = (props) => {
|
||||
return <div className="space">
|
||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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: "",
|
||||
|
|
@ -602,6 +612,7 @@ export default class PayrollGrant extends React.Component {
|
|||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
title={getLabel(111, "正在发放中,请稍后...")}
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ export default class ComputerTemplate extends React.Component {
|
|||
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
|
||||
}
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ export default class PhoneTemplate extends React.Component {
|
|||
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
|
||||
}
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ export default class Index extends Component {
|
|||
operateTaxDeclaration: "",
|
||||
matchRule: "",
|
||||
confValue: "0",
|
||||
withDrawTaxDeclaration: "0"
|
||||
withDrawTaxDeclaration: "0",
|
||||
salarySendFeedback: ""
|
||||
},
|
||||
showEncryptOperationButton: "",
|
||||
progressVisible: false,
|
||||
|
|
@ -56,7 +57,8 @@ export default class Index extends Component {
|
|||
isOpenEncrypt: enctry,
|
||||
isOpenTaxDeclaration: operateTaxDeclaration,
|
||||
salaryAcctEmployeeRule: matchRule,
|
||||
salaryArchiveDelete: confValue, withDrawTaxDeclaration
|
||||
salaryArchiveDelete: confValue, withDrawTaxDeclaration,
|
||||
salarySendFeedback
|
||||
}
|
||||
} = appSettings;
|
||||
this.setState({
|
||||
|
|
@ -64,7 +66,7 @@ export default class Index extends Component {
|
|||
showEncryptOperationButton,
|
||||
saveParams: {
|
||||
...saveParams,
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration, salarySendFeedback
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -131,6 +133,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 }) => {
|
||||
|
|
@ -256,6 +268,9 @@ export default class Index extends Component {
|
|||
case "withDrawTaxDeclaration":
|
||||
this.withDrawTaxDeclaration();
|
||||
break;
|
||||
case "salarySendFeedback":
|
||||
this.saveSalarySendFeedback();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -289,7 +304,8 @@ export default class Index extends Component {
|
|||
operateTaxDeclaration,
|
||||
matchRule,
|
||||
confValue,
|
||||
withDrawTaxDeclaration
|
||||
withDrawTaxDeclaration,
|
||||
salarySendFeedback
|
||||
} = saveParams;
|
||||
return (
|
||||
<div className="ruleWrapper">
|
||||
|
|
@ -351,6 +367,12 @@ export default class Index extends Component {
|
|||
/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "工资单反馈")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "工资单反馈")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={salarySendFeedback}
|
||||
onChange={val => this.handleChange("salarySendFeedback", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
|
|
|
|||
Loading…
Reference in New Issue