diff --git a/pc4mobx/hrmSalary/components/index.js b/pc4mobx/hrmSalary/components/index.js
deleted file mode 100644
index 74d0b74a..00000000
--- a/pc4mobx/hrmSalary/components/index.js
+++ /dev/null
@@ -1,111 +0,0 @@
-import React from "react";
-import { inject, observer } from "mobx-react";
-import { toJS } from "mobx";
-
-import { Button } from "antd";
-import { WeaLogView } from "comsMobx";
-import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
-
-import { getSearchs, renderLoading, renderNoright } from "../util"; // 从util文件引入公共的方法
-
-const getLabel = WeaLocaleProvider.getLabel;
-const WeaLogViewComp = WeaLogView.Component;
-
-@inject("baseFormStore")
-@observer
-export default class BaseForm extends React.Component {
- componentWillMount() { // 初始化渲染页面
- const { baseFormStore: { doInit } } = this.props;
- doInit();
- }
-
- componentWillReceiveProps(nextProps) {
- const { baseFormStore: { doInit } } = this.props;
- if (this.props.location.key !== nextProps.location.key) { // 手动刷新、切换菜单 重新初始化
- doInit();
- }
- }
-
- // 渲染右键菜单和顶部下拉菜单
- getRightMenu() {
- const { baseFormStore: { setLogVisible, saveForm } } = this.props;
- let btnArr = [
- {
- key: "BTN_SAVE",
- icon: ,
- content: `${getLabel(86, "保存")}`,
- onClick: () => saveForm()
- },
- {
- key: "log",
- content: getLabel(83, "日志"),
- icon: ,
- onClick: () => setLogVisible(true)
- }];
- return btnArr;
- }
-
- render() {
- /* 页面渲染说明:
- 1、判断是否无权限: 是显示无权限页面
- 2、渲染form页面:
- 2-1: WeaRightMenu 右键菜单
- 2-2: WeaTop: 顶部: 包括下拉菜单
- 2-3: renderLoading: 加载数据中的loading效果(统一封装在util中)
- 2-4: WeaNewScroll 顶部以下超长滚动处理
- 2-5: 通过getSearchs方法渲染form
- */
- const { baseFormStore } = this.props;
- const {
- loading,
- hasRight,
- form,
- condition,
- logVisible,
- logStore,
- saveLoading,
- setLogVisible,
- saveForm
- } = baseFormStore; // 从后台取数据 和 方法
-
- if (!hasRight && !loading) { // 无权限处理
- return renderNoright();
- }
-
- const btns = [ // 顶部按钮
-
- ];
- const collectParams = { // 收藏功能配置
- favname: "基础表单",
- favouritetype: 1,
- objid: 0,
- link: "wui/index.html#/ns_demo01/index",
- importantlevel: 1
- };
- return (
- } // 左侧图标
- iconBgcolor="#F14A2D" // 左侧图标背景色
- buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示
- buttonSpace={10} // 按钮之间的间隔
- showDropIcon={true} // 是否显示右侧下拉按钮
- dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同)
- dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
- >
- {loading ? renderLoading() :
-
- {getSearchs(form, toJS(condition), 1)}
-
- }
- setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false
- logStore={logStore} // 日志的store
- logType="1" // 模块编码: 该参数要根据模块来给
- logSmallType="1" // 细分模块编码: 该参数要根据模块来给
- />
-
- );
- }
-}
diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js
index ba422c79..ca719497 100644
--- a/pc4mobx/hrmSalary/config.js
+++ b/pc4mobx/hrmSalary/config.js
@@ -18,5 +18,6 @@ export const PAGE = {
"salaryField": ["/hrmSalary/fieldManagement"], //字段管理
"salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理
"siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案
- "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"] //报表
+ "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表
+ "dataPush": ["/hrmSalary/datapush"] //数据推送
};
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 281bf1de..42d08cee 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -54,6 +54,7 @@ import AdjustSalaryManage from "./pages/adjustSalaryManage";
import TopologyMap from "./pages/topologyMap";
import SupplementaryCalc from "./pages/supplementaryCalc";
import VariableSalary from "./pages/variableSalary";
+import Datapush from "./pages/datapush";
import Layout from "./layout";
import stores from "./stores";
import "./style/index";
@@ -116,6 +117,7 @@ const Routes = (
+
diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js
new file mode 100644
index 00000000..dd7d1c3b
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/datapush/index.js
@@ -0,0 +1,59 @@
+/*
+ * 数据推送
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/11/19
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaReqTop } from "ecCom";
+import { Button } from "antd";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("taxAgentStore", "baseFormStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedKey: "datapush", isQuery: false
+ };
+ }
+
+ handleOperate = () => {
+ };
+
+ render() {
+ const { selectedKey } = this.state;
+ const { taxAgentStore: { PageAndOptAuth }, baseFormStore: { form } } = this.props;
+ const showOperateBtn = PageAndOptAuth.opts.includes("admin");
+ const tabs = [
+ {
+ title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [],
+ buttons: showOperateBtn ? [
+
+ ] : [],
+ children: null
+ }
+ ];
+ return (
+ } selectedKey={selectedKey}
+ iconBgcolor="#F14A2D" tabDatas={tabs} className="datapush_wrapper" buttonSpace={10}
+ buttons={_.find(tabs, o => selectedKey === o.key).buttons}
+ onChange={selectedKey => this.setState({ selectedKey })}
+ showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
+ dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
+ >
+ {_.find(tabs, o => selectedKey === o.key).children}
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less
new file mode 100644
index 00000000..e69de29b
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js
index 08fa8aa9..639355ea 100644
--- a/pc4mobx/hrmSalary/pages/variableSalary/index.js
+++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js
@@ -19,7 +19,6 @@ import SalaryItemList from "./components/salaryItemList";
import SalaryFileList from "./components/salaryFileList";
import SalaryFileImportDialog from "./components/salaryFileImportDialog";
import { Button, message } from "antd";
-import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
diff --git a/pc4mobx/hrmSalary/stores/baseForm.js b/pc4mobx/hrmSalary/stores/baseForm.js
index 3eb3a57e..65a4e574 100644
--- a/pc4mobx/hrmSalary/stores/baseForm.js
+++ b/pc4mobx/hrmSalary/stores/baseForm.js
@@ -1,64 +1,12 @@
import { action, observable } from "mobx";
-import { message } from "antd";
-import { WeaForm, WeaLogView } from "comsMobx";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaForm } from "comsMobx";
-import * as API from "../apis"; // 引入API接口文件
-
-const { LogStore } = WeaLogView;
-const getLabel = WeaLocaleProvider.getLabel;
export class BaseFormStore {
+ // 全局设置仓库
@observable form = new WeaForm(); // 规则渲染form
-
- @observable logStore = new LogStore();
- @observable condition = []; // 存储后台得到的form数据
- @observable saveLoading = false; // 保存状态处理:保证保存的时候接口只走一次
- @observable loading = true; // 页面初始化的loading状态:数据加载成功前后前使用
- @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
+ @action("初始化form表单") initForm = () => this.form = new WeaForm();
@observable logVisible = false; // 控制日志弹框的显影
-
- @action // 初始化操作: 一般用来初始化获取后台数据
- doInit = () => {
- this.getBaseForm();
- };
-
- @action // 获得form配置数据
- getBaseForm = () => {
- API.getBaseForm().then(action(result => {
- this.loading = false;
- this.hasRight = result.hasRight;
- if (result.hasRight) {
- this.condition = result.condition;
- this.form.initFormFields(result.condition);
- }
- }));
- };
-
- @action // 保存
- saveForm = () => {
- this.form.validateForm().then(action(f => { // 表单的校验: 直接使用form的validateForm方法即可
- if (f.isValid) { // 校验听过: 走保存接口
- this.saveLoading = true;
- const params = this.form.getFormParams();
- API.saveForm(params).then(action(
- result => {
- this.saveLoading = false;
- if (result.api_status) { // 保存成功: 1、给出提示 2、刷新form数据
- message.success(`${getLabel(18758, "保存成功")}`);
- this.getBaseForm();
- } else {
- message.error(`${getLabel(22620, "保存失败")}`);
- }
- }
- ));
- } else {
- f.showErrors();
- }
- }));
- };
-
- @action
+ @action("日志显隐开关")
setLogVisible = bool => this.logVisible = bool;
-
}