Merge branch 'release/2.10.1.2402.01' into release/2.10.1.2402.01-个税
# Conflicts: # pc4mobx/hrmSalary/apis/index.js # pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js # pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js # pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js # pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js # pc4mobx/hrmSalary/pages/dataAcquisition/layout.js # pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js # pc4mobx/hrmSalary/pages/declare/declare.js
This commit is contained in:
commit
4c8c3e7251
|
|
@ -20,6 +20,21 @@ export const getCondition = (params) => {
|
|||
export const getTableDatas = (params) => {
|
||||
return WeaTools.callApi("/api/demo03/weatableDemo", "GET", params);
|
||||
};
|
||||
//获取日志列表
|
||||
export const getLogs = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"}]"
|
||||
};
|
||||
return postFetch("/api/bs/hrmsalary/elog/getLogs", payload);
|
||||
};
|
||||
//获取单条操作记录的更新明细
|
||||
export const getDetailChanges = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", detailTransMethod: "elogDemoDetail"
|
||||
};
|
||||
return postFetch("/api/bs/hrmsalary/elog/getDetailChanges", payload);
|
||||
};
|
||||
|
||||
// 薪资账套-浏览按钮数据
|
||||
export const commonBrowserData = (params) => {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export const inspectList = (params) => {
|
|||
};
|
||||
//社会福利台账-删除正常缴纳人员
|
||||
export const siaccountCommonDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/common/delete", params);
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/supplementary/delete", params);
|
||||
};
|
||||
//社会福利台账-添加正常缴纳人员
|
||||
export const siaccountCommonSave = (params) => {
|
||||
|
|
@ -197,3 +197,11 @@ export const getBalancePaymentGroup = params => {
|
|||
export const addNewBalance = params => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/addNewBalance", params);
|
||||
};
|
||||
// 导入社保台账添加表头字段缓存-正常缴纳以及补缴
|
||||
export const cacheWelfareListField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheWelfareList", params);
|
||||
};
|
||||
// 导入社保台账添加表头字段缓存-补差缓存
|
||||
export const cacheBalanceWelfareList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 日志查看-详情
|
||||
* Description:
|
||||
* Date: 2024/1/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
|
||||
import * as API from "../../../../apis";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const WeaTransferList = WeaTransfer.list;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDetailChanges(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
dataSource: [],
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
|
||||
getDetailChanges = (props) => {
|
||||
const { mainid, logFunction } = props;
|
||||
const payload = { function: logFunction, mainid };
|
||||
this.setState({ loading: true });
|
||||
API.getDetailChanges(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
this.setState({
|
||||
dataSource: _.map(data, (o, i) => ({
|
||||
...o, index: i + 1,
|
||||
valueschanges: _.map(o.valueschanges, (g, gi) => ({ id: gi + 1, name: g }))
|
||||
}))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource } = this.state;
|
||||
const scrollHeight = this.logDetailRef ? this.logDetailRef.state.height - 32 : 606.6;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll className="logDialog" initLoadCss ref={dom => this.logDetailRef = dom}
|
||||
style={{
|
||||
width: 750,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="logDialogContent">
|
||||
{
|
||||
_.map(dataSource, item => (!_.isEmpty(item.valueschanges) ? <WeaTransferList
|
||||
data={item.valueschanges} renderItem={(it) => (<div className="detailBox">
|
||||
<div className="order">{it.id}</div>
|
||||
<div className="content" title={it.name}>{it.name}</div>
|
||||
</div>)}
|
||||
height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
|
||||
/> : <div className="empty">{getLabel(111, "无数据变更记录")}</div>))
|
||||
}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
export const logConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["date"],
|
||||
fieldcol: 18,
|
||||
label: "操作时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["operator"],
|
||||
fieldcol: 18,
|
||||
label: "操作人",
|
||||
lanId: 17482,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["targetname"],
|
||||
fieldcol: 18,
|
||||
label: "对象",
|
||||
lanId: 106,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["operatetypename"],
|
||||
fieldcol: 18,
|
||||
label: "操作类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
|
||||
export const renderLogSearchsForm = (form, condition, onSearch = () => void (0), onReset = () => void (0)) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom"
|
||||
>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
{
|
||||
getKey(fields) === "operatetypename" &&
|
||||
<div style={{ position: "absolute", right: "-148px", top: "0" }}>
|
||||
<Button type="ghost" onClick={onReset} style={{ marginRight: 10 }}>{getLabel(2022, "重置")}</Button>
|
||||
<Button type="primary" onClick={onSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</div>
|
||||
}
|
||||
</WeaFormItem>),
|
||||
colSpan: 1
|
||||
});
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup col={3} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} center={false}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
|
|
@ -1,99 +1,130 @@
|
|||
import React from 'react'
|
||||
import { Button, Modal } from 'antd';
|
||||
import { WeaInput, WeaRangePicker, WeaTable} from 'ecCom'
|
||||
import { logColumns, dataSource } from "../../common/columns"
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪酬日志查看
|
||||
* Description:
|
||||
* Date: 2024/1/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import DetailLogView from "./components/detailLogView";
|
||||
import { logConditions, renderLogSearchsForm } from "./config";
|
||||
import * as API from "../../apis/index";
|
||||
import "./index.less";
|
||||
|
||||
export default class LogViewModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state ={
|
||||
value: ""
|
||||
}
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false, conditions: [], logDetailDialog: { visible: false, title: "", logFunction: "", mainid: "" }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
this.setState({
|
||||
conditions: _.map(logConditions, it => ({
|
||||
...it, items: _.map(it.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getLogs({}, nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Modal title="操作日志" visible={this.props.visible}
|
||||
onOk={() => alert("ok")} onCancel={this.props.onCancel}
|
||||
className="logViewModal"
|
||||
style={{ top: 150 }}
|
||||
width={'80%'} height={'50%'}
|
||||
>
|
||||
<div className="searchBar">
|
||||
<div className="searchBarItem searchDateRange">
|
||||
<div className="searchBarLabel">操作时间</div>
|
||||
<div>
|
||||
<WeaRangePicker
|
||||
value={["2019-02-03", "2019-03-08"]}
|
||||
onChange={v => this.setState({ value: v })}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="searchBarItem">
|
||||
<div className="searchBarLabel">操作人</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="searchBarItem">
|
||||
<div className='searchBarLabel'>对象</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
getLogs = (extra = {}, props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { baseFormStore: { form }, logFunction, filterConditions } = props;
|
||||
const payload = {
|
||||
...pageInfo, ...extra, searchMap: { ...form.getFormParams() },
|
||||
function: logFunction, showColums: "", filterConditions
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getLogs(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: _.map(columns, it => {
|
||||
if (it.dataIndex === "operatedesc") {
|
||||
return {
|
||||
...it, render: (__, record) => (<a href="javascript:void(0);" onClick={() => {
|
||||
const { operatedesc: title, uuid: mainid } = record;
|
||||
this.setState({ logDetailDialog: { visible: true, title, logFunction, mainid } });
|
||||
}}>{getLabel(33564, "查看")}</a>)
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
<div className="searchBarItem">
|
||||
<div className='searchBarLabel'>操作类型</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="searchBarItem">
|
||||
<Button type="primary" className="searchBtn">搜索</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WeaTable columns={logColumns} dataSource={dataSource} />
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo, conditions, logDetailDialog } = this.state;
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.getLogs({}, this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getLogs({}, this.props));
|
||||
}
|
||||
};
|
||||
const scrollHeight = this.logRef ? this.logRef.state.height - 254 : 606.6;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} title={getLabel(111, "操作日志")}
|
||||
ref={dom => this.logRef = dom} className="logDialog" initLoadCss
|
||||
style={{
|
||||
width: 1150,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="logDialogContent">
|
||||
{renderLogSearchsForm(form, conditions, () => this.getLogs({ current: 1 }, this.props), () => {
|
||||
form.resetForm();
|
||||
this.getLogs({ current: 1 }, this.props);
|
||||
})}
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} loading={loading} className="logTable"
|
||||
pagination={pagination} scroll={{ y: `${scrollHeight}px` }}
|
||||
/>
|
||||
<DetailLogView {...logDetailDialog}
|
||||
onCancel={() => this.setState({ logDetailDialog: { ...logDetailDialog, visible: false } })}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
.logDialog {
|
||||
.wea-dialog-body {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.logDialogContent {
|
||||
background: #F6F6F6;
|
||||
padding: 16px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #ffff;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
background: #FFF;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logTable {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.wea-transfer-list-wrapper {
|
||||
border: none;
|
||||
|
||||
.ant-tree-switcher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.transfer-tree {
|
||||
background: #FFF;
|
||||
border: 1px solid #dadada;
|
||||
padding: 0;
|
||||
|
||||
& > li:not(:last-child) {
|
||||
.detailBox .content {
|
||||
border-bottom: 1px solid #dadada;
|
||||
}
|
||||
}
|
||||
|
||||
& > li {
|
||||
margin: 0 !important;
|
||||
|
||||
.detailBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.order {
|
||||
width: 35px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 40px;
|
||||
line-height: 40px;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ import TemplatePreview from "./pages/payroll/templatePreview";
|
|||
import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面
|
||||
import MobilePayroll from "./pages/mobilePayroll";
|
||||
import SysConfig from "./pages/sysConfig";
|
||||
import RuleConfig from "./pages/ruleConfig";
|
||||
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
||||
import Appconfig from "./pages/appConfig";
|
||||
import FieldManagement from "./pages/fieldManagement";
|
||||
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import { adjustRecordItemList } from "../../apis/adjustManage";
|
|||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel";
|
||||
import cs from "classnames";
|
||||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
import { Button, Dropdown, Menu } from "antd";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
loading: false, columns: [], dataSource: [], showSearchAd: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, logDialogVisible: false,
|
||||
filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -57,12 +58,26 @@ class Index extends Component {
|
|||
const { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
columns: [..._.map(columns, o => {
|
||||
if (o.dataIndex === "username") {
|
||||
return { ...o, width: 150, fixed: "left" };
|
||||
}
|
||||
return { ...o, width: 150 };
|
||||
})
|
||||
}), {
|
||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||
width: 120, render: (_, record) => (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
@ -88,9 +103,21 @@ class Index extends Component {
|
|||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo, showSearchAd } = this.state;
|
||||
const { loading, dataSource, columns, pageInfo, showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
|
|
@ -111,11 +138,17 @@ class Index extends Component {
|
|||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "调薪管理")} buttonSpace={10} className="adjustManageLayout"
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" showDropIcon
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.adjustExport}>{getLabel(17416, "导出")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={this.adjustRecordItemList}/>
|
||||
]} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
|
|
@ -129,6 +162,9 @@ class Index extends Component {
|
|||
dataSource={dataSource} loading={loading}
|
||||
pagination={pagination} columns={columns}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcitemadj" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ export const condition = [
|
|||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
viewAttr: 3,
|
||||
otherParams: {
|
||||
showSearch: true, optionFilterProp: "children"
|
||||
}
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
|
|||
|
|
@ -52,10 +52,14 @@ class EmployeeDetails extends Component {
|
|||
columns: [...columns, {
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
width: 80,
|
||||
width: 120,
|
||||
render: (_, record) => {
|
||||
return <a target="_blank"
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(33564, "查看")}</a>;
|
||||
return <React.Fragment>
|
||||
<a target="_blank" style={{ marginRight: 10 }}
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(111, "查看")}</a>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</React.Fragment>;
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class ReportList extends Component {
|
|||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
} else if (key === "log") {
|
||||
this.props.onFilterLog(key, id);
|
||||
}
|
||||
};
|
||||
reportStatisticsReportDelete = (payload) => {
|
||||
|
|
@ -106,6 +108,7 @@ class ReportList extends Component {
|
|||
<Menu.Item key="edit">{getLabel(501169, "编辑")}</Menu.Item>
|
||||
<Menu.Item key="copy">{getLabel(77, "复制")}</Menu.Item>
|
||||
<Menu.Item key="delete">{getLabel(535052, "删除")}</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<Button type="ghost"><i className="icon-coms-more"/></Button>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ class StatisticsModal extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".xc_tj_fx_wrapper").classList.add("zIndex0-statistics");
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".xc_tj_fx_wrapper").classList.remove("zIndex0-statistics");
|
||||
}
|
||||
}
|
||||
|
||||
handleSaveReportList = () => {
|
||||
const { form, id, onCancel } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import ReportList from "./components/reportList";
|
|||
import ReportForm from "./components/reportForm";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -41,7 +42,8 @@ class Index extends Component {
|
|||
modalReq: {
|
||||
title: "", visible: false,
|
||||
typeKey: "", id: ""
|
||||
}
|
||||
},
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -243,10 +245,25 @@ class Index extends Component {
|
|||
initTable && this.dimensionTableRef.dimensionList();
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { statisticsReportBtn }, attendanceStore: { statisticsForm, reportForm } } = this.props;
|
||||
const { selectedKey, modalReq, slideReq, conditions, reportConditions, reportName, keyword, year } = this.state;
|
||||
const {
|
||||
selectedKey, modalReq, slideReq, conditions, reportConditions,
|
||||
reportName, keyword, year, logDialogVisible, filterConditions
|
||||
} = this.state;
|
||||
const buttons = selectedKey === "statistics" ? [
|
||||
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
||||
<Button type="ghost"
|
||||
|
|
@ -272,9 +289,16 @@ class Index extends Component {
|
|||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" showDropIcon
|
||||
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
|
||||
onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
{
|
||||
selectedKey === "statistics" ?
|
||||
|
|
@ -282,9 +306,11 @@ class Index extends Component {
|
|||
ref={dom => this.reportListRef = dom}
|
||||
reportName={reportName}
|
||||
onEdit={this.handleReqBtnsClick}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> : <EmployeeDetails
|
||||
ref={dom => this.employeeListRef = dom}
|
||||
keyword={keyword} year={year}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
}
|
||||
<StatisticsModal {...modalReq} onCancel={this.handleCancel} form={reportForm} onClose={this.handleCancel}
|
||||
|
|
@ -306,6 +332,9 @@ class Index extends Component {
|
|||
form={statisticsForm} condition={conditions}
|
||||
initCondition={this.initCondition} onChangeCondition={this.handleChangeCondition}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="statreport" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
.xc_tj_fx_wrapper {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.search {
|
||||
top: -3px;
|
||||
margin-right: 10px;
|
||||
|
|
@ -167,6 +163,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
.zIndex0-statistics {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
//统计维度弹框
|
||||
.dimensionModalWrapper, .dimensionSlideWrapper {
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ import moment from "moment";
|
|||
import CalculateQuery from "./components/calculateQuery";
|
||||
import CalculateTablelist from "./components/calculateTablelist";
|
||||
import CalculateDialog from "./components/calculateDialog";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -27,10 +28,10 @@ class Calculate extends Component {
|
|||
queryParams: {
|
||||
name: "",
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false,
|
||||
}, isRefresh: false, logDialogVisible: false,
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }
|
||||
};
|
||||
|
|
@ -165,16 +166,39 @@ class Calculate extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
//操作日志
|
||||
this.onDropMenuClick(key, record.id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule } = this.state;
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||
onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="calculate-body">
|
||||
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
|
||||
|
|
@ -184,6 +208,9 @@ class Calculate extends Component {
|
|||
isRefresh: bool === "refresh" ? !isRefresh : isRefresh
|
||||
}, () => bool === "refresh" && window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calculate/${id}`))}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="acctrecord" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/* 归档进度条*/}
|
||||
{
|
||||
progressModule.visible &&
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ class Index extends Component {
|
|||
/>
|
||||
</span>,
|
||||
render: (__, record) => {
|
||||
const { operate = [] } = record;
|
||||
const { operate: opts = [] } = record;
|
||||
const operate = [...opts, { index: "log", text: getLabel(30586, "查看日志") }];
|
||||
return <React.Fragment>
|
||||
{
|
||||
_.map(operate.slice(0, 2), f => (
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ export default class SelectFieldModal extends React.Component {
|
|||
this.props.onAdd(this.fieldData);
|
||||
this.props.onCancel();
|
||||
};
|
||||
//薪资核算导入缓存字段
|
||||
cacheImportField = () => {
|
||||
const salaryItemList = _.reduce(_.keys(this.fieldData), (pre, cur) => ([...pre, ...this.fieldData[cur]]), []);
|
||||
const salaryItems = _.map(_.filter(salaryItemList, it => !!it.checked), item => item.salaryItemId);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
* Date: 2023/2/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
deleteAttendance,
|
||||
getAttendanceFieldSettingList,
|
||||
|
|
@ -28,6 +28,8 @@ import SelectItemsWrapper from "../../../../components/selectItemsModal/selectIt
|
|||
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
|
||||
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class AttendanceDataComp extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -364,7 +366,26 @@ class AttendanceDataComp extends Component {
|
|||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
<a href="javascript: void(0);" onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
!showOperateBtn &&
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,12 @@ class AttendanceDataViewSlide extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.viewAttendQuote({}, nextProps);
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||
this.viewAttendQuote({}, nextProps);
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
|
||||
}
|
||||
}
|
||||
|
||||
viewAttendQuote = (extraPayload = {}, props) => {
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
* Date: 2023/2/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaTable } from "ecCom";
|
||||
import { Col, message, Row } from "antd";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Col, Dropdown, Menu, message, Row } from "antd";
|
||||
import AttendanceCustomFieldsModal from "./attendanceCustomFieldsModal";
|
||||
import { getAttendanceFieldList, updateAttendanceFieldStatus } from "../../../../apis/attendance";
|
||||
import TipLabel from "../../../../components/TipLabel";
|
||||
import { fieldsColumns } from "../columns";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class FieldMangComp extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -71,7 +73,7 @@ class FieldMangComp extends Component {
|
|||
getColumns = () => {
|
||||
const { columns } = this.state;
|
||||
const { showOperateBtn } = this.props;
|
||||
return _.map(_.filter(columns, item => !!item.display), child => ({
|
||||
return [..._.map(_.filter(columns, item => !!item.display), child => ({
|
||||
...child,
|
||||
render: (text, record) => {
|
||||
switch (child.dataIndex) {
|
||||
|
|
@ -86,7 +88,23 @@ class FieldMangComp extends Component {
|
|||
return <div dangerouslySetInnerHTML={{ __html: text }}/>;
|
||||
}
|
||||
}
|
||||
}));
|
||||
})), {
|
||||
dataIndex: "options",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>)
|
||||
}];
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaFormItem, WeaNewScroll, WeaTab } from "ecCom";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import AttendanceDataComp from "./components/attendanceDataComp";
|
||||
import FieldMangComp from "./components/fieldMangComp";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
|
|
@ -21,9 +23,8 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldName: "",
|
||||
selectedKey: "DATA",
|
||||
salaryMonth: []
|
||||
fieldName: "", selectedKey: "DATA", salaryMonth: [],
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -67,47 +68,75 @@ class Index extends Component {
|
|||
visible: true, title: "引用考勤数据"
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName } = this.state;
|
||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const topTab = [
|
||||
{ title: "考勤数据", viewcondition: "DATA" },
|
||||
{ title: "字段管理", viewcondition: "FIELD" }
|
||||
{ title: "考勤数据", key: "DATA" },
|
||||
{ title: "字段管理", key: "FIELD" }
|
||||
];
|
||||
const buttons = selectedKey === "DATA" ? [
|
||||
<Button type="primary" onClick={this.handleQuoteAttendanceData}>引用</Button>,
|
||||
<Button type="ghost" onClick={this.handleImportAttendanceData}>导入</Button>
|
||||
] : [<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>];
|
||||
] : [
|
||||
<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>,
|
||||
<WeaInputSearch placeholder={getLabel(511723, "请输入字段名称")}
|
||||
value={fieldName} onChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}/>
|
||||
];
|
||||
return (
|
||||
<div className="attendanceRefWrapper">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder="请输入字段名称"
|
||||
onChange={v => this.setState({ selectedKey: v })}
|
||||
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}
|
||||
/>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<WeaReqTop
|
||||
buttonSpace={10} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
tabDatas={topTab} selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
onChange={v => this.setState({ selectedKey: v })} title={getLabel(525196, "考勤数据")}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
/>
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
]}
|
||||
>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "DATA" ? "attendquote" : "attendfield"}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })} filterConditions={filterConditions}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.linkWapper {
|
||||
|
|
@ -23,6 +25,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.zIndex0-attendance {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.attendenceImportWrapper {
|
||||
.wea-dialog-body {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ class Index extends Component {
|
|||
visible: false, title: "", type: ""
|
||||
},
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false
|
||||
incomeTaxStatus: false,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -372,7 +373,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getAddUpDeduction({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this[key](record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this[key](record);
|
||||
};
|
||||
handleCloseSlide = () => {
|
||||
const { slidePayload } = this.state;
|
||||
|
|
@ -581,7 +582,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -589,11 +590,12 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={modalColumns}
|
||||
>
|
||||
<DataTables
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ class Index extends Component {
|
|||
incomeTaxStatus: false,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
}
|
||||
},
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -187,7 +188,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getAddUpSituation({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.deleteSelectAddUpSituation(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.deleteSelectAddUpSituation(record);
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -581,7 +582,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, year, exportPayloadType, cumTaxPeriodDialog
|
||||
importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
|
||||
return (
|
||||
|
|
@ -589,13 +590,13 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
onImportFile={this.handleImportFile}
|
||||
onImportFile={this.handleImportFile} columns={situationModalColumns}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={situationModalColumns}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
{...cumTaxPeriodDialog}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ import React, { Component } from "react";
|
|||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import { getTableDate } from "../../apis/cumDeduct";
|
||||
import { Menu, Popover } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class DataTables extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -118,6 +121,7 @@ class DataTables extends Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -132,8 +136,19 @@ class DataTables extends Component {
|
|||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);"
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -19,7 +22,7 @@ class Layout extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showSearchAd: false
|
||||
showSearchAd: false, logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +42,15 @@ class Layout extends Component {
|
|||
*/
|
||||
window.open(nextProps.exportPayloadUrl, "_self");
|
||||
}
|
||||
if (nextProps.targetid !== this.props.targetid && nextProps.targetid) {
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:操作日志
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
this.onDropMenuClick("log", nextProps.targetid);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
@ -49,14 +61,26 @@ class Layout extends Component {
|
|||
const { onResizeWindowInnerWidth } = this.props;
|
||||
onResizeWindowInnerWidth(window.innerWidth);
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showSearchAd } = this.state;
|
||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition,
|
||||
onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile,
|
||||
onPreviewImport, detailOptBtns, columns, tabBtns = []
|
||||
onPreviewImport, detailOptBtns, columns, tabBtns = [], logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||
const {
|
||||
|
|
@ -66,8 +90,14 @@ class Layout extends Component {
|
|||
return (
|
||||
<div className="layoutWrapper">
|
||||
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]}
|
||||
|
|
@ -125,6 +155,9 @@ class Layout extends Component {
|
|||
content={slideChildren}
|
||||
onClose={onClose}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={logFunction} filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false }, () => onClearTargrtid())}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ class Index extends Component {
|
|||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -190,7 +191,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getData({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.deleteSelectData(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.deleteSelectData(record);
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -538,7 +539,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType
|
||||
importPayload, exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -546,11 +547,12 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={otherModalColumns}
|
||||
>
|
||||
<DataTables
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ class Index extends Component {
|
|||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -360,7 +361,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getSpecialAddDeduction({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.specialAddDeductionDeleteSelectData(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.specialAddDeductionDeleteSelectData(record);
|
||||
};
|
||||
handleCloseSlide = () => {
|
||||
const { slidePayload } = this.state;
|
||||
|
|
@ -449,7 +450,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||
const {
|
||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
||||
exportPayloadType
|
||||
exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { taxAgentId };
|
||||
return (
|
||||
|
|
@ -457,11 +458,12 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="specialAddDeduction"
|
||||
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={[]}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={specialModalColumns}
|
||||
>
|
||||
<DataTables
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal, Tag } from "antd";
|
||||
import { Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
|
||||
|
|
@ -147,6 +147,10 @@ class Index extends Component {
|
|||
>
|
||||
{getLabel(83110, "查看详情")}
|
||||
</a>
|
||||
{
|
||||
!showWithDrawBtn && <a href="javascript:void(0)" style={{ marginLeft: 10 }}
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn &&
|
||||
<a
|
||||
|
|
@ -162,6 +166,18 @@ class Index extends Component {
|
|||
{getLabel(32025, "撤回")}
|
||||
</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn && <Dropdown overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import moment from "moment";
|
|||
import DeclareQuery from "./components/declareQuery";
|
||||
import DeclareTablelist from "./components/declareTablelist";
|
||||
import DeclareDialog from "./components/declareDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -25,11 +26,12 @@ class Calculate extends Component {
|
|||
queryParams: {
|
||||
taxAgentName: "",
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false,
|
||||
declareDaialog: { visible: false, title: "" }
|
||||
declareDaialog: { visible: false, title: "" },
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
|
@ -57,22 +59,42 @@ class Calculate extends Component {
|
|||
];
|
||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, declareDaialog } = this.state;
|
||||
const { queryParams, isRefresh, declareDaialog, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return (
|
||||
<WeaTop title={getLabel(543353, "个税申报")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout"
|
||||
>
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout" showDropIcon
|
||||
onDropMenuClick={this.onDropMenuClick} dropMenuDatas={[{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}>
|
||||
<div className="declare-body">
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh} showOperateBtn={showOperateBtn}/>
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh} showOperateBtn={showOperateBtn}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<DeclareDialog {...declareDaialog}
|
||||
onCancel={(bool) => this.setState({
|
||||
declareDaialog: { ...declareDaialog, visible: false },
|
||||
isRefresh: bool === "refresh" ? !isRefresh : isRefresh
|
||||
})}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="taxdecla" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import { inject, observer } from "mobx-react";
|
|||
import { WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide";
|
||||
import ExternalPersonImport from "./components/externalPersonImport";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { getSearchs } from "../../util";
|
||||
import { condition, searchCondition } from "./conditions";
|
||||
import { deleteExtEmp, listPage } from "../../apis/externalPersonManage";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
loading: false, logDialogVisible: false, filterConditions: "[]",
|
||||
selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
showSearchAd: false,
|
||||
|
|
@ -103,10 +104,22 @@ class Index extends Component {
|
|||
}
|
||||
}));
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
showSearchAd, externalPersonManagePayload, loading,
|
||||
showSearchAd, externalPersonManagePayload, loading, logDialogVisible, filterConditions,
|
||||
pageInfo, selectedRowKeys, dataSource, externalPersonImportPayload
|
||||
} = this.state;
|
||||
const {
|
||||
|
|
@ -136,7 +149,13 @@ class Index extends Component {
|
|||
<div className="externalPerWrapper">
|
||||
<WeaTop
|
||||
title="非系统人员管理" icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="externalPerCont">
|
||||
<WeaTab
|
||||
|
|
@ -181,6 +200,17 @@ class Index extends Component {
|
|||
<React.Fragment>
|
||||
<a href="javascript: void(0);" onClick={() => this.handleAdd(id)}
|
||||
style={{ paddingRight: 8 }}>编辑</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.onDropMenuClick("log", id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
{/*<a href="javascript: void(0);" onClick={() => this.handleDelete(id)}>删除</a>*/}
|
||||
</React.Fragment>
|
||||
)
|
||||
|
|
@ -222,6 +252,9 @@ class Index extends Component {
|
|||
/>
|
||||
}
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="extemployee" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@
|
|||
* Date: 2023/1/19
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Switch } from "antd";
|
||||
import { Dropdown, Menu, Switch } from "antd";
|
||||
import { salaryFieldList } from "../../../apis/fieldManage";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class FieldTable extends Component {
|
||||
|
|
@ -75,6 +77,17 @@ class FieldTable extends Component {
|
|||
record.canDelete && (showSalaryItemBtn || showOperateBtn) &&
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
|
||||
}
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</div>;
|
||||
};
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,20 +7,22 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaInputSearch, WeaTop } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import FieldTable from "./components/fieldTable";
|
||||
import FieldSlide from "./components/fieldSlide";
|
||||
import { deleteSalaryField } from "../../apis/fieldManage";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class FieldManagement extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
doSearch: false,
|
||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||
slideparams: {
|
||||
visible: false,
|
||||
title: "新建字段",
|
||||
|
|
@ -67,9 +69,21 @@ class FieldManagement extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { searchVal, doSearch, slideparams } = this.state;
|
||||
const { searchVal, doSearch, slideparams, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||
const btns = [
|
||||
|
|
@ -85,15 +99,21 @@ class FieldManagement extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="字段管理"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="fieldManageWrapper">
|
||||
<FieldTable name={searchVal} doSearch={doSearch} onEditLedger={this.handleEditField}
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}/>
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
<FieldSlide
|
||||
{...slideparams}
|
||||
onChangeRecord={(record) => this.setState({
|
||||
|
|
@ -105,6 +125,9 @@ class FieldManagement extends Component {
|
|||
onCancel={this.handleResetField}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcfield" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
* Date: 2022/12/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaTable } from "ecCom";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Menu, message, Modal, Popover } from "antd";
|
||||
import { changeLedgerStatus, deleteLedger, getLedgerList } from "../../../apis/ledger";
|
||||
import CopyLedgerModal from "./copyLedgerModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "ledgerStore")
|
||||
@observer
|
||||
class LedgerTable extends Component {
|
||||
|
|
@ -96,6 +98,7 @@ class LedgerTable extends Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record)}>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -166,6 +169,9 @@ class LedgerTable extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(key, id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,21 +6,23 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import LedgerTable from "./components/ledgerTable";
|
||||
import LedgerSlide from "./components/ledgerSlide";
|
||||
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
doSearch: false,
|
||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||
slideparams: {
|
||||
visible: false,
|
||||
title: "新建账套",
|
||||
|
|
@ -51,9 +53,21 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { searchVal, doSearch, slideparams } = this.state;
|
||||
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showOperateBtn } = taxAgentStore;
|
||||
const btns = [
|
||||
|
|
@ -65,19 +79,27 @@ class Index extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="薪资账套" className="ledgerOuter"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
title="薪资账套" className="ledgerOuter" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="ledgerWrapper">
|
||||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}/>
|
||||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<LedgerSlide
|
||||
{...slideparams}
|
||||
onCancel={this.handleResetLedger}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarysob" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.ledgerOuter {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
span:nth-child(2) {
|
||||
& > span:nth-child(2) {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import { mySalaryBillList, mySalaryBillList4Card } from "../../../../apis/mySalaryBenefits";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -83,9 +84,22 @@ class Index extends Component {
|
|||
dataIndex: "options",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (<a
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/mySalary/${record.id}`}
|
||||
target="_blank">{getLabel(33564, "查看")}</a>)
|
||||
render: (_, record) => (<React.Fragment>
|
||||
<a style={{ marginRight: 10 }}
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/mySalary/${record.id}`}
|
||||
target="_blank">{getLabel(33564, "查看")}</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>)
|
||||
}]}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
|||
import Payroll from "./components/payrollTable";
|
||||
import SalaryAdjustmentRecords from "./components/SalaryAdjustmentRecords";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import Authority from "../mySalary/authority";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -18,20 +21,40 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "1",
|
||||
selectedKey: "0", sysinfo: {}, tabs: [], store: { loading: false, hasRight: false },
|
||||
logDialogVisible: false, filterConditions: "[]",
|
||||
salaryYearMonth: [
|
||||
moment().subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment().subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment().endOf("year").format("YYYY-MM")
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
||||
let tabs = [
|
||||
{ key: "1", title: getLabel(111, "工资单") },
|
||||
{ key: "2", title: getLabel(543150, "调薪记录") }
|
||||
];
|
||||
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
||||
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
||||
this.setState({ sysinfo, tabs }, () => {
|
||||
const { tabs, store } = this.state;
|
||||
this.setState({
|
||||
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
||||
store: { ...store, hasRight: !_.isEmpty(tabs) }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
renderContent = () => {
|
||||
const { selectedKey, salaryYearMonth } = this.state;
|
||||
let Dom = null;
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
Dom = <Payroll salaryYearMonth={salaryYearMonth}/>;
|
||||
Dom = <Payroll salaryYearMonth={salaryYearMonth}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>;
|
||||
break;
|
||||
case "2":
|
||||
Dom = <SalaryAdjustmentRecords/>;
|
||||
|
|
@ -41,13 +64,21 @@ class Index extends Component {
|
|||
}
|
||||
return Dom;
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryYearMonth } = this.state;
|
||||
const tabs = [
|
||||
{ key: "1", title: getLabel(111, "工资单") },
|
||||
{ key: "2", title: getLabel(543150, "调薪记录") }
|
||||
];
|
||||
const { selectedKey, salaryYearMonth, tabs, logDialogVisible, filterConditions } = this.state;
|
||||
const btns = [
|
||||
<div className="flex-salary">
|
||||
<div className="mysalary-search-title">{getLabel(542604, "薪资所属月")}</div>
|
||||
|
|
@ -55,15 +86,29 @@ class Index extends Component {
|
|||
onChange={v => this.setState({ salaryYearMonth: v })}/>
|
||||
</div>
|
||||
];
|
||||
const logFunction = selectedKey === "1" ? "mysalarybill" : "myadjustrecord";
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(537998, "我的薪资福利")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="mySalary_wrapper"
|
||||
buttons={selectedKey === "1" ? btns : []} buttonSpace={10} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
>
|
||||
{this.renderContent()}
|
||||
</WeaReqTop>
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={{ ...this.state.store }}>
|
||||
<WeaReqTop
|
||||
title={getLabel(537998, "我的薪资福利")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="mySalary_wrapper"
|
||||
buttons={selectedKey === "1" ? btns : []} buttonSpace={10} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
{this.renderContent()}
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={logFunction} filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
</Authority>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,8 +70,15 @@ class TemplateBaseSettings extends Component {
|
|||
};
|
||||
salaryBillBaseSetSave = () => {
|
||||
const { watermark, watermarkStatus, wmSetting, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
|
||||
const { feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
|
||||
if (!feedBackUrl || !mobileFeedbackUrl) {
|
||||
const { feedBackUrl, mobileFeedbackUrl, feedbackStatus, autoAckDays, ackStatus } = ackFeedbackSetting;
|
||||
if (ackStatus === "1" && _.isNil(autoAckDays)) {
|
||||
Modal.warning({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (feedbackStatus === "1" && (!feedBackUrl || !mobileFeedbackUrl)) {
|
||||
Modal.warning({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "必要信息不完整,红色*为必填项!")
|
||||
|
|
|
|||
|
|
@ -109,6 +109,9 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(id, params.record.id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -143,7 +146,8 @@ class Index extends Component {
|
|||
"删除待办": getLabel(543181, "删除待办"), "查看": getLabel(33564, "查看"),
|
||||
"取消停薪": getLabel(543309, "取消停薪"), "共": getLabel(18609, "共"),
|
||||
"条": getLabel(18256, "条"), "设为发薪人员": getLabel(543308, "设为发薪人员"),
|
||||
"停薪": getLabel(542692, "停薪"), "编辑": getLabel(501169, "编辑")
|
||||
"停薪": getLabel(542692, "停薪"), "编辑": getLabel(501169, "编辑"),
|
||||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
|
|
|
|||
|
|
@ -115,6 +115,10 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
|||
key: "custom_cols",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(32535, "显示列定制")
|
||||
}, {
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}];
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import SalaryFileList from "./components/salaryFileList";
|
|||
import * as API from "../../apis/payrollFiles";
|
||||
import { sysinfo } from "../../apis/ruleconfig";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ class SalaryFiles extends Component {
|
|||
selectedKey: "pending", showSearchAd: false, isQuery: false, showDelSalaryFileBtn: false,
|
||||
topTabCount: { PENDING: 0, FIXED: 0, SUSPEND: 0, STOP: 0, EXT: 0 }, showExtEmpsWitch: false,
|
||||
salaryFileImpDialog: { visible: false, title: getLabel(24023, "数据导入"), importType: "", isExtEmp: false },
|
||||
salaryImportTypes: []
|
||||
salaryImportTypes: [], logDialogVisible: false, filterConditions: ""
|
||||
};
|
||||
this.salaryFileListRef = null;
|
||||
}
|
||||
|
|
@ -48,9 +49,15 @@ class SalaryFiles extends Component {
|
|||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||
onDropMenuClick = (key) => {
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
case "custom_cols":
|
||||
const { payrollFilesStore: { tableStore } } = this.props;
|
||||
tableStore.setColSetVisible(true);
|
||||
|
|
@ -232,7 +239,7 @@ class SalaryFiles extends Component {
|
|||
render() {
|
||||
const {
|
||||
selectedKey, topTabCount, showSearchAd, isQuery, showDelSalaryFileBtn, showExtEmpsWitch,
|
||||
salaryFileImpDialog, salaryImportTypes
|
||||
salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return (
|
||||
|
|
@ -263,7 +270,11 @@ class SalaryFiles extends Component {
|
|||
selectedKey={selectedKey} showOperateBtn={showOperateBtn}
|
||||
showDelSalaryFileBtn={showDelSalaryFileBtn}
|
||||
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salaryarchive" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/* 导入*/}
|
||||
<SalaryFileImportDialog {...salaryFileImpDialog}
|
||||
onCancel={(isFresh) => {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Index extends Component {
|
|||
<div className="salarySobNameTagWrapper">
|
||||
{
|
||||
salaryAcctType === 1 &&
|
||||
<Tag color="yellow">补发</Tag>
|
||||
<Tag color="yellow">{getLabel(388064, "补发")}</Tag>
|
||||
}
|
||||
<Tag color="blue">{`${getLabel(15323, "第")}${acctTimes}${getLabel(18929, "次")}`}</Tag>
|
||||
</div>
|
||||
|
|
@ -90,6 +90,9 @@ class Index extends Component {
|
|||
message.warning(getLabel(543602, "请设置默认模板"));
|
||||
}
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(key, id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -140,11 +143,23 @@ class Index extends Component {
|
|||
style={{ marginRight: 10 }} target="_blank"
|
||||
>{getLabel(83110, "查看详情")}</a>
|
||||
}
|
||||
{
|
||||
sendNum === sendTotal && !showGrant &&
|
||||
<Dropdown
|
||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
{
|
||||
sendNum !== sendTotal && !showGrant &&
|
||||
<Dropdown
|
||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||
<Menu.Item key="template">{getLabel(543603, "更新模板")}</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(key, id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -165,6 +168,7 @@ class Index extends Component {
|
|||
<Dropdown
|
||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||
<Menu.Item key="del">{getLabel(535052, "删除")}</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,12 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.payrollStore.setHasBeenModify(false);
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".salary-payroll-main-page").classList.add("zIndex0-payroll-release");
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".salary-payroll-main-page").classList.remove("zIndex0-payroll-release");
|
||||
nextProps.payrollStore.setHasBeenModify(false);
|
||||
}
|
||||
}
|
||||
|
||||
save = async () => {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import TemplateQuery from "./components/reqQuery/templateQuery";
|
|||
import GrantTableList from "./components/grantTableList";
|
||||
import PayrollTemplateTableList from "./components/payrollTemplateTableList";
|
||||
import TemplateBaseSettings from "../payroll/templateBaseSettings";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { Button } from "antd";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
|
@ -28,10 +29,10 @@ class Index extends Component {
|
|||
queryParams: {
|
||||
salarySobId: "", name: "",
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}
|
||||
}, logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
this.templateRef = null;
|
||||
this.baseSetRef = null;
|
||||
|
|
@ -92,11 +93,13 @@ class Index extends Component {
|
|||
onUpdateTemp={(id) => this.setState({ selectedKey: "template" }, () => {
|
||||
this.templateRef.wrappedInstance.handleOpts({ key: "edit" }, { id });
|
||||
})}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>;
|
||||
break;
|
||||
case "template":
|
||||
dom = <PayrollTemplateTableList ref={dom => this.templateRef = dom} queryParams={queryParams}
|
||||
isRefresh={isRefresh} forceUpdate={() => this.forceUpdate()}/>;
|
||||
isRefresh={isRefresh} forceUpdate={() => this.forceUpdate()}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>;
|
||||
break;
|
||||
case "watermark":
|
||||
dom = <TemplateBaseSettings
|
||||
|
|
@ -109,9 +112,21 @@ class Index extends Component {
|
|||
}
|
||||
return dom;
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, queryParams } = this.state;
|
||||
const { selectedKey, queryParams, logDialogVisible, filterConditions } = this.state;
|
||||
const tabs = [
|
||||
{ key: "grant", title: getLabel(538012, "工资单发放") },
|
||||
{ key: "template", title: getLabel(543575, "工资单模板设置") },
|
||||
|
|
@ -126,9 +141,19 @@ class Index extends Component {
|
|||
selectedKey: key,
|
||||
queryParams: { ...queryParams, name: "", salarySobId: "" }
|
||||
})}
|
||||
buttons={this.renderReqBtns()}
|
||||
buttons={this.renderReqBtns()} showDropIcon={selectedKey !== "watermark"}
|
||||
onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="salary-payroll-content">{this.renderContent()}</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "grant" ? "salarysend" : "salarytemplate"}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })} filterConditions={filterConditions}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
.zIndex0-payroll-release {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.salary-payroll-main-page {
|
||||
min-width: 1000px;
|
||||
overflow: auto;
|
||||
|
|
@ -14,10 +20,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||
right: 16px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,19 @@ export const condition = [
|
|||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
checkbox: false,
|
||||
checkboxValue: false,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["salarySob"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(538010, "薪资账套"),
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import {
|
|||
} from "../../../apis/statistics";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||
import { getPayrollTemplateLedgerList } from "../../../apis/payroll";
|
||||
import { condition } from "./condition";
|
||||
import cs from "classnames";
|
||||
import "../index.less";
|
||||
|
|
@ -68,7 +69,8 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
getTaxAgentSelectList = (props) => {
|
||||
getTaxAgentSelectList = async (props) => {
|
||||
const { data: salarySobList } = await getPayrollTemplateLedgerList();
|
||||
getTaxAgentSelectList(true).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const conditions = _.map(condition, item => {
|
||||
|
|
@ -80,6 +82,11 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||
options: _.map(data, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
} else if (getKey(child) === "salarySob") {
|
||||
return {
|
||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||
options: _.map(salarySobList, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
return { ...child, viewAttr: props.isShare ? 1 : child.viewAttr };
|
||||
})
|
||||
|
|
@ -124,8 +131,9 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
const { salaryMonth, timeType, dataSource } = this.state;
|
||||
const { form, id, dimension, onClose } = this.props;
|
||||
const [salaryStartMonth, salaryEndMonth] = salaryMonth;
|
||||
const { department, employee, position, subCompany, taxAgent, ...extra } = form.getFormDatas();
|
||||
const { department, employee, position, subCompany, taxAgent, salarySob, ...extra } = form.getFormDatas();
|
||||
const { value, valueSpan } = taxAgent;
|
||||
const { value: sobValue, valueSpan: sobValueSpan } = salarySob;
|
||||
if (!salaryEndMonth || !salaryStartMonth) {
|
||||
this.refs.weaError.showError();
|
||||
return;
|
||||
|
|
@ -138,6 +146,10 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
// position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
|
||||
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
|
||||
taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
|
||||
salarySob: sobValue ? _.map(sobValue.split(","), (it, idx) => ({
|
||||
id: it,
|
||||
name: sobValueSpan.split(",")[idx]
|
||||
})) : [],
|
||||
items: dataSource,
|
||||
salaryEndMonth: salaryEndMonth + "-01",
|
||||
salaryStartMonth: salaryStartMonth + "-01"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,197 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["orderRule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(15512, "排序字段"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["ascOrDesc"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543351, "正序/倒序"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543356, "排序规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["rule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543352, "人员字段"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543357, "人员校验规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["OPEN_APPLICATION_ENCRYPT"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(526997, "加密设置"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543358, "加密规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["taxDeclarationFunction"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "系统算税"),
|
||||
labelcol: 8,
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["WITHDRAW_TAX_DECLARATION"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "撤回申报表"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "算税规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["salaryArchiveDelete"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "允许删除档案"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(538004, "薪资档案"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseDiffByPerAndCom"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "区分个人和公司"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseAutoAdjust"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "导入基数自动调整上/下限"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "福利档案基数"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["matchRule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "匹配规则"),
|
||||
options: [],
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算人员匹配规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["salaryAcctFixedColumns"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "固定数"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算固定列头数"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["extEmpsWitch"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "开启非系统人员"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "非系统人员"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["salaryShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示工资单页签"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["adjustShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示调薪记录页签"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["taxAgentShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "我的薪资福利设置"),
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const payloadList = [
|
||||
{ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.OrderRuleEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.AscOrDescEnum" },
|
||||
{ enumClass: "com.engine.salary.sys.enums.MatchEmployeeModeEnum" }
|
||||
];
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaSearchGroup } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
|
||||
export const renderRuleForm = (form, condition, onChange) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom">
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
||||
</WeaFormItem>),
|
||||
colSpan: 1,
|
||||
hide: fields.hide
|
||||
});
|
||||
});
|
||||
!_.isEmpty(items) && group.push(
|
||||
<WeaSearchGroup col={1} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
||||
title={c.title}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
|
|
@ -1,9 +1,44 @@
|
|||
.ruleWrapper {
|
||||
height: 100%;
|
||||
.ruleWrapper-layout {
|
||||
.wea-new-top-content {
|
||||
overflow: hidden !important;
|
||||
|
||||
.titleWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.ruleWrapper {
|
||||
padding: 16px;
|
||||
background: #e5e5e5;
|
||||
height: 100%;
|
||||
overflow: hidden auto;
|
||||
|
||||
.wea-search-group {
|
||||
background: #fff;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.wea-content {
|
||||
padding: 8px !important;
|
||||
|
||||
.wea-form-cell:not(:last-child) {
|
||||
.wea-form-item {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
|
||||
.wea-form-item-label {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-form-cell-wrapper {
|
||||
background: #FFF;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,312 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 规则配置
|
||||
* Description:
|
||||
* Date: 2024/2/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import { conditions, payloadList } from "./conditions";
|
||||
import { renderRuleForm } from "./form";
|
||||
import { getConditionDomkeys } from "../../util";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
class RuleConfig extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const promise = this.init();
|
||||
}
|
||||
|
||||
init = async () => {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const [{ data: matchRule }, { data: orderRule }, { data: ascOrDesc }, { data: rule }] =
|
||||
await Promise.all(_.map(payloadList, it => API.commonEnumList(it)));
|
||||
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
|
||||
this.setState({
|
||||
sysinfo, conditions: _.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
|
||||
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
||||
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
||||
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, async () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
form.initFormFields(this.state.conditions);
|
||||
await this.updateFormData();
|
||||
});
|
||||
};
|
||||
updateFormData = async () => {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
_.map(getConditionDomkeys(this.state.conditions), item => {
|
||||
if (item === "rule") {
|
||||
form.updateFields({ [item]: { value: sysinfo["matchEmployeeMode"] || "" } });
|
||||
} else if (item === "matchRule") {
|
||||
form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } });
|
||||
} else if (item === "taxDeclarationFunction") {
|
||||
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
|
||||
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
|
||||
} else {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] || "" } });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChange = (params) => {
|
||||
const key = _.keys(params)[0];
|
||||
const val = params[key].value;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: (key === "taxDeclarationFunction" && val === "0") ? getLabel(544276, "关闭之后,将无法开启,确认要保存吗?") : getLabel(543854, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
switch (key) {
|
||||
case "orderRule":
|
||||
case "ascOrDesc":
|
||||
this.updateOrderRule();
|
||||
break;
|
||||
case "rule":
|
||||
this.saveMatchEmployeeModeRule();
|
||||
break;
|
||||
case "OPEN_APPLICATION_ENCRYPT":
|
||||
this.saveEncryptSetting();
|
||||
break;
|
||||
case "taxDeclarationFunction":
|
||||
this.operateTaxDeclarationFunction();
|
||||
break;
|
||||
case "matchRule":
|
||||
this.saveSalaryAcctEmployeeRule();
|
||||
break;
|
||||
case "WITHDRAW_TAX_DECLARATION":
|
||||
case "salaryArchiveDelete":
|
||||
const url = {
|
||||
WITHDRAW_TAX_DECLARATION: "saveWithDrawTaxDeclaration", salaryArchiveDelete: "saveArchiveDelete"
|
||||
};
|
||||
this.ruleSettings(key, url[key]);
|
||||
break;
|
||||
case "welBaseDiffByPerAndCom":
|
||||
case "welBaseAutoAdjust":
|
||||
case "salaryAcctFixedColumns":
|
||||
case "extEmpsWitch":
|
||||
case "taxAgentShowStatus":
|
||||
case "salaryShowStatus":
|
||||
case "adjustShowStatus":
|
||||
const confTitle = {
|
||||
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
|
||||
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
||||
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
|
||||
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
||||
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
||||
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
||||
};
|
||||
this.unifiedSettings(key, confTitle[key]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
onCancel: () => this.updateFormData()
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:排序规则-保存
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
updateOrderRule = () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { orderRule, ascOrDesc } = form.getFormParams();
|
||||
API.updateOrderRule({ orderRule, ascOrDesc }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 人员校验规则-人员字段保存
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
saveMatchEmployeeModeRule = () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { rule } = form.getFormParams();
|
||||
API.saveMatchEmployeeModeRule({ rule }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 薪资核算人员匹配规则-匹配规则
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
saveSalaryAcctEmployeeRule = () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { matchRule: rule } = form.getFormParams();
|
||||
API.saveSalaryAcctEmployeeRule({ rule }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 算税规则-系统算税设置
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
operateTaxDeclarationFunction = () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { taxDeclarationFunction: operateTaxDeclaration } = form.getFormParams();
|
||||
API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 加密设置
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
saveEncryptSetting = () => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { OPEN_APPLICATION_ENCRYPT: isOpenEncrypt } = form.getFormParams();
|
||||
API.saveEncryptSetting({ isOpenEncrypt }).then(({ data, status, errormsg }) => {
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if (!isSuccess) {
|
||||
message.error(errormsg || msg || getLabel(22620, "保存失败!"));
|
||||
return;
|
||||
}
|
||||
this.setState({ progressVisible: true, progress: 0 }, () => {
|
||||
let number = 1;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
const { progress_statue } = data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else if (progress_statue === "in_progress" && this.timer) {
|
||||
if (this.state.progress >= 90) {
|
||||
this.setState({
|
||||
progress: this.state.progress + (0.001 * this.state.progress)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, () => number++);
|
||||
}
|
||||
} else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 规则设置
|
||||
* Params:
|
||||
* Date: 2024/2/26
|
||||
*/
|
||||
ruleSettings = (key, urlName) => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const payload = { confValue: form.getFormParams()[key] };
|
||||
API[urlName](payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
unifiedSettings = (confKey, confTitle) => {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
let payload = {
|
||||
confKey, confValue: form.getFormParams()[confKey],
|
||||
module: "basic", title: confTitle
|
||||
};
|
||||
API.saveSysOperate(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { conditions, progressVisible, progress } = this.state;
|
||||
return (
|
||||
<WeaTop
|
||||
title={<span>{getLabel(543355, "规则配置")}</span>} icon={<i className="icon-coms-Flow-setting"/>}
|
||||
iconBgcolor="#F14A2D" buttons={[]} className="ruleWrapper-layout"
|
||||
>
|
||||
<div className="ruleWrapper">{renderRuleForm(form, conditions, this.handleChange)}</div>
|
||||
{/*加解密进度条*/}
|
||||
{
|
||||
progressVisible &&
|
||||
<ProgressModal title={getLabel(543360, "加密/解密中...")} visible={progressVisible} progress={progress}
|
||||
onCancel={() => this.setState({ progressVisible: false, progress: 0 })}/>
|
||||
}
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default RuleConfig;
|
||||
|
|
@ -11,6 +11,7 @@ import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
|||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
|
||||
import "../socialSecurityBenefits/programme/index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
|
||||
|
|
@ -27,7 +28,8 @@ export default class SalaryItem extends React.Component {
|
|||
formalModalVisible: false,
|
||||
searchParams: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [],
|
||||
syncSalarySetDialog: { visible: false, title: "", id: "" }
|
||||
syncSalarySetDialog: { visible: false, title: "", id: "" },
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
columns.map(item => {
|
||||
if (item.dataIndex == "refere") {
|
||||
|
|
@ -130,7 +132,7 @@ export default class SalaryItem extends React.Component {
|
|||
columns.push({
|
||||
key: "operate",
|
||||
title: "操作",
|
||||
width: 120,
|
||||
width: 185,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
@ -142,6 +144,17 @@ export default class SalaryItem extends React.Component {
|
|||
onClick={() => this.handleDeleteItem(record)}
|
||||
>{getLabel(535052, "删除")}</a>
|
||||
}
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
@ -191,6 +204,20 @@ export default class SalaryItem extends React.Component {
|
|||
getTableDatas({ ...searchParams });
|
||||
}
|
||||
|
||||
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
salaryItemStore,
|
||||
|
|
@ -198,7 +225,7 @@ export default class SalaryItem extends React.Component {
|
|||
taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
|
||||
} = this.props;
|
||||
const { userStatusList } = salaryFileStore;
|
||||
const { selectedRowKeys } = this.state;
|
||||
const { selectedRowKeys, logDialogVisible, filterConditions } = this.state;
|
||||
const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
|
||||
const {
|
||||
tableDataSource,
|
||||
|
|
@ -342,11 +369,14 @@ export default class SalaryItem extends React.Component {
|
|||
};
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
<WeaTop
|
||||
title="薪资项目管理"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
<WeaTop title="薪资项目管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<CustomTab searchOperationItem={renderRightOperation()}/>
|
||||
<div className="tableWrapper">
|
||||
|
|
@ -387,7 +417,9 @@ export default class SalaryItem extends React.Component {
|
|||
}
|
||||
})}
|
||||
/>
|
||||
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salaryitem" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{
|
||||
systemItemVisible &&
|
||||
<SystemSalaryItemModal
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ class WelfareRecordList extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(id, params.id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -117,7 +120,7 @@ class WelfareRecordList extends Component {
|
|||
"未归档": getLabel(17999, "未归档"), "操作": getLabel(30585, "操作"),
|
||||
"核算": getLabel(538780, "核算"), "归档": getLabel(251, "归档"),
|
||||
"查看": getLabel(33564, "查看"), "重新核算": getLabel(542637, "重新核算"),
|
||||
"删除": getLabel(535052, "删除")
|
||||
"删除": getLabel(535052, "删除"), "操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import WelfareRecordList from "./components/welfareRecordList";
|
|||
import Accountdialog from "./components/accountDialog";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -32,7 +33,8 @@ class StandingBook extends Component {
|
|||
endTime: moment(new Date()).endOf("year").format("YYYY-MM"),
|
||||
taxAgents: ""
|
||||
}, progressVisible: false, progress: 0,
|
||||
accountDialog: { visible: false, title: "", loading: false, options: [] }
|
||||
accountDialog: { visible: false, title: "", loading: false, options: [] },
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
this.wfListRef = null;
|
||||
this.timer = null;
|
||||
|
|
@ -102,9 +104,21 @@ class StandingBook extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { accountDialog, queryForm } = this.state;
|
||||
const { accountDialog, queryForm, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const rightBtns = [<Button type="primary" onClick={() => this.setState({
|
||||
accountDialog: { ...accountDialog, visible: true, title: getLabel(538780, "核算") }
|
||||
|
|
@ -112,7 +126,15 @@ class StandingBook extends Component {
|
|||
return (
|
||||
<div className="salary-welfare-record">
|
||||
<WeaTop title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}>
|
||||
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="salary-welfare-record-content">
|
||||
<WelfareRecordQuery
|
||||
onSearch={(payload) => {
|
||||
|
|
@ -122,13 +144,17 @@ class StandingBook extends Component {
|
|||
}}
|
||||
onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })}
|
||||
/>
|
||||
<WelfareRecordList ref={dom => this.wfListRef = dom} queryForm={queryForm}/>
|
||||
<WelfareRecordList ref={dom => this.wfListRef = dom} queryForm={queryForm}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
</div>
|
||||
<Accountdialog {...accountDialog}
|
||||
onCancel={() => this.setState({
|
||||
accountDialog: { ...accountDialog, visible: false, title: "", loading: false }
|
||||
})} onOk={this.handleAccount}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="siAccount" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/*核算进度条*/}
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 社保福利台账-核算-导入表头设置
|
||||
* Description:
|
||||
* Date: 2024/3/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, Col, Row } from "antd";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class ImportHeaderSetDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [], showOnlyChecked: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({ itemsCheckeds: nextProps.selectItems });
|
||||
} else {
|
||||
this.setState({ itemsCheckeds: [], showOnlyChecked: false });
|
||||
}
|
||||
}
|
||||
|
||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||
handleSelectAll = (checked) => {
|
||||
const { itemsByGroup } = this.props;
|
||||
if (checked === "1") {
|
||||
this.setState({ itemsCheckeds: _.map(itemsByGroup, it => it.fieldId) });
|
||||
} else {
|
||||
this.setState({ itemsCheckeds: [] });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showOnlyChecked, itemsCheckeds } = this.state;
|
||||
const { itemsByGroup } = this.props;
|
||||
let dataSource = _.map(itemsByGroup, it => {
|
||||
return { ...it, checked: itemsCheckeds.includes(it.fieldId) };
|
||||
});
|
||||
if (showOnlyChecked) {
|
||||
dataSource = _.filter(dataSource, it => !!it.checked);
|
||||
}
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll initLoadCss
|
||||
scalable title={getLabel(111, "添加表头字段")}
|
||||
style={{ width: 700, height: 484 }} className="headerSetWrapper"
|
||||
buttons={[
|
||||
<Button type="primary" onClick={() => this.props.onAdd(itemsCheckeds)}>{getLabel(111, "添加")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
|
||||
]}
|
||||
bottomLeft={
|
||||
<React.Fragment>
|
||||
<WeaCheckbox content={getLabel(111, "只显示已选中字段")}
|
||||
onChange={this.handleShowOnlyChecked}/>
|
||||
<WeaCheckbox content={getLabel(111, "全部选中")} style={{ marginLeft: 10 }}
|
||||
onChange={this.handleSelectAll}/>
|
||||
</React.Fragment>
|
||||
}
|
||||
>
|
||||
{
|
||||
<Row gutter={16}>
|
||||
{
|
||||
!_.isEmpty(dataSource) ?
|
||||
_.map(dataSource, it => {
|
||||
const { fieldId, salaryItemName, checked } = it;
|
||||
return <Col span={8} style={{ marginBottom: 16 }}>
|
||||
<WeaCheckbox content={salaryItemName} value={checked ? "1" : "0"}
|
||||
onChange={() => this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [fieldId], _.isEqual) })}/>
|
||||
</Col>;
|
||||
}) : <Col span={24} style={{ minHeight: 20, padding: "5%", textAlign: "center" }}>暂无数据</Col>
|
||||
}
|
||||
</Row>
|
||||
}
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ImportHeaderSetDialog;
|
||||
|
|
@ -290,3 +290,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//导入头部设置
|
||||
.headerSetWrapper {
|
||||
.ant-modal-body {
|
||||
.ant-row {
|
||||
padding: 16px 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-col-8 {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
padding: 8px 16px 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,15 +13,23 @@ import * as API from "../../../../apis/standingBook";
|
|||
import { calcPageNo } from "../../../../util";
|
||||
import RegList from "./regList";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
import AddCompensationPersonnelDialog from "./addCompensationPersonnelDialog";
|
||||
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
|
||||
import "./index.less";
|
||||
|
||||
class MakeupDifference extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectKey: [], fieldData: {}, loading: { save: false }, importDiffModal: { visible: false },
|
||||
selectKey: [], loading: { save: false },
|
||||
importDiffModal: {
|
||||
visible: false,
|
||||
fieldUrl: "getBalanceWelfareList",
|
||||
tmpUrl: "exportSiaccountWelfarebalanceimporttemplatetetemplate",
|
||||
cacheUrl: "cacheBalanceWelfareList",
|
||||
importUrl: "importBalanceInsuranceDetail",
|
||||
importparams: {}
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "", editId: "", visible: false
|
||||
},
|
||||
|
|
@ -65,7 +73,12 @@ class MakeupDifference extends Component {
|
|||
});
|
||||
break;
|
||||
case "import":
|
||||
this.setState({ importDiffModal: { ...importDiffModal, visible: true } });
|
||||
this.setState({
|
||||
importDiffModal: {
|
||||
...importDiffModal, visible: true,
|
||||
importparams: { billMonth: getQueryString("billMonth") }
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "export":
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/balance/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
|
|
@ -103,7 +116,7 @@ class MakeupDifference extends Component {
|
|||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const { selectKey, importDiffModal, fieldData, returnEditPersonSlide, addPersonalDialog } = this.state;
|
||||
const { selectKey, importDiffModal, returnEditPersonSlide, addPersonalDialog } = this.state;
|
||||
return (
|
||||
<div className="differenceWrapper">
|
||||
<RegTop
|
||||
|
|
@ -133,22 +146,10 @@ class MakeupDifference extends Component {
|
|||
}, () => isRefresh && this.diffListRef.recessionList())}
|
||||
/>
|
||||
{/*导入补差*/}
|
||||
{
|
||||
importDiffModal.visible &&
|
||||
<AcctResultImportModal
|
||||
visiable={importDiffModal.visible}
|
||||
fieldData={fieldData}
|
||||
onAdd={fieldData => this.setState({ fieldData })}
|
||||
onCancel={() => {
|
||||
this.setState({ importDiffModal: { ...importDiffModal, visible: false }, fieldData: {} }, () => {
|
||||
const name = this.regTopRef.state.name;
|
||||
this.diffListRef.recessionList({ userName: name });
|
||||
});
|
||||
}}
|
||||
isStandingBook
|
||||
standingBookType="difference"
|
||||
/>
|
||||
}
|
||||
<StandingBookCalcImportDialog {...importDiffModal}
|
||||
onCancel={(isInit) => this.setState({
|
||||
importDiffModal: { ...importDiffModal, visible: false }
|
||||
}, () => isInit && this.diffListRef.recessionList())}/>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { WeaFormItem, WeaInput, WeaSearchGroup, WeaTab } from "ecCom";
|
|||
import { calcPageNo } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
|
||||
import AdjustmentSlide from "./adjustmentSlide";
|
||||
import { getCalculateProgress } from "../../../../apis/calculate";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
|
|
@ -48,7 +48,8 @@ export default class NormalIndex extends Component {
|
|||
progress: 0,
|
||||
fieldData: {}, //选中的表单头信息
|
||||
importParams: { //导入信息的弹框表示
|
||||
visible: false
|
||||
visible: false, fieldUrl: "getWelfareList", tmpUrl: "exportSiaccountWelfareImporttemplate",
|
||||
cacheUrl: "cacheWelfareListField", importUrl: "importInsuranceAcctDetail", importparams: {}
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "",
|
||||
|
|
@ -473,7 +474,12 @@ export default class NormalIndex extends Component {
|
|||
];
|
||||
const btn4 = [
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}>导入数据</Button>
|
||||
onClick={() => this.setState({
|
||||
importParams: {
|
||||
...importParams, visible: true,
|
||||
tmpUrl: selectedKey === "1" ? "exportSiaccountWelfareImporttemplate" : "exportSiaccountWelfaresupplyimporttemplatetemplate"
|
||||
}
|
||||
})}>导入数据</Button>
|
||||
];
|
||||
const btn5 = [
|
||||
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
|
||||
|
|
@ -544,29 +550,10 @@ export default class NormalIndex extends Component {
|
|||
progress={this.state.progress}
|
||||
/>
|
||||
{/*导入弹框*/}
|
||||
{
|
||||
importParams.visible &&
|
||||
<AcctResultImportModal
|
||||
visiable={importParams.visible}
|
||||
fieldData={this.state.fieldData}
|
||||
onAdd={fieldData => {
|
||||
this.setState({
|
||||
fieldData
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { current } = this.state;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
});
|
||||
}}
|
||||
isStandingBook
|
||||
standingBookTabKey={selectedKey}
|
||||
/>
|
||||
}
|
||||
<StandingBookCalcImportDialog {...importParams}
|
||||
onCancel={(isInit) => this.setState({
|
||||
importParams: { ...importParams, visible: false }
|
||||
}, () => isInit && this.handleSearch())}/>
|
||||
{/* table */}
|
||||
<div className="tableWrapper">
|
||||
<Spin spinning={loading}>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 社保福利台账-核算-导入
|
||||
* Description:
|
||||
* Date: 2024/3/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
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;
|
||||
|
||||
class StandingBookCalcImportDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
headerFieldsDialog: { visible: false, itemsByGroup: [], selectItems: [] },
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false,
|
||||
link: null, importResult: {}, imageId: "",
|
||||
previewUrl: "/api/bs/hrmsalary/siaccount/welfare/preview"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { fieldUrl } = nextProps;
|
||||
const { data } = await API[fieldUrl]();
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp, title: getLabel(24023, "数据导入")
|
||||
},
|
||||
headerFieldsDialog: {
|
||||
...this.state.headerFieldsDialog, itemsByGroup: data,
|
||||
selectItems: _.map(_.filter(data, k => k.checked), o => o.fieldId)
|
||||
}
|
||||
});
|
||||
}
|
||||
this.setState({ importDialog: { ...this.state.importDialog, visible: nextProps.visible } });
|
||||
}
|
||||
|
||||
handleImport = (payload) => {
|
||||
const { importDialog, headerFieldsDialog: { selectItems } } = this.state;
|
||||
if (_.isEmpty(selectItems)) {
|
||||
message.error(getLabel(111, "请选择表头字段"));
|
||||
} else {
|
||||
const { importUrl, importparams = {} } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
API[importUrl]({ ...payload, ...importparams }).then(({ data, status, errormsg }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
} else {
|
||||
message.warning(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
}
|
||||
};
|
||||
handleExportTemp = () => {
|
||||
const { tmpUrl } = 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)
|
||||
};
|
||||
const promise = API[tmpUrl](payload);
|
||||
}
|
||||
};
|
||||
handleSelectedField = () => {
|
||||
this.setState({
|
||||
headerFieldsDialog: {
|
||||
...this.state.headerFieldsDialog, visible: true
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:表单选项
|
||||
* Params:
|
||||
* Date: 2023/9/18
|
||||
*/
|
||||
renderFormComponent = () => {
|
||||
const { selectItems } = this.state.headerFieldsDialog;
|
||||
return <div style={{ padding: "8px 16px", border: "1px solid #e5e5e5", margin: "4px 0" }}>
|
||||
<Badge
|
||||
count={!_.isEmpty(selectItems) ? selectItems.length : 0}>
|
||||
<Button onClick={this.handleSelectedField}>{getLabel(111, "请选择表头字段")}</Button>
|
||||
</Badge>
|
||||
</div>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog, headerFieldsDialog } = this.state;
|
||||
const { cacheUrl } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ImportDialog
|
||||
{...importDialog} onCancel={this.props.onCancel}
|
||||
importParams={this.renderFormComponent()}
|
||||
onResetImportResult={() => this.setState(({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "" }
|
||||
}))}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
{/*表头设置*/}
|
||||
<ImportHeaderSetDialog {...headerFieldsDialog}
|
||||
onCancel={() => this.setState({
|
||||
headerFieldsDialog: { ...headerFieldsDialog, visible: false }
|
||||
})}
|
||||
onAdd={selectItems => this.setState({
|
||||
headerFieldsDialog: { ...headerFieldsDialog, visible: false, selectItems }
|
||||
}, () => {
|
||||
const { selectItems: welfareNames } = this.state.headerFieldsDialog;
|
||||
const promise = API[cacheUrl]({ welfareNames });
|
||||
})}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default StandingBookCalcImportDialog;
|
||||
|
|
@ -89,7 +89,7 @@ class Index extends Component {
|
|||
const scrollHeight = this.logRef ? this.logRef.state.height - 210 : 606.6;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} title={getLabel(111, "操作日志")}
|
||||
{...this.props} title={getLabel(111, "基数调整记录")}
|
||||
ref={dom => this.logRef = dom} className="logDialog" initLoadCss
|
||||
style={{
|
||||
width: 1150,
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ class Index extends Component {
|
|||
onOk: () => this.handleWelfareOpts(_.camelCase(id), [baseInfo])
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(id, baseInfo);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -231,7 +234,8 @@ class Index extends Component {
|
|||
"增员": getLabel(543180, "增员"), "删除档案": getLabel(23238, "删除档案"),
|
||||
"删除待办": getLabel(543181, "删除待办"), "减员": getLabel(543182, "减员"),
|
||||
"查看": getLabel(33564, "查看"), "取消停缴": getLabel(543183, "取消停缴"),
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条")
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
|
|
|
|||
|
|
@ -140,9 +140,13 @@ export const welfareTipList = [
|
|||
];
|
||||
export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
|
||||
let menus = [{
|
||||
key: "record",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(111, "基数调整记录")
|
||||
},{
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(111, "操作日志")
|
||||
content: getLabel(545781, "操作日志")
|
||||
}];
|
||||
if (showOperateBtn) {
|
||||
switch (selectedKey) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel"
|
|||
import WelfareTableList from "./components/welfareTableList";
|
||||
import WelfareArchivesImportDialog from "./components/welfareArchivesImportDialog";
|
||||
import WelfareTip from "./components/welfareTip";
|
||||
import LogDialog from "./components/logDialog";
|
||||
import RecordDialog from "./components/logDialog";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
import * as API from "../../../apis/welfareArchive";
|
||||
import { sysinfo } from "../../../apis/ruleconfig";
|
||||
import { optTypeEnum, renderDropMenuDatas, renderReqBtns, tabList, welfareTipList } from "./config";
|
||||
|
|
@ -35,7 +36,7 @@ class Index extends Component {
|
|||
selectedKey: "1", showSearchAd: false, isQuery: false, logDialogVisible: false,
|
||||
topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 },
|
||||
welfareImpDialog: { visible: false, title: getLabel(24023, "数据导入"), runStatuses: "" },
|
||||
showExtEmpsWitch: false
|
||||
showExtEmpsWitch: false, recordDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -57,6 +58,14 @@ class Index extends Component {
|
|||
};
|
||||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
handleImport = () => {
|
||||
this.setState({
|
||||
welfareImpDialog: {
|
||||
...this.state.welfareImpDialog, visible: true,
|
||||
runStatuses: this.state.selectedKey
|
||||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key) => {
|
||||
switch (key) {
|
||||
case "import":
|
||||
|
|
@ -84,8 +93,14 @@ class Index extends Component {
|
|||
case "exportSelected":
|
||||
this.handleExport(key);
|
||||
break;
|
||||
case "record":
|
||||
this.setState({ recordDialogVisible: true });
|
||||
break;
|
||||
case "log":
|
||||
this.setState({ logDialogVisible: true });
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -127,8 +142,8 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
selectedKey, topTabCount, showSearchAd, isQuery,
|
||||
logDialogVisible, welfareImpDialog, showExtEmpsWitch
|
||||
selectedKey, topTabCount, showSearchAd, isQuery, recordDialogVisible,
|
||||
logDialogVisible, filterConditions, welfareImpDialog, showExtEmpsWitch
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
|
||||
|
|
@ -159,11 +174,15 @@ class Index extends Component {
|
|||
<WelfareTableList isQuery={isQuery} ref={dom => this.welfareListRef = dom}
|
||||
runStatuses={selectedKey} showOperateBtn={showOperateBtn}
|
||||
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
{/*提示*/}
|
||||
{!_.isEmpty(tipList) && <WelfareTip dataSource={tipList}/>}
|
||||
{/*基数调整记录*/}
|
||||
<RecordDialog visible={recordDialogVisible} onCancel={() => this.setState({ recordDialogVisible: false })}/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
<LogDialog visible={logDialogVisible} logFunction="siArchives" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/* 导入*/}
|
||||
<WelfareArchivesImportDialog {...welfareImpDialog}
|
||||
onCancel={(isFresh) => {
|
||||
|
|
|
|||
|
|
@ -265,6 +265,10 @@ class Index extends Component {
|
|||
<a href="javascript:void(0)"
|
||||
onClick={() => this.handleOpts("delete", record)}>{getLabel(535052, "删除")}</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
|
|
@ -278,6 +282,17 @@ class Index extends Component {
|
|||
onClick={() => this.handleOpts("custom-edit", record)}>{getLabel(501169, "编辑")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.handleOpts("custom-delete", record)}>{getLabel(535052, "删除")}</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</div>)
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, logDialogVisible: false,
|
||||
customQuery: ""
|
||||
selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, customQuery: "",
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
this.welfarePlanListRef = null;
|
||||
}
|
||||
|
|
@ -48,10 +48,13 @@ class Index extends Component {
|
|||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = (customQuery = "") => this.setState({ isQuery: !this.state.isQuery, customQuery });
|
||||
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||
onDropMenuClick = (key) => {
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({ logDialogVisible: true });
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -60,7 +63,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { logDialogVisible, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
|
||||
const { logDialogVisible, filterConditions, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
|
||||
return (
|
||||
<div className="salary-welfare-plan-wrapper">
|
||||
<WeaReqTop
|
||||
|
|
@ -80,11 +83,12 @@ class Index extends Component {
|
|||
</div>
|
||||
{/*列表*/}
|
||||
<WelfarePlanList ref={dom => this.welfarePlanListRef = dom} customQuery={customQuery}
|
||||
selectedKey={selectedKey} isQuery={isQuery}/>
|
||||
selectedKey={selectedKey} isQuery={isQuery}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "CUSTOM" ? "siCategory" : "siScheme"}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
filterConditions={filterConditions} onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Col, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util";
|
||||
import EditModal from "./editModal";
|
||||
import TipLabel from "../../components/TipLabel";
|
||||
import { decentralizationConditions, editConditions } from "./editConditions";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
export default class TaxAgent extends React.Component {
|
||||
|
|
@ -30,7 +33,9 @@ export default class TaxAgent extends React.Component {
|
|||
conditions: editConditions,
|
||||
decentralizationConditions: decentralizationConditions,
|
||||
permission: {},
|
||||
syncLoading: false
|
||||
syncLoading: false,
|
||||
logDialogVisible: false,
|
||||
filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -282,6 +287,18 @@ export default class TaxAgent extends React.Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
|
|
@ -294,7 +311,9 @@ export default class TaxAgent extends React.Component {
|
|||
decentralizationConditions,
|
||||
permission,
|
||||
syncLoading,
|
||||
name
|
||||
name,
|
||||
logDialogVisible,
|
||||
filterConditions
|
||||
} = this.state;
|
||||
const {
|
||||
loading,
|
||||
|
|
@ -362,6 +381,17 @@ export default class TaxAgent extends React.Component {
|
|||
onClick={() => this.deleteTaxAgent(record.id)}>
|
||||
删除
|
||||
</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</div>
|
||||
}
|
||||
],
|
||||
|
|
@ -389,12 +419,15 @@ export default class TaxAgent extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="taxWithholdingAgentWrapper">
|
||||
<WeaTop
|
||||
title="个税扣缴义务人" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}
|
||||
showDropIcon={true}>
|
||||
<WeaTop title="个税扣缴义务人" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)} showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<Row
|
||||
gutter={16}
|
||||
style={{ overflow: "hidden", width: "100%", marginTop: 8 }}>
|
||||
|
|
@ -440,7 +473,9 @@ export default class TaxAgent extends React.Component {
|
|||
</Col>
|
||||
</Row>
|
||||
</WeaTop>
|
||||
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="taxagent" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{editModalProps.visible &&
|
||||
<EditModal
|
||||
{...editModalProps}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import { observable, action, toJS } from 'mobx';
|
||||
import { message } from 'antd';
|
||||
import { WeaForm, WeaLogView } from 'comsMobx';
|
||||
import { WeaLocaleProvider } from 'ecCom';
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaLogView } from "comsMobx";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
import * as API from '../apis'; // 引入API接口文件
|
||||
import * as API from "../apis"; // 引入API接口文件
|
||||
|
||||
const {LogStore} = WeaLogView;
|
||||
const { LogStore } = WeaLogView;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export class BaseFormStore {
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
@observable form = new WeaForm(); // 规则渲染form
|
||||
|
||||
@observable logStore = new LogStore();
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable saveLoading = false; // 保存状态处理:保证保存的时候接口只走一次
|
||||
|
|
@ -18,9 +19,9 @@ export class BaseFormStore {
|
|||
@observable logVisible = false; // 控制日志弹框的显影
|
||||
|
||||
@action // 初始化操作: 一般用来初始化获取后台数据
|
||||
doInit = () =>{
|
||||
doInit = () => {
|
||||
this.getBaseForm();
|
||||
}
|
||||
};
|
||||
|
||||
@action // 获得form配置数据
|
||||
getBaseForm = () => {
|
||||
|
|
@ -32,22 +33,22 @@ export class BaseFormStore {
|
|||
this.form.initFormFields(result.condition);
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
@action // 保存
|
||||
saveForm = () => {
|
||||
this.form.validateForm().then(action(f=>{ // 表单的校验: 直接使用form的validateForm方法即可
|
||||
this.form.validateForm().then(action(f => { // 表单的校验: 直接使用form的validateForm方法即可
|
||||
if (f.isValid) { // 校验听过: 走保存接口
|
||||
this.saveLoading = true;
|
||||
const params = this.form.getFormParams();
|
||||
API.saveForm(params).then(action(
|
||||
result => {
|
||||
this.saveLoading = false
|
||||
if(result.api_status){ // 保存成功: 1、给出提示 2、刷新form数据
|
||||
message.success(`${getLabel(18758,'保存成功')}`);
|
||||
this.saveLoading = false;
|
||||
if (result.api_status) { // 保存成功: 1、给出提示 2、刷新form数据
|
||||
message.success(`${getLabel(18758, "保存成功")}`);
|
||||
this.getBaseForm();
|
||||
}else {
|
||||
message.error(`${getLabel(22620,'保存失败')}`);
|
||||
} else {
|
||||
message.error(`${getLabel(22620, "保存失败")}`);
|
||||
}
|
||||
}
|
||||
));
|
||||
|
|
@ -55,9 +56,9 @@ export class BaseFormStore {
|
|||
f.showErrors();
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
setLogVisible = bool => this.logVisible = bool
|
||||
|
||||
}
|
||||
setLogVisible = bool => this.logVisible = bool;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue