Merge branch 'release/3.0.1.2503.01-合并业务线' into custom/领悦业务线

This commit is contained in:
lys 2025-04-07 09:18:35 +08:00
commit 08b6a6c291
55 changed files with 920 additions and 908 deletions

View File

@ -24,3 +24,11 @@ export const savePushItemList = (params) => {
export const deletePushItemList = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
};
// 推送记录列表
export const getPushRecordList = (params) => {
return postFetch("/api/bs/hrmsalary/push/record/list", params);
};
// 推送记录详细列表
export const getPushRecordDetail = (params) => {
return postFetch("/api/bs/hrmsalary/push/record/detail", params);
};

View File

@ -15,10 +15,18 @@ export const getTabList = (params) => {
export const getNormalList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
};
//社会福利台账-获取正常缴纳列表合计行
export const getNormalListSum = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", params);
};
//社会福利台账-获取补缴列表
export const getSupplementaryList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
};
//社会福利台账-获取补缴列表合计
export const getSupplementaryListSum = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", params);
};
//社会福利台账-获取总览列表
export const getOverViewList = (params) => {
@ -122,10 +130,18 @@ export const saveRecession = (params) => {
export const recessionList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
};
//查询退差列表合计行
export const recessionListSum = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", params);
};
//查询补差列表
export const balanceList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
};
//查询补差列表合计行
export const balanceListSum = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", params);
};
//删除退差数据
export const delRecession = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
@ -205,3 +221,11 @@ export const cacheWelfareListField = (params) => {
export const cacheBalanceWelfareList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
};
// 社保福利台账正常缴纳-增加人员并核算
export const addSocialAcctEmp = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/addSocialAcctEmp", params);
};
// 社保福利台账正常缴纳-增加人员并核算
export const deleteSocialAcctEmp = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params);
};

View File

@ -95,7 +95,7 @@ class PersonalScopeTable extends Component {
render() {
const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state;
const { onChangeSelectKey } = this.props;
const { onChangeSelectKey, showOperateBtn } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
@ -128,7 +128,7 @@ class PersonalScopeTable extends Component {
return (
<WeaTable
rowKey="id"
rowSelection={rowSelection}
rowSelection={showOperateBtn ? rowSelection : null}
dataSource={dataSource}
pagination={pagination}
loading={loading.query}

View File

@ -10,7 +10,7 @@ class Content extends Component {
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
return (
<div className="salary-preview-container">
<div style={{ border: "10px solid #F3F9FF" }}>
<div style={{ border: "10px solid #F3F9FF", width: "100%" }}>
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>

View File

@ -155,13 +155,14 @@
.item-count {
//flex-basis: 328px;
flex: 1;
padding-left: 16px;
padding: 12px 16px;
height: 100%;
line-height: 40px;
background: #fff;
font-size: 12px;
color: #5F5F5F;
word-break: break-all;
display: flex;
align-items: center;
}
}
}

View File

@ -153,6 +153,36 @@ export const salaryDetailSearchConditions = [
multiple: true,
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: 1,
conditionType: "BROWSER",
domkey: ["employeeIds"],
fieldcol: 16,
label: getLabel(111, "人员"),
labelcol: 8,
viewAttr: 2
},
{
browserConditionParam: {
completeParams: {},

View File

@ -109,12 +109,13 @@ class SalaryDetails extends Component {
getSalaryList = (props) => {
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props;
const [startDateStr, endDateStr] = dateRange;
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
const { taxAgentIds, subcompanyIds, departmentIds, employeeIds, ...extra } = salaryDetailSearchForm.getFormParams();
const { pageInfo, transferDialog, updateSum } = this.state;
const payload = {
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
departmentIds: departmentIds ? departmentIds.split(",") : [],
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
employeeIds: employeeIds ? employeeIds.split(",") : [],
...extra, ...pageInfo, startDateStr, endDateStr
};
this.setState({ loading: true });

View File

@ -182,7 +182,7 @@
}
.wea-advanced-searchsAd {
height: 155px;
height: 200px;
overflow: hidden auto;
.formItem-delete {

View File

@ -94,8 +94,8 @@ class AppConfig extends Component {
} = this.state;
const btns = [
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
// <Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
// <Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
];
const items = [
{

View File

@ -91,7 +91,7 @@ class EditSalaryCalcSlide extends Component {
save = () => {
const { id: salaryAcctEmpId } = this.props;
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
if (!_.every(baseInfo, (item) => (!item.canEdit || !!item.fieldValue))) {
Modal.warning({
title: getLabel(131329, "信息确认"),
content: getLabel(518702, "必要信息不完整,红色*为必填项!")

View File

@ -0,0 +1,86 @@
/*
* 数据推送
* 推送记录
* @Author: 黎永顺
* @Date: 2025/4/1
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import * as API from "../../../../apis/datapush";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: []
};
}
componentDidMount() {
this.getPushRecordList();
}
componentWillUnmount() {
this.setState({ selectedRowKeys: [] });
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isQuery !== this.props.isQuery) this.setState({
pageInfo: { ...this.state.pageInfo, current: 1 }
}, () => this.getPushRecordList(nextProps));
}
getPushRecordList = (props) => {
const { pageInfo } = this.state, { query } = props || this.props;
const payload = { ...pageInfo, ...query };
this.setState({ loading: true });
API.getPushRecordList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
columns: [...columns, {
title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => (<React.Fragment>
<a href="javascript: void(0);" style={{ marginRight: 10 }}
onClick={() => this.props.onChange("push", record)}>{getLabel(111, "推送")}</a>
<a href="javascript: void(0);"
onClick={() => this.props.onChange("view", record)}>{getLabel(111, "查看详情")}</a>
</React.Fragment>)
}]
});
}
});
};
render() {
const { columns, dataSource, loading, pageInfo, selectedRowKeys } = 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.getPushRecordList());
},
onChange: current => {
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordList());
}
};
const rowSelection = {
selectedRowKeys,
onChange: v => this.setState({ selectedRowKeys: v })
};
return (<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
rowSelection={rowSelection} scroll={{ y: `calc(100vh - 182px)` }}/>);
}
}
export default Index;

View File

@ -0,0 +1,77 @@
/*
* 推送记录
* 查看详情
* @Author: 黎永顺
* @Date: 2025/4/2
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
import { getPushRecordDetail } from "../../../../apis/datapush";
const getLabel = WeaLocaleProvider.getLabel;
class PushDetailDialog extends Component {
constructor(props) {
super(props);
this.state = {
query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPushRecordDetail(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
query: { name: "" }, pageInfo: { current: 1, pageSize: 10, total: 0 }
});
}
getPushRecordDetail = (props) => {
const { recordId } = props || this.props, { pageInfo, query } = this.state;
const payload = { ...query, ...pageInfo, recordId };
this.setState({ loading: true });
getPushRecordDetail(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({ columns, dataSource, pageInfo: { current, pageSize, total } });
}
});
};
render() {
const { query, 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.getPushRecordDetail());
},
onChange: current => {
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordDetail());
}
};
return (<WeaSlideModal
{...this.props} className="pushDetailDialog"
title={<WeaTop title={getLabel(111, "推送详情")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[<WeaInputSearch value={query.name} onSearch={() => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.getPushRecordDetail())}
onChange={v => this.setState({ query: { ...query, name: v } })}/>]}/>
}
direction="right" top={0} width={800} height={100}
measureT="%" measureX="px" measureY="%"
content={<div className="pushDetail_content">
<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
scroll={{ y: `calc(100vh - 182px)` }}/>
</div>}
/>);
}
}
export default PushDetailDialog;

View File

@ -12,8 +12,11 @@ import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
import * as API from "../../apis/datapush";
import DatapushList from "./components/datapushList";
import PushRecord from "./components/pushRecord";
import DatapushDialog from "./components/DPDialog";
import PushDetailDialog from "./components/pushRecord/pushDetailDialog";
import { Button, message, Modal } from "antd";
import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@ -25,7 +28,8 @@ class Index extends Component {
super(props);
this.state = {
selectedKey: "datapush", isQuery: false, query: { name: "" },
DPDialog: { visible: false, title: "", detail: {} } //数据推送弹框
DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框
pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框
};
}
@ -53,13 +57,16 @@ class Index extends Component {
}
});
break;
case "view":
this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } });
break;
default:
break;
}
};
render() {
const { selectedKey, DPDialog, isQuery, query } = this.state;
const { selectedKey, DPDialog, isQuery, query, pushDetailDialog } = this.state;
const { taxAgentStore: { PageAndOptAuth } } = this.props;
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
const tabs = [
@ -72,14 +79,28 @@ class Index extends Component {
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
children: <DatapushList isQuery={isQuery} query={query} onChange={this.handleOperate}/>
},
{
title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [],
buttons: showOperateBtn ? [
<Button type="primary" onClick={() => this.handleOperate("batchpush")}>{getLabel(111, "批量推送")}</Button>,
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
onChange={v => this.setState({ query: { ...query, name: v } })}/>
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
children: <PushRecord isQuery={isQuery} query={query} onChange={this.handleOperate}/>
}
];
return (
<WeaReqTop
title={getLabel(111, "数据推送")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
iconBgcolor="#F14A2D" tabDatas={tabs} className="datapush_wrapper" buttonSpace={10}
buttons={_.find(tabs, o => selectedKey === o.key).buttons}
onChange={selectedKey => this.setState({ selectedKey })}
iconBgcolor="#F14A2D" tabDatas={tabs}
className={cs("datapush_wrapper", { "reqZindex0": pushDetailDialog.visible })}
buttonSpace={10} buttons={_.find(tabs, o => selectedKey === o.key).buttons}
onChange={selectedKey => this.setState({
selectedKey, pushDetailDialog: { ...pushDetailDialog, visible: false },
DPDialog: { ...DPDialog, visible: false }
})}
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
>
@ -87,6 +108,10 @@ class Index extends Component {
{/*数据推送框*/}
<DatapushDialog {...DPDialog} onClose={() => this.setState({ DPDialog: { ...DPDialog, visible: false } })}
onSearch={this.handleAdvanceSearch}/>
{/*推送记录查看详情*/}
<PushDetailDialog {...pushDetailDialog} onClose={() => this.setState({
pushDetailDialog: { ...pushDetailDialog, visible: false }
})}/>
</WeaReqTop>
);
}

View File

@ -77,6 +77,42 @@
}
}
}
.pushDetailDialog {
.wea-slide-modal-content {
height: 100%;
.wea-new-table {
background: #FFF;
}
.pushDetail_content {
height: 100%;
background: #F6F6F6;
padding: 8px 16px;
}
}
.wea-slide-modal-title {
background: #FFF;
text-align: left;
height: 44px;
}
.wea-new-top {
background: #FFF;
.ant-col-10 {
padding-right: 50px !important;
}
}
}
}
.reqZindex0 {
.wea-new-top-req {
z-index: 0 !important;
}
}
.custom_item_treeselect {
@ -131,4 +167,3 @@
}
}
}

View File

@ -39,7 +39,7 @@ class CopyLedgerModal extends Component {
getTaxAgentSelectListAsAdmin = () => {
const { ledgerStore } = this.props;
const { copyForm: form } = ledgerStore;
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
.then(({ status, data }) => {
if (status) {
const conditions = _.map(copyConditions, it => {

View File

@ -41,6 +41,10 @@
.baseSettingWrapper {
padding: 12px 12px 12px 20px;
.wea-form-item-wrapper {
display: inline-block !important;
}
.baseSettingLeft {
border: 1px solid #ebedf0;
padding: 0 !important;
@ -147,6 +151,10 @@
display: flex;
align-items: center;
.wea-ignore-node i {
display: none;
}
.wea-sortable-grid-item {
display: inline-block;
border: none;

View File

@ -61,10 +61,11 @@ class LedgerAccountApprRule extends Component {
}
renderForm = (form, conditions) => {
const { saveSalarySobId, editId } = this.props;
const { saveSalarySobId, editId, record } = this.props;
const { approvalItemGroup } = this.state;
const { isFormInit } = form;
const formParams = form.getFormParams();
const showOperateBtn = editId ? record.opts.includes("admin") : true;
let group = [];
isFormInit && conditions && conditions.map(c => {
let items = [];
@ -76,8 +77,8 @@ class LedgerAccountApprRule extends Component {
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom"
>
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
onChange={this.handleFormItemChange}/>
<WeaSwitch fieldConfig={{ ...fields, viewAttr: showOperateBtn ? fields.viewAttr : 1 }} form={form}
formParams={formParams} onChange={this.handleFormItemChange}/>
</WeaFormItem>),
hide: fields.hide
});
@ -89,6 +90,7 @@ class LedgerAccountApprRule extends Component {
tipPosition="bottom"
>
<LedgerAccountSalaryItemsSet datas={approvalItemGroup} salarySobId={editId || saveSalarySobId}
showOperateBtn={showOperateBtn}
onAddItems={(groupId, items) => this.setState({
approvalItemGroup: _.map(approvalItemGroup, o => ({
...o,

View File

@ -55,26 +55,29 @@ class LedgerAccountSalaryItemsSet extends Component {
render() {
const { editDialog, salaryItemDialog } = this.state;
const { datas } = this.props;
const { datas, showOperateBtn = true } = this.props;
return (
<div>
<div style={{ textAlign: "right", padding: "10px 0" }}>
<WeaButtonIcon buttonType="add" type="primary"
onClick={() => this.setState({
editDialog: { visible: true, title: getLabel(111, "添加分类") }
})}/>
{
showOperateBtn && <WeaButtonIcon buttonType="add" type="primary"
onClick={() => this.setState({
editDialog: { visible: true, title: getLabel(111, "添加分类") }
})}/>
}
</div>
<div className={cs("salaryItemSettingWrapper", { required: _.isEmpty(datas) })}>
<WeaSortable
datas={datas}
datas={_.map(datas, o => ({ ...o, filter: !showOperateBtn }))}
onChange={list => this.props.onChange(list)}
renderNodeItem={(item) => {
return <div className="salaryItemWrapper">
<div className="salaryItemHeader">
<span className="titleWrapper">
<span className="salaryClassTitle">{item.groupName}</span>
<span className="iconWrapper">
{
showOperateBtn &&
<span className="iconWrapper">
<i className="icon-coms-edit" onClick={() => this.setState({
editDialog: {
visible: true, groupName: item.groupName, groupId: item.id, title: getLabel(111, "分类名称编辑")
@ -82,14 +85,17 @@ class LedgerAccountSalaryItemsSet extends Component {
})}/>
<i className="icon-coms-Delete" onClick={() => this.handleDeleteClick(item)}/>
</span>
}
</span>
<i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
{
showOperateBtn && <i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
}
</div>
<div className="salaryItemContent">
{
!_.isEmpty(item.approvalItems) ?
<WeaSortable
datas={item.approvalItems}
datas={_.map(item.approvalItems, o => ({ ...o, filter: !showOperateBtn }))}
onChange={(items) => this.props.onChange(
_.map(datas, child => {
if (child.id === item.id) {
@ -102,7 +108,10 @@ class LedgerAccountSalaryItemsSet extends Component {
return <div className="salaryItemList">
<div className="salaryItem" title={filed.salaryItemName}>
<div className="salaryItemName">{filed.salaryItemName}</div>
<Icon type="cross" onClick={() => this.handleDeleteClick(item, filed)}/>
{
showOperateBtn &&
<Icon type="cross" onClick={() => this.handleDeleteClick(item, filed)}/>
}
</div>
</div>;
}}

View File

@ -106,7 +106,7 @@ class LedgerBaseSetting extends Component {
});
};
getTaxAgentSelectListAsAdmin = () => {
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
.then(({ status, data }) => {
if (status) {
this.setState({

View File

@ -46,22 +46,22 @@ class LedgerSalaryItemBaseInfo extends Component {
};
handleDeleteEmplist = (item) => {
const { dataSource, onChangeSortableList } = this.props;
onChangeSortableList(_.xorWith(dataSource, [item], _.isEqual));
onChangeSortableList(_.filter(dataSource, o => o.id !== item.id));
};
render() {
const { dataSource, onChangeSortableList, onPreview, editId, record } = this.props;
const admin = editId ? record.opts.includes("admin") : true;
const { empFieldListOptions } = this.state;
const options = _.map(empFieldListOptions, o => ({
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
}));
if (_.isEmpty(dataSource) || _.isEmpty(options)) return null;
const admin = editId ? record.opts.includes("admin") : true;
return (
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
<div className="userInfoWrapper">
<WeaSortable
datas={dataSource}
datas={_.map(dataSource, o => ({ ...o, filter: !admin }))}
draggableType="icon"
onChange={onChangeSortableList}
renderNodeItem={(item) => {

View File

@ -182,7 +182,8 @@ class LedgerSalaryItemNormal extends Component {
>
<LedgerSalaryItemTable
tableData={items}
dataSource={_.find(newDateSource, childItem => childItem.uuid === uuid).items}
showOperateBtn={showOperateBtn}
dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
salarySobId={editId || saveSalarySobId}
selectedRowKeys={field.selectedRowKeys || []}
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}

View File

@ -231,7 +231,7 @@ class LedgerSalaryItemTable extends Component {
render() {
const { salaryItemPayload, editFormulModal, originRecord } = this.state;
const { onHandleItemhide } = this.props;
const { onHandleItemhide, showOperateBtn } = this.props;
const {
tableData, dataSource, onDropCategoryItem,
onChangeSelectedRowKeys, selectedRowKeys, onMoveTo
@ -315,16 +315,16 @@ class LedgerSalaryItemTable extends Component {
<React.Fragment>
<WeaTable
rowKey={record => record.id || record.key}
rowSelection={rowSelection}
rowSelection={showOperateBtn ? rowSelection : null}
dataSource={tableData}
columns={columns}
columns={showOperateBtn ? columns : _.filter(columns, o => (o.dataIndex !== "operate" && o.dataIndex !== "itemHide"))}
onRow={(record, index) => ({
index,
moveRow: record
})}
pagination={false}
onDrop={onDropCategoryItem}
draggable={dataSource.length === tableData.length}
draggable={dataSource.length === tableData.length && showOperateBtn}
/>
<LedgerSalaryItemEditSlide
{...salaryItemPayload}

View File

@ -90,7 +90,7 @@ class WaterMarkSetModal extends Component {
};
render() {
const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state;
const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state, { showOperateBtn } = this.props;
return (
<WeaSlideModal
{...this.props} className="waterMarkSetWrapper"
@ -103,7 +103,7 @@ class WaterMarkSetModal extends Component {
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
<div style={{ display: "flex", alignItems: "center" }}>
<WeaSelect
value={wmClassify} detailtype={3}
value={wmClassify} detailtype={3} viewAttr={showOperateBtn ? 2 : 1}
options={[
{ key: "text", showname: getLabel(111, "文本") },
{ key: "image", showname: getLabel(111, "图片") }
@ -119,8 +119,11 @@ class WaterMarkSetModal extends Component {
wmClassify === "text" ?
<WeaError tipPosition="bottom" ref="watermarkContError" error={getLabel(385869, "此项必填")}>
<div className="textSetting">
<i className="icon-coms-Flow-setting"
onClick={() => this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/>
{
showOperateBtn &&
<i className="icon-coms-Flow-setting"
onClick={() => this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/>
}
{
_.isEmpty(wmcontSet.textSet) ? <img src="/images/BacoError_wev9.png" alt=""/> :
<span className="previewBtn txtPrew"
@ -159,21 +162,24 @@ class WaterMarkSetModal extends Component {
</WeaFormItem>
<WeaFormItem label={getLabel(111, "不透明(百分比)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
<WeaInputNumber
min={0} max={80} precision={2} value={wmNoTransparent}
min={0} max={80} precision={2} value={wmNoTransparent} disabled={!showOperateBtn}
onChange={wmNoTransparent => this.setState({ wmNoTransparent })}
/>
</WeaFormItem>
<WeaFormItem label={getLabel(111, "旋转角度(逆时针)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
<WeaInputNumber
min={0} max={360} precision={2} value={wmRotate}
min={0} max={360} precision={2} value={wmRotate} disabled={!showOperateBtn}
onChange={wmRotate => this.setState({ wmRotate })}
/>
</WeaFormItem>
</WeaSearchGroup>
<div className="slideBottom">
<Button type="primary" onClick={this.handleCustomSave}>{getLabel(111, "确定")}</Button>
<Button type="ghost" onClick={this.props.onClose}>{getLabel(111, "取消")}</Button>
</div>
{
showOperateBtn &&
<div className="slideBottom">
<Button type="primary" onClick={this.handleCustomSave}>{getLabel(111, "确定")}</Button>
<Button type="ghost" onClick={this.props.onClose}>{getLabel(111, "取消")}</Button>
</div>
}
{/* 水印内容设置弹框*/}
<WmContentSetModal {...wmcontSet}
onClose={textSet => this.setState({

View File

@ -104,6 +104,7 @@ class TemplateBaseSettings extends Component {
};
render() {
const { showOperateBtn } = this.props;
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
@ -111,14 +112,14 @@ class TemplateBaseSettings extends Component {
<React.Fragment>
<WeaSearchGroup title={getLabel(111, "水印设置")} showGroup needTigger className="waterMarkWrapper">
<WeaFormItem label={getLabel(111, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaCheckbox value={watermarkStatus} display="switch"
<WeaCheckbox value={watermarkStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
</WeaFormItem>
{
watermarkStatus === "1" &&
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaSelect
value={watermark}
value={watermark} viewAttr={showOperateBtn ? 2 : 1}
options={[
{ key: "DEFAULT", showname: getLabel(111, "系统默认水印") },
{ key: "CUSTOM", showname: getLabel(111, "自定义水印") }
@ -134,7 +135,7 @@ class TemplateBaseSettings extends Component {
}
})}>{getLabel(111, "水印设置")}</span>
}
<WaterMarkSetModal {...watermarkSet}
<WaterMarkSetModal {...watermarkSet} showOperateBtn={showOperateBtn}
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
onChange={wmSetting => this.setState({ wmSetting })}
/>
@ -143,7 +144,7 @@ class TemplateBaseSettings extends Component {
</WeaSearchGroup>
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger className="waterMarkWrapper">
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaCheckbox value={ackStatus} display="switch"
<WeaCheckbox value={ackStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
onChange={ackStatus => this.setState({
ackFeedbackSetting: {
...ackFeedbackSetting, ackStatus, autoAckDays: 7
@ -155,7 +156,7 @@ class TemplateBaseSettings extends Component {
<React.Fragment>
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaInputNumber
min={1} value={autoAckDays} viewAttr={3}
min={1} value={autoAckDays} viewAttr={3} disabled={!showOperateBtn}
style={{ width: "90%" }}
onChange={autoAckDays => this.setState({
ackFeedbackSetting: {
@ -170,7 +171,7 @@ class TemplateBaseSettings extends Component {
</React.Fragment>
}
<WeaFormItem label={getLabel(111, "启用工资单反馈")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaCheckbox value={feedbackStatus} display="switch"
<WeaCheckbox value={feedbackStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
onChange={feedbackStatus => this.setState({
ackFeedbackSetting: {
...ackFeedbackSetting, feedbackStatus
@ -182,7 +183,7 @@ class TemplateBaseSettings extends Component {
<React.Fragment>
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaInput
value={feedBackUrl} viewAttr={3}
value={feedBackUrl} viewAttr={3} disabled={!showOperateBtn}
onChange={feedBackUrl => this.setState({
ackFeedbackSetting: {
...ackFeedbackSetting, feedBackUrl
@ -191,7 +192,7 @@ class TemplateBaseSettings extends Component {
</WeaFormItem>
<WeaFormItem label={getLabel(111, "移动端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
<WeaInput
value={mobileFeedbackUrl} viewAttr={3}
value={mobileFeedbackUrl} viewAttr={3} disabled={!showOperateBtn}
onChange={mobileFeedbackUrl => this.setState({
ackFeedbackSetting: {
...ackFeedbackSetting, mobileFeedbackUrl
@ -207,12 +208,12 @@ class TemplateBaseSettings extends Component {
<WeaSelect
value={monthType} onChange={monthType => this.setState({
salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, monthType }
})}
})} viewAttr={2} disabled={!showOperateBtn}
options={[
{ key: "SALARY_DATE", showname: getLabel(111, "薪资所属月"), selected: true },
{ key: "SEND_DATE", showname: getLabel(111, "发放日期") }
]}/>
<WeaInputNumber min={0} value={limitMonth}
<WeaInputNumber min={0} value={limitMonth} viewAttr={2} disabled={!showOperateBtn}
onChange={limitMonth => this.setState({
salaryBillViewingLimitSetting: {
...salaryBillViewingLimitSetting, limitMonth
@ -226,7 +227,7 @@ class TemplateBaseSettings extends Component {
</div>
<div className="agingBox">
<span>{getLabel(111, "首次查看")}</span>
<WeaInputNumber min={0} value={burningAfterReadingMin}
<WeaInputNumber min={0} value={burningAfterReadingMin} viewAttr={2} disabled={!showOperateBtn}
onChange={burningAfterReadingMin => this.setState({
salaryBillViewingLimitSetting: {
...salaryBillViewingLimitSetting, burningAfterReadingMin

View File

@ -140,7 +140,7 @@ class Index extends Component {
>{getLabel(83110, "查看详情")}</a>
}
{
sendNum === sendTotal && !showGrant &&
(!record.opts.includes("admin") || (sendNum === sendTotal && !showGrant)) &&
<Dropdown
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
@ -151,7 +151,7 @@ class Index extends Component {
</Dropdown>
}
{
sendNum !== sendTotal && !showGrant &&
sendNum !== sendTotal && !showGrant && record.opts.includes("admin") &&
<Dropdown
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
<Menu.Item key="template">{getLabel(543603, "更新模板")}</Menu.Item>

View File

@ -53,6 +53,10 @@ class Index extends Component {
} = payrollTempForm.getFormParams(),
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== 1) {
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
return;
}
const payload = {
...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs,
ackFeedbackStatus: ackFeedbackStatus === "1",

View File

@ -86,7 +86,9 @@ class Index extends Component {
return reqBtns;
};
renderContent = () => {
const { taxAgentStore: { PageAndOptAuth } } = this.props;
const { selectedKey, queryParams, isRefresh } = this.state;
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
let dom = null;
switch (selectedKey) {
case "grant":
@ -104,7 +106,7 @@ class Index extends Component {
break;
case "watermark":
dom = <TemplateBaseSettings
ref={dom => this.baseSetRef = dom}
ref={dom => this.baseSetRef = dom} showOperateBtn={showOperateBtn}
onChangeLoading={loading => this.setState({ baseSetSaveLoading: loading })}
/>;
break;

View File

@ -21,7 +21,7 @@
}
.wea-new-top-req {
z-index: 0 !important;
//z-index: 0 !important;
}
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {

View File

@ -197,6 +197,15 @@ export const conditions = [
lanId: 111,
labelcol: 8,
viewAttr: 2
},
{
conditionType: "SWITCH",
domkey: ["SALARY_ACCT_SYNC_TYPE"],
fieldcol: 10,
label: "是否采用线程池",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: "薪资核算",

View File

@ -25,8 +25,8 @@ export const renderRuleForm = (form, condition, onChange) => {
tipPosition="bottom">
<WeaSwitch
fieldConfig={fields} form={form} formParams={formParams}
onChange={v => getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
onChange={v => !["INPUT", "INPUTNUMBER", "TEXTAREA"].includes(fields.conditionType) && onChange(v)}
onBlur={v => ["INPUT", "INPUTNUMBER", "TEXTAREA"].includes(fields.conditionType) && onChange({ [getKey(fields)]: { value: v } })}
/>
</WeaFormItem>),
colSpan: 1,

View File

@ -104,7 +104,7 @@ class RuleConfig extends Component {
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } });
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
} else if (item === "OPEN_APPLICATION_ENCRYPT" || item === "SALARY_ACCT_SYNC_TYPE") {
form.updateFields({ [item]: { value: _.isNil(sysinfo[item]) ? "1" : (sysinfo[item] || "") } });
} else if (
item === "APPROVAL_CAN_MANUAL_FILE_STATUS" || item === "APPROVAL_CAN_RE_CALC_STATUS" || item === "APPROVAL_CAN_EDIT_RESULT_STATUS"
@ -163,6 +163,7 @@ class RuleConfig extends Component {
case "ATTENDANCE_SERIAL_COLLECTION_BTN":
case "TAX_DECLARATION_DATE_TYPE":
case "SHOT_EMP_BTN":
case "SALARY_ACCT_SYNC_TYPE":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -183,6 +184,7 @@ class RuleConfig extends Component {
ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据"),
TAX_DECLARATION_DATE_TYPE: getLabel(111, "申报日期类型"),
SHOT_EMP_BTN: getLabel(111, "启用组织快照"),
SALARY_ACCT_SYNC_TYPE: getLabel(111, "是否采用线程池")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;

View File

@ -297,7 +297,7 @@ export const personScopeConditions = [
{
conditionType: "SELECT_LINKAGE",
domkey: ["targetType"],
fieldcol: 18,
fieldcol: 16,
label: "对象类型",
lanId: 111,
labelcol: 6,

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaSwitch } from "comsMobx";
import { WeaCheckbox, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaCheckbox, WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getTaxAgentRangeForm, taxAgentRangeEdit, taxAgentRangeSave } from "../../../apis/taxAgent";
import { personScopeConditions, scopeSelectLinkageDatas } from "./constants";
@ -129,6 +129,14 @@ class PersonalScopeModal extends Component {
onChange={this.handleChangeAll}/>
}
<WeaSwitch fieldConfig={fields} form={personScopeForm} formParams={formParams}/>
{
personScopeForm.getFormParams().targetType === "SQL" && getKey(fields) === "targetType" &&
<WeaHelpfulTip placement="topLeft" style={{ position: "absolute", top: "50%", right: "-35px" }}
width={200} title={
<span
dangerouslySetInnerHTML={{ __html: getLabel(111, "注意事项:<br>1、sql需返回人员id<br>2、sql结尾不需要 ; go /等符号<br>使用例子:定义获取岗位是开发的人员<br>select id from hrmresource where JOBTITLE = 17") }}/>
}/>
}
</WeaFormItem>),
hide: fields.hide
});

View File

@ -187,6 +187,7 @@
border: 1px solid #e5e5e5 !important;
padding: 4px 8px !important;
min-height: 70px !important;
word-wrap: break-word;
}
}
}

View File

@ -46,7 +46,7 @@ class AdjustmentDefaultSlide extends Component {
};
render() {
const { visible, onCancel, taxAgentStore: { showOperateBtn }, dataSource } = this.props;
const { visible, onCancel, taxAgentStore: { PageAndOptAuth }, dataSource } = this.props;
const { loading } = this.state;
const columns = [
{
@ -82,6 +82,7 @@ class AdjustmentDefaultSlide extends Component {
}
}
];
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
return (
<WeaSlideModal
className="adjustDefSlideWrapper"

View File

@ -10,12 +10,10 @@ import { WeaSlideModal } from "ecCom";
import { Button, message, Modal } from "antd";
import SlideModalTitle from "../../../../components/slideModalTitle";
import AdjustTable from "./adjustTable";
import { getQueryString } from "../../../../util/url";
import { compensationSave } from "../../../../apis/standingBook";
import AdjustmentDefaultSlide from "./adjustmentDefaultSlide";
import "./index.less";
@inject("taxAgentStore")
@observer
class AdjustmentSlide extends Component {
@ -35,10 +33,9 @@ class AdjustmentSlide extends Component {
handleSave = () => {
const requireKeys = ["adjustTo", "adjustmentTotal", "categoryType", "companyTotal", "countryTotal", "target", "welfareType"];
const { billMonth, paymentOrganization } = this.props;
let { dataSource, targetOptions } = this.adjustTableRef.state;
dataSource = _.filter(dataSource, it => (!it.id || !it.status));
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
let bool = true;
_.map(dataSource, item => {
bool = _.every(requireKeys, child => !!item[child]);

View File

@ -13,7 +13,19 @@
}
.wea-search-tab, .wea-input-focus {
background: #f1f1f1;
background: #F1F1F1;
padding-right: 0 !important;
.wea-advanced-search {
background: #FFF
}
i {
font-size: 20px;
cursor: pointer;
vertical-align: middle;
color: #55a1f8;
}
}
.normalWapper {
@ -23,6 +35,18 @@
overflow: hidden;
padding: 0 16px;
.wea-tab .wea-search-container .wea-advanced-search {
right: -1px !important;
}
.wea-tab .wea-search-tab {
padding-right: 0;
.wea-advanced-search {
background: #FFF;
}
}
.tableWrapper {
flex: 1;
overflow: hidden;
@ -60,20 +84,14 @@
.tabOption {
display: flex;
align-items: center;
padding: 8px 20px;
padding: 8px 0;
justify-content: flex-end;
i.icon-coms-Batch-delete, i.icon-coms-Add-to, button {
i {
font-size: 20px;
cursor: pointer;
margin-right: 10px;
}
.anticon-search {
margin-right: 0px;
}
.wea-input-focus-btn {
margin-right: 0px;
vertical-align: middle;
color: #55a1f8;
}
}
@ -93,7 +111,7 @@
overflow: hidden;
display: flex;
flex-direction: column;
padding: 16px;
padding: 0 16px 16px 16px;
.tableWrapper {
flex: 1;
@ -132,26 +150,6 @@
}
}
}
.wea-new-top {
.ant-btn {
border-radius: 0;
padding: 0;
background: transparent;
border: none;
font-size: 18px;
line-height: 18px;
}
.ant-btn.ant-btn-primary[disabled] {
color: #d8d8d8;
background: transparent;
}
.ant-btn.ant-btn-primary {
color: #2db7f5;
}
}
}
//补差添加人员弹框

View File

@ -7,8 +7,6 @@
import React, { Component } from "react";
import RegTop from "./regTop";
import { message, Modal } from "antd";
import { WeaNewScroll } from "ecCom";
import { getQueryString } from "../../../../util/url";
import * as API from "../../../../apis/standingBook";
import { calcPageNo } from "../../../../util";
import RegList from "./regList";
@ -16,6 +14,7 @@ import RegEditDetial from "./regEditDetial";
import AddCompensationPersonnelDialog from "./addCompensationPersonnelDialog";
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
import "./index.less";
import { convertToUrlString } from "../../../../util/url";
class MakeupDifference extends Component {
constructor(props) {
@ -43,9 +42,7 @@ class MakeupDifference extends Component {
delBalance = () => {
const { selectKey: ids } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const payload = { ids, billMonth, paymentOrganization };
const payload = { ids, ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
API.delBalance(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
@ -64,8 +61,6 @@ class MakeupDifference extends Component {
const workcode = this.regTopRef.state.workcode;
const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : [];
const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : [];
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
switch (key) {
case "delete":
Modal.confirm({
@ -78,13 +73,13 @@ class MakeupDifference extends Component {
this.setState({
importDiffModal: {
...importDiffModal, visible: true,
importparams: { billMonth: getQueryString("billMonth") }
importparams: { ..._.pick(this.props, ["billMonth"]) }
}
});
break;
case "export":
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/balance/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
const url = `/api/bs/hrmsalary/welfare/balance/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
window.open(url, "_blank");
break;
case "search":
this.diffListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
@ -92,7 +87,7 @@ class MakeupDifference extends Component {
case "add":
this.setState({
addPersonalDialog: {
...addPersonalDialog, visible: true, paymentOrganization, billMonth
...addPersonalDialog, ..._.pick(this.props, ["billMonth", "paymentOrganization"]), visible: true
}
});
break;
@ -117,42 +112,40 @@ class MakeupDifference extends Component {
};
render() {
const billMonth = getQueryString("billMonth");
const { selectKey, importDiffModal, returnEditPersonSlide, addPersonalDialog } = this.state;
return (
<div className="differenceWrapper">
<RegTop
type="difference"
{..._.pick(this.props, ["billMonth", "type"])}
regtopType="difference"
ref={dom => this.regTopRef = dom}
billMonth={billMonth}
onChange={this.handleChangeOpt}
selectKey={selectKey}
/>
<div className="tableWrapper">
<WeaNewScroll height="100%">
<RegList
type="difference"
ref={dom => this.diffListRef = dom}
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
onEdit={this.handleEdit}
/>
{/*编辑弹框*/}
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
{/*添加补差人员*/}
<AddCompensationPersonnelDialog {...addPersonalDialog}
onCancel={(isRefresh) => this.setState({
addPersonalDialog: {
...addPersonalDialog,
visible: false
}
}, () => isRefresh && this.diffListRef.recessionList())}
/>
{/*导入补差*/}
<StandingBookCalcImportDialog {...importDiffModal}
onCancel={(isInit) => this.setState({
importDiffModal: { ...importDiffModal, visible: false }
}, () => isInit && this.diffListRef.recessionList())}/>
</WeaNewScroll>
<RegList
{..._.pick(this.props, ["billMonth", "paymentOrganization", "creator", "type"])}
regType="difference"
ref={dom => this.diffListRef = dom}
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
onEdit={this.handleEdit}
/>
{/*编辑弹框*/}
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
{/*添加补差人员*/}
<AddCompensationPersonnelDialog {...addPersonalDialog}
onCancel={(isRefresh) => this.setState({
addPersonalDialog: {
...addPersonalDialog,
visible: false
}
}, () => isRefresh && this.diffListRef.recessionList())}
/>
{/*导入补差*/}
<StandingBookCalcImportDialog {...importDiffModal}
onCancel={(isInit) => this.setState({
importDiffModal: { ...importDiffModal, visible: false }
}, () => isInit && this.diffListRef.recessionList())}/>
</div>
</div>
);

View File

@ -6,95 +6,52 @@
*/
import React, { Component } from "react";
import { Button, Col, Icon, message, Modal, Row, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { WeaBrowser, WeaButtonIcon, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import * as API from "../../../../apis/standingBook";
import { getCalculateProgress } from "../../../../apis/calculate";
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import { calcPageNo } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import { convertToUrlString } from "../../../../util/url";
import ProgressModal from "../../../../components/progressModal";
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
import AdjustmentSlide from "./adjustmentSlide";
import { getCalculateProgress } from "../../../../apis/calculate";
import RegEditDetial from "./regEditDetial";
import SupplementarySlide from "./supplementarySlide";
import _ from "lodash";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("standingBookStore")
@observer
export default class NormalIndex extends Component {
constructor(props) {
super(props);
this.state = {
date: "",
current: 1,
pageSize: 10,
selectedRowKeys: [],
addProps: {
title: "",
visible: false
},
adjustSlide: {
title: "调差",
visible: false
},
tableData: {
list: [],
columns: [],
total: 0
},
searchValue: "",
workcode: "",
departmentIds: "",
subCompanyIds: "",
progressVisible: false,
progress: 0,
fieldData: {}, //选中的表单头信息
importParams: { //导入信息的弹框表示
pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], showSearchAd: false, loading: false,
formParams: { userName: "", workcode: "", departmentIds: [], subCompanyIds: [] },
addProps: { title: "", visible: false }, adjustSlide: { title: "调差", visible: false },
progressVisible: false, progress: 0, importParams: { //导入信息的弹框表示
visible: false, fieldUrl: "getWelfareList", tmpUrl: "exportSiaccountWelfareImporttemplate",
cacheUrl: "cacheWelfareListField", importUrl: "importInsuranceAcctDetail", importparams: {}
},
returnEditPersonSlide: {
title: "",
editId: "",
visible: false
},
showSum: false,
siaccountSum: {},
showSearchAd: false
returnEditPersonSlide: { title: "", editId: "", visible: false },
columns: [], dataSource: [], sumRow: {}, normalPayer: ""
};
this.timer = null;
this.timerDelete = null;
}
componentDidMount() {
const { selectedKey, location } = this.props;
const { current } = this.state;
const billMonth = location.query.billMonth;
const paymentOrganization = location.query.paymentOrganization;
selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
window.addEventListener("message", this.handleReceive, false);
}
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data, { selectedKey } = this.props;
if (type === "init") {
this.postMessageToChild();
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params;
this.setState({ current, pageSize }, () => {
const { billMonth, paymentOrganization, selectedKey } = this.props;
const { current, pageSize } = this.state;
selectedKey === "1" ?
this.getNormalList({
billMonth, current, pageSize, paymentOrganization
}) :
this.getSupplementaryList({
billMonth, current, pageSize, paymentOrganization
});
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => {
selectedKey === "1" ? this.getNormalList(true) : this.getSupplementaryList(true);
});
} else if (id === "ROWSELECT") {
const { selectedRowKeys } = params;
@ -106,267 +63,125 @@ export default class NormalIndex extends Component {
};
componentWillUnmount() {
if (this.timer) {
clearInterval(this.timer);
}
if (this.timerDelete) {
clearInterval(this.timerDelete);
}
if (this.timer) clearInterval(this.timer);
if (this.timerDelete) clearInterval(this.timerDelete);
window.removeEventListener("message", this.handleReceive, false);
}
componentWillReceiveProps(nextProps) {
if (nextProps.selectedKey != this.props.selectedKey) {
const { billMonth, paymentOrganization } = nextProps;
if (nextProps.selectedKey !== this.props.selectedKey) {
this.setState({
current: 1, selectedRowKeys: []
pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], dataSource: [], sumRow: {},
addProps: { title: "", visible: false }, returnEditPersonSlide: { title: "", editId: "", visible: false }
}, () => {
const { current } = this.state;
nextProps.selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
nextProps.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
});
}
}
postMessageToChild = () => {
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const childFrameObj = document.getElementById("atdTable");
const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum, searchValue: userName } = this.state;
const { list: dataSource, total, columns } = tableData;
const pageInfo = { current, pageSize, total };
childFrameObj.contentWindow.postMessage(JSON.stringify({
dataSource, columns, pageInfo,
selectedRowKeys, selectedKey: this.props.selectedKey,
sumpayload: { billMonth, paymentOrganization, userName },
showOperates: !getQueryString("type")
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
..._.pick(this.state, ["dataSource", "columns", "pageInfo", "selectedRowKeys", "sumRow"]),
showOperates: !this.props.type
}), "*");
};
handleSearch = () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
selectedKey === "1"
? this.getNormalList({
billMonth,
current: 1,
paymentOrganization,
userName: this.state.searchValue,
workcode: this.state.workcode,
departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [],
subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : []
})
: this.getSupplementaryList({
billMonth,
current: 1,
paymentOrganization,
userName: this.state.searchValue,
workcode: this.state.workcode,
departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [],
subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : []
});
};
handleSave = () => {
const {
siaccountCommonSave,
siaccountSupplementarySave,
form
} = this.props.standingBookStore;
const { billMonth, selectedKey, paymentOrganization } = this.props;
if (selectedKey === "1") {
const { includes, excludes } = form.getFormParams();
const payload = {
billMonth,
includes: includes.split(","),
excludes: _.isEmpty(excludes) ? excludes.split(",") : []
};
siaccountCommonSave(payload).then(() => {
message.success("添加成功");
this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
});
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false
}
});
});
} else {
const paymentOrganization = getQueryString("paymentOrganization");
form.validateForm().then(f => {
if (f.isValid) {
const {
includes,
billMonth: billMonthList,
excludes,
projects
} = form.getFormParams();
const payload = {
billMonth,
billMonthList: billMonthList.split(","),
includes: includes.split(","),
// excludes: excludes.split(","),
projects: projects.split(","),
paymentOrganization
};
siaccountSupplementarySave(payload).then(() => {
message.success("添加成功");
this.getSupplementaryList({
billMonth,
current: this.state.current,
paymentOrganization
});
this.setState(
{
addProps: {
...this.state.addProps,
title: "",
visible: false
}
},
() => {
form.resetForm();
}
);
});
} else {
f.showErrors();
this.setState({ date: new Date() }); // 改变一个state的变量,强制页面刷新
}
});
}
};
getNormalList = async (payload = {}) => {
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload, pageSize: this.state.pageSize }).then(({ list, columns = [], total }) => {
this.setState({
tableData: { list, total, columns }
}, () => this.postMessageToChild());
handleSearch = () => this.props.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
getNormalList = (pageTurning = false) => {
const { pageInfo, formParams } = this.state;
const payload = { ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
this.setState({ loading: true });
API.getNormalList({ ...payload, ...pageInfo, ...formParams }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
this.setState({ pageInfo: { current, pageSize, total }, columns, dataSource }, () => this.postMessageToChild());
}
});
};
getSupplementaryList = async (payload = {}) => {
const { getSupplementaryList } = this.props.standingBookStore;
getSupplementaryList({
...payload, pageSize: this.state.pageSize
}).then(({ list, columns = [], total }) => {
this.setState({
tableData: { list, columns, total }
}, () => this.postMessageToChild());
});
};
onSelectChange = selectedRowKeys => {
this.setState({ selectedRowKeys });
};
handleBatchDelete = () => {
const { siaccountCommonDelete } = this.props.standingBookStore;
const { list } = this.state.tableData;
const { selectedRowKeys } = this.state;
const { billMonth, selectedKey, paymentOrganization } = this.props;
if (_.isEmpty(selectedRowKeys)) {
message.warning("未勾选数据!");
} else {
const includes = _.map(
_.filter(list, it => selectedRowKeys.includes(it.id)),
item => item.employeeId
);
const ids = _.map(
_.filter(list, it => selectedRowKeys.includes(it.id)),
item => item.id
);
Modal.confirm({
title: "确认信息",
content: "确认删除勾选的数据吗?",
onOk: () => {
this.setState({
progressVisible: true
}, () => {
this.timerDelete = setInterval(() => {
if (this.state.progress !== 100) {
this.setState({
progress: this.state.progress + 10
});
} else {
clearInterval(this.timerDelete);
this.setState({
progressVisible: false,
progress: 0
}, () => {
message.success("删除成功");
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length)
})
: this.getSupplementaryList({
billMonth,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length),
paymentOrganization
});
});
}
}, 800);
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
if (status && data === "1" && !pageTurning) {
API.getNormalListSum({ ...payload, ...pageInfo, ...formParams })
.then(({ status: sumStatus, data: sumData }) => {
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
});
siaccountCommonDelete({
billMonth,
includes,
ids,
paymentOrganization
}).then(() => {
clearInterval(this.timerDelete);
message.success("删除成功");
this.setState({ selectedRowKeys: [], progressVisible: false, progress: 0 });
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length)
})
: this.getSupplementaryList({
billMonth,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length),
paymentOrganization
});
});
},
onCancel: () => {
}
});
}
};
handleAdd = () => {
this.setState({
addProps: {
...this.state.addProps,
title: "添加缴纳人员",
visible: true
}
});
};
handleCommonAccountClick = () => {
getSupplementaryList = (pageTurning = false) => {
const { pageInfo, formParams } = this.state;
const payload = { ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
this.setState({ loading: true });
API.getSupplementaryList({ ...payload, ...pageInfo, ...formParams }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
this.setState({ pageInfo: { current, pageSize, total }, columns, dataSource }, () => this.postMessageToChild());
}
});
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
if (status && data === "1" && !pageTurning) {
API.getSupplementaryListSum({ ...payload, ...pageInfo, ...formParams })
.then(({ status: sumStatus, data: sumData }) => {
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
});
}
});
};
handleBatchDelete = () => {
const { selectedRowKeys, dataSource, pageInfo } = this.state;
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { commonAccount } = this.props.standingBookStore;
commonAccount({ billMonth, paymentOrganization, includes: [] });
this.setState({
progressVisible: true
}, () => {
const includes = _.map(_.filter(dataSource, it => selectedRowKeys.includes(it.id)), item => item.employeeId);
const ids = _.map(_.filter(dataSource, it => selectedRowKeys.includes(it.id)), item => item.id);
Modal.confirm({
title: getLabel(111, "确认信息"),
content: getLabel(111, "确认删除勾选的数据吗?"),
onOk: () => {
this.setState({ progressVisible: true }, () => {
this.timerDelete = setInterval(() => {
if (this.state.progress !== 100) {
this.setState({ progress: this.state.progress + 10 });
} else {
clearInterval(this.timerDelete);
this.setState({
progressVisible: false, progress: 0, pageInfo: {
...pageInfo, current: calcPageNo(pageInfo.total, pageInfo.current, 10, includes.length)
}
}, () => {
message.success(getLabel(111, "操作成功!"));
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
});
}
}, 800);
});
API.siaccountCommonDelete({ billMonth, includes, ids, paymentOrganization })
.then(() => {
clearInterval(this.timerDelete);
this.setState({
selectedRowKeys: [], progressVisible: false, progress: 0, pageInfo: {
...pageInfo, current: calcPageNo(pageInfo.total, pageInfo.current, 10, includes.length)
}
}, () => {
message.success(getLabel(111, "操作成功!"));
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
});
});
}
});
};
handleAdd = () => this.setState({
addProps: { ...this.state.addProps, title: getLabel(111, "添加缴纳人员"), visible: true }
});
handleCommonAccountClick = () => {
const { billMonth, paymentOrganization, selectedKey } = this.props;
const promise = API.commonAccount({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), includes: [] });
this.setState({ progressVisible: true }, () => {
this.timer = setInterval(() => {
getCalculateProgress(billMonth, paymentOrganization).then(({ status, data }) => {
if (status) {
if (!data.status) {
clearInterval(this.timer);
this.setState({
progressVisible: false,
progress: 0
});
this.setState({ progressVisible: false, progress: 0 });
message.error(data.message);
}
if (this.state.progress !== 100) {
@ -376,50 +191,68 @@ export default class NormalIndex extends Component {
} else {
clearInterval(this.timer);
this.setState({
progressVisible: false,
progress: 0
progressVisible: false, progress: 0
}, () => {
message.success("核算成功");
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
})
: this.getSupplementaryList({
billMonth,
paymentOrganization,
current: this.state.current
});
message.success(getLabel(111, "操作成功!"));
this.getNormalList();
});
}
} else {
clearInterval(this.timer);
this.setState({
progressVisible: false,
progress: 0
});
this.setState({ progressVisible: false, progress: 0 });
}
}).catch(() => {
clearInterval(this.timer);
this.setState({
progressVisible: false,
progress: 0
});
this.setState({ progressVisible: false, progress: 0 });
});
}, 600);
});
};
handleAddSocialAcctEmp = () => {
const { normalPayer, pageInfo } = this.state, { current, pageSize, total } = pageInfo;
API.addSocialAcctEmp({
..._.pick(this.props, ["billMonth", "paymentOrganization"]), includes: normalPayer.split(",")
}).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "操作成功"));
this.setState({
pageInfo: { ...pageInfo, current: calcPageNo(total, current, pageSize, normalPayer.split(",").length) }
}, () => this.getNormalList());
} else {
message.error(errormsg);
}
});
};
handleDeleteNormalPayer = () => {
Modal.confirm({
title: getLabel(111, "确认信息"),
content: getLabel(111, "确认删除勾选的数据吗?"),
onOk: () => {
const { selectedRowKeys: ids, pageInfo } = this.state, { current, pageSize, total } = pageInfo;
API.deleteSocialAcctEmp({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ids })
.then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "操作成功!"));
this.setState({
selectedRowKeys: [],
pageInfo: { ...pageInfo, current: calcPageNo(total, current, pageSize, ids.length) }
}, () => this.getNormalList());
} else {
message.error(errormsg);
}
});
}
});
};
handleExport = () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { selectedKey } = this.props;
const urlObj = {
"1": "/api/bs/hrmsalary/welfare/common/export",
"3": "/api/bs/hrmsalary/welfare/supplementary/export"
};
const url = `${window.location
.origin}${urlObj[selectedKey]}?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
.origin}${urlObj[selectedKey]}?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
window.open(url, "_blank");
};
handleEditNormalStandingBook = (record) => {
const { userName, id: editId } = record;
@ -433,82 +266,76 @@ export default class NormalIndex extends Component {
this.setState({
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
}, () => {
if (refreshList) {
const { current } = this.state;
const { billMonth, selectedKey, paymentOrganization } = this.props;
selectedKey === "1"
? this.getNormalList({
billMonth,
paymentOrganization,
current
})
: this.getSupplementaryList({
billMonth,
paymentOrganization,
current
});
}
if (refreshList) this.props.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
});
};
getSearchs = () => {
return <WeaSearchGroup needTigger showGroup title="其他条件">
const { formParams } = this.state, { workcode, departmentIds, subCompanyIds } = formParams;
return <WeaSearchGroup needTigger showGroup title="">
<Row>
<Col span={12}><WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaInput
value={this.state.workcode}
onChange={v => this.setState({ workcode: v })}
/>
<Col span={12}><WeaFormItem label={getLabel(111, "工号")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaInput value={workcode} onChange={v => this.setState({ formParams: { ...formParams, workcode: v } })}/>
</WeaFormItem></Col>
<Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaBrowser
isSingle={false} value={this.state.departmentIds} type={57}
onChange={v => this.setState({ departmentIds: v })}/>
isSingle={false} value={departmentIds.join(",")} type={57}
onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v.split(",") } })}/>
</WeaFormItem></Col>
<Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaBrowser
isSingle={false} value={this.state.subCompanyIds} type={164}
onChange={v => this.setState({ subCompanyIds: v })}/>
isSingle={false} value={subCompanyIds.join(",")} type={164}
onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v.split(",") } })}/>
</WeaFormItem></Col>
</Row>
</WeaSearchGroup>;
};
render() {
const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props;
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd } = this.state;
const { loading } = standingBookStore;
const { remarks, billMonth, selectedKey, paymentOrganization, type } = this.props;
const {
formParams, addProps, adjustSlide, importParams, returnEditPersonSlide,
showSearchAd, selectedRowKeys, loading
} = this.state;
const btn1 = [
<Button type="primary" onClick={this.handleBatchDelete}>批量删除</Button>,
<Button type="primary" onClick={this.handleAdd}>添加缴纳人员</Button>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleBatchDelete}/>,
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={this.handleAdd}/>
];
const btn2 = [
<Button type="primary" onClick={this.handleCommonAccountClick}>核算</Button>,
<Button type="primary"
onClick={() => this.setState({ adjustSlide: { ...adjustSlide, visible: true } })}>调差</Button>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleDeleteNormalPayer}/>,
<WeaBrowser type={17} title={getLabel(383694, "添加人员")} isSingle={false} customized
onChange={ids => this.setState({ normalPayer: ids }, () => this.handleAddSocialAcctEmp())}>
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}/>
</WeaBrowser>,
<Button type="primary" onClick={this.handleCommonAccountClick}>{getLabel(111, "核算")}</Button>,
<Button type="ghost" onClick={() => this.setState({
adjustSlide: { ...adjustSlide, visible: true }
})}>{getLabel(111, "调差")}</Button>
];
const btn3 = [
<Button type="primary" onClick={() => {
<i className="iconfont icon-duibi" onClick={() => {
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`);
}}>线下对比</Button>
}} title={getLabel(111, "线下对比")}/>
];
const btn4 = [
<Button type="primary"
onClick={() => this.setState({
importParams: {
...importParams, visible: true,
tmpUrl: selectedKey === "1" ? "exportSiaccountWelfareImporttemplate" : "exportSiaccountWelfaresupplyimporttemplatetemplate"
}
})}>导入数据</Button>
<i className="iconfont icon-import" onClick={() => this.setState({
importParams: {
...importParams, visible: true,
tmpUrl: selectedKey === "1" ? "exportSiaccountWelfareImporttemplate" : "exportSiaccountWelfaresupplyimporttemplatetemplate"
}
})} title={getLabel(111, "导入")}/>
];
const btn5 = [
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
<i className="iconfont icon-export" onClick={this.handleExport} title={getLabel(111, "导出")}/>
];
let btn = [];
(this.props.type !== "detail" && this.props.selectedKey == "3") && (btn = [...btn, ...btn1]);
(selectedKey === "1" && this.props.type !== "detail") && (btn = [...btn, ...btn2]);
selectedKey === "1" && (btn = [...btn, ...btn3]);
this.props.type !== "detail" && (btn = [...btn, ...btn4]);
btn = [...btn, ...btn5];
(type !== "detail" && selectedKey === "3") && (btn = [...btn, ...btn1]);
(selectedKey === "1" && type !== "detail") && (btn = [...btn, ...btn2]);
btn = [...btn5, ...btn];
type !== "detail" && (btn = [...btn4, ...btn]);
selectedKey === "1" && (btn = [...btn3, ...btn]);
return (
<div className="normalWapper">
{
@ -516,20 +343,16 @@ export default class NormalIndex extends Component {
<div className="topContent">
<div className="month">
<span>
账单月份
<Tooltip placement="topLeft" title="提示:正常缴纳,账单月份即社保福利缴纳月份">
{getLabel(111, "账单月份")}
<Tooltip placement="topLeft" title={getLabel(111, "提示:正常缴纳,账单月份即社保福利缴纳月份")}>
<Icon type="question-circle"/>
</Tooltip>
</span>
<span>
{billMonth}
</span>
<span>{billMonth}</span>
</div>
<div>
<span>备注</span>
<span>
{remarks}
</span>
<span>{getLabel(111, "备注:")}</span>
<span>{remarks}</span>
</div>
</div>
}
@ -537,39 +360,26 @@ export default class NormalIndex extends Component {
datas={[]} selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
onSearchChange={searchValue => this.setState({ searchValue })}
onSearchChange={userName => this.setState({ formParams: { ...formParams, userName } })}
buttons={btn} onSearch={this.handleSearch} onAdSearch={this.handleSearch}
onAdReset={() => this.setState({ workcode: "" })} searchsBasePlaceHolder="请输入员工姓名"
/>
<SupplementarySlide
{...addProps}
billMonth={billMonth} paymentOrganization={paymentOrganization}
onCancel={(isRefresh) => {
this.setState({
addProps: {
...addProps,
visible: false
}
}, () => {
isRefresh && this.getSupplementaryList({
billMonth,
current: this.state.current,
paymentOrganization
});
});
}}
/>
onAdReset={() => this.setState({
formParams: { userName: "", workcode: "", departmentIds: [], subCompanyIds: [] }
})}/>
{/*添加补缴弹框*/}
<SupplementarySlide {...addProps} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
onCancel={(isRefresh) => {
this.setState({ addProps: { ...addProps, visible: false } }, () => {
isRefresh && this.getSupplementaryList();
});
}}/>
{/*核算进度条*/}
<ProgressModal
title={selectedKey === "3" ? "正在删除请稍后" : "正在核算请稍后"}
title={selectedKey === "3" ? getLabel(111, "正在删除请稍后") : getLabel(111, "正在核算请稍后")}
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });
}}
progress={this.state.progress}
/>
onCancel={() => this.setState({ progressVisible: false, progress: 0 })}
progress={this.state.progress}/>
{/*导入弹框*/}
<StandingBookCalcImportDialog {...importParams}
<StandingBookCalcImportDialog {...importParams} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
onCancel={(isInit) => this.setState({
importParams: { ...importParams, visible: false }
}, () => isInit && this.handleSearch())}/>
@ -585,17 +395,9 @@ export default class NormalIndex extends Component {
</Spin>
{/*编辑弹框*/}
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseNormalStandingBookModal}/>
<AdjustmentSlide
{...adjustSlide}
onCancel={() => {
this.setState({
adjustSlide: {
...adjustSlide,
visible: false
}
});
}}
/>
{/*调差*/}
<AdjustmentSlide {...adjustSlide} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
onCancel={() => this.setState({ adjustSlide: { ...adjustSlide, visible: false } })}/>
</div>
</div>
);

View File

@ -5,107 +5,69 @@
* LastEditTime: 2022-05-09 15:07:56
*/
import React, { Component } from "react";
import { Button, Icon, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaNewScroll, WeaTable } from "ecCom";
import { Icon, Spin, Tooltip } from "antd";
import { WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom";
import { getOverViewList } from "../../../../apis/standingBook";
import "./index.less";
import { convertToUrlString } from "../../../../util/url";
@inject("standingBookStore")
@observer
const getLabel = WeaLocaleProvider.getLabel;
export default class OverViewIndex extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [],
current: 1,
pageSize: 10,
tableData: {
list: [],
columns: [],
total: 0
}
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
};
}
componentDidMount() {
const { billMonth, paymentOrganization } = this.props;
this.getOverViewList({ billMonth, paymentOrganization });
this.getOverViewList();
}
getOverViewList = (payload = {}) => {
const { getOverViewList } = this.props.standingBookStore;
getOverViewList({ ...payload, current: 1 }).then(
({ list, columns = [], total }) => {
columns = _.map(
_.filter(columns, (it) => it.dataIndex !== "id"),
(it) => {
// if (it.dataIndex === "employeeId") {
// it = {
// ...it,
// width: 150,
// fixed: 'left'
// }
// }
return {
...it,
title: (
getOverViewList = () => {
const { pageInfo } = this.state;
this.setState({ loading: true });
getOverViewList({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ...pageInfo })
.then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { current, pageSize, total },
columns: _.map(columns, (it) => ({
...it, title: (
<span dangerouslySetInnerHTML={{ __html: it.title }}></span>
)
};
}
);
this.setState({
tableData: {
list,
columns,
total
}
});
}
);
}))
});
}
});
};
handleExport = () => {
const { billMonth, paymentOrganization } = this.props;
const url = `${window.location
.origin}/api/bs/hrmsalary/welfare/overView/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
const url = `/api/bs/hrmsalary/welfare/overView/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
window.open(url, "_blank");
};
render() {
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
const { selectedRowKeys } = this.state;
const { loading } = this.props.standingBookStore;
let { list, columns, total } = this.state.tableData;
const { pageInfo, loading, dataSource, columns } = this.state, { billMonth } = this.props;
const pagination = {
total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({ current, pageSize });
this.getOverViewList({
billMonth, current,
pageSize, paymentOrganization
});
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getOverViewList());
},
onChange: (current) => {
this.setState({ current });
this.getOverViewList({
billMonth, current,
pageSize: this.state.pageSize, paymentOrganization
});
}
onChange: current => this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getOverViewList())
};
return (
<div className="normalWapper">
<div className="topContent">
<div className="month">
<span>
账单月份
<Tooltip
placement="topLeft"
title="提示:正常缴纳,账单月份即社保福利缴纳月份">
{getLabel(111, "账单月份")}
<Tooltip placement="topLeft" title={getLabel(111, "提示:正常缴纳,账单月份即社保福利缴纳月份")}>
<Icon type="question-circle"/>
</Tooltip>
</span>
@ -113,20 +75,14 @@ export default class OverViewIndex extends Component {
</div>
</div>
<div className="tabOption">
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
<i className="iconfont icon-export" onClick={this.handleExport} title={getLabel(111, "导出")}/>
</div>
{/* table */}
<div className="tableWrapper">
<WeaNewScroll height="100%">
<Spin spinning={loading}>
<WeaTable
rowKey="id"
columns={columns}
dataSource={list}
loading={loading}
pagination={pagination}
scroll={{ x: 1200 }}
/>
<WeaTable rowKey="id" columns={columns} dataSource={dataSource} loading={loading} pagination={pagination}
scroll={{ x: 1200 }}/>
</Spin>
</WeaNewScroll>
</div>

View File

@ -8,7 +8,6 @@ import React, { Component } from "react";
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, Modal } from "antd";
import RegSelect from "./regSelect";
import * as API from "../../../../apis/standingBook";
class RegAddEmployee extends Component {
constructor(props) {

View File

@ -5,10 +5,9 @@
* Date: 2022/11/23
*/
import React, { Component } from "react";
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
import { message } from "antd";
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
import { Button, message } from "antd";
import * as API from "../../../../apis/standingBook";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { regColumns } from "../constant";
import { toDecimal_n } from "../../../../util";
@ -20,37 +19,19 @@ class RegEditDetial extends Component {
this.state = {
loading: false,
listMap: [
{
key: "social",
label: "社保",
dataSource: [],
columns: []
},
{
key: "fund",
label: "公积金",
dataSource: [],
columns: []
},
{
key: "other",
label: "企业年金及其他福利",
dataSource: [],
columns: []
}
{ key: "social", label: getLabel(111, "社保"), dataSource: [], columns: [] },
{ key: "fund", label: getLabel(111, "公积金"), dataSource: [], columns: [] },
{ key: "other", label: getLabel(111, "企业年金及其他福利"), dataSource: [], columns: [] }
]
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.editId !== this.props.editId && nextProps.editId) {
this.getPaymentById(nextProps.editId);
}
if (nextProps.editId !== this.props.editId && nextProps.editId) this.getPaymentById(nextProps.editId);
}
handleSave = () => {
const { editId, onCancel } = this.props;
const { listMap } = this.state;
const { editId, onCancel } = this.props, { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
let payload = {
id: editId,
@ -100,8 +81,7 @@ class RegEditDetial extends Component {
});
};
handleChange = (type, dataIndex, value, record) => {
const { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
const { listMap } = this.state, [socialData, foundData, otherData] = listMap;
switch (type) {
case "social":
const sociallist = _.map(socialData.dataSource, item => {
@ -139,7 +119,6 @@ class RegEditDetial extends Component {
default:
break;
}
};
getPaymentById = (id) => {
const payload = { id };
@ -257,39 +236,26 @@ class RegEditDetial extends Component {
const { visible, title, onCancel } = this.props;
const { listMap, loading } = this.state;
return (
<WeaSlideModal
className="slideOuterWrapper"
visible={visible}
top={0}
width={48}
height={100}
direction="right"
measure="%"
title={
<SlideModalTitle
loading={loading}
subtitle={title}
showOperateBtn={true}
editable={true}
onSave={this.handleSave}
/>
}
content={
<div className="regEditContentWrapper">
{
_.map(listMap, item => {
const { key, label, dataSource, columns } = item;
return <WeaSearchGroup title={label} items={[]} needTigger showGroup key={key}>
<WeaTable dataSource={dataSource} columns={columns} pagination={false}/>
</WeaSearchGroup>;
})
}
</div>
}
onClose={() => onCancel()}
showMask={true}
/>
);
<WeaSlideModal className="slideOuterWrapper" visible={visible} top={0} width={48}
height={100} direction="right" measure="%"
title={<WeaTop title={title} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[<Button type="primary" onClick={this.handleSave}
style={{ marginRight: 40 }}
loading={loading}>{getLabel(111, "保存")}</Button>]}/>
}
content={
<React.Fragment>
{
_.map(listMap, item => {
const { key, label, dataSource, columns } = item;
return <WeaSearchGroup title={label} items={[]} needTigger showGroup key={key}>
<WeaTable dataSource={dataSource} columns={columns} pagination={false} bordered/>
</WeaSearchGroup>;
})
}
</React.Fragment>
}
onClose={() => onCancel()}/>);
}
}

View File

@ -6,36 +6,27 @@
*/
import React, { Component } from "react";
import { Spin } from "antd";
import { getQueryString } from "../../../../util/url";
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import * as API from "../../../../apis/standingBook";
import "./index.less";
const APIFox = {
"regression": API.recessionList,
"difference": API.balanceList
"regressionSum": API.recessionListSum,
"difference": API.balanceList,
"differenceSum": API.balanceListSum
};
class RegList extends Component {
constructor(props) {
super(props);
this.state = {
columns: [],
dataSource: [],
selectedRowKeys: [],
loading: {
query: false
},
datalistPayload: {},
pageInfo: {
current: 1,
pageSize: 10,
total: 0
}
columns: [], dataSource: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
loading: false, sumRow: {}
};
}
componentDidMount() {
this.recessionList();
window.addEventListener("message", this.handleReceive, false);
}
@ -43,11 +34,11 @@ class RegList extends Component {
const { onEdit, onChangeRowkey } = this.props;
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
this.postMessageToChild();
this.recessionList();
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList());
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList({}, true));
} else if (id === "ROWSELECT") {
const { selectedRowKeys } = params;
this.setState({ selectedRowKeys });
@ -58,24 +49,15 @@ class RegList extends Component {
}
};
postMessageToChild = () => {
const paymentStatus = this.props.type === "difference" ? "4" : "3";
const creator = Number(getQueryString("creator"));
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const childFrameObj = document.getElementById("atdTable");
const { pageInfo, dataSource, columns, selectedRowKeys, datalistPayload } = this.state;
childFrameObj.contentWindow.postMessage(JSON.stringify({
dataSource, columns, pageInfo,
selectedRowKeys, selectedKey: this.props.type,
sumpayload: { billMonth, paymentOrganization, creator, paymentStatus, ...datalistPayload },
showOperates: !getQueryString("type")
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
..._.pick(this.state, ["dataSource", "columns", "pageInfo", "selectedRowKeys", "sumRow"]),
showOperates: !this.props.type
}), "*");
};
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible) {
this.recessionList();
}
if (nextProps.visible !== this.props.visible) this.recessionList();
}
componentWillUnmount() {
@ -85,41 +67,37 @@ class RegList extends Component {
handleResetSelectRowKeys = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
recessionList = (module) => {
const { type } = this.props;
const { loading, pageInfo } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const creator = Number(getQueryString("creator"));
const paymentStatus = type === "difference" ? "4" : "3";
recessionList = (module, pageTurning = false) => {
const { regType } = this.props, { pageInfo } = this.state;
const paymentStatus = regType === "difference" ? "4" : "3";
const payload = {
billMonth, paymentStatus,
creator, paymentOrganization,
...pageInfo,
...module
...pageInfo, ...module, paymentStatus,
..._.pick(this.props, ["billMonth", "paymentOrganization", "creator"])
};
this.setState({ loading: { ...loading, query: true } });
APIFox[type](payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
this.setState({ loading: true });
APIFox[regType](payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { pageInfo: list } = data;
const { columns, list: dataSource, pageNum: current, pageSize, total } = list;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total },
dataSource,
columns,
datalistPayload: module
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
}, () => this.postMessageToChild());
}
}).catch(() => {
this.setState({ loading: { ...loading, query: false } });
});
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
if (status && data === "1" && !pageTurning) {
APIFox[`${regType}Sum`](payload).then(({ status: sumStatus, data: sumData }) => {
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
});
}
});
};
render() {
const { loading } = this.state;
return (
<Spin spinning={loading.query}>
<Spin spinning={loading}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/standingbookTable"

View File

@ -1,7 +1,15 @@
import React, { Component } from "react";
import { Button, Col, Row } from "antd";
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { getQueryString } from "../../../../util/url";
import { Col, Row } from "antd";
import {
WeaBrowser,
WeaButtonIcon,
WeaFormItem,
WeaHelpfulTip,
WeaInput,
WeaLocaleProvider,
WeaSearchGroup,
WeaTab
} from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
@ -18,9 +26,7 @@ class RegTop extends Component {
}
renderTopBtns = () => {
const { name } = this.state;
const { onChange, selectKey, type: regtopType } = this.props;
const type = getQueryString("type");
const { onChange, selectKey, regtopType, type } = this.props;
let dom = [
<WeaHelpfulTip
title={
@ -37,21 +43,22 @@ class RegTop extends Component {
placement="bottomRight"
width={250}
/>,
<Button type="primary" onClick={() => onChange("export")}>导出全部</Button>
<i className="iconfont icon-export" onClick={() => onChange("export")} title={getLabel(111, "导出")}/>
];
if (!type) {
const [dom1, ...extra] = dom;
const domBtn = regtopType === "regression" ?
[<Button type="primary" onClick={() => onChange("add")}>添加</Button>] :
[
<Button type="primary" onClick={() => onChange("add")}>{getLabel(384113, "添加")}</Button>,
<Button type="primary" onClick={() => onChange("import")}>{getLabel(32935, "导入")}</Button>
];
dom = [
const domBtn = [<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => onChange("add")}/>];
dom = regtopType === "regression" ? [
dom1, ...extra,
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectKey)}
onClick={() => onChange("delete")}/>, ...domBtn
] : [
dom1,
<Button type="primary" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
删除
</Button>, ...domBtn, ...extra
<i className="iconfont icon-import" onClick={() => onChange("import")} title={getLabel(111, "导入")}/>,
...extra,
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectKey)}
onClick={() => onChange("delete")}/>, ...domBtn
];
}
return dom;

View File

@ -10,7 +10,7 @@ import RegTop from "./regTop";
import RegList from "./regList";
import RegAddEmployee from "./regAddEmployee";
import RegEditDetial from "./regEditDetial";
import { getQueryString } from "../../../../util/url";
import { convertToUrlString } from "../../../../util/url";
import { calcPageNo } from "../../../../util";
import * as API from "../../../../apis/standingBook";
import "./index.less";
@ -52,12 +52,8 @@ class Regression extends Component {
};
handleSave = (params) => {
const { loading } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const payload = {
...params,
billMonth,
paymentOrganization
...params, ..._.pick(this.props, ["billMonth", "paymentOrganization"])
};
this.setState({ loading: { ...loading, save: true } });
API.saveRecession(payload).then(({ status, errormsg }) => {
@ -76,9 +72,6 @@ class Regression extends Component {
const workcode = this.regTopRef.state.workcode;
const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : [];
const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : [];
const billMonth = getQueryString("billMonth");
const creator = Number(getQueryString("creator"));
const paymentOrganization = getQueryString("paymentOrganization");
switch (key) {
case "add":
this.setState({ returnPersonModal: { ...returnPersonModal, visible: true } });
@ -95,8 +88,8 @@ class Regression extends Component {
});
break;
case "export":
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/recession/export?creator=${creator}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization", "creator"]))}`;
window.open(url, "_blank");
break;
case "search":
this.regListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
@ -124,21 +117,20 @@ class Regression extends Component {
};
render() {
const billMonth = getQueryString("billMonth");
const { returnPersonModal, returnEditPersonSlide, selectKey, loading } = this.state;
return (
<div className="regressionWrapper">
<RegTop
type="regression"
{..._.pick(this.props, ["billMonth", "type"])}
regtopType="regression"
ref={dom => this.regTopRef = dom}
billMonth={billMonth}
onChange={this.handleChangeOpt}
selectKey={selectKey}
/>
<div className="tableWrapper">
{/*<WeaNewScroll height="100%">*/}
<RegList
type="regression"
{..._.pick(this.props, ["billMonth", "paymentOrganization", "creator", "type"])}
regType="regression"
ref={dom => this.regListRef = dom}
visible={returnPersonModal.visible}
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
@ -154,7 +146,6 @@ class Regression extends Component {
onCancel={this.handleCloseModal}
onSave={this.handleSave}
/>
{/*</WeaNewScroll>*/}
</div>
</div>
);

View File

@ -10,7 +10,6 @@ import { Badge, Button, message } from "antd";
import ImportDialog from "../../../../components/importDialog";
import ImportHeaderSetDialog from "./importHeaderSetDialog";
import * as API from "../../../../apis/standingBook";
import { getQueryString } from "../../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@ -64,17 +63,14 @@ class StandingBookCalcImportDialog extends Component {
}
};
handleExportTemp = () => {
const { tmpUrl } = this.props;
const { tmpUrl, billMonth, paymentOrganization } = this.props;
const { headerFieldsDialog: { selectItems, itemsByGroup } } = this.state;
if (_.isEmpty(selectItems)) {
message.error(getLabel(111, "请选择表头字段"));
} else {
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const payload = {
billMonth,
welfareNames: _.map(_.filter(itemsByGroup, k => selectItems.includes(k.fieldId)), o => o.salaryItemName),
paymentOrganization: Number(paymentOrganization)
billMonth, paymentOrganization: Number(paymentOrganization),
welfareNames: _.map(_.filter(itemsByGroup, k => selectItems.includes(k.fieldId)), o => o.salaryItemName)
};
const promise = API[tmpUrl](payload);
}

View File

@ -6,16 +6,15 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { message, Modal } from "antd";
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { Button, message, Modal } from "antd";
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
import { Picker, SelectWithAll } from "./regAddEmployee";
import { Browser } from "../../../dataAcquisition/addItems";
import { getPaymentGroup, getSupplementPaymentForm, siaccountSupplementarySave } from "../../../../apis/standingBook";
import "./index.less";
import BusinessAccounting from "./businessAccounting";
import InputPaymentAmount from "./inputPaymentAmount";
import { toDecimal_n } from "../../../../util";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@ -236,7 +235,7 @@ class SupplementarySlide extends Component {
};
render() {
const { title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props;
const { title, visible, onCancel, taxAgentStore: { PageAndOptAuth } } = this.props;
const { baseInfo, loading, businessAccounting, inputPaymentAmount } = this.state;
const baseItems = [
{
@ -366,50 +365,41 @@ class SupplementarySlide extends Component {
})
}
];
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
return (
<WeaSlideModal
className="supplementarySlideWrapper"
visible={visible}
top={0}
measureT="%"
width={800}
measureX="px"
height={100}
measureY="%"
direction="right"
title={
<SlideModalTitle
subtitle={title}
tabs={[]}
loading={loading}
showOperateBtn={showOperateBtn}
editable={true}
onSave={this.handleSaveSupplementSalary}
/>
}
content={
<div>
<WeaSearchGroup
title="基础信息"
items={baseInfo.supplementType === "2" ? [...baseItems, ...baseExtraItems] : baseItems}
showGroup col={1}
/>
{/* 按补缴人员的历史月份核算基数和当前档案方案核算 */}
{
baseInfo.supplementType === "2" &&
<BusinessAccounting {...businessAccounting} onChangeBaseItem={this.handleChangeBaseFieldItem}/>
}
{/* 动输入补缴金额 */}
{
baseInfo.supplementType === "3" &&
<InputPaymentAmount {...inputPaymentAmount} onChangeInputItem={this.handleChangeInputItem}/>
}
</div>
}
onClose={() => {
onCancel();
this.handleResetForm();
}}
<WeaSlideModal className="supplementarySlideWrapper" visible={visible} top={0} measureT="%" width={800}
measureX="px" height={100} measureY="%" direction="right"
title={
<WeaTop title={title} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={showOperateBtn ? [<Button type="primary"
onClick={this.handleSaveSupplementSalary}
style={{ marginRight: 40 }}
loading={loading}>{getLabel(111, "保存")}</Button>] : []}/>
}
content={
<div>
<WeaSearchGroup
title="基础信息"
items={baseInfo.supplementType === "2" ? [...baseItems, ...baseExtraItems] : baseItems}
showGroup col={1}
/>
{/* 按补缴人员的历史月份核算基数和当前档案方案核算 */}
{
baseInfo.supplementType === "2" &&
<BusinessAccounting {...businessAccounting}
onChangeBaseItem={this.handleChangeBaseFieldItem}/>
}
{/* 动输入补缴金额 */}
{
baseInfo.supplementType === "3" &&
<InputPaymentAmount {...inputPaymentAmount} onChangeInputItem={this.handleChangeInputItem}/>
}
</div>
}
onClose={() => {
onCancel();
this.handleResetForm();
}}
/>
);
}
@ -446,7 +436,7 @@ export const convertData = (dataSource) => {
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
perValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "per")) ? _.filter(itemList, i => i.paymentScopeSign === "per")[0].validNum : 2,
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com"),
comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2,
comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2
});
});
return endList.push(data);

View File

@ -6,10 +6,10 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { WeaLocaleProvider, WeaReqTop, WeaTools } from "ecCom";
import { getTabList } from "../../../apis/standingBook";
import NormalIndex from "./components/normal";
import OverViewIndex from "./components/overView";
import AbnormalListIndex from "./components/abnormalList";
import Regression from "./components/regression";
import MakeupDifference from "./components/makeupDifference";
@ -20,65 +20,47 @@ const { getLabel } = WeaLocaleProvider;
class StandingBookDetail extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: "1",
tabList: [],
remarks: "",
billMonth: ""
};
this.type = "";
this.paymentOrganization = "";
this.state = { selectedKey: "", tabList: [], welfareRecord: { ...WeaTools.getUrlParams() } };
}
componentDidMount() {
this.getTabList();
}
getTabList = (payload = {}) => {
const { getTabList } = this.props.standingBookStore;
const billMonth = this.props.location.query.billMonth;
this.paymentOrganization = this.props.location.query.paymentOrganization;
this.type = this.props.location.query.type;
getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => {
getTabList = () => {
const order = [
getLabel(111, "正常缴纳"), getLabel(111, "补缴"), getLabel(111, "退差"), getLabel(111, "补差"), getLabel(111, "总览")
];
const payload = _.pick(this.state.welfareRecord, ["billMonth", "paymentOrganization"]);
getTabList(payload).then(({ data }) => {
const { tabList, remarks, billMonth } = data;
let newTabList = tabList.filter(item => item.id != "2");
newTabList.push(newTabList.splice(_.findIndex(newTabList, it => it.id === "4"), 1)[0]);
this.setState({
selectedKey: newTabList[0].id,
tabList: _.map(newTabList, it => ({ title: it.content, key: it.id })),
remarks, billMonth
selectedKey: _.find(tabList, o => o.content === getLabel(111, "正常缴纳")).id,
tabList: tabList.filter(item => item.content !== getLabel(111, "异动清单")).sort((a, b) => (order.indexOf(a.content) - order.indexOf(b.content))),
welfareRecord: { ...this.state.welfareRecord, remarks, billMonth }
});
});
};
render() {
const { selectedKey, tabList, remarks, billMonth } = this.state;
const { selectedKey, tabList, welfareRecord } = this.state;
const tabDatas = _.map(tabList, o => ({ key: o.id, title: o.content }));
const params = { ...welfareRecord, selectedKey };
return (
<div className="standingBookDetailWapper">
<WeaReqTop
title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabList} selectedKey={selectedKey}
onChange={selectedKey => this.setState({ selectedKey })}
>
iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabDatas} selectedKey={selectedKey}
onChange={selectedKey => this.setState({ selectedKey, welfareRecord: { ...welfareRecord, selectedKey } })}>
{
(selectedKey === "1" || selectedKey === "3") &&
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} type={this.type}
paymentOrganization={this.paymentOrganization} location={this.props.location}/>
}
{
selectedKey === "2" &&
<AbnormalListIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
}
{
selectedKey === "4" &&
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
}
{
selectedKey === "5" && <Regression/>
}
{
selectedKey === "6" && <MakeupDifference/>
(selectedKey === "1" || selectedKey === "3") && <NormalIndex {...params} {...this.props}/>
}
{/*退差*/}
{selectedKey === "5" && <Regression {...params} {...this.props}/>}
{/*补差*/}
{selectedKey === "6" && <MakeupDifference {...params} {...this.props}/>}
{/*总览*/}
{selectedKey === "4" && <OverViewIndex {...params} {...this.props}/>}
</WeaReqTop>
</div>
);

View File

@ -63,7 +63,7 @@ class Index extends Component {
};
} else if (getKey(o) === "paymentType" || getKey(o) === "sharedType") {
return {
...o, label: getLabel(o.lanId, o.label),
...o, label: getLabel(o.lanId, o.label), viewAttr: showOperateBtn ? o.viewAttr : 1,
options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
};
}

View File

@ -103,6 +103,14 @@
}
.welfare-plan-edit-layout {
.ant-table-content {
padding-left: 208px !important;
.ant-table-fixed-left {
top: 1px;
}
}
.flex-center {
display: flex;
align-items: center;

View File

@ -68,7 +68,7 @@ class Index extends Component {
label: o.name,
labelcol: 6,
value: detail[`${String(o.id)}_variableItem`] || "",
viewAttr: 2, dataType: o.dataType
viewAttr: !_.isEmpty(detail) ? detail.viewAttr : 2, dataType: o.dataType
})),
title: "", col: 2,
defaultshow: true
@ -119,14 +119,17 @@ class Index extends Component {
});
};
renderTitle = () => {
const { loading } = this.state, { title } = this.props;
const { loading } = this.state, { title, detail } = 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">
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
{
(_.isEmpty(detail) || detail.viewAttr === 2) &&
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
}
</div>
</div>;
};

View File

@ -96,7 +96,9 @@ class Index extends Component {
<ImportDialog
{...this.props} {...importDialog}
onResetImportResult={() => this.setState({
importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
importDialog: {
...importDialog, importResult: {}, imageId: "", link: "/api/bs/hrmsalary/variableSalary/downloadTemplate"
}
})}
importParams={this.renderFormComponent()}
exportDataDom={

View File

@ -91,7 +91,8 @@ class Index extends Component {
this.handleDelete([params.id]);
break;
case "EDIT":
this.handleView(params.id);
case "VIEW":
this.handleView(params.id, id === "VIEW");
break;
default:
break;
@ -118,9 +119,9 @@ class Index extends Component {
}
});
};
handleView = (id) => {
handleView = (id, view) => {
API.getVariableSalaryDetail({ id }).then(({ status, data }) => {
if (status) this.props.onViewSalaryFile(data.data);
if (status) this.props.onViewSalaryFile({ ...data.data, viewAttr: view ? 1 : 2 });
});
};
handleDelete = (ids) => {
@ -157,7 +158,7 @@ class Index extends Component {
const i18n = {
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"),
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"删除": getLabel(111, "删除")
"删除": getLabel(111, "删除"), "查看": getLabel(111, "查看")
};
const childFrameObj = document.getElementById("unitTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");

View File

@ -46,7 +46,7 @@ class Index extends Component {
columns: [
..._.filter(columns, o => o.dataIndex !== "id"),
{
title: getLabel(111, "操作"), dataIndex: "oprate",
title: getLabel(111, "操作"), dataIndex: "operate",
render: (__, record) => (<React.Fragment>
<a href="javascript: void(0)" style={{ marginRight: 10 }}
onClick={() => this.handleEdit(record.id)}>{getLabel(111, "编辑")}</a>
@ -85,7 +85,7 @@ class Index extends Component {
};
render() {
const { columns, dataSource, loading, pageInfo } = this.state;
const { columns, dataSource, loading, pageInfo } = this.state, { showOperateBtn } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
@ -104,8 +104,9 @@ class Index extends Component {
}
};
return (<Spin spinning={loading && pageInfo.total === 0}>
<WeaTable columns={columns} dataSource={dataSource} loading={loading} bordered
pagination={pagination} scroll={{ y: `calc(100vh - 170px)` }}/>
<WeaTable columns={showOperateBtn ? columns : _.filter(columns, o => o.dataIndex !== "operate")}
dataSource={dataSource} loading={loading} bordered pagination={pagination}
scroll={{ y: `calc(100vh - 170px)` }}/>
</Spin>
);
}

View File

@ -109,11 +109,12 @@ class Index extends Component {
})}>{getLabel(111, "新建")}</Button>,
<AdvanceInputBtn onAdvanceSearch={this.handleAdvanceSearch}/>
] : [<AdvanceInputBtn onAdvanceSearch={this.handleAdvanceSearch}/>],
children: <SalaryItemList {...this.props} isQuery={isQuery} onEditSalaryItem={data => this.setState({
SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") }
}, () => VSSalaryItemForm.updateFields({
name: data.name, dataType: data.dataType
}))}/>
children: <SalaryItemList {...this.props} isQuery={isQuery} showOperateBtn={showOperateBtn}
onEditSalaryItem={data => this.setState({
SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") }
}, () => VSSalaryItemForm.updateFields({
name: data.name, dataType: data.dataType
}))}/>
}
];
return (