-
+
+
}
@@ -71,7 +81,7 @@ export const renderLogSearchsForm = (form, condition, onSearch = () => void (0))
});
});
group.push(
-
);
});
return group;
diff --git a/pc4mobx/hrmSalary/components/logViewModal/index.js b/pc4mobx/hrmSalary/components/logViewModal/index.js
index aeab775a..857ed362 100644
--- a/pc4mobx/hrmSalary/components/logViewModal/index.js
+++ b/pc4mobx/hrmSalary/components/logViewModal/index.js
@@ -7,7 +7,9 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
+import DetailLogView from "./components/detailLogView";
import { logConditions, renderLogSearchsForm } from "./config";
+import * as API from "../../apis/index";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -19,7 +21,7 @@ class Index extends Component {
super(props);
this.state = {
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
- loading: false, conditions: []
+ loading: false, conditions: [], logDetailDialog: { visible: false, title: "", logFunction: "", mainid: "" }
};
}
@@ -33,7 +35,7 @@ class Index extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
- // if (nextProps.visible !== this.props.visible && nextProps.visible) this.getAdjustHistoryList();
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.getLogs();
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
@@ -42,30 +44,38 @@ class Index extends Component {
}
}
- // getAdjustHistoryList = (extra = {}) => {
- // const { pageInfo } = this.state;
- // const { archivesStore: { logForm } } = this.props;
- // const payload = { ...pageInfo, ...logForm.getFormParams(), ...extra };
- // this.setState({ loading: true });
- // getAdjustHistoryList(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: _.map(columns, it => {
- // if (it.dataIndex === "operateTime") {
- // return { ...it, render: (text) => (
{moment(text).format("YYYY-MM-DD")}) };
- // }
- // return { ...it };
- // })
- // });
- // }
- // }).catch(() => this.setState({ loading: false }));
- // };
+ getLogs = (extra = {}) => {
+ const { pageInfo, logDetailDialog } = this.state;
+ const { baseFormStore: { form }, logFunction } = this.props;
+ const payload = {
+ ...pageInfo, ...extra, searchMap: { ...form.getFormParams() },
+ function: logFunction, showColums: ""
+ };
+ this.setState({ loading: true });
+ API.getLogs(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: _.map(columns, it => {
+ if (it.dataIndex === "operatedesc") {
+ return {
+ ...it, render: (__, record) => (
{
+ const { operatedesc: title, uuid: mainid } = record;
+ this.setState({ logDetailDialog: { visible: true, title, logFunction, mainid } });
+ }}>{getLabel(33564, "查看")})
+ };
+ }
+ return { ...it };
+ })
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
render() {
- const { loading, dataSource, columns, pageInfo, conditions } = this.state;
+ const { loading, dataSource, columns, pageInfo, conditions, logDetailDialog } = this.state;
const { baseFormStore: { form } } = this.props;
const pagination = {
...pageInfo,
@@ -76,15 +86,15 @@ class Index extends Component {
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
- }, () => this.getAdjustHistoryList());
+ }, () => this.getLogs());
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
- }, () => this.getAdjustHistoryList());
+ }, () => this.getLogs());
}
};
- const scrollHeight = this.logRef ? this.logRef.state.height - 210 : 606.6;
+ const scrollHeight = this.logRef ? this.logRef.state.height - 254 : 606.6;
return (
- {renderLogSearchsForm(form, conditions, () => this.getAdjustHistoryList({ current: 1 }))}
+ {renderLogSearchsForm(form, conditions, () => this.getLogs({ current: 1 }), () => {
+ form.resetForm();
+ this.getLogs({ current: 1 });
+ })}
+ this.setState({ logDetailDialog: { ...logDetailDialog, visible: false } })}/>
);
diff --git a/pc4mobx/hrmSalary/components/logViewModal/index.less b/pc4mobx/hrmSalary/components/logViewModal/index.less
index 6c10dc6f..0d9e4d57 100644
--- a/pc4mobx/hrmSalary/components/logViewModal/index.less
+++ b/pc4mobx/hrmSalary/components/logViewModal/index.less
@@ -26,5 +26,46 @@
.logTable {
background: #FFFFFF;
}
+
+ .wea-transfer-list-wrapper {
+ border: none;
+
+ .ant-tree-switcher {
+ display: none;
+ }
+
+ .transfer-tree {
+ background: #FFF;
+ border: 1px solid #dadada;
+
+ .treeitem {
+ margin: 0 !important;
+ }
+ }
+ }
+
+ .detailBox {
+ display: flex;
+ align-items: center;
+
+ .order {
+ width: 35px;
+ color: #999;
+ text-align: center;
+ }
+
+ .content {
+ position: relative;
+ flex: 1;
+ min-height: 40px;
+ color: #000;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
}
}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 67a0f05e..d808d539 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -403,7 +403,8 @@ export default class SalaryItem extends React.Component {
})}
/>
{/*操作日志*/}
-
this.setState({ logDialogVisible: false })}/>
+ this.setState({ logDialogVisible: false })}/>
{
systemItemVisible &&