Merge branch 'release/3.0.1.2503.01-合并业务线' into release/2.19.1.2503.01-业务线个税
This commit is contained in:
commit
a81cc3b1cb
|
|
@ -24,3 +24,11 @@ export const savePushItemList = (params) => {
|
||||||
export const deletePushItemList = (params) => {
|
export const deletePushItemList = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
|
||||||
};
|
};
|
||||||
|
// 推送记录列表
|
||||||
|
export const getPushRecordList = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/push/record/list", params);
|
||||||
|
};
|
||||||
|
// 推送记录详细列表
|
||||||
|
export const getPushRecordDetail = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/push/record/detail", params);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
/*
|
||||||
|
* 数据推送
|
||||||
|
* 推送记录
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2025/4/1
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
|
import * as API from "../../../../apis/datapush";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
selectedRowKeys: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getPushRecordList();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.setState({ selectedRowKeys: [] });
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||||
|
}, () => this.getPushRecordList(nextProps));
|
||||||
|
}
|
||||||
|
|
||||||
|
getPushRecordList = (props) => {
|
||||||
|
const { pageInfo } = this.state, { query } = props || this.props;
|
||||||
|
const payload = { ...pageInfo, ...query };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.getPushRecordList(payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||||
|
columns: [...columns, {
|
||||||
|
title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => (<React.Fragment>
|
||||||
|
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||||
|
onClick={() => this.props.onChange("push", record)}>{getLabel(111, "推送")}</a>
|
||||||
|
<a href="javascript: void(0);"
|
||||||
|
onClick={() => this.props.onChange("view", record)}>{getLabel(111, "查看详情")}</a>
|
||||||
|
</React.Fragment>)
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { columns, dataSource, loading, pageInfo, selectedRowKeys } = this.state;
|
||||||
|
const pagination = {
|
||||||
|
...pageInfo,
|
||||||
|
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"],
|
||||||
|
onShowSizeChange: (current, pageSize) => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushRecordList());
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordList());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const rowSelection = {
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: v => this.setState({ selectedRowKeys: v })
|
||||||
|
};
|
||||||
|
return (<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
||||||
|
rowSelection={rowSelection} scroll={{ y: `calc(100vh - 182px)` }}/>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
* 推送记录
|
||||||
|
* 查看详情
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2025/4/2
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||||
|
import { getPushRecordDetail } from "../../../../apis/datapush";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class PushDetailDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPushRecordDetail(nextProps);
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||||
|
query: { name: "" }, pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getPushRecordDetail = (props) => {
|
||||||
|
const { recordId } = props || this.props, { pageInfo, query } = this.state;
|
||||||
|
const payload = { ...query, ...pageInfo, recordId };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
getPushRecordDetail(payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||||
|
this.setState({ columns, dataSource, pageInfo: { current, pageSize, total } });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { query, loading, dataSource, columns, pageInfo } = this.state;
|
||||||
|
const pagination = {
|
||||||
|
...pageInfo,
|
||||||
|
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"],
|
||||||
|
onShowSizeChange: (current, pageSize) => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushRecordDetail());
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordDetail());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (<WeaSlideModal
|
||||||
|
{...this.props} className="pushDetailDialog"
|
||||||
|
title={<WeaTop title={getLabel(111, "推送详情")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
|
buttons={[<WeaInputSearch value={query.name} onSearch={() => this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current: 1 }
|
||||||
|
}, () => this.getPushRecordDetail())}
|
||||||
|
onChange={v => this.setState({ query: { ...query, name: v } })}/>]}/>
|
||||||
|
}
|
||||||
|
direction="right" top={0} width={800} height={100}
|
||||||
|
measureT="%" measureX="px" measureY="%"
|
||||||
|
content={<div className="pushDetail_content">
|
||||||
|
<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
||||||
|
scroll={{ y: `calc(100vh - 182px)` }}/>
|
||||||
|
</div>}
|
||||||
|
/>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PushDetailDialog;
|
||||||
|
|
@ -12,8 +12,11 @@ import { inject, observer } from "mobx-react";
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||||
import * as API from "../../apis/datapush";
|
import * as API from "../../apis/datapush";
|
||||||
import DatapushList from "./components/datapushList";
|
import DatapushList from "./components/datapushList";
|
||||||
|
import PushRecord from "./components/pushRecord";
|
||||||
import DatapushDialog from "./components/DPDialog";
|
import DatapushDialog from "./components/DPDialog";
|
||||||
|
import PushDetailDialog from "./components/pushRecord/pushDetailDialog";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
|
import cs from "classnames";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
@ -25,7 +28,8 @@ class Index extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedKey: "datapush", isQuery: false, query: { name: "" },
|
selectedKey: "datapush", isQuery: false, query: { name: "" },
|
||||||
DPDialog: { visible: false, title: "", detail: {} } //数据推送弹框
|
DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框
|
||||||
|
pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,13 +57,16 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "view":
|
||||||
|
this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } });
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedKey, DPDialog, isQuery, query } = this.state;
|
const { selectedKey, DPDialog, isQuery, query, pushDetailDialog } = this.state;
|
||||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||||
const tabs = [
|
const tabs = [
|
||||||
|
|
@ -72,14 +79,28 @@ class Index extends Component {
|
||||||
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
||||||
children: <DatapushList isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
children: <DatapushList isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [],
|
||||||
|
buttons: showOperateBtn ? [
|
||||||
|
<Button type="primary" onClick={() => this.handleOperate("batchpush")}>{getLabel(111, "批量推送")}</Button>,
|
||||||
|
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||||
|
onChange={v => this.setState({ query: { ...query, name: v } })}/>
|
||||||
|
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||||
|
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
||||||
|
children: <PushRecord isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaReqTop
|
<WeaReqTop
|
||||||
title={getLabel(111, "数据推送")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
title={getLabel(111, "数据推送")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="datapush_wrapper" buttonSpace={10}
|
iconBgcolor="#F14A2D" tabDatas={tabs}
|
||||||
buttons={_.find(tabs, o => selectedKey === o.key).buttons}
|
className={cs("datapush_wrapper", { "reqZindex0": pushDetailDialog.visible })}
|
||||||
onChange={selectedKey => this.setState({ selectedKey })}
|
buttonSpace={10} buttons={_.find(tabs, o => selectedKey === o.key).buttons}
|
||||||
|
onChange={selectedKey => this.setState({
|
||||||
|
selectedKey, pushDetailDialog: { ...pushDetailDialog, visible: false },
|
||||||
|
DPDialog: { ...DPDialog, visible: false }
|
||||||
|
})}
|
||||||
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
|
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
|
||||||
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
|
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
|
||||||
>
|
>
|
||||||
|
|
@ -87,6 +108,10 @@ class Index extends Component {
|
||||||
{/*数据推送框*/}
|
{/*数据推送框*/}
|
||||||
<DatapushDialog {...DPDialog} onClose={() => this.setState({ DPDialog: { ...DPDialog, visible: false } })}
|
<DatapushDialog {...DPDialog} onClose={() => this.setState({ DPDialog: { ...DPDialog, visible: false } })}
|
||||||
onSearch={this.handleAdvanceSearch}/>
|
onSearch={this.handleAdvanceSearch}/>
|
||||||
|
{/*推送记录查看详情*/}
|
||||||
|
<PushDetailDialog {...pushDetailDialog} onClose={() => this.setState({
|
||||||
|
pushDetailDialog: { ...pushDetailDialog, visible: false }
|
||||||
|
})}/>
|
||||||
</WeaReqTop>
|
</WeaReqTop>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,42 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pushDetailDialog {
|
||||||
|
.wea-slide-modal-content {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushDetail_content {
|
||||||
|
height: 100%;
|
||||||
|
background: #F6F6F6;
|
||||||
|
padding: 8px 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-title {
|
||||||
|
background: #FFF;
|
||||||
|
text-align: left;
|
||||||
|
height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-new-top {
|
||||||
|
background: #FFF;
|
||||||
|
|
||||||
|
.ant-col-10 {
|
||||||
|
padding-right: 50px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reqZindex0 {
|
||||||
|
.wea-new-top-req {
|
||||||
|
z-index: 0 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom_item_treeselect {
|
.custom_item_treeselect {
|
||||||
|
|
@ -131,4 +167,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue