Merge branch 'release/2.9.42310.01' into release/2.9.42310.01-个税

# Conflicts:
#	pc4mobx/hrmSalary/index.js
This commit is contained in:
黎永顺 2023-10-19 13:39:53 +08:00
commit 86980f33b0
38 changed files with 1416 additions and 149 deletions

View File

@ -0,0 +1,6 @@
import { postFetch } from "../util/request";
// 薪资项目调整记录列表
export const adjustRecordItemList = (params) => {
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/salaryItemList", params);
};

View File

@ -1,4 +1,5 @@
import { WeaTools } from "ecCom";
import { formHeaderPost } from "../util/request";
import { convertToUrlString } from "../util/url";
// 工资单列表
@ -26,23 +27,25 @@ export const recordList = params => {
// 工资查看详情
export const mySalaryBill = params => {
return fetch(`/api/bs/hrmsalary/salaryBill/mySalaryBill?${convertToUrlString(params)}`, {
const { header, ...payload } = params;
return fetch(`/api/bs/hrmsalary/salaryBill/mySalaryBill?${convertToUrlString(payload)}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
}
headers: { "Content-Type": "application/json", ...header }
}).then(res => res.json());
};
export const isNeedSecondPwdVerify = params => {
return WeaTools.callApi("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", params);
export const isNeedSecondPwdVerify = (params, headers) => {
return formHeaderPost("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", params, headers);
// return WeaTools.callApi("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", params);
};
export const getSecondAuthForm = params => {
return WeaTools.callApi("/api/encrypt/secondauthsetting/getSecondAuthForm", "POST", params);
export const getSecondAuthForm = (params, headers) => {
return formHeaderPost("/api/encrypt/secondauthsetting/getSecondAuthForm", "POST", params, headers);
// return WeaTools.callApi("/api/encrypt/secondauthsetting/getSecondAuthForm", "POST", params);
};
export const doSecondAuth = params => {
return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params);
export const doSecondAuth = (params, headers) => {
return formHeaderPost("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params, headers);
// return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params);
};
export const checkPassword = params => {
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
@ -50,3 +53,6 @@ export const checkPassword = params => {
export const saveSecondaryPwd = params => {
return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
};
export const salaryBillGetToken = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/getToken", "GET", params);
};

View File

@ -1,5 +1,6 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
//工资单-工资单发放列表
export const getPayrollList = params => {
@ -377,7 +378,13 @@ export const payrollCheckType = params => {
};
//工资单-反馈验证
export const feedBackSalaryBill = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
const { header, ...payload } = params;
return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
method: "GET",
mode: "cors",
headers: { "Content-Type": "application/json", ...header }
}).then(res => res.json());
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
};
//工资单-确认
export const confirmSalaryBill = params => {

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
//社会福利台账-获取正常缴纳列表
export const getCommonList = (params) => {
@ -339,3 +339,15 @@ export const compensationConfigSave = (params) => {
export const compensationBack = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/compensationBack", params);
};
export const exportSiaccountWelfareImporttemplate = params => {
return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/importtemplate/export", params);
};
export const exportSiaccountWelfaresupplyimporttemplatetemplate = params => {
return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export", params);
};
export const exportSiaccountWelfarebalanceimporttemplatetetemplate = params => {
return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export", params);
};

View File

@ -15,7 +15,8 @@ import CumSituation from "./pages/dataAcquisition/cumSituation";
import Attendance from "./pages/dataAcquisition/attendance";
import SpecialAddDeduction from "./pages/dataAcquisition/specialAddDeduction";
import Ledger from "./pages/ledgerPage";
import Calculate from "./pages/calculate";
// import Calculate from "./pages/calculate";
import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页面
import Payroll from "./pages/payroll";
import PayrollGrant from "./pages/payroll/payrollGrant";
import PayrollDetail from "./pages/payroll/payrollDetail";
@ -47,6 +48,7 @@ import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview";
import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import stores from "./stores";
import "./style/index";
@ -99,6 +101,7 @@ const DataAcquisition = (props) => props.children;
// analysisOfSalaryStatistics 薪酬统计分析
// reportView 薪酬报表查看
// externalPersonManage 非系统人员管理
// adjustSalaryManage 档案管理
// employeedeclare 人员信息报送
// employeedeclareDetail 人员信息报送详情
// intelligentCalculateSalarySettings 智能算薪
@ -131,6 +134,7 @@ const Routes = (
</Route>
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
<Route key="salaryFile" path="salaryFile" component={PayrollFiles}/>
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
<Route
key="dataAcquisition"
path="dataAcquisition"

View File

@ -0,0 +1,101 @@
/*
* Author: 黎永顺
* name: 调薪记录-查看面板
* Description:
* Date: 2023/10/16
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTools } from "ecCom";
import { Button } from "antd";
import { inject, observer } from "mobx-react";
import { adjustSearchConditions } from "../conditions";
import { getSearchs } from "../../../../util";
import { commonEnumList } from "../../../../apis/ruleconfig";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollFilesStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
searchConditions: []
};
}
componentDidMount() {
commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum" })
.then(({ status, data }) => {
if (status) {
this.setState({
searchConditions: _.map(adjustSearchConditions, item => {
return {
...item,
items: _.map(item.items, o => {
if (getKey(o) === "userStatus") {
return {
...o,
options: [
{ key: "0", showname: getLabel(18883, "试用") }, {
key: "1",
showname: getLabel(15711, "正式")
},
{ key: "2", showname: getLabel(480, "临时") }, {
key: "3",
showname: getLabel(15844, "试用延期")
},
{ key: "4", showname: getLabel(542707, "解雇") }, {
key: "5",
showname: getLabel(6091, "离职")
},
{ key: "6", showname: getLabel(6092, "退休") }
]
};
} else if (getKey(o) === "adjustReason") {
return {
...o,
options: _.map(data, item => ({
key: item.value,
showname: item.defaultLabel
}))
};
}
return { ...o };
}),
title: getLabel(32905, "常用条件")
};
})
}, () => {
const { payrollFilesStore: { adjustForm } } = this.props;
adjustForm.initFormFields(this.state.searchConditions);
});
}
});
}
render() {
const { searchConditions } = this.state;
const { payrollFilesStore: { adjustForm } } = this.props;
return (
<React.Fragment>
<div className="wea-advanced-searchsAd">
{getSearchs(adjustForm, searchConditions, 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={() => adjustForm.resetForm()}>{getLabel(2022, "重置")}</Button></span>
<span style={{ marginLeft: 15 }}><Button type="ghost"
onClick={this.props.onToggleSwitch}>{getLabel(31129, "取消")}</Button></span>
</div>
</div>
</React.Fragment>
);
}
}
export default Index;

View File

@ -0,0 +1,27 @@
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("payrollFilesStore")
@observer
class Index extends Component {
render() {
const { payrollFilesStore: { adjustForm } } = this.props;
return (
<div className="advance-search">
<WeaInputSearch value={adjustForm.getFormParams().username}
onChange={v => adjustForm.updateFields({ username: v })}
onSearch={this.props.onAdvanceSearch}
/>
<Button type="ghost" className="wea-advanced-search text-elli"
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,28 @@
.advance-search {
display: flex;
align-items: center;
position: relative;
top: -2.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;
}
}

View File

@ -0,0 +1,176 @@
export const adjustSearchConditions = [
{
items: [
{
colSpan: 2,
conditionType: "INPUT",
domkey: ["username"],
fieldcol: 12,
label: "姓名",
lanId: 25034,
labelcol: 6,
value: "",
viewAttr: 2
},
{
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: "57",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["departmentIds"],
fieldcol: 12,
label: "部门",
lanId: 27511,
labelcol: 6,
viewAttr: 2
},
{
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: "24",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["positionIds"],
fieldcol: 12,
label: "岗位",
lanId: 6086,
labelcol: 6,
viewAttr: 2
},
{
colSpan: 2,
conditionType: "SELECT",
domkey: ["userStatus"],
fieldcol: 12,
label: "状态",
lanId: 535101,
labelcol: 6,
options: [],
viewAttr: 2
},
{
colSpan: 2,
conditionType: "INPUT",
domkey: ["adjustItem"],
fieldcol: 12,
label: "项目名称",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
},
{
colSpan: 2,
conditionType: "SELECT",
domkey: ["adjustReason"],
fieldcol: 12,
label: "调整原因",
lanId: 1897,
labelcol: 6,
options: [],
viewAttr: 2
},
{
colSpan: 2,
conditionType: "RANGEPICKER",
domkey: ["effectiveTime1", "effectiveTime2"],
fieldcol: 12,
label: "生效日期",
lanId: 19548,
labelcol: 6,
viewAttr: 2
},
{
colSpan: 2,
conditionType: "RANGEPICKER",
domkey: ["operateTime1", "operateTime2"],
fieldcol: 12,
label: "操作日期",
lanId: 111,
labelcol: 6,
viewAttr: 2
},
{
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: "17",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["operatorIds"],
fieldcol: 12,
label: "操作人",
lanId: 111,
labelcol: 6,
viewAttr: 2
},
{
colSpan: 2,
conditionType: "INPUT",
domkey: ["description"],
fieldcol: 12,
label: "备注",
lanId: 536726,
labelcol: 6,
value: "",
viewAttr: 2
},
],
defaultshow: true,
title: "common"
}
];

View File

@ -0,0 +1,137 @@
/*
* Author: 黎永顺
* name:调薪管理
* Description:
* Date: 2023/10/13
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { adjustRecordItemList } from "../../apis/adjustManage";
import AdvanceInputBtn from "./components/advanceInputBtn";
import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel";
import cs from "classnames";
import { Button } from "antd";
import "./index.less";
import { convertToUrlString } from "../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollFilesStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, columns: [], dataSource: [], showSearchAd: false,
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
this.adjustRecordItemList();
}
adjustRecordItemList = () => {
const { payrollFilesStore: { adjustForm } } = this.props;
const {
departmentIds, positionIds, operatorIds,
effectiveTime1 = "", effectiveTime2 = "",
operateTime1 = "", operateTime2 = "",
...extra
} = adjustForm.getFormParams();
const { pageInfo } = this.state;
const payload = {
...pageInfo, ...extra,
departmentIds: departmentIds ? departmentIds.split(",") : [],
positionIds: departmentIds ? departmentIds.split(",") : [],
operatorIds: departmentIds ? departmentIds.split(",") : [],
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
};
this.setState({ loading: true });
adjustRecordItemList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {
if (o.dataIndex === "username") {
return { ...o, width: 150, fixed: "left" };
}
return { ...o, width: 150 };
})
});
}
}).catch(() => this.setState({ loading: false }));
};
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
adjustExport = () => {
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const { payrollFilesStore: { adjustForm } } = this.props;
const {
effectiveTime1 = "", effectiveTime2 = "",
operateTime1 = "", operateTime2 = "",
...extra
} = adjustForm.getFormParams();
const payload = {
...extra,
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
};
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target");
this.handleDebounce = null;
}, 500);
}
this.handleDebounce();
};
render() {
const { loading, dataSource, columns, pageInfo, showSearchAd } = this.state;
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.adjustRecordItemList());
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.adjustRecordItemList());
}
};
return (
<WeaTop
title={getLabel(111, "调薪管理")} buttonSpace={10} className="adjustManageLayout"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[
<Button type="primary" onClick={this.adjustExport}>{getLabel(17416, "导出")}</Button>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.openAdvanceSearch()}
onAdvanceSearch={this.adjustRecordItemList}/>
]}
>
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
<AdjustAdvanceSearchPannel
onToggleSwitch={this.openAdvanceSearch}
onAdSearch={this.adjustRecordItemList}
/>
</div>
<WeaTable
rowKey="id" scroll={{ x: 1200, y: "calc(100vh - 155px)" }}
dataSource={dataSource} loading={loading}
pagination={pagination} columns={columns}
/>
</WeaTop>
);
}
}
export default Index;

View File

@ -0,0 +1,47 @@
.adjustManageLayout {
.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: 320px;
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
}
}
}
}
}

View File

@ -0,0 +1,209 @@
/*
* Author: 黎永顺
* name: 薪资核算-重构页面
* Description:
* Date: 2023/10/9
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTop } from "ecCom";
import { Button, message, Modal } from "antd";
import moment from "moment";
import CalculateQuery from "./components/calculateQuery";
import CalculateTablelist from "./components/calculateTablelist";
import CalculateDialog from "./components/calculateDialog";
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
import "./index.less";
import ProgressModal from "../../components/progressModal";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "taxAgentStore")
@observer
class Calculate extends Component {
constructor(props) {
super(props);
this.state = {
queryParams: {
name: "",
dateRange: [
moment(new Date()).startOf("year").format("YYYY-MM"),
moment(new Date()).startOf("month").format("YYYY-MM")
]
}, isRefresh: false,
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
calcDaialog: { visible: false, title: "" }
};
this.timer = null;
this.handleDebounce = null;
}
renderCalculateOpts = () => {
const { taxAgentStore: { showOperateBtn } } = this.props;
const { queryParams, isRefresh } = this.state;
let calculateOpts = [
<Button type="primary" onClick={() => this.setState({
calcDaialog: {
visible: true,
title: getLabel(538780, "核算")
}
})}>{getLabel(538780, "核算")}</Button>,
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
queryParams: { ...queryParams, ...v }
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
];
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
};
handleCalcOpts = ({ key }, record) => {
const { isRefresh, progressModule } = this.state, { id } = record;
switch (key) {
case "0":
//核算
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calculate/${id}`);
break;
case "1":
//删除
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(543231, "确认删除本条数据吗?"),
onOk: () => {
deleteSalaryacct([id]).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(502230, "删除成功!"));
this.setState({ isRefresh: !isRefresh });
} else {
message.error(errormsg);
}
});
}
});
break;
case "2":
//归档
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
if (this.timer) clearInterval(this.timer);
this.setState({ progressModule: { ...progressModule, visible: true } });
this.timer = setInterval(() => {
if (progressModule.progress === 100 && this.timer) {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressModule: { ...progressModule, visible: false, progress: 0 },
isRefresh: !isRefresh
});
}
this.setState({
progressModule: { ...progressModule, progress: progressModule.progress + 1 }
});
}, 800);
fileSalaryAcct({ id }).then(({ status, errormsg }) => {
if (status) {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressModule: { ...progressModule, visible: false, progress: 0 },
isRefresh: !isRefresh
});
message.success(getLabel(503690, "归档成功"));
} else {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressModule: { ...progressModule, visible: false, progress: 0 }
});
message.error(errormsg);
}
});
this.handleDebounce = null;
}, 500);
}
this.handleDebounce();
break;
case "3":
//查看详情
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/placeOnFileDetail?id=${id}`);
break;
case "4":
//重新核算
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
reAccounting({ salaryAcctRecordId: id }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(30700, "操作成功!"));
this.setState({ isRefresh: !isRefresh });
} else {
message.error(errormsg);
}
});
this.handleDebounce = null;
}, 500);
}
this.handleDebounce();
break;
case "5":
//回算
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(543538, "确定回算吗?回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!"),
onOk: () => {
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
backCalculate({ salaryAcctRecordId: id }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(544367, "回算成功!"));
this.setState({ isRefresh: !isRefresh });
} else {
message.error(errormsg);
}
});
this.handleDebounce = null;
}, 500);
}
this.handleDebounce();
}
});
break;
default:
break;
}
};
render() {
const { queryParams, isRefresh, calcDaialog, progressModule } = this.state;
return (
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={this.renderCalculateOpts()} className="calculate-main-layout"
>
<div className="calculate-body">
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
<CalculateDialog {...calcDaialog}
onCancel={(bool, id) => this.setState({
calcDaialog: { ...calcDaialog, visible: false },
isRefresh: bool === "refresh" ? !isRefresh : isRefresh
}, () => bool === "refresh" && window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calculate/${id}`))}
/>
{/* 归档进度条*/}
{
progressModule.visible &&
<ProgressModal
{...progressModule}
onCancel={() => {
this.setState({
progressModule: {
...progressModule,
visible: false,
progress: 0
}
}, () => clearInterval(this.timer));
}}
/>
}
</div>
</WeaTop>
);
}
}
export default Calculate;

View File

@ -1,56 +0,0 @@
export const columns = [
{
title: "薪资所属月",
dataIndex: 'title',
key: 'title',
},
{
title: "薪资账套",
dataIndex: 'title',
key: 'title',
},
{
title: "状态",
dataIndex: 'title',
key: 'title',
},
{
title: "税款所属期",
dataIndex: 'title',
key: 'title',
},
{
title: "核算人数",
dataIndex: 'title',
key: 'title',
},
{
title: "核算人",
dataIndex: 'title',
key: 'title',
},
{
title: "最后操作时间",
dataIndex: 'title',
key: 'title',
},
{
title: "备注",
dataIndex: 'title',
key: 'title',
},
{
title: "操作",
dataIndex: 'cz',
key: 'cz',
}
]
export const dataSource = [{
title: "测试"
}];

View File

@ -0,0 +1,43 @@
export const calculateConditions = [
{
items: [
{
colSpan: 1,
conditionType: "MONTHPICKER",
domkey: ["salaryMonthStr"],
fieldcol: 14,
label: "薪资所属月",
lanId: 542604,
labelcol: 6,
value: "",
rules: "required|string",
viewAttr: 3
},
{
colSpan: 1,
conditionType: "SELECT",
domkey: ["salarySobId"],
fieldcol: 14,
label: "核算账套",
lanId: 519146,
labelcol: 6,
options: [],
rules: "required|string",
viewAttr: 3
},
{
colSpan: 1,
conditionType: "INPUT",
domkey: ["description"],
fieldcol: 14,
label: "备注",
lanId: 536726,
labelcol: 6,
value: "",
viewAttr: 2
}
],
defaultshow: true,
title: ""
}
];

View File

@ -0,0 +1,92 @@
/*
* Author: 黎永顺
* name: 薪资核算重构-核算弹框
* Description:
* Date: 2023/10/9
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../../util";
import { salaryacctGetForm, saveBasic } from "../../../../apis/calculate";
import { calculateConditions } from "./condition";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
conditions: [], loading: false
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.salaryacctGetForm(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.calculateStore.initCalcForm();
}
salaryacctGetForm = (props) => {
const { calculateStore: { calculateForm } } = props;
salaryacctGetForm().then(({ status, data }) => {
if (status) {
const { salarySobs } = data;
this.setState({
conditions: _.map(calculateConditions, item => ({
...item,
items: _.map(item.items, o => {
if (getKey(o) === "salarySobId") {
return {
...o,
options: _.map(salarySobs, g => ({ key: g.id.toString(), showname: g.name }))
};
}
return { ...o };
})
}))
}, () => calculateForm.initFormFields(this.state.conditions));
}
});
};
save = () => {
const { calculateStore: { calculateForm } } = this.props;
calculateForm.validateForm().then(f => {
if (f.isValid) {
const payload = calculateForm.getFormParams();
this.setState({ loading: true });
saveBasic({ ...payload }).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
this.props.onCancel("refresh", data);
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
render() {
const { conditions, loading } = this.state;
const { calculateStore: { calculateForm } } = this.props;
return (
<WeaDialog
{...this.props} style={{ width: 480 }} initLoadCss
buttons={[
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(543233, "保存并进入核算")}</Button>
]}
>
<div className="calculate-dialog-layout">{getSearchs(calculateForm, conditions, 1, false)}</div>
</WeaDialog>
);
}
}
export default Index;

View File

@ -0,0 +1,34 @@
/*
* Author: 黎永顺
* name: 薪资核算-查询
* Description:
* Date: 2023/10/9
*/
import React, { Component } from "react";
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
render() {
const { queryParams } = this.props;
const { dateRange, name } = queryParams;
return (
<div className="salary-btn-flex">
<div className="mounth-range">
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
<MonthRangePicker dateRange={dateRange} viewAttr={2}
onChange={v => this.props.onChange({ dateRange: v })}/>
</div>
<WeaInputSearch value={name}
placeholder={getLabel(543431, "请输入薪资账套名称")}
onChange={v => this.props.onChange({ name: v })}
onSearch={this.props.onSearch}
/>
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,153 @@
/*
* Author: 黎永顺
* name: 薪资核算-列表
* Description:
* Date: 2023/10/9
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, Tag } from "antd";
import { getSalaryAcctList } from "../../../../apis/calculate";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, columns: [], dataSource: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
this.getSalaryAcctList(this.props);
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isRefresh !== this.props.isRefresh) this.getSalaryAcctList(nextProps);
}
getSalaryAcctList = (props) => {
const { pageInfo } = this.state;
const { queryParams } = props;
const { dateRange, ...extra } = queryParams;
const [startMonthStr, endMonthStr] = dateRange || [];
const params = { startMonthStr, endMonthStr, ...extra };
const payload = { ...pageInfo, ...params };
this.setState({ loading: true });
getSalaryAcctList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(_.filter(columns, it => (it.dataIndex !== "backCalcStatus" && it.dataIndex !== "acctTimes")),
o => {
const { dataIndex } = o;
let width = "";
switch (dataIndex) {
case "status":
case "employeeSize":
width = "5%";
break;
case "salarySobName":
width = "20%";
break;
case "description":
width = "15%";
break;
default:
width = "10%";
break;
}
if (dataIndex === "operate") {
return {
...o, width: 170,
title: <span>
<span>{getLabel(30585, "操作")}</span>
<WeaHelpfulTip
placement="topLeft" style={{ marginLeft: 4 }}
title={getLabel(111, "当前账套当次核算的工资单全部撤回才可重新核算")}
/>
</span>,
render: (__, record) => {
const { operate = [] } = record;
return <React.Fragment>
{
_.map(operate.slice(0, 2), f => (
<a href="javascript:void(0);" style={{ marginRight: 10 }}
onClick={() => this.props.onCalcOpts({ key: f.index }, record)}>{f.text}</a>
))
}
{
!_.isEmpty(operate.slice(2)) &&
<Dropdown
overlay={<Menu onClick={(e) => this.props.onCalcOpts(e, record)}>
{
_.map(operate.slice(2), g => (<Menu.Item key={g.index}>{g.text}</Menu.Item>))
}
</Menu>
}
>
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
</Dropdown>
}
</React.Fragment>;
}
};
} else if (dataIndex === "salarySobName") {
return {
...o, width,
render: (text, record) => {
const { acctTimes, backCalcStatus } = record;
return <div className="salarySobNameWrapper">
<span title={text}>{text}</span>
<div className="salarySobNameTagWrapper">
{
backCalcStatus === 1 &&
<i className="icon-coms-Refresh" title={getLabel(542638, "回算")}/>
}
<Tag color="blue">{`${getLabel(15323, "第")}${acctTimes}${getLabel(18929, "次")}`}</Tag>
</div>
</div>;
}
};
}
return { ...o, width };
})
});
}
}).catch(() => this.setState({ loading: false }));
};
render() {
const { loading, dataSource, columns, pageInfo } = this.state;
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.getSalaryAcctList(this.props));
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.getSalaryAcctList(this.props));
}
};
return (
<WeaTable
rowKey="id"
dataSource={dataSource} loading={loading}
pagination={pagination} columns={columns}
/>
);
}
}
export default Index;

View File

@ -11,6 +11,7 @@ import { inject, observer } from "mobx-react";
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { customCacheExportField } from "../../../../../apis/calculate";
import { convertToUrlString } from "../../../../../util/url";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -85,7 +86,7 @@ class Index extends Component {
}
return (
<WeaDialog
{...this.props} hasScroll initLoadCss
{...this.props} hasScroll initLoadCss className="customEpDialogLayout"
scalable title={getLabel(111, "选择字段")}
style={{
width: 700,

View File

@ -0,0 +1,16 @@
.customEpDialogLayout {
.wea-search-group {
.wea-title {
padding-left: 0 !important;
font-weight: 700 !important;
}
.ant-col-8 {
padding: 0 8px !important;
}
.wea-content {
padding: 8px 16px 0;
}
}
}

View File

@ -71,13 +71,9 @@ export default class Calculate extends React.Component {
// 列表项核算回调
handleAccount(record) {
window.open(
"/spa/hrmSalary/static/index.html#/main/hrmSalary/calculate/" +
"/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" +
record.id
);
// window.open(
// "/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" +
// record.id
// );
}
// 列表项删除回调

View File

@ -30,6 +30,9 @@
& > span {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.salarySobNameTagWrapper {
@ -43,3 +46,86 @@
}
}
}
//重构薪资核算页
.salary-btn-flex {
display: flex;
align-items: center;
.mounth-range {
display: flex;
align-items: center;
margin-right: 10px;
.label {
color: #999;
}
}
.wea-input-focus {
margin-top: -4px;
}
}
.calculate-main-layout {
.wea-new-top-content {
overflow-y: hidden;
}
.calculate-body {
height: 100%;
width: 100%;
padding: 16px;
overflow-y: auto;
.wea-new-table {
background: #fff;
}
.ant-table-tbody {
td {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
.calculate-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;
}
}
}
}

View File

@ -6,6 +6,11 @@ import SelectFieldModal from "./selectFieldModal";
import { getQueryString } from "../../../../util/url";
import AddHeaderFieldsModal from "./addHeaderFieldsModal";
import { cacheImportField } from "../../../../apis/calculate";
import {
exportSiaccountWelfarebalanceimporttemplatetetemplate,
exportSiaccountWelfareImporttemplate,
exportSiaccountWelfaresupplyimporttemplatetemplate
} from "../../../../apis/standingBook";
@inject("calculateStore", "standingBookStore")
@observer
@ -76,11 +81,23 @@ export default class AcctResultImportModal extends React.Component {
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
if (standingBookTabKey === "1") {
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
const promise = exportSiaccountWelfareImporttemplate({
billMonth,
welfareNames: this.state.modalParam.salaryItemIds.split(","),
paymentOrganization: Number(paymentOrganization)
});
} else if (standingBookTabKey === "3") {
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
const promise = exportSiaccountWelfaresupplyimporttemplatetemplate({
billMonth,
welfareNames: this.state.modalParam.salaryItemIds.split(","),
paymentOrganization: Number(paymentOrganization)
});
} else if (standingBookType === "difference") {
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
const promise = exportSiaccountWelfarebalanceimporttemplatetetemplate({
billMonth,
welfareNames: this.state.modalParam.salaryItemIds.split(","),
paymentOrganization: Number(paymentOrganization)
});
}
}
window.open(url, "_self");

View File

@ -46,6 +46,17 @@ class AddHeaderFieldsModal extends Component {
}
});
};
handleSelectAll = (checked) => {
if (checked === "1") {
this.setState({
itemsCheckeds: _.reduce(this.props.itemsByGroup, (pre, cur) => {
return [...pre, ..._.map(cur.salaryItems, it => it.salaryItemId)];
}, [])
});
} else {
this.setState({ itemsCheckeds: [] });
}
};
render() {
const { showOnlyChecked, itemsCheckeds } = this.state;
@ -72,8 +83,14 @@ class AddHeaderFieldsModal extends Component {
<Button type="primary" onClick={() => this.props.onAdd(itemsCheckeds)}>{getLabel(111, "添加")}</Button>,
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
]}
bottomLeft={<WeaCheckbox content={getLabel(111, "只显示已选中字段")}
onChange={this.handleShowOnlyChecked}/>}
bottomLeft={
<React.Fragment>
<WeaCheckbox content={getLabel(111, "只显示已选中字段")}
onChange={this.handleShowOnlyChecked}/>
<WeaCheckbox content={getLabel(111, "全部选中")} style={{ marginLeft: 10 }}
onChange={this.handleSelectAll}/>
</React.Fragment>
}
>
{
_.map(dataSource, item => {

View File

@ -2,6 +2,11 @@
.wea-search-group {
.wea-title {
padding-left: 0 !important;
font-weight: 700 !important;
}
.ant-col-8 {
padding: 0 8px !important;
}
.wea-content {

View File

@ -41,7 +41,7 @@ class Index extends Component {
super(props);
this.state = {
year: moment(new Date()).format("YYYY"),
declareMonth: moment(new Date()).month() + 1 > 10 ? (moment(new Date()).month() + 1) + "" : "0" + (moment(new Date()).month() + 1),
declareMonth: moment(new Date()).month() + 1 >= 10 ? (moment(new Date()).month() + 1) + "" : "0" + (moment(new Date()).month() + 1),
taxAgentId: "",
innerWidth: window.innerWidth,
addAllLoading: false,

View File

@ -8,6 +8,7 @@ import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
import "../payroll/templatePreview/index.less";
import * as API from "../../apis/mySalaryBenefits";
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import PassSetDialog from "./passSetDialog";
@ -30,7 +31,8 @@ export default class MobilePayroll extends React.Component {
mySalaryBillData: {
employeeInformation: {},
salaryTemplate: []
}
},
salaryBillToken: {}
};
this.id = "";
}
@ -39,37 +41,57 @@ export default class MobilePayroll extends React.Component {
const type = getQueryString("type");
this.id = getQueryString("id");
const { mySalaryStore: { init } } = this.props;
const { data, status } = await payrollCheckType();
if (type !== "phone") {
const { data, status } = await payrollCheckType();
if (status && data === "PWD") {
init(false, () => this.getMySalaryBill(this.id));
} else {
this.setState({ captchaVisible: true });
}
}
type === "phone" && this.initMobile();
type === "phone" && await this.initMobile();
}
initMobile = () => {
initMobile = async () => {
const { mySalaryStore: { setInitEmVerify } } = this.props;
// if (window.em) {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
this.setState({ visible: true }, () => {
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, notSetting }) => {
this.setState({ notSetting });
});
if (window.em) {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
this.setState({ visible: true }, () => {
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, notSetting }) => {
this.setState({ notSetting });
});
});
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
}
});
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
}
});
// } else {
// setInitEmVerify();
// }
} else {
const params = this.getUrlkey();
const { data } = await salaryBillGetToken({ uid: _.pick(params, ["recipient"]).recipient });
this.setState({ salaryBillToken: data }, () => {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
this.setState({ visible: true }, () => {
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, notSetting }) => {
this.setState({ notSetting });
});
});
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
}
});
});
}
};
doSecondAuth = () => {
const { salaryBillToken } = this.state;
const { mySalaryStore: { setInitEmVerify } } = this.props;
if (!this.state.authCode) {
this.refs.weaError.showError();
@ -77,7 +99,7 @@ export default class MobilePayroll extends React.Component {
}
API.doSecondAuth({
authCode: this.state.authCode, mouldCode: "HRM", itemCode: "SALARY"
}).then(({ status, checkStatus, checkMsg }) => {
}, salaryBillToken).then(({ status, checkStatus, checkMsg }) => {
if (status && checkStatus === "1") {
message.success(checkMsg);
setInitEmVerify();
@ -89,10 +111,11 @@ export default class MobilePayroll extends React.Component {
});
};
getMySalaryBill = (salaryInfoId) => {
const { salaryBillToken } = this.state;
const { mySalaryStore: { getMySalaryBill } } = this.props;
const params = this.getUrlkey();
const payload = {
salaryInfoId,
salaryInfoId, header: salaryBillToken,
..._.pick(params, ["recipient"])
};
getMySalaryBill(payload).then(result => {
@ -129,17 +152,20 @@ export default class MobilePayroll extends React.Component {
title: getLabel(131329, "信息确认"),
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
onOk: () => {
feedBackSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errorMsg }) => {
if (status) {
const { mySalaryBillData } = this.state;
const { salaryTemplate } = mySalaryBillData;
const { feedbackUrl } = salaryTemplate;
this.getMySalaryBill(getQueryString("id"));
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
} else {
message.error(errorMsg);
}
});
const { salaryBillToken } = this.state;
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
.then(({ status, errorMsg }) => {
if (status) {
const { mySalaryBillData } = this.state;
const { salaryTemplate } = mySalaryBillData;
const { feedbackUrl } = salaryTemplate;
this.getMySalaryBill(getQueryString("id"));
window.location.href = `${window.ecologyContentPath || ""}${feedbackUrl}`;
// window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
} else {
message.error(errorMsg);
}
});
}
});
};
@ -165,7 +191,8 @@ export default class MobilePayroll extends React.Component {
]}
>
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
<WeaInput value={this.state.authCode} viewAttr={3} onChange={authCode => this.setState({ authCode })}/>
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
onChange={authCode => this.setState({ authCode })}/>
</WeaError>
{
notSetting &&

View File

@ -163,7 +163,7 @@ export const salarySetConditions = [
checkboxValue: false,
conditionType: "SELECT",
domkey: ["salarySobIds"],
fieldcol: 18,
fieldcol: 14,
label: "薪资账套",
lanId: 538010,
labelcol: 6,

View File

@ -312,7 +312,7 @@ export default class FormalFormModal extends React.Component {
// validateType: this.props.dataType || this.state.returnType,
// extendParam: JSON.stringify(this.state.extendParam),
// formula: this.state.value,
parameters: this.parameters,
parameters: _.map(this.parameters, o => ({ ...o, content: o.content || "" })),
id: this.props.formulaId
// referenceType: this.referenceType == "" ? this.props.valueType == "2" ? "formula" : this.props.valueType == "3" ? "sql" : "" : this.referenceType
};
@ -320,7 +320,7 @@ export default class FormalFormModal extends React.Component {
if (status) {
message.success("测试结果已更新");
this.setState({
showTestVal: data
showTestVal: !_.isNil(data) ? data.toString() : data
});
} else {
message.error(errormsg || "");

View File

@ -323,7 +323,7 @@ export default class SalaryItem extends React.Component {
})}
>{getLabel(111, "同步到薪资账套")}</Button>,
<Button type="primary" onClick={() => {
handleSlideSave(false);
handleSlideSave(true);
}}>保存</Button>
];
}

View File

@ -105,6 +105,26 @@
.salarySetDialog {
.salarySetDialogContent {
background: #f6f6f6;
.wea-search-group {
padding: 16px;
}
.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;
}
}
}
.wea-select, .ant-select, .ant-select-selection {
width: 100%;
}
@ -125,7 +145,7 @@
height: 30px;
white-space: nowrap;
min-width: 100px;
max-width: 345px;
max-width: 237px;
width: 100%;
display: inline-block;
padding: 4px 17px 4px 4px;

View File

@ -80,7 +80,7 @@ class SyncToSalaryAccountSetDialog extends Component {
return (
<WeaDialog
{...this.props} className="salarySetDialog" initLoadCss
style={{ width: 550 }}
style={{ width: 480 }}
buttons={[<Button type="primary" onClick={this.save}
loading={this.state.loading}>{getLabel(537558, "确定")}</Button>]}
>

View File

@ -18,6 +18,7 @@ import { convertToUrlString, getURLParameters } from "../../../util/url";
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
import ImportDialog from "../../../components/importDialog";
import "./index.less";
import { sysinfo } from "../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
const APILIST = {
@ -64,7 +65,8 @@ export default class Archives extends React.Component {
visible: false, title: "", nextloading: false,
link: "", importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/scheme/preview"
}
},
extEmpsWitch: "1" //非系统人员开关, 1 开启, 0关闭
};
this.record = {};
}
@ -73,9 +75,21 @@ export default class Archives extends React.Component {
const { archivesStore: { doInit } } = this.props;
doInit();
this.salaryArchiveDelete();
this.getSysinfo();
this.queryList({ runStatuses: ["1"] });
}
/*
* Author: 黎永顺
* Description: 非系统人员开关查询
* Params:
* Date: 2023/7/14
*/
getSysinfo = () => {
sysinfo().then(({ status, data }) => {
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
});
};
queryInsuranceTabTotal = () => {
API.queryInsuranceTabTotal().then(({ data = {}, status }) => {
if (status) {
@ -612,7 +626,8 @@ export default class Archives extends React.Component {
pageInfo,
tabCount,
loading,
importDialog
importDialog,
extEmpsWitch
} = this.state;
const {
form, condition, showSearchAd, setShowSearchAd,
@ -805,7 +820,7 @@ export default class Archives extends React.Component {
showDropIcon={false} // 是否显示下拉按钮
>
<WeaTab
datas={tabCondition}
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(tabCondition) : tabCondition}
buttons={showOperateBtn ? btns : []}
counts={tabCount}
countParam="groupid" //数量

View File

@ -29,6 +29,13 @@ const Home = props => props.children;
class Root extends React.Component {
componentWillMount() {
const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"
const link = document.createElement("link")
link.setAttribute('rel','stylesheet');
link.setAttribute('type','text/css');
link.setAttribute('href',src);
let header = document.getElementById("container")
header.appendChild(link)
top.$(".ant-message").remove();
window.location.hash.indexOf("mobilepayroll") === -1 && allStore.taxAgentStore.getPermission();
if (window.location.hash.indexOf("payroll") !== -1) {

View File

@ -11,6 +11,7 @@ export class calculateStore {
@observable PCSearchForm = new WeaForm(); //人员确认-form
@observable ECSearchForm = new WeaForm(); //薪资核算-form
@observable otherConditions = []; //薪资核算-其他查询条件
@observable calculateForm = new WeaForm(); //薪资核算重构-核算form
@observable tableStore = new TableStore(); // new table
@ -71,6 +72,9 @@ export class calculateStore {
// ** 薪资核算-其他条件查询 **
@action
setOtherConditions = (otherConditions) => this.otherConditions = otherConditions;
// ** 薪资核算重构-初始化核算form **
@action
initCalcForm = () => this.calculateForm = new WeaForm();
// ** 设置导入参数 **
@action

View File

@ -1,5 +1,5 @@
import { action, observable } from "mobx";
import { WeaTableNew } from "comsMobx";
import { WeaForm, WeaTableNew } from "comsMobx";
import * as API from "../apis/payrollFiles";
import { getDataPerspective, statisticsEmployeeDetailList } from "../apis/statistics";
@ -10,6 +10,8 @@ export class PayrollFilesStore {
@observable tableStore = new TableStore();
@observable employeeTableStore = new TableStore();
@observable pivotTableStore = new TableStore();
@observable adjustForm = new WeaForm(); //调薪记录-核算form
@action initAdjustForm = () => this.adjustForm = new WeaForm();//调薪记录-初始化核算form
@action("薪资档案-列表查询")
queryList = (payload = {}, searchItemsValue = {}, url = "") => {

View File

@ -309,7 +309,7 @@ export class SalaryItemStore {
if (!continueFlag) {
this.editSlideVisible = false;
}
this.initRequest();
((!params.id && continueFlag) || !continueFlag) && this.initRequest();
message.success("保存成功");
resolve();
} else {

View File

@ -1,26 +1,54 @@
export const formPost = (url, params) => {
url = url + "?__random__=" + (new Date()).valueOf();
let formdata = new URLSearchParams();
Object.keys(params).map(key => {
formdata.append(key, params[key])
})
return fetch(url, {
method:"POST",
headers:{
"Content-Type":'application/x-www-form-urlencoded'
},
body:formdata
}).then(res => res.json())
}
export const formHeaderPost = (url, method, params, header) => {
url = url + "?__random__=" + (new Date()).valueOf();
let formdata = new URLSearchParams();
Object.keys(params).map(key => {
formdata.append(key, params[key]);
});
return fetch(url, {
method, mode: "cors",
headers: { "Content-Type": "application/x-www-form-urlencoded", ...header },
body: formdata
}).then(res => res.json());
};
export const postFetch = (url, params) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => res.json());
};
export const headerRequestFetch = (url, method, params, header) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method, mode: "cors",
headers: { "Content-Type": "application/json", ...header },
body: JSON.stringify(params)
}).then(res => res.json());
};
export const postExportFetch = (url, params) => {
url = url + "?__random__=" + (new Date()).valueOf();
return fetch(url, {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
}).then(res => {
const filename = res.headers.get("Content-Disposition").split("filename=")[1];
res.blob().then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = decodeURI(filename);
a.click();
window.URL.revokeObjectURL(url);
});
});
};