Merge branch 'feature/2.15.2.2409.01合并业务线测试' into custom/领悦业务线
This commit is contained in:
commit
38a8d6aeaf
|
|
@ -95,7 +95,10 @@ export const comparisonresultList = (params) => {
|
|||
export const refreshTaxAgent = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/refreshTaxAgent", params);
|
||||
};
|
||||
|
||||
// 核算人员--刷新薪资核算人员的
|
||||
export const refreshAcctemployee = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/refresh", params);
|
||||
};
|
||||
// 薪资核算-编辑表单
|
||||
export const acctresultDetail = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/detail", "GET", params);
|
||||
|
|
|
|||
|
|
@ -134,3 +134,7 @@ export const getSalaryListSum = (params) => {
|
|||
export const exportSalaryList = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params);
|
||||
};
|
||||
//薪酬统计报表-保存全局自定义列配置
|
||||
export const savePageListSetting = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/save/setting", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export const getVariableSalaryDetail = params => {
|
|||
};
|
||||
// 获取当前管理员下的所有的个税扣缴义务人
|
||||
export const getAdminTaxAgentList = () => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getAdminTaxAgentList", "get", {});
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare: false });
|
||||
};
|
||||
// 浮动薪酬档案导出
|
||||
export const exportVariableSalary = (params) => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,206 @@
|
|||
/*
|
||||
* 自定义穿梭框组件
|
||||
* 弹框选择
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom";
|
||||
import { Button, Col, Row, Spin } from "antd";
|
||||
import CustomBrowserMutiLeft from "./customBrowserMutiLeft";
|
||||
import CustomBrowserMutiRight from "./customBrowserMutiRight";
|
||||
import CustomBrowserOperation from "./customBrowserOperation";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CustomTransferDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, listDatas: [],
|
||||
query: { [props.searchParamsKey]: "" },
|
||||
leftListSelectedKeys: [], // 左侧table选择的keys
|
||||
leftListSelectedData: [], // 左侧table选择的数据
|
||||
rightCheckedKeys: [], //右侧选择的keys
|
||||
rightDatas: [] // 右侧展示的数据
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.getData(true);
|
||||
if (nextProps.datas) {
|
||||
this.setState({
|
||||
leftListSelectedData: _.values(nextProps.datas), rightDatas: _.values(nextProps.datas)
|
||||
});
|
||||
}
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
query: { [this.props.searchParamsKey]: "" },
|
||||
rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: []
|
||||
});
|
||||
this.selectedData = {};
|
||||
}
|
||||
}
|
||||
|
||||
getData = (init = false) => {
|
||||
const { query } = this.state;
|
||||
const { completeURL, convertDatasource, dataParams = {} } = this.props;
|
||||
let payload = { ...dataParams, ...query };
|
||||
this.setState({ loading: true });
|
||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && data.list) {
|
||||
const { pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
listDatas: convertDatasource ? convertDatasource(data.list) : data.list
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
listDatas: convertDatasource ? convertDatasource(data).listDatas : [],
|
||||
leftListSelectedData: (init && convertDatasource) ? convertDatasource(data).checked : this.state.leftListSelectedData,
|
||||
rightDatas: (init && convertDatasource) ? convertDatasource(data).checked : this.state.rightDatas
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleOk = () => {
|
||||
const { rightDatas } = this.state;
|
||||
this.props.onChange && this.props.onChange(rightDatas);
|
||||
};
|
||||
onLeftListCheck = (keys, datas) => {
|
||||
const { leftListSelectedData } = this.state;
|
||||
let targets = leftListSelectedData.concat(datas);
|
||||
targets = _.uniqBy(targets, "id");
|
||||
targets = targets.filter((t) => keys.indexOf(t["id"]) > -1);
|
||||
this.setState({ leftListSelectedKeys: keys, leftListSelectedData: targets });
|
||||
};
|
||||
onleftDoubleClick = (data) => {
|
||||
const { rightDatas } = this.state;
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(data),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
};
|
||||
onRightDoubleClick = (key) => {
|
||||
const { rightDatas } = this.state;
|
||||
const newRightDatas = rightDatas.filter(item => String(item.id) !== key);
|
||||
this.setState({ rightDatas: newRightDatas, rightCheckedKeys: [] });
|
||||
};
|
||||
moveTo = (direction) => {
|
||||
const { rightDatas, rightCheckedKeys, listDatas, leftListSelectedData } = this.state;
|
||||
if (direction === "right") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(leftListSelectedData),
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
} else if (direction === "left") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.filter(item => !rightCheckedKeys.some(checkedKey => String(item.id) === checkedKey)),
|
||||
rightCheckedKeys: []
|
||||
});
|
||||
} else if (direction === "allToLeft") {
|
||||
this.setState({ rightDatas: [], rightCheckedKeys: [] });
|
||||
} else if (direction === "allToRight") {
|
||||
if (this.leftListAllActive()) {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(listDatas),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
leftListAllActive = () => {
|
||||
const { rightDatas, listDatas } = this.state;
|
||||
let bool = true;
|
||||
if (_.isEmpty(listDatas)) bool = false;
|
||||
if (!_.isEmpty(listDatas) && !_.isEmpty(rightDatas)) {
|
||||
bool = listDatas.filter((l) => !rightDatas.some(r => l.id === r.id)).length !== 0;
|
||||
}
|
||||
return bool;
|
||||
};
|
||||
renderTitle = () => {
|
||||
return (<div className="wea-hr-muti-dialog-title">
|
||||
<span>{getLabel(111, "数据选择")}</span>
|
||||
<div/>
|
||||
</div>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state;
|
||||
const { searchParamsKey, saveLoading } = this.props;
|
||||
const buttons = [
|
||||
<Button type="primary" loading={saveLoading} onClick={this.handleOk}
|
||||
disabled={_.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>];
|
||||
let rightActive = false, leftActive = false, rightAllActive = false;
|
||||
if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true;
|
||||
if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true;
|
||||
if (rightDatas && rightDatas.length > 0) rightAllActive = true;
|
||||
let dom = <Spin spinning={loading}>
|
||||
<div className="wea-hr-muti-dialog">
|
||||
<div className="wea-hr-muti-input-left">
|
||||
<Row style={{ height: 35 }}>
|
||||
<Col span="24">
|
||||
<WeaInputSearch value={query[searchParamsKey]} onSearch={() => this.getData()}
|
||||
onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<div>
|
||||
<WeaNewScroll height={this.dialog ? this.dialog.state.height - 51 : 260}>
|
||||
<CustomBrowserMutiLeft
|
||||
filterData={rightDatas}
|
||||
datas={listDatas}
|
||||
onDoubleClick={this.onleftDoubleClick}
|
||||
onClick={this.onLeftListCheck}
|
||||
selectedKeys={leftListSelectedKeys}
|
||||
/>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</div>
|
||||
<div className="wea-transfer-opration">
|
||||
<CustomBrowserOperation
|
||||
rightActive={rightActive}
|
||||
leftActive={leftActive}
|
||||
leftAllActive={this.leftListAllActive()}
|
||||
rightAllActive={rightAllActive}
|
||||
moveToRight={() => this.moveTo("right")}
|
||||
moveToLeft={() => this.moveTo("left")}
|
||||
moveAllToRight={() => this.moveTo("allToRight")}
|
||||
moveAllToLeft={() => this.moveTo("allToLeft")}
|
||||
/>
|
||||
</div>
|
||||
<div className="wea-hr-muti-input-right">
|
||||
<CustomBrowserMutiRight
|
||||
height={this.dialog ? this.dialog.state.height - 51 : 260}
|
||||
data={rightDatas} checkedKeys={rightCheckedKeys}
|
||||
checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })}
|
||||
onDoubleClick={this.onRightDoubleClick}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Spin>;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()}
|
||||
className="custom_browser_dialog" draggable={false} style={{
|
||||
width: 784, height: 460, minHeight: 200, minWidth: 380,
|
||||
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={buttons}>{dom}</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomTransferDialog;
|
||||
|
|
@ -7,7 +7,7 @@ class Index extends Component {
|
|||
render() {
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
title={this.props.title || getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
<WeaTop title={this.props.title || getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" {...this.props}/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
|||
// import Declare from "./pages/declare";
|
||||
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
||||
import TaxRate from "./pages/taxRate";
|
||||
import TaxAgent from "./pages/taxAgent";
|
||||
import TaxAgent from "./pages/salary/taxAgent";
|
||||
import CalculateDetail from "./pages/calculateDetail";
|
||||
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.setFontSize();
|
||||
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
|
||||
const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
|
||||
const link = document.createElement("link");
|
||||
|
|
@ -46,8 +47,31 @@ class Layout extends Component {
|
|||
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
|
||||
window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth();
|
||||
}
|
||||
window.addEventListener("storage", this.setFontSize);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("storage", this.setFontSize);
|
||||
}
|
||||
|
||||
setFontSize = () => {
|
||||
const { themeFontSize } = JSON.parse(localStorage.getItem("theme-themeInfo")) || { themeFontSize: "12" };
|
||||
if (window.location.href.indexOf("/spa/hrmSalary/") !== -1) {
|
||||
const href = `/cloudstore/resource/pc/com/font-size/${themeFontSize}px.css`;
|
||||
jQuery("#theme-font").remove();
|
||||
window.parent.jQuery("#theme-font1").remove();
|
||||
jQuery(jQuery("head")[0]).append(`<link id="theme-font" rel="stylesheet" type="text/css" href="${href}" />`);
|
||||
const link = document.createElement("link");
|
||||
link.setAttribute("rel", "stylesheet");
|
||||
link.setAttribute("type", "text/css");
|
||||
link.setAttribute("href", href);
|
||||
link.setAttribute("id", "theme-font1");
|
||||
setTimeout(() => {
|
||||
window.parent.document.head.appendChild(link);
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { PageAndOptAuth, loading } } = this.props;
|
||||
return (<WeaLocaleProvider>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,14 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { message, Spin } from "antd";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { toJS } from "mobx";
|
||||
import { getIframeParentHeight } from "../../../util";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import "../index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
|
@ -26,7 +27,16 @@ class SalaryDetails extends Component {
|
|||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
|
||||
showTotalCell: false, updateSum: true
|
||||
showTotalCell: false, updateSum: true,
|
||||
transferDialog: {
|
||||
visible: false, searchParamsKey: "name", dataParams: { page: "salary_details_report" }, saveLoading: false,
|
||||
completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", convertDatasource: datas => {
|
||||
return {
|
||||
listDatas: _.map(datas.setting, o => ({ id: o.id, name: o.name })),
|
||||
checked: this.converCheckedCol(datas)
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -73,10 +83,10 @@ class SalaryDetails extends Component {
|
|||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryList = (props) => {
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props;
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props;
|
||||
const [startDateStr, endDateStr] = dateRange;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo } = this.state;
|
||||
const { pageInfo, transferDialog } = this.state;
|
||||
const payload = {
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
|
|
@ -93,7 +103,7 @@ class SalaryDetails extends Component {
|
|||
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
|
||||
showTotalCell: confCode === "1"
|
||||
showTotalCell: confCode === "1", transferDialog: { ...transferDialog, cancel: false }
|
||||
}, () => tableStore.getDatas(dataKey.datas));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
@ -113,10 +123,10 @@ class SalaryDetails extends Component {
|
|||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
|
||||
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum, transferDialog } = this.state;
|
||||
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
|
||||
if (!_.isEmpty(columns)) {
|
||||
if (!_.isEmpty(columns) && !transferDialog.visible && !transferDialog.cancel) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
|
||||
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||
|
|
@ -130,9 +140,33 @@ class SalaryDetails extends Component {
|
|||
}
|
||||
return [];
|
||||
};
|
||||
handleSetDefCols = () => this.setState({ transferDialog: { ...this.state.transferDialog, visible: true } });
|
||||
converCheckedCol = (data) => {
|
||||
return _.reduce(data.checked, (pre, cur) => {
|
||||
const item = _.find(data.setting, k => k.id === cur);
|
||||
if (!_.isEmpty(item)) return [...pre, item];
|
||||
return pre;
|
||||
}, []);
|
||||
};
|
||||
savePageListSetting = (values) => {
|
||||
const payload = {
|
||||
page: "salary_details_report",
|
||||
setting: _.map(values, o => o.id)
|
||||
};
|
||||
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } });
|
||||
API.savePageListSetting(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ transferDialog: { ...this.state.transferDialog, visible: false } }, () => this.getSalaryList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const { loading, dataSource, transferDialog } = this.state;
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
return (
|
||||
<div className="table-layout"
|
||||
|
|
@ -151,6 +185,11 @@ class SalaryDetails extends Component {
|
|||
needScroll={true}
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
{/*默认显示列*/}
|
||||
<CustomTransferDialog {...transferDialog} onChange={this.savePageListSetting}
|
||||
onCancel={() => this.setState({
|
||||
transferDialog: { ...transferDialog, visible: false, cancel: true }
|
||||
})}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ class Index extends Component {
|
|||
<AdvanceInputBtn onOpenAdvanceSearch={this.handleOpenAdvanceSearch}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
];
|
||||
const dropMenuDatas = [
|
||||
let dropMenuDatas = [
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
|
|
@ -334,6 +334,11 @@ class Index extends Component {
|
|||
{ key: "detail", title: getLabel(111, "员工明细") },
|
||||
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1);
|
||||
(PageAndOptAuth.isChief && selectedKey === "salaryDetail") && (dropMenuDatas = [...dropMenuDatas, {
|
||||
key: "DEF_COLUMN", icon: <i className="icon-coms-Custom"/>, content: getLabel(111, "默认显示列"),
|
||||
onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols()
|
||||
}]);
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
|
|
@ -341,8 +346,7 @@ class Index extends Component {
|
|||
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
|
||||
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)}
|
||||
>
|
||||
dropMenuDatas={dropMenuDatas}>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
addedemployeeList,
|
||||
deleteAcctemployee,
|
||||
reducedemployeeList,
|
||||
refreshAcctemployee,
|
||||
saveAcctemployee
|
||||
} from "../../../../../apis/calculate";
|
||||
import { personConfirmSearchConditions } from "./condition";
|
||||
|
|
@ -90,6 +91,8 @@ class Index extends Component {
|
|||
>
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(1421, "新增")}/>
|
||||
</WeaBrowser>,
|
||||
<span className="icon-refresh" onClick={this.handleRefresh}><i
|
||||
className="icon-coms-Refresh"/></span>,
|
||||
<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>
|
||||
];
|
||||
break;
|
||||
|
|
@ -180,6 +183,23 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleRefresh = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
refreshAcctemployee({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.queryPCList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { calculateStore: { PCSearchForm } } = this.props;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,18 @@
|
|||
.wea-new-table {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.icon-refresh {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #fff;
|
||||
background: #55a1f8;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.docalc-baseinfo-layout {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ class Index extends Component {
|
|||
}
|
||||
}, () => {
|
||||
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
|
||||
cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] })
|
||||
cacheImportField({ salaryAcctRecordId, salaryItemIds: salaryItems ? salaryItems.split(",") : [] })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
const payload = {
|
||||
|
|
|
|||
|
|
@ -125,6 +125,15 @@ class Index extends Component {
|
|||
case "offlineCompare":
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank");
|
||||
break;
|
||||
case "LOCK":
|
||||
case "UNLOCK":
|
||||
const { selectedRowKeys } = this.calc.calcTableRef.wrappedInstance.state;
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(543303, "请选择表格数据!"));
|
||||
return;
|
||||
}
|
||||
this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -145,6 +154,8 @@ class Index extends Component {
|
|||
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||
<Menu.Item key="offlineCompare">{getLabel(543249, "线下对比")}</Menu.Item>
|
||||
<Menu.Item key="LOCK">{getLabel(111, "批量锁定")}</Menu.Item>
|
||||
<Menu.Item key="UNLOCK">{getLabel(111, "批量解锁")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
reqBtns = [
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class Index extends Component {
|
|||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryFileList = (props, init = false) => {
|
||||
const { pageInfo } = this.state;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class Index extends Component {
|
|||
if (it === "ackFeedbackStatus" || it === "feedbackStatus") {
|
||||
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
||||
} else {
|
||||
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||
payrollTempFeedbackForm.updateFields({ [it]: (!_.isNil(fieldsEchoData[it]) && fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { WeaButtonIcon, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.rolemanagement-content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 16px 16px 0;
|
||||
padding: 8px 16px 0;
|
||||
background: rgb(246, 246, 246);
|
||||
|
||||
.wea-new-table {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,29 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["rule"],
|
||||
fieldcol: 10,
|
||||
label: "人员字段",
|
||||
lanId: 543352,
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "人员校验规则",
|
||||
lanId: 543357,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["orderRule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(15512, "排序字段"),
|
||||
label: "排序字段",
|
||||
lanId: 15512,
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
|
|
@ -19,28 +32,15 @@ export const conditions = [
|
|||
conditionType: "SELECT",
|
||||
domkey: ["ascOrDesc"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543351, "正序/倒序"),
|
||||
label: "正序/倒序",
|
||||
lanId: 543351,
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543356, "排序规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["rule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(543352, "人员字段"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543357, "人员校验规则"),
|
||||
title: "排序规则",
|
||||
lanId: 543356,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
|
|
@ -49,48 +49,48 @@ export const conditions = [
|
|||
conditionType: "SWITCH",
|
||||
domkey: ["OPEN_APPLICATION_ENCRYPT"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(526997, "加密设置"),
|
||||
label: "加密设置",
|
||||
lanId: 526997,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(543358, "加密规则"),
|
||||
title: "加密规则",
|
||||
lanId: 543358,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["taxDeclarationFunction"],
|
||||
domkey: ["salaryShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "系统算税"),
|
||||
label: "显示工资单页签",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 1
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["WITHDRAW_TAX_DECLARATION"],
|
||||
domkey: ["adjustShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "撤回申报表"),
|
||||
label: "显示调薪记录页签",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "算税规则"),
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["salaryArchiveDelete"],
|
||||
domkey: ["taxAgentShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "允许删除档案"),
|
||||
label: "显示【个税扣缴义务人】信息",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(538004, "薪资档案"),
|
||||
title: "我的薪资福利设置",
|
||||
lanId: 111,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
|
|
@ -99,7 +99,8 @@ export const conditions = [
|
|||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseDiffByPerAndCom"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "区分个人和公司"),
|
||||
label: "区分个人和公司",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
|
|
@ -107,12 +108,30 @@ export const conditions = [
|
|||
conditionType: "SWITCH",
|
||||
domkey: ["welBaseAutoAdjust"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "导入基数自动调整上/下限"),
|
||||
label: "导入基数自动调整上/下限",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "福利档案基数"),
|
||||
title: "福利档案基数",
|
||||
lanId: 111,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["salaryArchiveDelete"],
|
||||
fieldcol: 10,
|
||||
label: "允许删除档案",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "薪资档案",
|
||||
lanId: 538004,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
|
|
@ -121,73 +140,84 @@ export const conditions = [
|
|||
conditionType: "SELECT",
|
||||
domkey: ["matchRule"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "匹配规则"),
|
||||
label: "匹配规则",
|
||||
lanId: 111,
|
||||
options: [],
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["salaryAcctFixedColumns"],
|
||||
fieldcol: 10,
|
||||
label: "固定数",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算人员匹配规则"),
|
||||
title: "薪资核算",
|
||||
lanId: 111,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["salaryAcctFixedColumns"],
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["taxDeclarationFunction"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "固定数"),
|
||||
label: "系统算税",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["WITHDRAW_TAX_DECLARATION"],
|
||||
fieldcol: 10,
|
||||
label: "撤回申报表",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "薪资核算固定列头数"),
|
||||
title: "算税规则",
|
||||
lanId: 111,
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["REPORT_ORGANIZATIN_TYPE"],
|
||||
fieldcol: 10,
|
||||
label: "组织信息",
|
||||
lanId: 111,
|
||||
options: [],
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "薪资报表",
|
||||
lanId: 111,
|
||||
defaultshow: true
|
||||
}
|
||||
// {
|
||||
// items: [
|
||||
// {
|
||||
// conditionType: "SWITCH",
|
||||
// domkey: ["extEmpsWitch"],
|
||||
// fieldcol: 10,
|
||||
// label: getLabel(111, "开启非系统人员"),
|
||||
// label: "开启非系统人员",
|
||||
// lanId: 111,
|
||||
// labelcol: 8,
|
||||
// viewAttr: 2
|
||||
// }
|
||||
// ],
|
||||
// title: getLabel(111, "非系统人员"),
|
||||
// title: "非系统人员",
|
||||
// lanId: 111,
|
||||
// defaultshow: true
|
||||
// },
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["salaryShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示工资单页签"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["adjustShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示调薪记录页签"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["taxAgentShowStatus"],
|
||||
fieldcol: 10,
|
||||
label: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(111, "我的薪资福利设置"),
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const payloadList = [
|
||||
{ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" },
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
overflow: hidden !important;
|
||||
|
||||
.ruleWrapper {
|
||||
padding: 16px;
|
||||
padding: 8px 16px 0;
|
||||
background: #e5e5e5;
|
||||
height: 100%;
|
||||
overflow: hidden auto;
|
||||
|
|
|
|||
|
|
@ -39,10 +39,18 @@ class RuleConfig extends Component {
|
|||
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
|
||||
this.setState({
|
||||
sysinfo, conditions: _.map(conditions, item => ({
|
||||
...item,
|
||||
...item, title: getLabel(item.lanId, item.title),
|
||||
items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
|
||||
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
||||
} else if (getKey(o) === "REPORT_ORGANIZATIN_TYPE") {
|
||||
return {
|
||||
...o, options: [
|
||||
{ key: "0", showname: getLabel(111, "核算时组织信息"), selected: true },
|
||||
{ key: "1", showname: getLabel(111, "实时组织信息"), selected: false }
|
||||
]
|
||||
};
|
||||
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
||||
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
|
||||
} else if (getKey(o) === "taxDeclarationFunction") {
|
||||
|
|
@ -69,7 +77,9 @@ class RuleConfig extends Component {
|
|||
} else if (item === "matchRule") {
|
||||
form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } });
|
||||
} else if (item === "taxDeclarationFunction") {
|
||||
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
|
||||
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "1") } });
|
||||
} else if (item === "REPORT_ORGANIZATIN_TYPE") {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } });
|
||||
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
|
||||
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
|
||||
|
|
@ -117,6 +127,7 @@ class RuleConfig extends Component {
|
|||
case "taxAgentShowStatus":
|
||||
case "salaryShowStatus":
|
||||
case "adjustShowStatus":
|
||||
case "REPORT_ORGANIZATIN_TYPE":
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
const confTitle = {
|
||||
|
|
@ -126,7 +137,8 @@ class RuleConfig extends Component {
|
|||
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
||||
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
||||
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
||||
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
|
||||
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息")
|
||||
};
|
||||
this.unifiedSettings(key, confTitle[key]);
|
||||
this.handleDebounce = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 基础设置
|
||||
* Description:
|
||||
* Date: 2022/11/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions";
|
||||
import { getSearchs } from "../../../util";
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class BaseSettings extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { salarytaxAgentForm }, decentralization, isChief } = this.props;
|
||||
return (
|
||||
<div className="form-dialog-layout">
|
||||
{
|
||||
decentralization === "0" ?
|
||||
getSearchs(salarytaxAgentForm, convertConditon(decentralizationConditions, !isChief), 1, false) :
|
||||
getSearchs(salarytaxAgentForm, convertConditon(editConditions, !isChief), 1, false)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default BaseSettings;
|
||||
|
||||
export const convertConditon = (condition, bool) => {
|
||||
return _.map(condition, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: bool ? 1 : child.viewAttr
|
||||
};
|
||||
})
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税扣缴义务人小提示组件
|
||||
* Description:
|
||||
* Date: 2022/11/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ComHint extends Component {
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 提示语注释
|
||||
* Params: isChief=总管理员
|
||||
* Date: 2022/11/22
|
||||
*/
|
||||
renderTips = () => {
|
||||
const { isChief = true } = this.props;
|
||||
if (isChief) {
|
||||
return [
|
||||
<p>{getLabel(111, "1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;")}</p>,
|
||||
<p>{getLabel(111, "2、删除个税扣缴义务人需先确认档案里无人员使用该个税扣缴义务人,否则不予删除;")}</p>,
|
||||
<p>{getLabel(111, "3、只有薪酬总管理员能够操作个税扣缴义务人的增减和开启/关闭分权;")}</p>,
|
||||
<p>{getLabel(111, "4、开启分权,需维护个税扣缴义务人的管理员;当前总管理员默认有管理员的权限;")}</p>
|
||||
];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="comHint">
|
||||
<div className="hintHeader">{getLabel(111, "小提示")}</div>
|
||||
<div className="hintTips">
|
||||
{this.renderTips()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ComHint;
|
||||
|
|
@ -0,0 +1,440 @@
|
|||
export const fieldList = [
|
||||
{
|
||||
key: "name",
|
||||
label: "名称",
|
||||
lanId: 33439,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "taxCode",
|
||||
label: "税号",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "city",
|
||||
label: "报税所属区域",
|
||||
lanId: 111,
|
||||
type: "SELECT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "areaCode",
|
||||
label: "行政区划代码",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "passwordType",
|
||||
label: "密码校验类型",
|
||||
lanId: 111,
|
||||
type: "RADIO",
|
||||
viewAttr: 3,
|
||||
options: [
|
||||
{
|
||||
key: "TAX_NET_PASSWORD",
|
||||
showname: "个税网报密码",
|
||||
lanId: 111
|
||||
},
|
||||
{
|
||||
key: "REAL_NAME_PASSWORD",
|
||||
showname: "实名账号密码",
|
||||
lanId: 111
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "account",
|
||||
label: "实名账号",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "realNamePassword",
|
||||
label: "实名账号密码",
|
||||
lanId: 111,
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "netPassword",
|
||||
label: "个税网报密码",
|
||||
lanId: 111,
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "taxRegistrationNumber",
|
||||
label: "登记序号",
|
||||
type: "TEXT",
|
||||
lanId: 111,
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "departmentCode",
|
||||
label: "部门编码",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "checkStatus",
|
||||
label: "报税信息验证状态",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
}
|
||||
];
|
||||
|
||||
export const taxFillCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxAgentName"],
|
||||
fieldcol: 14,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxRegistrationNumber"],
|
||||
fieldcol: 14,
|
||||
label: "登记序号",
|
||||
lanId: 545138,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxpayerStatus"],
|
||||
fieldcol: 14,
|
||||
label: "纳税人状态",
|
||||
lanId: 545139,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["legalPersonName"],
|
||||
fieldcol: 14,
|
||||
label: "法人姓名",
|
||||
lanId: 545140,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["mobile"],
|
||||
fieldcol: 14,
|
||||
label: "联系电话",
|
||||
lanId: 545141,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["businessAddress"],
|
||||
fieldcol: 14,
|
||||
label: "生产经营地址",
|
||||
lanId: 545142,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["industryName"],
|
||||
fieldcol: 14,
|
||||
label: "行业名称",
|
||||
lanId: 545143,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxAuthorities"],
|
||||
fieldcol: 14,
|
||||
label: "主管税务机关",
|
||||
lanId: 545144,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxBranch"],
|
||||
fieldcol: 14,
|
||||
label: "主管税务科所",
|
||||
lanId: 545145,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["divideFiling"],
|
||||
fieldcol: 14,
|
||||
label: "是否分部门备案",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const deptFillCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["departmentName"],
|
||||
fieldcol: 14,
|
||||
label: "部门名称",
|
||||
lanId: 536641,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["departmentCode"],
|
||||
fieldcol: 14,
|
||||
label: "部门编码",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const taxFillColumns = [
|
||||
{
|
||||
dataIndex: "taxCode",
|
||||
title: "税号",
|
||||
titleId: "",
|
||||
fixed: "left"
|
||||
},
|
||||
{
|
||||
dataIndex: "taxAgentName",
|
||||
title: "个税扣缴义务人",
|
||||
titleId: "537996"
|
||||
},
|
||||
{
|
||||
dataIndex: "taxRegistrationNumber",
|
||||
title: "登记序号",
|
||||
titleId: "545138"
|
||||
},
|
||||
{
|
||||
dataIndex: "taxpayerStatus",
|
||||
title: "纳税人状态",
|
||||
titleId: "545139"
|
||||
},
|
||||
{
|
||||
dataIndex: "taxAuthorities",
|
||||
title: "主管税务机关",
|
||||
titleId: "545144"
|
||||
},
|
||||
{
|
||||
dataIndex: "taxBranch",
|
||||
title: "主管税务科所",
|
||||
titleId: "545145"
|
||||
},
|
||||
{
|
||||
dataIndex: "businessAddress",
|
||||
title: "生产经营地址",
|
||||
titleId: "545142"
|
||||
},
|
||||
{
|
||||
dataIndex: "industryName",
|
||||
title: "行业名称",
|
||||
titleId: "545143"
|
||||
},
|
||||
{
|
||||
dataIndex: "legalPersonName",
|
||||
title: "法人姓名",
|
||||
titleId: "545140"
|
||||
},
|
||||
{
|
||||
dataIndex: "mobile",
|
||||
title: "联系电话",
|
||||
titleId: "545141"
|
||||
}
|
||||
];
|
||||
export const personScopeConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT_LINKAGE",
|
||||
domkey: ["targetType"],
|
||||
fieldcol: 18,
|
||||
label: "对象类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
viewAttr: 3,
|
||||
rules: "selectLinkageRequired",
|
||||
selectLinkageDatas: {}
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["employeeStatus"],
|
||||
fieldcol: 18,
|
||||
label: "选择员工状态",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
detailtype: "2",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const scopeSelectLinkageDatas = {
|
||||
EMPLOYEE:{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
dataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
pageSize: 10,
|
||||
linkUrl: "",
|
||||
type: "17",
|
||||
viewAttr: 3,
|
||||
rules:'required',
|
||||
title: ""
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
DEPT:{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
dataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
pageSize: 10,
|
||||
linkUrl: "",
|
||||
type: "57",
|
||||
viewAttr: 3,
|
||||
rules:'required',
|
||||
title: ""
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
SUBCOMPANY:{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
dataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
pageSize: 10,
|
||||
linkUrl: "",
|
||||
type: "164",
|
||||
viewAttr: 3,
|
||||
rules:'required',
|
||||
title: ""
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
POSITION:{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
dataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
pageSize: 10,
|
||||
linkUrl: "",
|
||||
type: "278",
|
||||
viewAttr: 3,
|
||||
rules:'required',
|
||||
title: ""
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},
|
||||
SQL: {
|
||||
conditionType: "TEXTAREA",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
.taxAgentSlideContent {
|
||||
height: 100%;
|
||||
background: #F6F6F6;
|
||||
|
||||
.ant-steps {
|
||||
margin: 0 0 20px 0 !important;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.personal-scope {
|
||||
padding: 8px 16px;
|
||||
height: 100%;
|
||||
|
||||
.wea-tab, .wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.icon-refresh {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #fff;
|
||||
background: #55a1f8;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.baseSettingWrapper, .taxDeclarationInfoWrapper {
|
||||
padding: 12px 12px 12px 20px;
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: none;
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-cell, .wea-form-item {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding: 5px 10px 5px 30px;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 0 !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comHint {
|
||||
width: 100%;
|
||||
margin: 16px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
background: #FFF;
|
||||
|
||||
.hintHeader {
|
||||
background: #f6f6f6;
|
||||
height: 40px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding-left: 16px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.hintTips {
|
||||
width: 100%;
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
padding: 0 16px;
|
||||
display: inline-block;
|
||||
|
||||
p {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slideOuterWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1060px) and (max-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: calc(100% - 96px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//添加关联人员弹框中的下拉框样式
|
||||
.personalScopeModalWrapper {
|
||||
.wea-select, .ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.taxfillingDialog {
|
||||
.ant-modal-title {
|
||||
.text-elli {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.taxfillingDialogContent {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
background: #f6f6f6;
|
||||
overflow-y: auto;
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
background: #FFF;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: 0;
|
||||
|
||||
.ant-row, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员范围
|
||||
* Description:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { message, Modal } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaButtonIcon, WeaInputSearch, WeaLocaleProvider, WeaTab } from "ecCom";
|
||||
import {
|
||||
taxAgentRangeDelete,
|
||||
taxAgentRangeExtDelete,
|
||||
taxAgentRangeExtSave,
|
||||
taxAgentRangeImportData
|
||||
} from "../../../apis/taxAgent";
|
||||
import { sysinfo } from "../../../apis/ruleconfig";
|
||||
import PersonalScopeTable from "./personalScopeTable";
|
||||
import PersonalScopeModal from "./personalScopeModal";
|
||||
import ImportDialog from "../../../components/importDialog";
|
||||
import ExternalPersonModal from "../../../components/externalPersonModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class PersonalScope extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchValue: "", selectedKey: "listInclude", rowKeys: [], loading: false,
|
||||
extEmpsWitch: "1", //非系统人员开关, 1: 开启, 0:关闭
|
||||
personalAddModal: { visible: false, externalVisible: false, title: getLabel(111, "关联人员"), includeType: "" },
|
||||
importParams: {
|
||||
visible: false, title: getLabel(111, "数据导入"), nextloading: false, importResult: {}, imageId: "",
|
||||
link: `/api/bs/hrmsalary/taxAgent/range/downloadTemplate?taxAgentId=${props.taxAgentId}`,
|
||||
previewUrl: "/api/bs/hrmsalary/taxAgent/range/preview"
|
||||
}
|
||||
};
|
||||
this.personalScopeTableRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore: { hasIconInTax } } = this.props;
|
||||
hasIconInTax();
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:非系统人员开关查询
|
||||
* Params:
|
||||
* Date: 2023/11/9
|
||||
*/
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data }) => {
|
||||
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 删除人员范围
|
||||
* Params:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
taxAgentRangeDelete = () => {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: () => {
|
||||
const { selectedKey } = this.state;
|
||||
const API = selectedKey === "listExt" ? taxAgentRangeExtDelete : taxAgentRangeDelete;
|
||||
API(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:新增人员范围
|
||||
* Params:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
handleAddPersonal = () => {
|
||||
const { personalAddModal, selectedKey } = this.state;
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
visible: selectedKey !== "listExt",
|
||||
externalVisible: selectedKey === "listExt",
|
||||
includeType: selectedKey === "listInclude" ? 1 : 0
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImportFile = (params) => {
|
||||
const { taxAgentId } = this.props, { importParams } = this.state;
|
||||
this.setState({ importParams: { ...importParams, nextloading: true } });
|
||||
taxAgentRangeImportData({ ...params, taxAgentId }).then(({ status, errormsg, data }) => {
|
||||
this.setState({ importParams: { ...importParams, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({ importParams: { ...importParams, importResult: data } });
|
||||
} else {
|
||||
message.warning(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 保存非系统人员
|
||||
* Params:
|
||||
* Date: 2023/11/9
|
||||
*/
|
||||
handleSaveExtPersons = (payload = {}) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { personalAddModal } = this.state;
|
||||
this.setState({ loading: false });
|
||||
taxAgentRangeExtSave({ taxAgentId, ...payload }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("新增成功");
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
externalVisible: false
|
||||
}
|
||||
}, () => this.personalScopeTableRef.getPersonalScopeList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, searchValue, rowKeys, personalAddModal, importParams, extEmpsWitch, loading } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth }, taxAgentId } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const topTab = [
|
||||
{
|
||||
title: "管理范围",
|
||||
viewcondition: "listInclude"
|
||||
},
|
||||
{
|
||||
title: "从范围中排除",
|
||||
viewcondition: "listExclude"
|
||||
},
|
||||
{
|
||||
title: "非系统人员范围",
|
||||
viewcondition: "listExt"
|
||||
}
|
||||
];
|
||||
const btns = showOperateBtn ? [
|
||||
<span className="icon-refresh" title={getLabel(111, "导入")} onClick={() => {
|
||||
this.setState({ importParams: { ...importParams, visible: true } });
|
||||
}}><i className="icon-coms-leading-in"/></span>,
|
||||
<WeaButtonIcon
|
||||
buttonType="del"
|
||||
type="primary"
|
||||
disabled={_.isEmpty(rowKeys)}
|
||||
onClick={this.taxAgentRangeDelete}
|
||||
/>,
|
||||
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddPersonal}/>,
|
||||
<WeaInputSearch
|
||||
style={{ width: 220 }}
|
||||
value={searchValue}
|
||||
onChange={searchValue => this.setState({ searchValue })}
|
||||
placeholder="请输入对象"
|
||||
onSearch={() => this.personalScopeTableRef.getPersonalScopeList(selectedKey, 1)}
|
||||
/>
|
||||
] : [<WeaInputSearch
|
||||
style={{ width: 220 }}
|
||||
value={searchValue}
|
||||
onChange={searchValue => this.setState({ searchValue })}
|
||||
placeholder="请输入对象"
|
||||
onSearch={() => this.personalScopeTableRef.getPersonalScopeList(selectedKey, 1)}
|
||||
/>];
|
||||
(selectedKey === "listExclude" || selectedKey === "listExt") && btns.shift();
|
||||
return (
|
||||
<div className="personal-scope">
|
||||
<WeaTab
|
||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? topTab.slice(0, -1) : topTab}
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
buttons={btns}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
/>
|
||||
<PersonalScopeTable
|
||||
ref={dom => this.personalScopeTableRef = dom}
|
||||
taxAgentId={taxAgentId}
|
||||
tabActive={selectedKey}
|
||||
searchValue={searchValue}
|
||||
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
||||
/>
|
||||
{/*非系统人员添加*/}
|
||||
<ExternalPersonModal
|
||||
visible={personalAddModal.externalVisible} loading={loading}
|
||||
onCancel={() => this.setState({ personalAddModal: { ...personalAddModal, externalVisible: false } })}
|
||||
onExternalPersonSave={this.handleSaveExtPersons}
|
||||
/>
|
||||
<PersonalScopeModal
|
||||
{...personalAddModal}
|
||||
taxAgentId={taxAgentId}
|
||||
onSuccess={() => this.personalScopeTableRef.getPersonalScopeList()}
|
||||
onCancel={(callback) =>
|
||||
this.setState({
|
||||
personalAddModal: { ...personalAddModal, visible: false, includeType: "" }
|
||||
}, () => callback && callback())
|
||||
}
|
||||
/>
|
||||
<ImportDialog {...importParams}
|
||||
nextCallback={imageId => this.setState({ importParams: { ...importParams, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImportFile({ imageId })}
|
||||
onResetImportResult={() => this.setState(({
|
||||
importParams: { ...importParams, importResult: {}, imageId: "" }
|
||||
}))}
|
||||
onCancel={(callback) => this.setState({
|
||||
importParams: { ...importParams, visible: false }
|
||||
}, () => callback && this.personalScopeTableRef.getPersonalScopeList(selectedKey, 1))}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PersonalScope;
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 新增人员范围弹框
|
||||
* Description:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { WeaCheckbox, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getTaxAgentRangeForm, taxAgentRangeSave } from "../../../apis/taxAgent";
|
||||
import { personScopeConditions, scopeSelectLinkageDatas } from "./constants";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class PersonalScopeModal extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: [], employeeStatus: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxAgentRangeForm();
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.taxAgentStore.initPersonScopeForm();
|
||||
}
|
||||
|
||||
getTaxAgentRangeForm = () => {
|
||||
getTaxAgentRangeForm().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { employeeStatus, targetTypeList } = data;
|
||||
this.setState({
|
||||
employeeStatus, conditions: _.map(personScopeConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "employeeStatus") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(employeeStatus, it => ({ key: it.id, showname: it.name }))
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(targetTypeList, it => ({
|
||||
key: it.id, showname: it.name, selected: it.id === "EMPLOYEE"
|
||||
})),
|
||||
selectLinkageDatas: { ...scopeSelectLinkageDatas }
|
||||
};
|
||||
})
|
||||
}))
|
||||
}, () => this.props.taxAgentStore.personScopeForm.initFormFields(this.state.conditions));
|
||||
}
|
||||
});
|
||||
};
|
||||
taxAgentRangeSave = () => {
|
||||
const { taxAgentStore: { personScopeForm } } = this.props;
|
||||
personScopeForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { employeeStatus, targetType, target } = personScopeForm.getFormParams();
|
||||
const { includeType, taxAgentId } = this.props;
|
||||
const payload = {
|
||||
includeType, taxAgentId, employeeStatus: employeeStatus.split(","),
|
||||
targetParams: _.map(target.split(","), it => ({
|
||||
targetType, targetId: targetType === "SQL" ? "0" : it,
|
||||
target: targetType === "SQL" ? target : ""
|
||||
}))
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
taxAgentRangeSave(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: true }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
renderForm = () => {
|
||||
const { taxAgentStore: { personScopeForm } } = this.props;
|
||||
const { conditions, employeeStatus } = this.state, { isFormInit } = personScopeForm,
|
||||
formParams = personScopeForm.getFormParams();
|
||||
const checked = formParams.employeeStatus && _.every(_.map(employeeStatus, o => o.id), k => formParams.employeeStatus.indexOf(k) !== -1);
|
||||
let group = [];
|
||||
isFormInit && 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={personScopeForm.getError(fields)}
|
||||
tipPosition="bottom">
|
||||
{
|
||||
getKey(fields) === "employeeStatus" &&
|
||||
<WeaCheckbox value={checked ? "1" : "0"} content={getLabel(111, "全选")}
|
||||
onChange={this.handleChangeAll}/>
|
||||
}
|
||||
<WeaSwitch fieldConfig={fields} form={personScopeForm} formParams={formParams}/>
|
||||
</WeaFormItem>),
|
||||
hide: fields.hide
|
||||
});
|
||||
});
|
||||
group.push(<WeaSearchGroup col={1} needTigger showGroup={c.defaultshow} items={items}/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
handleChangeAll = (val) => {
|
||||
const { taxAgentStore: { personScopeForm } } = this.props, { employeeStatus } = this.state;
|
||||
val === "1" ? personScopeForm.updateFields({ employeeStatus: { value: _.map(employeeStatus, o => o.id).join(",") } }) :
|
||||
personScopeForm.updateFields({ employeeStatus: { value: "" } });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { title, taxAgentStore: { personScopeForm } } = this.props, { loading } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.taxAgentRangeSave} loading={loading}>{getLabel(111, "确定")}</Button>,
|
||||
<Button type="ghost" onClick={() => personScopeForm.resetForm()}>{getLabel(111, "重置")}</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog {...this.props} initLoadCss title={title} style={{ width: 600 }} buttons={buttons}>
|
||||
<div className="form-dialog-layout">{this.renderForm()}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PersonalScopeModal;
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员范围列表数据
|
||||
* Description:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { getTaxAgentRangeListExclude, getTaxAgentRangeListInclude, taxAgentRangelistExt } from "../../../apis/taxAgent";
|
||||
import "./index.less";
|
||||
import { calcPageNo } from "../../../util";
|
||||
|
||||
const APIFox = {
|
||||
listInclude: getTaxAgentRangeListInclude,
|
||||
listExclude: getTaxAgentRangeListExclude,
|
||||
listExt: taxAgentRangelistExt
|
||||
};
|
||||
|
||||
class PersonalScopeTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
selectedRowKeys: [],
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getPersonalScopeList();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.tabActive !== this.props.tabActive) {
|
||||
this.setState({ selectedRowKeys: [] }, () => {
|
||||
this.getPersonalScopeList(nextProps.tabActive);
|
||||
nextProps.onChangeSelectKey([]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getPersonalScopeList = (tabActive = this.props.tabActive, current) => {
|
||||
const { searchValue, taxAgentId } = this.props;
|
||||
const { pageInfo, loading } = this.state;
|
||||
const payload = {
|
||||
taxAgentId, targetName: searchValue, ...pageInfo, current: current || pageInfo.current
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
APIFox[tabActive](payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns: _.map(columns, item => {
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 清空选中项
|
||||
* Params:
|
||||
* Date: 2022/11/30
|
||||
*/
|
||||
clearRowkeys = () => {
|
||||
const { pageInfo, selectedRowKeys } = this.state;
|
||||
this.setState({
|
||||
selectedRowKeys: [],
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: calcPageNo(pageInfo.total, pageInfo.current, 10, selectedRowKeys.length)
|
||||
}
|
||||
}, () => {
|
||||
this.getPersonalScopeList();
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state;
|
||||
const { onChangeSelectKey } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => {
|
||||
this.getPersonalScopeList();
|
||||
});
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
this.setState({ selectedRowKeys }, () => {
|
||||
onChangeSelectKey(this.state.selectedRowKeys);
|
||||
});
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
columns={columns}
|
||||
scroll={{ y: `calc(100vh - 230px)` }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PersonalScopeTable;
|
||||
|
|
@ -0,0 +1,303 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 新增/编辑个税扣缴义务人
|
||||
* Description:
|
||||
* Date: 2022/11/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
|
||||
import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions";
|
||||
import BaseSettings, { convertConditon } from "./baseSettings";
|
||||
import PersonalScope from "./personalScope";
|
||||
import TaxDeclarationInfo from "./taxDeclarationInfo";
|
||||
import TaxFilingInfoDialofg from "./taxFillingInfoDialog";
|
||||
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
|
||||
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
|
||||
import * as API from "../../../apis/taxAgent";
|
||||
import { registrationCheck } from "../../../apis/taxAgent";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class TaxAgentSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
current: 0, loading: false, verifyLoading: false, taxAgentId: "",
|
||||
taxFilingInfoDialofg: {
|
||||
visible: false, title: "", checkPayload: {},
|
||||
isEdit: false, jumpAll: false, loading: false,
|
||||
taxAgentTaxReturnCheckFormDTO: null
|
||||
}
|
||||
};
|
||||
this.taxInfoRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible || nextProps.decentralization !== this.props.decentralization) {
|
||||
const { taxAgentStore: { salarytaxAgentForm }, decentralization, isChief } = nextProps;
|
||||
decentralization === "0" ?
|
||||
salarytaxAgentForm.setCondition(convertConditon(decentralizationConditions, !isChief), true) :
|
||||
salarytaxAgentForm.setCondition(convertConditon(editConditions, !isChief), true);
|
||||
this.setState({ current: nextProps.current, taxAgentId: nextProps.taxAgentId }, () => {
|
||||
if (this.state.taxAgentId) this.getTaxAgentForm();
|
||||
});
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.taxAgentStore.setSalarytaxAgentForm();
|
||||
}
|
||||
|
||||
getTaxAgentForm = () => {
|
||||
const { taxAgentId } = this.state;
|
||||
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
|
||||
API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { name, description, adminUserIds, sortedIndex } = data;
|
||||
salarytaxAgentForm.updateFields({
|
||||
name: { value: name },
|
||||
adminUserIds: {
|
||||
value: _.map(adminUserIds, it => it.id.toString()).join(","),
|
||||
valueSpan: _.map(adminUserIds, it => it.content).join(",")
|
||||
},
|
||||
sortedIndex: { value: sortedIndex },
|
||||
description: { value: description }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 保存个税扣缴义务人
|
||||
* Params:
|
||||
* Date: 2022/12/1
|
||||
*/
|
||||
saveTaxAgent = (payload) => {
|
||||
const { onOk, salaryOn } = this.props;
|
||||
const { current } = this.state;
|
||||
this.setState({ loading: true });
|
||||
API.saveTaxAgent(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功"));
|
||||
this.setState({
|
||||
current: !salaryOn ? current + 2 : current + 1,
|
||||
taxAgentId: data
|
||||
}, () => onOk());
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败"));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 编辑个税扣缴义务人
|
||||
* Params:
|
||||
* Date: 2022/12/1
|
||||
*/
|
||||
updateTaxAgent = (payload) => {
|
||||
const { onCancel } = this.props;
|
||||
this.setState({ loading: true });
|
||||
API.updateTaxAgent(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(31439, "更新成功"));
|
||||
onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg || getLabel(31825, "更新失败"));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleSave = () => {
|
||||
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
|
||||
const { taxAgentId } = this.state;
|
||||
salarytaxAgentForm.validateForm().then((f) => {
|
||||
if (f.isValid) {
|
||||
const formData = salarytaxAgentForm.getFormParams();
|
||||
const payload = {
|
||||
...formData,
|
||||
adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
|
||||
};
|
||||
taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload);
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSaveAndVerify = (jumpAll = false) => {
|
||||
const { isEdit } = this.props, { taxAgentId, taxFilingInfoDialofg } = this.state;
|
||||
const { fieldForm, fieldItem } = this.taxInfoRef.state;
|
||||
const { city: cityStr, cityVal = [], netPassword, realNamePassword, ...extra } = fieldForm;
|
||||
const boolean = _.every(_.filter(fieldItem, item => item.viewAttr === 3), it => fieldForm[it.key]);
|
||||
if (!boolean) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const [nation, province, city] = cityStr ? cityStr.split("-") : [];
|
||||
const proBool = _.every(cityStr ? cityStr.split("-") : [], it => it !== "undefined");
|
||||
if (!proBool) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "请展开选择报税所属区域!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
// requestType: 1:保存并验证 2:保存
|
||||
const payload = {
|
||||
...extra, nation, province, city,
|
||||
taxAgentId, requestType: 1, password: netPassword || realNamePassword,
|
||||
cityname: !_.isEmpty(cityVal) ? _.head(cityVal).name : ""
|
||||
};
|
||||
this.setState({ verifyLoading: true });
|
||||
API.saveAndCheck(_.omitBy(payload, val => _.isNil(val))).then(({ status, data, errormsg }) => {
|
||||
this.setState({ verifyLoading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.setState({
|
||||
taxFilingInfoDialofg: {
|
||||
...taxFilingInfoDialofg, visible: true,
|
||||
isEdit, jumpAll, title: fieldForm.name, checkPayload: payload,
|
||||
taxAgentTaxReturnCheckFormDTO: data.TaxAgentTaxReturnCheckFormDTO || data.table.list
|
||||
}
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
}).catch(() => this.setState({ verifyLoading: false }));
|
||||
};
|
||||
handleSubmit = (selectKey) => {
|
||||
const { taxFilingInfoDialofg, taxAgentId } = this.state;
|
||||
const { fieldForm } = this.taxInfoRef.state;
|
||||
const { city: cityStr, cityVal = [], netPassword, realNamePassword, ...extra } = fieldForm;
|
||||
const [nation, province, city] = cityStr ? cityStr.split("-") : [];
|
||||
const { taxAgentTaxReturnCheckFormDTO } = taxFilingInfoDialofg;
|
||||
this.setState({
|
||||
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: true }
|
||||
});
|
||||
registrationCheck({
|
||||
...extra, nation, province, city,
|
||||
taxAgentId, password: netPassword || realNamePassword,
|
||||
cityname: !_.isEmpty(cityVal) ? _.head(cityVal).name : "",
|
||||
..._.find(taxAgentTaxReturnCheckFormDTO, it => it.index === selectKey)
|
||||
}).then(({ status, data, errormsg }) => {
|
||||
this.setState({
|
||||
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: false }
|
||||
});
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.setState({
|
||||
taxFilingInfoDialofg: {
|
||||
...taxFilingInfoDialofg,
|
||||
taxAgentTaxReturnCheckFormDTO: data.TaxAgentTaxReturnCheckFormDTO
|
||||
}
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: false }
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
isEdit, title, visible, onCancel, salaryOn, decentralization, isChief, taxAgentStore: { PageAndOptAuth }
|
||||
} = this.props;
|
||||
const { current, taxAgentId, taxFilingInfoDialofg, loading, verifyLoading } = this.state;
|
||||
let tabs = [
|
||||
{
|
||||
key: 0, title: getLabel(82751, "基础设置"),
|
||||
createBtns: [
|
||||
<Button type="primary" onClick={this.handleSave}
|
||||
loading={loading}>{getLabel(33199, "保存并进入下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" onClick={this.handleSave}
|
||||
loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
],
|
||||
children: <BaseSettings decentralization={decentralization} isChief={isChief}/>
|
||||
},
|
||||
{
|
||||
key: 1, title: getLabel(544342, "报税信息"),
|
||||
createBtns: [
|
||||
<Button type="ghost" loading={verifyLoading}
|
||||
onClick={() => this.handleSaveAndVerify(true)}>{getLabel(543470, "完成,跳过所有步骤")}</Button>,
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: current + 1 })}>{getLabel(1402, "下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={verifyLoading}
|
||||
onClick={() => this.handleSaveAndVerify(false)}>{getLabel(544343, "保存并验证")}</Button>
|
||||
],
|
||||
children: <TaxDeclarationInfo ref={dom => this.taxInfoRef = dom} taxAgentId={taxAgentId} isChief={isChief}/>
|
||||
},
|
||||
{
|
||||
key: 2, title: getLabel(124810, "人员范围"),
|
||||
createBtns: [
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: !salaryOn ? current - 2 : current - 1 })}>{getLabel(1876, "上一步")}</Button>
|
||||
],
|
||||
editBtns: [],
|
||||
children: <PersonalScope taxAgentId={taxAgentId}/>
|
||||
}
|
||||
];
|
||||
tabs = !salaryOn ? _.filter(tabs, it => it.key !== 1) : tabs;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="taxAgentSlide" visible={visible} top={0} width={65} height={100} measure="%" direction="right"
|
||||
title={
|
||||
!this.props.taxAgentId ?
|
||||
<WeaTopTitle title={title} buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||
tabDatas={tabs} selectedKey={String(current)} title={title}
|
||||
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||
}
|
||||
content={
|
||||
<div className="taxAgentSlideContent">
|
||||
{
|
||||
!isEdit &&
|
||||
<WeaSteps current={current} style={{ margin: "20px 0" }}>
|
||||
{
|
||||
_.map(tabs, item => {
|
||||
const { key, title } = item;
|
||||
return <Step description={title} key={key}/>;
|
||||
})
|
||||
}
|
||||
</WeaSteps>
|
||||
}
|
||||
{_.find(tabs, o => current === o.key).children}
|
||||
<TaxFilingInfoDialofg
|
||||
{...taxFilingInfoDialofg}
|
||||
onSubmit={this.handleSubmit}
|
||||
onCancel={(isRefresh) => {
|
||||
const { jumpAll } = taxFilingInfoDialofg;
|
||||
this.setState({
|
||||
current: jumpAll ? this.state.current + 1 : this.state.current,
|
||||
taxFilingInfoDialofg: {
|
||||
...taxFilingInfoDialofg, visible: false,
|
||||
taxAgentTaxReturnCheckFormDTO: null
|
||||
}
|
||||
}, () => {
|
||||
isRefresh && this.taxInfoRef.taxReturnGetForm();
|
||||
jumpAll && this.props.onCancel(true);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
onClose={() => onCancel()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxAgentSlide;
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税扣缴义务人列表
|
||||
* Description:
|
||||
* Date: 2022/11/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import * as API from "../../../apis/taxAgent";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class TaxAgentTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTaxAgentList();
|
||||
}
|
||||
|
||||
getTaxAgentList = () => {
|
||||
const { pageInfo, loading } = this.state;
|
||||
const { searchValue, onOperate } = this.props;
|
||||
const payload = {
|
||||
name: searchValue,
|
||||
...pageInfo
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
API.getTaxAgentList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns: _.map(columns, item => {
|
||||
if (item.dataIndex === "employeeRange") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return <a href="javaScript:void(0);" onClick={() => onOperate("edit", record.id, 2)}>{text}</a>;
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, columns, pageInfo, loading } = this.state;
|
||||
const { onOperate, isChief } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => {
|
||||
this.getTaxAgentList();
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => {
|
||||
this.getTaxAgentList();
|
||||
});
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"),
|
||||
key: "operation",
|
||||
width: 120,
|
||||
render: (text, record) =>
|
||||
<div className="operationWapper">
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => onOperate("edit", record.id)}>{getLabel(501169, "编辑")}</a>
|
||||
{
|
||||
isChief &&
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => onOperate("delete", record.id)}>{getLabel(535052, "删除")}</a>
|
||||
}
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => onOperate("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</div>
|
||||
}
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxAgentTable;
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报税信息
|
||||
* Description:
|
||||
* Date: 2022/12/1
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { fieldList } from "./constants";
|
||||
import { taxReturnGetForm } from "../../../apis/taxAgent";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class TaxDeclarationInfo extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldForm: {
|
||||
name: "",
|
||||
taxCode: "",
|
||||
city: "",
|
||||
cityVal: [],
|
||||
areaCode: null,
|
||||
passwordType: "TAX_NET_PASSWORD",
|
||||
account: "",
|
||||
realNamePassword: "",
|
||||
netPassword: null,
|
||||
taxRegistrationNumber: "",
|
||||
departmentCode: "",
|
||||
checkStatus: ""
|
||||
},
|
||||
fieldItem: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.setState({
|
||||
fieldItem: _.filter(_.map(fieldList, item => ({
|
||||
...item,
|
||||
label: getLabel(item.lanId, item.label),
|
||||
viewAttr: this.props.isChief ? item.viewAttr : 1
|
||||
})), it => it.key !== "account" && it.key !== "realNamePassword")
|
||||
}, () => {
|
||||
this.taxReturnGetForm();
|
||||
});
|
||||
}
|
||||
|
||||
taxReturnGetForm = () => {
|
||||
const { taxAgentId } = this.props;
|
||||
taxReturnGetForm({ taxAgentId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { fieldForm } = this.state;
|
||||
this.setState({
|
||||
fieldForm: {
|
||||
...fieldForm,
|
||||
..._.reduce(_.keys(fieldForm), (pre, cur) => {
|
||||
if (cur !== "city") {
|
||||
if (cur === "checkStatus") {
|
||||
const checkStatusMap = {
|
||||
"NOT_COMMIT": getLabel(111, "未验证"),
|
||||
"SUCCESS": getLabel(111, "成功"),
|
||||
"FAIL": getLabel(111, "失败")
|
||||
};
|
||||
return { ...pre, [cur]: checkStatusMap[data[cur]] };
|
||||
}
|
||||
return { ...pre, [cur]: data[cur] };
|
||||
}
|
||||
return {
|
||||
...pre,
|
||||
[cur]: `${data["nation"]}-${data["province"]}-${data[cur]}`
|
||||
};
|
||||
}, {}),
|
||||
cityVal: (data["city"] && data["cityName"]) ? [{ id: data["city"], name: data["cityName"] }] : []
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeValue = (key, value, cityVal = []) => {
|
||||
const { fieldForm } = this.state;
|
||||
this.setState({
|
||||
fieldForm: !_.isEmpty(cityVal) ? {
|
||||
...fieldForm, [key]: value, cityVal
|
||||
} : { ...fieldForm, [key]: value }
|
||||
}, () => {
|
||||
if (key === "passwordType" && this.state.fieldForm.passwordType === "REAL_NAME_PASSWORD") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "netPassword"),
|
||||
fieldForm: { ...this.state.fieldForm, account: null, realNamePassword: null, netPassword: null }
|
||||
});
|
||||
} else if (key === "passwordType" && this.state.fieldForm.passwordType === "TAX_NET_PASSWORD") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "account" && it.key !== "realNamePassword"),
|
||||
fieldForm: { ...this.state.fieldForm, netPassword: null, account: null, realNamePassword: null }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldItem, fieldForm } = this.state;
|
||||
return (
|
||||
<div className="taxDeclarationInfoWrapper">
|
||||
<WeaSearchGroup col={1} needTigger showGroup>
|
||||
{
|
||||
_.map(fieldItem, item => {
|
||||
const { key, label, type, viewAttr, options = [] } = item;
|
||||
return <WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 14 }} key={key}>
|
||||
{
|
||||
(type === "TEXT" || type === "PASSWORD") &&
|
||||
<WeaInput autocomplete="off" value={fieldForm[key]} type={_.lowerCase(type)} viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
{
|
||||
type === "SELECT" &&
|
||||
<WeaBrowser replaceDatas={fieldForm["cityVal"]} type={58} viewAttr={viewAttr}
|
||||
helpfulTip={getLabel(111, "请展开选择报税所属区域")}
|
||||
onChange={(__, ___, datas) => {
|
||||
if (!_.isEmpty(datas)) {
|
||||
this.handleChangeValue(key, `1-${datas[0].pid}-${datas[0].id}`, _.map(datas, it => ({
|
||||
id: it.id,
|
||||
name: it.name
|
||||
})));
|
||||
} else {
|
||||
this.handleChangeValue(key, "", []);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
type === "RADIO" &&
|
||||
<WeaSelect detailtype={3} value={fieldForm[key]}
|
||||
options={_.map(options, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))}
|
||||
viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
</WeaFormItem>;
|
||||
})
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxDeclarationInfo;
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报-异常、失败详情
|
||||
* Description:
|
||||
* Date: 2023/8/18
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { deptFillCondition, taxFillColumns, taxFillCondition } from "./constants";
|
||||
import { getSearchs } from "../../../util";
|
||||
import { saveDepartmentCodeAndCheck } from "../../../apis/taxAgent";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class TaxFilingInfoDialofg extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [], checkLoading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (!_.isEmpty(nextProps.taxAgentTaxReturnCheckFormDTO) &&
|
||||
Object.prototype.toString.call(nextProps.taxAgentTaxReturnCheckFormDTO) === "[object Object]"
|
||||
) {
|
||||
const { taxAgentTaxReturnCheckFormDTO, taxAgentStore: { taxfillInfoForm, deptfillInfoForm } } = nextProps;
|
||||
taxfillInfoForm.initFormFields(taxFillCondition);
|
||||
deptfillInfoForm.initFormFields(deptFillCondition);
|
||||
const fields = _.map(taxFillCondition[0].items, it => {
|
||||
return it.domkey[0];
|
||||
});
|
||||
fields.map(item => {
|
||||
taxfillInfoForm.updateFields({
|
||||
[item]: item !== "divideFiling" ? (taxAgentTaxReturnCheckFormDTO[item] || "") : (taxAgentTaxReturnCheckFormDTO[item] === "ON" ? getLabel(538048, "是") : getLabel(30587, "否"))
|
||||
});
|
||||
});
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
const { taxAgentStore: { setTaxfillInfoForm, initDeptfillInfoForm } } = nextProps;
|
||||
setTaxfillInfoForm();
|
||||
initDeptfillInfoForm();
|
||||
}
|
||||
}
|
||||
|
||||
handleSaveOrKnow = () => {
|
||||
const { taxAgentStore: { taxfillInfoForm, deptfillInfoForm }, checkPayload } = this.props;
|
||||
if (taxfillInfoForm.getFormParams().divideFiling === getLabel(538048, "是")) {
|
||||
deptfillInfoForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
this.setState({ checkLoading: true });
|
||||
saveDepartmentCodeAndCheck(_.omitBy({ ...checkPayload, ...deptfillInfoForm.getFormParams() }, val => _.isNil(val)))
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ checkLoading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ checkLoading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.props.onCancel();
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedRowKeys, checkLoading } = this.state;
|
||||
const { taxAgentStore: { taxfillInfoForm, deptfillInfoForm }, taxAgentTaxReturnCheckFormDTO, loading } = this.props;
|
||||
const rowSelection = {
|
||||
type: "radio",
|
||||
selectedRowKeys,
|
||||
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
hasScroll className="taxfillingDialog" initLoadCss
|
||||
buttons={
|
||||
Object.prototype.toString.call(taxAgentTaxReturnCheckFormDTO) === "[object Object]" ?
|
||||
[
|
||||
<Button type="primary" onClick={this.handleSaveOrKnow} loading={checkLoading}>
|
||||
{taxfillInfoForm.getFormParams().divideFiling === getLabel(538048, "是") ? getLabel(537558, "保存") : getLabel(545147, "知道了")}
|
||||
</Button>
|
||||
] : [
|
||||
<Button loading={loading} type="primary"
|
||||
onClick={() => !_.isEmpty(selectedRowKeys) && this.props.onSubmit(selectedRowKeys[0])}>{getLabel(725, "提交")}</Button>
|
||||
]
|
||||
}
|
||||
style={{
|
||||
width: 850,
|
||||
height: 480,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "50%",
|
||||
maxWidth: "50%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="taxfillingDialogContent">
|
||||
{
|
||||
Object.prototype.toString.call(taxAgentTaxReturnCheckFormDTO) === "[object Object]" ?
|
||||
<React.Fragment>
|
||||
{getSearchs(taxfillInfoForm, taxFillCondition, 1)}
|
||||
{taxfillInfoForm.getFormParams().divideFiling === getLabel(538048, "是") && getSearchs(deptfillInfoForm, deptFillCondition, 1)}
|
||||
</React.Fragment> :
|
||||
<WeaTable
|
||||
rowKey="index" dataSource={taxAgentTaxReturnCheckFormDTO}
|
||||
columns={_.map(taxFillColumns, o => ({
|
||||
dataIndex: o.dataIndex,
|
||||
width: 200,
|
||||
title: getLabel(o.titleId, o.title)
|
||||
}))}
|
||||
scroll={{ x: 1200 }} rowSelection={rowSelection}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxFilingInfoDialofg;
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
.salaryAgentWrapper {
|
||||
.wea-new-top-content {
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px 0;
|
||||
}
|
||||
|
||||
.wea-new-top {
|
||||
.wea-input-focus {
|
||||
height: 31.36px;
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.comContent {
|
||||
.wea-search-group:first-child {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
|
||||
.wea-title {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.customTitleWrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 10px;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary[disabled] {
|
||||
color: #d8d8d8;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary {
|
||||
color: #55a1f8;
|
||||
}
|
||||
}
|
||||
|
||||
.tdEllipsis {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-col-10 {
|
||||
span:nth-child(2) {
|
||||
//margin-top: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
.taxAgentSlide {
|
||||
.wea-slide-modal-title {
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
text-align: left;
|
||||
background: #FFF;
|
||||
|
||||
.wea-new-top .ant-col-10 {
|
||||
padding-right: 45px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||
right: 45px !important;
|
||||
}
|
||||
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom";
|
||||
import ComHint from "./components/comHint";
|
||||
import TaxAgentTable from "./components/taxAgentTable";
|
||||
import TaxAgentSlide from "./components/taxAgentSlide";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import * as API from "../../apis/taxAgent";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class TaxAgent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
syncLoading: false, //同步人员范围loading
|
||||
searchValue: "",
|
||||
decentralization: "0", //启用分权
|
||||
taxAgentSlideProps: {
|
||||
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
|
||||
taxAgentId: "", current: 0, salaryOn: false
|
||||
},
|
||||
logDialogVisible: false,
|
||||
filterConditions: "[]"
|
||||
};
|
||||
this.taxAgentTableRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTaxAgentBaseForm();
|
||||
}
|
||||
|
||||
getTaxAgentBaseForm = () => {
|
||||
API.getTaxAgentBaseForm().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { devolutionStatus } = data;
|
||||
this.setState({ decentralization: String(devolutionStatus || 0) });
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:开启关闭个税扣缴义务人开关
|
||||
* Params:
|
||||
* Date: 2022/11/29
|
||||
*/
|
||||
taxAgentBaseSave = devolutionStatus => {
|
||||
this.setState({ decentralization: this.state.decentralization }, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: `${getLabel(33703, "确认")}${devolutionStatus === "0" ? getLabel(26471, "停用") : getLabel(26472, "启用")}${getLabel(524044, "分权")}?`,
|
||||
onOk: () => {
|
||||
const paylaod = { devolutionStatus };
|
||||
const { taxAgentStore } = this.props;
|
||||
const { taxAgentBaseSave, setSalarytaxAgentForm } = taxAgentStore;
|
||||
taxAgentBaseSave(paylaod).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(`${devolutionStatus === "0" ? "停用" : "启用"}分权成功`);
|
||||
this.getTaxAgentBaseForm();
|
||||
this.taxAgentTableRef.getTaxAgentList();
|
||||
setSalarytaxAgentForm();
|
||||
} else {
|
||||
message.error(errormsg || `${devolutionStatus === "0" ? "停用" : "启用"}分权失败`);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:
|
||||
* Params:添加个税扣缴义务人
|
||||
* Date: 2022/11/29
|
||||
*/
|
||||
handleAddTaxAgent = () => {
|
||||
this.setState({
|
||||
taxAgentSlideProps: {
|
||||
...this.state.taxAgentSlideProps,
|
||||
visible: true, current: 0
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:启用分权
|
||||
* Params:
|
||||
* Date: 2022/12/1
|
||||
*/
|
||||
taxAgentRangeSync = () => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { taxAgentRangeSync } = taxAgentStore;
|
||||
this.setState({ syncLoading: true });
|
||||
taxAgentRangeSync({}).then(({ status, data, errormsg }) => {
|
||||
this.setState({ syncLoading: false });
|
||||
if (status) {
|
||||
message.success(data || getLabel(30700, "操作成功"));
|
||||
this.taxAgentTableRef.getTaxAgentList();
|
||||
} else {
|
||||
message.error(data || errormsg || getLabel(30651, "操作失败"));
|
||||
}
|
||||
});
|
||||
};
|
||||
handelResetSlide = (isUpdate = false) => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { salarytaxAgentForm } = taxAgentStore;
|
||||
this.setState({
|
||||
taxAgentSlideProps: {
|
||||
...this.state.taxAgentSlideProps,
|
||||
isEdit: false,
|
||||
visible: false,
|
||||
title: getLabel(543629, "新增个税扣缴义务人"),
|
||||
taxAgentId: "",
|
||||
current: 0
|
||||
}
|
||||
}, () => {
|
||||
isUpdate && this.taxAgentTableRef.getTaxAgentList();
|
||||
salarytaxAgentForm.resetForm();
|
||||
});
|
||||
};
|
||||
handleOperate = (type, itemId, current = 0) => {
|
||||
switch (type) {
|
||||
case "edit":
|
||||
this.setState({
|
||||
taxAgentSlideProps: {
|
||||
...this.state.taxAgentSlideProps,
|
||||
visible: true, title: getLabel(543632, "编辑个税扣缴义务人"),
|
||||
taxAgentId: itemId, current, isEdit: true
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "delete":
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
API.deleteTaxAgent([itemId]).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.taxAgentTableRef.getTaxAgentList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: itemId ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${itemId}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { PageAndOptAuth: permission } } = this.props;
|
||||
const {
|
||||
searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions
|
||||
} = this.state;
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.taxAgentRangeSync}
|
||||
loading={syncLoading}>{getLabel(543633, "同步人员范围")}</Button>,
|
||||
<WeaInputSearch
|
||||
style={{ width: 220 }}
|
||||
value={searchValue}
|
||||
onChange={searchValue => this.setState({ searchValue })}
|
||||
placeholder={getLabel(543634, "请输入个税扣缴义务人名称")}
|
||||
onSearch={() => this.taxAgentTableRef.getTaxAgentList()}
|
||||
/>
|
||||
];
|
||||
const customTitle = <div className="customTitleWrapper">
|
||||
<span>{getLabel(537996, "个税扣缴义务人")}</span>
|
||||
{
|
||||
permission.isChief &&
|
||||
<Button type="primary" size="small" onClick={this.handleAddTaxAgent}>
|
||||
<span className="icon-coms-Add-to-hot" title={getLabel(384113, "添加")}></span>
|
||||
</Button>
|
||||
}
|
||||
</div>;
|
||||
const showOperateBtn = permission.opts.includes("admin");
|
||||
return (
|
||||
<div className="salaryAgentWrapper">
|
||||
<WeaTop
|
||||
title={getLabel(537996, "个税扣缴义务人")}
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}
|
||||
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="comContent">
|
||||
{
|
||||
permission.isChief &&
|
||||
<WeaSearchGroup title={getLabel(82743, "基础信息")} showGroup needTigger={false}>
|
||||
<WeaFormItem label={getLabel(543639, "启用分权")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaCheckbox value={decentralization} display="switch" onChange={this.taxAgentBaseSave}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
}
|
||||
<WeaSearchGroup title={customTitle} showGroup needTigger={false}>
|
||||
<TaxAgentTable searchValue={searchValue} onOperate={this.handleOperate}
|
||||
isChief={permission.isChief} //isChief- 是否是总管理员
|
||||
ref={dom => this.taxAgentTableRef = dom}/>
|
||||
</WeaSearchGroup>
|
||||
</div>
|
||||
<ComHint/>
|
||||
<TaxAgentSlide
|
||||
{...taxAgentSlideProps}
|
||||
isChief={permission.isChief} //isChief- 是否是总管理员
|
||||
decentralization={decentralization} //是否开启分权 0:否 1:是 ;开启分权才有管理员的添加
|
||||
onOk={() => this.taxAgentTableRef.getTaxAgentList()}
|
||||
onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="taxagent" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxAgent;
|
||||
|
|
@ -236,7 +236,7 @@ class Index extends Component {
|
|||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
handleChangeProgramme = (type, schemeId, payload) => {
|
||||
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Index extends Component {
|
|||
label: o.name,
|
||||
labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "",
|
||||
viewAttr: !_.isEmpty(detail) ? 1 : 2
|
||||
viewAttr: 2
|
||||
})),
|
||||
title: "", col: 2,
|
||||
defaultshow: true
|
||||
|
|
@ -127,10 +127,7 @@ class Index extends Component {
|
|||
<div className="title">{title}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
{
|
||||
_.isEmpty(detail) &&
|
||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||
}
|
||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@ class Index extends Component {
|
|||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { importDialog } = this.state;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { baseTableStore: { VSalryForm } } = nextProps;
|
||||
const payload = { ...VSalryForm.getFormParams(), hasData: importDialog.hasData };
|
||||
const { baseTableStore: { VSalryForm, VExtraSalryForm } } = nextProps;
|
||||
const payload = {
|
||||
...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(), hasData: importDialog.hasData
|
||||
};
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, salaryMonth: VSalryForm.getFormParams().salaryMonth,
|
||||
...importDialog, salaryMonth: VExtraSalryForm.getFormParams().salaryMonth,
|
||||
link: `${importDialog.link}?${convertToUrlString(payload)}`
|
||||
}
|
||||
});
|
||||
|
|
@ -49,10 +51,10 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
handleImport = (payload) => {
|
||||
const { baseTableStore: { VSalryForm } } = this.props;
|
||||
const { baseTableStore: { VExtraSalryForm } } = this.props;
|
||||
const { importDialog } = this.state;
|
||||
const { salaryMonth } = importDialog;
|
||||
const { taxAgentIds } = VSalryForm.getFormParams();
|
||||
const { taxAgentIds } = VExtraSalryForm.getFormParams();
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
API.importVariableSalary({
|
||||
...payload, salaryMonth, taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(",")
|
||||
|
|
@ -66,14 +68,17 @@ class Index extends Component {
|
|||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
renderFormComponent = () => {
|
||||
const { baseTableStore: { VSalryForm } } = this.props;
|
||||
const { baseTableStore: { VSalryForm, VExtraSalryForm } } = this.props;
|
||||
const { importDialog } = this.state;
|
||||
const { salaryMonth: month, hasData } = importDialog;
|
||||
return <div style={{ padding: "8px 16px", border: "1px solid #e5e5e5", margin: "4px 0" }}>
|
||||
<WeaFormItem label={getLabel(111, "薪资所属月")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaDatePicker format="YYYY-MM" value={month}
|
||||
onChange={val => {
|
||||
const payload = { ...VSalryForm.getFormParams(), salaryMonth: val, hasData };
|
||||
const payload = {
|
||||
...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
|
||||
salaryMonth: val, hasData
|
||||
};
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, salaryMonth: val,
|
||||
|
|
@ -100,9 +105,12 @@ class Index extends Component {
|
|||
content={getLabel(543208, "导出现有数据")}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => {
|
||||
const { baseTableStore: { VSalryForm } } = this.props;
|
||||
const { baseTableStore: { VSalryForm, VExtraSalryForm } } = this.props;
|
||||
const { salaryMonth } = importDialog;
|
||||
const payload = { salaryMonth, ...VSalryForm.getFormParams(), hasData: val === "1" };
|
||||
const payload = {
|
||||
salaryMonth, ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
|
||||
hasData: val === "1"
|
||||
};
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, hasData: val === "1",
|
||||
|
|
|
|||
|
|
@ -9,14 +9,21 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import * as API from "../../../../apis/variableSalary";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { extraConditions } from "../../conditions";
|
||||
import AdvanceInputBtn from "../advanceInputBtn";
|
||||
import SearchPannel from "../searchPannel";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import { toJS } from "mobx";
|
||||
import cs from "classnames";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("baseTableStore")
|
||||
@observer
|
||||
|
|
@ -24,11 +31,31 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: []
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: [],
|
||||
selectedRowKeys: [], condtions: [], showSearchAd: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
async componentDidMount() {
|
||||
const { data: taxAgentOption } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
this.setState({
|
||||
condtions: _.map(extraConditions, item => {
|
||||
return {
|
||||
...item, items: _.map(item.items, child => {
|
||||
if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child, label: getLabel(child.lanId, child.label),
|
||||
options: _.map(taxAgentOption, o => ({ key: String(o.id), showname: o.name }))
|
||||
};
|
||||
}
|
||||
return { ...child, label: getLabel(child.lanId, child.label) };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const { baseTableStore: { VExtraSalryForm } } = this.props;
|
||||
VExtraSalryForm.initFormFields(this.state.condtions);
|
||||
});
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
window.addEventListener("resize", this.handleResize, false);
|
||||
this.getVariableSalaryList();
|
||||
|
|
@ -56,10 +83,14 @@ class Index extends Component {
|
|||
pageInfo: { ...this.state.pageInfo, ...params }
|
||||
}, () => this.getVariableSalaryList());
|
||||
break;
|
||||
case "CHECKBOX":
|
||||
const { selectedRowKeys } = params;
|
||||
this.setState({ selectedRowKeys });
|
||||
break;
|
||||
case "DEL":
|
||||
this.handleDelete([params.id]);
|
||||
break;
|
||||
case "VIEW":
|
||||
case "EDIT":
|
||||
this.handleView(params.id);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -68,12 +99,12 @@ class Index extends Component {
|
|||
}
|
||||
};
|
||||
getVariableSalaryList = () => {
|
||||
const { baseTableStore: { VSalryForm, getVariableSalaryList } } = this.props;
|
||||
const { baseTableStore: { VSalryForm, VExtraSalryForm, getVariableSalaryList } } = this.props;
|
||||
const { pageInfo } = this.state;
|
||||
const { departmentIds, taxAgentIds } = VSalryForm.getFormParams();
|
||||
const { taxAgentIds } = VExtraSalryForm.getFormParams(), { departmentIds } = VSalryForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
getVariableSalaryList({
|
||||
...pageInfo, ...VSalryForm.getFormParams(),
|
||||
...pageInfo, ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
|
||||
departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
|
||||
taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(",")
|
||||
}).then(({ status, data }) => {
|
||||
|
|
@ -101,7 +132,7 @@ class Index extends Component {
|
|||
API.deleteVariableSalary({ ids }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "删除成功"));
|
||||
this.getVariableSalaryList();
|
||||
this.setState({ selectedRowKeys: [] }, () => this.getVariableSalaryList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
|
|
@ -117,32 +148,41 @@ class Index extends Component {
|
|||
}));
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
columns, showOperateBtn, dataSource: this.state.dataSource, scrollHeight: 98,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "variableSalary"
|
||||
columns, showOperateBtn, dataSource: this.state.dataSource, scrollHeight: 95,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "variableSalary", selectedRowKeys: this.state.selectedRowKeys
|
||||
});
|
||||
}
|
||||
return columns;
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"操作": getLabel(30585, "操作"), "查看详情": getLabel(111, "查看详情"),
|
||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"),
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"删除": getLabel(111, "删除")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const { baseTableStore: { SFTableStore } } = this.props;
|
||||
const { loading, dataSource, condtions, showSearchAd } = this.state;
|
||||
const { baseTableStore: { SFTableStore, VExtraSalryForm } } = this.props;
|
||||
const dom = document.querySelector(".wea-new-top-req-content");
|
||||
let height = 280;
|
||||
if (dom && dataSource.length > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 46 + 108 : dataSource.length < 10 ? dataSource.length * 46 + 108 : parseFloat(dom.style.height) - 16;
|
||||
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 46 + 108 : dataSource.length < 10 ? dataSource.length * 46 + 108 : parseFloat(dom.style.height) - 62;
|
||||
}
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="extraFormQuery form-dialog-layout">
|
||||
{getSearchs(VExtraSalryForm, condtions, 2, false, () => this.getVariableSalaryList())}
|
||||
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.getVariableSalaryList()}/>
|
||||
</div>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.handleAdvanceSearch}/>
|
||||
</div>
|
||||
<div style={{ height: height + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { conditions } from "../../conditions";
|
||||
import moment from "moment";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -26,21 +24,12 @@ class VariableSalarySearchPannel extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
componentDidMount() {
|
||||
this.setState({
|
||||
searchConditions: _.map(conditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child, label: getLabel(child.lanId, child.label),
|
||||
options: _.map(data, o => ({ key: String(o.id), showname: o.name, selected: true }))
|
||||
};
|
||||
}
|
||||
return { ...child, label: getLabel(child.lanId, child.label) };
|
||||
})
|
||||
items: _.map(item.items, child => ({ ...child, label: getLabel(child.lanId, child.label) }))
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
|
|
@ -63,10 +52,7 @@ class VariableSalarySearchPannel extends Component {
|
|||
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={() => {
|
||||
VSalryForm.resetForm();
|
||||
VSalryForm.updateFields({ salaryMonth: moment(new Date()).format("YYYY-MM") });
|
||||
}}>{getLabel(2022, "重置")}</Button>
|
||||
<Button type="ghost" onClick={() => VSalryForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
|
|
|
|||
|
|
@ -92,6 +92,36 @@ export const conditions = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const extraConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["salaryMonth"],
|
||||
fieldcol: 16,
|
||||
label: "薪资所属月",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: moment(new Date()).format("YYYY-MM"),
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 16,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const salaryItemsConditions = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -181,7 +211,7 @@ export const salaryFileConditions = [
|
|||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -13,13 +13,12 @@ import { toJS } from "mobx";
|
|||
import { WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import * as API from "../../apis/variableSalary";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SearchPannel from "./components/searchPannel";
|
||||
import SalaryItemDialog from "./components/salaryItemDialog";
|
||||
import SalaryFileDialog from "./components/salaryFileDialog";
|
||||
import SalaryItemList from "./components/salaryItemList";
|
||||
import SalaryFileList from "./components/salaryFileList";
|
||||
import SalaryFileImportDialog from "./components/salaryFileImportDialog";
|
||||
import { Button } from "antd";
|
||||
import { Button, message } from "antd";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -31,7 +30,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "salaryFile", isQuery: false, showSearchAd: false,
|
||||
selectedKey: "salaryFile", isQuery: false,
|
||||
SIDialog: { visible: false, title: "", id: "" }, //薪资项目薪资编辑弹框
|
||||
SFDialog: { visible: false, title: "", detail: {} }, //薪资档案编辑弹框
|
||||
SFImpDialog: { visible: false, title: getLabel(24023, "数据导入") }//薪资档案导入
|
||||
|
|
@ -39,15 +38,14 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||
handleOperate = (type, detail = {}) => {
|
||||
const { baseTableStore: { SFTableStore, VSalryForm } } = this.props;
|
||||
const { baseTableStore: { SFTableStore, VSalryForm, VExtraSalryForm } } = this.props;
|
||||
switch (type) {
|
||||
case "create":
|
||||
this.setState({
|
||||
SFDialog: {
|
||||
...this.state.SFDialog, visible: true, detail,
|
||||
title: _.isEmpty(detail) ? getLabel(111, "新增薪资档案") : getLabel(111, "查看薪资档案")
|
||||
title: _.isEmpty(detail) ? getLabel(111, "新增薪资档案") : getLabel(111, "编辑薪资档案")
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
|
@ -56,9 +54,9 @@ class Index extends Component {
|
|||
break;
|
||||
case "export":
|
||||
const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), it => it.dataIndex);
|
||||
const { taxAgentIds, departmentIds } = VSalryForm.getFormParams();
|
||||
const { taxAgentIds } = VExtraSalryForm.getFormParams(), { departmentIds } = VSalryForm.getFormParams();
|
||||
const payload = {
|
||||
...VSalryForm.getFormParams(),
|
||||
...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
|
||||
taxAgentIds: !_.isEmpty(taxAgentIds) ? taxAgentIds.split(",") : [],
|
||||
departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
|
||||
columns
|
||||
|
|
@ -70,14 +68,22 @@ class Index extends Component {
|
|||
SFTableStore.setColSetVisible(true);
|
||||
SFTableStore.tableColSet(true);
|
||||
break;
|
||||
case "batchDel":
|
||||
const { state: { selectedRowKeys }, handleDelete } = this.salaryListRef.wrappedInstance;
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请选择数据!"));
|
||||
return;
|
||||
}
|
||||
handleDelete(selectedRowKeys);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, SIDialog, SFDialog, SFImpDialog, showSearchAd, isQuery } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth }, baseTableStore: { VSSalaryItemForm, VSalryForm } } = this.props;
|
||||
const { selectedKey, SIDialog, SFDialog, SFImpDialog, isQuery } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth }, baseTableStore: { VSSalaryItemForm } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const tabs = [
|
||||
{
|
||||
|
|
@ -91,14 +97,10 @@ class Index extends Component {
|
|||
buttons: showOperateBtn ? [
|
||||
<Button type="primary" onClick={() => this.handleOperate("create")}>{getLabel(111, "新建")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "导入")}</Button>,
|
||||
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
] : [
|
||||
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
],
|
||||
children: !_.isEmpty(VSalryForm.getFormParams()) ? <SalaryFileList {...this.props} isQuery={isQuery}
|
||||
onViewSalaryFile={(data) => this.handleOperate("create", data)}/> : null
|
||||
<Button type="primary" onClick={() => this.handleOperate("batchDel")}>{getLabel(111, "批量删除")}</Button>
|
||||
] : [],
|
||||
children: <SalaryFileList {...this.props} isQuery={isQuery} ref={dom => this.salaryListRef = dom}
|
||||
onViewSalaryFile={(data) => this.handleOperate("create", data)}/>
|
||||
},
|
||||
{
|
||||
title: getLabel(111, "字段管理"), key: "salaryItem", showDropIcon: false, dropMenuDatas: [],
|
||||
|
|
@ -124,9 +126,6 @@ class Index extends Component {
|
|||
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
|
||||
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.handleAdvanceSearch}/>
|
||||
</div>
|
||||
{_.find(tabs, o => selectedKey === o.key).children}
|
||||
{/*薪资项目*/}
|
||||
<SalaryItemDialog {...SIDialog} onSearch={this.handleAdvanceSearch} onCancel={callback => this.setState({
|
||||
|
|
|
|||
|
|
@ -3,8 +3,30 @@
|
|||
right: 16px !important;
|
||||
}
|
||||
|
||||
.extraFormQuery {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
padding-right: 8px;
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
|
||||
.wea-content {
|
||||
max-width: 50%;
|
||||
|
||||
.wea-form-cell-wrapper, .wea-form-cell {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
padding: 16px;
|
||||
padding: 8px 16px 0 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
|
|
@ -31,7 +53,7 @@
|
|||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 155px;
|
||||
height: 108px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export class BaseTableStore {
|
|||
@observable loading = true; // 数据加载状态
|
||||
|
||||
// 浮动薪酬相关
|
||||
@observable VExtraSalryForm = new WeaForm(); // 浮动薪酬extra查询form
|
||||
@observable VSalryForm = new WeaForm(); // 浮动薪酬查询form
|
||||
@observable VSSalaryItemForm = new WeaForm(); // 新增编辑浮动薪酬项目form
|
||||
@action initVSSalaryItemForm = () => this.VSSalaryItemForm = new WeaForm();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,13 @@ import { PAGE } from "../config";
|
|||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class TaxAgentStore {
|
||||
@observable salarytaxAgentForm = new WeaForm(); //新版个税扣缴义务人表单实体
|
||||
@observable taxfillInfoForm = new WeaForm(); //报税信息查看form
|
||||
@action setTaxfillInfoForm = () => this.taxfillInfoForm = new WeaForm(); //报税信息form初始化
|
||||
@observable personScopeForm = new WeaForm(); //个税扣缴义务人新增人员form
|
||||
@action initPersonScopeForm = () => this.personScopeForm = new WeaForm(); //个税扣缴义务人新增人员form初始化
|
||||
@observable deptfillInfoForm = new WeaForm(); //报税信息部门备案form
|
||||
@action initDeptfillInfoForm = () => this.deptfillInfoForm = new WeaForm(); //报税信息部门备案form初始化
|
||||
@observable advanceForm = new WeaForm(); //权限-角色高级搜索form表单
|
||||
@observable roleForm = new WeaForm(); //权限-角色form表单
|
||||
@action initRoleForm = () => this.roleForm = new WeaForm();
|
||||
|
|
@ -54,6 +61,8 @@ export class TaxAgentStore {
|
|||
@action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限
|
||||
@action setSalaryManager = bool => (this.salaryManager = bool);// 是否是薪酬总管理员
|
||||
|
||||
@action setSalarytaxAgentForm = () => (this.salarytaxAgentForm = new WeaForm());//薪资项目权限
|
||||
|
||||
// 初始化操作
|
||||
@action
|
||||
doInit = params => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue