Compare commits
25 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
65659c5990 | |
|
|
680c4a0506 | |
|
|
5e5e109b7e | |
|
|
efb5af1b10 | |
|
|
915e946c3e | |
|
|
ff1da8b19b | |
|
|
5ef2c5ecb4 | |
|
|
5f80e9e6b3 | |
|
|
2b39980ed0 | |
|
|
2321266533 | |
|
|
3d8b242889 | |
|
|
2871043810 | |
|
|
0ec1cd1cb1 | |
|
|
c356c4f0db | |
|
|
2b639ad388 | |
|
|
07c40750da | |
|
|
a4c08b937b | |
|
|
9e26192aa2 | |
|
|
d540698c57 | |
|
|
e539f7b040 | |
|
|
e9d301927f | |
|
|
dee1059ca7 | |
|
|
9a50947d8a | |
|
|
d652b2cdc6 | |
|
|
51ac08d6fc |
|
|
@ -1,46 +0,0 @@
|
||||||
import { WeaTools } from "ecCom";
|
|
||||||
import { postFetch } from "../util/request";
|
|
||||||
// 推送配置列表
|
|
||||||
export const getPushSettingList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/setting/list", params);
|
|
||||||
};
|
|
||||||
// 保存推送配置
|
|
||||||
export const savePushSetting = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/setting/save", params);
|
|
||||||
};
|
|
||||||
// 删除推送配置
|
|
||||||
export const deletePushSetting = (params) => {
|
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/push/setting/delete", "GET", params);
|
|
||||||
};
|
|
||||||
// 推送配置明细列表
|
|
||||||
export const getPushItemList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/item/list", params);
|
|
||||||
};
|
|
||||||
// 保存推送配置明细
|
|
||||||
export const savePushItemList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/item/save", params);
|
|
||||||
};
|
|
||||||
// 删除推送配置明细
|
|
||||||
export const deletePushItemList = (params) => {
|
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
|
|
||||||
};
|
|
||||||
// 推送记录列表
|
|
||||||
export const getPushRecordList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/record/list", params);
|
|
||||||
};
|
|
||||||
// 推送记录详细列表
|
|
||||||
export const getPushRecordDetail = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/record/detail", params);
|
|
||||||
};
|
|
||||||
// 推送记录-推送
|
|
||||||
export const pushRecords = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/record/push", params);
|
|
||||||
};
|
|
||||||
// 推送记录-撤回
|
|
||||||
export const withdrawRecords = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/record/withdraw", params);
|
|
||||||
};
|
|
||||||
//创建推送记录
|
|
||||||
export const createPushRecords = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/push/record/create", params);
|
|
||||||
};
|
|
||||||
|
|
@ -15,18 +15,10 @@ export const getTabList = (params) => {
|
||||||
export const getNormalList = (params) => {
|
export const getNormalList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
|
||||||
};
|
};
|
||||||
//社会福利台账-获取正常缴纳列表合计行
|
|
||||||
export const getNormalListSum = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", params);
|
|
||||||
};
|
|
||||||
//社会福利台账-获取补缴列表
|
//社会福利台账-获取补缴列表
|
||||||
export const getSupplementaryList = (params) => {
|
export const getSupplementaryList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
|
||||||
};
|
};
|
||||||
//社会福利台账-获取补缴列表合计
|
|
||||||
export const getSupplementaryListSum = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", params);
|
|
||||||
};
|
|
||||||
|
|
||||||
//社会福利台账-获取总览列表
|
//社会福利台账-获取总览列表
|
||||||
export const getOverViewList = (params) => {
|
export const getOverViewList = (params) => {
|
||||||
|
|
@ -130,18 +122,10 @@ export const saveRecession = (params) => {
|
||||||
export const recessionList = (params) => {
|
export const recessionList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||||
};
|
};
|
||||||
//查询退差列表合计行
|
|
||||||
export const recessionListSum = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", params);
|
|
||||||
};
|
|
||||||
//查询补差列表
|
//查询补差列表
|
||||||
export const balanceList = (params) => {
|
export const balanceList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||||
};
|
};
|
||||||
//查询补差列表合计行
|
|
||||||
export const balanceListSum = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", params);
|
|
||||||
};
|
|
||||||
//删除退差数据
|
//删除退差数据
|
||||||
export const delRecession = (params) => {
|
export const delRecession = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
||||||
|
|
@ -221,11 +205,3 @@ export const cacheWelfareListField = (params) => {
|
||||||
export const cacheBalanceWelfareList = (params) => {
|
export const cacheBalanceWelfareList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
|
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
|
||||||
};
|
};
|
||||||
// 社保福利台账正常缴纳-增加人员并核算
|
|
||||||
export const addSocialAcctEmp = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/addSocialAcctEmp", params);
|
|
||||||
};
|
|
||||||
// 社保福利台账正常缴纳-增加人员并核算
|
|
||||||
export const deleteSocialAcctEmp = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export const taxAgentRangeSync = (params) => {
|
||||||
|
|
||||||
// 系统管理员权限
|
// 系统管理员权限
|
||||||
export const getPermission = (params) => {
|
export const getPermission = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/permission", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/permission", "GET", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取个税扣缴义务人表单
|
//获取个税扣缴义务人表单
|
||||||
|
|
@ -102,73 +102,3 @@ export const getTaxAgentSelectListAsAdmin = (params) => {
|
||||||
export const hasIconInTax = (params) => {
|
export const hasIconInTax = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**权限-角色相关*/
|
|
||||||
//同步业务线
|
|
||||||
export const syncAuth = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/sync", params);
|
|
||||||
};
|
|
||||||
//角色列表
|
|
||||||
export const getRoleList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/role/list", params);
|
|
||||||
};
|
|
||||||
//保存角色
|
|
||||||
export const saveAuthRole = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/role/save", params);
|
|
||||||
};
|
|
||||||
//删除角色
|
|
||||||
export const deleteAuthRole = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/role/delete", params);
|
|
||||||
};
|
|
||||||
//成员列表
|
|
||||||
export const authMemberList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/member/list", params);
|
|
||||||
};
|
|
||||||
//保存成员
|
|
||||||
export const saveAuthMember = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/member/save", params);
|
|
||||||
};
|
|
||||||
//数据列表
|
|
||||||
export const authDataList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/list", params);
|
|
||||||
};
|
|
||||||
//删除成员
|
|
||||||
export const deleteAuthMember = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/member/delete", params);
|
|
||||||
};
|
|
||||||
//删除数据
|
|
||||||
export const deleteAuthData = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/delete", params);
|
|
||||||
};
|
|
||||||
//保存数据
|
|
||||||
export const saveAuthData = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/save", params);
|
|
||||||
};
|
|
||||||
//同步数据
|
|
||||||
export const syncAuthData = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/sync", params);
|
|
||||||
};
|
|
||||||
//同步成员
|
|
||||||
export const syncAuthMember = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/member/sync", params);
|
|
||||||
};
|
|
||||||
//保存权限
|
|
||||||
export const saveAuthOpt = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/opt/save", params);
|
|
||||||
};
|
|
||||||
//权限项
|
|
||||||
export const getAuthOptTree = (params) => {
|
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/opt/tree", "GET", params);
|
|
||||||
};
|
|
||||||
//业务线详情
|
|
||||||
export const getRole = (params) => {
|
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/role/getRole", "GET", params);
|
|
||||||
};
|
|
||||||
//成员明细列表
|
|
||||||
export const authMemberDetail = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/member/detail", params);
|
|
||||||
};
|
|
||||||
//数据明细列表
|
|
||||||
export const authDataDetail = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/detail", params);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -33,17 +33,18 @@ class AssociativeSearchMult extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearch = (value) => this.getData(value);
|
handleSearch = (value) => {
|
||||||
|
this.setState({ loading: true });
|
||||||
|
this.getData(value);
|
||||||
|
};
|
||||||
getData = (name = "") => {
|
getData = (name = "") => {
|
||||||
const { browserConditionParam, tags } = this.props;
|
const { browserConditionParam } = this.props;
|
||||||
if (tags) return;
|
|
||||||
const {
|
const {
|
||||||
completeURL, filterByName, searchParamsKey, convertDatasource, dataParams = {}
|
completeURL, filterByName, searchParamsKey, convertDatasource, dataParams = {}
|
||||||
} = browserConditionParam;
|
} = browserConditionParam;
|
||||||
if (_.trim(name)) {
|
if (_.trim(name)) {
|
||||||
let payload = { ...dataParams };
|
let payload = { ...dataParams };
|
||||||
searchParamsKey && (payload = { ...payload, [searchParamsKey]: name, current: 1, pageSize: 9999 });
|
searchParamsKey && (payload = { ...payload, [searchParamsKey]: name, current: 1, pageSize: 9999 });
|
||||||
this.setState({ loading: true });
|
|
||||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status && data.list) {
|
if (status && data.list) {
|
||||||
|
|
@ -104,7 +105,7 @@ class AssociativeSearchMult extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, dropdownWidth } = this.state;
|
const { data, dropdownWidth } = this.state;
|
||||||
const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {}, tags } = this.props;
|
const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {} } = this.props;
|
||||||
const clsname = classNames({
|
const clsname = classNames({
|
||||||
"required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues),
|
"required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues),
|
||||||
"mr12": viewAttr === "3" && _.isEmpty(selectedValues),
|
"mr12": viewAttr === "3" && _.isEmpty(selectedValues),
|
||||||
|
|
@ -126,7 +127,7 @@ class AssociativeSearchMult extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let options = data.map(d => <Option key={d.id} title={d.name}>{d.name}</Option>);
|
let options = data.map(d => <Option key={d.id} title={d.name}>{d.name}</Option>);
|
||||||
!tags && selectedValues && selectedValues.map((v) => {
|
selectedValues && selectedValues.map((v) => {
|
||||||
v && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
v && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
||||||
});
|
});
|
||||||
const select = <Select
|
const select = <Select
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,6 @@ class CustomBrowserDialog extends Component {
|
||||||
listDatas: convertDatasource ? convertDatasource(data.list) : data.list,
|
listDatas: convertDatasource ? convertDatasource(data.list) : data.list,
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||||
});
|
});
|
||||||
} else if (status && data.modeList) {
|
|
||||||
this.setState({ listDatas: _.map(data.modeList, o => ({ ...o, id: o.name })) });
|
|
||||||
} else {
|
} else {
|
||||||
this.setState({ listDatas: _.map(data, o => ({ ...o, id: String(o.id) })) });
|
this.setState({ listDatas: _.map(data, o => ({ ...o, id: String(o.id) })) });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,11 +97,17 @@ class Index extends Component {
|
||||||
}, () => {
|
}, () => {
|
||||||
this.props.onChange && this.props.onChange(values.join(","));
|
this.props.onChange && this.props.onChange(values.join(","));
|
||||||
this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
|
this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
|
||||||
if (form) form.updateFields({ [getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") } });
|
if (form) {
|
||||||
|
form.updateFields({
|
||||||
|
[getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") }
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onBrowerClick = (keys, selectedObj) => {
|
onBrowerClick = (keys, selectedObj) => {
|
||||||
if (_.isEmpty(keys)) this.setState({ searchKeys: [], selectedData: {}, rightDatas: [] });
|
if (_.isEmpty(keys)) {
|
||||||
|
this.setState({ searchKeys: [], selectedData: {}, rightDatas: [] });
|
||||||
|
}
|
||||||
this.setState({ browserDialog: { visible: true } });
|
this.setState({ browserDialog: { visible: true } });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class PersonalScopeTable extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state;
|
const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state;
|
||||||
const { onChangeSelectKey, showOperateBtn } = this.props;
|
const { onChangeSelectKey } = this.props;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: total => `共 ${total} 条`,
|
showTotal: total => `共 ${total} 条`,
|
||||||
|
|
@ -128,7 +128,7 @@ class PersonalScopeTable extends Component {
|
||||||
return (
|
return (
|
||||||
<WeaTable
|
<WeaTable
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
rowSelection={showOperateBtn ? rowSelection : null}
|
rowSelection={rowSelection}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
pagination={pagination}
|
pagination={pagination}
|
||||||
loading={loading.query}
|
loading={loading.query}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ class Index extends Component {
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
return { ...item, fixed: "left", width: 176 };
|
return { ...item, fixed: "left", width: 176 };
|
||||||
}
|
}
|
||||||
if (item.dataIndex === "operate" || item.dataIndex === "opts") {
|
if (item.dataIndex === "operate") {
|
||||||
return { ...item, fixed: "right", width: item.width || "120px" };
|
return { ...item, fixed: "right", width: item.width || "120px" };
|
||||||
}
|
}
|
||||||
return { ...item, width: "33%" };
|
return { ...item, width: "33%" };
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<WeaReqTop
|
<WeaReqTop
|
||||||
title={this.props.title || getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<WeaTop title={this.props.title || getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||||
iconBgcolor="#F14A2D" {...this.props}/>
|
iconBgcolor="#F14A2D" {...this.props}/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
import React from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { WeaLogView } from "comsMobx";
|
||||||
|
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||||
|
|
||||||
|
import { getSearchs, renderLoading, renderNoright } from "../util"; // 从util文件引入公共的方法
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const WeaLogViewComp = WeaLogView.Component;
|
||||||
|
|
||||||
|
@inject("baseFormStore")
|
||||||
|
@observer
|
||||||
|
export default class BaseForm extends React.Component {
|
||||||
|
componentWillMount() { // 初始化渲染页面
|
||||||
|
const { baseFormStore: { doInit } } = this.props;
|
||||||
|
doInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { baseFormStore: { doInit } } = this.props;
|
||||||
|
if (this.props.location.key !== nextProps.location.key) { // 手动刷新、切换菜单 重新初始化
|
||||||
|
doInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 渲染右键菜单和顶部下拉菜单
|
||||||
|
getRightMenu() {
|
||||||
|
const { baseFormStore: { setLogVisible, saveForm } } = this.props;
|
||||||
|
let btnArr = [
|
||||||
|
{
|
||||||
|
key: "BTN_SAVE",
|
||||||
|
icon: <i className="icon-coms-Preservation"/>,
|
||||||
|
content: `${getLabel(86, "保存")}`,
|
||||||
|
onClick: () => saveForm()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "log",
|
||||||
|
content: getLabel(83, "日志"),
|
||||||
|
icon: <i className="icon-coms-Print-log"/>,
|
||||||
|
onClick: () => setLogVisible(true)
|
||||||
|
}];
|
||||||
|
return btnArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
/* 页面渲染说明:
|
||||||
|
1、判断是否无权限: 是显示无权限页面
|
||||||
|
2、渲染form页面:
|
||||||
|
2-1: WeaRightMenu 右键菜单
|
||||||
|
2-2: WeaTop: 顶部: 包括下拉菜单
|
||||||
|
2-3: renderLoading: 加载数据中的loading效果(统一封装在util中)
|
||||||
|
2-4: WeaNewScroll 顶部以下超长滚动处理
|
||||||
|
2-5: 通过getSearchs方法渲染form
|
||||||
|
*/
|
||||||
|
const { baseFormStore } = this.props;
|
||||||
|
const {
|
||||||
|
loading,
|
||||||
|
hasRight,
|
||||||
|
form,
|
||||||
|
condition,
|
||||||
|
logVisible,
|
||||||
|
logStore,
|
||||||
|
saveLoading,
|
||||||
|
setLogVisible,
|
||||||
|
saveForm
|
||||||
|
} = baseFormStore; // 从后台取数据 和 方法
|
||||||
|
|
||||||
|
if (!hasRight && !loading) { // 无权限处理
|
||||||
|
return renderNoright();
|
||||||
|
}
|
||||||
|
|
||||||
|
const btns = [ // 顶部按钮
|
||||||
|
<Button type="primary" loading={saveLoading} onClick={() => saveForm()}>保存</Button>
|
||||||
|
];
|
||||||
|
const collectParams = { // 收藏功能配置
|
||||||
|
favname: "基础表单",
|
||||||
|
favouritetype: 1,
|
||||||
|
objid: 0,
|
||||||
|
link: "wui/index.html#/ns_demo01/index",
|
||||||
|
importantlevel: 1
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<WeaTop
|
||||||
|
title="基础表单" // title
|
||||||
|
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||||
|
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||||
|
buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示
|
||||||
|
buttonSpace={10} // 按钮之间的间隔
|
||||||
|
showDropIcon={true} // 是否显示右侧下拉按钮
|
||||||
|
dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同)
|
||||||
|
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||||
|
>
|
||||||
|
{loading ? renderLoading() :
|
||||||
|
<WeaNewScroll height="100%">
|
||||||
|
{getSearchs(form, toJS(condition), 1)}
|
||||||
|
</WeaNewScroll>
|
||||||
|
}
|
||||||
|
<WeaLogViewComp // 日志功能(一般后端的应用设置是需要的)
|
||||||
|
visible={logVisible} // 日志弹框的显示隐藏
|
||||||
|
onCancel={() => setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false
|
||||||
|
logStore={logStore} // 日志的store
|
||||||
|
logType="1" // 模块编码: 该参数要根据模块来给
|
||||||
|
logSmallType="1" // 细分模块编码: 该参数要根据模块来给
|
||||||
|
/>
|
||||||
|
</WeaTop>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
export const PAGE = {
|
|
||||||
"salaryArchive": ["/hrmSalary/salaryFile"], //薪资档案
|
|
||||||
"salarySob": ["/hrmSalary/ledger"], //薪资账套
|
|
||||||
"salaryAcct": ["/hrmSalary/calculate", "/hrmSalary/calcView"], //薪资核算
|
|
||||||
"salaryBill": ["/hrmSalary/payroll", "/hrmSalary/payrollGrant", "/hrmSalary/payrollDetail"], //工资单
|
|
||||||
"taxDeclaration": ["/hrmSalary/declare", "/hrmSalary/generateDeclarationDetail"], //个税
|
|
||||||
"addUpDeduction": ["/dataAcquisition/cumDeduct"], //累计专项附加扣除
|
|
||||||
"specialAddDeduction": ["/dataAcquisition/specialAddDeduction"], //专项附加扣除
|
|
||||||
"otherDeduction": ["/dataAcquisition/otherDeduct"], //其他免税扣除
|
|
||||||
"addUpSituation": ["/dataAcquisition/cumSituation"], //往期累计情况
|
|
||||||
"attendQuote": ["/dataAcquisition/attendance"], //考勤引用
|
|
||||||
"myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile"], //薪资福利
|
|
||||||
"taxAgent": ["/hrmSalary/taxAgent"], //个税扣缴义务人
|
|
||||||
"auth": ["/hrmSalary/roleManagement"], //业务管理线
|
|
||||||
"variableArchive": ["/hrmSalary/variableSalary"], //浮动薪酬
|
|
||||||
"siAccount": ["/socialSecurityBenefits/standingBook", "/socialSecurityBenefits/standingBookDetail", "/socialSecurityBenefits/sbofflineComparison"], //社保福利台账
|
|
||||||
"siArchive": ["/socialSecurityBenefits/archives"], //社保档案
|
|
||||||
"salaryField": ["/hrmSalary/fieldManagement"], //字段管理
|
|
||||||
"salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理
|
|
||||||
"siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案
|
|
||||||
"report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表
|
|
||||||
"dataPush": ["/hrmSalary/datapush"], //数据推送
|
|
||||||
"adjustRecord": ["/hrmSalary/adjustSalaryManage"] //调薪管理
|
|
||||||
};
|
|
||||||
export const EXCLUDE_PAGE = ["mobilepayroll"];
|
|
||||||
|
|
@ -28,7 +28,7 @@ import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
||||||
// import Declare from "./pages/declare";
|
// import Declare from "./pages/declare";
|
||||||
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
||||||
import TaxRate from "./pages/taxRate";
|
import TaxRate from "./pages/taxRate";
|
||||||
import TaxAgent from "./pages/salary/taxAgent";
|
import TaxAgent from "./pages/taxAgent";
|
||||||
import CalculateDetail from "./pages/calculateDetail";
|
import CalculateDetail from "./pages/calculateDetail";
|
||||||
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||||
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
||||||
|
|
@ -42,7 +42,6 @@ import MobilePayroll from "./pages/mobilePayroll";
|
||||||
import SysConfig from "./pages/sysConfig";
|
import SysConfig from "./pages/sysConfig";
|
||||||
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
||||||
import Appconfig from "./pages/appConfig";
|
import Appconfig from "./pages/appConfig";
|
||||||
import RoleManagement from "./pages/roleManagement";
|
|
||||||
import FieldManagement from "./pages/fieldManagement";
|
import FieldManagement from "./pages/fieldManagement";
|
||||||
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
||||||
import EmployeeList from "./pages/employeeView";
|
import EmployeeList from "./pages/employeeView";
|
||||||
|
|
@ -54,7 +53,6 @@ import AdjustSalaryManage from "./pages/adjustSalaryManage";
|
||||||
import TopologyMap from "./pages/topologyMap";
|
import TopologyMap from "./pages/topologyMap";
|
||||||
import SupplementaryCalc from "./pages/supplementaryCalc";
|
import SupplementaryCalc from "./pages/supplementaryCalc";
|
||||||
import VariableSalary from "./pages/variableSalary";
|
import VariableSalary from "./pages/variableSalary";
|
||||||
import Datapush from "./pages/datapush";
|
|
||||||
import Layout from "./layout";
|
import Layout from "./layout";
|
||||||
import stores from "./stores";
|
import stores from "./stores";
|
||||||
import "./style/index";
|
import "./style/index";
|
||||||
|
|
@ -66,7 +64,6 @@ getLocaleLabel = function (nextState, replace, callback) {
|
||||||
};
|
};
|
||||||
const SocialSecurityBenefits = (props) => props.children;
|
const SocialSecurityBenefits = (props) => props.children;
|
||||||
const DataAcquisition = (props) => props.children;
|
const DataAcquisition = (props) => props.children;
|
||||||
|
|
||||||
const Routes = (
|
const Routes = (
|
||||||
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Layout}>
|
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Layout}>
|
||||||
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
||||||
|
|
@ -113,11 +110,9 @@ const Routes = (
|
||||||
<Route key="sysconfig" path="sysconfig" component={SysConfig}/>
|
<Route key="sysconfig" path="sysconfig" component={SysConfig}/>
|
||||||
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig}/>
|
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig}/>
|
||||||
<Route key="appconfig" path="appconfig" component={Appconfig}/>
|
<Route key="appconfig" path="appconfig" component={Appconfig}/>
|
||||||
<Route key="roleManagement" path="roleManagement" component={RoleManagement}/>
|
|
||||||
<Route key="fieldManagement" path="fieldManagement" component={FieldManagement}/>
|
<Route key="fieldManagement" path="fieldManagement" component={FieldManagement}/>
|
||||||
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
|
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
|
||||||
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
|
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
|
||||||
<Route key="datapush" path="datapush" component={Datapush}/>
|
|
||||||
<Route key="reportView" path="reportView" component={ReportView}/>
|
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||||
|
|
|
||||||
|
|
@ -8,17 +8,12 @@
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
import Authority from "./pages/mySalary/authority";
|
|
||||||
import { EXCLUDE_PAGE } from "./config";
|
|
||||||
import stores from "./stores";
|
import stores from "./stores";
|
||||||
|
|
||||||
const { ls } = WeaTools;
|
const { ls } = WeaTools;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
|
||||||
@observer
|
|
||||||
class Layout extends Component {
|
class Layout extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -47,11 +42,7 @@ class Layout extends Component {
|
||||||
let header = document.getElementById("container");
|
let header = document.getElementById("container");
|
||||||
header.appendChild(link);
|
header.appendChild(link);
|
||||||
top.$(".ant-message").remove();
|
top.$(".ant-message").remove();
|
||||||
if (_.every(EXCLUDE_PAGE, page => window.location.hash.indexOf(page) === -1)) {
|
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
|
||||||
stores.taxAgentStore.getPermission();
|
|
||||||
} else {
|
|
||||||
stores.taxAgentStore.initPageAndOptAuth();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
window.addEventListener("storage", this.setFontSize);
|
window.addEventListener("storage", this.setFontSize);
|
||||||
}
|
}
|
||||||
|
|
@ -79,10 +70,9 @@ class Layout extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { taxAgentStore: { PageAndOptAuth, loading } } = this.props;
|
return (
|
||||||
return (<WeaLocaleProvider>
|
<WeaLocaleProvider>{this.props.children}</WeaLocaleProvider>
|
||||||
<Authority store={{ loading, hasRight: PageAndOptAuth.able }}>{this.props.children}</Authority>
|
);
|
||||||
</WeaLocaleProvider>);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class Index extends Component {
|
||||||
if (o.dataIndex === "username") {
|
if (o.dataIndex === "username") {
|
||||||
return { ...o, width: 150, fixed: "left" };
|
return { ...o, width: 150, fixed: "left" };
|
||||||
}
|
}
|
||||||
return { ...o, width: 150 };
|
return { ...o, width: 150, render: (v) => (<span title={v}>{v}</span>) };
|
||||||
}), {
|
}), {
|
||||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||||
width: 120, render: (_, record) => (
|
width: 120, render: (_, record) => (
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,15 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
.ant-table-tbody > tr > td,
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class SalaryDetails extends Component {
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
||||||
columns: _.map(columns, (it, idx) => ({
|
columns: _.map(columns, (it, idx) => ({
|
||||||
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true,
|
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true, showSee: false,
|
||||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
|
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
|
||||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,7 @@ class Index extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
taxAgentStore: { PageAndOptAuth },
|
taxAgentStore: { statisticsReportBtn, PageAndOptAuth },
|
||||||
attendanceStore: { statisticsForm, reportForm, tableStore }
|
attendanceStore: { statisticsForm, reportForm, tableStore }
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
|
|
@ -279,7 +279,6 @@ class Index extends Component {
|
||||||
reportName, keyword, year, logDialogVisible, filterConditions,
|
reportName, keyword, year, logDialogVisible, filterConditions,
|
||||||
dateRange, showSearchAd, isQuery
|
dateRange, showSearchAd, isQuery
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const statisticsReportBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const buttons = selectedKey === "statistics" ? [
|
const buttons = selectedKey === "statistics" ? [
|
||||||
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
||||||
<Button type="ghost"
|
<Button type="ghost"
|
||||||
|
|
@ -290,7 +289,7 @@ class Index extends Component {
|
||||||
onSearch={() => this.handleReqBtnsClick("search")}/>
|
onSearch={() => this.handleReqBtnsClick("search")}/>
|
||||||
] : selectedKey === "detail" ? [
|
] : selectedKey === "detail" ? [
|
||||||
<span className="employeeYearWrapper">
|
<span className="employeeYearWrapper">
|
||||||
<span>{getLabel(111, "年度:")}</span>
|
<span>{getLabel(111, "年薪资核算人员明细:")}</span>
|
||||||
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
||||||
</span>,
|
</span>,
|
||||||
<WeaInputSearch placeholder={getLabel(111, "请输入姓名、工号、身份证号")} className="search"
|
<WeaInputSearch placeholder={getLabel(111, "请输入姓名、工号、身份证号")} className="search"
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,8 @@ class AppConfig extends Component {
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
|
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
|
||||||
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
// <Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
||||||
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
// <Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
||||||
];
|
];
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import LogDialog from "../../components/logViewModal";
|
||||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||||
import FormInfo from "../../components/FormInfo";
|
import FormInfo from "../../components/FormInfo";
|
||||||
import { queryConditions } from "./config";
|
import { queryConditions } from "./config";
|
||||||
import { postFetch } from "../../util/request";
|
import { getTaxAgentSelectList } from "../../apis/taxAgent";
|
||||||
import cs from "classnames";
|
import cs from "classnames";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -47,13 +47,13 @@ class Calculate extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
const { data } = await getTaxAgentSelectList();
|
||||||
this.setState({
|
this.setState({
|
||||||
conditions: _.map(queryConditions, item => ({
|
conditions: _.map(queryConditions, item => ({
|
||||||
...item, items: _.map(item.items, o => {
|
...item, items: _.map(item.items, o => {
|
||||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||||
if (getKey(o) === "taxAgentIds") {
|
if (getKey(o) === "taxAgentIds") {
|
||||||
return { ...o, options: _.map(data, k => ({ key: k.id + "", showname: k.name })) };
|
return { ...o, options: _.map(data, k => ({ key: k.id, showname: k.content })) };
|
||||||
}
|
}
|
||||||
return { ...o };
|
return { ...o };
|
||||||
})
|
})
|
||||||
|
|
@ -62,9 +62,8 @@ class Calculate extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCalculateOpts = () => {
|
renderCalculateOpts = () => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { queryParams, isRefresh, showAdvance } = this.state;
|
const { queryParams, isRefresh, showAdvance } = this.state;
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
|
||||||
let calculateOpts = [
|
let calculateOpts = [
|
||||||
<Button type="primary" onClick={() => this.setState({
|
<Button type="primary" onClick={() => this.setState({
|
||||||
calcDaialog: {
|
calcDaialog: {
|
||||||
|
|
@ -78,7 +77,7 @@ class Calculate extends Component {
|
||||||
queryParams: { ...queryParams, ...v }
|
queryParams: { ...queryParams, ...v }
|
||||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||||
];
|
];
|
||||||
return !admin ? calculateOpts.slice(1) : calculateOpts;
|
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||||
};
|
};
|
||||||
handleCalcOpts = ({ key }, record) => {
|
handleCalcOpts = ({ key }, record) => {
|
||||||
const { isRefresh, progressModule } = this.state, { id } = record;
|
const { isRefresh, progressModule } = this.state, { id } = record;
|
||||||
|
|
@ -224,7 +223,8 @@ class Calculate extends Component {
|
||||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||||
content: getLabel(545781, "操作日志")
|
content: getLabel(545781, "操作日志")
|
||||||
}
|
}
|
||||||
]}>
|
]}
|
||||||
|
>
|
||||||
<div className="calculate-body">
|
<div className="calculate-body">
|
||||||
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
|
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
|
||||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||||
|
|
|
||||||
|
|
@ -75,12 +75,7 @@ class Index extends Component {
|
||||||
</span>,
|
</span>,
|
||||||
render: (__, record) => {
|
render: (__, record) => {
|
||||||
const { operate: opts = [] } = record;
|
const { operate: opts = [] } = record;
|
||||||
const admin = record.opts.includes("admin");
|
const operate = [...opts, { index: "log", text: getLabel(30586, "查看日志") }];
|
||||||
const operate = admin ? [...opts, { index: "log", text: getLabel(30586, "查看日志") }] : [
|
|
||||||
{ index: "3", text: getLabel(111, "查看") },
|
|
||||||
{ index: "null", text: "" },
|
|
||||||
{ index: "log", text: getLabel(30586, "查看日志") }
|
|
||||||
];
|
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
{
|
{
|
||||||
_.map(operate.slice(0, 2), f => (
|
_.map(operate.slice(0, 2), f => (
|
||||||
|
|
|
||||||
|
|
@ -125,17 +125,18 @@ class EditCalcTable extends Component {
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
||||||
if (status) {
|
.then(({ status, errormsg }) => {
|
||||||
clearInterval(this.timerLock);
|
if (status) {
|
||||||
this.setState({
|
clearInterval(this.timerLock);
|
||||||
progressVisible: false,
|
this.setState({
|
||||||
progress: 0
|
progressVisible: false,
|
||||||
}, () => this.queryCalcResultList());
|
progress: 0
|
||||||
} else {
|
}, () => this.queryCalcResultList());
|
||||||
message.error(errormsg);
|
} else {
|
||||||
}
|
message.error(errormsg);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -341,4 +342,4 @@ const traverse = (arr, calcDetail) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -43,7 +43,7 @@ class EditSalaryCalcSlide extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
renderTitle = () => {
|
renderTitle = () => {
|
||||||
const { loading } = this.state, { viewAttr } = this.props;
|
const { loading, itemsByGroup } = this.state, { viewAttr } = this.props;
|
||||||
return <div className="titleDialog">
|
return <div className="titleDialog">
|
||||||
<div className="titleCol titleLeftBox">
|
<div className="titleCol titleLeftBox">
|
||||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
|
@ -52,7 +52,7 @@ class EditSalaryCalcSlide extends Component {
|
||||||
<div className="titleCol titleRightBox">
|
<div className="titleCol titleRightBox">
|
||||||
{
|
{
|
||||||
viewAttr === 2 &&
|
viewAttr === 2 &&
|
||||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
<Button type="primary" disabled={_.isEmpty(itemsByGroup)} onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,8 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
transition: margin-top .3s;
|
transition: margin-top .3s;
|
||||||
|
max-height: 80vh;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
.anchor-list-ink {
|
.anchor-list-ink {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -18,21 +18,23 @@ class Layout extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
salaryacctAcctresultCheckAuth = () => {
|
salaryacctAcctresultCheckAuth = () => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { getPermission } } = this.props;
|
||||||
const { isOpenDevolution } = PageAndOptAuth;
|
this.setState({ store: { ...this.state.store, loading: true } });
|
||||||
if (isOpenDevolution) {
|
getPermission().then(({ data }) => {
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { isOpenDevolution } = data;
|
||||||
this.setState({ store: { ...this.state.store, loading: true } });
|
if (isOpenDevolution) {
|
||||||
salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => {
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } }, () => {
|
salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||||
this.state.store.hasRight && this.props.init && this.props.init();
|
this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } }, () => {
|
||||||
|
this.state.store.hasRight && this.props.init && this.props.init();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
} else {
|
this.setState({ store: { ...this.state.store, loading: false, hasRight: true } }, () => {
|
||||||
this.setState({ store: { ...this.state.store, loading: false, hasRight: true } }, () => {
|
this.props.init && this.props.init();
|
||||||
this.props.init && this.props.init();
|
});
|
||||||
});
|
}
|
||||||
}
|
}).catch(() => this.setState({ store: { ...this.state.store, loading: false } }));
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
|
|
@ -36,19 +36,21 @@ export default class CompareDetail extends React.Component {
|
||||||
current: 1
|
current: 1
|
||||||
};
|
};
|
||||||
fetchComparisonResultList(params);
|
fetchComparisonResultList(params);
|
||||||
this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") });
|
this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") })
|
||||||
}
|
}
|
||||||
|
|
||||||
salaryacctAcctresultCheckAuth = (params) => {
|
salaryacctAcctresultCheckAuth = (params) => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { getPermission } } = this.props;
|
||||||
const { isOpenDevolution } = PageAndOptAuth;
|
getPermission().then(({ data }) => {
|
||||||
if (isOpenDevolution) {
|
const { isOpenDevolution } = data;
|
||||||
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
if (isOpenDevolution) {
|
||||||
this.setState({ calculateAuth: data && status });
|
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
||||||
});
|
this.setState({ calculateAuth: data && status });
|
||||||
} else {
|
});
|
||||||
this.setState({ calculateAuth: true });
|
} else {
|
||||||
}
|
this.setState({ calculateAuth: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
getColumns = (columns) => {
|
getColumns = (columns) => {
|
||||||
|
|
|
||||||
|
|
@ -69,15 +69,17 @@ export default class CalculateDetail extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
salaryacctAcctresultCheckAuth = (params) => {
|
salaryacctAcctresultCheckAuth = (params) => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { getPermission } } = this.props;
|
||||||
const { isOpenDevolution } = PageAndOptAuth;
|
getPermission().then(({ data }) => {
|
||||||
if (isOpenDevolution) {
|
const { isOpenDevolution } = data;
|
||||||
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
if (isOpenDevolution) {
|
||||||
this.setState({ calculateAuth: data && status });
|
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
||||||
});
|
this.setState({ calculateAuth: data && status });
|
||||||
} else {
|
});
|
||||||
this.setState({ calculateAuth: true });
|
} else {
|
||||||
}
|
this.setState({ calculateAuth: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Input = (value, key) => {
|
Input = (value, key) => {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import {
|
||||||
deleteAttendance,
|
deleteAttendance,
|
||||||
getAttendanceFieldSettingList,
|
getAttendanceFieldSettingList,
|
||||||
getAttendanceList,
|
getAttendanceList,
|
||||||
|
getLedgerList,
|
||||||
getSalaryCycleAndAttendCycle,
|
getSalaryCycleAndAttendCycle,
|
||||||
importAttendQuoteData,
|
importAttendQuoteData,
|
||||||
returnToAttendanceFieldSettingDefault,
|
returnToAttendanceFieldSettingDefault,
|
||||||
|
|
@ -25,7 +26,6 @@ import moment from "moment";
|
||||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||||
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
|
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
|
||||||
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
|
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
|
||||||
import { postFetch } from "../../../../util/request";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ class AttendanceDataComp extends Component {
|
||||||
},
|
},
|
||||||
fieldSetPayload: { visible: false, title: "", children: null },
|
fieldSetPayload: { visible: false, title: "", children: null },
|
||||||
attendanceReferencePayload: { visible: false, title: "" },
|
attendanceReferencePayload: { visible: false, title: "" },
|
||||||
attendanceViewPayload: { visible: false, attendQuoteId: "", salaryYearMonth: "", showOperateBtn: false }
|
attendanceViewPayload: { visible: false, attendQuoteId: "", salaryYearMonth: "" }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,26 +85,25 @@ class AttendanceDataComp extends Component {
|
||||||
};
|
};
|
||||||
getLedgerList = (importData) => {
|
getLedgerList = (importData) => {
|
||||||
const { importFormPayload } = this.state;
|
const { importFormPayload } = this.state;
|
||||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" })
|
getLedgerList().then(({ status, data }) => {
|
||||||
.then(({ status, data }) => {
|
if (status) {
|
||||||
if (status) {
|
this.setState({
|
||||||
|
importFormPayload: {
|
||||||
|
...importFormPayload, salarySobId: _.head(data).id,
|
||||||
|
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||||
|
}
|
||||||
|
}, async () => {
|
||||||
|
const { importFormPayload } = this.state;
|
||||||
|
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||||
|
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
||||||
|
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
||||||
this.setState({
|
this.setState({
|
||||||
importFormPayload: {
|
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
||||||
...importFormPayload, salarySobId: String(_.head(data).id),
|
importFormPayload: { ...importFormPayload, ...data }
|
||||||
salarySobList: _.map(data, it => ({ key: String(it.id), showname: it.name }))
|
|
||||||
}
|
|
||||||
}, async () => {
|
|
||||||
const { importFormPayload } = this.state;
|
|
||||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
|
||||||
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
|
||||||
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
|
||||||
this.setState({
|
|
||||||
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
|
||||||
importFormPayload: { ...importFormPayload, ...data }
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
handleChangeImportPayload = (key, value) => {
|
handleChangeImportPayload = (key, value) => {
|
||||||
const { importFormPayload, importData } = this.state;
|
const { importFormPayload, importData } = this.state;
|
||||||
|
|
@ -150,11 +149,11 @@ class AttendanceDataComp extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleViewAttendanceData = ({ id, attendCycle, opts = [] }) => {
|
handleViewAttendanceData = ({ id, attendCycle }) => {
|
||||||
const { attendanceViewPayload } = this.state;
|
const { attendanceViewPayload } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
attendanceViewPayload: {
|
attendanceViewPayload: {
|
||||||
...attendanceViewPayload, showOperateBtn: opts.includes("admin"),
|
...attendanceViewPayload,
|
||||||
visible: true, attendQuoteId: id,
|
visible: true, attendQuoteId: id,
|
||||||
salaryYearMonth: attendCycle
|
salaryYearMonth: attendCycle
|
||||||
}
|
}
|
||||||
|
|
@ -288,7 +287,7 @@ class AttendanceDataComp extends Component {
|
||||||
dataSource, columns, pageInfo, loading, importData, importFormPayload, fieldSetPayload,
|
dataSource, columns, pageInfo, loading, importData, importFormPayload, fieldSetPayload,
|
||||||
attendanceReferencePayload, attendanceViewPayload
|
attendanceReferencePayload, attendanceViewPayload
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { salaryYearMonth } = this.props;
|
const { showOperateBtn, salaryYearMonth } = this.props;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: total => `共 ${total} 条`,
|
showTotal: total => `共 ${total} 条`,
|
||||||
|
|
@ -316,11 +315,10 @@ class AttendanceDataComp extends Component {
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "operate",
|
dataIndex: "operate",
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
const { opts = [] } = record;
|
|
||||||
return (
|
return (
|
||||||
<div className="linkWapper">
|
<div className="linkWapper">
|
||||||
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||||
{opts.includes("admin") &&
|
{showOperateBtn &&
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||||
|
|
@ -338,18 +336,9 @@ class AttendanceDataComp extends Component {
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!opts.includes("admin") &&
|
!showOperateBtn &&
|
||||||
<Dropdown
|
<a href="javascript:void(0)"
|
||||||
overlay={
|
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||||
<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>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -372,13 +361,14 @@ class AttendanceDataComp extends Component {
|
||||||
{/* 考勤数据引用 */}
|
{/* 考勤数据引用 */}
|
||||||
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||||
{/* 考勤数据查看 */}
|
{/* 考勤数据查看 */}
|
||||||
<AttendanceDataViewSlide {...attendanceViewPayload} onClose={() => this.setState({
|
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||||
attendanceViewPayload: {
|
onClose={() => this.setState({
|
||||||
...attendanceViewPayload,
|
attendanceViewPayload: {
|
||||||
visible: false,
|
...attendanceViewPayload,
|
||||||
attendQuoteId: ""
|
visible: false,
|
||||||
}
|
attendQuoteId: ""
|
||||||
})}/>
|
}
|
||||||
|
})}/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* Date: 2023/3/7
|
* Date: 2023/3/7
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
|
||||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||||
|
import { Button, Spin } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReceive = async ({ data }) => {
|
||||||
|
const { type, payload: { id, params } = {} } = data;
|
||||||
|
if (type === "turn") {
|
||||||
|
switch (id) {
|
||||||
|
case "PAGEINFO":
|
||||||
|
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.viewAttendQuote());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||||
|
|
@ -33,19 +53,29 @@ class AttendanceDataViewSlide extends Component {
|
||||||
|
|
||||||
viewAttendQuote = (extraPayload = {}, props) => {
|
viewAttendQuote = (extraPayload = {}, props) => {
|
||||||
const { loading, pageInfo, keyword } = this.state;
|
const { loading, pageInfo, keyword } = this.state;
|
||||||
const { attendQuoteId } = props;
|
const { attendQuoteId } = props || this.props;
|
||||||
this.setState({ loading: { ...loading, query: true } });
|
this.setState({ loading: { ...loading, query: true } });
|
||||||
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||||
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
|
}, () => this.postMessageToChild({
|
||||||
});
|
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
|
||||||
|
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : false }))
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||||
};
|
};
|
||||||
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const i18n = {
|
||||||
|
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
|
||||||
|
"条": getLabel(18256, "条")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("attendanceViewTable");
|
||||||
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
handleExportAttendQuote = () => {
|
handleExportAttendQuote = () => {
|
||||||
if (!this.handleDebounce) {
|
if (!this.handleDebounce) {
|
||||||
this.handleDebounce = _.debounce(() => {
|
this.handleDebounce = _.debounce(() => {
|
||||||
|
|
@ -60,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
const { loading, keyword } = this.state;
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
showSizeChanger: true,
|
|
||||||
showQuickJumper: true,
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current, pageSize }
|
|
||||||
}, () => this.viewAttendQuote({}, this.props));
|
|
||||||
},
|
|
||||||
onChange: (current) => {
|
|
||||||
this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current }
|
|
||||||
}, () => this.viewAttendQuote({}, this.props));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
|
|
@ -100,9 +113,16 @@ class AttendanceDataViewSlide extends Component {
|
||||||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
<WeaTable
|
<div style={{ height: `calc(100% - 40px)` }}>
|
||||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
<Spin spinning={loading.query}>
|
||||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/unitTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||||
|
id="attendanceViewTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import { getSearchs } from "../../../../util";
|
||||||
import {
|
import {
|
||||||
checkOperation,
|
checkOperation,
|
||||||
getAttendanceFieldSettingList,
|
getAttendanceFieldSettingList,
|
||||||
|
getLedgerList,
|
||||||
returnToAttendanceFieldSettingDefault,
|
returnToAttendanceFieldSettingDefault,
|
||||||
saveAttendanceFieldSetting,
|
saveAttendanceFieldSetting,
|
||||||
saveAttendanceFieldSettingAsDefault,
|
saveAttendanceFieldSettingAsDefault,
|
||||||
|
|
@ -20,7 +21,6 @@ import {
|
||||||
} from "../../../../apis/attendance";
|
} from "../../../../apis/attendance";
|
||||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||||
import { postFetch } from "../../../../util/request";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("attendanceStore")
|
@inject("attendanceStore")
|
||||||
|
|
@ -46,26 +46,25 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
|
|
||||||
getLedgerList = () => {
|
getLedgerList = () => {
|
||||||
const { attendanceStore: { refenceform } } = this.props;
|
const { attendanceStore: { refenceform } } = this.props;
|
||||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" })
|
getLedgerList().then(({ status, data }) => {
|
||||||
.then(({ status, data }) => {
|
if (status) {
|
||||||
if (status) {
|
this.setState({
|
||||||
this.setState({
|
condition: _.map(reFrenceConditions, (item) => {
|
||||||
condition: _.map(reFrenceConditions, (item) => {
|
const { items } = item;
|
||||||
const { items } = item;
|
return {
|
||||||
return {
|
...item,
|
||||||
...item,
|
items: _.map(items, child => {
|
||||||
items: _.map(items, child => {
|
const { domkey } = child;
|
||||||
const { domkey } = child;
|
if (domkey[0] === "salarySobIds") {
|
||||||
if (domkey[0] === "salarySobIds") {
|
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||||
return { ...child, options: _.map(data, it => ({ key: String(it.id), showname: it.name })) };
|
}
|
||||||
}
|
return { ...child };
|
||||||
return { ...child };
|
})
|
||||||
})
|
};
|
||||||
};
|
})
|
||||||
})
|
}, () => refenceform.initFormFields(this.state.condition));
|
||||||
}, () => refenceform.initFormFields(this.state.condition));
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-table {
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
background: #FFF;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,7 @@ class Index extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions } = this.state;
|
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions } = this.state;
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const topTab = [
|
const topTab = [
|
||||||
{ title: "考勤数据", key: "DATA" },
|
{ title: "考勤数据", key: "DATA" },
|
||||||
{ title: "字段管理", key: "FIELD" }
|
{ title: "字段管理", key: "FIELD" }
|
||||||
|
|
@ -116,6 +115,7 @@ class Index extends Component {
|
||||||
selectedKey === "DATA" ?
|
selectedKey === "DATA" ?
|
||||||
<AttendanceDataComp
|
<AttendanceDataComp
|
||||||
ref={dom => this.attendanceTableRef = dom}
|
ref={dom => this.attendanceTableRef = dom}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
salaryYearMonth={salaryMonth}
|
salaryYearMonth={salaryMonth}
|
||||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||||
/> :
|
/> :
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ import TableRecord from "../components/tableRecord";
|
||||||
import { dataCollectCondition } from "./columns";
|
import { dataCollectCondition } from "./columns";
|
||||||
import { removePropertyCondition } from "../../../util/response";
|
import { removePropertyCondition } from "../../../util/response";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import { getDomkes } from "../../../util";
|
import { getDomkes } from "../../../util";
|
||||||
import Layout from "../layout";
|
import Layout from "../layout";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
|
@ -67,8 +66,7 @@ class Index extends Component {
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
advanceCondition: null,
|
advanceCondition: null,
|
||||||
targetid: "",
|
targetid: ""
|
||||||
taxAgentOption: []
|
|
||||||
};
|
};
|
||||||
this.tableRef = null;
|
this.tableRef = null;
|
||||||
this.addItemRef = null;
|
this.addItemRef = null;
|
||||||
|
|
@ -105,15 +103,11 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
getAdvanceCondition = async () => {
|
getAdvanceCondition = () => {
|
||||||
const { cumDeductStore: { form } } = this.props;
|
const { cumDeductStore: { form } } = this.props;
|
||||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
|
||||||
getCumDeductSaCondition().then(({ status, data }) => {
|
getCumDeductSaCondition().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||||
advanceCondition: removePropertyCondition(data.condition),
|
|
||||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
|
||||||
});
|
|
||||||
form.initFormFields(removePropertyCondition(data.condition));
|
form.initFormFields(removePropertyCondition(data.condition));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -242,8 +236,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleSaveData = () => {
|
handleSaveData = () => {
|
||||||
const { cumDeductStore: { addForm } } = this.props, { slidePayload } = this.state;
|
const { cumDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
|
||||||
addForm.validateForm().then(f => {
|
addForm.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -267,11 +260,10 @@ class Index extends Component {
|
||||||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleAddData = async (title = "新建", editId = {}) => {
|
handleAddData = (title = "新建", editId = {}) => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
const { taxAgentStore, cumDeductStore: { addForm } } = this.props;
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { cumDeductStore: { addForm } } = this.props;
|
|
||||||
const { slidePayload } = this.state;
|
const { slidePayload } = this.state;
|
||||||
|
const { taxAgentOption } = taxAgentStore;
|
||||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -357,7 +349,8 @@ class Index extends Component {
|
||||||
* Date: 2023/2/17
|
* Date: 2023/2/17
|
||||||
*/
|
*/
|
||||||
getScreen = () => {
|
getScreen = () => {
|
||||||
const { declareMonth, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
|
const { declareMonth, taxAgentId, innerWidth } = this.state;
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
com: DataCollectionDatePicker({
|
com: DataCollectionDatePicker({
|
||||||
|
|
@ -470,11 +463,10 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleOpenImport = async () => {
|
handleOpenImport = () => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { importPayload } = this.state;
|
const { importPayload } = this.state;
|
||||||
const { importOpts } = importPayload;
|
const { importOpts } = importPayload;
|
||||||
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
this.setState({
|
this.setState({
|
||||||
importPayload: {
|
importPayload: {
|
||||||
...importPayload,
|
...importPayload,
|
||||||
|
|
@ -506,7 +498,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { cumDeductStore: { form } } = this.props;
|
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||||
const {
|
const {
|
||||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||||
importPayload, exportPayloadType, targetid
|
importPayload, exportPayloadType, targetid
|
||||||
|
|
@ -527,6 +519,7 @@ class Index extends Component {
|
||||||
ref={dom => this.tableRef = dom}
|
ref={dom => this.tableRef = dom}
|
||||||
url="/api/bs/hrmsalary/addUpDeduction/list"
|
url="/api/bs/hrmsalary/addUpDeduction/list"
|
||||||
payload={tablePayload}
|
payload={tablePayload}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
onTableOperate={this.handleTableOperate}
|
onTableOperate={this.handleTableOperate}
|
||||||
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
|
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
|
||||||
form={form}
|
form={form}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import { dataCollectCondition, taxOptions } from "./columns";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import { getDomkes } from "../../../util";
|
import { getDomkes } from "../../../util";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -64,8 +63,7 @@ class Index extends Component {
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
advanceCondition: null,
|
advanceCondition: null,
|
||||||
targetid: "",
|
targetid: ""
|
||||||
taxAgentOption: []
|
|
||||||
};
|
};
|
||||||
this.tableRef = null;
|
this.tableRef = null;
|
||||||
this.addItemRef = null;
|
this.addItemRef = null;
|
||||||
|
|
@ -82,15 +80,11 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
getAdvanceCondition = async () => {
|
getAdvanceCondition = () => {
|
||||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
|
||||||
const { cumSituationStore: { form } } = this.props;
|
const { cumSituationStore: { form } } = this.props;
|
||||||
getCumSituationSaCondition().then(({ status, data }) => {
|
getCumSituationSaCondition().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||||
advanceCondition: removePropertyCondition(data.condition),
|
|
||||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
|
||||||
});
|
|
||||||
form.initFormFields(removePropertyCondition(data.condition));
|
form.initFormFields(removePropertyCondition(data.condition));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -148,11 +142,10 @@ class Index extends Component {
|
||||||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleAddData = async (title = "新建", editId = {}) => {
|
handleAddData = (title = "新建", editId = {}) => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
const { taxAgentStore, cumSituationStore: { addForm } } = this.props;
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { cumSituationStore: { addForm } } = this.props;
|
|
||||||
const { slidePayload } = this.state;
|
const { slidePayload } = this.state;
|
||||||
|
const { taxAgentOption } = taxAgentStore;
|
||||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -331,7 +324,8 @@ class Index extends Component {
|
||||||
* Date: 2023/2/17
|
* Date: 2023/2/17
|
||||||
*/
|
*/
|
||||||
getScreen = () => {
|
getScreen = () => {
|
||||||
const { declareMonth, year, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
|
const { declareMonth, year, taxAgentId, innerWidth } = this.state;
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
com: DataCollectionDatePicker({
|
com: DataCollectionDatePicker({
|
||||||
|
|
@ -395,8 +389,7 @@ class Index extends Component {
|
||||||
this.props.cumSituationStore.initAddForm();
|
this.props.cumSituationStore.initAddForm();
|
||||||
};
|
};
|
||||||
handleSaveData = () => {
|
handleSaveData = () => {
|
||||||
const { cumSituationStore: { addForm } } = this.props, { slidePayload } = this.state;
|
const { cumSituationStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
|
||||||
addForm.validateForm().then(f => {
|
addForm.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ class Layout extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
||||||
|
fetchTaxAgentOption();
|
||||||
window.addEventListener("resize", this.resizeUpdate);
|
window.addEventListener("resize", this.resizeUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -89,7 +91,7 @@ class Layout extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||||
const {
|
const {
|
||||||
title, btns, leftComp, children, taxAgentStore: { PageAndOptAuth },
|
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||||
slidePayload, onClose, form, condition, onImportFile,
|
slidePayload, onClose, form, condition, onImportFile,
|
||||||
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
|
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
@ -98,7 +100,6 @@ class Layout extends Component {
|
||||||
visible: importVisiable, importFormComponent, importOpts,
|
visible: importVisiable, importFormComponent, importOpts,
|
||||||
importResult, templateLink, previewUrl
|
importResult, templateLink, previewUrl
|
||||||
} = importPayload;
|
} = importPayload;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
return (
|
return (
|
||||||
<div className="layoutWrapper">
|
<div className="layoutWrapper">
|
||||||
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import { dataCollectCondition } from "./columns";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import { getDomkes } from "../../../util";
|
import { getDomkes } from "../../../util";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -65,8 +64,7 @@ class Index extends Component {
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
advanceCondition: null,
|
advanceCondition: null,
|
||||||
targetid: "",
|
targetid: ""
|
||||||
taxAgentOption: []
|
|
||||||
};
|
};
|
||||||
this.tableRef = null;
|
this.tableRef = null;
|
||||||
this.addItemRef = null;
|
this.addItemRef = null;
|
||||||
|
|
@ -83,15 +81,11 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
getAdvanceCondition = async () => {
|
getAdvanceCondition = () => {
|
||||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
|
||||||
const { otherDeductStore: { form } } = this.props;
|
const { otherDeductStore: { form } } = this.props;
|
||||||
getOtherDeductSaCondition().then(({ status, data }) => {
|
getOtherDeductSaCondition().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||||
advanceCondition: removePropertyCondition(data.condition),
|
|
||||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
|
||||||
});
|
|
||||||
form.initFormFields(removePropertyCondition(data.condition));
|
form.initFormFields(removePropertyCondition(data.condition));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -276,11 +270,10 @@ class Index extends Component {
|
||||||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleAddData = async (title = "新建", editId = {}) => {
|
handleAddData = (title = "新建", editId = {}) => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
const { taxAgentStore, otherDeductStore: { addForm } } = this.props;
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { otherDeductStore: { addForm } } = this.props;
|
|
||||||
const { slidePayload } = this.state;
|
const { slidePayload } = this.state;
|
||||||
|
const { taxAgentOption } = taxAgentStore;
|
||||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -366,7 +359,8 @@ class Index extends Component {
|
||||||
* Date: 2023/2/17
|
* Date: 2023/2/17
|
||||||
*/
|
*/
|
||||||
getScreen = () => {
|
getScreen = () => {
|
||||||
const { declareMonth, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
|
const { declareMonth, taxAgentId, innerWidth } = this.state;
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
com: DataCollectionDatePicker({
|
com: DataCollectionDatePicker({
|
||||||
|
|
@ -410,8 +404,7 @@ class Index extends Component {
|
||||||
this.props.otherDeductStore.initAddForm();
|
this.props.otherDeductStore.initAddForm();
|
||||||
};
|
};
|
||||||
handleSaveData = () => {
|
handleSaveData = () => {
|
||||||
const { otherDeductStore: { addForm } } = this.props, { slidePayload } = this.state;
|
const { otherDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
|
||||||
addForm.validateForm().then(f => {
|
addForm.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import { condition } from "./components/condition";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import { getDomkes } from "../../../util";
|
import { getDomkes } from "../../../util";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -54,8 +53,7 @@ class Index extends Component {
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
advanceCondition: null,
|
advanceCondition: null,
|
||||||
targetid: "",
|
targetid: ""
|
||||||
taxAgentOption: []
|
|
||||||
};
|
};
|
||||||
this.tableRef = null;
|
this.tableRef = null;
|
||||||
this.addItemRef = null;
|
this.addItemRef = null;
|
||||||
|
|
@ -107,15 +105,11 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
getAdvanceCondition = async () => {
|
getAdvanceCondition = () => {
|
||||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
|
||||||
const { specialAddStore: { advanceForm } } = this.props;
|
const { specialAddStore: { advanceForm } } = this.props;
|
||||||
getSearchCondition().then(({ status, data }) => {
|
getSearchCondition().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||||
advanceCondition: removePropertyCondition(data.condition),
|
|
||||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
|
||||||
});
|
|
||||||
advanceForm.initFormFields(removePropertyCondition(data.condition));
|
advanceForm.initFormFields(removePropertyCondition(data.condition));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -214,7 +208,8 @@ class Index extends Component {
|
||||||
* Date: 2023/2/17
|
* Date: 2023/2/17
|
||||||
*/
|
*/
|
||||||
getScreen = () => {
|
getScreen = () => {
|
||||||
const { taxAgentId, taxAgentOption } = this.state;
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
|
const { taxAgentId } = this.state;
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
com: DataCollectionSelect({
|
com: DataCollectionSelect({
|
||||||
|
|
@ -263,11 +258,10 @@ class Index extends Component {
|
||||||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleAddData = async (title = "新建", editId = {}) => {
|
handleAddData = (title = "新建", editId = {}) => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
const { taxAgentStore, specialAddStore: { addForm } } = this.props;
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { specialAddStore: { addForm } } = this.props;
|
|
||||||
const { slidePayload } = this.state;
|
const { slidePayload } = this.state;
|
||||||
|
const { taxAgentOption } = taxAgentStore;
|
||||||
const conditions = _.map(condition, (it, idx) => {
|
const conditions = _.map(condition, (it, idx) => {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -348,8 +342,7 @@ class Index extends Component {
|
||||||
this.props.specialAddStore.initAddForm();
|
this.props.specialAddStore.initAddForm();
|
||||||
};
|
};
|
||||||
handleSaveData = () => {
|
handleSaveData = () => {
|
||||||
const { specialAddStore: { addForm } } = this.props, { slidePayload } = this.state;
|
const { specialAddStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
|
||||||
addForm.validateForm().then(f => {
|
addForm.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -378,11 +371,10 @@ class Index extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2023/2/20
|
* Date: 2023/2/20
|
||||||
*/
|
*/
|
||||||
handleOpenImport = async () => {
|
handleOpenImport = () => {
|
||||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
|
||||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
|
||||||
const { importPayload } = this.state;
|
const { importPayload } = this.state;
|
||||||
const { importOpts } = importPayload;
|
const { importOpts } = importPayload;
|
||||||
|
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
this.setState({
|
this.setState({
|
||||||
importPayload: {
|
importPayload: {
|
||||||
...importPayload,
|
...importPayload,
|
||||||
|
|
@ -413,7 +405,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { specialAddStore: { advanceForm } } = this.props;
|
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||||
const {
|
const {
|
||||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
||||||
exportPayloadType, targetid
|
exportPayloadType, targetid
|
||||||
|
|
@ -435,6 +427,7 @@ class Index extends Component {
|
||||||
url="/api/bs/hrmsalary/specialAddDeduction/list"
|
url="/api/bs/hrmsalary/specialAddDeduction/list"
|
||||||
payload={tablePayload}
|
payload={tablePayload}
|
||||||
isSpecial
|
isSpecial
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
onTableOperate={this.handleTableOperate}
|
onTableOperate={this.handleTableOperate}
|
||||||
onViewDetails={(record) => this.handleAddData("专项附加扣除记录", record)}
|
onViewDetails={(record) => this.handleAddData("专项附加扣除记录", record)}
|
||||||
form={advanceForm}
|
form={advanceForm}
|
||||||
|
|
|
||||||
|
|
@ -1,171 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送
|
|
||||||
* 新增编辑
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/11/19
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTools } from "ecCom";
|
|
||||||
import PDetailDialog from "../PDDialog";
|
|
||||||
import { postFetch } from "../../../../util/request";
|
|
||||||
import * as API from "../../../../apis/datapush";
|
|
||||||
import { conditions } from "../../conditions";
|
|
||||||
import { Button, message, Modal } from "antd";
|
|
||||||
import { formRender } from "../../formRender";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
|
|
||||||
@inject("baseFormStore") @observer
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
conditions: [], loading: false, columns: [], dataSource: [],
|
|
||||||
PDDialog: { visible: false, title: "", settingId: "", detail: {} } //推送明细弹框
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
|
||||||
document.querySelector(".datapush_wrapper").classList.add("zIndex0-weaslide-title");
|
|
||||||
this.initForm(nextProps);
|
|
||||||
}
|
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
|
||||||
document.querySelector(".datapush_wrapper").classList.remove("zIndex0-weaslide-title");
|
|
||||||
this.props.baseFormStore.initForm();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
initForm = async (props) => {
|
|
||||||
const { detail } = props;
|
|
||||||
const { data: salarySobList } = await postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" });
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(conditions, item => ({
|
|
||||||
...item, title: getLabel(item.lanId, item.title), items: _.map(item.items, o => {
|
|
||||||
o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "" };
|
|
||||||
if (getKey(o) === "salarySobIds") {
|
|
||||||
return {
|
|
||||||
...o, value: detail[getKey(o)] ? detail[getKey(o)] : "",
|
|
||||||
options: _.map(salarySobList, o => ({ key: String(o.id), showname: o.name }))
|
|
||||||
};
|
|
||||||
} else if (getKey(o) === "able") {
|
|
||||||
return { ...o, value: !_.isEmpty(detail) ? String(detail[getKey(o)]) : o.value };
|
|
||||||
}
|
|
||||||
return { ...o };
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
}, () => {
|
|
||||||
props.baseFormStore.form.initFormFields(this.state.conditions);
|
|
||||||
!_.isEmpty(detail) && this.getPushItemList(props);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
getPushItemList = (props) => {
|
|
||||||
const { detail } = props || this.props;
|
|
||||||
const { id: settingId } = detail;
|
|
||||||
API.getPushItemList({ settingId }).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { columns, list: dataSource } = data;
|
|
||||||
this.setState({
|
|
||||||
dataSource, columns: [...columns, {
|
|
||||||
title: getLabel(111, "操作"), width: 120, render: (__, record) => (<React.Fragment>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={() => this.handleOpts("edit", record)}>{getLabel(111, "编辑")}</a>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={() => this.handleOpts("del", record.id)}>{getLabel(111, "删除")}</a>
|
|
||||||
</React.Fragment>)
|
|
||||||
}],
|
|
||||||
PDDialog: { ...this.state.PDDialog, settingId }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
handleOpts = (type, detail = {}) => {
|
|
||||||
switch (type) {
|
|
||||||
case "edit":
|
|
||||||
const { PDDialog } = this.state;
|
|
||||||
this.setState({ PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "编辑"), detail } });
|
|
||||||
break;
|
|
||||||
case "del":
|
|
||||||
Modal.confirm({
|
|
||||||
title: getLabel(111, "信息确认"),
|
|
||||||
content: getLabel(111, "确认要删除吗?"),
|
|
||||||
onOk: () => {
|
|
||||||
API.deletePushItemList({ id: detail }).then(({ status, errormsg }) => {
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(111, "删除成功"));
|
|
||||||
this.getPushItemList();
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
save = () => {
|
|
||||||
const { baseFormStore: { form }, detail } = this.props;
|
|
||||||
form.validateForm().then(f => {
|
|
||||||
if (f.isValid) {
|
|
||||||
const { salarySobIds, ...payload } = form.getFormParams();
|
|
||||||
this.setState({ loading: true });
|
|
||||||
API.savePushSetting({ ...payload, salarySobIds: salarySobIds.split(","), id: detail.id })
|
|
||||||
.then(({ status, errormsg }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(30700, "操作成功"));
|
|
||||||
this.props.onClose(this.props.onSearch());
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
}).catch(() => this.setState({ loading: false }));
|
|
||||||
} else {
|
|
||||||
f.showErrors();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
renderTitle = () => {
|
|
||||||
const { loading } = this.state, { title } = this.props;
|
|
||||||
return <div className="titleDialog">
|
|
||||||
<div className="titleCol titleLeftBox">
|
|
||||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
|
||||||
<div className="title">{title}</div>
|
|
||||||
</div>
|
|
||||||
<div className="titleCol titleRightBox">
|
|
||||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
|
||||||
</div>
|
|
||||||
</div>;
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { baseFormStore: { form }, detail } = this.props, { conditions, columns, dataSource, PDDialog } = this.state;
|
|
||||||
return (<WeaSlideModal
|
|
||||||
className="pushdata_create_dialog" {...this.props} direction="right"
|
|
||||||
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
|
|
||||||
content={<div className="form-dialog-layout">
|
|
||||||
{formRender(form, conditions)}
|
|
||||||
{!_.isEmpty(detail) &&
|
|
||||||
<WeaSearchGroup title={getLabel(111, "推送明细")} showGroup needTigger className="pushdata_detail">
|
|
||||||
<div className="opts">
|
|
||||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
|
||||||
onClick={() => this.setState({
|
|
||||||
PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "新建") }
|
|
||||||
})}/>
|
|
||||||
</div>
|
|
||||||
<WeaTable pagination={false} columns={columns} dataSource={dataSource} bordered/>
|
|
||||||
<PDetailDialog {...PDDialog} onSearch={this.getPushItemList}
|
|
||||||
onCancel={() => this.setState({ PDDialog: { ...PDDialog, visible: false, detail: {} } })}/>
|
|
||||||
</WeaSearchGroup>}
|
|
||||||
</div>}
|
|
||||||
/>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送
|
|
||||||
* 自定义薪资项目选择树
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/11/20
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
|
||||||
import { TreeSelect } from "antd";
|
|
||||||
import { formualSearchField, formualSearchGroup } from "../../../../apis/item";
|
|
||||||
import cs from "classnames";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
const TreeNode = TreeSelect.TreeNode;
|
|
||||||
|
|
||||||
class CustomTreeSelect extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = { sourceList: [] };
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
formualSearchGroup({ referenceType: "sql" }).then(({ status, data }) => {
|
|
||||||
if (status) this.setState({ sourceList: _.map(data, o => ({ ...o, isLeaf: true })) });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
getSourceItem = (sourceId) => {
|
|
||||||
formualSearchField({ sourceId, extendParam: { referenceType: "sql" } }).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
this.setState({
|
|
||||||
sourceList: _.map(this.state.sourceList, o => {
|
|
||||||
if (o.key === sourceId) return {
|
|
||||||
...o,
|
|
||||||
children: _.map(data, k => ({ key: k.fieldId, value: k.name, fieldType: k.fieldType, isLeaf: false }))
|
|
||||||
};
|
|
||||||
return { ...o };
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
generateTreeNodes = (data) => {
|
|
||||||
const treeNodes = [], showData = [...data];
|
|
||||||
showData.map((item) => {
|
|
||||||
let title = (
|
|
||||||
<div className="weapp-excel-code-action-list-variable">
|
|
||||||
<span className="weapp-excel-code-action-list-variable-name">{item.value}</span>
|
|
||||||
{
|
|
||||||
item.fieldType ?
|
|
||||||
<span
|
|
||||||
className={cs("weapp-excel-code-action-list-variable-tip", { "danger": item.fieldType === "string" })}>{item.fieldType === "number" ? getLabel(111, "数字") : getLabel(111, "文本")}</span> :
|
|
||||||
<span></span>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
treeNodes.push(<TreeNode className="no-child-item" title={title} key={item.key} value={item.key}/>);
|
|
||||||
});
|
|
||||||
return treeNodes;
|
|
||||||
};
|
|
||||||
handleSelect = (nodeValue) => {
|
|
||||||
const { form } = this.props, { sourceList } = this.state;
|
|
||||||
const [source, __] = nodeValue.split("_");
|
|
||||||
const itemName = _.find(_.find(sourceList, o => o.key === source).children, k => k.key === nodeValue).value;
|
|
||||||
form.updateFields({ item: nodeValue, itemName, source });
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { sourceList } = this.state, { detail } = this.props;
|
|
||||||
const { itemName } = detail;
|
|
||||||
return (
|
|
||||||
<TreeSelect dropdownStyle={{ maxHeight: 320, overflow: "auto" }} defaultValue={itemName}
|
|
||||||
dropdownMatchSelectWidth className="custom_item_treeselect"
|
|
||||||
loadData={(node) => this.getSourceItem(node.props.value)}
|
|
||||||
onSelect={this.handleSelect}>
|
|
||||||
{
|
|
||||||
_.map(sourceList, o => (
|
|
||||||
<TreeNode title={o.value} key={o.key} value={o.key} isLeaf={o.isLeaf} selectable={false}>
|
|
||||||
{this.generateTreeNodes(o.children || [])}
|
|
||||||
</TreeNode>))
|
|
||||||
}
|
|
||||||
</TreeSelect>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default CustomTreeSelect;
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送
|
|
||||||
* 推送明细新增编辑
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/11/20
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
|
||||||
import { commonEnumList } from "../../../../apis/ruleconfig";
|
|
||||||
import * as API from "../../../../apis/datapush";
|
|
||||||
import { PDConditions } from "../../conditions";
|
|
||||||
import { Button, message } from "antd";
|
|
||||||
import { formRender } from "../../formRender";
|
|
||||||
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
|
|
||||||
@inject("baseFormStore")
|
|
||||||
@observer
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
conditions: [], loading: false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
|
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.baseFormStore.initFormExtra();
|
|
||||||
}
|
|
||||||
|
|
||||||
initForm = async (props) => {
|
|
||||||
const { detail = {} } = props;
|
|
||||||
const { data: fieldType } = await commonEnumList({ enumClass: "com.engine.salary.enums.push.PushItemFieldEnum" });
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(PDConditions, item => ({
|
|
||||||
...item, items: _.map(item.items, o => {
|
|
||||||
o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "" };
|
|
||||||
if (getKey(o) === "fieldType") {
|
|
||||||
return {
|
|
||||||
...o, value: detail[getKey(o)] ? String(detail[getKey(o)]) : "",
|
|
||||||
options: _.map(fieldType, o => ({ key: o.enum, showname: o.defaultLabel }))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...o };
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
}, () => {
|
|
||||||
props.baseFormStore.formExtra.initFormFields(this.state.conditions);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
save = () => {
|
|
||||||
const { baseFormStore: { formExtra }, detail: { id }, settingId } = this.props;
|
|
||||||
formExtra.validateForm().then(f => {
|
|
||||||
if (f.isValid) {
|
|
||||||
const payload = formExtra.getFormParams();
|
|
||||||
this.setState({ loading: true });
|
|
||||||
API.savePushItemList({ ...payload, settingId, id })
|
|
||||||
.then(({ status, errormsg }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(30700, "操作成功"));
|
|
||||||
this.props.onCancel(this.props.onSearch());
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
}).catch(() => this.setState({ loading: false }));
|
|
||||||
} else {
|
|
||||||
f.showErrors();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { baseFormStore: { formExtra }, detail } = this.props, { loading, conditions } = this.state;
|
|
||||||
return (
|
|
||||||
<WeaDialog
|
|
||||||
{...this.props} style={{ width: 480, height: 174 }} initLoadCss className="Pdetail_dialog"
|
|
||||||
buttons={[
|
|
||||||
<Button onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>,
|
|
||||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "保存")}</Button>
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<div className="form-dialog-layout">{formRender(formExtra, conditions, detail)}</div>
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送列表
|
|
||||||
*
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/11/19
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
|
||||||
import * as API from "../../../../apis/datapush";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.getPushSettingList();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
|
||||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
|
||||||
}, () => this.getPushSettingList(nextProps));
|
|
||||||
}
|
|
||||||
|
|
||||||
getPushSettingList = (props) => {
|
|
||||||
const { pageInfo } = this.state, { query } = props || this.props;
|
|
||||||
const payload = { ...pageInfo, ...query };
|
|
||||||
this.setState({ loading: true });
|
|
||||||
API.getPushSettingList(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: _.map(dataSource, o => ({
|
|
||||||
...o, salarySobs: _.map(o.salarySobs, k => k.name).join(","),
|
|
||||||
salarySobIds: _.map(o.salarySobs, k => k.id).join(",")
|
|
||||||
})),
|
|
||||||
columns: [..._.map(columns, o => {
|
|
||||||
if (o.dataIndex === "able") return {
|
|
||||||
...o, render: v => (<WeaCheckbox value={String(v)} disabled display="switch"/>)
|
|
||||||
};
|
|
||||||
return { ...o };
|
|
||||||
}), {
|
|
||||||
title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => (<React.Fragment>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={() => this.props.onChange("edit", record)}>{getLabel(111, "编辑")}</a>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={() => this.props.onChange("del", record.id)}>{getLabel(111, "删除")}</a>
|
|
||||||
</React.Fragment>)
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { columns, dataSource, loading, pageInfo } = this.state;
|
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushSettingList());
|
|
||||||
},
|
|
||||||
onChange: current => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushSettingList());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
|
||||||
scroll={{ y: `calc(100vh - 182px)` }}/>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,149 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送记录
|
|
||||||
* 创建
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2025/4/15
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
|
||||||
import FormInfo from "../../../../components/FormInfo";
|
|
||||||
import { RQconditions } from "../../conditions";
|
|
||||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
|
||||||
import { getSalaryAcctList } from "../../../../apis/calculate";
|
|
||||||
import { createPushRecords } from "../../../../apis/datapush";
|
|
||||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
|
||||||
import { Button, message } from "antd";
|
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
const form = new WeaForm();
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
class CreatePushRecordDialog extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
|
||||||
conditions: []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(RQconditions, item => ({
|
|
||||||
...item,
|
|
||||||
items: _.map(item.items, o => {
|
|
||||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
|
||||||
if (getKey(o) === "startMonthStr") {
|
|
||||||
return {
|
|
||||||
...o, value: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM")
|
|
||||||
};
|
|
||||||
} else if (getKey(o) === "endMonthStr") {
|
|
||||||
return {
|
|
||||||
...o, value: moment(new Date()).endOf("year").format("YYYY-MM")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return o;
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
}, () => {
|
|
||||||
form.initFormFields(this.state.conditions);
|
|
||||||
this.getSalaryAcctList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
form.resetForm();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getSalaryAcctList = () => {
|
|
||||||
const { pageInfo } = this.state, payload = { ...pageInfo, ...form.getFormParams() };
|
|
||||||
this.setState({ loading: true });
|
|
||||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
|
||||||
this.setState({
|
|
||||||
dataSource, pageInfo: { current, pageSize, total },
|
|
||||||
columns: _.filter(columns, it => (it.dataIndex !== "backCalcStatus" && it.dataIndex !== "acctTimes" && it.dataIndex !== "operate"))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(() => this.setState({ loading: false }));
|
|
||||||
};
|
|
||||||
save = (record) => {
|
|
||||||
this.setState({ loading: true });
|
|
||||||
createPushRecords({ salaryAcctRecordIds: [record.id] }).then(({ status, errormsg }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(111, "操作成功!"));
|
|
||||||
this.props.onCancel(this.props.onSuccess);
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { loading, conditions, dataSource, columns, pageInfo } = this.state;
|
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryAcctList());
|
|
||||||
},
|
|
||||||
onChange: current => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getSalaryAcctList());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const itemRender = {
|
|
||||||
name: (field, textAreaProps, form, formParams) => {
|
|
||||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
|
||||||
onChange={_.debounce(() => this.getSalaryAcctList(), 500)}/>);
|
|
||||||
},
|
|
||||||
startMonthStr: () => null,
|
|
||||||
endMonthStr: () => null
|
|
||||||
};
|
|
||||||
const childrenComponents = {
|
|
||||||
startMonthStr: () => {
|
|
||||||
const { startMonthStr, endMonthStr } = form.getFormParams();
|
|
||||||
const coms = [], { fieldMap } = form;
|
|
||||||
const dateRange = [startMonthStr, endMonthStr];
|
|
||||||
coms.push(
|
|
||||||
<WeaFormItem label={<span>{fieldMap["startMonthStr"].label}</span>} labelCol={{ span: 6 }}
|
|
||||||
wrapperCol={{ span: 14 }}>
|
|
||||||
<MonthRangePicker dateRange={dateRange} viewAttr={2} onChange={v => {
|
|
||||||
const [v1, v2] = v;
|
|
||||||
form.updateFields({ startMonthStr: v1, endMonthStr: v2 });
|
|
||||||
this.getSalaryAcctList();
|
|
||||||
}}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
);
|
|
||||||
return [{ com: coms, col: 2 }];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const scrollHeight = this.refs.recordRef ? this.refs.recordRef.state.height - 162 : 606;
|
|
||||||
|
|
||||||
return (<WeaDialog {...this.props} initLoadCss className="record-dialog" title={getLabel(111, "创建推送记录")}
|
|
||||||
ref="recordRef"
|
|
||||||
style={{
|
|
||||||
width: 1000, height: 580, minHeight: 200, minWidth: 380, maxHeight: "70%", maxWidth: "90%",
|
|
||||||
overflow: "hidden", transform: "translate(0px, 0px)"
|
|
||||||
}} buttons={[
|
|
||||||
<Button onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>
|
|
||||||
]}>
|
|
||||||
<FormInfo className="record-form" center={false} itemRender={itemRender} colCount={2}
|
|
||||||
form={form} formFields={conditions} childrenComponents={childrenComponents}/>
|
|
||||||
<WeaTable className="wea-browser-table-cursor" rowKey="id" scroll={{ y: scrollHeight + "px" }}
|
|
||||||
dataSource={dataSource} loading={loading} pagination={pagination} columns={columns}
|
|
||||||
onRowClick={this.save}/>
|
|
||||||
</WeaDialog>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default CreatePushRecordDialog;
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送
|
|
||||||
* 推送记录
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2025/4/1
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
|
||||||
import * as API from "../../../../apis/datapush";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
|
||||||
selectedRowKeys: []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.getPushRecordList();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
this.setState({ selectedRowKeys: [] }, () => this.props.onChange("rowKey", []));
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
|
||||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
|
||||||
}, () => this.getPushRecordList(nextProps));
|
|
||||||
}
|
|
||||||
|
|
||||||
getPushRecordList = (props) => {
|
|
||||||
const { pageInfo } = this.state, { query } = props || this.props;
|
|
||||||
const payload = { ...pageInfo, ...query };
|
|
||||||
this.setState({ loading: true });
|
|
||||||
API.getPushRecordList(payload).then(({ status, data }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
|
||||||
this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
|
||||||
columns: [...columns, {
|
|
||||||
title: getLabel(111, "操作"), dataIndex: "opts", width: 140, render: (__, record) => (<React.Fragment>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={_.debounce(() => this.props.onChange("push", record), 300)}>{getLabel(111, "推送")}</a>
|
|
||||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
|
||||||
onClick={_.debounce(() => this.props.onChange("withdraw", record), 300)}>{getLabel(111, "撤回")}</a>
|
|
||||||
<a href="javascript: void(0);"
|
|
||||||
onClick={() => this.props.onChange("view", record)}>{getLabel(111, "查看详情")}</a>
|
|
||||||
</React.Fragment>)
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { columns, dataSource, loading, pageInfo, selectedRowKeys } = this.state;
|
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushRecordList());
|
|
||||||
},
|
|
||||||
onChange: current => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordList());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const rowSelection = {
|
|
||||||
selectedRowKeys,
|
|
||||||
onChange: v => this.setState({ selectedRowKeys: v }, () => this.props.onChange("rowKey", v))
|
|
||||||
};
|
|
||||||
return (<WeaTable rowKey="id" loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
|
||||||
rowSelection={rowSelection} scroll={{ y: `calc(100vh - 182px)` }}/>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
/*
|
|
||||||
* 推送记录
|
|
||||||
* 查看详情
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2025/4/2
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
|
||||||
import { getPushRecordDetail } from "../../../../apis/datapush";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
class PushDetailDialog extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPushRecordDetail(nextProps);
|
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
|
||||||
query: { name: "" }, pageInfo: { current: 1, pageSize: 10, total: 0 }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
getPushRecordDetail = (props) => {
|
|
||||||
const { recordId } = props || this.props, { pageInfo, query } = this.state;
|
|
||||||
const payload = { ...query, ...pageInfo, recordId };
|
|
||||||
this.setState({ loading: true });
|
|
||||||
getPushRecordDetail(payload).then(({ status, data }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
|
||||||
this.setState({ columns, dataSource, pageInfo: { current, pageSize, total } });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { query, loading, dataSource, columns, pageInfo } = this.state;
|
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushRecordDetail());
|
|
||||||
},
|
|
||||||
onChange: current => {
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordDetail());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (<WeaSlideModal
|
|
||||||
{...this.props} className="pushDetailDialog"
|
|
||||||
title={<WeaTop title={getLabel(111, "推送详情")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
|
||||||
buttons={[<WeaInputSearch value={query.name} onSearch={() => this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current: 1 }
|
|
||||||
}, () => this.getPushRecordDetail())}
|
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>]}/>
|
|
||||||
}
|
|
||||||
direction="right" top={0} width={800} height={100}
|
|
||||||
measureT="%" measureX="px" measureY="%"
|
|
||||||
content={<div className="pushDetail_content">
|
|
||||||
<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
|
||||||
scroll={{ y: `calc(100vh - 182px)` }}/>
|
|
||||||
</div>}
|
|
||||||
/>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PushDetailDialog;
|
|
||||||
|
|
@ -1,187 +0,0 @@
|
||||||
// 推送配置表单
|
|
||||||
export const conditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["name"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "任务名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SWITCH",
|
|
||||||
domkey: ["able"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "是否启用",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "0",
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["salarySobIds"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资账套",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
multiple: true,
|
|
||||||
options: [],
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "/api/bs/hrmsalary/push/mode/list",
|
|
||||||
dataParams: {},
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: true,
|
|
||||||
searchParamsKey: "name",
|
|
||||||
replaceDatas: [{}]
|
|
||||||
},
|
|
||||||
tags: true,
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["modeName"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "建模名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["tableName"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "数据表名",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["modeId"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "建模ID",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: "基础信息",
|
|
||||||
lanId: 111,
|
|
||||||
col: 2,
|
|
||||||
defaultshow: true
|
|
||||||
}
|
|
||||||
];// 推送配置表单
|
|
||||||
export const PDConditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["item"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资项目",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["itemName"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
viewAttr: 2,
|
|
||||||
hide: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["source"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资资源",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
viewAttr: 2,
|
|
||||||
hide: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["fieldName"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "字段名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["fieldType"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "字段类型",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
options: [],
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: "",
|
|
||||||
defaultshow: true
|
|
||||||
}
|
|
||||||
];// 推送详细配置表单
|
|
||||||
|
|
||||||
|
|
||||||
export const RQconditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "MONTHPICKER",
|
|
||||||
domkey: ["startMonthStr"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资所属月",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "MONTHPICKER",
|
|
||||||
domkey: ["endMonthStr"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资所属月",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["name"],
|
|
||||||
fieldcol: 14,
|
|
||||||
label: "薪资账套",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: "",
|
|
||||||
defaultshow: true
|
|
||||||
}
|
|
||||||
];// 推送记录查询表单
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
|
|
||||||
import { WeaSwitch } from "comsMobx";
|
|
||||||
import CustomTreeSelect from "./components/PDDialog/customTreeSelect";
|
|
||||||
import CustomBrowser from "../../components/CustomBrowser";
|
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
export const formRender = (form, conditions, params) => {
|
|
||||||
const { isFormInit } = form;
|
|
||||||
const formParams = form.getFormParams();
|
|
||||||
let group = [];
|
|
||||||
isFormInit && conditions && conditions.map(c => {
|
|
||||||
let items = [];
|
|
||||||
c.items.map(fields => {
|
|
||||||
items.push({
|
|
||||||
com: (
|
|
||||||
<WeaFormItem label={fields.label} labelCol={{ span: `${fields.labelcol}` }}
|
|
||||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
|
||||||
tipPosition="bottom">
|
|
||||||
{
|
|
||||||
getKey(fields) === "item" ?
|
|
||||||
<React.Fragment>
|
|
||||||
<CustomTreeSelect
|
|
||||||
detail={params} fieldConfig={fields} form={form} formParams={formParams}/>
|
|
||||||
{
|
|
||||||
_.isEmpty(formParams.item) &&
|
|
||||||
<span className="wea-required-e9" style={{ verticalAlign: "middle" }}>
|
|
||||||
<img src="/images/BacoError_wev9.png" alt=""/>
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
</React.Fragment>
|
|
||||||
:
|
|
||||||
getKey(fields) === "modeName" ?
|
|
||||||
<CustomBrowser fieldConfig={fields} form={form} formParams={formParams}
|
|
||||||
onCustomChange={(v) => !!_.values(v)[0] && form.updateFields({
|
|
||||||
tableName: _.values(v)[0].subname,
|
|
||||||
modeId: _.values(v)[0].domid
|
|
||||||
})}/>
|
|
||||||
: <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
|
||||||
}
|
|
||||||
</WeaFormItem>),
|
|
||||||
colSpan: 1,
|
|
||||||
hide: fields.hide
|
|
||||||
});
|
|
||||||
});
|
|
||||||
!_.isEmpty(items) && group.push(
|
|
||||||
<WeaSearchGroup col={c.col || 1} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
|
||||||
title={c.title}/>);
|
|
||||||
});
|
|
||||||
return group;
|
|
||||||
};
|
|
||||||
|
|
@ -1,175 +0,0 @@
|
||||||
/*
|
|
||||||
* 数据推送
|
|
||||||
*
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/11/19
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
|
||||||
import * as API from "../../apis/datapush";
|
|
||||||
import DatapushList from "./components/datapushList";
|
|
||||||
import PushRecord from "./components/pushRecord";
|
|
||||||
import DatapushDialog from "./components/DPDialog";
|
|
||||||
import PushDetailDialog from "./components/pushRecord/pushDetailDialog";
|
|
||||||
import { Button, message, Modal } from "antd";
|
|
||||||
import cs from "classnames";
|
|
||||||
import "./index.less";
|
|
||||||
import CreatePushRecordDialog from "./components/pushRecord/createPushRecordDialog";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject("taxAgentStore", "baseFormStore")
|
|
||||||
@observer
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
selectedKey: "pushRecord", isQuery: false, query: { name: "" }, selectedRowKeys: [],
|
|
||||||
loading: { push: false, withdraw: false }, visible: false,
|
|
||||||
DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框
|
|
||||||
pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
|
||||||
handleOperate = (type, detail = {}) => {
|
|
||||||
switch (type) {
|
|
||||||
case "create":
|
|
||||||
case "edit":
|
|
||||||
const title = type === "create" ? getLabel(111, "新建") : getLabel(111, "编辑");
|
|
||||||
this.setState({ DPDialog: { visible: true, title, detail } });
|
|
||||||
break;
|
|
||||||
case "del":
|
|
||||||
Modal.confirm({
|
|
||||||
title: getLabel(111, "信息确认"),
|
|
||||||
content: getLabel(111, "确认要删除吗?"),
|
|
||||||
onOk: () => {
|
|
||||||
API.deletePushSetting({ id: detail }).then(({ status, errormsg }) => {
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(111, "删除成功"));
|
|
||||||
this.handleAdvanceSearch();
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case "view":
|
|
||||||
this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } });
|
|
||||||
break;
|
|
||||||
case "rowKey":
|
|
||||||
this.setState({ selectedRowKeys: detail });
|
|
||||||
break;
|
|
||||||
case "addRecord":
|
|
||||||
this.setState({ visible: true });
|
|
||||||
break;
|
|
||||||
case "push":
|
|
||||||
case "batchpush":
|
|
||||||
if (type === "batchpush" && _.isEmpty(this.state.selectedRowKeys)) {
|
|
||||||
message.warning(getLabel(111, "请选择数据"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.pushRecords(type === "push" ? [detail.id] : this.state.selectedRowKeys);
|
|
||||||
break;
|
|
||||||
case "withdraw":
|
|
||||||
case "batchwithdraw":
|
|
||||||
if (type === "batchwithdraw" && _.isEmpty(this.state.selectedRowKeys)) {
|
|
||||||
message.warning(getLabel(111, "请选择数据"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.withdrawRecords(type === "withdraw" ? [detail.id] : this.state.selectedRowKeys);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
pushRecords = (ids) => {
|
|
||||||
this.setState({ loading: { ...this.state.loading, push: true } });
|
|
||||||
API.pushRecords({ ids }).then(({ status, errormsg }) => {
|
|
||||||
this.setState({ loading: { ...this.state.loading, push: false } });
|
|
||||||
if (status) {
|
|
||||||
this.handleAdvanceSearch();
|
|
||||||
message.success(getLabel(111, "推送成功!"));
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
withdrawRecords = (ids) => {
|
|
||||||
this.setState({ loading: { ...this.state.loading, withdraw: true } });
|
|
||||||
API.withdrawRecords({ ids }).then(({ status, errormsg }) => {
|
|
||||||
this.setState({ loading: { ...this.state.loading, withdraw: false } });
|
|
||||||
if (status) {
|
|
||||||
this.handleAdvanceSearch();
|
|
||||||
message.success(getLabel(111, "撤回成功!"));
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { selectedKey, DPDialog, isQuery, query, pushDetailDialog, loading, visible } = this.state;
|
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const tabs = [
|
|
||||||
{
|
|
||||||
title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [],
|
|
||||||
buttons: showOperateBtn ? [
|
|
||||||
<Button type="primary" onClick={() => this.handleOperate("addRecord")}
|
|
||||||
loading={loading.add}>{getLabel(111, "创建")}</Button>,
|
|
||||||
<Button type="primary" onClick={() => this.handleOperate("batchpush")}
|
|
||||||
loading={loading.push}>{getLabel(111, "批量推送")}</Button>,
|
|
||||||
<Button type="ghost" loading={loading.withdraw}
|
|
||||||
onClick={() => this.handleOperate("batchwithdraw")}>{getLabel(111, "批量撤回")}</Button>,
|
|
||||||
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>
|
|
||||||
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
|
||||||
children: <PushRecord isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [],
|
|
||||||
buttons: showOperateBtn ? [
|
|
||||||
<Button type="primary" onClick={() => this.handleOperate("create")}>{getLabel(111, "新建")}</Button>,
|
|
||||||
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>
|
|
||||||
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
|
||||||
children: <DatapushList isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
|
||||||
}
|
|
||||||
];
|
|
||||||
return (
|
|
||||||
<WeaReqTop
|
|
||||||
title={getLabel(111, "数据推送")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
|
||||||
iconBgcolor="#F14A2D" tabDatas={tabs}
|
|
||||||
className={cs("datapush_wrapper", { "reqZindex0": pushDetailDialog.visible })}
|
|
||||||
buttonSpace={10} buttons={_.find(tabs, o => selectedKey === o.key).buttons}
|
|
||||||
onChange={selectedKey => this.setState({
|
|
||||||
selectedKey, pushDetailDialog: { ...pushDetailDialog, visible: false },
|
|
||||||
DPDialog: { ...DPDialog, visible: false }
|
|
||||||
})}
|
|
||||||
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
|
|
||||||
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
|
|
||||||
>
|
|
||||||
{_.find(tabs, o => selectedKey === o.key).children}
|
|
||||||
{/*数据推送框*/}
|
|
||||||
<DatapushDialog {...DPDialog} onClose={() => this.setState({ DPDialog: { ...DPDialog, visible: false } })}
|
|
||||||
onSearch={this.handleAdvanceSearch}/>
|
|
||||||
{/*推送记录查看详情*/}
|
|
||||||
<PushDetailDialog {...pushDetailDialog} onClose={() => this.setState({
|
|
||||||
pushDetailDialog: { ...pushDetailDialog, visible: false }
|
|
||||||
})}/>
|
|
||||||
<CreatePushRecordDialog visible={visible} onSuccess={this.handleAdvanceSearch}
|
|
||||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
|
||||||
</WeaReqTop>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,194 +0,0 @@
|
||||||
.datapush_wrapper {
|
|
||||||
.wea-new-top-req-title > div:last-child {
|
|
||||||
right: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-new-top-req-content {
|
|
||||||
padding: 8px 16px 0 16px;
|
|
||||||
|
|
||||||
.wea-new-table {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-spin-nested-loading, .ant-spin-container {
|
|
||||||
height: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pushdata_create_dialog {
|
|
||||||
.scroller {
|
|
||||||
background: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pushdata_detail {
|
|
||||||
.opts {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-slide-modal-title {
|
|
||||||
border-bottom: 1px solid #ebebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleDialog {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 46px 0 16px;
|
|
||||||
|
|
||||||
.titleCol {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleLeftBox {
|
|
||||||
.titleIcon {
|
|
||||||
color: #fff;
|
|
||||||
margin: 0;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
font-size: 22px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: #F14A2D;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333;
|
|
||||||
padding-left: 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleRightBox {
|
|
||||||
justify-content: flex-end;
|
|
||||||
|
|
||||||
button:last-child {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pushDetailDialog {
|
|
||||||
.wea-slide-modal-content {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.wea-new-table {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pushDetail_content {
|
|
||||||
height: 100%;
|
|
||||||
background: #F6F6F6;
|
|
||||||
padding: 8px 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-slide-modal-title {
|
|
||||||
background: #FFF;
|
|
||||||
text-align: left;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-new-top {
|
|
||||||
background: #FFF;
|
|
||||||
|
|
||||||
.ant-col-10 {
|
|
||||||
padding-right: 50px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reqZindex0 {
|
|
||||||
.wea-new-top-req {
|
|
||||||
z-index: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom_item_treeselect {
|
|
||||||
.weapp-excel-code-action-list-variable-tip {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-child-item {
|
|
||||||
.ant-select-tree-switcher {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-select-tree-node-content-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.weapp-excel-code-action-list-variable {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.weapp-excel-code-action-list-variable-name {
|
|
||||||
height: 20px;
|
|
||||||
line-height: 18px;
|
|
||||||
-webkit-flex: 1 1;
|
|
||||||
flex: 1 1;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
word-break: keep-all;
|
|
||||||
white-space: nowrap;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.danger {
|
|
||||||
color: rgb(255, 102, 106) !important;
|
|
||||||
border: 1px solid rgb(255, 193, 195) !important;
|
|
||||||
background-color: rgb(255, 223, 224) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.weapp-excel-code-action-list-variable-tip {
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
line-height: 18px;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
color: rgb(255, 205, 80);
|
|
||||||
border: 1px solid rgb(255, 222, 138);
|
|
||||||
background-color: rgb(255, 245, 219);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.record-dialog {
|
|
||||||
.wea-dialog-body {
|
|
||||||
background: #f6f6f6;
|
|
||||||
padding: 8px 16px;
|
|
||||||
|
|
||||||
.record-form {
|
|
||||||
background: #FFF;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
|
|
||||||
.wea-search-group, .wea-content {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rangePickerBox {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-new-table {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,9 +9,9 @@ import { inject, observer } from "mobx-react";
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
import { Button, message } from "antd";
|
import { Button, message } from "antd";
|
||||||
import { getSearchs } from "../../../../util";
|
import { getSearchs } from "../../../../util";
|
||||||
|
import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
|
||||||
import { saveDeclare } from "../../../../apis/declare";
|
import { saveDeclare } from "../../../../apis/declare";
|
||||||
import { declareConditions } from "./condition";
|
import { declareConditions } from "./condition";
|
||||||
import { postFetch } from "../../../../util/request";
|
|
||||||
import * as API from "../../../../apis/ruleconfig";
|
import * as API from "../../../../apis/ruleconfig";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -35,31 +35,29 @@ class Index extends Component {
|
||||||
getTaxAgentSelectListAsAdmin = async (props) => {
|
getTaxAgentSelectListAsAdmin = async (props) => {
|
||||||
const { data: sysinfo } = await API.sysinfo();
|
const { data: sysinfo } = await API.sysinfo();
|
||||||
const { declareStore: { declareForm } } = props;
|
const { declareStore: { declareForm } } = props;
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
|
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||||
.then(({ status, data }) => {
|
if (status) {
|
||||||
if (status) {
|
this.setState({
|
||||||
this.setState({
|
conditions: _.map(declareConditions, item => ({
|
||||||
conditions: _.map(declareConditions, item => ({
|
...item,
|
||||||
...item,
|
items: _.map(item.items, o => {
|
||||||
items: _.map(item.items, o => {
|
if (getKey(o) === "taxAgentId") {
|
||||||
if (getKey(o) === "taxAgentId") {
|
return {
|
||||||
return {
|
...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
|
||||||
...o, label: getLabel(o.lanId, o.label),
|
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
|
||||||
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
|
};
|
||||||
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
|
} else if (getKey(o) === "salaryMonthStr") {
|
||||||
};
|
return {
|
||||||
} else if (getKey(o) === "salaryMonthStr") {
|
...o,
|
||||||
return {
|
label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
|
||||||
...o,
|
};
|
||||||
label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
|
}
|
||||||
};
|
return { ...o };
|
||||||
}
|
})
|
||||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
}))
|
||||||
})
|
}, () => declareForm.initFormFields(this.state.conditions));
|
||||||
}))
|
}
|
||||||
}, () => declareForm.initFormFields(this.state.conditions));
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
save = () => {
|
save = () => {
|
||||||
const { declareStore: { declareForm } } = this.props;
|
const { declareStore: { declareForm } } = this.props;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class Index extends Component {
|
||||||
return (
|
return (
|
||||||
<div className="salary-btn-flex">
|
<div className="salary-btn-flex">
|
||||||
<div className="mounth-range">
|
<div className="mounth-range">
|
||||||
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
<span className="label">{getLabel(111, "税款所属期:")}</span>
|
||||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { Dropdown, Menu, message, Modal } from "antd";
|
import { Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -35,18 +35,19 @@ class Index extends Component {
|
||||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getDeclareList = (props) => {
|
getDeclareList = async (props) => {
|
||||||
const { pageInfo } = this.state;
|
const { data: sysData } = await sysinfo();
|
||||||
const { queryParams } = props;
|
const { pageInfo } = this.state, { queryParams } = props;
|
||||||
const { dateRange, ...extra } = queryParams;
|
const { dateRange, ...extra } = queryParams;
|
||||||
const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
|
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
||||||
const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
|
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
||||||
const payload = { ...pageInfo, ...params };
|
const payload = { ...pageInfo, ...params };
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
getDeclareList(payload).then(({ status, data }) => {
|
getDeclareList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, list: dataSource, pageNum, pageSize, total } = data;
|
let { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||||
|
sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||||
columns: _.map(columns, o => {
|
columns: _.map(columns, o => {
|
||||||
|
|
@ -109,7 +110,7 @@ class Index extends Component {
|
||||||
{
|
{
|
||||||
dataIndex: "operate", title: getLabel(30585, "操作"),
|
dataIndex: "operate", title: getLabel(30585, "操作"),
|
||||||
width: 170, render: (__, record) => {
|
width: 170, render: (__, record) => {
|
||||||
const { id, opts = [] } = record;
|
const { id } = record;
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
<a
|
<a
|
||||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=${id}`}
|
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=${id}`}
|
||||||
|
|
@ -122,7 +123,7 @@ class Index extends Component {
|
||||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
showWithDrawBtn && opts.includes("admin") &&
|
showWithDrawBtn &&
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0);" style={{ marginLeft: 10 }}
|
href="javascript:void(0);" style={{ marginLeft: 10 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,7 @@ class Calculate extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCalculateOpts = () => {
|
renderCalculateOpts = () => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const { queryParams, isRefresh } = this.state;
|
const { queryParams, isRefresh } = this.state;
|
||||||
let calculateOpts = [
|
let calculateOpts = [
|
||||||
<Button type="primary" onClick={() => this.setState({
|
<Button type="primary" onClick={() => this.setState({
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
|
import { sysinfo } from "../../apis/ruleconfig";
|
||||||
import * as API from "../../apis/declare";
|
import * as API from "../../apis/declare";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.getDetailList();
|
this.getDetailList();
|
||||||
this.getDeclareInfo();
|
this.getDeclareInfo();
|
||||||
|
this.getSysinfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSysinfo = () => {
|
||||||
|
sysinfo().then(({ status, data: sysinfo }) => {
|
||||||
|
if (status) this.setState({ sysinfo });
|
||||||
|
});
|
||||||
|
};
|
||||||
getDetailList = () => {
|
getDetailList = () => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -64,9 +71,10 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
window.open(url, "_self");
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
renderTitle = () => {
|
renderTitle = () => {
|
||||||
const { declareInfo } = this.state;
|
const { declareInfo, sysinfo } = this.state;
|
||||||
|
const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
|
||||||
return (<React.Fragment>
|
return (<React.Fragment>
|
||||||
<span>{getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}</span>
|
<span>{title}:{declareInfo.salaryMonth}</span>
|
||||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||||
</React.Fragment>);
|
</React.Fragment>);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import { Spin } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||||
import { optionAddWhole } from "../../util/options";
|
import { optionAddWhole } from "../../util/options";
|
||||||
import { postFetch } from "../../util/request";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -25,8 +24,11 @@ class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false, taxAgentId: "", countResult: {}, dataSource: [], taxAgentOption: [],
|
loading: false,
|
||||||
|
taxAgentId: "",
|
||||||
|
countResult: {},
|
||||||
salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
|
salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
|
||||||
|
dataSource: [],
|
||||||
pageInfo: {
|
pageInfo: {
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -36,10 +38,8 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
||||||
.then(({ status, data }) => {
|
fetchTaxAgentOption();
|
||||||
if (status) this.setState({ taxAgentOption: _.map(data, o => ({ key: String(o.id), showname: o.name })) });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
@ -76,6 +76,7 @@ class Index extends Component {
|
||||||
dataSource, columns, showSum, pageInfo, countResult
|
dataSource, columns, showSum, pageInfo, countResult
|
||||||
}), "*");
|
}), "*");
|
||||||
};
|
};
|
||||||
|
|
||||||
statisticsEmployeeDetailList = () => {
|
statisticsEmployeeDetailList = () => {
|
||||||
const { params: { employeeId }, payrollFilesStore: { statisticsEmployeeDetailList } } = this.props;
|
const { params: { employeeId }, payrollFilesStore: { statisticsEmployeeDetailList } } = this.props;
|
||||||
const { taxAgentId, salaryMonth, pageInfo } = this.state;
|
const { taxAgentId, salaryMonth, pageInfo } = this.state;
|
||||||
|
|
@ -103,6 +104,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
|
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { dataSource, pageInfo, countResult } = this.state;
|
const { dataSource, pageInfo, countResult } = this.state;
|
||||||
const { payrollFilesStore: { employeeTableStore } } = this.props;
|
const { payrollFilesStore: { employeeTableStore } } = this.props;
|
||||||
|
|
@ -119,10 +121,13 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { location, taxAgentStore: { PageAndOptAuth }, payrollFilesStore: { employeeTableStore } } = this.props;
|
const {
|
||||||
const { salaryMonth, taxAgentId, loading, taxAgentOption } = this.state;
|
location,
|
||||||
|
taxAgentStore: { showOperateBtn, taxAgentOption },
|
||||||
|
payrollFilesStore: { employeeTableStore }
|
||||||
|
} = this.props;
|
||||||
|
const { salaryMonth, taxAgentId, loading } = this.state;
|
||||||
const { query: { dept, name } } = location;
|
const { query: { dept, name } } = location;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const btns = [
|
const btns = [
|
||||||
<MonthRangePicker viewAttr={2} dateRange={salaryMonth}
|
<MonthRangePicker viewAttr={2} dateRange={salaryMonth}
|
||||||
onChange={v => this.setState({ salaryMonth: v }, () => this.statisticsEmployeeDetailList())}/>,
|
onChange={v => this.setState({ salaryMonth: v }, () => this.statisticsEmployeeDetailList())}/>,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import SlideModalTitle from "../../../components/slideModalTitle";
|
||||||
import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage";
|
import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage";
|
||||||
import { commonEnumList } from "../../../apis/payrollFiles";
|
import { commonEnumList } from "../../../apis/payrollFiles";
|
||||||
import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options";
|
import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -45,17 +44,15 @@ class FieldSlide extends Component {
|
||||||
pattern: "2",
|
pattern: "2",
|
||||||
sortedIndex: "",
|
sortedIndex: "",
|
||||||
width: "",
|
width: "",
|
||||||
description: "",
|
description: ""
|
||||||
taxAgentOption: []
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const { taxAgentStore } = this.props;
|
||||||
this.commonEnumList();
|
this.commonEnumList();
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
|
const { fetchTaxAgentOption } = taxAgentStore;
|
||||||
.then(({ status, data }) => {
|
fetchTaxAgentOption();
|
||||||
if (status) this.setState({ taxAgentOption: _.map(data, o => ({ key: String(o.id), showname: o.name })) });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
|
@ -206,8 +203,13 @@ class FieldSlide extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { title, visible, record: { id: editId }, onCancel, taxAgentStore: { PageAndOptAuth } } = this.props;
|
const {
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
title,
|
||||||
|
visible,
|
||||||
|
record: { id: editId },
|
||||||
|
taxAgentStore: { taxAgentOption, showSalaryItemBtn, showOperateBtn },
|
||||||
|
onCancel
|
||||||
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
loading,
|
loading,
|
||||||
name,
|
name,
|
||||||
|
|
@ -222,8 +224,7 @@ class FieldSlide extends Component {
|
||||||
pattern,
|
pattern,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
width,
|
width,
|
||||||
description,
|
description
|
||||||
taxAgentOption
|
|
||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<WeaSlideModal
|
<WeaSlideModal
|
||||||
|
|
@ -240,7 +241,7 @@ class FieldSlide extends Component {
|
||||||
tabs={[]}
|
tabs={[]}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
showOperateBtn={true}
|
showOperateBtn={true}
|
||||||
editable={admin}
|
editable={(showSalaryItemBtn || showOperateBtn)}
|
||||||
onSave={this.saveFieldInfo}
|
onSave={this.saveFieldInfo}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,7 @@ class FieldTable extends Component {
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { columns } = this.state;
|
const { columns } = this.state;
|
||||||
const { taxAgentStore, onEditLedger, onDeleteLedger } = this.props;
|
const { taxAgentStore, onEditLedger, onDeleteLedger } = this.props;
|
||||||
const { PageAndOptAuth } = taxAgentStore;
|
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
|
||||||
return _.map([...columns, {
|
return _.map([...columns, {
|
||||||
dataIndex: "operate",
|
dataIndex: "operate",
|
||||||
display: true,
|
display: true,
|
||||||
|
|
@ -73,9 +72,9 @@ class FieldTable extends Component {
|
||||||
item.render = (text, record) => {
|
item.render = (text, record) => {
|
||||||
return <div className="optWrapper">
|
return <div className="optWrapper">
|
||||||
<a href="javascript:void(0);" className="mr10"
|
<a href="javascript:void(0);" className="mr10"
|
||||||
onClick={() => onEditLedger(record)}>{admin ? "编辑" : "查看"}</a>
|
onClick={() => onEditLedger(record)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}</a>
|
||||||
{
|
{
|
||||||
record.canDelete && admin &&
|
record.canDelete && (showSalaryItemBtn || showOperateBtn) &&
|
||||||
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
|
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
|
||||||
}
|
}
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,7 @@ class FieldManagement extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { searchVal, doSearch, slideparams, logDialogVisible, filterConditions } = this.state;
|
const { searchVal, doSearch, slideparams, logDialogVisible, filterConditions } = this.state;
|
||||||
const { taxAgentStore } = this.props;
|
const { taxAgentStore } = this.props;
|
||||||
const { PageAndOptAuth } = taxAgentStore;
|
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -101,7 +100,7 @@ class FieldManagement extends Component {
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" className="fieldManageWrapper"
|
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" className="fieldManageWrapper"
|
||||||
buttons={admin ? btns : btns.slice(-1)}
|
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
|
||||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||||
dropMenuDatas={[
|
dropMenuDatas={[
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,11 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaTable } from "ecCom";
|
import { WeaTable } from "ecCom";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import LedgerBackCalcEditSlide from "./ledgerBackCalcEditSlide";
|
import LedgerBackCalcEditSlide from "./ledgerBackCalcEditSlide";
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class LedgerBackCalculatedSalaryItemTable extends Component {
|
class LedgerBackCalculatedSalaryItemTable extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -53,8 +56,7 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { backCalcEditSlide } = this.state;
|
const { backCalcEditSlide } = this.state;
|
||||||
const { record, dataSource, editId, saveSalarySobId, key } = this.props;
|
const { taxAgentStore: { showOperateBtn }, dataSource, editId, saveSalarySobId, key } = this.props;
|
||||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
|
|
@ -76,7 +78,7 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
|
||||||
width: 80,
|
width: 80,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
const { canEdit } = record;
|
const { canEdit } = record;
|
||||||
return showOperateBtn ?
|
return (showOperateBtn && canEdit) ?
|
||||||
<a href="javascript: void(0);" onClick={() => this.handleEditBackCalc(record)}>编辑</a> :
|
<a href="javascript: void(0);" onClick={() => this.handleEditBackCalc(record)}>编辑</a> :
|
||||||
<span></span>;
|
<span></span>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,9 @@ import { duplicateLedger } from "../../../apis/ledger";
|
||||||
import { WeaDialog } from "ecCom";
|
import { WeaDialog } from "ecCom";
|
||||||
import { Button, message } from "antd";
|
import { Button, message } from "antd";
|
||||||
import { getSearchs } from "../../../util";
|
import { getSearchs } from "../../../util";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("ledgerStore")
|
@inject("ledgerStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
class CopyLedgerModal extends Component {
|
class CopyLedgerModal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -32,39 +31,42 @@ class CopyLedgerModal extends Component {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
const { ledgerStore, name, taxAgentId } = nextProps;
|
const { ledgerStore, name, taxAgentId } = nextProps;
|
||||||
const { copyForm: form } = ledgerStore;
|
const { copyForm: form } = ledgerStore;
|
||||||
form.updateFields({ name: { value: name }, taxAgentId: { value: taxAgentId } });
|
form.updateFields({
|
||||||
|
name: { value: name },
|
||||||
|
taxAgentId: { value: taxAgentId.toString() }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getTaxAgentSelectListAsAdmin = () => {
|
getTaxAgentSelectListAsAdmin = () => {
|
||||||
const { ledgerStore } = this.props;
|
const { taxAgentStore, ledgerStore } = this.props;
|
||||||
const { copyForm: form } = ledgerStore;
|
const { copyForm: form } = ledgerStore;
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||||
.then(({ status, data }) => {
|
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const conditions = _.map(copyConditions, it => {
|
const conditions = _.map(copyConditions, it => {
|
||||||
it.items = _.map(it.items, child => {
|
it.items = _.map(it.items, child => {
|
||||||
if (child.domkey[0] === "taxAgentId") {
|
if (child.domkey[0] === "taxAgentId") {
|
||||||
return {
|
return {
|
||||||
...child, options: _.map(data, it => ({ key: String(it.id), showname: it.name }))
|
...child,
|
||||||
};
|
options: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||||
} else {
|
};
|
||||||
return { ...child };
|
} else {
|
||||||
}
|
return { ...child };
|
||||||
});
|
}
|
||||||
return { ...it };
|
|
||||||
});
|
});
|
||||||
form.initFormFields(conditions);
|
return { ...it };
|
||||||
}
|
});
|
||||||
});
|
form.initFormFields(conditions);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
handleSubmit = () => {
|
handleSubmit = () => {
|
||||||
const { ledgerStore, id, onRefreshList, onCancel } = this.props;
|
const { ledgerStore, id, onRefreshList, onCancel } = this.props;
|
||||||
const { copyForm: form } = ledgerStore;
|
const { copyForm: form } = ledgerStore;
|
||||||
form.validateForm().then(f => {
|
form.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const { taxAgentId, ...formParams } = form.getFormParams();
|
const payload = { id, ...form.getFormParams() };
|
||||||
const payload = { id, ...formParams, taxAgentIds: taxAgentId.split(",") };
|
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
duplicateLedger(payload).then(({ status, errormsg }) => {
|
duplicateLedger(payload).then(({ status, errormsg }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
|
|
@ -82,6 +84,7 @@ class CopyLedgerModal extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { onCancel, ledgerStore, ...extra } = this.props;
|
const { onCancel, ledgerStore, ...extra } = this.props;
|
||||||
const { loading } = this.state;
|
const { loading } = this.state;
|
||||||
|
|
|
||||||
|
|
@ -95,14 +95,39 @@
|
||||||
|
|
||||||
//调薪计薪规则弹框
|
//调薪计薪规则弹框
|
||||||
.adjustRuleModalWrapper {
|
.adjustRuleModalWrapper {
|
||||||
.calcRules .cust {
|
.titleTipWrapper {
|
||||||
line-height: 30px;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
.child {
|
.title {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adjustRuleDetailWrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.adjustSalaryFlex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select-selection, .ant-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-select-selection {
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 回算薪资项目
|
// 回算薪资项目
|
||||||
|
|
@ -151,10 +176,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.wea-ignore-node i {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-sortable-grid-item {
|
.wea-sortable-grid-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -198,10 +219,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-table.wea-new-table-draggable table {
|
|
||||||
table-layout: fixed
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.titleWrapper {
|
.titleWrapper {
|
||||||
|
|
|
||||||
|
|
@ -61,11 +61,10 @@ class LedgerAccountApprRule extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderForm = (form, conditions) => {
|
renderForm = (form, conditions) => {
|
||||||
const { saveSalarySobId, editId, record } = this.props;
|
const { saveSalarySobId, editId } = this.props;
|
||||||
const { approvalItemGroup } = this.state;
|
const { approvalItemGroup } = this.state;
|
||||||
const { isFormInit } = form;
|
const { isFormInit } = form;
|
||||||
const formParams = form.getFormParams();
|
const formParams = form.getFormParams();
|
||||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
|
||||||
let group = [];
|
let group = [];
|
||||||
isFormInit && conditions && conditions.map(c => {
|
isFormInit && conditions && conditions.map(c => {
|
||||||
let items = [];
|
let items = [];
|
||||||
|
|
@ -77,8 +76,8 @@ class LedgerAccountApprRule extends Component {
|
||||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
tipPosition="bottom"
|
tipPosition="bottom"
|
||||||
>
|
>
|
||||||
<WeaSwitch fieldConfig={{ ...fields, viewAttr: showOperateBtn ? fields.viewAttr : 1 }} form={form}
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
formParams={formParams} onChange={this.handleFormItemChange}/>
|
onChange={this.handleFormItemChange}/>
|
||||||
</WeaFormItem>),
|
</WeaFormItem>),
|
||||||
hide: fields.hide
|
hide: fields.hide
|
||||||
});
|
});
|
||||||
|
|
@ -90,7 +89,6 @@ class LedgerAccountApprRule extends Component {
|
||||||
tipPosition="bottom"
|
tipPosition="bottom"
|
||||||
>
|
>
|
||||||
<LedgerAccountSalaryItemsSet datas={approvalItemGroup} salarySobId={editId || saveSalarySobId}
|
<LedgerAccountSalaryItemsSet datas={approvalItemGroup} salarySobId={editId || saveSalarySobId}
|
||||||
showOperateBtn={showOperateBtn}
|
|
||||||
onAddItems={(groupId, items) => this.setState({
|
onAddItems={(groupId, items) => this.setState({
|
||||||
approvalItemGroup: _.map(approvalItemGroup, o => ({
|
approvalItemGroup: _.map(approvalItemGroup, o => ({
|
||||||
...o,
|
...o,
|
||||||
|
|
|
||||||
|
|
@ -55,29 +55,26 @@ class LedgerAccountSalaryItemsSet extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { editDialog, salaryItemDialog } = this.state;
|
const { editDialog, salaryItemDialog } = this.state;
|
||||||
const { datas, showOperateBtn = true } = this.props;
|
const { datas } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ textAlign: "right", padding: "10px 0" }}>
|
<div style={{ textAlign: "right", padding: "10px 0" }}>
|
||||||
{
|
<WeaButtonIcon buttonType="add" type="primary"
|
||||||
showOperateBtn && <WeaButtonIcon buttonType="add" type="primary"
|
onClick={() => this.setState({
|
||||||
onClick={() => this.setState({
|
editDialog: { visible: true, title: getLabel(111, "添加分类") }
|
||||||
editDialog: { visible: true, title: getLabel(111, "添加分类") }
|
})}/>
|
||||||
})}/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div className={cs("salaryItemSettingWrapper", { required: _.isEmpty(datas) })}>
|
<div className={cs("salaryItemSettingWrapper", { required: _.isEmpty(datas) })}>
|
||||||
<WeaSortable
|
<WeaSortable
|
||||||
datas={_.map(datas, o => ({ ...o, filter: !showOperateBtn }))}
|
datas={datas}
|
||||||
onChange={list => this.props.onChange(list)}
|
onChange={list => this.props.onChange(list)}
|
||||||
renderNodeItem={(item) => {
|
renderNodeItem={(item) => {
|
||||||
return <div className="salaryItemWrapper">
|
return <div className="salaryItemWrapper">
|
||||||
<div className="salaryItemHeader">
|
<div className="salaryItemHeader">
|
||||||
<span className="titleWrapper">
|
<span className="titleWrapper">
|
||||||
<span className="salaryClassTitle">{item.groupName}</span>
|
<span className="salaryClassTitle">{item.groupName}</span>
|
||||||
{
|
<span className="iconWrapper">
|
||||||
showOperateBtn &&
|
|
||||||
<span className="iconWrapper">
|
|
||||||
<i className="icon-coms-edit" onClick={() => this.setState({
|
<i className="icon-coms-edit" onClick={() => this.setState({
|
||||||
editDialog: {
|
editDialog: {
|
||||||
visible: true, groupName: item.groupName, groupId: item.id, title: getLabel(111, "分类名称编辑")
|
visible: true, groupName: item.groupName, groupId: item.id, title: getLabel(111, "分类名称编辑")
|
||||||
|
|
@ -85,17 +82,14 @@ class LedgerAccountSalaryItemsSet extends Component {
|
||||||
})}/>
|
})}/>
|
||||||
<i className="icon-coms-Delete" onClick={() => this.handleDeleteClick(item)}/>
|
<i className="icon-coms-Delete" onClick={() => this.handleDeleteClick(item)}/>
|
||||||
</span>
|
</span>
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
{
|
<i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
|
||||||
showOperateBtn && <i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="salaryItemContent">
|
<div className="salaryItemContent">
|
||||||
{
|
{
|
||||||
!_.isEmpty(item.approvalItems) ?
|
!_.isEmpty(item.approvalItems) ?
|
||||||
<WeaSortable
|
<WeaSortable
|
||||||
datas={_.map(item.approvalItems, o => ({ ...o, filter: !showOperateBtn }))}
|
datas={item.approvalItems}
|
||||||
onChange={(items) => this.props.onChange(
|
onChange={(items) => this.props.onChange(
|
||||||
_.map(datas, child => {
|
_.map(datas, child => {
|
||||||
if (child.id === item.id) {
|
if (child.id === item.id) {
|
||||||
|
|
@ -108,10 +102,7 @@ class LedgerAccountSalaryItemsSet extends Component {
|
||||||
return <div className="salaryItemList">
|
return <div className="salaryItemList">
|
||||||
<div className="salaryItem" title={filed.salaryItemName}>
|
<div className="salaryItem" title={filed.salaryItemName}>
|
||||||
<div className="salaryItemName">{filed.salaryItemName}</div>
|
<div className="salaryItemName">{filed.salaryItemName}</div>
|
||||||
{
|
<Icon type="cross" onClick={() => this.handleDeleteClick(item, filed)}/>
|
||||||
showOperateBtn &&
|
|
||||||
<Icon type="cross" onClick={() => this.handleDeleteClick(item, filed)}/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -5,139 +5,170 @@
|
||||||
* Date: 2022/12/12
|
* Date: 2022/12/12
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||||
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
|
import { Button, Modal, Radio } from "antd";
|
||||||
import FormInfo from "../../../components/FormInfo";
|
import { monthDays } from "../config";
|
||||||
import { WeaSwitch } from "comsMobx";
|
|
||||||
import { Button } from "antd";
|
|
||||||
import { listSalarySobItem } from "../../../apis/ledger";
|
import { listSalarySobItem } from "../../../apis/ledger";
|
||||||
import { monthDays, ruleConditions } from "../config";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
|
|
||||||
@inject("ledgerStore")
|
|
||||||
@observer
|
|
||||||
class LedgerAdjustRuleAddModal extends Component {
|
class LedgerAdjustRuleAddModal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = { conditions: [] };
|
this.state = {
|
||||||
|
beforeAdjustmentType: 2,
|
||||||
|
afterAdjustmentType: 1,
|
||||||
|
salaryItemId: "",
|
||||||
|
salaryItemName: "",
|
||||||
|
dayOfMonth: "1",
|
||||||
|
salaryItemOptions: []
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.listSalarySobItem(nextProps.salarySobId);
|
if (nextProps.visible !== this.props.visible && nextProps.salarySobId) this.listSalarySobItem(nextProps.salarySobId);
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.ledgerStore.initRuleForm();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listSalarySobItem = (salarySobId) => {
|
listSalarySobItem = (salarySobId) => {
|
||||||
const { salaryRuleItemsList } = this.props;
|
const { salaryRuleItemsList } = this.props;
|
||||||
const payload = {
|
const payload = {
|
||||||
excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId), salarySobId
|
excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId),
|
||||||
|
salarySobId
|
||||||
};
|
};
|
||||||
listSalarySobItem(payload).then(({ status, data }) => {
|
listSalarySobItem(payload).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({
|
||||||
conditions: _.map(ruleConditions, item => ({
|
salaryItemOptions: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
|
||||||
...item, items: _.map(item.items, o => {
|
});
|
||||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
|
||||||
if (getKey(o) === "salaryItemId") {
|
|
||||||
return {
|
|
||||||
...o, options: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
|
|
||||||
};
|
|
||||||
} else if (getKey(o) === "dayOfMonth") {
|
|
||||||
return { ...o, options: monthDays };
|
|
||||||
} else if (getKey(o) === "beforeAdjustmentType" || getKey(o) === "afterAdjustmentType") {
|
|
||||||
return {
|
|
||||||
...o,
|
|
||||||
options: _.map(o.options, k => ({
|
|
||||||
...k,
|
|
||||||
showname: !k.helpfultip ? getLabel(k.lanId, k.showname) : <span>
|
|
||||||
<span style={{ marginRight: 4 }}>{getLabel(k.lanId, k.showname)}</span>
|
|
||||||
<WeaHelpfulTip title={`=${getLabel(k.helpfultiplanId, k.helpfultip)}`}/>
|
|
||||||
</span>
|
|
||||||
}))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return o;
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
}, () => this.props.ledgerStore.ruleForm.initFormFields(this.state.conditions));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleSave = () => {
|
handleSave = () => {
|
||||||
const { salaryRuleItemsList, onSave, ledgerStore: { ruleForm } } = this.props;
|
const { salaryRuleItemsList, onSave } = this.props;
|
||||||
ruleForm.validateForm().then(f => {
|
const { salaryItemOptions, ...extraItems } = this.state;
|
||||||
if (f.isValid) {
|
if (_.isEmpty(extraItems.salaryItemId)) {
|
||||||
const { salaryItemId } = ruleForm.getFormParams(), { fieldMap } = ruleForm;
|
Modal.warning({
|
||||||
const fields = _.map(salaryItemId.split(","), o => ({
|
title: "信息确认",
|
||||||
...ruleForm.getFormParams(),
|
content: "必要信息不完整,红色*为必填项!"
|
||||||
salaryItemId: o,
|
});
|
||||||
salaryItemName: _.find(fieldMap["salaryItemId"]["options"], k => k.key === o).showname
|
return;
|
||||||
}));
|
}
|
||||||
this.props.onCancel(onSave([...salaryRuleItemsList, ...fields]));
|
const items = { ...extraItems, salaryItemName: this.state.salaryItemName };
|
||||||
} else {
|
const { salaryItemName, salaryItemId, ...extraFileds } = items;
|
||||||
f.showErrors();
|
const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(",");
|
||||||
}
|
const fields = _.map(salaryItemNameFiled, (item, index) => {
|
||||||
|
return {
|
||||||
|
...extraFileds,
|
||||||
|
salaryItemName: item,
|
||||||
|
salaryItemId: salaryItemIdFiled[index]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
this.handleReset();
|
||||||
|
onSave([...salaryRuleItemsList, ...fields]);
|
||||||
|
};
|
||||||
|
handleReset = () => {
|
||||||
|
this.setState({
|
||||||
|
beforeAdjustmentType: 2,
|
||||||
|
afterAdjustmentType: 1,
|
||||||
|
salaryItemId: "",
|
||||||
|
salaryItemName: "",
|
||||||
|
dayOfMonth: "1",
|
||||||
|
salaryItemOptions: []
|
||||||
|
}, () => {
|
||||||
|
const { onCancel } = this.props;
|
||||||
|
onCancel();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
|
const {
|
||||||
const buttons = [<Button type="primary" onClick={this.handleSave}>{getLabel(111, "保存")}</Button>];
|
salaryItemId,
|
||||||
const itemRender = {
|
salaryItemOptions,
|
||||||
salaryItemId: (field, textAreaProps, form, formParams) => {
|
dayOfMonth,
|
||||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>);
|
beforeAdjustmentType,
|
||||||
},
|
afterAdjustmentType
|
||||||
dayOfMonth: () => null,
|
} = this.state;
|
||||||
beforeAdjustmentType: () => null,
|
const { title, visible } = this.props;
|
||||||
afterAdjustmentType: () => null
|
const buttons = [<Button type="primary" onClick={this.handleSave}>保存</Button>];
|
||||||
};
|
return (
|
||||||
const childrenComponents = {
|
<WeaDialog
|
||||||
salaryItemId: () => {
|
initLoadCss
|
||||||
const { dayOfMonth, beforeAdjustmentType, afterAdjustmentType } = ruleForm.getFormParams();
|
className="adjustRuleModalWrapper"
|
||||||
const coms = [], { fieldMap } = ruleForm;
|
title={title}
|
||||||
coms.push(
|
visible={visible}
|
||||||
<WeaFormItem label={<span>
|
style={{ width: 750 }}
|
||||||
<span className="title">{getLabel(111, "计薪规则")}</span>
|
buttons={buttons}
|
||||||
<WeaHelpfulTip
|
onCancel={this.handleReset}
|
||||||
title={getLabel(111, "该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算")}/>
|
>
|
||||||
</span>} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
<WeaSearchGroup col={1} needTigger title="" showGroup center>
|
||||||
<div className="cust">
|
<WeaFormItem label="薪资项目" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||||
<div className="child">
|
style={{ tableLayout: "fixed" }}>
|
||||||
<div className="lbl">{fieldMap["dayOfMonth"].label}</div>
|
<WeaSelect
|
||||||
<WeaSelect value={dayOfMonth} options={monthDays} style={{ width: 100 }}
|
multiple
|
||||||
onChange={v => ruleForm.updateFields({ dayOfMonth: { value: v } })}/>
|
viewAttr={3}
|
||||||
<div className="rbl">{getLabel(111, "(含)之前")}</div>
|
style={{ width: "350px" }}
|
||||||
|
options={salaryItemOptions}
|
||||||
|
value={salaryItemId}
|
||||||
|
onChange={(salaryItemId, salaryItemName) => this.setState({ salaryItemId, salaryItemName })}
|
||||||
|
/>
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
|
||||||
|
<div className="adjustRuleDetailWrapper">
|
||||||
|
<div className="adjustSalaryFlex">
|
||||||
|
<span>如果:调薪生效日期在</span>
|
||||||
|
<WeaSelect
|
||||||
|
viewAttr={3}
|
||||||
|
style={{ width: 60, margin: "0 6px" }}
|
||||||
|
value={dayOfMonth}
|
||||||
|
options={monthDays}
|
||||||
|
onChange={(dayOfMonth) => this.setState({ dayOfMonth })}
|
||||||
|
/>
|
||||||
|
<span>(含)之前</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="child">
|
<div className="adjustSalaryFlex">
|
||||||
<div className="lbl">{fieldMap["beforeAdjustmentType"].label}</div>
|
<span>计薪规则为:</span>
|
||||||
<WeaSelect value={beforeAdjustmentType} detailtype={fieldMap["beforeAdjustmentType"]["detailtype"]}
|
<Radio.Group onChange={(e) => this.setState({ beforeAdjustmentType: e.target.value })}
|
||||||
options={fieldMap["beforeAdjustmentType"]["options"]} style={{ flex: 1 }}
|
value={beforeAdjustmentType}>
|
||||||
onChange={v => ruleForm.updateFields({ beforeAdjustmentType: { value: v } })}/>
|
<Radio value={2}>取调整后薪资</Radio>
|
||||||
|
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||||
|
style={{ marginLeft: "10px" }}
|
||||||
|
width={200}
|
||||||
|
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||||
|
placement="topLeft"
|
||||||
|
/></Radio>
|
||||||
|
<Radio value={3}>取平均<WeaHelpfulTip
|
||||||
|
style={{ marginLeft: "10px" }}
|
||||||
|
width={200}
|
||||||
|
title="=(调整前薪资+调整后薪资)/2"
|
||||||
|
placement="topLeft"
|
||||||
|
/>
|
||||||
|
</Radio>
|
||||||
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
<div className="child">
|
<div style={{ marginBottom: 10 }}>否则:调薪生效日期在{dayOfMonth}号之后</div>
|
||||||
<div className="lbl">{getLabel(111, "否则:调薪生效日期在10号之后")}</div>
|
<div className="adjustSalaryFlex">
|
||||||
</div>
|
<span>计薪规则为:</span>
|
||||||
<div className="child">
|
<Radio.Group onChange={(e) => this.setState({ afterAdjustmentType: e.target.value })}
|
||||||
<div className="lbl">{fieldMap["afterAdjustmentType"].label}</div>
|
value={afterAdjustmentType}>
|
||||||
<WeaSelect value={afterAdjustmentType} detailtype={fieldMap["afterAdjustmentType"]["detailtype"]}
|
<Radio value={1}>取调整前薪资</Radio>
|
||||||
options={fieldMap["afterAdjustmentType"]["options"]} style={{ flex: 1 }}
|
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||||
onChange={v => ruleForm.updateFields({ afterAdjustmentType: { value: v } })}/>
|
style={{ marginLeft: "10px" }}
|
||||||
|
width={200}
|
||||||
|
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||||
|
placement="topLeft"
|
||||||
|
/></Radio>
|
||||||
|
<Radio value={3}>取平均<WeaHelpfulTip
|
||||||
|
style={{ marginLeft: "10px" }}
|
||||||
|
width={200}
|
||||||
|
title="=(调整前薪资+调整后薪资)/2"
|
||||||
|
placement="topLeft"
|
||||||
|
/>
|
||||||
|
</Radio>
|
||||||
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
);
|
</WeaSearchGroup>
|
||||||
return [{ com: <div className="calcRules">{coms}</div>, col: 1 }];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<WeaDialog {...this.props} initLoadCss style={{ width: 750, height: 236 }} buttons={buttons}
|
|
||||||
className="adjustRuleModalWrapper">
|
|
||||||
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
|
||||||
childrenComponents={childrenComponents} form={ruleForm} formFields={conditions}/>
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -145,3 +176,14 @@ class LedgerAdjustRuleAddModal extends Component {
|
||||||
|
|
||||||
export default LedgerAdjustRuleAddModal;
|
export default LedgerAdjustRuleAddModal;
|
||||||
|
|
||||||
|
const AdjustTitle = () => {
|
||||||
|
return <div className="titleTipWrapper">
|
||||||
|
<span className="title">计薪规则</span>
|
||||||
|
<WeaHelpfulTip
|
||||||
|
width={200}
|
||||||
|
title="该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算"
|
||||||
|
placement="topLeft"
|
||||||
|
/>
|
||||||
|
<span className="title">:</span>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* Date: 2022/12/12
|
* Date: 2022/12/12
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom";
|
import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom";
|
||||||
import PersonalScopeTable from "../../../components/PersonalScopeTable";
|
import PersonalScopeTable from "../../../components/PersonalScopeTable";
|
||||||
|
|
@ -36,6 +37,8 @@ const APISaveFox = {
|
||||||
edit: editLedgerPersonRange
|
edit: editLedgerPersonRange
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class LedgerAssociatedPersonnel extends Component {
|
class LedgerAssociatedPersonnel extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -221,8 +224,7 @@ class LedgerAssociatedPersonnel extends Component {
|
||||||
externalPersonModalVisible,
|
externalPersonModalVisible,
|
||||||
loading, extEmpsWitch
|
loading, extEmpsWitch
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { record, editId, saveSalarySobId } = this.props;
|
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
|
||||||
const admin = editId ? record.opts.includes("admin") : true;
|
|
||||||
const topTab = [
|
const topTab = [
|
||||||
{
|
{
|
||||||
title: "关联人员范围",
|
title: "关联人员范围",
|
||||||
|
|
@ -237,7 +239,7 @@ class LedgerAssociatedPersonnel extends Component {
|
||||||
viewcondition: "externalList"
|
viewcondition: "externalList"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
const btns = admin ? [
|
const btns = showOperateBtn ? [
|
||||||
<Button
|
<Button
|
||||||
className="icon-coms-leading-in-btn"
|
className="icon-coms-leading-in-btn"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -278,7 +280,7 @@ class LedgerAssociatedPersonnel extends Component {
|
||||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(topTab) : topTab}
|
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(topTab) : topTab}
|
||||||
keyParam="viewcondition" //主键
|
keyParam="viewcondition" //主键
|
||||||
selectedKey={selectedKey}
|
selectedKey={selectedKey}
|
||||||
buttons={admin && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
buttons={showOperateBtn && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
||||||
onChange={selectedKey => this.setState({ selectedKey })}
|
onChange={selectedKey => this.setState({ selectedKey })}
|
||||||
/>
|
/>
|
||||||
<PersonalScopeTable
|
<PersonalScopeTable
|
||||||
|
|
@ -287,7 +289,7 @@ class LedgerAssociatedPersonnel extends Component {
|
||||||
APIFox={APIFox}
|
APIFox={APIFox}
|
||||||
tabActive={selectedKey}
|
tabActive={selectedKey}
|
||||||
searchValue={searchValue}
|
searchValue={searchValue}
|
||||||
showOperateBtn={admin}
|
showOperateBtn={showOperateBtn}
|
||||||
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
||||||
onEditScope={this.handleAddPersonal}
|
onEditScope={this.handleAddPersonal}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,14 @@ class LedgerBackCalculatedSalaryItem extends Component {
|
||||||
_.map(backCalcItems, item => {
|
_.map(backCalcItems, item => {
|
||||||
const { key, label, helpContent, dataSource } = item;
|
const { key, label, helpContent, dataSource } = item;
|
||||||
return (
|
return (
|
||||||
<WeaSearchGroup key={key} needTigger showGroup
|
<WeaSearchGroup
|
||||||
title={<TitleComp title={label} helpContent={helpContent}/>}>
|
key={key}
|
||||||
|
needTigger
|
||||||
|
title={
|
||||||
|
<TitleComp title={label} helpContent={helpContent}/>
|
||||||
|
}
|
||||||
|
showGroup
|
||||||
|
>
|
||||||
<LedgerBackCalculatedSalaryItemTable
|
<LedgerBackCalculatedSalaryItemTable
|
||||||
{...this.props} dataSource={dataSource}
|
{...this.props} dataSource={dataSource}
|
||||||
key={key} onRefresh={this.getAggregate}
|
key={key} onRefresh={this.getAggregate}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import { baseSettingFormItem } from "../config";
|
import { baseSettingFormItem } from "../config";
|
||||||
import { getLedgerBasicForm } from "../../../apis/ledger";
|
import { getLedgerBasicForm } from "../../../apis/ledger";
|
||||||
import {
|
import {
|
||||||
|
|
@ -18,10 +19,11 @@ import {
|
||||||
prefixAddZero
|
prefixAddZero
|
||||||
} from "../../../util/date";
|
} from "../../../util/date";
|
||||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||||
import { postFetch } from "../../../util/request";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class LedgerBaseSetting extends Component {
|
class LedgerBaseSetting extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -88,11 +90,7 @@ class LedgerBaseSetting extends Component {
|
||||||
const { settingBaseInfo } = this.state;
|
const { settingBaseInfo } = this.state;
|
||||||
let tmpV = {};
|
let tmpV = {};
|
||||||
_.map(Object.keys(settingBaseInfo), key => {
|
_.map(Object.keys(settingBaseInfo), key => {
|
||||||
if (key === "taxAgentId") {
|
tmpV[key] = !_.isNil(basicForm[key]) ? basicForm[key].toString() : "";
|
||||||
tmpV[key] = _.map(basicForm["taxAgentIds"], it => it.toString()).join(",");
|
|
||||||
} else {
|
|
||||||
tmpV[key] = !_.isNil(basicForm[key]) ? basicForm[key].toString() : "";
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
settingBaseInfo: {
|
settingBaseInfo: {
|
||||||
|
|
@ -106,21 +104,23 @@ class LedgerBaseSetting extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getTaxAgentSelectListAsAdmin = () => {
|
getTaxAgentSelectListAsAdmin = () => {
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
const { taxAgentStore } = this.props;
|
||||||
.then(({ status, data }) => {
|
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||||
if (status) {
|
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||||
this.setState({
|
if (status) {
|
||||||
baseForm: _.map(baseSettingFormItem, it => {
|
this.setState({
|
||||||
if (it.key === "taxAgentId") {
|
baseForm: _.map(baseSettingFormItem, it => {
|
||||||
return {
|
if (it.key === "taxAgentId") {
|
||||||
...it, options: _.map(data, o => ({ key: String(o.id), showname: o.name }))
|
return {
|
||||||
};
|
...it,
|
||||||
}
|
options: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||||
return { ...it };
|
};
|
||||||
})
|
}
|
||||||
}, () => this.commonEenumList());
|
return { ...it };
|
||||||
}
|
})
|
||||||
});
|
}, () => this.commonEenumList());
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
commonEenumList = () => {
|
commonEenumList = () => {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -157,19 +157,18 @@ class LedgerBaseSetting extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { editId, record, PageAndOptAuth } = this.props;
|
const { editId, taxAgentStore: { taxAgentOption } } = this.props;
|
||||||
const { baseForm, settingBaseInfo } = this.state;
|
const { baseForm, settingBaseInfo } = this.state;
|
||||||
const { canEdit, taxAgentId } = settingBaseInfo;
|
const { canEdit, taxAgentId } = settingBaseInfo;
|
||||||
let taxAgentIdDisabled = false, taxableItemsDisabled = false;
|
let taxAgentIdDisabled = false, taxableItemsDisabled = false;
|
||||||
const admin = editId ? record.opts.includes("admin") : true;
|
|
||||||
return (
|
return (
|
||||||
<div className="baseSettingWrapper">
|
<div className="baseSettingWrapper">
|
||||||
<Row gutter={20}>
|
<Row gutter={20}>
|
||||||
<Col span={18} className="baseSettingLeft">
|
<Col span={18} className="baseSettingLeft">
|
||||||
{
|
{
|
||||||
_.map(baseForm, item => {
|
_.map(baseForm, item => {
|
||||||
const { key, label, type, options = [], children = [], multiple = false } = item;
|
const { key, label, type, options = [], children = [] } = item;
|
||||||
taxAgentIdDisabled = key === "taxAgentId" && editId && !PageAndOptAuth.isChief;
|
taxAgentIdDisabled = key === "taxAgentId" && editId && taxAgentId;
|
||||||
taxableItemsDisabled = key === "taxableItems" && editId;
|
taxableItemsDisabled = key === "taxableItems" && editId;
|
||||||
return <WeaFormItem
|
return <WeaFormItem
|
||||||
key={key} label={label}
|
key={key} label={label}
|
||||||
|
|
@ -177,10 +176,10 @@ class LedgerBaseSetting extends Component {
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
type === "INPUT" ?
|
type === "INPUT" ?
|
||||||
<WeaInput value={settingBaseInfo[key]} viewAttr={3} disabled={!admin}
|
<WeaInput value={settingBaseInfo[key]} viewAttr={3} disabled={canEdit !== "true"}
|
||||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||||
type === "TEXTAREA" ?
|
type === "TEXTAREA" ?
|
||||||
<WeaTextarea value={settingBaseInfo[key]} disabled={!admin}
|
<WeaTextarea value={settingBaseInfo[key]} disabled={canEdit !== "true"}
|
||||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||||
type === "CHECKBOX" ?
|
type === "CHECKBOX" ?
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
|
@ -190,11 +189,12 @@ class LedgerBaseSetting extends Component {
|
||||||
</React.Fragment> :
|
</React.Fragment> :
|
||||||
type === "SELECT" ?
|
type === "SELECT" ?
|
||||||
<WeaSelect value={settingBaseInfo[key]}
|
<WeaSelect value={settingBaseInfo[key]}
|
||||||
options={options} viewAttr={taxAgentIdDisabled ? 1 : 3} multiple={multiple}
|
options={((canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled) && key === "taxAgentId") ? taxAgentOption : options}
|
||||||
disabled={!admin || taxableItemsDisabled}
|
viewAttr={3}
|
||||||
|
disabled={canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled}
|
||||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||||
type === "CUSTOM" ?
|
type === "CUSTOM" ?
|
||||||
<CustomSelect list={children} baseInfo={settingBaseInfo} inputStr={key} admin={admin}
|
<CustomSelect list={children} baseInfo={settingBaseInfo} inputStr={key}
|
||||||
onChange={(key, v) => this.handleChangeField(key, v)}/> : null
|
onChange={(key, v) => this.handleChangeField(key, v)}/> : null
|
||||||
}
|
}
|
||||||
</WeaFormItem>;
|
</WeaFormItem>;
|
||||||
|
|
@ -211,7 +211,8 @@ class LedgerBaseSetting extends Component {
|
||||||
export default LedgerBaseSetting;
|
export default LedgerBaseSetting;
|
||||||
|
|
||||||
const CustomSelect = (props) => {
|
const CustomSelect = (props) => {
|
||||||
const { list, baseInfo, onChange, inputStr, admin } = props;
|
const { list, baseInfo, onChange, inputStr } = props;
|
||||||
|
const { canEdit } = baseInfo;
|
||||||
const selectInfo = buildEditBasicInfo(baseInfo);
|
const selectInfo = buildEditBasicInfo(baseInfo);
|
||||||
return <Row gutter={10} key={inputStr}>
|
return <Row gutter={10} key={inputStr}>
|
||||||
{
|
{
|
||||||
|
|
@ -219,7 +220,8 @@ const CustomSelect = (props) => {
|
||||||
const { key, options = [] } = item;
|
const { key, options = [] } = item;
|
||||||
return <Col span={6}>
|
return <Col span={6}>
|
||||||
<WeaSelect value={baseInfo[key]} options={options} viewAttr={3}
|
<WeaSelect value={baseInfo[key]} options={options} viewAttr={3}
|
||||||
disabled={!admin} onChange={(v) => onChange(key, v)}/>
|
disabled={canEdit !== "true"}
|
||||||
|
onChange={(v) => onChange(key, v)}/>
|
||||||
</Col>;
|
</Col>;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,14 @@
|
||||||
* Date: 2022/12/12
|
* Date: 2022/12/12
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaButtonIcon, WeaTab, WeaTable } from "ecCom";
|
import { WeaButtonIcon, WeaTab, WeaTable } from "ecCom";
|
||||||
import { Modal } from "antd";
|
import { Modal } from "antd";
|
||||||
import LedgerAdjustRuleAddModal from "./ledgerAdjustRuleAddModal";
|
import LedgerAdjustRuleAddModal from "./ledgerAdjustRuleAddModal";
|
||||||
import { listAdjustmentRule } from "../../../apis/ledger";
|
import { listAdjustmentRule } from "../../../apis/ledger";
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class LedgerSalaryAdjustmentRules extends Component {
|
class LedgerSalaryAdjustmentRules extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -89,10 +92,9 @@ class LedgerSalaryAdjustmentRules extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { record, editId, onSaveParams } = this.props;
|
const { taxAgentStore: { showOperateBtn }, editId, onSaveParams } = this.props;
|
||||||
const { adjustRuleAddModal } = this.state;
|
const { adjustRuleAddModal } = this.state;
|
||||||
const { dataSource } = this.state;
|
const { dataSource } = this.state;
|
||||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
|
||||||
const btns = showOperateBtn ? [
|
const btns = showOperateBtn ? [
|
||||||
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddAdjustRule}/>
|
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddAdjustRule}/>
|
||||||
] : [];
|
] : [];
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { dataSource, onChangeSortableList, onPreview, editId, record } = this.props;
|
const { dataSource, onChangeSortableList, onPreview } = this.props;
|
||||||
const admin = editId ? record.opts.includes("admin") : true;
|
|
||||||
const { empFieldListOptions } = this.state;
|
const { empFieldListOptions } = this.state;
|
||||||
const options = _.map(empFieldListOptions, o => ({
|
const options = _.map(empFieldListOptions, o => ({
|
||||||
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
||||||
|
|
@ -61,7 +60,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
||||||
<div className="userInfoWrapper">
|
<div className="userInfoWrapper">
|
||||||
<WeaSortable
|
<WeaSortable
|
||||||
datas={_.map(dataSource, o => ({ ...o, filter: !admin }))}
|
datas={dataSource}
|
||||||
draggableType="icon"
|
draggableType="icon"
|
||||||
onChange={onChangeSortableList}
|
onChange={onChangeSortableList}
|
||||||
renderNodeItem={(item) => {
|
renderNodeItem={(item) => {
|
||||||
|
|
@ -81,7 +80,6 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
className="wea-sortable-grid-item"
|
className="wea-sortable-grid-item"
|
||||||
/>
|
/>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
disabled={!admin}
|
|
||||||
showSearch
|
showSearch
|
||||||
options={options}
|
options={options}
|
||||||
style={{ width: 150 }}
|
style={{ width: 150 }}
|
||||||
|
|
|
||||||
|
|
@ -140,9 +140,9 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
onChangeSelectedRowKeys,
|
onChangeSelectedRowKeys,
|
||||||
onAddSalaryItems,
|
onAddSalaryItems,
|
||||||
incomeCategoriesTitleName,
|
incomeCategoriesTitleName,
|
||||||
record
|
taxAgentStore
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
const { showOperateBtn } = taxAgentStore;
|
||||||
const { categoryModal, addCategoryItemsVisible, moveModalPayload, salaryItemKeywords } = this.state;
|
const { categoryModal, addCategoryItemsVisible, moveModalPayload, salaryItemKeywords } = this.state;
|
||||||
const newDateSource = _.map(dataSource, item => {
|
const newDateSource = _.map(dataSource, item => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -182,7 +182,6 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
>
|
>
|
||||||
<LedgerSalaryItemTable
|
<LedgerSalaryItemTable
|
||||||
tableData={items}
|
tableData={items}
|
||||||
showOperateBtn={showOperateBtn}
|
|
||||||
dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
|
dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
|
||||||
salarySobId={editId || saveSalarySobId}
|
salarySobId={editId || saveSalarySobId}
|
||||||
selectedRowKeys={field.selectedRowKeys || []}
|
selectedRowKeys={field.selectedRowKeys || []}
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ class LedgerSalaryItemTable extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { salaryItemPayload, editFormulModal, originRecord } = this.state;
|
const { salaryItemPayload, editFormulModal, originRecord } = this.state;
|
||||||
const { onHandleItemhide, showOperateBtn } = this.props;
|
const { onHandleItemhide } = this.props;
|
||||||
const {
|
const {
|
||||||
tableData, dataSource, onDropCategoryItem,
|
tableData, dataSource, onDropCategoryItem,
|
||||||
onChangeSelectedRowKeys, selectedRowKeys, onMoveTo
|
onChangeSelectedRowKeys, selectedRowKeys, onMoveTo
|
||||||
|
|
@ -315,16 +315,16 @@ class LedgerSalaryItemTable extends Component {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaTable
|
<WeaTable
|
||||||
rowKey={record => record.id || record.key}
|
rowKey={record => record.id || record.key}
|
||||||
rowSelection={showOperateBtn ? rowSelection : null}
|
rowSelection={rowSelection}
|
||||||
dataSource={tableData}
|
dataSource={tableData}
|
||||||
columns={showOperateBtn ? columns : _.filter(columns, o => (o.dataIndex !== "operate" && o.dataIndex !== "itemHide"))}
|
columns={columns}
|
||||||
onRow={(record, index) => ({
|
onRow={(record, index) => ({
|
||||||
index,
|
index,
|
||||||
moveRow: record
|
moveRow: record
|
||||||
})}
|
})}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
onDrop={onDropCategoryItem}
|
onDrop={onDropCategoryItem}
|
||||||
draggable={dataSource.length === tableData.length && showOperateBtn}
|
draggable={dataSource.length === tableData.length}
|
||||||
/>
|
/>
|
||||||
<LedgerSalaryItemEditSlide
|
<LedgerSalaryItemEditSlide
|
||||||
{...salaryItemPayload}
|
{...salaryItemPayload}
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,12 @@ import { Button } from "antd";
|
||||||
import { WeaSwitch } from "comsMobx";
|
import { WeaSwitch } from "comsMobx";
|
||||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||||
import { searchConditions } from "../config";
|
import { searchConditions } from "../config";
|
||||||
import { postFetch } from "../../../util/request";
|
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
@inject("ledgerStore")
|
@inject("ledgerStore") @observer
|
||||||
@observer
|
|
||||||
class LedgerSearchComp extends Component {
|
class LedgerSearchComp extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -31,28 +30,26 @@ class LedgerSearchComp extends Component {
|
||||||
|
|
||||||
getTaxAgentSelectList = () => {
|
getTaxAgentSelectList = () => {
|
||||||
const { ledgerStore: { searchForm } } = this.props;
|
const { ledgerStore: { searchForm } } = this.props;
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
getTaxAgentSelectList().then(({ status, data }) => {
|
||||||
.then(({ status, data }) => {
|
if (status) {
|
||||||
if (status) {
|
this.setState({
|
||||||
this.setState({
|
conditions: _.map(searchConditions, o => {
|
||||||
conditions: _.map(searchConditions, o => {
|
return {
|
||||||
return {
|
...o, items: _.map(o.items, j => {
|
||||||
...o,
|
if (getKey(j) === "taxAgentId") {
|
||||||
items: _.map(o.items, j => {
|
return {
|
||||||
if (getKey(j) === "taxAgentId") {
|
...j, options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
|
||||||
return {
|
key: g.id, showname: g.content
|
||||||
...j, options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
|
}))]
|
||||||
key: String(g.id), showname: g.name
|
};
|
||||||
}))]
|
}
|
||||||
};
|
return { ...j };
|
||||||
}
|
})
|
||||||
return { ...j };
|
};
|
||||||
})
|
})
|
||||||
};
|
}, () => searchForm.initFormFields(this.state.conditions));
|
||||||
})
|
}
|
||||||
}, () => searchForm.initFormFields(this.state.conditions));
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
formRender = (form, condition) => {
|
formRender = (form, condition) => {
|
||||||
const { isFormInit } = form, formParams = form.getFormParams();
|
const { isFormInit } = form, formParams = form.getFormParams();
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import "./index.less";
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
const Step = WeaSteps.Step;
|
const Step = WeaSteps.Step;
|
||||||
|
|
||||||
@inject("ledgerStore")
|
@inject("taxAgentStore", "ledgerStore")
|
||||||
@observer
|
@observer
|
||||||
class LedgerSlide extends Component {
|
class LedgerSlide extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -67,18 +67,17 @@ class LedgerSlide extends Component {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
saveLedgerBasic({ ...extra, description, id: editId, taxAgentIds: extra.taxAgentId.split(",") })
|
saveLedgerBasic({ ...extra, description, id: editId }).then(({ status, data, errormsg }) => {
|
||||||
.then(({ status, data, errormsg }) => {
|
this.setState({ loading: false });
|
||||||
this.setState({ loading: false });
|
if (status) {
|
||||||
if (status) {
|
const { onRefreshList } = this.props;
|
||||||
const { onRefreshList } = this.props;
|
message.success("保存成功");
|
||||||
message.success("保存成功");
|
onRefreshList();
|
||||||
onRefreshList();
|
!editId && this.setState({ current: current + 1, saveSalarySobId: data });
|
||||||
!editId && this.setState({ current: current + 1, saveSalarySobId: data });
|
} else {
|
||||||
} else {
|
message.error(errormsg || "保存失败");
|
||||||
message.error(errormsg || "保存失败");
|
}
|
||||||
}
|
}).catch(() => this.setState({ loading: false }));
|
||||||
}).catch(() => this.setState({ loading: false }));
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
|
|
@ -199,7 +198,7 @@ class LedgerSlide extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { visible, editId, record } = this.props;
|
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state;
|
const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state;
|
||||||
let tabs = [
|
let tabs = [
|
||||||
{
|
{
|
||||||
|
|
@ -297,7 +296,7 @@ class LedgerSlide extends Component {
|
||||||
measure="%"
|
measure="%"
|
||||||
title={
|
title={
|
||||||
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||||
<WeaReqTitle buttons={record.opts.includes("admin") ? _.find(tabs, o => current === o.key).editBtns : []}
|
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||||
tabDatas={tabs} selectedKey={String(current)}
|
tabDatas={tabs} selectedKey={String(current)}
|
||||||
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class LedgerTable extends Component {
|
||||||
return <WeaCheckbox
|
return <WeaCheckbox
|
||||||
value={text === 0 ? "1" : "0"}
|
value={text === 0 ? "1" : "0"}
|
||||||
display="switch"
|
display="switch"
|
||||||
disabled={!record.opts.includes("admin")}
|
disabled={!showOperateBtn}
|
||||||
onChange={(disable) => this.changeLedgerStatus({ id: record.id, disable: disable === "0" ? 1 : 0 })}
|
onChange={(disable) => this.changeLedgerStatus({ id: record.id, disable: disable === "0" ? 1 : 0 })}
|
||||||
/>;
|
/>;
|
||||||
};
|
};
|
||||||
|
|
@ -80,14 +80,14 @@ class LedgerTable extends Component {
|
||||||
item.render = (text, record) => {
|
item.render = (text, record) => {
|
||||||
return <div className="optWrapper">
|
return <div className="optWrapper">
|
||||||
<a href="javascript:void(0);" className="mr10"
|
<a href="javascript:void(0);" className="mr10"
|
||||||
onClick={() => onEditLedger(record)}>{record.opts.includes("admin") ? "编辑" : "查看"}</a>
|
onClick={() => onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||||
{
|
{
|
||||||
record.opts.includes("admin") &&
|
showOperateBtn &&
|
||||||
<a href="javascript:void(0);" className="mr10"
|
<a href="javascript:void(0);" className="mr10"
|
||||||
onClick={() => this.handleMenuClick({ key: "copy" }, record)}>复制</a>
|
onClick={() => this.handleMenuClick({ key: "copy" }, record)}>复制</a>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
record.opts.includes("admin") &&
|
showOperateBtn &&
|
||||||
<Popover
|
<Popover
|
||||||
overlayClassName="moreIconWrapper"
|
overlayClassName="moreIconWrapper"
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
|
|
@ -148,15 +148,11 @@ class LedgerTable extends Component {
|
||||||
};
|
};
|
||||||
handleMenuClick = ({ key }, record) => {
|
handleMenuClick = ({ key }, record) => {
|
||||||
const { copyLedgerModal } = this.state;
|
const { copyLedgerModal } = this.state;
|
||||||
const { id, name, taxAgentIds } = record;
|
const { id, name, taxAgentId } = record;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "copy":
|
case "copy":
|
||||||
this.setState({
|
this.setState({
|
||||||
copyLedgerModal: {
|
copyLedgerModal: { ...copyLedgerModal, visible: true, id, name, taxAgentId }
|
||||||
...copyLedgerModal,
|
|
||||||
visible: true, id, name,
|
|
||||||
taxAgentId: _.map(taxAgentIds, o => String(o)).join(",")
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ export const copyConditions = [
|
||||||
fieldcol: 14,
|
fieldcol: 14,
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
label: "个税扣缴义务人",
|
label: "个税扣缴义务人",
|
||||||
multiple: true,
|
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
value: "",
|
value: "",
|
||||||
viewAttr: 3
|
viewAttr: 3
|
||||||
|
|
@ -87,7 +86,6 @@ export const baseSettingFormItem = [
|
||||||
key: "taxAgentId",
|
key: "taxAgentId",
|
||||||
label: "个税扣缴义务人",
|
label: "个税扣缴义务人",
|
||||||
type: "SELECT",
|
type: "SELECT",
|
||||||
multiple: true,
|
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -859,76 +857,3 @@ export const classifyConditions = [
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
export const ruleConditions = [//调薪计薪规则项表单
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["salaryItemId"],
|
|
||||||
fieldcol: 8,
|
|
||||||
rules: "required|string",
|
|
||||||
label: "薪资项目",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
multiple: true,
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["dayOfMonth"],
|
|
||||||
fieldcol: 6,
|
|
||||||
label: "如果:调薪生效日期在",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 0,
|
|
||||||
value: "1",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["beforeAdjustmentType"],
|
|
||||||
fieldcol: 6,
|
|
||||||
label: "计薪规则为:",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 0,
|
|
||||||
value: "2",
|
|
||||||
options: [
|
|
||||||
{ key: "2", showname: "取调整后薪资", lanId: 111 },
|
|
||||||
{
|
|
||||||
key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
|
|
||||||
helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "3", showname: "取平均", lanId: 111,
|
|
||||||
helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
|
|
||||||
}
|
|
||||||
],
|
|
||||||
detailtype: 3,
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["afterAdjustmentType"],
|
|
||||||
fieldcol: 6,
|
|
||||||
label: "计薪规则为:",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 0,
|
|
||||||
value: "1",
|
|
||||||
options: [
|
|
||||||
{ key: "1", showname: "取调整前薪资", lanId: 111 },
|
|
||||||
{
|
|
||||||
key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
|
|
||||||
helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "3", showname: "取平均", lanId: 111,
|
|
||||||
helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
|
|
||||||
}
|
|
||||||
],
|
|
||||||
detailtype: 3,
|
|
||||||
viewAttr: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
defaultshow: true
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
import { Button, Modal } from "antd";
|
import { Button } from "antd";
|
||||||
import LedgerTable from "./components/ledgerTable";
|
import LedgerTable from "./components/ledgerTable";
|
||||||
import LedgerSlide from "./components/ledgerSlide";
|
import LedgerSlide from "./components/ledgerSlide";
|
||||||
import LedgerSearchComp from "./components/ledgerSearchComp";
|
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||||
|
|
@ -23,19 +23,34 @@ class Index extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||||
slideparams: { visible: false, title: "新建账套", editId: "", record: {} }
|
slideparams: {
|
||||||
|
visible: false,
|
||||||
|
title: "新建账套",
|
||||||
|
editId: ""
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { taxAgentStore } = this.props;
|
||||||
|
const { fetchTaxAgentOption } = taxAgentStore;
|
||||||
|
fetchTaxAgentOption();
|
||||||
|
}
|
||||||
|
|
||||||
handleEditLedger = (record) => {
|
handleEditLedger = (record) => {
|
||||||
const { slideparams } = this.state;
|
const { slideparams } = this.state;
|
||||||
const { id } = record;
|
const { id } = record;
|
||||||
this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id, record } });
|
this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id } });
|
||||||
};
|
};
|
||||||
handleResetLedger = () => {
|
handleResetLedger = () => {
|
||||||
const { slideparams } = this.state;
|
const { slideparams } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
slideparams: { ...slideparams, visible: false, title: "新建账套", editId: "", record: {} }
|
slideparams: {
|
||||||
|
...slideparams,
|
||||||
|
visible: false,
|
||||||
|
title: "新建账套",
|
||||||
|
editId: ""
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onDropMenuClick = (key, targetid = "") => {
|
onDropMenuClick = (key, targetid = "") => {
|
||||||
|
|
@ -50,33 +65,21 @@ class Index extends Component {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleNewBuild = () => {
|
|
||||||
const { taxAgentStore } = this.props;
|
|
||||||
const { PageAndOptAuth } = taxAgentStore;
|
|
||||||
if (!PageAndOptAuth.isAdminEnable && !PageAndOptAuth.isChief) {
|
|
||||||
Modal.info({
|
|
||||||
title: getLabel(111, "提示"),
|
|
||||||
content: getLabel(111, "业务线人员新建账套后,需联系总管理员,将该账套加入所属业务线。"),
|
|
||||||
onOk: () => this.setState({ slideparams: { ...this.state.slideparams, visible: true } })
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setState({ slideparams: { ...this.state.slideparams, visible: true } });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
|
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
|
||||||
const { taxAgentStore } = this.props;
|
const { taxAgentStore } = this.props;
|
||||||
const { PageAndOptAuth } = taxAgentStore;
|
const { showOperateBtn } = taxAgentStore;
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={this.handleNewBuild}>{getLabel(111, "新建")}</Button>,
|
<Button type="primary" onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}>
|
||||||
|
{getLabel(111, "新建")}
|
||||||
|
</Button>,
|
||||||
<LedgerSearchComp onSearch={() => this.setState({ doSearch: !doSearch })}/>
|
<LedgerSearchComp onSearch={() => this.setState({ doSearch: !doSearch })}/>
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title="薪资账套" className="ledgerOuter" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
title="薪资账套" className="ledgerOuter" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
buttons={admin ? btns : btns.slice(-1)}
|
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
||||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||||
dropMenuDatas={[
|
dropMenuDatas={[
|
||||||
{
|
{
|
||||||
|
|
@ -89,7 +92,7 @@ class Index extends Component {
|
||||||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
|
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
|
||||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||||
<LedgerSlide
|
<LedgerSlide
|
||||||
{...slideparams} PageAndOptAuth={PageAndOptAuth}
|
{...slideparams}
|
||||||
onCancel={this.handleResetLedger}
|
onCancel={this.handleResetLedger}
|
||||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
handleGoFeedback = () => {
|
handleGoFeedback = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: getLabel(131329, "信息确认"),
|
title: getLabel(131329, "信息确认"),
|
||||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
content: getLabel(111, "确认是否发起反馈流程?"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { salaryBillToken } = this.state;
|
const { salaryBillToken } = this.state;
|
||||||
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,10 @@ import Content from "../../components/pcTemplate/content";
|
||||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
import { getQueryString } from "../../util/url";
|
||||||
|
|
||||||
|
const isPhone = /(iPhone|iPad|iPod|iOS|Android)/i.test(window.navigator.userAgent);
|
||||||
|
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
@inject("mySalaryStore")
|
@inject("mySalaryStore")
|
||||||
|
|
@ -57,7 +60,7 @@ class MySalaryView extends Component {
|
||||||
handleGoFeedback = () => {
|
handleGoFeedback = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: getLabel(131329, "信息确认"),
|
title: getLabel(131329, "信息确认"),
|
||||||
content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
content: getLabel(544271, "确认是否发起反馈流程?"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||||
|
|
@ -82,7 +85,18 @@ class MySalaryView extends Component {
|
||||||
const { captchaVisible, mySalaryStore } = this.state;
|
const { captchaVisible, mySalaryStore } = this.state;
|
||||||
const { params: { salaryInfoId } } = this.props;
|
const { params: { salaryInfoId } } = this.props;
|
||||||
if (_.isEmpty(mySalaryStore)) {
|
if (_.isEmpty(mySalaryStore)) {
|
||||||
return <div></div>;
|
return <div>
|
||||||
|
<CaptchaModal
|
||||||
|
visible={captchaVisible} id={salaryInfoId}
|
||||||
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
|
onConfirm={() => {
|
||||||
|
this.props.mySalaryStore.setInitEmVerify();
|
||||||
|
this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||||
|
this.setState({ mySalaryStore: data });
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
||||||
const salaryProps = {
|
const salaryProps = {
|
||||||
|
|
@ -104,11 +118,6 @@ class MySalaryView extends Component {
|
||||||
</Content>
|
</Content>
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
<CaptchaModal
|
|
||||||
visible={captchaVisible} id={salaryInfoId}
|
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
|
||||||
onConfirm={() => mySalaryStore.setInitEmVerify()}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -123,8 +132,8 @@ export const ConfirmBtns = (props) => {
|
||||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
props.showFeedback === "1" &&
|
((props.showFeedback === "1" && !isPhone) || (props.showFeedback === "1" && isEm)) &&
|
||||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||||
}
|
}
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
@ -31,6 +31,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
this.setState({ store: { ...this.state.store, loading: true } });
|
||||||
const { data: sysinfo } = await API.sysinfo();
|
const { data: sysinfo } = await API.sysinfo();
|
||||||
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
||||||
let tabs = [
|
let tabs = [
|
||||||
|
|
@ -39,7 +40,7 @@ class Index extends Component {
|
||||||
];
|
];
|
||||||
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
||||||
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
||||||
this.setState({ sysinfo, tabs }, () => {
|
this.setState({ sysinfo, tabs, store: { ...this.state.store, loading: false } }, () => {
|
||||||
const { tabs, store } = this.state;
|
const { tabs, store } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class WaterMarkSetModal extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state, { showOperateBtn } = this.props;
|
const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state;
|
||||||
return (
|
return (
|
||||||
<WeaSlideModal
|
<WeaSlideModal
|
||||||
{...this.props} className="waterMarkSetWrapper"
|
{...this.props} className="waterMarkSetWrapper"
|
||||||
|
|
@ -103,7 +103,7 @@ class WaterMarkSetModal extends Component {
|
||||||
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
||||||
<div style={{ display: "flex", alignItems: "center" }}>
|
<div style={{ display: "flex", alignItems: "center" }}>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
value={wmClassify} detailtype={3} viewAttr={showOperateBtn ? 2 : 1}
|
value={wmClassify} detailtype={3}
|
||||||
options={[
|
options={[
|
||||||
{ key: "text", showname: getLabel(111, "文本") },
|
{ key: "text", showname: getLabel(111, "文本") },
|
||||||
{ key: "image", showname: getLabel(111, "图片") }
|
{ key: "image", showname: getLabel(111, "图片") }
|
||||||
|
|
@ -119,11 +119,8 @@ class WaterMarkSetModal extends Component {
|
||||||
wmClassify === "text" ?
|
wmClassify === "text" ?
|
||||||
<WeaError tipPosition="bottom" ref="watermarkContError" error={getLabel(385869, "此项必填")}>
|
<WeaError tipPosition="bottom" ref="watermarkContError" error={getLabel(385869, "此项必填")}>
|
||||||
<div className="textSetting">
|
<div className="textSetting">
|
||||||
{
|
<i className="icon-coms-Flow-setting"
|
||||||
showOperateBtn &&
|
onClick={() => this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/>
|
||||||
<i className="icon-coms-Flow-setting"
|
|
||||||
onClick={() => this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/>
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
_.isEmpty(wmcontSet.textSet) ? <img src="/images/BacoError_wev9.png" alt=""/> :
|
_.isEmpty(wmcontSet.textSet) ? <img src="/images/BacoError_wev9.png" alt=""/> :
|
||||||
<span className="previewBtn txtPrew"
|
<span className="previewBtn txtPrew"
|
||||||
|
|
@ -162,24 +159,21 @@ class WaterMarkSetModal extends Component {
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
<WeaFormItem label={getLabel(111, "不透明(百分比)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
<WeaFormItem label={getLabel(111, "不透明(百分比)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
min={0} max={80} precision={2} value={wmNoTransparent} disabled={!showOperateBtn}
|
min={0} max={80} precision={2} value={wmNoTransparent}
|
||||||
onChange={wmNoTransparent => this.setState({ wmNoTransparent })}
|
onChange={wmNoTransparent => this.setState({ wmNoTransparent })}
|
||||||
/>
|
/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
<WeaFormItem label={getLabel(111, "旋转角度(逆时针)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
<WeaFormItem label={getLabel(111, "旋转角度(逆时针)")} labelCol={{ span: 5 }} wrapperCol={{ span: 10 }}>
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
min={0} max={360} precision={2} value={wmRotate} disabled={!showOperateBtn}
|
min={0} max={360} precision={2} value={wmRotate}
|
||||||
onChange={wmRotate => this.setState({ wmRotate })}
|
onChange={wmRotate => this.setState({ wmRotate })}
|
||||||
/>
|
/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
</WeaSearchGroup>
|
</WeaSearchGroup>
|
||||||
{
|
<div className="slideBottom">
|
||||||
showOperateBtn &&
|
<Button type="primary" onClick={this.handleCustomSave}>{getLabel(111, "确定")}</Button>
|
||||||
<div className="slideBottom">
|
<Button type="ghost" onClick={this.props.onClose}>{getLabel(111, "取消")}</Button>
|
||||||
<Button type="primary" onClick={this.handleCustomSave}>{getLabel(111, "确定")}</Button>
|
</div>
|
||||||
<Button type="ghost" onClick={this.props.onClose}>{getLabel(111, "取消")}</Button>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
{/* 水印内容设置弹框*/}
|
{/* 水印内容设置弹框*/}
|
||||||
<WmContentSetModal {...wmcontSet}
|
<WmContentSetModal {...wmcontSet}
|
||||||
onClose={textSet => this.setState({
|
onClose={textSet => this.setState({
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ class TemplateBaseSettings extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { showOperateBtn } = this.props;
|
|
||||||
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
|
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
|
||||||
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
|
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
|
||||||
const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
|
const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
|
||||||
|
|
@ -112,14 +111,14 @@ class TemplateBaseSettings extends Component {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaSearchGroup title={getLabel(111, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
<WeaSearchGroup title={getLabel(111, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
||||||
<WeaFormItem label={getLabel(111, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaCheckbox value={watermarkStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
|
<WeaCheckbox value={watermarkStatus} display="switch"
|
||||||
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
|
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
{
|
{
|
||||||
watermarkStatus === "1" &&
|
watermarkStatus === "1" &&
|
||||||
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
value={watermark} viewAttr={showOperateBtn ? 2 : 1}
|
value={watermark}
|
||||||
options={[
|
options={[
|
||||||
{ key: "DEFAULT", showname: getLabel(111, "系统默认水印") },
|
{ key: "DEFAULT", showname: getLabel(111, "系统默认水印") },
|
||||||
{ key: "CUSTOM", showname: getLabel(111, "自定义水印") }
|
{ key: "CUSTOM", showname: getLabel(111, "自定义水印") }
|
||||||
|
|
@ -135,7 +134,7 @@ class TemplateBaseSettings extends Component {
|
||||||
}
|
}
|
||||||
})}>{getLabel(111, "水印设置")}</span>
|
})}>{getLabel(111, "水印设置")}</span>
|
||||||
}
|
}
|
||||||
<WaterMarkSetModal {...watermarkSet} showOperateBtn={showOperateBtn}
|
<WaterMarkSetModal {...watermarkSet}
|
||||||
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
|
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
|
||||||
onChange={wmSetting => this.setState({ wmSetting })}
|
onChange={wmSetting => this.setState({ wmSetting })}
|
||||||
/>
|
/>
|
||||||
|
|
@ -144,7 +143,7 @@ class TemplateBaseSettings extends Component {
|
||||||
</WeaSearchGroup>
|
</WeaSearchGroup>
|
||||||
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger className="waterMarkWrapper">
|
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger className="waterMarkWrapper">
|
||||||
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaCheckbox value={ackStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
|
<WeaCheckbox value={ackStatus} display="switch"
|
||||||
onChange={ackStatus => this.setState({
|
onChange={ackStatus => this.setState({
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
...ackFeedbackSetting, ackStatus, autoAckDays: 7
|
...ackFeedbackSetting, ackStatus, autoAckDays: 7
|
||||||
|
|
@ -156,7 +155,7 @@ class TemplateBaseSettings extends Component {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
min={1} value={autoAckDays} viewAttr={3} disabled={!showOperateBtn}
|
min={1} value={autoAckDays} viewAttr={3}
|
||||||
style={{ width: "90%" }}
|
style={{ width: "90%" }}
|
||||||
onChange={autoAckDays => this.setState({
|
onChange={autoAckDays => this.setState({
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
|
|
@ -171,7 +170,7 @@ class TemplateBaseSettings extends Component {
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
<WeaFormItem label={getLabel(111, "启用工资单反馈")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "启用工资单反馈")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaCheckbox value={feedbackStatus} display="switch" viewAttr={showOperateBtn ? 2 : 1}
|
<WeaCheckbox value={feedbackStatus} display="switch"
|
||||||
onChange={feedbackStatus => this.setState({
|
onChange={feedbackStatus => this.setState({
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
...ackFeedbackSetting, feedbackStatus
|
...ackFeedbackSetting, feedbackStatus
|
||||||
|
|
@ -183,7 +182,7 @@ class TemplateBaseSettings extends Component {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaInput
|
<WeaInput
|
||||||
value={feedBackUrl} viewAttr={3} disabled={!showOperateBtn}
|
value={feedBackUrl} viewAttr={3}
|
||||||
onChange={feedBackUrl => this.setState({
|
onChange={feedBackUrl => this.setState({
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
...ackFeedbackSetting, feedBackUrl
|
...ackFeedbackSetting, feedBackUrl
|
||||||
|
|
@ -192,7 +191,7 @@ class TemplateBaseSettings extends Component {
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
<WeaFormItem label={getLabel(111, "移动端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
<WeaFormItem label={getLabel(111, "移动端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||||
<WeaInput
|
<WeaInput
|
||||||
value={mobileFeedbackUrl} viewAttr={3} disabled={!showOperateBtn}
|
value={mobileFeedbackUrl} viewAttr={3}
|
||||||
onChange={mobileFeedbackUrl => this.setState({
|
onChange={mobileFeedbackUrl => this.setState({
|
||||||
ackFeedbackSetting: {
|
ackFeedbackSetting: {
|
||||||
...ackFeedbackSetting, mobileFeedbackUrl
|
...ackFeedbackSetting, mobileFeedbackUrl
|
||||||
|
|
@ -208,12 +207,12 @@ class TemplateBaseSettings extends Component {
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
value={monthType} onChange={monthType => this.setState({
|
value={monthType} onChange={monthType => this.setState({
|
||||||
salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, monthType }
|
salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, monthType }
|
||||||
})} viewAttr={2} disabled={!showOperateBtn}
|
})}
|
||||||
options={[
|
options={[
|
||||||
{ key: "SALARY_DATE", showname: getLabel(111, "薪资所属月"), selected: true },
|
{ key: "SALARY_DATE", showname: getLabel(111, "薪资所属月"), selected: true },
|
||||||
{ key: "SEND_DATE", showname: getLabel(111, "发放日期") }
|
{ key: "SEND_DATE", showname: getLabel(111, "发放日期") }
|
||||||
]}/>
|
]}/>
|
||||||
<WeaInputNumber min={0} value={limitMonth} viewAttr={2} disabled={!showOperateBtn}
|
<WeaInputNumber min={0} value={limitMonth}
|
||||||
onChange={limitMonth => this.setState({
|
onChange={limitMonth => this.setState({
|
||||||
salaryBillViewingLimitSetting: {
|
salaryBillViewingLimitSetting: {
|
||||||
...salaryBillViewingLimitSetting, limitMonth
|
...salaryBillViewingLimitSetting, limitMonth
|
||||||
|
|
@ -227,7 +226,7 @@ class TemplateBaseSettings extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="agingBox">
|
<div className="agingBox">
|
||||||
<span>{getLabel(111, "首次查看")}</span>
|
<span>{getLabel(111, "首次查看")}</span>
|
||||||
<WeaInputNumber min={0} value={burningAfterReadingMin} viewAttr={2} disabled={!showOperateBtn}
|
<WeaInputNumber min={0} value={burningAfterReadingMin}
|
||||||
onChange={burningAfterReadingMin => this.setState({
|
onChange={burningAfterReadingMin => this.setState({
|
||||||
salaryBillViewingLimitSetting: {
|
salaryBillViewingLimitSetting: {
|
||||||
...salaryBillViewingLimitSetting, burningAfterReadingMin
|
...salaryBillViewingLimitSetting, burningAfterReadingMin
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { inject, observer } from "mobx-react";
|
||||||
import { getSearchs } from "../../../../util";
|
import { getSearchs } from "../../../../util";
|
||||||
import * as API from "../../../../apis/payrollFiles";
|
import * as API from "../../../../apis/payrollFiles";
|
||||||
import { salaryFileSearchConditions } from "../../config";
|
import { salaryFileSearchConditions } from "../../config";
|
||||||
import { postFetch } from "../../../../util/request";
|
import { getTaxAgentSelectList } from "../../../../apis/taxAgent";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -29,7 +29,7 @@ class salaryFileAdvanceSearchPannel extends Component {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
const [{ data: userStatusList }, { data: taxAgentList }] = await Promise.all([
|
const [{ data: userStatusList }, { data: taxAgentList }] = await Promise.all([
|
||||||
API.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }),
|
API.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }),
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
getTaxAgentSelectList()
|
||||||
]);
|
]);
|
||||||
this.setState({
|
this.setState({
|
||||||
searchConditions: _.map(salaryFileSearchConditions, item => {
|
searchConditions: _.map(salaryFileSearchConditions, item => {
|
||||||
|
|
@ -44,7 +44,7 @@ class salaryFileAdvanceSearchPannel extends Component {
|
||||||
} else if (getKey(child) === "taxAgentIds") {
|
} else if (getKey(child) === "taxAgentIds") {
|
||||||
return {
|
return {
|
||||||
...child,
|
...child,
|
||||||
options: _.map(taxAgentList, o => ({ key: String(o.id), showname: o.name }))
|
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { ...child };
|
return { ...child };
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const APILIST = {
|
||||||
cancelSalarySuspension: API.cancelStop //取消停薪
|
cancelSalarySuspension: API.cancelStop //取消停薪
|
||||||
};
|
};
|
||||||
|
|
||||||
@inject("payrollFilesStore")
|
@inject("payrollFilesStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -100,12 +100,12 @@ class Index extends Component {
|
||||||
case "CHANGE-SALARY":
|
case "CHANGE-SALARY":
|
||||||
case "VIEW":
|
case "VIEW":
|
||||||
case "EDIT":
|
case "EDIT":
|
||||||
const { selectedKey: runStatuses } = this.props;
|
const { taxAgentStore: { showOperateBtn }, selectedKey: runStatuses } = this.props;
|
||||||
const { record: { id: salaryArchiveId, opts } } = params;
|
const { record: { id: salaryArchiveId } } = params;
|
||||||
this.setState({
|
this.setState({
|
||||||
salaryFilesEditSlide: {
|
salaryFilesEditSlide: {
|
||||||
...this.state.salaryFilesEditSlide, visible: true, salaryArchiveId,
|
...this.state.salaryFilesEditSlide, visible: true, salaryArchiveId,
|
||||||
runStatuses, showOperateBtn: opts.includes("admin")
|
runStatuses, showOperateBtn
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -172,7 +172,7 @@ class Index extends Component {
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { payrollFilesStore: { tableStore } } = this.props;
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||||
dataIndex: it.dataIndex, title: it.title, align: "left",
|
dataIndex: it.dataIndex, title: it.title, align: "left",
|
||||||
width: (it.dataIndex === "taxAgentName" || it.dataIndex === "operate") ? 185 : 150,
|
width: (it.dataIndex === "taxAgentName" || it.dataIndex === "operate") ? 185 : 150,
|
||||||
|
|
@ -181,7 +181,7 @@ class Index extends Component {
|
||||||
}));
|
}));
|
||||||
if (!_.isEmpty(columns)) {
|
if (!_.isEmpty(columns)) {
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
columns, selectedKey: this.props.selectedKey,
|
columns, showOperateBtn, selectedKey: this.props.selectedKey,
|
||||||
showDelSalaryFileBtn: this.props.showDelSalaryFileBtn,
|
showDelSalaryFileBtn: this.props.showDelSalaryFileBtn,
|
||||||
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
|
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
|
||||||
showSum: false, pageInfo: this.state.pageInfo
|
showSum: false, pageInfo: this.state.pageInfo
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return showOperateBtn ? menus : _.filter(menus, o => (o.key === "custom_cols" || o.key === "log"));
|
return showOperateBtn ? menus : _.filter(menus, o => o.key === "custom_cols");
|
||||||
};
|
};
|
||||||
|
|
||||||
export const salaryFileSearchConditions = [
|
export const salaryFileSearchConditions = [
|
||||||
|
|
@ -449,7 +449,7 @@ export const salaryFilesConditions = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
defaultshow: true, title: getLabel(543329, "发薪设置"),
|
defaultshow: true, title: getLabel(543329, "发薪设置"),
|
||||||
col: 1, lanId: 543329,
|
col: 1,lanId: 543329,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
|
|
@ -480,7 +480,7 @@ export const salaryFilesConditions = [
|
||||||
defaultshow: true, title: getLabel(538004, "薪资档案"),
|
defaultshow: true, title: getLabel(538004, "薪资档案"),
|
||||||
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
|
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
|
||||||
titleHelpfulLanId: 543330,
|
titleHelpfulLanId: 543330,
|
||||||
col: 2, salaryFile: true, lanId: 538004,
|
col: 2, salaryFile: true,lanId: 538004,
|
||||||
items: []
|
items: []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -247,16 +247,15 @@ class SalaryFiles extends Component {
|
||||||
selectedKey, topTabCount, showSearchAd, isQuery, showDelSalaryFileBtn, showExtEmpsWitch,
|
selectedKey, topTabCount, showSearchAd, isQuery, showDelSalaryFileBtn, showExtEmpsWitch,
|
||||||
salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions
|
salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
|
const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
|
||||||
return (
|
return (
|
||||||
<div className="salary-files-wrapper">
|
<div className="salary-files-wrapper">
|
||||||
<WeaReqTop
|
<WeaReqTop
|
||||||
title={getLabel(538004, "薪资档案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
title={getLabel(538004, "薪资档案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||||
iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
|
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
|
||||||
dropMenuDatas={renderDropMenuDatas(selectedKey, admin)}
|
onDropMenuClick={this.onDropMenuClick}
|
||||||
buttons={renderReqBtns(selectedKey, salaryImportTypes, this.handleReqBtnsCLick, admin)}
|
buttons={renderReqBtns(selectedKey, salaryImportTypes, this.handleReqBtnsCLick, showOperateBtn)}
|
||||||
replaceTab={
|
replaceTab={
|
||||||
<WeaTab
|
<WeaTab
|
||||||
datas={!showExtEmpsWitch ? _.dropRight(tabs) : tabs} autoCalculateWidth
|
datas={!showExtEmpsWitch ? _.dropRight(tabs) : tabs} autoCalculateWidth
|
||||||
|
|
@ -275,7 +274,7 @@ class SalaryFiles extends Component {
|
||||||
</div>
|
</div>
|
||||||
{/*列表*/}
|
{/*列表*/}
|
||||||
<SalaryFileList isQuery={isQuery} ref={dom => this.salaryFileListRef = dom}
|
<SalaryFileList isQuery={isQuery} ref={dom => this.salaryFileListRef = dom}
|
||||||
selectedKey={selectedKey} showOperateBtn={admin}
|
selectedKey={selectedKey} showOperateBtn={showOperateBtn}
|
||||||
showDelSalaryFileBtn={showDelSalaryFileBtn}
|
showDelSalaryFileBtn={showDelSalaryFileBtn}
|
||||||
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
||||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* Date: 2023/10/12
|
* Date: 2023/10/12
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { Dropdown, Menu, message, Tag } from "antd";
|
import { Dropdown, Menu, message, Tag } from "antd";
|
||||||
import { getPayrollList } from "../../../../apis/payroll";
|
import { getPayrollList } from "../../../../apis/payroll";
|
||||||
|
|
@ -12,6 +13,8 @@ import moment from "moment";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -97,6 +100,7 @@ class Index extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, dataSource, columns, pageInfo } = this.state;
|
const { loading, dataSource, columns, pageInfo } = this.state;
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||||
|
|
@ -128,7 +132,7 @@ class Index extends Component {
|
||||||
const showGrant = haveBackCalc === 1 && salaryAcctType === 0;
|
const showGrant = haveBackCalc === 1 && salaryAcctType === 0;
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
{
|
{
|
||||||
record.opts.includes("admin") &&
|
showOperateBtn &&
|
||||||
<a
|
<a
|
||||||
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${id}&ackFeedbackStatus=${ackFeedbackStatus}`}
|
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${id}&ackFeedbackStatus=${ackFeedbackStatus}`}
|
||||||
style={{ marginRight: 10 }} target="_blank">{getLabel(542702, "发放")}</a>
|
style={{ marginRight: 10 }} target="_blank">{getLabel(542702, "发放")}</a>
|
||||||
|
|
@ -140,7 +144,7 @@ class Index extends Component {
|
||||||
>{getLabel(83110, "查看详情")}</a>
|
>{getLabel(83110, "查看详情")}</a>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(!record.opts.includes("admin") || (sendNum === sendTotal && !showGrant)) &&
|
sendNum === sendTotal && !showGrant &&
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||||
|
|
@ -151,7 +155,7 @@ class Index extends Component {
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
sendNum !== sendTotal && !showGrant && record.opts.includes("admin") &&
|
sendNum !== sendTotal && !showGrant &&
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||||
<Menu.Item key="template">{getLabel(543603, "更新模板")}</Menu.Item>
|
<Menu.Item key="template">{getLabel(543603, "更新模板")}</Menu.Item>
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,9 @@ import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
import { Button, message } from "antd";
|
import { Button, message } from "antd";
|
||||||
import { postFetch } from "../../../../util/request";
|
|
||||||
import { getSearchs } from "../../../../util";
|
import { getSearchs } from "../../../../util";
|
||||||
import { copyConditions } from "../conditions";
|
import { copyConditions } from "../conditions";
|
||||||
import { duplicatePayroll } from "../../../../apis/payroll";
|
import { duplicatePayroll, getPayrollTemplateLedgerList } from "../../../../apis/payroll";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -32,30 +31,29 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPayrollTemplateLedgerList = (props) => {
|
getPayrollTemplateLedgerList = (props) => {
|
||||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" })
|
getPayrollTemplateLedgerList().then(({ status, data }) => {
|
||||||
.then(({ status, data }) => {
|
if (status) {
|
||||||
if (status) {
|
this.setState({
|
||||||
this.setState({
|
conditions: _.map(copyConditions, item => {
|
||||||
conditions: _.map(copyConditions, item => {
|
return {
|
||||||
return {
|
...item, items: _.map(item.items, o => {
|
||||||
...item, items: _.map(item.items, o => {
|
if (getKey(o) === "salarySobId") {
|
||||||
if (getKey(o) === "salarySobId") {
|
return {
|
||||||
return {
|
...o, label: getLabel(o.lanId, o.label),
|
||||||
...o, label: getLabel(o.lanId, o.label),
|
options: _.map(data, d => ({ key: d.id, showname: d.content }))
|
||||||
options: _.map(data, d => ({ key: String(d.id), showname: d.name }))
|
};
|
||||||
};
|
} else {
|
||||||
} else {
|
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
}
|
||||||
}
|
})
|
||||||
})
|
};
|
||||||
};
|
})
|
||||||
})
|
}, () => {
|
||||||
}, () => {
|
props.payrollStore.payrollCopyForm.initFormFields(this.state.conditions);
|
||||||
props.payrollStore.payrollCopyForm.initFormFields(this.state.conditions);
|
props.payrollStore.payrollCopyForm.updateFields({ salarySobId: { value: props.salarySobId } });
|
||||||
props.payrollStore.payrollCopyForm.updateFields({ salarySobId: { value: props.salarySobId } });
|
});
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
save = () => {
|
save = () => {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* Date: 2023/10/13
|
* Date: 2023/10/13
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaSelect, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaSelect, WeaTable } from "ecCom";
|
||||||
import { Dropdown, Menu, message, Modal } from "antd";
|
import { Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { changePayrollDefaultUse, deletePayroll, getPayrollTemplateList } from "../../../../apis/payroll";
|
import { changePayrollDefaultUse, deletePayroll, getPayrollTemplateList } from "../../../../apis/payroll";
|
||||||
|
|
@ -13,6 +14,8 @@ import UpdatePayrollTemplateSlide from "../updatePayrollTemplateSlide";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -123,7 +126,7 @@ class Index extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, dataSource, columns, pageInfo, copyDialog, tmplSlide, selectedRowKeys } = this.state;
|
const { loading, dataSource, columns, pageInfo, copyDialog, tmplSlide, selectedRowKeys } = this.state;
|
||||||
const { forceUpdate } = this.props;
|
const { taxAgentStore: { showOperateBtn }, forceUpdate } = this.props;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||||
|
|
@ -157,23 +160,23 @@ class Index extends Component {
|
||||||
render: (__, record) => {
|
render: (__, record) => {
|
||||||
const {} = record;
|
const {} = record;
|
||||||
//显示更新模板
|
//显示更新模板
|
||||||
return record.opts.includes("admin") ? <React.Fragment>
|
return showOperateBtn ? <React.Fragment>
|
||||||
<a href="javascript:void(0);" onClick={() => this.handleOpts({ key: "edit" }, record)}
|
<a href="javascript:void(0);" onClick={() => this.handleOpts({ key: "edit" }, record)}
|
||||||
style={{ marginRight: 10 }}>{getLabel(501169, "编辑")}</a>
|
style={{ marginRight: 10 }}>{getLabel(501169, "编辑")}</a>
|
||||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||||
onClick={() => this.handleOpts({ key: "copy" }, record)}
|
onClick={() => this.handleOpts({ key: "copy" }, record)}
|
||||||
>{getLabel(77, "复制")}</a>
|
>{getLabel(77, "复制")}</a>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
|
||||||
<Menu.Item key="del">{getLabel(535052, "删除")}</Menu.Item>
|
<Menu.Item key="del">{getLabel(535052, "删除")}</Menu.Item>
|
||||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
}
|
}>
|
||||||
>
|
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
||||||
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
</Dropdown>
|
||||||
</Dropdown>
|
</React.Fragment> :
|
||||||
</React.Fragment> : <a href="javascript:void(0);"
|
<a href="javascript:void(0);"
|
||||||
onClick={() => this.handleOpts({ key: "view" }, record)}>{getLabel(83110, "查看详情")}</a>;
|
onClick={() => this.handleOpts({ key: "view" }, record)}>{getLabel(83110, "查看详情")}</a>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Index extends Component {
|
||||||
} = payrollTempForm.getFormParams(),
|
} = payrollTempForm.getFormParams(),
|
||||||
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
||||||
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
||||||
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== 1) {
|
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== "1") {
|
||||||
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
|
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,8 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderReqBtns = () => {
|
renderReqBtns = () => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { selectedKey, isRefresh, queryParams } = this.state;
|
const { selectedKey, isRefresh, queryParams } = this.state;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
let reqBtns = [];
|
let reqBtns = [];
|
||||||
switch (selectedKey) {
|
switch (selectedKey) {
|
||||||
case "grant":
|
case "grant":
|
||||||
|
|
@ -54,14 +53,14 @@ class Index extends Component {
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case "template":
|
case "template":
|
||||||
const loading = this.templateRef ? this.templateRef.state.delLoading : false;
|
const loading = this.templateRef ? this.templateRef.wrappedInstance.state.delLoading : false;
|
||||||
const delDisabled = !this.templateRef || _.isEmpty(this.templateRef.state.selectedRowKeys);
|
const delDisabled = !this.templateRef || _.isEmpty(this.templateRef.wrappedInstance.state.selectedRowKeys);
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
this.templateRef.handleOpts({ key: "edit" }, {});
|
this.templateRef.wrappedInstance.handleOpts({ key: "edit" }, {});
|
||||||
}}>{getLabel(365, "新建")}</Button>,
|
}}>{getLabel(365, "新建")}</Button>,
|
||||||
<Button type="ghost" loading={loading} disabled={delDisabled} onClick={() => {
|
<Button type="ghost" loading={loading} disabled={delDisabled} onClick={() => {
|
||||||
this.templateRef.handleOpts({ key: "del" }, {});
|
this.templateRef.wrappedInstance.handleOpts({ key: "del" }, {});
|
||||||
}}>{getLabel(32136, "批量删除")}</Button>
|
}}>{getLabel(32136, "批量删除")}</Button>
|
||||||
];
|
];
|
||||||
const queryBtns = [
|
const queryBtns = [
|
||||||
|
|
@ -75,10 +74,10 @@ class Index extends Component {
|
||||||
break;
|
break;
|
||||||
case "watermark":
|
case "watermark":
|
||||||
const { baseSetSaveLoading } = this.state;
|
const { baseSetSaveLoading } = this.state;
|
||||||
reqBtns = showOperateBtn ? [
|
reqBtns = [
|
||||||
<Button type="primary" loading={baseSetSaveLoading}
|
<Button type="primary" loading={baseSetSaveLoading}
|
||||||
onClick={() => this.baseSetRef.salaryBillBaseSetSave()}>{getLabel(537558, "保存")}</Button>
|
onClick={() => this.baseSetRef.salaryBillBaseSetSave()}>{getLabel(537558, "保存")}</Button>
|
||||||
] : [];
|
];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -86,15 +85,13 @@ class Index extends Component {
|
||||||
return reqBtns;
|
return reqBtns;
|
||||||
};
|
};
|
||||||
renderContent = () => {
|
renderContent = () => {
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
|
||||||
const { selectedKey, queryParams, isRefresh } = this.state;
|
const { selectedKey, queryParams, isRefresh } = this.state;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
let dom = null;
|
let dom = null;
|
||||||
switch (selectedKey) {
|
switch (selectedKey) {
|
||||||
case "grant":
|
case "grant":
|
||||||
dom = <GrantTableList queryParams={queryParams} isRefresh={isRefresh}
|
dom = <GrantTableList queryParams={queryParams} isRefresh={isRefresh}
|
||||||
onUpdateTemp={(id) => this.setState({ selectedKey: "template" }, () => {
|
onUpdateTemp={(id) => this.setState({ selectedKey: "template" }, () => {
|
||||||
this.templateRef.handleOpts({ key: "edit" }, { id });
|
this.templateRef.wrappedInstance.handleOpts({ key: "edit" }, { id });
|
||||||
})}
|
})}
|
||||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||||
/>;
|
/>;
|
||||||
|
|
@ -106,7 +103,7 @@ class Index extends Component {
|
||||||
break;
|
break;
|
||||||
case "watermark":
|
case "watermark":
|
||||||
dom = <TemplateBaseSettings
|
dom = <TemplateBaseSettings
|
||||||
ref={dom => this.baseSetRef = dom} showOperateBtn={showOperateBtn}
|
ref={dom => this.baseSetRef = dom}
|
||||||
onChangeLoading={loading => this.setState({ baseSetSaveLoading: loading })}
|
onChangeLoading={loading => this.setState({ baseSetSaveLoading: loading })}
|
||||||
/>;
|
/>;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-top-req {
|
.wea-new-top-req {
|
||||||
//z-index: 0 !important;
|
z-index: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import {
|
import {
|
||||||
|
WeaBrowser,
|
||||||
WeaCheckbox,
|
WeaCheckbox,
|
||||||
WeaDialog,
|
WeaDialog,
|
||||||
WeaError,
|
WeaError,
|
||||||
|
|
@ -18,7 +19,6 @@ import {
|
||||||
WeaTable
|
WeaTable
|
||||||
} from "ecCom";
|
} from "ecCom";
|
||||||
import { reportStatisticsItemSave, statisticsItemChangetab, statisticsItemGetform } from "../../../apis/statistics";
|
import { reportStatisticsItemSave, statisticsItemChangetab, statisticsItemGetform } from "../../../apis/statistics";
|
||||||
import CustomBrowser from "../../../components/CustomBrowser";
|
|
||||||
import "../index.less";
|
import "../index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -263,22 +263,23 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleChangeStatisticalItems = (data) => {
|
handleChangeStatisticalItems = (itemValue, _names, datas) => {
|
||||||
const itemValue = _.keys(data)[0], datas = _.values(data);
|
|
||||||
const { formData } = this.state;
|
const { formData } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
formData: {
|
formData: {
|
||||||
...formData,
|
...formData,
|
||||||
itemValue,
|
itemValue,
|
||||||
itemValueSpan: _.map(datas, it => it.name).join(","),
|
itemValueSpan: _.map(datas, it => it.name).join(","),
|
||||||
itemName: datas.length === 1 ? _.map(datas, it => it.name).join(",") : ""
|
itemName: datas.length === 1 ? _.map(datas, it => it.names).join(",") : ""
|
||||||
}
|
}
|
||||||
}, () => {
|
}, () => {
|
||||||
statisticsItemChangetab({ itemId: itemValue }).then(({ status, data }) => {
|
statisticsItemChangetab({ itemId: itemValue }).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { ruleData } = data;
|
const { ruleData } = data;
|
||||||
const { columns, data: dataSource } = ruleData;
|
const { columns, data: dataSource } = ruleData;
|
||||||
this.setState({ columns, dataSource });
|
this.setState({
|
||||||
|
columns, dataSource
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -367,37 +368,52 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
className="statisticItemsWrapper"
|
className="statisticItemsWrapper"
|
||||||
>
|
>
|
||||||
<div className="statisticItemsBox">
|
<div className="statisticItemsBox">
|
||||||
{
|
<WeaFormItem label={getLabel(111, "统计项目")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
!_.isEmpty(columns) && <React.Fragment>
|
<WeaError tipPosition="bottom" ref="proError" error={getLabel(111, "此项必填")}>
|
||||||
<WeaFormItem label={getLabel(111, "统计项目")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
<WeaBrowser
|
||||||
<WeaError tipPosition="bottom" ref="proError" error={getLabel(111, "此项必填")}>
|
title={getLabel(111, "统计项目")} type={162} viewAttr={!isShare ? 3 : 1} isSingle
|
||||||
<CustomBrowser
|
value={itemValue}
|
||||||
fieldConfig={{
|
replaceDatas={itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
||||||
viewAttr: !isShare ? 3 : 1,
|
id: it,
|
||||||
browserConditionParam: {
|
name: itemValueSpan.split(",")[idx]
|
||||||
isSingle: true, completeURL: "/api/bs/hrmsalary/salaryitem/listAuth", tableProps: {},
|
})) : []}
|
||||||
replaceDatas: itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
completeParams={{
|
||||||
id: it, name: itemValueSpan.split(",")[idx]
|
type: 162,
|
||||||
})) : [], dataParams: { filterType: "QUERY_DATA" }, searchParamsKey: "", filterByName: true
|
fielddbtype: "browser.salaryItemBrowser",
|
||||||
}
|
f_weaver_belongto_usertype: "0"
|
||||||
}} value={itemValue} onCustomChange={this.handleChangeStatisticalItems}/>
|
}}
|
||||||
</WeaError>
|
conditionDataParams={{
|
||||||
</WeaFormItem>
|
type: "browser.salaryItemBrowser",
|
||||||
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
fielddbtype: "browser.salaryItemBrowser",
|
||||||
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
f_weaver_belongto_usertype: "0"
|
||||||
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
|
}}
|
||||||
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
dataParams={{
|
||||||
</WeaError>
|
type: "browser.salaryItemBrowser",
|
||||||
</WeaFormItem>
|
f_weaver_belongto_usertype: "0"
|
||||||
<div className="customRuleTableWrapper">
|
}}
|
||||||
<WeaTable
|
destDataParams={{
|
||||||
dataSource={dataSource}
|
type: "browser.salaryItemBrowser",
|
||||||
columns={cols}
|
f_weaver_belongto_usertype: "0"
|
||||||
pagination={false}
|
}}
|
||||||
/>
|
// isMultCheckbox
|
||||||
</div>
|
inputStyle={{ width: "100%" }}
|
||||||
</React.Fragment>
|
onChange={this.handleChangeStatisticalItems}
|
||||||
}
|
/>
|
||||||
|
</WeaError>
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
|
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
||||||
|
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
|
||||||
|
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
||||||
|
</WeaError>
|
||||||
|
</WeaFormItem>
|
||||||
|
<div className="customRuleTableWrapper">
|
||||||
|
<WeaTable
|
||||||
|
dataSource={dataSource}
|
||||||
|
columns={cols}
|
||||||
|
pagination={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ import {
|
||||||
statisticsItemList
|
statisticsItemList
|
||||||
} from "../../../apis/statistics";
|
} from "../../../apis/statistics";
|
||||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||||
import { postFetch } from "../../../util/request";
|
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||||
|
import { getSalarysobListAll } from "../../../apis";
|
||||||
import { condition } from "./condition";
|
import { condition } from "./condition";
|
||||||
import cs from "classnames";
|
import cs from "classnames";
|
||||||
import "../index.less";
|
import "../index.less";
|
||||||
|
|
@ -69,44 +70,40 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getTaxAgentSelectList = async (props) => {
|
getTaxAgentSelectList = async (props) => {
|
||||||
const [salarySobList, empStatusList] = await Promise.all([
|
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
|
||||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA" }),
|
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
|
||||||
commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })
|
if (status) {
|
||||||
]);
|
const conditions = _.map(condition, item => {
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
return {
|
||||||
.then(({ status, data }) => {
|
...item,
|
||||||
if (status) {
|
items: _.map(item.items, child => {
|
||||||
const conditions = _.map(condition, item => {
|
if (getKey(child) === "taxAgent") {
|
||||||
return {
|
return {
|
||||||
...item,
|
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||||
items: _.map(item.items, child => {
|
options: _.map(data, o => ({ key: o.id, showname: o.content }))
|
||||||
if (getKey(child) === "taxAgent") {
|
};
|
||||||
return {
|
} else if (getKey(child) === "salarySob") {
|
||||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
return {
|
||||||
options: _.map(data, o => ({ key: String(o.id), showname: o.name }))
|
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||||
};
|
options: _.map(salarySobList.data, o => ({ key: String(o.id), showname: o.name }))
|
||||||
} else if (getKey(child) === "salarySob") {
|
};
|
||||||
return {
|
} else if (getKey(child) === "status") {
|
||||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
return {
|
||||||
options: _.map(salarySobList.data, o => ({ key: String(o.id), showname: o.name }))
|
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||||
};
|
options: _.map(empStatusList.data, o => ({ key: o.value.toString(), showname: o.defaultLabel }))
|
||||||
} else if (getKey(child) === "status") {
|
};
|
||||||
return {
|
}
|
||||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
return { ...child, viewAttr: props.isShare ? 1 : child.viewAttr };
|
||||||
options: _.map(empStatusList.data, o => ({ key: o.value.toString(), showname: o.defaultLabel }))
|
})
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
return { ...child, viewAttr: props.isShare ? 1 : child.viewAttr };
|
this.setState({ conditions }, () => {
|
||||||
})
|
props.form.initFormFields(this.state.conditions);
|
||||||
};
|
props.id && this.reportStatisticsGetSearchCondition(props.id);
|
||||||
});
|
});
|
||||||
this.setState({ conditions }, () => {
|
|
||||||
props.form.initFormFields(this.state.conditions);
|
|
||||||
props.id && this.reportStatisticsGetSearchCondition(props.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
reportStatisticsGetSearchCondition = (id) => {
|
reportStatisticsGetSearchCondition = (id) => {
|
||||||
const { conditions } = this.state;
|
const { conditions } = this.state;
|
||||||
|
|
@ -448,7 +445,9 @@ export const MonthRangePicker = (props) => {
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={startDate} disabled={disabled}
|
value={startDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
// 20251212前版本(问题时不能选到当月)
|
||||||
|
// return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||||
|
return current && endDate && moment(`${new Date(current.getTime()).getFullYear()}-${String(new Date(current.getTime()).getMonth() + 1).padStart(2, '0')}`).isAfter(moment(endDate));
|
||||||
}}
|
}}
|
||||||
format="YYYY-MM"
|
format="YYYY-MM"
|
||||||
onChange={(val) => onChange([val, endDate])}
|
onChange={(val) => onChange([val, endDate])}
|
||||||
|
|
@ -510,4 +509,4 @@ export const getSalaryMonthValue = (dateType) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return [start, end];
|
return [start, end];
|
||||||
};
|
};
|
||||||
|
|
@ -109,8 +109,7 @@ class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { report, dimensionList, statisticalPayload } = this.state;
|
const { report, dimensionList, statisticalPayload } = this.state;
|
||||||
const { isShare } = report;
|
const { isShare } = report;
|
||||||
const { attendanceStore: { settingForm }, taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentOption, showOperateBtn } } = this.props;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title={getLabel(111, "报表查看")} icon={<i className="icon-coms-fa"/>}
|
title={getLabel(111, "报表查看")} icon={<i className="icon-coms-fa"/>}
|
||||||
|
|
@ -159,7 +158,8 @@ class Index extends Component {
|
||||||
</div>
|
</div>
|
||||||
{/*统计数据范围及规则设置弹框*/}
|
{/*统计数据范围及规则设置弹框*/}
|
||||||
<StatisticalMicroSettingsSlide
|
<StatisticalMicroSettingsSlide
|
||||||
{...statisticalPayload} form={settingForm} isShare={isShare}
|
{...statisticalPayload} form={settingForm}
|
||||||
|
taxAgentAdminOption={taxAgentOption} isShare={isShare}
|
||||||
onClose={(isRefresh) => this.setState({
|
onClose={(isRefresh) => this.setState({
|
||||||
statisticalPayload: { visible: false, id: "", dimension: "" }
|
statisticalPayload: { visible: false, id: "", dimension: "" }
|
||||||
}, () => isRefresh && this.leftTabRef.reportStatisticsReportList())}
|
}, () => isRefresh && this.leftTabRef.reportStatisticsReportList())}
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,6 @@
|
||||||
|
|
||||||
.wea-form-item .wea-form-item-wrapper .wea-field-readonly {
|
.wea-form-item .wea-form-item-wrapper .wea-field-readonly {
|
||||||
white-space: pre-wrap !important;
|
white-space: pre-wrap !important;
|
||||||
line-height: 28px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-slide-modal-title {
|
.wea-slide-modal-title {
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* 角色新增
|
|
||||||
*
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/8/5
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
|
||||||
import { Button, message } from "antd";
|
|
||||||
import { getSearchs } from "../../../../util";
|
|
||||||
import { roleConditions } from "../conditions";
|
|
||||||
import * as API from "../../../../apis/taxAgent";
|
|
||||||
import "../index.less";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
|
||||||
@observer
|
|
||||||
class Index extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
conditions: [], loading: false, formData: { taxAgentIds: [], sobIds: [] }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(roleConditions, item => ({
|
|
||||||
...item, items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
|
|
||||||
}))
|
|
||||||
}, () => nextProps.taxAgentStore.roleForm.initFormFields(this.state.conditions));
|
|
||||||
}
|
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.taxAgentStore.initRoleForm();
|
|
||||||
}
|
|
||||||
|
|
||||||
save = (isSetting) => {
|
|
||||||
const { taxAgentStore: { roleForm } } = this.props;
|
|
||||||
const { formData } = this.state;
|
|
||||||
roleForm.validateForm().then(f => {
|
|
||||||
if (f.isValid) {
|
|
||||||
const payload = roleForm.getFormParams();
|
|
||||||
this.setState({ loading: true });
|
|
||||||
API.saveAuthRole({ ...payload, ...formData }).then(({ status, data, errormsg }) => {
|
|
||||||
this.setState({ loading: false });
|
|
||||||
if (status) {
|
|
||||||
message.success(getLabel(111, "操作成功!"));
|
|
||||||
this.props.onCancel(() => this.props.onSearch());
|
|
||||||
isSetting && this.props.showRoleSetDialog({
|
|
||||||
id: data, name: payload.name, selectedKey: "auth.MemberTargetTypeEnum"
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
message.error(errormsg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
f.showErrors();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
handleFormChange = (val) => {
|
|
||||||
const key = _.keys(val)[0];
|
|
||||||
if (key === "taxAgentIds" || key === "sobIds") {
|
|
||||||
this.setState({ formData: { ...this.state.formData, ...val } });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { conditions, loading, roleSetDialog } = this.state;
|
|
||||||
const { taxAgentStore: { roleForm } } = this.props;
|
|
||||||
return (
|
|
||||||
<WeaDialog
|
|
||||||
{...this.props} style={{ width: 520 }} initLoadCss title={getLabel(111, "添加业务线")} className="role-dialog"
|
|
||||||
buttons={[
|
|
||||||
<Button type="primary" loading={loading} onClick={() => this.save()}>{getLabel(111, "保存")}</Button>,
|
|
||||||
<Button type="primary" loading={loading}
|
|
||||||
onClick={() => this.save(true)}>{getLabel(111, "保存并进入详细设置")}</Button>
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<div className="form-dialog-layout">{getSearchs(roleForm, conditions, 1, false, this.handleFormChange)}</div>
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
* 业务线管理
|
|
||||||
* 高级搜索
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/9/24
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { Button } from "antd";
|
|
||||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
|
||||||
import "./index.less";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
|
||||||
@observer
|
|
||||||
class Index extends Component {
|
|
||||||
render() {
|
|
||||||
const { taxAgentStore: { advanceForm } } = this.props;
|
|
||||||
return (
|
|
||||||
<div className="role-advance-search">
|
|
||||||
<WeaInputSearch value={advanceForm.getFormParams().name}
|
|
||||||
onChange={v => advanceForm.updateFields({ name: v })}
|
|
||||||
onSearch={this.props.onAdvanceSearch}
|
|
||||||
/>
|
|
||||||
<Button type="ghost" className="wea-advanced-search text-elli"
|
|
||||||
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Index;
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
.role-advance-search {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.wea-advanced-search {
|
|
||||||
top: 0;
|
|
||||||
left: -1px;
|
|
||||||
height: 28px;
|
|
||||||
line-height: 1;
|
|
||||||
border-radius: 0;
|
|
||||||
position: relative;
|
|
||||||
color: #474747;
|
|
||||||
padding: 4px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-advanced-search:hover {
|
|
||||||
border: 1px solid #dadada;
|
|
||||||
color: #474747;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-elli {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
||||||
/*
|
|
||||||
* 业务线管理
|
|
||||||
* 高级搜索面板
|
|
||||||
* @Author: 黎永顺
|
|
||||||
* @Date: 2024/9/24
|
|
||||||
* @Wechat:
|
|
||||||
* @Email: 971387674@qq.com
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
import React, { Component } from "react";
|
|
||||||
import { inject, observer } from "mobx-react";
|
|
||||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
|
||||||
import { roleSearchConditions } from "../conditions";
|
|
||||||
import { getAuthOptTree } from "../../../../apis/taxAgent";
|
|
||||||
import { getSearchs } from "../../../../util";
|
|
||||||
import { Button } from "antd";
|
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
|
||||||
@observer
|
|
||||||
class AdvanceSearchPannel extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = { conditions: [] };
|
|
||||||
}
|
|
||||||
|
|
||||||
async componentDidMount() {
|
|
||||||
const { taxAgentStore: { advanceForm } } = this.props;
|
|
||||||
const { data } = await getAuthOptTree();
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(roleSearchConditions, item => ({
|
|
||||||
...item, title: getLabel(item.lanId, item.title),
|
|
||||||
items: _.map(item.items, o => {
|
|
||||||
if (getKey(o) === "opts") {
|
|
||||||
return {
|
|
||||||
...o, label: getLabel(o.lanId, o.label),
|
|
||||||
options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
|
|
||||||
};
|
|
||||||
} else if (getKey(o) === "pages") {
|
|
||||||
return {
|
|
||||||
...o, label: getLabel(o.lanId, o.label),
|
|
||||||
treeData: [{
|
|
||||||
label: data.name, value: data.key, key: data.key, id: data.key, name: data.name,
|
|
||||||
children: _.map(data.modules, i => ({
|
|
||||||
label: i.name, value: `${data.key}-${i.key}`, key: `${data.key}-${i.key}`,
|
|
||||||
id: `${data.key}-${i.key}`, name: i.name,
|
|
||||||
children: _.map(i.pages, k => ({
|
|
||||||
label: k.name, value: k.key, key: k.key, selectable: true,
|
|
||||||
id: k.key, name: k.name
|
|
||||||
}))
|
|
||||||
}))
|
|
||||||
}]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
}, () => advanceForm.initFormFields(this.state.conditions));
|
|
||||||
}
|
|
||||||
|
|
||||||
handleReset = () => {
|
|
||||||
const { taxAgentStore: { advanceForm } } = this.props;
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(this.state.conditions, item => ({
|
|
||||||
...item, items: _.map(item.items, o => ({ ...o, value: "" }))
|
|
||||||
}))
|
|
||||||
}, () => advanceForm.resetForm());
|
|
||||||
};
|
|
||||||
handleFormChange = (val) => {
|
|
||||||
const key = _.keys(val)[0];
|
|
||||||
const { taxAgentStore: { advanceForm } } = this.props;
|
|
||||||
if (key === "taxAgentIds" || key === "sobIds" || key === "pages") {
|
|
||||||
this.setState({
|
|
||||||
conditions: _.map(this.state.conditions, item => ({
|
|
||||||
...item, items: _.map(item.items, o => {
|
|
||||||
if (key === getKey(o)) {
|
|
||||||
return { ...o, value: _.map(val[key], o => o.id).join(",") };
|
|
||||||
}
|
|
||||||
return { ...o, value: advanceForm.getFormParams()[getKey(o)] };
|
|
||||||
})
|
|
||||||
}))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { taxAgentStore: { advanceForm } } = this.props;
|
|
||||||
const { conditions } = this.state;
|
|
||||||
return (
|
|
||||||
<React.Fragment>
|
|
||||||
<div className="wea-advanced-searchsAd">
|
|
||||||
{getSearchs(advanceForm, conditions, 2, false, this.handleFormChange)}
|
|
||||||
</div>
|
|
||||||
<div className="wea-search-buttons">
|
|
||||||
<div style={{ textAlign: "center" }}>
|
|
||||||
<span style={{ marginLeft: 15 }}>
|
|
||||||
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
|
||||||
</span>
|
|
||||||
<span style={{ marginLeft: 15 }}>
|
|
||||||
<Button type="ghost" onClick={this.handleReset}>{getLabel(2022, "重置")}</Button>
|
|
||||||
</span>
|
|
||||||
<span style={{ marginLeft: 15 }}>
|
|
||||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AdvanceSearchPannel;
|
|
||||||
|
|
||||||
|
|
@ -1,261 +0,0 @@
|
||||||
export const roleConditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["name"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "/api/bs/hrmsalary/taxAgent/listAuth",
|
|
||||||
dataParams: { filterType: "QUERY_DATA" },
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: false,
|
|
||||||
searchParamsKey: "name"
|
|
||||||
},
|
|
||||||
conditionType: "CUSTOMBROWSER",
|
|
||||||
domkey: ["taxAgentIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "个税扣缴义务人",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "/api/bs/hrmsalary/salarysob/listAuth",
|
|
||||||
dataParams: { filterType: "QUERY_DATA" },
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: false,
|
|
||||||
searchParamsKey: "name"
|
|
||||||
},
|
|
||||||
conditionType: "CUSTOMBROWSER",
|
|
||||||
domkey: ["sobIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "薪资账套",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "TEXTAREA",
|
|
||||||
domkey: ["description"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "描述",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
defaultshow: true,
|
|
||||||
title: ""
|
|
||||||
}
|
|
||||||
];
|
|
||||||
export const roleOperatorConditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["targetTypeName"],
|
|
||||||
fieldcol: 18,
|
|
||||||
label: "对象类型",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "BROWSER",
|
|
||||||
domkey: ["targetName"],
|
|
||||||
fieldcol: 18,
|
|
||||||
label: "对象",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["link"],
|
|
||||||
fieldcol: 18,
|
|
||||||
label: "连接符",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required|string",
|
|
||||||
viewAttr: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "INPUTNUMBER",
|
|
||||||
domkey: ["sortedIndex"],
|
|
||||||
fieldcol: 18,
|
|
||||||
label: "批次",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 6,
|
|
||||||
value: "",
|
|
||||||
rules: "required",
|
|
||||||
viewAttr: 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
defaultshow: true,
|
|
||||||
title: ""
|
|
||||||
}
|
|
||||||
];
|
|
||||||
export const roleSearchConditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
conditionType: "INPUT",
|
|
||||||
domkey: ["name"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "名称",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "/api/bs/hrmsalary/taxAgent/listAuth",
|
|
||||||
dataParams: { filterType: "QUERY_DATA" },
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: false,
|
|
||||||
searchParamsKey: "name"
|
|
||||||
},
|
|
||||||
conditionType: "CUSTOMBROWSER",
|
|
||||||
domkey: ["taxAgentIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "个税扣缴义务人",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeParams: {},
|
|
||||||
conditionDataParams: {},
|
|
||||||
dataParams: {},
|
|
||||||
destDataParams: {},
|
|
||||||
hasAddBtn: false,
|
|
||||||
hasAdvanceSerach: true,
|
|
||||||
idSeparator: ",",
|
|
||||||
isAutoComplete: 1,
|
|
||||||
isDetail: 0,
|
|
||||||
isMultCheckbox: false,
|
|
||||||
isSingle: false,
|
|
||||||
linkUrl: "",
|
|
||||||
pageSize: 10,
|
|
||||||
quickSearchName: "",
|
|
||||||
replaceDatas: [],
|
|
||||||
type: "17"
|
|
||||||
},
|
|
||||||
conditionType: "BROWSER",
|
|
||||||
domkey: ["roleEmpIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
isQuickSearch: false,
|
|
||||||
label: "成员",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "/api/bs/hrmsalary/salarysob/listAuth",
|
|
||||||
dataParams: { filterType: "QUERY_DATA" },
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: false,
|
|
||||||
searchParamsKey: "name"
|
|
||||||
},
|
|
||||||
conditionType: "CUSTOMBROWSER",
|
|
||||||
domkey: ["sobIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "薪资账套",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeParams: {},
|
|
||||||
conditionDataParams: {},
|
|
||||||
dataParams: {},
|
|
||||||
destDataParams: {},
|
|
||||||
hasAddBtn: false,
|
|
||||||
hasAdvanceSerach: true,
|
|
||||||
idSeparator: ",",
|
|
||||||
isAutoComplete: 1,
|
|
||||||
isDetail: 0,
|
|
||||||
isMultCheckbox: false,
|
|
||||||
isSingle: false,
|
|
||||||
linkUrl: "",
|
|
||||||
pageSize: 10,
|
|
||||||
quickSearchName: "",
|
|
||||||
replaceDatas: [],
|
|
||||||
type: "17"
|
|
||||||
},
|
|
||||||
conditionType: "BROWSER",
|
|
||||||
domkey: ["employeeIds"],
|
|
||||||
fieldcol: 16,
|
|
||||||
isQuickSearch: false,
|
|
||||||
label: "数据",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
conditionType: "SELECT",
|
|
||||||
domkey: ["opts"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "权限项",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
multiple: true,
|
|
||||||
options: [
|
|
||||||
{ key: "query", showname: "查询", lanId: 111 },
|
|
||||||
{ key: "admin", showname: "管理", lanId: 111 }
|
|
||||||
],
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserConditionParam: {
|
|
||||||
completeURL: "",
|
|
||||||
dataParams: { filterType: "" },
|
|
||||||
filterByName: true,
|
|
||||||
tableProps: {},
|
|
||||||
isSingle: false,
|
|
||||||
treeSelect: true,
|
|
||||||
searchParamsKey: "name"
|
|
||||||
},
|
|
||||||
conditionType: "CUSTOMBROWSER",
|
|
||||||
domkey: ["pages"],
|
|
||||||
fieldcol: 16,
|
|
||||||
label: "页面",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 8,
|
|
||||||
treeData: [],
|
|
||||||
value: "",
|
|
||||||
viewAttr: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
defaultshow: true,
|
|
||||||
title: "基本信息",
|
|
||||||
lanId: 111,
|
|
||||||
col: 2
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
@ -1,120 +0,0 @@
|
||||||
.tax_role_setting_browser {
|
|
||||||
width: 100%;
|
|
||||||
display: inline-block !important;
|
|
||||||
|
|
||||||
.wea-field-readonly.border {
|
|
||||||
cursor: default !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-field-readonly.border .child-item {
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.only-operate {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
& > a {
|
|
||||||
white-space: normal !important;
|
|
||||||
display: inline !important;
|
|
||||||
color: #2db7f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.only-operate:hover {
|
|
||||||
.ant-select-selection__choice__remove {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-select-selection__choice__remove:before {
|
|
||||||
content: "\E62D";
|
|
||||||
font-family: anticon !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-select-selection__choice__remove {
|
|
||||||
visibility: hidden;
|
|
||||||
right: -3px;
|
|
||||||
font-size: 12px !important;
|
|
||||||
top: 50%;
|
|
||||||
margin-top: -6px;
|
|
||||||
text-decoration: none;
|
|
||||||
position: static;
|
|
||||||
padding: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
transform: scale(.66666667) rotate(0deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tax_role_set_dialog {
|
|
||||||
.tax_role_set_container {
|
|
||||||
padding: 10px 25px;
|
|
||||||
|
|
||||||
.tax_role_form_item {
|
|
||||||
min-height: 190px;
|
|
||||||
border: 1px solid rgb(217, 217, 217);
|
|
||||||
|
|
||||||
& > .wea-select {
|
|
||||||
margin: 10px 10px 0 20px;
|
|
||||||
line-height: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tax_role_operator_setting {
|
|
||||||
border-top: 1px solid rgb(217, 217, 217);
|
|
||||||
padding: 8px;
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
& > div:last-child {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tax_role_browser_form_item {
|
|
||||||
margin: 12px 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tax_role_auth_tree {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tax_role_operator_setting_table {
|
|
||||||
.setting_table_title {
|
|
||||||
& > .operator {
|
|
||||||
line-height: 45px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.role-dialog {
|
|
||||||
.form-dialog-layout {
|
|
||||||
.ant-select-selection {
|
|
||||||
height: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.authDetail_dialog {
|
|
||||||
.authDetail-dialog-title {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.authDetail-table {
|
|
||||||
background: #f6f6f6;
|
|
||||||
padding: 8px 16px;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.wea-new-table {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue