diff --git a/web/client/src/sections/humanAffairs/containers/index.js b/web/client/src/sections/humanAffairs/containers/index.js
index 654d302..f93e670 100644
--- a/web/client/src/sections/humanAffairs/containers/index.js
+++ b/web/client/src/sections/humanAffairs/containers/index.js
@@ -4,8 +4,14 @@ import PersonnelFiles from './personnelFiles';
import PersonnelFilesDetail from './personnelFilesDetail';
import EmployeeInformation from './employeeInformation';
import WeeklyManagement from './weeklyManagement';
+import SaleLog from './saleLog';
+import PMLog from './pmLog';
import LeaveStatistics from './leaveStatistics';
import OvertimeStatistics from './overtimeStatistics';
-export { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, WeeklyManagement, LeaveStatistics, OvertimeStatistics };
\ No newline at end of file
+export {
+ PersonnelFiles, PersonnelFilesDetail, EmployeeInformation,
+ WeeklyManagement, SaleLog, PMLog,
+ LeaveStatistics, OvertimeStatistics
+};
\ No newline at end of file
diff --git a/web/client/src/sections/humanAffairs/containers/pmLog.jsx b/web/client/src/sections/humanAffairs/containers/pmLog.jsx
new file mode 100644
index 0000000..26b28dc
--- /dev/null
+++ b/web/client/src/sections/humanAffairs/containers/pmLog.jsx
@@ -0,0 +1,382 @@
+import React, { useEffect, useState, useRef, useMemo } from 'react';
+import { connect } from 'react-redux';
+import { Table, Button, Pagination, Skeleton, Form, Tooltip, Banner } from '@douyinfe/semi-ui';
+import { IconSearch } from '@douyinfe/semi-icons';
+import { SkeletonScreen } from "$components";
+import '../style.less'
+import { Setup } from "$components";
+import moment from 'moment'
+import { getServiceUrl } from '../actions/service';
+
+const PMLog = (props) => {
+ const { dispatch, actions, history, user, loading, socket } = props;
+
+ const form = useRef();//表单
+
+ const [setup, setSetup] = useState(false);//表格设置是否显现
+ const [setupp, setSetupp] = useState([]);//实际显示的表格列表
+ const [lookup, setLookup] = useState({});//搜索
+ const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息
+ const [order, setOrder] = useState({ orderBy: 'hiredate', orderDirection: 'DESC' }); //页码信息
+ const [limits, setLimits] = useState(0)//每页实际条数
+ const [downloadUrl, setDownloadUrl] = useState('')//下载pdf;
+ const [warningBanner, setWarningBanner] = useState(null);
+ const PMLOG = "pmLog";
+ const page = useRef(query.page);//哪一页
+
+ let btnDisable = false;
+ const tableList = [//表格属性
+ {
+ title: '基础信息',
+ list: [
+ { name: "姓名", value: "userName" },
+ { name: "所属部门", value: "departmrnt" },
+ { name: "职位", value: "roleName" },
+ { name: "月度需提交次数", value: "idNumber" },
+ { name: "实际提交次数", value: "number" },
+ { name: "异常次数", value: "ycNumber" },
+ { name: "操作", value: "action" }
+ ]
+ }
+ ];
+ useEffect(() => {
+ localStorage.getItem(PMLOG) == null
+ ? localStorage.setItem(
+ PMLOG,
+ JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'number', 'ycNumber', 'action'])
+ )
+ : "";
+ attribute();
+ }, [])
+
+ useEffect(() => {
+ if (form && form.current && form.current.setValue) {
+ form.current.setValue("weeklyRange", [moment().startOf('isoWeek').format('YYYY-MM-DD'), moment().endOf('isoWeek').format('YYYY-MM-DD')])
+ }
+ }, [])
+
+ const columns = [
+ {
+ title: (
+
+
员工编号
+
+ ),
+ width: 200,
+ dataIndex: "userCode",
+ key: "userCode",
+ sorter: (a, b) => { },
+ // sorter: (a, b) => a.name.length - b.name.length > 0 ? 1 : -1,
+ render: (_, r, index) => {
+ return (r.userCode ? r.userCode : '-');
+ },
+ },
+ ];
+ //获取表格属性设置
+ function attribute() {
+ const arr = localStorage.getItem(PMLOG)
+ ? JSON.parse(localStorage.getItem(PMLOG))
+ : [];
+
+ const column = [
+ {
+ title: (
+
+

姓名
+
+ ),
+ dataIndex: "userName",
+ key: "userName",
+ render: (_, r, index) => {
+ return (r.userName ? r.userName : '-');
+ },
+ }, {
+ title: (
+
+

所属部门
+
+ ),
+ dataIndex: "departmrnt",
+ key: "departmrnt",
+ render: (_, r, index) => {
+ return (
+
+ {
+ r.departmrnt.map((ite, idx) => {
+ let departmentsArr = []
+ for (let i = 0; i < r.departmrnt.length; i++) {
+ departmentsArr.push(r.departmrnt[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (
+ {ite.name}
+
) : ('')
+
+ }
+ {
+ r.departmrnt.length > 1 && idx == 1 ? (
+
+
+ +{r.departmrnt.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
+ )
+ },
+ }, {
+ title: (
+
+

职位
+
+ ),
+ dataIndex: "roleName",
+ key: "roleName",
+ render: (_, r, index) => {
+ return (
+
+ {
+ r.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < r.role.length; i++) {
+ roleArr.push(r.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name) : ('')
+ }
+ {
+ r.role.length > 1 && idx == 1 ? (
+
+
+ +{r.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
);
+ },
+ }, {
+ title: '月度需提交次数',
+ dataIndex: "idNumber",
+ key: "idNumber",
+ render: (_, r, index) => {
+ return (r.idNumber ? r.idNumber : '-');
+ },
+ }, {
+ title: '实际提交次数',
+ dataIndex: "number",
+ key: "number",
+ render: (_, r, index) => {
+ return (r.number ? r.number : '-');
+ },
+ }, {
+ title: '异常次数',
+ dataIndex: "ycNumber",
+ key: "ycNumber",
+ render: (_, r, index) => {
+ return (r.ycNumber ? r.ycNumber : '-');
+ },
+ }, {
+ title: '操作',
+ dataIndex: "action",
+ key: "action",
+ render: (_, r, index) => {
+ return (r.vitae ? 下载 : '-')
+ },
+ },
+ ];
+ for (let i = 0; i < arr.length; i++) {
+ let colum = column.filter((item) => {
+ return item.key === arr[i];
+ });
+ columns.splice(i + 2, 0, colum[0]);
+ }
+ setSetupp(columns);
+ }
+ function handleRow(record, index) {//斑马条纹
+ // 给偶数行设置斑马纹
+ if (index % 2 === 0) {
+ return {
+ style: {
+ background: '#FAFCFF',
+ }
+ };
+ } else {
+ return {};
+ }
+ }
+ const scroll = useMemo(() => ({}), []);
+
+ return (
+ <>
+
+
+
人事管理
+
/
+
基本动作
+
/
+
工程日志
+
+
+
+
+
+ {
+ warningBanner &&
+ (
setWarningBanner(null)}
+ />)}
+
+

+ 表格中带有认证标识"
+

+ "信息的为系统基础数据,来源于项企PEP系统,不支持修改和导入变更
+
+
+
+ s)}
+ dataSource={[]}
+ bordered={false}
+ empty="暂无数据"
+ pagination={false}
+ onRow={handleRow}
+ scroll={scroll}
+ />
+
+
+
+
+
+
+ 共{limits}条信息
+
+
{
+ setQuery({ limit: pageSize, page: currentPage - 1 });
+ page.current = currentPage - 1
+ }}
+ />
+
+
+
+
+
+
+ {setup ? (
+ {
+ setSetup(false);
+ attribute();
+ }}
+ />
+ ) : (
+ ""
+ )}
+
+ >
+ )
+}
+
+function mapStateToProps(state) {
+ const { auth, global } = state;
+ return {
+ user: auth.user,
+ actions: global.actions,
+ };
+}
+
+export default connect(mapStateToProps)(PMLog);
diff --git a/web/client/src/sections/humanAffairs/containers/saleLog.jsx b/web/client/src/sections/humanAffairs/containers/saleLog.jsx
new file mode 100644
index 0000000..aaa818f
--- /dev/null
+++ b/web/client/src/sections/humanAffairs/containers/saleLog.jsx
@@ -0,0 +1,382 @@
+import React, { useEffect, useState, useRef, useMemo } from 'react';
+import { connect } from 'react-redux';
+import { Table, Button, Pagination, Skeleton, Form, Tooltip, Banner } from '@douyinfe/semi-ui';
+import { IconSearch } from '@douyinfe/semi-icons';
+import { SkeletonScreen } from "$components";
+import '../style.less'
+import { Setup } from "$components";
+import moment from 'moment'
+import { getServiceUrl } from '../actions/service';
+
+const SaleLog = (props) => {
+ const { dispatch, actions, history, user, loading, socket } = props;
+
+ const form = useRef();//表单
+
+ const [setup, setSetup] = useState(false);//表格设置是否显现
+ const [setupp, setSetupp] = useState([]);//实际显示的表格列表
+ const [lookup, setLookup] = useState({});//搜索
+ const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息
+ const [order, setOrder] = useState({ orderBy: 'hiredate', orderDirection: 'DESC' }); //页码信息
+ const [limits, setLimits] = useState(0)//每页实际条数
+ const [downloadUrl, setDownloadUrl] = useState('')//下载pdf;
+ const [warningBanner, setWarningBanner] = useState(null);
+ const SALESLOG = "salesLog";
+ const page = useRef(query.page);//哪一页
+
+ let btnDisable = false;
+ const tableList = [//表格属性
+ {
+ title: '基础信息',
+ list: [
+ { name: "姓名", value: "userName" },
+ { name: "所属部门", value: "departmrnt" },
+ { name: "职位", value: "roleName" },
+ { name: "当前日期内需提交次数", value: "idNumber" },
+ { name: "实际次数", value: "number" },
+ { name: "异常次数", value: "ycNumber" },
+ { name: "操作", value: "action" }
+ ]
+ }
+ ];
+ useEffect(() => {
+ localStorage.getItem(SALESLOG) == null
+ ? localStorage.setItem(
+ SALESLOG,
+ JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'number', 'ycNumber', 'action'])
+ )
+ : "";
+ attribute();
+ }, [])
+
+ useEffect(() => {
+ if (form && form.current && form.current.setValue) {
+ form.current.setValue("weeklyRange", [moment().startOf('isoWeek').format('YYYY-MM-DD'), moment().endOf('isoWeek').format('YYYY-MM-DD')])
+ }
+ }, [])
+
+ const columns = [
+ {
+ title: (
+
+
员工编号
+
+ ),
+ width: 200,
+ dataIndex: "userCode",
+ key: "userCode",
+ sorter: (a, b) => { },
+ // sorter: (a, b) => a.name.length - b.name.length > 0 ? 1 : -1,
+ render: (_, r, index) => {
+ return (r.userCode ? r.userCode : '-');
+ },
+ },
+ ];
+ //获取表格属性设置
+ function attribute() {
+ const arr = localStorage.getItem(SALESLOG)
+ ? JSON.parse(localStorage.getItem(SALESLOG))
+ : [];
+
+ const column = [
+ {
+ title: (
+
+

姓名
+
+ ),
+ dataIndex: "userName",
+ key: "userName",
+ render: (_, r, index) => {
+ return (r.userName ? r.userName : '-');
+ },
+ }, {
+ title: (
+
+

所属部门
+
+ ),
+ dataIndex: "departmrnt",
+ key: "departmrnt",
+ render: (_, r, index) => {
+ return (
+
+ {
+ r.departmrnt.map((ite, idx) => {
+ let departmentsArr = []
+ for (let i = 0; i < r.departmrnt.length; i++) {
+ departmentsArr.push(r.departmrnt[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (
+ {ite.name}
+
) : ('')
+
+ }
+ {
+ r.departmrnt.length > 1 && idx == 1 ? (
+
+
+ +{r.departmrnt.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
+ )
+ },
+ }, {
+ title: (
+
+

职位
+
+ ),
+ dataIndex: "roleName",
+ key: "roleName",
+ render: (_, r, index) => {
+ return (
+
+ {
+ r.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < r.role.length; i++) {
+ roleArr.push(r.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name) : ('')
+ }
+ {
+ r.role.length > 1 && idx == 1 ? (
+
+
+ +{r.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
);
+ },
+ }, {
+ title: '当前日期内需提交次数',
+ dataIndex: "idNumber",
+ key: "idNumber",
+ render: (_, r, index) => {
+ return (r.idNumber ? r.idNumber : '-');
+ },
+ }, {
+ title: '实际次数',
+ dataIndex: "number",
+ key: "number",
+ render: (_, r, index) => {
+ return (r.number ? r.number : '-');
+ },
+ }, {
+ title: '异常次数',
+ dataIndex: "ycNumber",
+ key: "ycNumber",
+ render: (_, r, index) => {
+ return (r.ycNumber ? r.ycNumber : '-');
+ },
+ }, {
+ title: '操作',
+ dataIndex: "action",
+ key: "action",
+ render: (_, r, index) => {
+ return (r.vitae ? 下载 : '-')
+ },
+ },
+ ];
+ for (let i = 0; i < arr.length; i++) {
+ let colum = column.filter((item) => {
+ return item.key === arr[i];
+ });
+ columns.splice(i + 2, 0, colum[0]);
+ }
+ setSetupp(columns);
+ }
+ function handleRow(record, index) {//斑马条纹
+ // 给偶数行设置斑马纹
+ if (index % 2 === 0) {
+ return {
+ style: {
+ background: '#FAFCFF',
+ }
+ };
+ } else {
+ return {};
+ }
+ }
+ const scroll = useMemo(() => ({}), []);
+
+ return (
+ <>
+
+
+
人事管理
+
/
+
基本动作
+
/
+
销售日报
+
+
+
+
+
+ {
+ warningBanner &&
+ (
setWarningBanner(null)}
+ />)}
+
+

+ 表格中带有认证标识"
+

+ "信息的为系统基础数据,来源于项企PEP系统,不支持修改和导入变更
+
+
+
+ s)}
+ dataSource={[]}
+ bordered={false}
+ empty="暂无数据"
+ pagination={false}
+ onRow={handleRow}
+ scroll={scroll}
+ />
+
+
+
+
+
+
+ 共{limits}条信息
+
+
{
+ setQuery({ limit: pageSize, page: currentPage - 1 });
+ page.current = currentPage - 1
+ }}
+ />
+
+
+
+
+
+
+ {setup ? (
+ {
+ setSetup(false);
+ attribute();
+ }}
+ />
+ ) : (
+ ""
+ )}
+
+ >
+ )
+}
+
+function mapStateToProps(state) {
+ const { auth, global } = state;
+ return {
+ user: auth.user,
+ actions: global.actions,
+ };
+}
+
+export default connect(mapStateToProps)(SaleLog);
diff --git a/web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx b/web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx
index d7ad186..5da9f09 100644
--- a/web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx
+++ b/web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx
@@ -302,7 +302,7 @@ const WeeklyManagement = (props) => {
let url = `${payload.url}/week_report/week`;
if (weeklyRange && weeklyRange.length == 2) {
- url += `?start=${moment(weeklyRange[0]).format('YYYY-MM-DD HH:mm:ss')}&end=${moment(weeklyRange[1]).format('YYYY-MM-DD HH:mm:ss')}`
+ url += `?start=${moment(weeklyRange[0]).format('YYYY-MM-DD HH:mm:ss')}&end=${moment(weeklyRange[1]).format('YYYY-MM-DD HH:mm:ss')}&type=week`
}
console.log(url);
setDownloadUrl(url);
diff --git a/web/client/src/sections/humanAffairs/nav-item.jsx b/web/client/src/sections/humanAffairs/nav-item.jsx
index f252dc1..f4b8bad 100644
--- a/web/client/src/sections/humanAffairs/nav-item.jsx
+++ b/web/client/src/sections/humanAffairs/nav-item.jsx
@@ -32,6 +32,10 @@ export function getNavItem(user, dispatch) {
to: '/humanAffairs/basicAction/weeklyManagement',
items: [{
itemKey: 'weeklyManagement', to: '/humanAffairs/basicAction/weeklyManagement', text: '周报管理'
+ },{
+ itemKey: 'saleLog', to: '/humanAffairs/basicAction/saleLog', text: '销售日志'
+ },{
+ itemKey: 'pmLog', to: '/humanAffairs/basicAction/pmLog', text: '工程日志'
}]
}, {
itemKey: 'leaveManagement',
diff --git a/web/client/src/sections/humanAffairs/routes.js b/web/client/src/sections/humanAffairs/routes.js
index fee87e7..a5280a0 100644
--- a/web/client/src/sections/humanAffairs/routes.js
+++ b/web/client/src/sections/humanAffairs/routes.js
@@ -1,4 +1,8 @@
-import { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, WeeklyManagement, LeaveStatistics, OvertimeStatistics } from './containers';
+import {
+ PersonnelFiles, PersonnelFilesDetail, EmployeeInformation,
+ WeeklyManagement, SaleLog, PMLog,
+ LeaveStatistics, OvertimeStatistics
+} from './containers';
export default [{
type: 'inner',
@@ -26,6 +30,16 @@ export default [{
key: 'weeklyManagement',
component: WeeklyManagement,
breadcrumb: '周报管理',
+ }, {
+ path: '/saleLog',
+ key: 'saleLog',
+ component: SaleLog,
+ breadcrumb: '销售日志',
+ }, {
+ path: '/pmLog',
+ key: 'pmLog',
+ component: PMLog,
+ breadcrumb: '工程日志',
}]
}, {
path: '/employeeRelations',