Merge branch 'release/2.10.1.2401.02' into release/2.10.1.2401.02-个税
This commit is contained in:
commit
2e2f8ee248
|
|
@ -1,56 +0,0 @@
|
||||||
import { WeaTools } from 'ecCom';
|
|
||||||
|
|
||||||
//台账
|
|
||||||
export const getRecordList = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/batch/list', 'get', params);
|
|
||||||
};
|
|
||||||
export const getCalcForm = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/accountForm', 'get', params);
|
|
||||||
};
|
|
||||||
export const save = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/save', 'post', params);
|
|
||||||
};
|
|
||||||
export const doArchive = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/file', 'post', params);
|
|
||||||
};
|
|
||||||
export const deleteRecord = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/delete', 'post', params);
|
|
||||||
};
|
|
||||||
|
|
||||||
//核算
|
|
||||||
export const getCalcTabs = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/tabList', 'get', params);
|
|
||||||
};
|
|
||||||
export const getNormalForm = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/commonForm', 'get', params);
|
|
||||||
};
|
|
||||||
export const saveNormalForm = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/common/save', 'post', params);
|
|
||||||
};
|
|
||||||
export const deleteNormal = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/common/delete', 'post', params);
|
|
||||||
};
|
|
||||||
export const getSupplementaryForm = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/querySupplementaryForm', 'get', params);
|
|
||||||
};
|
|
||||||
export const saveSupplementaryForm = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/supplementary/save', 'post', params);
|
|
||||||
};
|
|
||||||
export const deleteSupplementary = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/supplementary/delete', 'post', params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 导出正常缴纳核算
|
|
||||||
export const exportNormalPaymentAccount = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/common/export', 'post', params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 导出总览
|
|
||||||
export const exportOverView = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/overview/export', 'post', params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 导出补缴核算
|
|
||||||
export const exportSupplementaryAccount = params => {
|
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/supplementary/export', 'post', params);
|
|
||||||
};
|
|
||||||
|
|
@ -5,10 +5,12 @@ import HistoricalPayroll from "./pages/historicalPayroll";
|
||||||
import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords";
|
import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords";
|
||||||
import MySalaryMobile from "./pages/mySalaryMobile";
|
import MySalaryMobile from "./pages/mySalaryMobile";
|
||||||
import MySalary from "./pages/mySalaryBenefits";
|
import MySalary from "./pages/mySalaryBenefits";
|
||||||
import Programme from "./pages/socialSecurityBenefits/programme";
|
import Programme from "./pages/socialSecurityBenefits/welfarePlan";
|
||||||
|
import Programme_old from "./pages/socialSecurityBenefits/programme";
|
||||||
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
||||||
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
||||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
import StandingBookDemo from "./pages/socialSecurityBenefits/standingBook";
|
||||||
|
import StandingBook from "./pages/socialSecurityBenefits/standingBook/standingBook";//社保福利台账重构页面
|
||||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||||
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||||
import SalaryItem from "./pages/salaryItem";
|
import SalaryItem from "./pages/salaryItem";
|
||||||
|
|
@ -140,8 +142,10 @@ const Routes = (
|
||||||
path="socialSecurityBenefits"
|
path="socialSecurityBenefits"
|
||||||
component={SocialSecurityBenefits}>
|
component={SocialSecurityBenefits}>
|
||||||
<Route key="programme" path="programme" component={Programme}/>
|
<Route key="programme" path="programme" component={Programme}/>
|
||||||
|
<Route key="programme_old" path="programme_old" component={Programme_old}/>
|
||||||
<Route key="archives" path="archives" component={Archives}/>
|
<Route key="archives" path="archives" component={Archives}/>
|
||||||
{/*<Route key="archives_demo" path="archives_demo" component={Archivess}/>*/}
|
{/*<Route key="archives_demo" path="archives_demo" component={Archivess}/>*/}
|
||||||
|
<Route key="standingBook_demo" path="standingBook_demo" component={StandingBookDemo}/>
|
||||||
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
||||||
<Route
|
<Route
|
||||||
key="standingBookDetail"
|
key="standingBookDetail"
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
</div>;
|
</div>;
|
||||||
const {
|
const {
|
||||||
salaryTemplate, salaryGroups, employeeInformation,
|
salaryTemplate, salaryGroups, employeeInformation,
|
||||||
sendTime, confirmStatus
|
sendTime, confirmStatus, showAck, showFeedback
|
||||||
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
||||||
const salaryProps = {
|
const salaryProps = {
|
||||||
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||||
|
|
@ -215,13 +215,11 @@ export default class MobilePayroll extends React.Component {
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
||||||
{
|
<ConfirmBtns
|
||||||
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
showAck={showAck} showFeedback={showFeedback}
|
||||||
<ConfirmBtns
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
goFeedback={this.handleGoFeedback}
|
||||||
goFeedback={this.handleGoFeedback}
|
/>
|
||||||
/>
|
|
||||||
}
|
|
||||||
</MobileTemplate>
|
</MobileTemplate>
|
||||||
</Authority>
|
</Authority>
|
||||||
:
|
:
|
||||||
|
|
@ -229,13 +227,11 @@ export default class MobilePayroll extends React.Component {
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<div className="weapp-salary-my-salary-view-payroll">
|
<div className="weapp-salary-my-salary-view-payroll">
|
||||||
<Content {...salaryProps}>
|
<Content {...salaryProps}>
|
||||||
{
|
<ConfirmBtns
|
||||||
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
showAck={showAck} showFeedback={showFeedback}
|
||||||
<ConfirmBtns
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
goFeedback={this.handleGoFeedback}
|
||||||
goFeedback={this.handleGoFeedback}
|
/>
|
||||||
/>
|
|
||||||
}
|
|
||||||
</Content>
|
</Content>
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,11 @@ class MySalaryView extends Component {
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<div className="weapp-salary-my-salary-view-payroll">
|
<div className="weapp-salary-my-salary-view-payroll">
|
||||||
<Content {...salaryProps}>
|
<Content {...salaryProps}>
|
||||||
{
|
<ConfirmBtns
|
||||||
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
|
showAck={mySalaryStore.showAck} showFeedback={mySalaryStore.showFeedback}
|
||||||
<ConfirmBtns
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
goFeedback={this.handleGoFeedback}
|
||||||
goFeedback={this.handleGoFeedback}
|
/>
|
||||||
/>
|
|
||||||
}
|
|
||||||
</Content>
|
</Content>
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
|
|
@ -120,7 +118,13 @@ export default MySalaryView;
|
||||||
|
|
||||||
export const ConfirmBtns = (props) => {
|
export const ConfirmBtns = (props) => {
|
||||||
return <div className="space">
|
return <div className="space">
|
||||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
{
|
||||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
props.showAck === "1" &&
|
||||||
|
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
props.showFeedback === "1" &&
|
||||||
|
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||||
|
}
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class TemplateBaseSettings extends Component {
|
||||||
},
|
},
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
ackStatus: "0",
|
ackStatus: "0",
|
||||||
|
feedbackStatus: "0",
|
||||||
autoAckDays: 7,
|
autoAckDays: 7,
|
||||||
feedBackUrl: "",
|
feedBackUrl: "",
|
||||||
mobileFeedbackUrl: ""
|
mobileFeedbackUrl: ""
|
||||||
|
|
@ -97,7 +98,7 @@ class TemplateBaseSettings extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
|
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
|
||||||
const { ackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
|
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
|
||||||
const { limitMonth = 0 } = salaryBillViewingLimitSetting;
|
const { limitMonth = 0 } = salaryBillViewingLimitSetting;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
|
@ -156,9 +157,22 @@ class TemplateBaseSettings extends Component {
|
||||||
})}/>
|
})}/>
|
||||||
<WeaHelpfulTip
|
<WeaHelpfulTip
|
||||||
title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;")}
|
title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;")}
|
||||||
style={{ marginLeft: 10 }}
|
style={{ marginLeft: 5 }}
|
||||||
placement="top" width={200}/>
|
placement="top" width={200}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
<WeaFormItem label={getLabel(111, "启用工资单反馈")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
|
<WeaCheckbox value={feedbackStatus} display="switch"
|
||||||
|
onChange={feedbackStatus => this.setState({
|
||||||
|
ackFeedbackSetting: {
|
||||||
|
...ackFeedbackSetting, feedbackStatus
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
{
|
||||||
|
feedbackStatus === "1" &&
|
||||||
|
<React.Fragment>
|
||||||
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaInput
|
<WeaInput
|
||||||
value={feedBackUrl} viewAttr={3}
|
value={feedBackUrl} viewAttr={3}
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ class Index extends Component {
|
||||||
{...adjLogRecordDialog}
|
{...adjLogRecordDialog}
|
||||||
onCancel={() => this.setState({
|
onCancel={() => this.setState({
|
||||||
adjLogRecordDialog: {
|
adjLogRecordDialog: {
|
||||||
adjLogRecordDialog, visible: false, title: "", salaryArchiveId: ""
|
...adjLogRecordDialog, visible: false, title: "", salaryArchiveId: ""
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,17 @@ export const tempBaseSetFbConditions = [
|
||||||
hide: false,
|
hide: false,
|
||||||
rules: "required"
|
rules: "required"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SWITCH",
|
||||||
|
domkey: ["feedbackStatus"],
|
||||||
|
fieldcol: 2,
|
||||||
|
label: "启用工资单反馈",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "1",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
conditionType: "INPUT",
|
conditionType: "INPUT",
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class Index extends Component {
|
||||||
} else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
|
} else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
|
||||||
return {
|
return {
|
||||||
...o,
|
...o,
|
||||||
hide: _.isNil(fieldsEchoData["ackFeedbackStatus"]) ? o.hide : !fieldsEchoData["ackFeedbackStatus"]
|
hide: _.isNil(fieldsEchoData["feedbackStatus"]) ? o.hide : !fieldsEchoData["feedbackStatus"]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { ...o };
|
return { ...o };
|
||||||
|
|
@ -171,7 +171,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.map(tempBaseSetFbDomkeys, it => {
|
_.map(tempBaseSetFbDomkeys, it => {
|
||||||
if (it === "ackFeedbackStatus") {
|
if (it === "ackFeedbackStatus" || it === "feedbackStatus") {
|
||||||
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
||||||
} else {
|
} else {
|
||||||
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||||
|
|
@ -292,18 +292,23 @@ class Index extends Component {
|
||||||
handleFbChange = (params) => {
|
handleFbChange = (params) => {
|
||||||
const { payrollStore: { payrollTempFeedbackForm, setHasBeenModify } } = this.props;
|
const { payrollStore: { payrollTempFeedbackForm, setHasBeenModify } } = this.props;
|
||||||
const key = _.keys(params)[0];
|
const key = _.keys(params)[0];
|
||||||
if (key === "ackFeedbackStatus") {
|
if (key === "ackFeedbackStatus" || key === "feedbackStatus") {
|
||||||
this.setState({
|
this.setState({
|
||||||
fbConditions: _.map(this.state.fbConditions, it => {
|
fbConditions: _.map(this.state.fbConditions, it => {
|
||||||
if (it.title === getLabel(544092, "工资单确认反馈设置")) {
|
if (it.title === getLabel(544092, "工资单确认反馈设置")) {
|
||||||
return {
|
return {
|
||||||
...it, items: _.map(it.items, o => {
|
...it, items: _.map(it.items, o => {
|
||||||
if (getKey(o) === "autoAckDays" || getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
|
if (getKey(o) === "autoAckDays" && key === "ackFeedbackStatus") {
|
||||||
return {
|
return {
|
||||||
...o, hide: params[key].value === "0"
|
...o, hide: params["ackFeedbackStatus"].value === "0"
|
||||||
};
|
};
|
||||||
|
} else if (key === "feedbackStatus" && (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl")) {
|
||||||
|
return {
|
||||||
|
...o, hide: params["feedbackStatus"].value === "0"
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return { ...o };
|
||||||
}
|
}
|
||||||
return { ...o };
|
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -312,8 +317,11 @@ class Index extends Component {
|
||||||
}, () => {
|
}, () => {
|
||||||
payrollTempFeedbackForm.initFormFields(this.state.fbConditions);
|
payrollTempFeedbackForm.initFormFields(this.state.fbConditions);
|
||||||
const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus;
|
const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus;
|
||||||
|
const feedbackStatus = payrollTempFeedbackForm.getFormParams().feedbackStatus;
|
||||||
if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({
|
if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({
|
||||||
autoAckDays: "7",
|
autoAckDays: "7"
|
||||||
|
});
|
||||||
|
if (feedbackStatus === "0") payrollTempFeedbackForm.updateFields({
|
||||||
feedbackUrl: "/",
|
feedbackUrl: "/",
|
||||||
mobileFeedbackUrl: "/"
|
mobileFeedbackUrl: "/"
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,12 @@ class Index extends Component {
|
||||||
const {
|
const {
|
||||||
replenishRule, autoSendStatus, emailStatus, msgStatus, smsStatus, ...extraBs
|
replenishRule, autoSendStatus, emailStatus, msgStatus, smsStatus, ...extraBs
|
||||||
} = payrollTempForm.getFormParams(),
|
} = payrollTempForm.getFormParams(),
|
||||||
{ ackFeedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
||||||
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs,
|
...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs,
|
||||||
ackFeedbackStatus: ackFeedbackStatus === "1",
|
ackFeedbackStatus: ackFeedbackStatus === "1",
|
||||||
|
feedbackStatus: feedbackStatus === "1",
|
||||||
autoSendStatus: autoSendStatus === "1",
|
autoSendStatus: autoSendStatus === "1",
|
||||||
emailStatus: emailStatus === "1",
|
emailStatus: emailStatus === "1",
|
||||||
msgStatus: msgStatus === "1",
|
msgStatus: msgStatus === "1",
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,9 @@ class PaymentPeriodModal extends Component {
|
||||||
const { monthList, allSelect } = this.state;
|
const { monthList, allSelect } = this.state;
|
||||||
const buttons = [
|
const buttons = [
|
||||||
<Button type="primary" onClick={onCancel}>保存</Button>,
|
<Button type="primary" onClick={onCancel}>保存</Button>,
|
||||||
<Button type="ghost" onClick={() => this.setState({ monthList: [], allSelect: false })}>重置</Button>
|
<Button type="ghost" onClick={() => this.setState({
|
||||||
|
monthList: [], allSelect: false
|
||||||
|
}, () => this.props.onSetPaymentPeriod(this.state.monthList))}>重置</Button>
|
||||||
];
|
];
|
||||||
const options = [
|
const options = [
|
||||||
{ label: "一月", value: "1" },
|
{ label: "一月", value: "1" },
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,23 @@ export const socialAccountConditions = [
|
||||||
title: ""
|
title: ""
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
export const welfareRQConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["taxAgents"],
|
||||||
|
fieldcol: 8,
|
||||||
|
label: "个税扣缴义务人",
|
||||||
|
lanId: 537996,
|
||||||
|
labelcol: 6,
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2,
|
||||||
|
multiple: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: ""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利台账重构-列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/23
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { message, Modal, Spin } from "antd";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { getIframeParentHeight } from "../../../../util";
|
||||||
|
import * as API from "../../../../apis/standingBook";
|
||||||
|
import { convertToUrlString } from "../../../../util/url";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class WelfareRecordList extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, dataSource: [], columns: [],
|
||||||
|
pageInfo: { current: 0, pageSize: 10, total: 0 }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReceive = ({ data }) => {
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const { type, payload: { id, params } = {} } = data;
|
||||||
|
if (type === "init") {
|
||||||
|
this.getWelfareRecordList();
|
||||||
|
} else if (type === "turn") {
|
||||||
|
const module = {
|
||||||
|
billMonth: params.billMonth,
|
||||||
|
paymentOrganization: params.paymentOrganizationId
|
||||||
|
};
|
||||||
|
switch (id) {
|
||||||
|
case "PAGEINFO":
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, ...params } }, () => this.getWelfareRecordList());
|
||||||
|
break;
|
||||||
|
case "CALC":
|
||||||
|
case "VIEW":
|
||||||
|
const payload = {
|
||||||
|
billMonth: params.billMonth,
|
||||||
|
paymentOrganization: params.paymentOrganizationId,
|
||||||
|
creator: params.creator,
|
||||||
|
type: id === "VIEW" ? "detail" : ""
|
||||||
|
};
|
||||||
|
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(payload)}`);
|
||||||
|
break;
|
||||||
|
case "DELRC":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(111, "确认信息"), content: getLabel(388758, "确认要删除吗?"),
|
||||||
|
onOk: () => {
|
||||||
|
API.siaccountDelete(module).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(502230, "删除成功"));
|
||||||
|
this.getWelfareRecordList();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "RECALC":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(111, "确认信息"),
|
||||||
|
content: getLabel(111, "重新核算后,此条台账数据将可以删除且可以进行此月份的核算,是否确认取消归档?"),
|
||||||
|
onOk: () => {
|
||||||
|
API.socialSecurityBenefitsRecalculate({ id: params.id })
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.getWelfareRecordList();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "FILE":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(111, "确认信息"),
|
||||||
|
content: getLabel(111, "归档后,此条台账数据无法删除且不可以再进行此月份的核算,是否确认归档?"),
|
||||||
|
onOk: () => {
|
||||||
|
API.siaccountFile(module).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.getWelfareRecordList();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const i18n = {
|
||||||
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||||
|
"总计": getLabel(523, "总计"), "已归档": getLabel(18800, "已归档"),
|
||||||
|
"未归档": getLabel(17999, "已归档"), "操作": getLabel(30585, "操作"),
|
||||||
|
"核算": getLabel(538780, "核算"), "归档": getLabel(251, "归档"),
|
||||||
|
"查看": getLabel(33564, "查看"), "重新核算": getLabel(542637, "重新核算"),
|
||||||
|
"删除": getLabel(535052, "删除")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("unitTable");
|
||||||
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
|
getWelfareRecordList = () => {
|
||||||
|
const { queryForm, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const payload = { ...pageInfo, ...queryForm, taxAgents: queryForm.taxAgents ? queryForm.taxAgents.split(",") : [] };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.getCommonList(payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { pageInfo: result } = data;
|
||||||
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = result;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||||
|
dataSource, columns
|
||||||
|
}, () => this.postMessageToChild({
|
||||||
|
scrollHeight: 108, dataSource, columns, pageInfo: this.state.pageInfo, showOperateBtn
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, dataSource } = this.state;
|
||||||
|
return (
|
||||||
|
<div className="salary-welfare-record-list"
|
||||||
|
style={{ height: getIframeParentHeight(".wea-new-top-content", dataSource.length, 46) + "px" }}>
|
||||||
|
<Spin spinning={loading}>
|
||||||
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/unitTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||||
|
id="unitTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default WelfareRecordList;
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利台账重构-查询组件
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/23
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import * as API from "../../../../apis/standingBook";
|
||||||
|
import { welfareRQConditions } from "../columns";
|
||||||
|
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
|
@inject("standingBookStore")
|
||||||
|
@observer
|
||||||
|
class WelfareRecordQuery extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: [],
|
||||||
|
dateRange: [
|
||||||
|
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||||
|
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
API.getAdminTaxAgentList().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(welfareRQConditions, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "taxAgents") {
|
||||||
|
return { ...o, options: _.map(data, g => ({ key: g.id.toString(), showname: g.name })) };
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
const { standingBookStore: { welfareRQForm }, onPutAccountOptions } = this.props;
|
||||||
|
welfareRQForm.initFormFields(this.state.conditions);
|
||||||
|
onPutAccountOptions(_.map(data, g => ({ key: g.id.toString(), showname: g.name })));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
renderForm = (form, conditions) => {
|
||||||
|
const { dateRange } = this.state;
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && conditions && conditions.map(c => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)} tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={this.getWelfareRecordList}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup col={3} needTigger showGroup={c.defaultshow}
|
||||||
|
items={[
|
||||||
|
{
|
||||||
|
com: (<WeaFormItem label={getLabel(542443, "账单月份")} labelCol={{ span: 4 }}
|
||||||
|
wrapperCol={{ span: 16 }}>
|
||||||
|
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||||
|
onChange={v => this.setState({ dateRange: v }, () => this.getWelfareRecordList())}/>
|
||||||
|
</WeaFormItem>)
|
||||||
|
},
|
||||||
|
...items
|
||||||
|
]}
|
||||||
|
/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
getWelfareRecordList = () => {
|
||||||
|
const { standingBookStore: { welfareRQForm } } = this.props;
|
||||||
|
const { dateRange } = this.state;
|
||||||
|
const [startTime, endTime] = dateRange;
|
||||||
|
const payload = {
|
||||||
|
...welfareRQForm.getFormParams(), startTime, endTime
|
||||||
|
};
|
||||||
|
this.props.onSearch(payload);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { standingBookStore: { welfareRQForm } } = this.props;
|
||||||
|
const { conditions } = this.state;
|
||||||
|
return (
|
||||||
|
<div className="salary-welfare-record-query">{this.renderForm(welfareRQForm, conditions)}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default WelfareRecordQuery;
|
||||||
|
|
@ -54,3 +54,85 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//社保福利台账页面重构
|
||||||
|
.salary-welfare-record {
|
||||||
|
min-width: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.salary-welfare-record-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 8px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.salary-welfare-record-query {
|
||||||
|
width: 100%;
|
||||||
|
height: 46px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-content, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.rangePickerBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select, .ant-select-selection {
|
||||||
|
width: 100%;
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input .arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input {
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 345px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-welfare-record-list {
|
||||||
|
.ant-spin-nested-loading,
|
||||||
|
.ant-spin-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,147 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利台账重构
|
||||||
|
* version: 1.0
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/23
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import * as API from "../../../apis/standingBook";
|
||||||
|
import { getCalculateProgress } from "../../../apis/calculate";
|
||||||
|
import WelfareRecordQuery from "./components/welfareRecordQuery";
|
||||||
|
import WelfareRecordList from "./components/welfareRecordList";
|
||||||
|
import Accountdialog from "./components/accountDialog";
|
||||||
|
import ProgressModal from "../../../components/progressModal";
|
||||||
|
import { convertToUrlString } from "../../../util/url";
|
||||||
|
import moment from "moment";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("standingBookStore", "taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class StandingBook extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
queryForm: {
|
||||||
|
startTime: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||||
|
endTime: moment(new Date()).endOf("year").format("YYYY-MM"),
|
||||||
|
taxAgents: ""
|
||||||
|
}, progressVisible: false, progress: 0,
|
||||||
|
accountDialog: { visible: false, title: "", loading: false, options: [] }
|
||||||
|
};
|
||||||
|
this.wfListRef = null;
|
||||||
|
this.timer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 社保福利台账重构-核算
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/1/23
|
||||||
|
*/
|
||||||
|
handleAccount = async (formVal) => {
|
||||||
|
const { billMonth, ...extra } = formVal;
|
||||||
|
const payload = {
|
||||||
|
billMonth: moment(billMonth).format("YYYY-MM"),
|
||||||
|
...extra
|
||||||
|
};
|
||||||
|
this.setState({ accountDialog: { ...this.state.accountDialog, loading: true } });
|
||||||
|
const { data: creator, status, errormsg } = await API.save(payload);
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
accountDialog: { ...this.state.accountDialog, loading: false },
|
||||||
|
progressVisible: true
|
||||||
|
}, () => {
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
if (!data.status) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.setState({ progressVisible: false, progress: 0 });
|
||||||
|
message.error(data.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.state.progress !== 100) {
|
||||||
|
this.setState({
|
||||||
|
progress: (Number(data.progress).toFixed(2)) * 100
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.setState({ progressVisible: false, progress: 0 }, () => {
|
||||||
|
message.success(getLabel(543232, "核算成功"));
|
||||||
|
this.setState({
|
||||||
|
accountDialog: { ...this.state.accountDialog, visible: false }
|
||||||
|
}, () => {
|
||||||
|
this.wfListRef.wrappedInstance.getWelfareRecordList();
|
||||||
|
const calcPayload = { ...payload, creator };
|
||||||
|
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.setState({ progressVisible: false, progress: 0 });
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.setState({ progressVisible: false, progress: 0 });
|
||||||
|
});
|
||||||
|
}, 600);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.setState({
|
||||||
|
accountDialog: { ...this.state.accountDialog, loading: false },
|
||||||
|
progressVisible: false, progress: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { accountDialog, queryForm } = this.state;
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const rightBtns = [<Button type="primary" onClick={() => this.setState({
|
||||||
|
accountDialog: { ...accountDialog, visible: true, title: getLabel(538780, "核算") }
|
||||||
|
})}>{getLabel(538780, "核算")}</Button>];
|
||||||
|
return (
|
||||||
|
<div className="salary-welfare-record">
|
||||||
|
<WeaTop title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}>
|
||||||
|
<div className="salary-welfare-record-content">
|
||||||
|
<WelfareRecordQuery
|
||||||
|
onSearch={(payload) => {
|
||||||
|
this.setState({
|
||||||
|
queryForm: { ...queryForm, ...payload }
|
||||||
|
}, () => this.wfListRef.wrappedInstance.getWelfareRecordList());
|
||||||
|
}}
|
||||||
|
onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })}
|
||||||
|
/>
|
||||||
|
<WelfareRecordList ref={dom => this.wfListRef = dom} queryForm={queryForm}/>
|
||||||
|
</div>
|
||||||
|
<Accountdialog {...accountDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
accountDialog: { ...accountDialog, visible: false, title: "", loading: false }
|
||||||
|
})} onOk={this.handleAccount}
|
||||||
|
/>
|
||||||
|
{/*核算进度条*/}
|
||||||
|
{
|
||||||
|
this.state.progressVisible &&
|
||||||
|
<ProgressModal visible={this.state.progressVisible} progress={this.state.progress}
|
||||||
|
onCancel={() => {
|
||||||
|
this.setState({ progressVisible: false, progress: 0 }, () => clearInterval(this.timer));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</WeaTop>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StandingBook;
|
||||||
|
|
@ -5,13 +5,14 @@
|
||||||
* Date: 2023/10/31
|
* Date: 2023/10/31
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { getSaCondition } from "../../../../../apis/archive";
|
import { getSaCondition } from "../../../../../apis/archive";
|
||||||
import { getSearchs } from "../../../../../util";
|
import { getSearchs } from "../../../../../util";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
@inject("archivesStore")
|
@inject("archivesStore")
|
||||||
@observer
|
@observer
|
||||||
|
|
@ -27,7 +28,36 @@ class WelfareAdvanceSearchPannel extends Component {
|
||||||
getSaCondition().then(({ status, data }) => {
|
getSaCondition().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({
|
||||||
searchConditions: data.condition
|
searchConditions: _.map(data.condition, item => ({
|
||||||
|
...item, items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "departmentIdsStr" || getKey(o) === "positionsStr" || getKey(o) === "subcompanyIdsStr") {
|
||||||
|
return {
|
||||||
|
...o, browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: getKey(o) === "departmentIdsStr" ? "57" : getKey(o) === "positionsStr" ? "278" : "194",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
}))
|
||||||
}, () => {
|
}, () => {
|
||||||
const { archivesStore: { welfareForm } } = this.props;
|
const { archivesStore: { welfareForm } } = this.props;
|
||||||
welfareForm.initFormFields(this.state.searchConditions);
|
welfareForm.initFormFields(this.state.searchConditions);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利方案页面重构-高级搜索
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/2
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("programmeStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { programmeStore: { planSearchForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="achrive-advance-search">
|
||||||
|
<WeaInputSearch value={planSearchForm.getFormParams().schemeName}
|
||||||
|
onChange={v => planSearchForm.updateFields({ schemeName: v })}
|
||||||
|
onSearch={this.props.onAdvanceSearch}
|
||||||
|
/>
|
||||||
|
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||||
|
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
.achrive-advance-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: -1.5px;
|
||||||
|
|
||||||
|
.wea-advanced-search {
|
||||||
|
top: 2px;
|
||||||
|
left: -1px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 1;
|
||||||
|
border-radius: 0;
|
||||||
|
position: relative;
|
||||||
|
color: #474747;
|
||||||
|
padding: 4px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-advanced-search:hover {
|
||||||
|
border: 1px solid #dadada;
|
||||||
|
color: #474747;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-elli {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利方案页面重构-高级搜索面板
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/2
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { getSearchs } from "../../../../../util";
|
||||||
|
import { searchConditons } from "../../config";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("programmeStore")
|
||||||
|
@observer
|
||||||
|
class WelfarePlanAdvanceSearchPannel extends Component {
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { programmeStore: { planSearchForm } } = this.props;
|
||||||
|
planSearchForm.initFormFields(searchConditons);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { programmeStore: { planSearchForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className="wea-advanced-searchsAd">
|
||||||
|
{getSearchs(planSearchForm, searchConditons, 2, false)}
|
||||||
|
</div>
|
||||||
|
<div className="wea-search-buttons">
|
||||||
|
<div style={{ textAlign: "center" }}>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={() => planSearchForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default WelfarePlanAdvanceSearchPannel;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利方案重构-复制
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/4
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import * as API from "../../../../../apis/welfareScheme";
|
||||||
|
import { getSearchs } from "../../../../../util";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("programmeStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.programmeStore.initPlanCopyForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const { programmeStore: { planCopyForm }, copyId: id, selectedKey } = this.props;
|
||||||
|
planCopyForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.copyScheme({ id, schemeName: planCopyForm.getFormDatas()[`${selectedKey}_schemeName`].value })
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onCancel(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading } = this.state;
|
||||||
|
const { programmeStore: { planCopyForm }, conditions } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} style={{ width: 480, height: 46 }} initLoadCss
|
||||||
|
buttons={[
|
||||||
|
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<div className="form-dialog-layout">{getSearchs(planCopyForm, conditions, 1, false)}</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利方案-自定义福利新建编辑
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/4
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import * as API from "../../../../../apis/welfareScheme";
|
||||||
|
import { getConditionDomkeys, getSearchs } from "../../../../../util";
|
||||||
|
import { customPlanConditons } from "../../config";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("programmeStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, conditions: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getCustomCategoryForm(nextProps);
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.programmeStore.initPlanCustomForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
getCustomCategoryForm = (props) => {
|
||||||
|
API.getCustomCategoryForm({ id: props.customId }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { form } = data;
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(customPlanConditons, item => ({
|
||||||
|
...item, items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "welfareType" && props.customId) {
|
||||||
|
return { ...o, viewAttr: 1 };
|
||||||
|
} else {
|
||||||
|
return { ...o, viewAttr: props.showOperateBtn ? o.viewAttr : 1 };
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
}, () => {
|
||||||
|
const { programmeStore: { planCustomForm } } = props;
|
||||||
|
planCustomForm.initFormFields(this.state.conditions);
|
||||||
|
_.forEach(getConditionDomkeys(this.state.conditions), k => {
|
||||||
|
if (k === "paymentScope" && props.customId && form[k]) {
|
||||||
|
planCustomForm.updateFields({ [k]: { value: form[k].join(",") } });
|
||||||
|
} else {
|
||||||
|
planCustomForm.updateFields({ [k]: { value: form[k] || "" } });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const { programmeStore: { planCustomForm }, customId: id, selectedKey } = this.props;
|
||||||
|
planCustomForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
this.setState({ loading: true });
|
||||||
|
const payload = {
|
||||||
|
id, ...planCustomForm.getFormParams(),
|
||||||
|
paymentScope: planCustomForm.getFormParams().paymentScope.split(",")
|
||||||
|
};
|
||||||
|
API[!id ? "createSICategory" : "updateCustomCategory"](payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onCancel(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, conditions } = this.state;
|
||||||
|
const { programmeStore: { planCustomForm }, showOperateBtn } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} style={{ width: 480, height: 174 }} initLoadCss
|
||||||
|
buttons={showOperateBtn ? [
|
||||||
|
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
|
] : []}
|
||||||
|
>
|
||||||
|
<div className="form-dialog-layout">{getSearchs(planCustomForm, conditions, 1, false)}</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保方案页面重构-社保方案编辑与查看
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/5
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTab, WeaTools } from "ecCom";
|
||||||
|
import PlanSetTable from "./planSetTable";
|
||||||
|
import { Button, message, Modal } from "antd";
|
||||||
|
import * as API from "../../../../../apis/welfareScheme";
|
||||||
|
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
|
||||||
|
import { getConditionDomkeys, getSearchs } from "../../../../../util";
|
||||||
|
import { planConditons } from "../../config";
|
||||||
|
import cs from "classnames";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("programmeStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, conditions: [], selectedKey: "2", planDatas: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
document.querySelector(".salary-welfare-plan-wrapper").classList.add("zIndex0-welfare-plan");
|
||||||
|
const promise = this.getForm(nextProps);
|
||||||
|
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
|
document.querySelector(".salary-welfare-plan-wrapper").classList.remove("zIndex0-welfare-plan");
|
||||||
|
nextProps.programmeStore.initPlanForm();
|
||||||
|
this.setState({ loading: false, conditions: [], selectedKey: "2", planDatas: [] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getForm = async (props) => {
|
||||||
|
const { data: result } = await getTaxAgentSelectListAsAdmin();
|
||||||
|
const { id, welfareTypeEnum, programmeStore: { planForm }, showOperateBtn } = props;
|
||||||
|
API.getForm(id ? _.assign({ welfareTypeEnum }, { id }) : { welfareTypeEnum }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { form: { schemeBatch, schemeDetailList } } = data;
|
||||||
|
this.setState({
|
||||||
|
planDatas: schemeDetailList,
|
||||||
|
conditions: _.map(planConditons, item => ({
|
||||||
|
...item, items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "taxAgentIds") {
|
||||||
|
return {
|
||||||
|
...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
|
||||||
|
viewAttr: (schemeBatch["sharedType"] === "1" && showOperateBtn) ? 3 : showOperateBtn ? o.viewAttr : 1,
|
||||||
|
options: _.map(result, k => ({ key: k.id, showname: k.content }))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1 };
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
}, () => {
|
||||||
|
planForm.initFormFields(this.state.conditions);
|
||||||
|
_.map(getConditionDomkeys(this.state.conditions), k => {
|
||||||
|
if (k === "sharedType") {
|
||||||
|
planForm.updateFields({ [k]: schemeBatch[k] || "0" });
|
||||||
|
} else {
|
||||||
|
planForm.updateFields({ [k]: schemeBatch[k] || "" });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
save = async () => {
|
||||||
|
const { programmeStore: { planForm, setHasBeenModify }, welfareTypeEnum, id } = this.props;
|
||||||
|
planForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
|
||||||
|
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
|
||||||
|
} else {
|
||||||
|
const { planDatas } = this.state;
|
||||||
|
const payload = {
|
||||||
|
insuranceScheme: {
|
||||||
|
...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
|
||||||
|
paymentArea: planForm.getFormParams().paymentType
|
||||||
|
},
|
||||||
|
insuranceSchemeDetailList: planDatas
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
setHasBeenModify(false);
|
||||||
|
this.props.onClose(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
renderTitle = () => {
|
||||||
|
const { loading } = this.state, { title, showOperateBtn } = this.props;
|
||||||
|
return <div className="titleDialog">
|
||||||
|
<div className="titleCol titleLeftBox">
|
||||||
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
<div className="title">{title}</div>
|
||||||
|
</div>
|
||||||
|
<div className="titleCol titleRightBox">
|
||||||
|
{
|
||||||
|
showOperateBtn &&
|
||||||
|
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
handleClose = (visible = false) => {
|
||||||
|
const { programmeStore: { hasBeenModify, setHasBeenModify }, onClose } = this.props;
|
||||||
|
if (hasBeenModify) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(545770, "确定放弃填写吗?放弃后数据将不会被保存!"),
|
||||||
|
onOk: () => {
|
||||||
|
onClose(visible);
|
||||||
|
setHasBeenModify(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
onClose(visible);
|
||||||
|
setHasBeenModify(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onChange = (params) => {
|
||||||
|
const { programmeStore: { planForm, setHasBeenModify } } = this.props;
|
||||||
|
const key = _.keys(params)[0];
|
||||||
|
if (key === "sharedType") {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(this.state.conditions, it => ({
|
||||||
|
...it, items: _.map(it.items, o => {
|
||||||
|
if (getKey(o) === "taxAgentIds") {
|
||||||
|
return {
|
||||||
|
...o, hide: params[key].value === "0",
|
||||||
|
rules: params[key].value === "1" ? "required|string" : "",
|
||||||
|
viewAttr: params[key].value === "1" ? 3 : 2
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
}, () => {
|
||||||
|
planForm.updateFields({ taxAgentIds: "" });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setHasBeenModify(true);
|
||||||
|
};
|
||||||
|
renderTab = () => {
|
||||||
|
const { selectedKey } = this.state;
|
||||||
|
return <WeaTab
|
||||||
|
keyParam="viewcondition" selectedKey={selectedKey}
|
||||||
|
datas={[
|
||||||
|
{ title: getLabel(500201, "个人"), viewcondition: "2" },
|
||||||
|
{ title: getLabel(1851, "公司"), viewcondition: "1" }
|
||||||
|
]} onChange={v => this.setState({ selectedKey: v })}
|
||||||
|
/>;
|
||||||
|
};
|
||||||
|
handleSetPlanDatas = (datas) => {
|
||||||
|
const { programmeStore: { setHasBeenModify } } = this.props;
|
||||||
|
const { planDatas } = this.state;
|
||||||
|
//先统一上下限值
|
||||||
|
let dataSource = _.reduce(planDatas, (pre, cur) => {
|
||||||
|
const curData = _.find(datas, o => o.insuranceId === cur.insuranceId);
|
||||||
|
if (_.isEmpty(curData)) return [...pre, cur];
|
||||||
|
return [...pre, { ...cur, lowerLimit: curData.lowerLimit, upperLimit: curData.upperLimit }];
|
||||||
|
}, []);
|
||||||
|
//再赋值修改值
|
||||||
|
dataSource = _.reduce(dataSource, (pre, cur) => {
|
||||||
|
const curData = _.find(datas, o => o.id === cur.id);
|
||||||
|
return [...pre, { ...cur, ...curData }];
|
||||||
|
}, []);
|
||||||
|
this.setState({ planDatas: dataSource }, () => setHasBeenModify(true));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { conditions, planDatas, selectedKey } = this.state;
|
||||||
|
const { programmeStore: { planForm }, showOperateBtn } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaSlideModal
|
||||||
|
className={cs("welfare-plan-edit-layout", { "nopermission-welfare-plan-edit-layout": !showOperateBtn })}
|
||||||
|
top={0} width={1000} height={100} measureT="%" measureX="px" measureY="%"{...this.props}
|
||||||
|
direction={"right"} title={this.renderTitle()} onClose={() => this.handleClose(false)}
|
||||||
|
content={<div className="welfare-plan-edit-area">
|
||||||
|
{getSearchs(planForm, conditions, 1, false, this.onChange)}
|
||||||
|
<WeaSearchGroup showGroup needTigger title={this.renderTab()}>
|
||||||
|
<PlanSetTable dataSource={planDatas} selectedKey={selectedKey} showOperateBtn={showOperateBtn}
|
||||||
|
onPlanSet={this.handleSetPlanDatas}/>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</div>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,337 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保方案重构-方案设置列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/5
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaHelpfulTip, WeaInputNumber, WeaLocaleProvider, WeaSelect, WeaTableEdit } from "ecCom";
|
||||||
|
import PaymentPeriodModal from "../../../programme/paymentPeriodModal";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class PlanSetTable extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
datas: [], paymentPeriodModal: {
|
||||||
|
visible: false, record: {}, cycleSetting: "000000000000"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.selectedKey !== this.props.selectedKey || nextProps.dataSource !== this.props.dataSource) {
|
||||||
|
this.setState({ datas: _.filter(nextProps.dataSource, o => String(o.paymentScopeValue) === nextProps.selectedKey) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 缴纳周期-自定义设置
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/2/6
|
||||||
|
*/
|
||||||
|
handleSetPaymentPeriod = (cycleSetting) => {
|
||||||
|
const { datas, paymentPeriodModal } = this.state;
|
||||||
|
const { record: { id } } = paymentPeriodModal;
|
||||||
|
let cycleObj = {
|
||||||
|
1: "0",
|
||||||
|
2: "0",
|
||||||
|
3: "0",
|
||||||
|
4: "0",
|
||||||
|
5: "0",
|
||||||
|
6: "0",
|
||||||
|
7: "0",
|
||||||
|
8: "0",
|
||||||
|
9: "0",
|
||||||
|
10: "0",
|
||||||
|
11: "0",
|
||||||
|
12: "0"
|
||||||
|
};
|
||||||
|
if (!_.isEmpty(cycleSetting)) {
|
||||||
|
_.forEach(cycleSetting, item => {
|
||||||
|
_.assign(cycleObj, { [item]: "1" });
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_.forEach(Object.keys(cycleObj), item => {
|
||||||
|
_.assign(cycleObj, { [item]: "0" });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const tmpVStr = _.reduce(Object.values(cycleObj), (pre, cur) => {
|
||||||
|
return pre + cur;
|
||||||
|
}, "");
|
||||||
|
this.setState({
|
||||||
|
datas: _.map(datas, o => {
|
||||||
|
if (id === o.id) {
|
||||||
|
return { ...o, cycleSetting: tmpVStr };
|
||||||
|
} else {
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, () => this.props.onPlanSet(this.state.datas));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { datas, paymentPeriodModal } = this.state;
|
||||||
|
const { showOperateBtn } = this.props;
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: getLabel(15795, "类型名称"),
|
||||||
|
dataIndex: "insuranceName",
|
||||||
|
key: "insuranceName",
|
||||||
|
width: 120, fixed: "left",
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: text => (<span>{text}</span>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543168, "是否缴费"),
|
||||||
|
dataIndex: "isPayment",
|
||||||
|
key: "isPayment",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaCheckbox value={(!_.isNil(text) && text) ? "1" : "0"} display="switch" viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={isPayment => onEdit({
|
||||||
|
record: { ...record, isPayment: isPayment === "1" },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>
|
||||||
|
)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543169, "缴纳对象"),
|
||||||
|
dataIndex: "paymentScope",
|
||||||
|
key: "paymentScope",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: text => (<span>{text}</span>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: <PaymentCycleTitle/>,
|
||||||
|
dataIndex: "paymentCycle",
|
||||||
|
key: "paymentCycle",
|
||||||
|
width: 200,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (<div className="flex-center">
|
||||||
|
<WeaSelect value={text} options={[
|
||||||
|
{ key: "0", showname: getLabel(543159, "月缴") },
|
||||||
|
{ key: "1", showname: getLabel(111, "自定义") }
|
||||||
|
]} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={paymentCycle => onEdit({
|
||||||
|
record: { ...record, paymentCycle, accountType: paymentCycle },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>
|
||||||
|
{
|
||||||
|
showOperateBtn && text === "1" &&
|
||||||
|
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||||
|
paymentPeriodModal: {
|
||||||
|
record: record, visible: true,
|
||||||
|
cycleSetting: record.cycleSetting || "000000000000"
|
||||||
|
}
|
||||||
|
})}>{getLabel(30747, "设置")}</a>
|
||||||
|
}
|
||||||
|
</div>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543170, "核算方式"),
|
||||||
|
dataIndex: "accountType",
|
||||||
|
key: "accountType",
|
||||||
|
width: 200,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaSelect viewAttr={(record.paymentCycle === "1" && showOperateBtn) ? 2 : 1} value={text} options={[
|
||||||
|
{ key: "0", showname: getLabel(543160, "基数*比例+固定费用"), disabled: record.paymentCycle === "1" },
|
||||||
|
{ key: "1", showname: getLabel(543161, "∑基数*比例+∑固定费用") },
|
||||||
|
{ key: "2", showname: getLabel(543162, "∑(基数*比例+固定费用)") }
|
||||||
|
]} onChange={accountType => onEdit({
|
||||||
|
record: { ...record, accountType },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543171, "基数下限"),
|
||||||
|
dataIndex: "lowerLimit",
|
||||||
|
key: "lowerLimit",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber value={text} min={0} max={record.upperLimit || 99999999999} precision={2}
|
||||||
|
viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={lowerLimit => onEdit({
|
||||||
|
record: { ...record, lowerLimit },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543172, "基数上限"),
|
||||||
|
dataIndex: "upperLimit",
|
||||||
|
key: "upperLimit",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber value={text} min={record.lowerLimit || 0} precision={2} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={upperLimit => onEdit({
|
||||||
|
record: { ...record, upperLimit },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543173, "缴纳比例%"),
|
||||||
|
dataIndex: "paymentProportion",
|
||||||
|
key: "paymentProportion",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber value={text} min={0} precision={4} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={paymentProportion => onEdit({
|
||||||
|
record: { ...record, paymentProportion },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543174, "固定费用"),
|
||||||
|
dataIndex: "fixedCost",
|
||||||
|
key: "fixedCost",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber value={text} min={0} precision={2} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={fixedCost => onEdit({
|
||||||
|
record: { ...record, fixedCost },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543175, "有效小数位"),
|
||||||
|
dataIndex: "validNum",
|
||||||
|
key: "validNum",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaSelect value={_.isNil(text) ? "2" : String(text)} options={[
|
||||||
|
{ key: "0", showname: "0" },
|
||||||
|
{ key: "1", showname: "1" },
|
||||||
|
{ key: "2", showname: "2" },
|
||||||
|
{ key: "3", showname: "3" },
|
||||||
|
{ key: "4", showname: "4" },
|
||||||
|
{ key: "5", showname: "5" },
|
||||||
|
{ key: "6", showname: "6" },
|
||||||
|
{ key: "7", showname: "7" },
|
||||||
|
{ key: "8", showname: "8" }
|
||||||
|
]} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={validNum => onEdit({
|
||||||
|
record: { ...record, validNum },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543176, "进位规则"),
|
||||||
|
dataIndex: "rententionRule",
|
||||||
|
key: "rententionRule",
|
||||||
|
width: 120,
|
||||||
|
com: [{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaSelect value={_.isNil(text) ? "2" : text} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
options={[
|
||||||
|
{ key: "1", showname: getLabel(19766, "原始数据") },
|
||||||
|
{ key: "2", showname: getLabel(389654, "四舍五入") },
|
||||||
|
{ key: "3", showname: getLabel(542722, "向上舍入") },
|
||||||
|
{ key: "4", showname: getLabel(542723, "向下舍入") },
|
||||||
|
{ key: "5", showname: getLabel(542724, "见分进角") },
|
||||||
|
{ key: "6", showname: getLabel(543157, "向上取偶") }
|
||||||
|
]} onChange={rententionRule => onEdit({
|
||||||
|
record: { ...record, rententionRule },
|
||||||
|
index, key: "custom"
|
||||||
|
})}/>)
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<WeaTableEdit
|
||||||
|
columns={columns} datas={datas}
|
||||||
|
showDelete={false} showAdd={false} showCopy={false} showTitle={false}
|
||||||
|
tableProps={{ scroll: { x: 800 }, bordered: true }}
|
||||||
|
onChange={datas => this.setState({ datas }, () => this.props.onPlanSet(this.state.datas))}
|
||||||
|
/>
|
||||||
|
<PaymentPeriodModal
|
||||||
|
{...paymentPeriodModal}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
paymentPeriodModal: {
|
||||||
|
visible: false, record: {}, cycleSetting: "000000000000"
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
onSetPaymentPeriod={this.handleSetPaymentPeriod}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PlanSetTable;
|
||||||
|
|
||||||
|
const PaymentCycleTitle = () => (<div>
|
||||||
|
<span>{getLabel(543158, "缴纳周期")}</span>
|
||||||
|
<WeaHelpfulTip
|
||||||
|
style={{ paddingLeft: 8 }}
|
||||||
|
width={480}
|
||||||
|
title={
|
||||||
|
<div>
|
||||||
|
<div>{getLabel(544738, "例:养老保险缴纳周期选择3/6/9/12;")}</div>
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
getLabel(544739, "若:核算方式选择基数求和*比例;则数据核算逻辑为:\n" +
|
||||||
|
" 账单月1月2月时,养老保险不会被核算;\n" +
|
||||||
|
" 账单月3月时,养老保险核算金额为:养老保险月缴纳基数*3*缴纳比例+固定费用*3\n" +
|
||||||
|
" (3代表1月2月3月 3个月,*3代表3个月基数相加和固定费用相加)")
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
getLabel(544740, "若:核算方式选择基数*比例再求和;则数据核算逻辑为:\n" +
|
||||||
|
" 账单月1月2月时,养老保险不会被核算;\n" +
|
||||||
|
" 账单月3月时,养老保险核算金额为:\n" +
|
||||||
|
" 将1~3月算出来的【养老保险月缴纳基数*缴纳比例+固定费用】求和")
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div>{getLabel(544741, "若:缴纳周期选择选择月缴,则核算方式默认为【基数*比例+固定费用】,不可修改")}</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
placement="topLeft"
|
||||||
|
/>
|
||||||
|
</div>);
|
||||||
|
|
@ -0,0 +1,314 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利方案重构-列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/2
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
|
import { Dropdown, Menu, message, Modal } from "antd";
|
||||||
|
import TipLabel from "../../../../../components/TipLabel";
|
||||||
|
import WelfarePlanCopyDialog from "../welfarePlanCopyDialog";
|
||||||
|
import WelfarePlanCustomDialog from "../welfarePlanCustomDialog";
|
||||||
|
import WelfarePlanEditSlide from "../welfarePlanEditSlide";
|
||||||
|
import { tabWelfarePlanList, welfarePlanCopyConditions, welfarePlanCustomTipList } from "../../config";
|
||||||
|
import * as API from "../../../../../apis/welfareScheme";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const APIFOX = {
|
||||||
|
SOCIAL_SECURITY: API.getTable,
|
||||||
|
ACCUMULATION_FUND: API.getTable,
|
||||||
|
OTHER: API.getTable,
|
||||||
|
CUSTOM: API.getCustomCategoryList
|
||||||
|
};
|
||||||
|
|
||||||
|
@inject("programmeStore", "taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
dataSource: [], columns: [], loading: false,
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
copyDialog: { visible: false, title: "", copyId: "", copyName: "", conditions: [] },
|
||||||
|
customDialog: { visible: false, title: "", customId: "" },
|
||||||
|
welfarePlanEditSlide: { visible: false, id: "", welfareTypeEnum: "", title: "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getList(this.props);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if ((nextProps.selectedKey !== this.props.selectedKey) || (nextProps.isQuery !== this.props.isQuery)) {
|
||||||
|
this.setState({
|
||||||
|
welfarePlanEditSlide: { visible: false, id: "", welfareTypeEnum: "", title: "" },
|
||||||
|
pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
|
||||||
|
}, () => this.getList(nextProps));
|
||||||
|
}
|
||||||
|
if ((nextProps.selectedKey !== this.props.selectedKey)) {
|
||||||
|
this.setState({
|
||||||
|
dataSource: [], columns: [], loading: false,
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
copyDialog: { visible: false, title: "", copyId: "", copyName: "", conditions: [] }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getList = (props) => {
|
||||||
|
const {
|
||||||
|
programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, customQuery,
|
||||||
|
taxAgentStore: { showOperateBtn }
|
||||||
|
} = props;
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const originPayload = { ...pageInfo, welfareTypeEnum }, customPayload = { welfareTypeEnum: customQuery },
|
||||||
|
welfarePayload = { ...planSearchForm.getFormParams() };
|
||||||
|
const payload = welfareTypeEnum === "CUSTOM" ? { ...originPayload, ...customPayload } : { ...originPayload, ...welfarePayload };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
APIFOX[welfareTypeEnum](payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
|
||||||
|
this.setState({
|
||||||
|
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||||
|
columns: _.map(_.filter(columns, o => (o.dataIndex !== "id" && o.dataIndex !== "paymentArea")), g => {
|
||||||
|
const { dataIndex } = g;
|
||||||
|
let col = { ...g, width: "20%" };
|
||||||
|
switch (dataIndex) {
|
||||||
|
case "schemeName":
|
||||||
|
col = {
|
||||||
|
...col, width: 250,
|
||||||
|
render: (text, record) => (<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleOpts("edit", record)}>{text}</a>)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "paymentType":
|
||||||
|
col = { ...col, width: 100 };
|
||||||
|
break;
|
||||||
|
case "paymentScope":
|
||||||
|
col = welfareTypeEnum !== "CUSTOM" ? { ...col, width: 300 } : {
|
||||||
|
...col, width: "30%",
|
||||||
|
render: (__, record) => (<span>{record[`${dataIndex}Span`]}</span>)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "remarks":
|
||||||
|
col = { ...col, width: 200 };
|
||||||
|
break;
|
||||||
|
case "welfareType":
|
||||||
|
col = {
|
||||||
|
...col, width: "30%",
|
||||||
|
render: (__, record) => (<span>{record[`${dataIndex}Span`]}</span>)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "isUse":
|
||||||
|
col = {
|
||||||
|
...col, render: (__, record) => (<WeaCheckbox
|
||||||
|
value={record[dataIndex] + ""} display="switch" viewAttr={showOperateBtn ? 2 : 1}
|
||||||
|
onChange={value => this.handleCustomBenefitsSwitch(record, value)}
|
||||||
|
/>)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return col;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
handleOpts = (key, record = {}) => {
|
||||||
|
const { selectedKey, programmeStore: { planCopyForm } } = this.props;
|
||||||
|
const { id, schemeName } = record;
|
||||||
|
switch (key) {
|
||||||
|
case "edit":
|
||||||
|
this.setState({
|
||||||
|
welfarePlanEditSlide: {
|
||||||
|
visible: true, id, welfareTypeEnum: selectedKey,
|
||||||
|
title: `${id ? getLabel(501169, "编辑") : getLabel(365, "新建")}${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}${getLabel(111, "方案")}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "delete":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "确定删除吗?删除后数据不可找回"),
|
||||||
|
onOk: () => {
|
||||||
|
API.deleteScheme({ welfareTypeEnum: selectedKey, ids: [id] })
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(502230, "删除成功!"));
|
||||||
|
this.getList(this.props);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "custom-delete":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "确定删除吗?删除后数据不可找回"),
|
||||||
|
onOk: () => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
API.deleteCustomCategory({ id }).then(({ status, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(502230, "删除成功!"));
|
||||||
|
this.getList(this.props);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => WeaLoadingGlobal.destroy());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "custom-edit":
|
||||||
|
this.setState({
|
||||||
|
customDialog: {
|
||||||
|
visible: true, customId: id,
|
||||||
|
title: `${id ? getLabel(501169, "编辑") : getLabel(365, "新建")}${getLabel(543151, "自定义福利")}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "copy":
|
||||||
|
this.setState({
|
||||||
|
copyDialog: {
|
||||||
|
visible: true, copyId: id, copyName: `${schemeName}-${getLabel(77, "复制")}`,
|
||||||
|
title: `${getLabel(77, "复制")}-${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}`,
|
||||||
|
conditions: welfarePlanCopyConditions[selectedKey]
|
||||||
|
}
|
||||||
|
}, () => {
|
||||||
|
const { copyDialog: { conditions, copyName } } = this.state;
|
||||||
|
planCopyForm.initFormFields(conditions);
|
||||||
|
planCopyForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handleCustomBenefitsSwitch = ({ id }, isUse) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: isUse === "1" ? getLabel(111, "确定要启用吗?") : getLabel(111, "确定要停用吗?"),
|
||||||
|
onOk: () => {
|
||||||
|
const payload = { id, isUse };
|
||||||
|
API.updateCustomCategoryStatus(payload).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success("操作成功");
|
||||||
|
this.getList(this.props);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || "操作失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
this.setState({
|
||||||
|
dataSource: _.map(this.state.dataSource, item => {
|
||||||
|
if (item.id === id) {
|
||||||
|
return {
|
||||||
|
...item, isUse: item.isUse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...item };
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource, columns, pageInfo, loading, copyDialog, customDialog, welfarePlanEditSlide } = this.state;
|
||||||
|
const { selectedKey, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const pagination = {
|
||||||
|
...pageInfo,
|
||||||
|
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"],
|
||||||
|
onShowSizeChange: (current, pageSize) => {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize }
|
||||||
|
}, () => this.getList(this.props));
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current }
|
||||||
|
}, () => this.getList(this.props));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const optCols = selectedKey !== "CUSTOM" ? {
|
||||||
|
title: getLabel(18610, "操作"),
|
||||||
|
dataIndex: "operation", width: 185,
|
||||||
|
render: (__, record) => (<div className="planOptBtns">
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleOpts("edit", record)}>{getLabel(501169, "编辑")}</a>
|
||||||
|
<a href="javascript:void(0);" onClick={() => this.handleOpts("copy", record)}>{getLabel(77, "复制")}</a>
|
||||||
|
<Dropdown
|
||||||
|
overlay={
|
||||||
|
<Menu>
|
||||||
|
<Menu.Item>
|
||||||
|
<a href="javascript:void(0)"
|
||||||
|
onClick={() => this.handleOpts("delete", record)}>{getLabel(535052, "删除")}</a>
|
||||||
|
</Menu.Item>
|
||||||
|
</Menu>
|
||||||
|
}>
|
||||||
|
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||||
|
</Dropdown>
|
||||||
|
</div>)
|
||||||
|
} : {
|
||||||
|
title: getLabel(18610, "操作"),
|
||||||
|
dataIndex: "operation", width: 165,
|
||||||
|
render: (__, record) => (<div className="planOptBtns">
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleOpts("custom-edit", record)}>{getLabel(501169, "编辑")}</a>
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleOpts("custom-delete", record)}>{getLabel(535052, "删除")}</a>
|
||||||
|
</div>)
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="welfare-plan-adapt">
|
||||||
|
<div className="adapt-left">
|
||||||
|
<WeaTable
|
||||||
|
rowKey="id" dataSource={dataSource} pagination={pagination} loading={loading}
|
||||||
|
scroll={{ y: "calc(100vh - 182px)" }}
|
||||||
|
columns={showOperateBtn ? [...columns, optCols] : [...columns, {
|
||||||
|
title: getLabel(18610, "操作"),
|
||||||
|
dataIndex: "operation", width: 120,
|
||||||
|
render: (__, record) => (<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleOpts(selectedKey === "CUSTOM" ? "custom-edit" : "edit", record)}>{getLabel(33564, "查看")}</a>)
|
||||||
|
}]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{
|
||||||
|
selectedKey === "CUSTOM" &&
|
||||||
|
<div className="adapt-right"><TipLabel tipList={welfarePlanCustomTipList}/></div>
|
||||||
|
}
|
||||||
|
{/*复制方案*/}
|
||||||
|
<WelfarePlanCopyDialog {...copyDialog} selectedKey={selectedKey}
|
||||||
|
onCancel={(isRefrese) => this.setState({
|
||||||
|
copyDialog: { ...copyDialog, visible: false, conditions: [] }
|
||||||
|
}, () => isRefrese && this.getList(this.props))}
|
||||||
|
/>
|
||||||
|
{/*新建编辑自定义方案*/}
|
||||||
|
<WelfarePlanCustomDialog {...customDialog} selectedKey={selectedKey} showOperateBtn={showOperateBtn}
|
||||||
|
onCancel={(isRefrese) => this.setState({
|
||||||
|
customDialog: { ...customDialog, visible: false, customId: "" }
|
||||||
|
}, () => isRefrese && this.getList(this.props))}
|
||||||
|
/>
|
||||||
|
{/*新建编辑方案*/}
|
||||||
|
<WelfarePlanEditSlide {...welfarePlanEditSlide} showOperateBtn={showOperateBtn}
|
||||||
|
onClose={(isFresh) => this.setState({
|
||||||
|
welfarePlanEditSlide: { ...welfarePlanEditSlide, visible: false }
|
||||||
|
}, () => isFresh && this.getList(this.props))}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,265 @@
|
||||||
|
import React from "react";
|
||||||
|
import { WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
export const tabWelfarePlanList = [
|
||||||
|
{ key: "SOCIAL_SECURITY", title: getLabel(538967, "社保") },
|
||||||
|
{ key: "ACCUMULATION_FUND", title: getLabel(538969, "公积金") },
|
||||||
|
{ key: "OTHER", title: getLabel(542717, "企业年金及其他福利") },
|
||||||
|
{ key: "CUSTOM", title: getLabel(543151, "自定义福利") }
|
||||||
|
];
|
||||||
|
export const welfarePlanCustomTipList = [
|
||||||
|
getLabel(544345, "1、可以为社保、公积金、企业年金及其他福利新增自定义的福利项,如:残疾保险等"),
|
||||||
|
getLabel(544346, "2、新增自定义福利默认启用,社保福利方案中的自定义福利项均未开启缴纳,当前页面的自定义福利项才可以停用;停用后再新增方案时没有该福利项"),
|
||||||
|
getLabel(544347, "3、自定义福利若要缴纳,需要在方案里填写缴纳相关数据")
|
||||||
|
];
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 社保福利方案-头部操作
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/2/2
|
||||||
|
*/
|
||||||
|
export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
||||||
|
return [{
|
||||||
|
key: "log",
|
||||||
|
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||||
|
content: getLabel(545781, "操作日志")
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn, customQuery) => {
|
||||||
|
let reqBtns = [
|
||||||
|
<Button type="primary" onClick={() => onSalaryOpts("ADD")}>{getLabel(365, "新建")}</Button>,
|
||||||
|
<AdvanceInputBtn onOpenAdvanceSearch={() => onSalaryOpts("OPEN")} onAdvanceSearch={() => onSalaryOpts("SEARCH")}/>
|
||||||
|
];
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "CUSTOM":
|
||||||
|
reqBtns[reqBtns.length - 1] = <WeaSelect style={{ width: 220 }} onChange={v => onSalaryOpts("SEARCH", v)}
|
||||||
|
value={customQuery}
|
||||||
|
options={[
|
||||||
|
{ key: "", showname: getLabel(111, "全部"), selected: true },
|
||||||
|
{ key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
|
||||||
|
{ key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
|
||||||
|
{ key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
|
||||||
|
]}
|
||||||
|
/>;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
!showOperateBtn && reqBtns.shift();
|
||||||
|
return reqBtns;
|
||||||
|
};
|
||||||
|
export const searchConditons = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["schemeName"],
|
||||||
|
fieldcol: 16,
|
||||||
|
isQuickSearch: true,
|
||||||
|
label: getLabel(33162, "方案名称"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentTypeEnum"],
|
||||||
|
fieldcol: 16,
|
||||||
|
isQuickSearch: true,
|
||||||
|
label: getLabel(543163, "缴纳类型"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
options: [
|
||||||
|
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||||
|
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||||
|
],
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: getLabel(82743, "基础信息"),
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const welfarePlanCopyConditions = {
|
||||||
|
SOCIAL_SECURITY: [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["SOCIAL_SECURITY_schemeName"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(111, "社保名称"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: "",
|
||||||
|
col: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
ACCUMULATION_FUND: [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["ACCUMULATION_FUND_schemeName"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(111, "公积金名称"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: "",
|
||||||
|
col: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
OTHER: [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["OTHER_schemeName"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(111, "企业年金及其他福利名称"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: "",
|
||||||
|
col: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
export const planConditons = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentType"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(543163, "缴纳类型"),
|
||||||
|
labelcol: 6,
|
||||||
|
options: [
|
||||||
|
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||||
|
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||||
|
],
|
||||||
|
value: "SCHEME_TOWN",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["schemeName"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(33162, "方案名称"),
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["sharedType"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(543164, "可见性"),
|
||||||
|
labelcol: 6,
|
||||||
|
options: [
|
||||||
|
{ key: "0", showname: getLabel(111, "公共") },
|
||||||
|
{ key: "1", showname: getLabel(111, "私有") }
|
||||||
|
],
|
||||||
|
value: "0",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["taxAgentIds"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(543165, "可见性范围"),
|
||||||
|
labelcol: 6,
|
||||||
|
multiple: true,
|
||||||
|
options: [],
|
||||||
|
value: "",
|
||||||
|
hide: true,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "TEXTAREA",
|
||||||
|
domkey: ["remarks"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(536726, "备注"),
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: getLabel(82743, "基础信息"),
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const customPlanConditons = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["insuranceName"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(111, "福利名称"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["welfareType"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: getLabel(500401, "类型"),
|
||||||
|
labelcol: 8,
|
||||||
|
options: [
|
||||||
|
{ key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
|
||||||
|
{ key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
|
||||||
|
{ key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
|
||||||
|
],
|
||||||
|
value: "SOCIAL_SECURITY",
|
||||||
|
detailtype: 3,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentScope"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(543169, "缴纳对象"),
|
||||||
|
labelcol: 8,
|
||||||
|
options: [
|
||||||
|
{ key: "SCOPE_COMPANY", showname: getLabel(1851, "公司") },
|
||||||
|
{ key: "SCOPE_PERSON", showname: getLabel(500201, "个人") }
|
||||||
|
],
|
||||||
|
detailtype: 2,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 福利方案页面重构
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/2/2
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||||
|
import { renderDropMenuDatas, renderReqBtns, tabWelfarePlanList } from "./config";
|
||||||
|
import WelfarePlanAdvanceSearchPannel from "./components/welfarePlanAdvanceSearchPannel";
|
||||||
|
import WelfarePlanList from "./components/welfarePlanList";
|
||||||
|
import LogDialog from "../../../components/logViewModal";
|
||||||
|
import cs from "classnames";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, logDialogVisible: false,
|
||||||
|
customQuery: ""
|
||||||
|
};
|
||||||
|
this.welfarePlanListRef = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReqBtnsCLick = (type, value) => {
|
||||||
|
const { selectedKey } = this.state;
|
||||||
|
switch (type) {
|
||||||
|
case "ADD":
|
||||||
|
const { handleOpts } = this.welfarePlanListRef.wrappedInstance || {};
|
||||||
|
handleOpts(selectedKey === "CUSTOM" ? "custom-edit" : "edit");
|
||||||
|
break;
|
||||||
|
case "OPEN":
|
||||||
|
this.handleOpenAdvanceSearch();
|
||||||
|
break;
|
||||||
|
case "SEARCH":
|
||||||
|
this.handleAdvanceSearch(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||||
|
handleAdvanceSearch = (customQuery = "") => this.setState({ isQuery: !this.state.isQuery, customQuery });
|
||||||
|
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||||
|
onDropMenuClick = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case "log":
|
||||||
|
this.setState({ logDialogVisible: true });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const { logDialogVisible, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
|
||||||
|
return (
|
||||||
|
<div className="salary-welfare-plan-wrapper">
|
||||||
|
<WeaReqTop
|
||||||
|
title={getLabel(538000, "社保福利方案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
|
||||||
|
onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey}
|
||||||
|
onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false, customQuery: "" })}
|
||||||
|
buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn, customQuery)}
|
||||||
|
>
|
||||||
|
<div className="salary-welfare-plan-content">
|
||||||
|
<div
|
||||||
|
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||||
|
<WelfarePlanAdvanceSearchPannel
|
||||||
|
onCancel={() => this.setState({ showSearchAd: false })}
|
||||||
|
onAdSearch={this.onAdSearch}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/*列表*/}
|
||||||
|
<WelfarePlanList ref={dom => this.welfarePlanListRef = dom} customQuery={customQuery}
|
||||||
|
selectedKey={selectedKey} isQuery={isQuery}/>
|
||||||
|
</div>
|
||||||
|
{/*操作日志*/}
|
||||||
|
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "CUSTOM" ? "siCategory" : "siScheme"}
|
||||||
|
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||||
|
</WeaReqTop>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,270 @@
|
||||||
|
//社保福利方案页面重构
|
||||||
|
.salary-welfare-plan-wrapper {
|
||||||
|
min-width: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-new-top-req-title > div:first-child > div > div {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
|
||||||
|
.wea-tab {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-welfare-plan-content {
|
||||||
|
padding: 8px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.searchAdvanced-condition-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchAdvanced-condition-container {
|
||||||
|
background: #FFF;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.wea-search-buttons {
|
||||||
|
border-top: 1px solid #dadada;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-advanced-searchsAd {
|
||||||
|
height: 125px;
|
||||||
|
overflow: hidden auto;
|
||||||
|
|
||||||
|
.formItem-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: -40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchAdvanced-commonSelect {
|
||||||
|
border-top: 1px solid #ebebeb;
|
||||||
|
margin: 0 25px;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-advance-largeSpacing {
|
||||||
|
padding-left: 26px;
|
||||||
|
|
||||||
|
.link {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 12px 10px 12px 26px;
|
||||||
|
color: #2db7f5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.welfare-plan-adapt {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.adapt-left {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.planOptBtns {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
a {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adapt-right {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.tipContentWrapper {
|
||||||
|
background: #FFF !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.welfare-plan-edit-layout {
|
||||||
|
.flex-center {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.wea-select {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-fixed-left {
|
||||||
|
.ant-table-tbody > tr {
|
||||||
|
height: 41px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleDialog {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 46px 0 16px;
|
||||||
|
|
||||||
|
.titleCol {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleLeftBox {
|
||||||
|
.titleIcon {
|
||||||
|
color: #fff;
|
||||||
|
margin: 0;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #F14A2D;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleRightBox {
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
button:last-child {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-title {
|
||||||
|
border-bottom: 1px solid #e5e5e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-content {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.welfare-plan-edit-area {
|
||||||
|
background: #f6f6f6;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
.wea-search-group, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 5px 16px;
|
||||||
|
|
||||||
|
.wea-form-item-label {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.wea-form-cell:not(:last-child) {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select, .ant-select-selection {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input .arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input {
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 426.16px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nopermission-welfare-plan-edit-layout {
|
||||||
|
.ant-table-fixed-left {
|
||||||
|
.ant-table-tbody > tr {
|
||||||
|
height: 37.38px !important
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.zIndex0-welfare-plan {
|
||||||
|
.wea-new-top-req {
|
||||||
|
z-index: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1440px) {
|
||||||
|
.salary-welfare-plan-content {
|
||||||
|
.welfare-plan-adapt {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.adapt-left {
|
||||||
|
width: calc(100% - 390px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.adapt-right {
|
||||||
|
width: 380px !important;
|
||||||
|
max-width: 380px !important;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -11,6 +11,7 @@ export class StandingBookStore {
|
||||||
@action initAccountForm = () => this.accountForm = new WeaForm();
|
@action initAccountForm = () => this.accountForm = new WeaForm();
|
||||||
@observable addCPForm = new WeaForm(); // 社保台账详情页面,添加补差人员form
|
@observable addCPForm = new WeaForm(); // 社保台账详情页面,添加补差人员form
|
||||||
@action initAddCPForm = () => this.addCPForm = new WeaForm();
|
@action initAddCPForm = () => this.addCPForm = new WeaForm();
|
||||||
|
@observable welfareRQForm = new WeaForm(); // 社保台账页面重构,查询form
|
||||||
|
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,14 @@ const { TableStore } = WeaTableNew;
|
||||||
export class ProgrammeStore {
|
export class ProgrammeStore {
|
||||||
//lys-表单初始化(方案查询表单)
|
//lys-表单初始化(方案查询表单)
|
||||||
@observable planSearchForm = new WeaForm();
|
@observable planSearchForm = new WeaForm();
|
||||||
|
@observable planForm = new WeaForm(); //方案-新增编辑Form
|
||||||
|
@action initPlanForm = () => this.planForm = new WeaForm();//方案-初始化新增编辑Form
|
||||||
|
@observable planCopyForm = new WeaForm(); //方案-复制Form
|
||||||
|
@action initPlanCopyForm = () => this.planCopyForm = new WeaForm();//方案-初始化复制Form
|
||||||
|
@observable planCustomForm = new WeaForm(); //方案-新建编辑自定义方案Form
|
||||||
|
@action initPlanCustomForm = () => this.planCustomForm = new WeaForm();//方案-初始化新建编辑自定义方案Form
|
||||||
|
@observable hasBeenModify = false; //社保福利方案-员工薪资档数据-是否修改过
|
||||||
|
@action setHasBeenModify = (v) => this.hasBeenModify = v;//设置社保福利方案-员工薪资档数据
|
||||||
|
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
>div {
|
> div {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
|
|
@ -31,6 +31,43 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ant-checkbox-wrapper+.ant-checkbox-wrapper {
|
.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//公共彈框表单样式
|
||||||
|
.form-dialog-layout {
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select-selection, .ant-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-select-selection {
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-content {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,9 +142,18 @@ export const padding0 = (num, length) => {
|
||||||
return "0." + num;
|
return "0." + num;
|
||||||
};
|
};
|
||||||
export const toDecimal_n = (num, decimalPlaces) => {
|
export const toDecimal_n = (num, decimalPlaces) => {
|
||||||
if (num === null || !isFinite(num)) return null
|
if (num === null || !isFinite(num)) return null;
|
||||||
if (decimalPlaces < 0) return null;
|
if (decimalPlaces < 0) return null;
|
||||||
const multiplier = Math.pow(10, decimalPlaces);
|
const multiplier = Math.pow(10, decimalPlaces);
|
||||||
const roundedNum = Math.round(num * multiplier) / multiplier;
|
const roundedNum = Math.round(num * multiplier) / multiplier;
|
||||||
return roundedNum.toFixed(decimalPlaces);
|
return roundedNum.toFixed(decimalPlaces);
|
||||||
};
|
};
|
||||||
|
//设置ifrme高度
|
||||||
|
export const getIframeParentHeight = (selector, total, extraHeight) => {
|
||||||
|
const dom = document.querySelector(selector);
|
||||||
|
let height = 280;
|
||||||
|
if (dom && total > 0) {
|
||||||
|
height = (parseFloat(dom.style.height) > 620 && total === 10) ? total * 48 + 108: total < 10 ? total * 48 + 108 : parseFloat(dom.style.height) - extraHeight;
|
||||||
|
}
|
||||||
|
return height;
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue