-
1. 第一步,请选择导出的Excel文件或 点击这里下载模板;
+
1. 第一步,请选择导出的Excel文件或 点击这里下载模板;
+ {this.props.headerSetCompoent && this.props.headerSetCompoent }
+
2. 第二步,请一定要确定Excel文档中的格式是模板中的格式,没有被修改掉;
3. 第三步,选择填写好的Excel文档,点击“下一步”按钮进行数据预览;
4. 第四步,如果以上步骤和Excel文档正确的话,数据会被正确导入,导入成功会有提示。如果有问题,则会提示Excel文档的错误之处。
diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.js b/pc4mobx/hrmSalary/components/selectItemsModal/index.js
new file mode 100644
index 00000000..2e699a76
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.js
@@ -0,0 +1,58 @@
+import React from 'react';
+import { WeaInputSearch, WeaCheckbox } from 'ecCom'
+import { Row , Col, Modal, Dropdown, Menu, Button } from "antd"
+
+import SelectItemsWrapper from './selectItemsWrapper'
+
+const items = [
+ {
+ key: "1",
+ title: "测试",
+ checked: false
+ },
+ {
+ key: "2",
+ title: "测试2",
+ checked: true
+ }
+]
+
+export default class SelectItemModal extends React.Component {
+
+
+ render(){
+
+ const menu = (
+
+ );
+ return (
+
+
+ 导入字段设置
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js
new file mode 100644
index 00000000..b449aa85
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js
@@ -0,0 +1,47 @@
+import React from 'react'
+import { WeaCheckbox } from 'ecCom';
+import { Row, Col, Icon } from 'antd';
+
+export default class SelectItemsWrapper extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ showContent: true
+ }
+ }
+ render() {
+ return (
+
+
this.setState({
+ showContent: !this.state.showContent
+ })}>
+
{this.props.title}} />
+
已选中0个字段
+
+ {
+ this.state.showContent ? :
+ }
+
+
+
+ {
+ this.state.showContent &&
+
+ {
+ this.props.items && this.props.items.map(item => (
+
+ ))
+ }
+
+
+ }
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
index 9d2ab7e0..f161c187 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
@@ -66,7 +66,6 @@ export const columns = [
}
]
-
export const dataSource = [];
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
index d367a49a..a797312a 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
@@ -2,9 +2,9 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
-import { Button, Table, DatePicker } from 'antd';
+import { Button, Table, DatePicker, Row, Col } from 'antd';
-import { WeaDatePicker, WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable } from 'ecCom';
+import { WeaHelpfulTip, WeaCheckbox, WeaDatePicker, WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaSelect } from 'ecCom';
import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
import CustomTab from '../../../components/customTab';
@@ -12,10 +12,13 @@ import ContentWrapper from '../../../components/contentWrapper';
import { columns, dataSource } from './columns';
import MonthRange from '../../../components/monthRange'
+import ImportModal from '../../../components/importModal'
+import HeaderSet from "../../../components/importModal/headerSet"
+import SelectItemModal from '../../../components/selectItemsModal'
const { MonthPicker } = DatePicker;
-@inject('baseTableStore')
+@inject('attendanceStore')
@observer
export default class Attendance extends React.Component {
constructor(props) {
@@ -24,13 +27,16 @@ export default class Attendance extends React.Component {
value: "",
selectedKey: "0",
startDate: "",
- endDate: ""
+ endDate: "",
+ modalParam: {},
+ modalVisiable: false,
+ selectItemVisible: false
}
}
render() {
- const { baseTableStore } = this.props;
- const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = baseTableStore;
-
+ const { attendanceStore } = this.props;
+ const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = attendanceStore;
+ const { step, setStep } = attendanceStore;
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
}
@@ -57,12 +63,12 @@ export default class Attendance extends React.Component {
];
const topTab = [
- ];
+ ];
const renderSearchOperationItem = () => {
return
-
+
}
@@ -73,6 +79,43 @@ export default class Attendance extends React.Component {
/>
}
+
+ const renderHeaderSetCompoent = () => {
+ return (
+
this.setState({
+ selectItemVisible: true
+ })}/>
+ )
+ }
+
+ const renderFormComponent = () => {
+ return (
+
+
+ 薪资所属月:
+
+
+
+ 薪资账套:
+
+
+
+ 薪资周期:
+ 2022-03-01 ~ 2022-03-31
+
+
+ 考勤周期:
+ 2022-03-01 ~ 2022-03-31
+
+
+ )
+ }
+
return (
+
+ {}}
+ previewImport={(params) => {}}
+ importFile={(params) => {}}
+ headerSetCompoent={renderHeaderSetCompoent()}
+ templateLink={"/api/bs/hrmsalary/addUpDeduction/downloadTemplate"}
+ renderFormComponent={() => renderFormComponent()}
+ visiable={this.state.modalVisiable}
+ onCancel={() => { this.setState({modalVisiable: false})}}
+ />
+
+ this.setState({selectItemVisible: false})}/>
+
+
+
)
}
}
diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js
new file mode 100644
index 00000000..6151d400
--- /dev/null
+++ b/pc4mobx/hrmSalary/stores/attendanceStore.js
@@ -0,0 +1,71 @@
+import { observable, action, toJS } from 'mobx';
+import { message } from 'antd';
+import { WeaForm, WeaTableNew } from 'comsMobx';
+
+import * as API from '../apis'; // 引入API接口文件
+
+const { TableStore } = WeaTableNew;
+
+export class AttendanceStore {
+ @observable tableStore = new TableStore(); // new table
+ @observable form = new WeaForm(); // nrew 一个form
+ @observable condition = []; // 存储后台得到的form数据
+ @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
+ @observable showSearchAd = false; // 高级搜索面板显示
+ @observable loading = true; // 数据加载状态
+ @observable step = 0 ;
+ @observable modalVisiable = false;
+
+ @action
+ setStep = step => this.step = step
+
+ @action
+ setModalVisiable = modalVisiable => this.modalVisiable = modalVisiable
+
+ // 初始化操作
+ @action
+ doInit = () => {
+ this.getCondition();
+ this.getTableDatas();
+ }
+
+ // 获得高级搜索表单数据
+ @action
+ getCondition = () => {
+ API.getCondition().then(action(res => {
+ if (res.api_status) { // 接口请求成功/失败处理
+ this.condition = res.condition;
+ this.form.initFormFields(res.condition); // 渲染高级搜索form表单
+ } else {
+ message.error(res.msg || '接口调用失败!')
+ }
+ }));
+ }
+
+ // 渲染table数据
+ @action
+ getTableDatas = (params) => {
+ this.loading = true;
+ const formParams = this.form.getFormParams() || {};
+ params = params || formParams;
+ API.getTableDatas(params).then(action(res => {
+ if (res.api_status) { // 接口请求成功/失败处理
+ this.tableStore.getDatas(res.datas); // table 请求数据
+ this.hasRight = res.hasRight;
+ } else {
+ message.error(res.msg || '接口调用失败!')
+ }
+ this.loading = false;
+ }));
+ }
+
+ @action
+ setShowSearchAd = bool => this.showSearchAd = bool;
+
+ // 高级搜索 - 搜索
+ @action doSearch = () => {
+ this.getTableDatas();
+ this.showSearchAd = false;
+ }
+
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js
index ffccaf94..459595d0 100644
--- a/pc4mobx/hrmSalary/stores/index.js
+++ b/pc4mobx/hrmSalary/stores/index.js
@@ -8,6 +8,7 @@ import { CumDeductStore } from "./cumDeduct"
import { OtherDeductStore } from "./otherDeduct"
import { CumSituationStore } from './cumSituation'
import { ProgrammeStore } from './programme'
+import { AttendanceStore } from './attendanceStore';
module.exports = {
baseFormStore: new BaseFormStore(),
@@ -18,6 +19,7 @@ module.exports = {
cumDeductStore: new CumDeductStore(),
otherDeductStore: new OtherDeductStore(),
cumSituationStore: new CumSituationStore(),
- programmeStore: new ProgrammeStore()
+ programmeStore: new ProgrammeStore(),
+ attendanceStore: new AttendanceStore()
};