Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
3c950521a2 | |
|
|
13c662be09 | |
|
|
3202c0c119 | |
|
|
7f806349c5 |
|
|
@ -1,4 +1,5 @@
|
||||||
node_modules
|
node_modules
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
.package.json
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"baidu-template-pro": "^1.0.0",
|
||||||
|
"dom-to-image": "^2.6.0",
|
||||||
|
"file-saver": "^2.0.5",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"orgchart": "^3.1.1",
|
||||||
|
"rc-org-chart": "^1.0.6",
|
||||||
|
"react-org-tree": "^1.0.0",
|
||||||
|
"react-orgchart": "^1.0.5",
|
||||||
|
"yargs": "^15.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/settings/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/settings/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSettingsForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/settings/getSettingsForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveSettings = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/settings/saveSettings', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/getImportForm?is_multilang_set=true', 'GET', params)
|
|
||||||
export const importExternalData = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/saveImport', 'POST', params)
|
|
||||||
|
|
||||||
export const getImportFormSet = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/getImportSetForm', 'GET', params)
|
|
||||||
export const syncData = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/synData', 'POST', params)
|
|
||||||
export const saveImportSet = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/saveImportSet', 'POST', params)
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getReportShareForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/getReportShareForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveReportShare = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/saveReportShare', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteReportShare = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/reportshare/deleteReportShare', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getRightMenu', 'POST', params);
|
|
||||||
|
|
||||||
export const getSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchCondition', 'GET', params);
|
|
||||||
|
|
||||||
export const getSearchList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchList', 'POST', params);
|
|
||||||
|
|
||||||
export const getBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 1});
|
|
||||||
|
|
||||||
export const getKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 2});
|
|
||||||
|
|
||||||
export const saveBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 1});
|
|
||||||
|
|
||||||
export const saveKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 2});
|
|
||||||
|
|
||||||
export const deleteGroup = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/del', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getShiftCycleForm', 'GET', params);
|
|
||||||
|
|
||||||
export const delShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/delShiftCycleForm', 'POST', params);
|
|
||||||
|
|
||||||
export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getTabs', 'POST', params);
|
|
||||||
|
|
||||||
export const init = (params = {}) => Promise.all([getSearchCondition(), getTabs()]);
|
|
||||||
|
|
||||||
export const getLocationForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getForm', 'GET', params);
|
|
||||||
|
|
||||||
export const saveLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/save', 'POST', params);
|
|
||||||
|
|
||||||
export const delLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/del', 'POST', params);
|
|
||||||
|
|
||||||
export const getWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getForm', 'GET', params);
|
|
||||||
|
|
||||||
export const saveWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/save', 'POST', params);
|
|
||||||
|
|
||||||
export const delWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/del', 'POST', params);
|
|
||||||
|
|
||||||
export const getMemberSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchCondition', 'GET', params);
|
|
||||||
|
|
||||||
export const getMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchList', 'POST', params);
|
|
||||||
|
|
||||||
export const getMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getForm', 'GET', params);
|
|
||||||
|
|
||||||
export const saveMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/save', 'POST', params);
|
|
||||||
|
|
||||||
export const delMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/del', 'POST', params);
|
|
||||||
|
|
||||||
export const exportExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/exportExcel', 'POST', params);
|
|
||||||
|
|
||||||
export const importExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/importExcel', 'POST', params);
|
|
||||||
|
|
||||||
// 考勤组查询gropuradio
|
|
||||||
export const getGroupMemeberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemeberCondition', 'GET', params);
|
|
||||||
|
|
||||||
// 考勤组查询列表
|
|
||||||
export const getGroupMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemberList', 'GET', params);
|
|
||||||
|
|
||||||
// 获取添加考勤组人员表单
|
|
||||||
export const getAddMemberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getAddMemberCondition', 'GET', params);
|
|
||||||
|
|
||||||
//加入考勤组保存
|
|
||||||
export const saveAddMember = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/saveAddMember', 'POST', params);
|
|
||||||
|
|
||||||
export const getGroupLocationList = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getGroupLocationList', 'GET', params);
|
|
||||||
|
|
||||||
export const getGroupWifiList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getGroupWifiList', 'GET', params);
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getMenus = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLeaveRulesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSyncSettingForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSyncSettingForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveSyncSetting = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/saveSyncSetting', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isNameRepeat = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveDisableLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/saveDisableLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getMenus = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getHolidaySetCalendar = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getHolidaySetCalendar', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getHolidayCount = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getHolidayCount', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getHolidaySetForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getHolidaySetForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addHolidaySet = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/addHolidaySet', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editHolidaySet = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/editHolidaySet', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteHolidaySet = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/deleteHolidaySet', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const initHolidaySet = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/initHolidaySet', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSyncForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/getSyncForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const syncHolidaySet = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/syncHolidaySet', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const hasRepeactData = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/holidayset/hasRepeactData', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLeaveTypesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getLeaveTypesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/addLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/editLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/deleteLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isNameRepeat = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/isNameRepeat', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveDisableLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/saveDisableLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
//获取导入表单
|
|
||||||
export const getImportForm = (params) => {
|
|
||||||
const {
|
|
||||||
importType
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
const str = importType === 'kqScheduleCode' ? 'schedulecode' : 'balanceofleave';
|
|
||||||
|
|
||||||
return WeaTools.callApi(`/api/hrm/kq/${str}/getImportForm`, 'GET', params);
|
|
||||||
}
|
|
||||||
//导入文件提交
|
|
||||||
export const saveImport = (params) => {
|
|
||||||
const {
|
|
||||||
importType
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
const str = importType === 'kqScheduleCode' ? 'schedulecode' : 'balanceofleave';
|
|
||||||
|
|
||||||
return WeaTools.callApi(`/api/hrm/kq/${str}/saveImport`, 'POST', params);
|
|
||||||
}
|
|
||||||
//获取导入结果回调数据
|
|
||||||
export const getImportProcessLog = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportProcessLog`, 'GET', params);
|
|
||||||
}
|
|
||||||
//获取导入结果
|
|
||||||
export const getImportResult = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportResult`, 'GET', params);
|
|
||||||
}
|
|
||||||
//历史导入信息查询
|
|
||||||
export const getImportHistory = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportHistory`, 'GET', params);
|
|
||||||
}
|
|
||||||
//导入日志
|
|
||||||
export const getImportLogDetail = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportColResultLog`, 'GET', params);
|
|
||||||
}
|
|
||||||
//导入日志 - 高级搜索
|
|
||||||
export const getImportLogSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getHistorySearchCondition`, 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
//获取导入表单
|
|
||||||
export const getImportForm = (params) => {
|
|
||||||
const {
|
|
||||||
importType
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
const str = importType === 'holidaySet' ? 'holidayset' : 'balanceofleave';
|
|
||||||
|
|
||||||
let type = 'GET';
|
|
||||||
if (str == 'balanceofleave') {
|
|
||||||
type = 'POST';
|
|
||||||
}
|
|
||||||
|
|
||||||
return WeaTools.callApi(`/api/kq/${str}/getImportForm`, type, params);
|
|
||||||
}
|
|
||||||
//导入文件提交
|
|
||||||
export const saveImport = (params) => {
|
|
||||||
const {
|
|
||||||
importType
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
const str = importType === 'holidaySet' ? 'holidayset' : 'balanceofleave';
|
|
||||||
|
|
||||||
return WeaTools.callApi(`/api/kq/${str}/saveImport`, 'POST', params);
|
|
||||||
}
|
|
||||||
//获取导入结果回调数据
|
|
||||||
export const getImportProcessLog = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportProcessLog`, 'GET', params);
|
|
||||||
}
|
|
||||||
//获取导入结果
|
|
||||||
export const getImportResult = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportResult`, 'GET', params);
|
|
||||||
}
|
|
||||||
//历史导入信息查询
|
|
||||||
export const getImportHistory = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportHistory`, 'GET', params);
|
|
||||||
}
|
|
||||||
//导入日志
|
|
||||||
export const getImportLogDetail = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getImportColResultLog`, 'GET', params);
|
|
||||||
}
|
|
||||||
//导入日志 - 高级搜索
|
|
||||||
export const getImportLogSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi(`/api/kq/importlog/getHistorySearchCondition`, 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSetupForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/getSetupForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSetupSteps = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/getSetupSteps', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const performInitialization = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/performInitialization', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
const apiAddress = '/api/hrm/kq/reportFieldDefine/';
|
|
||||||
|
|
||||||
export const getRightMenu = (params = {}) => WeaTools.callApi(`${apiAddress}getRightMenu`, 'GET', params);
|
|
||||||
export const getFieldDefineTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineTabs`, 'GET', params);
|
|
||||||
export const getFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineList`, 'POST', params);
|
|
||||||
export const saveFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefineList`, 'POST', params);
|
|
||||||
export const getFieldDefineForm = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineForm`, 'POST', params);
|
|
||||||
export const saveFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefine`, 'POST', params);
|
|
||||||
export const deleteFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}deleteFieldDefine`, 'POST', params);
|
|
||||||
export const getGroupList = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupList`, 'POST', params);
|
|
||||||
export const getGroupForm = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupForm`, 'POST', params);
|
|
||||||
export const saveGroup = (params = {}) => WeaTools.callApi(`${apiAddress}saveGroup`, 'POST', params);
|
|
||||||
export const deleteGroup = (params = {}) => WeaTools.callApi(`${apiAddress}deleteGroup`, 'POST', params);
|
|
||||||
export const getConditionMoudleTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getConditionMoudleTabs`, 'POST', params);
|
|
||||||
export const saveConditionMoudleDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveConditionMoudleDefine`, 'POST', params);
|
|
||||||
export const getFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldOrderDefine`, 'POST', params);
|
|
||||||
export const saveFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldOrderDefine`, 'POST', params);
|
|
||||||
export const changeFieldGroup = (params = {}) => WeaTools.callApi(`${apiAddress}changeFieldGroup`, 'POST', params);
|
|
||||||
|
|
||||||
export const init = (params = {}) => Promise.all([getRightMenu(), getFieldDefineTabs()]);
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLeaveRulesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSyncSettingForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSyncSettingForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveSyncSetting = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/saveSyncSetting', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isNameRepeat = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveDisableLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/saveDisableLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getUnitName = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getUnitName', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getMenus = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getOvertimeRulesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/getOvertimeRulesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addOvertimeRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/addOvertimeRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editOvertimeRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/editOvertimeRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteOvertimeRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/deleteOvertimeRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveDefault = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/saveDefault', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getOvertimeUnitForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/getOvertimeUnitForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveOvertimeUnit = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/overtimerules/saveOvertimeUnit', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
export const getScheduleCodeCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeCondition', 'GET', params);
|
|
||||||
export const getScheduleCodeList = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeList', 'POST', params);
|
|
||||||
export const getScheduleCodeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeForm', 'GET', params);
|
|
||||||
export const saveScheduleCode = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/saveScheduleCode', 'POST', params);
|
|
||||||
export const getScheduleDeviceCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceCondition', 'GET', params);
|
|
||||||
export const getScheduleDeviceList = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceList', 'POST', params);
|
|
||||||
export const getScheduleDeviceForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceForm', 'GET', params);
|
|
||||||
export const saveScheduleDevice = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/saveScheduleDevice', 'POST', params);
|
|
||||||
export const delScheduleDevice = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/delScheduleDevice', 'POST', params);
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getTabs', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftSchedule = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getShiftSchedule', 'POST', params);
|
|
||||||
|
|
||||||
export const getSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getSearchCondition', 'POST', params);
|
|
||||||
|
|
||||||
export const getBatchShiftScheduleFrom = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getBatchShiftScheduleFrom', 'POST', params);
|
|
||||||
|
|
||||||
export const save = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/save', 'POST', params);
|
|
||||||
|
|
||||||
export const batchDelete = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/delete', 'POST', params);
|
|
||||||
|
|
||||||
export const batchSave = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/batchSave', 'POST', params);
|
|
||||||
|
|
||||||
export const importExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/importExcel', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftScheduleTotal = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getShiftScheduleTotal', 'POST', params);
|
|
||||||
|
|
||||||
export const exportExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/exportExcel', 'POST', params);
|
|
||||||
|
|
||||||
export const init = (params = {}) => Promise.all([getSearchCondition(params), getTabs()]);
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getRightMenu', 'POST', params);
|
|
||||||
|
|
||||||
export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getTabs', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftManagementSearchList = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementSearchList', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftManagementBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementBaseForm', 'POST', params);
|
|
||||||
|
|
||||||
export const saveShiftManagementBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveShiftManagementBaseForm', 'POST', params);
|
|
||||||
|
|
||||||
export const getShiftManagementPersonalizedForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementPersonalizedForm', 'POST', params);
|
|
||||||
|
|
||||||
export const saveShiftManagementPersonalizedForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveShiftManagementPersonalizedForm', 'POST', params);
|
|
||||||
|
|
||||||
export const delShiftManagementForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/delShiftManagementForm', 'POST', params);
|
|
||||||
|
|
||||||
export const init = (params = {}) => Promise.all([getRightMenu(), getTabs()]);
|
|
||||||
|
|
||||||
export const getShiftInfo = (params = {}) => Promise.all([getShiftManagementBaseForm(params), getShiftManagementPersonalizedForm(params)]);
|
|
||||||
|
|
||||||
export const getDetachOperatelevel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getDetachOperatelevel', 'POST', params);
|
|
||||||
|
|
||||||
export const getEmailRemindForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getEmailRemindForm', 'GET', params);
|
|
||||||
|
|
||||||
export const getMessageRemindForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getMessageRemindForm', 'GET', params);
|
|
||||||
|
|
||||||
export const saveEmailRemind = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveEmailRemind', 'POST', params);
|
|
||||||
|
|
||||||
export const saveMessageRemind = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveMessageRemind', 'POST', params);
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getTimeSelectionForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getTimeSelectionForm', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveTimeSelectionForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/saveTimeSelectionForm', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/travelrules/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getMenus = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/travelrules/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getTravelRulesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/travelrules/getTravelRulesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveTravelRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/travelrules/saveTravelRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getTreeTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/upgrade/getTreeTabs', 'POST', params);
|
|
||||||
|
|
||||||
export const getUpgradeInfo = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/get${params.type}`, 'POST', params);
|
|
||||||
|
|
||||||
export const doUpgrade = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/do${params.type}`, 'POST', params);
|
|
||||||
|
|
||||||
export const getUpgrade12Data = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/getUpgrade12Data`, 'POST', params);
|
|
||||||
|
|
||||||
export const init = (params = {}) => Promise.all([getTreeTabs(), getUpgradeInfo({type: 'Upgrade1'})]);
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getMenus = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getTabs = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getTabs', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveBalanceOfLeave = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/saveBalanceOfLeave', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const batchProcessing = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/batchProcessing', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const hasLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/hasLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getTabs = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getTabs', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/getSearchList', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveBalanceOfLeave = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/saveBalanceOfLeave', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const batchProcessing = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/batchProcessing', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const hasLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balanceofleave/hasLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getDetailSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balancedetail/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getDetailBalanceForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balancedetail/getBalanceForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editBalance = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balancedetail/editBalance', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteBalance = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/balancedetail/deleteBalance', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLeaveRulesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getUnitName = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/getUnitName', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isNameRepeat = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom'
|
|
||||||
|
|
||||||
export const getHasRight = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getHasRight', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRightMenu = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getRightMenu', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchCondition = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getSearchCondition', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getSearchList = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getSearchList', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLeaveTypesForm = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/getLeaveTypesForm', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const addLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/addLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const editLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/editLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const deleteLeaveTypes = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/deleteLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isNameRepeat = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/isNameRepeat', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const saveDisableLeaveRules = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/leavetypes/saveDisableLeaveTypes', 'POST', params);
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTools
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
|
|
||||||
export const getFormInfo = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowForm`, 'POST', params)
|
|
||||||
|
|
||||||
export const getFormInfoByWorkflow = (params = {}) => WeaTools.callApi('/api/hrm/stateset/getFormInfo', 'POST', params)
|
|
||||||
|
|
||||||
export const getCondition = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetListSearchCondition`, 'GET', params)
|
|
||||||
|
|
||||||
export const multiRemove = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/statechange/getPermissionToAdjustList`, 'POST', params)
|
|
||||||
|
|
||||||
export const getWorkflowList = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetListSearchList`, 'POST', params)
|
|
||||||
|
|
||||||
export const saveWf = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlow`, 'POST', params)
|
|
||||||
|
|
||||||
export const getTab = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetTabInfo`, 'POST', params)
|
|
||||||
|
|
||||||
export const createForm = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetCreateForm`, 'POST', params)
|
|
||||||
|
|
||||||
export const getField = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowWfFields`, 'POST', params)
|
|
||||||
|
|
||||||
export const saveField = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlowWfFields`, 'POST', params)
|
|
||||||
|
|
||||||
export const getActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowWfSet`, 'POST', params)
|
|
||||||
|
|
||||||
export const saveActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlowWfSet`, 'POST', params)
|
|
||||||
|
|
||||||
export const changeStatus = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/changeStateProcSetStatus`, 'POST', params)
|
|
||||||
|
|
||||||
export const removeWf = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/delStateProcSet`, 'POST', params)
|
|
||||||
|
|
||||||
export const initModuleData = (urlParams, params) => Promise.all([getFormInfo(urlParams), getCondition(urlParams)])
|
|
||||||
|
|
||||||
export const getProcSetTemplet = (urlParams, params) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getProcSetTemplet`, 'POST', params)
|
|
||||||
|
|
||||||
export const getStateProcSetFlowCheckRuleList = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowCheckRuleList`, 'POST', params)
|
|
||||||
|
|
||||||
export const saveStateProcCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcCheckRule`, 'POST', params)
|
|
||||||
|
|
||||||
export const delStateProcCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/delStateProcCheckRule`, 'POST', params)
|
|
||||||
|
|
||||||
export const getProcSetCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getProcSetCheckRule`, 'POST', params)
|
|
||||||
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
Authority,
|
|
||||||
Top,
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/valhalla/components/index.js';
|
|
||||||
import '../../style/applicationSettings.less';
|
|
||||||
|
|
||||||
@inject('applicationSettingsStore')
|
|
||||||
@observer
|
|
||||||
export default class ApplicationSettings extends React.Component {
|
|
||||||
componentWillMount() {
|
|
||||||
this.props.applicationSettingsStore.preMount();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
applicationSettingsStore
|
|
||||||
} = this.props, {
|
|
||||||
init
|
|
||||||
} = applicationSettingsStore;
|
|
||||||
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
applicationSettingsStore
|
|
||||||
} = this.props, {
|
|
||||||
authorityStore,
|
|
||||||
topStore,
|
|
||||||
formStore,
|
|
||||||
} = applicationSettingsStore;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-kq-application-settings'>
|
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@162dpe`} store={authorityStore}>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@hlpd9i`} store={topStore}>
|
|
||||||
<div className='content'>
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@shp38n`} store={formStore} />
|
|
||||||
</div>
|
|
||||||
</Top>
|
|
||||||
</Authority>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDialog
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
MagicForm
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
|
|
||||||
@inject('hrmAttendanceRpSharingSetting')
|
|
||||||
@observer
|
|
||||||
class Dialog extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getContent = () => {
|
|
||||||
const {
|
|
||||||
formConfig,
|
|
||||||
formElements,
|
|
||||||
} = this.props.hrmAttendanceRpSharingSetting, {
|
|
||||||
form,
|
|
||||||
loading,
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
if (loading) {
|
|
||||||
return <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@a1f2nv`} size='sm'/>
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@0acryc`}
|
|
||||||
{...formConfig}
|
|
||||||
{...formElements}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
dialog,
|
|
||||||
dialogProps,
|
|
||||||
} = this.props.hrmAttendanceRpSharingSetting;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@4esdkq`}
|
|
||||||
{...dialog}
|
|
||||||
{...dialogProps}
|
|
||||||
>
|
|
||||||
{this.getContent()}
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Dialog;
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTab
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
import {
|
|
||||||
SearchForm
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
|
|
||||||
@inject('hrmAttendanceRpSharingSetting')
|
|
||||||
@observer
|
|
||||||
class Tab extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmAttendanceRpSharingSetting.getSearchCondition();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
tabProps,
|
|
||||||
tab,
|
|
||||||
search,
|
|
||||||
} = this.props.hrmAttendanceRpSharingSetting, {
|
|
||||||
form
|
|
||||||
} = search;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@ek31h8`}
|
|
||||||
{...tabProps}
|
|
||||||
{...tab}
|
|
||||||
searchsAd={<div
|
|
||||||
onKeyDown={ (e) =>{
|
|
||||||
if (e.keyCode == 13 && e.target.tagName === "INPUT") {
|
|
||||||
this.props.hrmAttendanceRpSharingSetting.handleSearch()
|
|
||||||
}
|
|
||||||
} }
|
|
||||||
>{<SearchForm ecId={`${this && this.props && this.props.ecId || ''}_SearchForm@ll9zui`} isFormInit={form.isFormInit} {...search}/>}</div>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Tab;
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
|
||||||
|
|
||||||
@inject('hrmAttendanceRpSharingSetting')
|
|
||||||
@observer
|
|
||||||
class Table extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmAttendanceRpSharingSetting.getSearchList();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
table,
|
|
||||||
tableProps
|
|
||||||
} = this.props.hrmAttendanceRpSharingSetting;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@bquvfs`} {...table} {...tableProps}/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Table;
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaRightMenu,
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
import Tab from './Tab';
|
|
||||||
import Table from './Table';
|
|
||||||
|
|
||||||
@inject('hrmAttendanceRpSharingSetting')
|
|
||||||
@observer
|
|
||||||
class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmAttendanceRpSharingSetting.getRightMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
topProps,
|
|
||||||
toploading,
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas,
|
|
||||||
} = this.props.hrmAttendanceRpSharingSetting;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@evcgsg`}
|
|
||||||
{...topProps}
|
|
||||||
loading={toploading}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@r49zwv`} datas={dropMenuDatas}>
|
|
||||||
<Tab ecId={`${this && this.props && this.props.ecId || ''}_Tab@6fn9wo`} />
|
|
||||||
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@b6drwf`} />
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaTop>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Top;
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import React, {
|
|
||||||
Component
|
|
||||||
} from 'react';
|
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaSearchGroup,
|
|
||||||
WeaTableEdit
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class FieldSetting extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
fieldSettingFormCondition,
|
|
||||||
tableEditConfig,
|
|
||||||
refreshTableData,
|
|
||||||
setEditTable
|
|
||||||
} = store;
|
|
||||||
return (
|
|
||||||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@t0m8ld`} col={1} title={fieldSettingFormCondition.title} showGroup={fieldSettingFormCondition.defaultshow}>
|
|
||||||
<WeaTableEdit ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEdit@m7kmy3`} {...tableEditConfig} ref={(editTable) => setEditTable(editTable, 'fieldDef')}/>
|
|
||||||
</WeaSearchGroup>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
import React, {
|
|
||||||
Component
|
|
||||||
} from 'react';
|
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaSearchGroup,
|
|
||||||
WeaTableEdit
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class FieldSettingExplain extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
fieldSettingExplainConditon
|
|
||||||
} = store;
|
|
||||||
let items = [],
|
|
||||||
children = [];
|
|
||||||
items.push({
|
|
||||||
com: <div className='explain'>{children}</div>
|
|
||||||
})
|
|
||||||
fieldSettingExplainConditon.items.map((item, index) => {
|
|
||||||
children.push(<div>{`${item.index}. ${item.value}`}</div>)
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@939kx9`} col={1} title={fieldSettingExplainConditon.title} showGroup={fieldSettingExplainConditon.defaultshow} items={items}></WeaSearchGroup>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
import React, {
|
|
||||||
Component
|
|
||||||
} from 'react';
|
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaSearchGroup,
|
|
||||||
WeaFormItem,
|
|
||||||
WeaCheckbox,
|
|
||||||
WeaRangePicker,
|
|
||||||
WeaHelpfulTip,
|
|
||||||
WeaError
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Button
|
|
||||||
} from 'antd';
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class SyncSetting extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
sync,
|
|
||||||
syncSettingFormCondition,
|
|
||||||
setValid,
|
|
||||||
setSyncDate,
|
|
||||||
setErrorRef
|
|
||||||
} = store;
|
|
||||||
let items = [],
|
|
||||||
children = [];
|
|
||||||
items.push({
|
|
||||||
com: <div className='syncForm'>{children}</div>
|
|
||||||
})
|
|
||||||
Object.keys(syncSettingFormCondition).length > 0 && syncSettingFormCondition.items.map((item, index) => {
|
|
||||||
switch (index) {
|
|
||||||
case 0:
|
|
||||||
children.push(
|
|
||||||
(
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@4lcee3@${index}`} label={i18n.label.checkEnable()} labelCol={{span:8}} wrapperCol={{span:16}}>
|
|
||||||
<WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@i9ofe7@${index}`} value={item.isVaild ? '1' : '0'} display={'switch'} onChange={setValid}/>
|
|
||||||
<span className='tips'><WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@osmoe9@${index}`} title={item.tips} /></span>
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
children.push(
|
|
||||||
(
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@22vkp6@${index}`} label={i18n.label.syncDateRange()} labelCol={{span:8}} wrapperCol={{span:16}}>
|
|
||||||
<div className='dateRange'>
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@veklv6@${index}`} error={i18n.message.dataEmpty()} ref={dom => setErrorRef(dom)} tipPosition={'bottom'}>
|
|
||||||
<WeaRangePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaRangePicker@dv0q66@${index}`} onChange={setSyncDate}/>
|
|
||||||
</WeaError>
|
|
||||||
<div className='btnGroup'>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ouzetz@${index}`} type='primary' onClick={sync}>{i18n.label.immediateSync()}</Button>
|
|
||||||
<div className='tips'><WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@b7jyt6@${index}`} title={item.tips} /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@katyrj`} col={1} title={syncSettingFormCondition.title} showGroup={syncSettingFormCondition.defaultshow} items={items}></WeaSearchGroup>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
import '../../style/attendanceSynSetting.less';
|
|
||||||
import React, {
|
|
||||||
Component
|
|
||||||
} from 'react';
|
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {Spin} from 'antd';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaAlertPage,
|
|
||||||
WeaRightMenu,
|
|
||||||
WeaLocaleProvider
|
|
||||||
} from 'ecCom';
|
|
||||||
import SyncSetting from './SyncSetting';
|
|
||||||
import FieldSetting from './FieldSetting';
|
|
||||||
import FieldSettingExplain from './FieldSettingExplain';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
|
|
||||||
@inject('hrmAttendanceSyncSetting')
|
|
||||||
@observer
|
|
||||||
export default class AttendanceSyncSetting extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmAttendanceSyncSetting: store,
|
|
||||||
hrmImportResource
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
checkAuthorized,
|
|
||||||
initData
|
|
||||||
} = store;
|
|
||||||
checkAuthorized('schedulesignimport', null, initData);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmAttendanceSyncSetting: store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
topBtnAndMenu,
|
|
||||||
searchGroupList,
|
|
||||||
spinning
|
|
||||||
// editTableConfig
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
btns,
|
|
||||||
menus
|
|
||||||
} = topBtnAndMenu();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container attendanceSynSetting">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized &&
|
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@dbuvx2`} spinning={spinning}>
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@7ce6bq`}
|
|
||||||
title={getLabel(33740, '数据同步设置')}
|
|
||||||
icon={<i className='icon-coms-hrm'/>}
|
|
||||||
iconBgcolor='#217346'
|
|
||||||
showDropIcon={true}
|
|
||||||
buttons={btns}
|
|
||||||
dropMenuDatas={menus}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@eo9h6g`} datas={menus}>
|
|
||||||
<SyncSetting ecId={`${this && this.props && this.props.ecId || ''}_SyncSetting@wirlhl`} store={store} />
|
|
||||||
<FieldSetting ecId={`${this && this.props && this.props.ecId || ''}_FieldSetting@6hkz5r`} store={store} />
|
|
||||||
<FieldSettingExplain ecId={`${this && this.props && this.props.ecId || ''}_FieldSettingExplain@szhpph`} store={store} />
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaTop>
|
|
||||||
</Spin>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@qdtzgw`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
import React, { Component } from 'react'
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {toJS} from 'mobx';
|
|
||||||
import {WeaDialog,WeaFormItem, WeaSearchGroup, WeaLocaleProvider} from 'ecCom';
|
|
||||||
import {WeaSwitch} from 'comsMobx';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class AddToGroup extends Component {
|
|
||||||
|
|
||||||
getContent (condition) {
|
|
||||||
const {store} = this.props;
|
|
||||||
const {addToGroupForm, chooseGroup} = store;
|
|
||||||
|
|
||||||
const {isFormInit} = addToGroupForm;
|
|
||||||
let group = [];
|
|
||||||
isFormInit && toJS(condition).map((c, i) =>{
|
|
||||||
let items = [];
|
|
||||||
c.items.map((field, index) => {
|
|
||||||
items.push({
|
|
||||||
com:(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@5ummuk@${index}`}
|
|
||||||
label={getLabel('515195','选择考勤组')}
|
|
||||||
labelCol={{span: `${field.labelcol}`}}
|
|
||||||
ratio1to2
|
|
||||||
error={addToGroupForm.getError(field)}
|
|
||||||
tipPosition="bottom"
|
|
||||||
wrapperCol={{span: `${field.fieldcol}`}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@dy200w@${index}`} fieldConfig={{...field, title:getLabel('515195','选择考勤组')}} form={addToGroupForm} onChange = {(data) => chooseGroup (data)} title='选择考勤组' />
|
|
||||||
</WeaFormItem>),
|
|
||||||
})
|
|
||||||
});
|
|
||||||
group.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@wfif9o@${i}`} style={{paddingTop:'15px'}} center = {true} showGroup={c.defaultshow} items={items}/>)
|
|
||||||
});
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {store} = this.props;
|
|
||||||
const {addToGroupCondition,addDialogParams,buttons} = store;
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@kls7pc`} {...addDialogParams} buttons={buttons} >
|
|
||||||
{
|
|
||||||
this.getContent(addToGroupCondition)
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaRightMenu} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import findIndex from 'lodash/findIndex';
|
|
||||||
const {
|
|
||||||
WeaTable
|
|
||||||
} = WeaTableNew;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Content extends Component{
|
|
||||||
doEdit = id => this.props.store.doEdit(id, '1');
|
|
||||||
|
|
||||||
doEditBase = this.doEdit;
|
|
||||||
|
|
||||||
doEditKQType = id => this.props.store.doEdit(id, '2');
|
|
||||||
|
|
||||||
doEditKQMember = id => this.props.store.doEdit(id, '3');
|
|
||||||
|
|
||||||
doEditSchedule = (id, record) => this.props.store.doEditSchedule(record);
|
|
||||||
|
|
||||||
doDelete = id => this.props.store.doDelete({ids: id});
|
|
||||||
|
|
||||||
showLog = id => this.props.store.showLog({logSmallType: this.props.store.logTypeDef.HRM_ENGINE_KQGROUP, targetId: id}); //日志
|
|
||||||
|
|
||||||
onOperatesClick = (record, index, operate) => {
|
|
||||||
const func = operate.href ? operate.href.split(':')[1].split('(')[0] : '';
|
|
||||||
const id = record.id ? record.id : '';
|
|
||||||
this[func] && this[func](id, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderCol = (cols) => {
|
|
||||||
['groupname'].map(key => {
|
|
||||||
const idx = findIndex(cols, item => item.dataIndex === key);
|
|
||||||
idx != -1 && (cols[idx].render = (text, record) => {
|
|
||||||
return <a onClick={() => this.doEdit(record.id)} dangerouslySetInnerHTML={{__html:record[`${key}span`]}}></a>
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const className = classnames({
|
|
||||||
['tabPane']: true,
|
|
||||||
['tabPane-include']: store.containerInitFinished.detachable
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={className}>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@p1ezwd`} datas={this.props.rightMenu}>
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@p7h982`}
|
|
||||||
comsWeaTableStore={store.table}
|
|
||||||
hasOrder={true}
|
|
||||||
needScroll={true}
|
|
||||||
onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
|
|
||||||
getColumns={cols => this.renderCol(cols)}
|
|
||||||
/>
|
|
||||||
</WeaRightMenu>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaDialog} from 'ecCom';
|
|
||||||
import {Button} from 'antd';
|
|
||||||
import {i18n} from '../../public/i18n';
|
|
||||||
import Info from './Info';
|
|
||||||
import BaseInfo from './info/BaseInfo';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Edit extends Component{
|
|
||||||
constructor(props){
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
height: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
render(){
|
|
||||||
const {height} = this.state;
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
dialogParams,
|
|
||||||
save,
|
|
||||||
canAdd,
|
|
||||||
} = store;
|
|
||||||
const generateDialogParams = () =>{
|
|
||||||
const props = {...dialogParams};
|
|
||||||
let buttons = canAdd ? [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@k8bo3`} type='primary' op='save' onClick={() => save()}>{i18n.label.save()}</Button>] : [];
|
|
||||||
if(dialogParams.opType === 'create' && canAdd){
|
|
||||||
buttons.push(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@esd8bp`} type='primary' op='entry' onClick={() => save(true)}>{i18n.label.saveAndSetting()}</Button>)
|
|
||||||
}
|
|
||||||
Object.assign(props, {
|
|
||||||
buttons,
|
|
||||||
moreBtn: {datas: store.convertToMenus(buttons)},
|
|
||||||
// key: new Date().getTime()
|
|
||||||
})
|
|
||||||
return props;
|
|
||||||
}
|
|
||||||
|
|
||||||
const getContent = () => {
|
|
||||||
if(dialogParams.opType == 'create'){
|
|
||||||
return (
|
|
||||||
<BaseInfo ecId={`${this && this.props && this.props.ecId || ''}_BaseInfo@3ri22a`} store={store} />
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
return (
|
|
||||||
<Info ecId={`${this && this.props && this.props.ecId || ''}_Info@j0kdfv`} store={store} height={height}/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@2l5h9w`} {...generateDialogParams()} onChangeHeight={(h) => this.setState({height: h})}>
|
|
||||||
{getContent()}
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
import '../../style/groupSetting.less';
|
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {inject,observer} from 'mobx-react';
|
|
||||||
import {WeaTop, WeaAlertPage, WeaDialogFooter} from 'ecCom';
|
|
||||||
import {i18n} from '../../public/i18n';
|
|
||||||
import Info from './Info';
|
|
||||||
|
|
||||||
@inject('hrmGroupSetting')
|
|
||||||
@observer
|
|
||||||
export default class GroupInfo4Coms extends Component{
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store,
|
|
||||||
groupId,
|
|
||||||
callback
|
|
||||||
} = this.props;
|
|
||||||
store.checkAuthorized('kq/group', null, () => store.initSingle(groupId, callback));
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
dialogFootButtons,
|
|
||||||
} = store;
|
|
||||||
let title = i18n.label['389064']();
|
|
||||||
const {buttons, menus} = dialogFootButtons;
|
|
||||||
|
|
||||||
let children = [
|
|
||||||
(
|
|
||||||
<div>
|
|
||||||
<div style={{height: 680, position: 'relative'}}>
|
|
||||||
<Info ecId={`${this && this.props && this.props.ecId || ''}_Info@p8cxnm`} store={store} />
|
|
||||||
</div>
|
|
||||||
<WeaDialogFooter ecId={`${this && this.props && this.props.ecId || ''}_WeaDialogFooter@eacpnh`} buttons={buttons} moreBtn={{datas: menus}}/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized && children
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@y9p9d6`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
import React, { Component } from 'react'
|
|
||||||
import {toJS} from 'mobx'
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaRadioGroup, WeaTable} from 'ecCom'
|
|
||||||
import {Spin} from 'antd'
|
|
||||||
import AddToGroup from './AddToGroup';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
import SearchRadio from './SearchRadio'
|
|
||||||
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class GroupSearch extends Component {
|
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
componentDidMount () {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
initData,
|
|
||||||
} = store;
|
|
||||||
initData();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {store} = this.props;
|
|
||||||
const { searchColumns, searchDatas, tableProps, total, pageIndex, pageSize , getPagenitionParams, tableChange} = store;
|
|
||||||
const pagination = {
|
|
||||||
total,
|
|
||||||
current: pageIndex,
|
|
||||||
pageSize: pageSize,
|
|
||||||
showQuickJumper: true,
|
|
||||||
pageSizeOptions: [10, 20, 50, 100],
|
|
||||||
showSizeChanger: true,
|
|
||||||
showTotal: (total) => {
|
|
||||||
return `${i18n.label['18609']()} ${total} ${i18n.label['30690']()}`;
|
|
||||||
},
|
|
||||||
onShowSizeChange:(current, pageSize)=>{
|
|
||||||
getPagenitionParams(1, pageSize)
|
|
||||||
},
|
|
||||||
onChange:(current) => {
|
|
||||||
getPagenitionParams(current)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const className = classnames({
|
|
||||||
['tabPane']: true,
|
|
||||||
['tabPane-include']: store.containerInitFinished.detachable
|
|
||||||
})
|
|
||||||
const h = $('#wrap').height() - $('#group').height() - 44 - 90;
|
|
||||||
return (
|
|
||||||
<div id = 'wrap' className={className}>
|
|
||||||
<div id= 'group' >
|
|
||||||
<SearchRadio ecId={`${this && this.props && this.props.ecId || ''}_SearchRadio@1pa548`} store = {store}/>
|
|
||||||
</div>
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@9jz6k1`}
|
|
||||||
columns = {searchColumns}
|
|
||||||
dataSource = {toJS(searchDatas)}
|
|
||||||
pagination = {pagination}
|
|
||||||
style={{padding:'0 10px'}}
|
|
||||||
scroll={{y: h}}
|
|
||||||
rowKey = {record => record.id}
|
|
||||||
onChange = {(pagination, filters, sorter) => tableChange(pagination, filters, sorter)}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
<AddToGroup ecId={`${this && this.props && this.props.ecId || ''}_AddToGroup@o7tqr1`} store= {store} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import BaseInfo from './info/BaseInfo';
|
|
||||||
import AttendanceType from './info/AttendanceType';
|
|
||||||
import Member from './info/Member';
|
|
||||||
// import {Tabs} from 'weaHrmComsPublic';
|
|
||||||
import {Tabs} from '../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Info extends Component{
|
|
||||||
render(){
|
|
||||||
// const {Tabs} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
editTabConfig,
|
|
||||||
formTarget,
|
|
||||||
refreshTab,
|
|
||||||
} = store;
|
|
||||||
const tabConfig = store.toJS(editTabConfig);
|
|
||||||
const {
|
|
||||||
btns,
|
|
||||||
menus,
|
|
||||||
tabBtnDef
|
|
||||||
} = store.btnsAndMenus(tabConfig);
|
|
||||||
const {memberConditionForm: form, memberConditionFormFields: fields} = formTarget;
|
|
||||||
const tabProps = {
|
|
||||||
tabConfig: tabConfig,
|
|
||||||
tabChangeHandle: tabConfig.tabChangeHandle,
|
|
||||||
activeTabInfo: {
|
|
||||||
activeTabKey: tabConfig.activeTabKey,
|
|
||||||
activeTabIndex: store.getTabIndex(tabConfig.tabs, tabConfig.activeTabKey)
|
|
||||||
},
|
|
||||||
store: store,
|
|
||||||
tabBtnDef: tabBtnDef,
|
|
||||||
conditionForm: form,
|
|
||||||
conditionFormFields: fields,
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Tabs ecId={`${this && this.props && this.props.ecId || ''}_Tabs@gmfm28`} {...tabProps}>
|
|
||||||
<BaseInfo ecId={`${this && this.props && this.props.ecId || ''}_BaseInfo@2vj30b`} store={store} tabContent={true}/>
|
|
||||||
<AttendanceType ecId={`${this && this.props && this.props.ecId || ''}_AttendanceType@odzpjp`} store={store} tabContent={true}/>
|
|
||||||
<Member ecId={`${this && this.props && this.props.ecId || ''}_Member@ljdq0s`} store={store} height={this.props.height} tabContent={true}/>
|
|
||||||
</Tabs>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
import '../../style/groupSetting.less';
|
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {inject,observer} from 'mobx-react';
|
|
||||||
import {WeaTop, WeaAlertPage, WeaDialogFooter} from 'ecCom';
|
|
||||||
import {i18n} from '../../public/i18n';
|
|
||||||
import Info from './Info';
|
|
||||||
|
|
||||||
@inject('hrmGroupSetting')
|
|
||||||
@observer
|
|
||||||
export default class GroupInfoSingle extends Component{
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store,
|
|
||||||
params,
|
|
||||||
groupId,
|
|
||||||
callback
|
|
||||||
} = this.props;
|
|
||||||
const {id} = params;
|
|
||||||
store.checkAuthorized('kq/group', null, () => store.initSingle(groupId || id, callback), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store,
|
|
||||||
location
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
single
|
|
||||||
} = location.query;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
getTopProps,
|
|
||||||
} = store;
|
|
||||||
let title = i18n.label['389064']();
|
|
||||||
const {buttons, menus} = getTopProps(true);
|
|
||||||
const topProps = {
|
|
||||||
title,
|
|
||||||
icon: <i className='icon-coms-hrm'/>,
|
|
||||||
iconBgcolor: '#217346',
|
|
||||||
showDropIcon: true,
|
|
||||||
buttons: buttons,
|
|
||||||
dropMenuDatas: menus
|
|
||||||
}
|
|
||||||
|
|
||||||
let children = [];
|
|
||||||
if(single === '1')
|
|
||||||
children.push(
|
|
||||||
(
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@ijbdlj`} {...topProps}>
|
|
||||||
<div className='tabPane tabPane-include'>
|
|
||||||
<Info ecId={`${this && this.props && this.props.ecId || ''}_Info@2wsslx`} store={store} />
|
|
||||||
</div>
|
|
||||||
</WeaTop>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
else
|
|
||||||
children.push(
|
|
||||||
(
|
|
||||||
<div>
|
|
||||||
<Info ecId={`${this && this.props && this.props.ecId || ''}_Info@z7afio`} store={store} />
|
|
||||||
<WeaDialogFooter ecId={`${this && this.props && this.props.ecId || ''}_WeaDialogFooter@yxagfn`} buttons={buttons} moreBtn={{datas: menus}}/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized && children
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@7nuggb`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,183 +0,0 @@
|
||||||
import React, { Component } from "react";
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {Row, Col} from 'antd';
|
|
||||||
import { WeaLocaleProvider, WeaMap, WeaInput, WeaFormItem, WeaCheckbox, WeaInputNumber, WeaError } from "ecCom";
|
|
||||||
import has from 'lodash/has';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
import {i18n} from '../../public/i18n';
|
|
||||||
|
|
||||||
let map, geolocation, geocoder;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Map extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
date: new Date().getTime()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
onMapClickHandle = params => {
|
|
||||||
const {store: {onPositionSelected}} = this.props;
|
|
||||||
const {info, location} = params;
|
|
||||||
const {name, address} = info;
|
|
||||||
const data = {
|
|
||||||
locationname: name,
|
|
||||||
address: address,
|
|
||||||
longitude: location[0],
|
|
||||||
latitude: location[1]
|
|
||||||
}
|
|
||||||
onPositionSelected && onPositionSelected(data);
|
|
||||||
// this.setState({selectedPosition: data});
|
|
||||||
}
|
|
||||||
|
|
||||||
onSelectHandle = params => {
|
|
||||||
const {store: {onPositionSelected}} = this.props;
|
|
||||||
let locationname = '', address = '', longitude = '', latitude = '';
|
|
||||||
locationname = params.name;
|
|
||||||
address = params.address;
|
|
||||||
const latlng = params.location.split(',');
|
|
||||||
longitude = latlng[0];
|
|
||||||
latitude = latlng[1];
|
|
||||||
const data = {locationname,address,longitude,latitude}
|
|
||||||
onPositionSelected && onPositionSelected(data);
|
|
||||||
// this.setState({selectedPosition: data});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMapSwitchHandle = type => {
|
|
||||||
}
|
|
||||||
|
|
||||||
setMapRef = map => this.map = map;
|
|
||||||
|
|
||||||
onChangeHandle = (k, v) => {
|
|
||||||
const {store} = this.props;
|
|
||||||
const {setRangeParam, rangeParams} = store;
|
|
||||||
setRangeParam(k, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
gaodeRegeoCallback = (result, info) => {
|
|
||||||
const {info: rsInfo = '', status} = result || {};
|
|
||||||
const {name = '', address = ''} = info || {};
|
|
||||||
if(rsInfo.toLowerCase() == 'ok' && status == '1'){
|
|
||||||
this.props.store.setRangeParam('address', address);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
googleRegeoCallback = (result, info) => {
|
|
||||||
const {name = '', address = ''} = info || {};
|
|
||||||
address != '' && this.props.store.setRangeParam('address', address);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {store} = this.props;
|
|
||||||
const {rangeParams} = store;
|
|
||||||
const mapProps = {showGeolocation: true}
|
|
||||||
|
|
||||||
const {longitude, latitude} = rangeParams;
|
|
||||||
if(/^(\-)?\d+(\.\d+)?$/.test(longitude) && /^(\-)?\d+(\.\d+)?$/.test(latitude)){
|
|
||||||
Object.assign(mapProps,{position: [rangeParams.longitude, rangeParams.latitude]});
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div style={{width: '100%', height: '100%'}}>
|
|
||||||
<div style={{width: '100%', height: 'calc(100% - 90px)'}}>
|
|
||||||
<WeaMap key={this.state.date} ecId={`${this && this.props && this.props.ecId || ''}_WeaMap@f7whz1`}
|
|
||||||
ref={this.setMapRef}
|
|
||||||
zoom={14}
|
|
||||||
showInfoWindow={true}
|
|
||||||
showSearchBar={true}
|
|
||||||
// showGeolocation={true}
|
|
||||||
clickToChangePosition={true}
|
|
||||||
onMapSwitch={this.onMapSwitchHandle}
|
|
||||||
onMapClick={this.onMapClickHandle}
|
|
||||||
onSelect={this.onSelectHandle}
|
|
||||||
onMarkerClick={this.onMapClickHandle}
|
|
||||||
gaodeRegeoCallback={this.gaodeRegeoCallback}
|
|
||||||
googleRegeoCallback={this.googleRegeoCallback}
|
|
||||||
{...mapProps}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style={{height: 90, padding: 10}}>
|
|
||||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@zyb531`} gutter={16}>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@47jhtn`} span={12}>
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@mdlsvh`} tipPosition='bottom'
|
|
||||||
style={{width: '100%'}}
|
|
||||||
ref={d => store.setMapInfoError('locationname', d)}
|
|
||||||
error={`"${getLabel('388717','考勤地址')}" ${i18n.message.dataEmpty()}`}>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@xplgfl`}
|
|
||||||
label={getLabel('388717','考勤地址')}
|
|
||||||
labelCol={{span: 6}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
>
|
|
||||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@7vktkk`} gutter={16}>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@8mzurw`} span={21}>
|
|
||||||
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@ibd2pr`} viewAttr='3' value={rangeParams.locationname} onChange={v => this.onChangeHandle('locationname', v)} />
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</WeaFormItem>
|
|
||||||
</WeaError>
|
|
||||||
</Col>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@w0gtgs`} span={12}>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@ikzto2`}
|
|
||||||
label={getLabel('507863','有效识别半径')}
|
|
||||||
labelCol={{span: 6}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
>
|
|
||||||
<div className='hrm_attendance_location_range_setting'>
|
|
||||||
<div className='location_range_input'>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@fpztsz`}
|
|
||||||
min={100} defaultValue={Number(rangeParams.checkscope)} onChange={v => this.onChangeHandle('checkscope', v || 500)} />
|
|
||||||
</div>
|
|
||||||
<div className='location_range_tip text-elli' title={getLabel('515796','不设置默认为500米(最小值为100米)')}>{getLabel('515796','不设置默认为500米')}</div>
|
|
||||||
</div>
|
|
||||||
</WeaFormItem>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@7o4ywo`} gutter={16}>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@ti62b3`} span={12}>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@emcsae`}
|
|
||||||
label={getLabel('389220','详细地址')}
|
|
||||||
labelCol={{span: 6}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
className='hrm_attendance_location_range_address'
|
|
||||||
>
|
|
||||||
<div className='text-elli' style={{lineHeight: '30px'}} title={rangeParams.address}>{rangeParams.address}</div>
|
|
||||||
</WeaFormItem>
|
|
||||||
</Col>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@k7wox8`} span={12}>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@lklcn4`} span={12}>
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@h60rgp`} tipPosition='bottom'
|
|
||||||
style={{width: '100%'}}
|
|
||||||
ref={d => store.setMapInfoError('longitude', d)}
|
|
||||||
error={`"${getLabel('801','经度')}" ${i18n.message.dataEmpty()}`}
|
|
||||||
>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@d543pn`}
|
|
||||||
label={getLabel('801','经度')}
|
|
||||||
labelCol={{span: 12}}
|
|
||||||
wrapperCol={{span: 10}}
|
|
||||||
>
|
|
||||||
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@8tro40`} viewAttr='3' value={rangeParams.longitude} onChange={v => this.onChangeHandle('longitude', v)}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
</WeaError>
|
|
||||||
</Col>
|
|
||||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@8rj1w3`} span={11} offset={1}>
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@kpatji`} tipPosition='bottom'
|
|
||||||
style={{width: '100%'}}
|
|
||||||
ref={d => store.setMapInfoError('latitude', d)}
|
|
||||||
error={`"${getLabel('802','纬度')}" ${i18n.message.dataEmpty()}`}
|
|
||||||
>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@xaq7nz`}
|
|
||||||
label={getLabel('802','纬度')}
|
|
||||||
labelCol={{span: 12}}
|
|
||||||
wrapperCol={{span: 10}}
|
|
||||||
>
|
|
||||||
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@5esiei`} viewAttr='3' value={rangeParams.latitude} onChange={v => this.onChangeHandle('latitude', v)}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
</WeaError>
|
|
||||||
</Col>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
import React, { Component } from 'react'
|
|
||||||
import {WeaRadioGroup} from 'ecCom'
|
|
||||||
import {toJS} from 'mobx'
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class SearchRadio extends Component {
|
|
||||||
render() {
|
|
||||||
const {store} = this.props;
|
|
||||||
const {config, radioChange} = store;
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<WeaRadioGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaRadioGroup@d6yf37`} config={toJS(config)} onChange = {(data) => radioChange(data)} border style={{margin:'20px 10px'}}/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
import React, { Component } from "react";
|
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup } from "ecCom";
|
|
||||||
import { inject, observer } from 'mobx-react';
|
|
||||||
import { Button } from "antd";
|
|
||||||
// import img1URL from '../../../../../hrm/hrm_e9/image/addattendancegroup1.png';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmGroupSetting')
|
|
||||||
@observer
|
|
||||||
export default class Illdialog extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
render () {
|
|
||||||
const { hrmGroupSetting } = this.props;
|
|
||||||
return (
|
|
||||||
<div className={'wea-explain'}>
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@jmjjll`}
|
|
||||||
title={getLabel('529754', '工作时长计算方式说明')}
|
|
||||||
onCancel={hrmGroupSetting.calmethodcancel}
|
|
||||||
visible={hrmGroupSetting.illustrateVisible}
|
|
||||||
icon={'icon-coms-hrm'}
|
|
||||||
iconBgcolor={'#217346'}
|
|
||||||
style={{ width: 900, height: 750 }}
|
|
||||||
hasScroll
|
|
||||||
button={<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@dcsfmm`}>nih</Button>}
|
|
||||||
>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@a5bh4b`}
|
|
||||||
height={700}
|
|
||||||
><div className={'Computational_Method'}>
|
|
||||||
<div className={'summation'}>
|
|
||||||
<div className={'topbar1'}>{getLabel('529755', '打卡时间累加计算说明')}</div>
|
|
||||||
<p>{getLabel('529756', '1.弹性工时制设置考勤开始时间为7:00,工作时长设置为8小时;')}</p>
|
|
||||||
<p>{getLabel('529757', '2.假设当天打卡5次,打卡时间点分别为:9:00、12:00 、14:00 、16:00、18:00.')}</p>
|
|
||||||
<p>{getLabel('529758', '3.打卡时间累加计算是按照打卡时间一直累加进行计算工作时长,本质上是按照【最晚打卡时间 - 最早打卡时间】计算工作时长 。如下图所示:')}</p>
|
|
||||||
<div className={'imgExplain1'}>
|
|
||||||
<span className={'tuli'}>{getLabel('529759', '图例说明')}</span>
|
|
||||||
<span className={'time'}>{getLabel('16039', '考勤开始时间')}</span>
|
|
||||||
<span className={'duration'}>{getLabel('529760', '有效工作时长')}</span>
|
|
||||||
</div>
|
|
||||||
<div className={'img1'}><img src={'/hrm/hrm_e9/image/addattendancegroup1.png'} /></div>
|
|
||||||
</div>
|
|
||||||
<div className={'double_summation'}>
|
|
||||||
<div className={'topbar2'}>{getLabel('529761', '打卡时间成对计算说明')} </div>
|
|
||||||
<p>{getLabel('529756', '1.弹性工时制设置考勤开始时间为7:00,工作时长设置为8小时;')}</p>
|
|
||||||
<p>{getLabel('529757', '2.假设当天打卡5次,打卡时间点分别为:9:00、12:00 、14:00 、16:00、18:00.')}</p>
|
|
||||||
<p>{getLabel('529762', '3.打卡时间成对计算即按照【签退-签到】成对进行工作时长的计算,此方式的好处是可以过滤掉午休、晚休时段不计算工作时长 。如下图所示:')}</p>
|
|
||||||
<div className={'imgExplain2'}>
|
|
||||||
<span className={'tuli'}>{getLabel('529759', '图例说明')}</span>
|
|
||||||
<span className={'time'}>{getLabel('16039', '考勤开始时间')}</span>
|
|
||||||
<span className={'duration'}>{getLabel('529760', '有效工作时长')}</span>
|
|
||||||
<span className={'rest'}>{getLabel('388417', '休息时间')}</span>
|
|
||||||
<span className={'nouse'}>{getLabel('529763', '无效工作时长')}</span>
|
|
||||||
</div>
|
|
||||||
<div className={'img2'}><img src={"/hrm/hrm_e9/image/addattendancegroup2.png"} /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</WeaNewScroll>
|
|
||||||
|
|
||||||
</WeaDialog>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
import '../../style/groupSetting.less';
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
import { inject, observer } from 'mobx-react';
|
|
||||||
import { WeaTop, WeaAlertPage, WeaLeftRightLayout, WeaTab, WeaLocaleProvider } from 'ecCom';
|
|
||||||
import { i18n } from '../../public/i18n';
|
|
||||||
import { Spin } from 'antd'
|
|
||||||
import Content from './Content';
|
|
||||||
import GroupSearch from './GroupSearch';
|
|
||||||
// import {Tabs, OrganizationTree} from 'weaHrmComsPublic';
|
|
||||||
import { Tabs, OrganizationTree } from '../../../hrmComsPublic/index';
|
|
||||||
import IllustrateDialog from './illustrateDialog'
|
|
||||||
import Edit from './Edit';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
|
|
||||||
@inject('hrmGroupSetting')
|
|
||||||
@observer
|
|
||||||
export default class ShiftManager extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount () {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
this.refs.orgTree && this.refs.orgTree.refs.tree.fetchData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store
|
|
||||||
} = this.props;
|
|
||||||
store.checkAuthorized('kq/group', null, store.init, null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
render () {
|
|
||||||
// const {Tabs, OrganizationTree} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
hrmGroupSetting: store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
selectedSubCompany,
|
|
||||||
orgTreeProps,
|
|
||||||
getTopProps,
|
|
||||||
mainTabConfig,
|
|
||||||
formTarget,
|
|
||||||
tableMultiDelete,
|
|
||||||
tabChangeHandle,
|
|
||||||
mainActiveTabKey,
|
|
||||||
getRowKey,
|
|
||||||
loading,
|
|
||||||
canAdd,
|
|
||||||
canCreate,
|
|
||||||
canDel
|
|
||||||
} = store;
|
|
||||||
let title = getLabel('500388', '考勤组管理');
|
|
||||||
if (selectedSubCompany != null && selectedSubCompany.name)
|
|
||||||
title = `${title} - ${selectedSubCompany.name}`;
|
|
||||||
const { buttons, menus } = getTopProps();
|
|
||||||
const { conditionForm: form, conditionFormFields: fields } = formTarget;
|
|
||||||
const topProps = {
|
|
||||||
title,
|
|
||||||
icon: <i className='icon-coms-hrm' />,
|
|
||||||
iconBgcolor: '#217346',
|
|
||||||
showDropIcon: true,
|
|
||||||
buttons: buttons,
|
|
||||||
dropMenuDatas: menus
|
|
||||||
}
|
|
||||||
const tabProps = {
|
|
||||||
tabConfig: mainTabConfig,
|
|
||||||
activeTabInfo: {
|
|
||||||
activeTabKey: mainTabConfig.activeTabKey,
|
|
||||||
activeTabIndex: store.getTabIndex(mainTabConfig.tabs, mainTabConfig.activeTabKey)
|
|
||||||
},
|
|
||||||
rightMenu: menus,
|
|
||||||
store: store,
|
|
||||||
conditionForm: form,
|
|
||||||
conditionFormFields: fields,
|
|
||||||
tabChangeHandle: tabChangeHandle
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container groupSetting">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized &&
|
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@bofvhr`} spinning={loading}>
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@n7yial`} {...topProps}>
|
|
||||||
{
|
|
||||||
containerInitFinished.detachable
|
|
||||||
?
|
|
||||||
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@7ew6a0`}
|
|
||||||
leftCom={<OrganizationTree ecId={`${this && this.props && this.props.ecId || ''}_OrganizationTree@ag0fzz`} {...orgTreeProps} ref='orgTree' />}
|
|
||||||
leftWidth={310}
|
|
||||||
>
|
|
||||||
|
|
||||||
<Tabs ecId={`${this && this.props && this.props.ecId || ''}_Tabs@yq1dit`} {...tabProps}>
|
|
||||||
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@61tib7`} store={store} />
|
|
||||||
<GroupSearch ecId={`${this && this.props && this.props.ecId || ''}_GroupSearch@zydq26`} store={store} />
|
|
||||||
</Tabs>
|
|
||||||
</WeaLeftRightLayout>
|
|
||||||
:
|
|
||||||
<Tabs ecId={`${this && this.props && this.props.ecId || ''}_Tabs@o4zix6`} {...tabProps}>
|
|
||||||
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@b3iymc`} store={store} />
|
|
||||||
<GroupSearch ecId={`${this && this.props && this.props.ecId || ''}_GroupSearch@0gnkq3`} store={store} />
|
|
||||||
</Tabs>
|
|
||||||
}
|
|
||||||
<Edit ecId={`${this && this.props && this.props.ecId || ''}_Edit@d67ad8`} store={store} />
|
|
||||||
<IllustrateDialog ecId={`${this && this.props && this.props.ecId || ''}_IllustrateDialog@xcu8fb`} />
|
|
||||||
</WeaTop>
|
|
||||||
</Spin>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@zob4mz`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaNewScroll} from 'ecCom';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import LocationEdit from './LocationEdit';
|
|
||||||
import WifiEdit from './WifiEdit';
|
|
||||||
// import {FormInfo} from 'weaHrmComsPublic';
|
|
||||||
import {FormInfo} from '../../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class AttendanceType extends Component{
|
|
||||||
render(){
|
|
||||||
// const {FormInfo} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
formTarget,
|
|
||||||
custLabelCol,
|
|
||||||
itemRender,
|
|
||||||
childrenComponents,
|
|
||||||
refreshTab,
|
|
||||||
locationTableMultiDelete,
|
|
||||||
wifiTableMultiDelete
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
kqTypeForm: form,
|
|
||||||
kqTypeFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
const className = classnames({
|
|
||||||
['tabPane']: true,
|
|
||||||
['tabPane-dialog']: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={className}>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@kffmyy`} height={'100%'}>
|
|
||||||
<FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@1shhry`}
|
|
||||||
className='formComponent'
|
|
||||||
center={false}
|
|
||||||
custLabelCol={custLabelCol}
|
|
||||||
form={form}
|
|
||||||
formFields={fields}
|
|
||||||
itemRender={itemRender}
|
|
||||||
childrenComponents={childrenComponents()} />
|
|
||||||
<div id="downloadDiv" style={{display: 'none'}}>
|
|
||||||
</div>
|
|
||||||
</WeaNewScroll>
|
|
||||||
<LocationEdit ecId={`${this && this.props && this.props.ecId || ''}_LocationEdit@u8laa7`} store={store} />
|
|
||||||
<WifiEdit ecId={`${this && this.props && this.props.ecId || ''}_WifiEdit@x6uhzh`} store={store} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
import classnames from 'classnames';
|
|
||||||
import { WeaNewScroll } from 'ecCom';
|
|
||||||
import { observer } from 'mobx-react';
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
import SerialSetting from './SerialSetting';
|
|
||||||
// import {FormInfo} from 'weaHrmComsPublic';
|
|
||||||
import {FormInfo} from '../../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class BaseInfo extends Component{
|
|
||||||
render(){
|
|
||||||
// const {FormInfo} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
store,
|
|
||||||
tabContent
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
formTarget,
|
|
||||||
custLabelCol,
|
|
||||||
itemRender,
|
|
||||||
childrenComponents,
|
|
||||||
workdaySettingData,
|
|
||||||
bChange
|
|
||||||
// refreshTab
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
baseForm: form,
|
|
||||||
baseFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
const className = classnames({
|
|
||||||
['tabPane']: tabContent || false,
|
|
||||||
['tabPane-dialog']: tabContent || false,
|
|
||||||
['dCom']: !(tabContent || false)
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={className}>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@03k6z3`} height={'100%'}>
|
|
||||||
<FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@0q9p46`}
|
|
||||||
className='formComponent'
|
|
||||||
center={false}
|
|
||||||
custLabelCol={custLabelCol}
|
|
||||||
form={form}
|
|
||||||
formFields={fields}
|
|
||||||
itemRender={itemRender}
|
|
||||||
childrenComponents={childrenComponents()} />
|
|
||||||
</WeaNewScroll>
|
|
||||||
<SerialSetting ecId={`${this && this.props && this.props.ecId || ''}_SerialSetting@jukdt3`} store={store} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
* @Author: sunjun
|
|
||||||
* @Date: 2020-08-07 15:01:37
|
|
||||||
* @LastEditTime: 2020-11-18 09:00:06
|
|
||||||
* @LastEditors: Please set LastEditors
|
|
||||||
* @Description: In User Settings Edit
|
|
||||||
* @FilePath: /hrmAttendance/components/groupSetting/info/LocationEdit.js
|
|
||||||
*/
|
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaDialog} from 'ecCom';
|
|
||||||
import {Button} from 'antd';
|
|
||||||
import {i18n} from '../../../public/i18n';
|
|
||||||
import Map from '../Map';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class WifiEdit extends Component{
|
|
||||||
onScale = (evt, state) => {
|
|
||||||
}
|
|
||||||
|
|
||||||
onChangeHeight = height => {
|
|
||||||
// 高度变化回调
|
|
||||||
};
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {locationDialogParams, formTarget} = store;
|
|
||||||
const {
|
|
||||||
locationForm: form,
|
|
||||||
locationFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
const generateDialogParams = () =>{
|
|
||||||
const props = {...locationDialogParams};
|
|
||||||
let buttons = [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@f6u856`} type='primary' op='create' onClick={() => store.saveLocation()}>{i18n.label.save()}</Button>];
|
|
||||||
Object.assign(props, {
|
|
||||||
buttons,
|
|
||||||
moreBtn: {datas: store.convertToMenus(buttons)},
|
|
||||||
scalable: true,
|
|
||||||
onScale: this.onScale,
|
|
||||||
onChangeHeight: this.onChangeHeight
|
|
||||||
// key: new Date().getTime()
|
|
||||||
})
|
|
||||||
return props;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@586mgu`} {...generateDialogParams()}>
|
|
||||||
{
|
|
||||||
locationDialogParams.visible &&
|
|
||||||
<Map ecId={`${this && this.props && this.props.ecId || ''}_Map@lkdufc`} placeSearch store={store}/>
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaAuth} from 'ecCom';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
const {
|
|
||||||
WeaTable
|
|
||||||
} = WeaTableNew;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Member extends Component{
|
|
||||||
doDel = id => this.props.store.deleteMember({ids: id});
|
|
||||||
|
|
||||||
onOperatesClick = (record, index, operate) => {
|
|
||||||
const func = operate.href ? operate.href.split(':')[1].split('(')[0] : '';
|
|
||||||
const id = record.id ? record.id : '';
|
|
||||||
this[func] && this[func](id);
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
refreshTab,
|
|
||||||
memberAuthParams
|
|
||||||
} = store;
|
|
||||||
const className = classnames({
|
|
||||||
['tabPane']: true,
|
|
||||||
['tabPane-dialog']: true
|
|
||||||
})
|
|
||||||
const tableProps = {
|
|
||||||
scroll: {
|
|
||||||
y: this.props.height - 130
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={className}>
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@akyh7j`}
|
|
||||||
comsWeaTableStore={store.memberTable}
|
|
||||||
hasOrder={true}
|
|
||||||
needScroll={true}
|
|
||||||
{...tableProps}
|
|
||||||
onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
|
|
||||||
/>
|
|
||||||
{
|
|
||||||
memberAuthParams.visible && <WeaAuth ecId={`${this && this.props && this.props.ecId || ''}_WeaAuth@1elfx3`} {...memberAuthParams} />
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaNewScroll, WeaDialog} from 'ecCom';
|
|
||||||
import {Button} from 'antd';
|
|
||||||
import {i18n} from '../../../public/i18n';
|
|
||||||
// import {FormInfo} from 'weaHrmComsPublic';
|
|
||||||
import {FormInfo} from '../../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class SerialSetting extends Component{
|
|
||||||
render(){
|
|
||||||
// const {FormInfo} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
formTarget,
|
|
||||||
custLabelCol,
|
|
||||||
itemRender,
|
|
||||||
childrenComponents,
|
|
||||||
serialDialogParams
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
shiftSchedulceForm: form,
|
|
||||||
shiftSchedulceFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
const generateDialogParams = () =>{
|
|
||||||
const props = {...serialDialogParams};
|
|
||||||
let buttons = [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ia1n1n`} type='primary' op='create' onClick={() => store.saveSerial()}>{i18n.label.save()}</Button>];
|
|
||||||
Object.assign(props, {
|
|
||||||
buttons,
|
|
||||||
moreBtn: {datas: store.convertToMenus(buttons)},
|
|
||||||
// key: new Date().getTime()
|
|
||||||
})
|
|
||||||
return props;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@pe32n6`} {...generateDialogParams()}>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@514we0`} height={'100%'}>
|
|
||||||
<FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@7ncxfc`}
|
|
||||||
className='formComponent serialSetting'
|
|
||||||
form={form}
|
|
||||||
formFields={fields}
|
|
||||||
itemRender={itemRender}
|
|
||||||
childrenComponents={childrenComponents()}/>
|
|
||||||
</WeaNewScroll>
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {Table} from "antd";
|
|
||||||
import {WeaLocaleProvider} from 'ecCom';
|
|
||||||
import uniq from 'lodash/uniq';
|
|
||||||
import find from 'lodash/find';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class SerialTableList extends Component{
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store: {toJS, serialTableProps, getShiftCycleForm, deleteSerial, groupShiftOptions}
|
|
||||||
} = this.props;
|
|
||||||
let {
|
|
||||||
columns,
|
|
||||||
datas,
|
|
||||||
} = serialTableProps;
|
|
||||||
columns = columns.map(c => {
|
|
||||||
if(c.dataIndex == 'serial'){
|
|
||||||
return {
|
|
||||||
...c,
|
|
||||||
render: (text, record, index) => {
|
|
||||||
const {serial} = record;
|
|
||||||
let arr = serial.split(',');
|
|
||||||
let coms = [];
|
|
||||||
uniq(arr).map(key => {
|
|
||||||
if(key != '-1'){
|
|
||||||
const d = find(toJS(groupShiftOptions), {key});
|
|
||||||
const showname = (d != null ? d.showname : '');
|
|
||||||
coms.push(
|
|
||||||
<div style={{width: 210}} className='text-elli' title={showname}>{showname}</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return coms;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if(c.dataIndex == 'operate'){
|
|
||||||
return {
|
|
||||||
...c,
|
|
||||||
render: (text, record) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<span>
|
|
||||||
<a onClick={() => getShiftCycleForm(record)}>{getLabel('93','编辑')}</a>
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: '10px'}}>
|
|
||||||
<a onClick={() => deleteSerial(record)}>{getLabel(131966, '删除')}</a>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if(c.dataIndex == 'shiftcyclename'){
|
|
||||||
return {
|
|
||||||
...c,
|
|
||||||
render: (text, record) => {
|
|
||||||
return (
|
|
||||||
<div className='text-elli' style={{width: 210}} title={record.shiftcyclename}>
|
|
||||||
{record.shiftcyclename}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else
|
|
||||||
return c;
|
|
||||||
})
|
|
||||||
return (
|
|
||||||
<div className="workdaySetting">
|
|
||||||
<div className="table">
|
|
||||||
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@cccbhs`}
|
|
||||||
pagination={false}
|
|
||||||
columns={columns}
|
|
||||||
dataSource={datas}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaNewScroll, WeaDialog} from 'ecCom';
|
|
||||||
import {Button} from 'antd';
|
|
||||||
import {i18n} from '../../../public/i18n';
|
|
||||||
// import {FormInfo} from 'weaHrmComsPublic';
|
|
||||||
import {FormInfo} from '../../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class WifiEdit extends Component{
|
|
||||||
render(){
|
|
||||||
// const {FormInfo} = window.weaHrmComsPublic;
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
formTarget,
|
|
||||||
custLabelCol,
|
|
||||||
itemRender,
|
|
||||||
wifiDialogParams
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
wifiForm: form,
|
|
||||||
wifiFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
const generateDialogParams = () =>{
|
|
||||||
const props = {...wifiDialogParams};
|
|
||||||
let buttons = [<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@y01xb8`} type='primary' op='create' onClick={() => store.saveWifi()}>{i18n.label.save()}</Button>];
|
|
||||||
Object.assign(props, {
|
|
||||||
buttons,
|
|
||||||
moreBtn: {datas: store.convertToMenus(buttons)},
|
|
||||||
// key: new Date().getTime()
|
|
||||||
})
|
|
||||||
return props;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@ifctwp`} {...generateDialogParams()}>
|
|
||||||
{
|
|
||||||
wifiDialogParams.visible &&
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@nsp6u1`} height={'100%'}>
|
|
||||||
<FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@p297rs`}
|
|
||||||
className='formComponent'
|
|
||||||
center={false}
|
|
||||||
custLabelCol={custLabelCol}
|
|
||||||
form={form}
|
|
||||||
formFields={fields}
|
|
||||||
itemRender={itemRender}/>
|
|
||||||
</WeaNewScroll>
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,325 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaFormItem,
|
|
||||||
WeaInputNumber,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class BalanceConversionRules extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleConversionRulesChange = (index, value) => {
|
|
||||||
this.props.hrmHolidayRule.changeBalanceConversionRules(index, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleDelClick = () => {
|
|
||||||
this.props.hrmHolidayRule.delBalanceConversionRule();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleAddClick = () => {
|
|
||||||
this.props.hrmHolidayRule.addBalanceConversionRule();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleTimeIntervalChange = (value) => {
|
|
||||||
this.props.hrmHolidayRule.setTimeInterval(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
getHeader = (params) => {
|
|
||||||
const {
|
|
||||||
distributionMode,
|
|
||||||
timeInterval
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-customized-input' style={{borderBottom: '1px solid #eee',marginBottom: 10,paddingBottom: 10}}>
|
|
||||||
<span style={{marginRight: 3}}>
|
|
||||||
<i className='icon-coms-Tile' />
|
|
||||||
<b style={{marginLeft: 5}}>
|
|
||||||
{ distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")}
|
|
||||||
{`${getLabel('505550',"区间")} : `}
|
|
||||||
</b>
|
|
||||||
</span>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@mh11rp`}
|
|
||||||
min={0}
|
|
||||||
value={timeInterval}
|
|
||||||
onChange={this.handleTimeIntervalChange.bind(this)}/>
|
|
||||||
<span>
|
|
||||||
<b>{getLabel('505552',"年")}</b>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getBalancePaymentMethods = (params) => {
|
|
||||||
const {
|
|
||||||
balanceConversionRules,
|
|
||||||
distributionMode,
|
|
||||||
minimumUnit
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
const balancePaymentMethods = [];
|
|
||||||
|
|
||||||
balanceConversionRules.map((balanceConversionRule, index) => {
|
|
||||||
const {
|
|
||||||
timePoint,
|
|
||||||
amount
|
|
||||||
} = balanceConversionRule;
|
|
||||||
|
|
||||||
balancePaymentMethods.push(
|
|
||||||
<div className='hrm-customized-input' style={{position:'relative'}}>
|
|
||||||
<span>
|
|
||||||
{ distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")}
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{`${index === 0 ? '<' : '≥'}`}
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{`${[0,1].includes(index) ? 1 : timePoint}${getLabel('505552',"年")} , ` }
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{getLabel('505551',"享有")}
|
|
||||||
</span>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@zpqebb@${index}`}
|
|
||||||
viewAttr={3}
|
|
||||||
value={amount}
|
|
||||||
min={0}
|
|
||||||
onChange={this.handleConversionRulesChange.bind(this,index)}/>
|
|
||||||
<span>
|
|
||||||
{`${minimumUnit === '3' ? getLabel('391',"小时") : getLabel('505553',"天")}${getLabel('505554',"假")}`}
|
|
||||||
</span>
|
|
||||||
{( (index > 1) && index === (balanceConversionRules.length - 1) ) && <span className='wea-f14' style={{position:'absolute',top:7, marginLeft: 10}} onClick={this.handleDelClick}>
|
|
||||||
<i className='icon-coms-Clear hrm-del-icon' />
|
|
||||||
</span>}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return balancePaymentMethods;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
commonStore,
|
|
||||||
hrmHolidayRule
|
|
||||||
} = this.props, {
|
|
||||||
formElements,
|
|
||||||
} = commonStore, {
|
|
||||||
conversionRules,
|
|
||||||
} = hrmHolidayRule, {
|
|
||||||
timeInterval,
|
|
||||||
balanceConversionRules
|
|
||||||
} = conversionRules, {
|
|
||||||
form
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
const {
|
|
||||||
distributionMode,
|
|
||||||
minimumUnit
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
return (<div style={{padding:15, border: '1px solid #D9D9D9'}}>
|
|
||||||
{this.getHeader({
|
|
||||||
distributionMode,
|
|
||||||
timeInterval
|
|
||||||
})}
|
|
||||||
{this.getBalancePaymentMethods({
|
|
||||||
balanceConversionRules,
|
|
||||||
distributionMode,
|
|
||||||
minimumUnit,
|
|
||||||
})}
|
|
||||||
<span className='holiday-link' onClick={this.handleAddClick}>
|
|
||||||
<i className='icon-coms-Add-to-o'/>
|
|
||||||
<span style={{marginLeft: 5}}>{getLabel('505555',"添加规则")}</span>
|
|
||||||
</span>
|
|
||||||
</div>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class MixBalanceConversionRulesNew extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getHeader = () => {
|
|
||||||
const {
|
|
||||||
formElements,
|
|
||||||
} = this.props.commonStore, {
|
|
||||||
form
|
|
||||||
} = formElements, {
|
|
||||||
minimumUnit
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
const labels = [getLabel('505549', "工龄"), getLabel('505548', "司龄"), getLabel('505556', "法定年假"), getLabel('505557', "福利年假")];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{padding: '12px 0', backgroundColor:'#eee' }}>
|
|
||||||
{
|
|
||||||
labels.map( (label,index) => {
|
|
||||||
let unit;
|
|
||||||
if([0,1].includes(index)){
|
|
||||||
unit = getLabel('505552',"年");
|
|
||||||
}else{
|
|
||||||
unit = (minimumUnit === '3') ? getLabel('391',"小时") : getLabel('505553',"天");
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div className='hrm-over-flow' style={{display:'inline-block', width: [0,1].includes(index) ? 70 : 97,textAlign: 'center' }} title={`${label}(${unit})`}>
|
|
||||||
<i className='icon-coms-Tile'/>
|
|
||||||
<span style={{marginLeft: 5}}>{`${label}(${unit})`}</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getBalancePaymentMethods = () => {
|
|
||||||
const {
|
|
||||||
conversionRules,
|
|
||||||
changeEntryTime,
|
|
||||||
changeWorkYear,
|
|
||||||
changeLegalAmount,
|
|
||||||
changeWelfareAmount,
|
|
||||||
delBalanceConversionRule,
|
|
||||||
} = this.props.hrmHolidayRule, {
|
|
||||||
mixBalanceConversionRules
|
|
||||||
} = conversionRules;
|
|
||||||
|
|
||||||
const balancePaymentMethods = [];
|
|
||||||
|
|
||||||
const ageInputNumber = (params) => {
|
|
||||||
const {
|
|
||||||
value,
|
|
||||||
handleChange
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span>
|
|
||||||
<span><b>≥</b></span>
|
|
||||||
<span style={{display: 'inline-block',width: 45,marginLeft: 5}}>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@9813ys`}
|
|
||||||
viewAttr={3}
|
|
||||||
min={0}
|
|
||||||
value={value}
|
|
||||||
onChange={val => handleChange(val)}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const balanceInputNumber = (params) => {
|
|
||||||
const {
|
|
||||||
value,
|
|
||||||
handleChange
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span style={{display: 'inline-block',width: 75}}>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@1rfi21`}
|
|
||||||
viewAttr={3}
|
|
||||||
min={0}
|
|
||||||
value={value}
|
|
||||||
onChange={val => handleChange(val)}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
mixBalanceConversionRules.map((mixBalanceConversionRule, outsideIndex) => {
|
|
||||||
const {
|
|
||||||
entryTime,
|
|
||||||
workYear,
|
|
||||||
legalAmount,
|
|
||||||
welfareAmount,
|
|
||||||
} = mixBalanceConversionRule;
|
|
||||||
|
|
||||||
balancePaymentMethods.push(
|
|
||||||
<div style={{lineHeight: '45px',borderBottom: '1px solid #eee',position:'relative' }}>
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
ageInputNumber({
|
|
||||||
value: workYear,
|
|
||||||
handleChange: (val) => changeWorkYear(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 15}}>
|
|
||||||
{
|
|
||||||
ageInputNumber({
|
|
||||||
value: entryTime,
|
|
||||||
handleChange: (val) => changeEntryTime(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 20}}>
|
|
||||||
{
|
|
||||||
balanceInputNumber({
|
|
||||||
value: legalAmount,
|
|
||||||
handleChange: (val) => changeLegalAmount(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 23}}>
|
|
||||||
{
|
|
||||||
balanceInputNumber({
|
|
||||||
value: welfareAmount,
|
|
||||||
handleChange: (val) => changeWelfareAmount(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
{
|
|
||||||
(outsideIndex > 0 && outsideIndex === (mixBalanceConversionRules.length - 1) ) && (
|
|
||||||
<span style={{position: 'absolute',right: -10,top: 2}} className='wea-f14' onClick={() => delBalanceConversionRule({type:'mix'}) }>
|
|
||||||
<i className='icon-coms-Clear hrm-del-icon' />
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return balancePaymentMethods
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmHolidayRule
|
|
||||||
} = this.props, {
|
|
||||||
addBalanceConversionRule
|
|
||||||
} = hrmHolidayRule;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{padding:15, border: '1px solid #D9D9D9'}}>
|
|
||||||
<div style={{clear:'both',marginTop: 8}}>
|
|
||||||
{this.getHeader()}
|
|
||||||
{this.getBalancePaymentMethods()}
|
|
||||||
<span className='holiday-link' style={{display: 'inline-block', marginTop: 6}} onClick={() => addBalanceConversionRule({type:'mix'})}>
|
|
||||||
<i className='icon-coms-Add-to-o' />
|
|
||||||
<span style={{marginLeft: 5}}>
|
|
||||||
{getLabel('505555',"添加规则")}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
BalanceConversionRules,
|
|
||||||
MixBalanceConversionRulesNew,
|
|
||||||
}
|
|
||||||
|
|
@ -1,323 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDialog,
|
|
||||||
WeaFormItem,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaSwitch
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn.js';
|
|
||||||
import {
|
|
||||||
getDialogButtons,
|
|
||||||
confirmation,
|
|
||||||
} from '../../util/save-time-util.js';
|
|
||||||
import {
|
|
||||||
BalanceConversionRules,
|
|
||||||
MixBalanceConversionRulesNew
|
|
||||||
} from './BalanceConversionRules.js';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class Dialog extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleCancel = () => {
|
|
||||||
this.props.commonStore.closeDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取弹框按钮的配置数据
|
|
||||||
getBtnConfigDatas = () => {
|
|
||||||
const {
|
|
||||||
saveFormDatas,
|
|
||||||
formElements,
|
|
||||||
table,
|
|
||||||
dialog
|
|
||||||
} = this.props.commonStore, {
|
|
||||||
loading,
|
|
||||||
} = formElements, {
|
|
||||||
index
|
|
||||||
} = table, {
|
|
||||||
type
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
const {
|
|
||||||
syncVacationRules,
|
|
||||||
isEnable,
|
|
||||||
confirmBeforeSave,
|
|
||||||
} = this.props.hrmHolidayRule;
|
|
||||||
|
|
||||||
const name = ['-1', '0'].includes(index) ? getLabel('505564', '保存') : getLabel('19015', "同步");
|
|
||||||
|
|
||||||
const saveHoliday = (type === 0) ? saveFormDatas : confirmBeforeSave;
|
|
||||||
|
|
||||||
const callBack = ['-1', '0'].includes(index) ? saveHoliday : syncVacationRules;
|
|
||||||
|
|
||||||
const btnDatas = [];
|
|
||||||
|
|
||||||
if (isEnable === '1') {
|
|
||||||
btnDatas.push({
|
|
||||||
name: name,
|
|
||||||
disabled: loading,
|
|
||||||
onBtnClick: callBack
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return btnDatas;
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取同一行的表单元素
|
|
||||||
getTransverseSiblingComponents = (params) => {
|
|
||||||
const {
|
|
||||||
items,
|
|
||||||
form
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
//当没有表单元素传入时,直接返回
|
|
||||||
if (!items) return
|
|
||||||
|
|
||||||
let extendedDays, expirationDay;
|
|
||||||
|
|
||||||
items.map((item, index) => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
if (domkey[0] === 'extendedDays') {
|
|
||||||
//当【允许延长有效期】开关关闭时,什么也不返回
|
|
||||||
const extensionEnableValue = form.getFormParams().extensionEnable;
|
|
||||||
|
|
||||||
if (!parseInt(extensionEnableValue)) return;
|
|
||||||
|
|
||||||
//同一行的第二个表单元素
|
|
||||||
extendedDays = (
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@mmxnti@${index}`}
|
|
||||||
label={`${getLabel('505558',"超过有效期")}`}
|
|
||||||
colon={false}
|
|
||||||
labelCol={{span: 5}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
error={form.getError(item) }
|
|
||||||
tipPosition='bottom'
|
|
||||||
style={{float:'right',width:'86%',marginBottom: 0}}
|
|
||||||
>
|
|
||||||
<div style={{display: 'inline-block',width: 60,marginRight:13}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@dyqkol@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</div>
|
|
||||||
{`${getLabel('505553',"天")}${getLabel('505559',"内")}${getLabel('505560',"可继续使用")}`}
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (domkey[0] === 'expirationDay') {
|
|
||||||
expirationDay = (
|
|
||||||
<div style={{marginLeft: 10, display:'inline-block'}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@3s19ez@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const transverseSiblingComponents = {
|
|
||||||
'extensionEnable': extendedDays,
|
|
||||||
'expirationMonth': expirationDay
|
|
||||||
};
|
|
||||||
|
|
||||||
return transverseSiblingComponents;
|
|
||||||
}
|
|
||||||
|
|
||||||
//【余额发放方式】开关联动自定义组件
|
|
||||||
getCustomizedComponent = (params) => {
|
|
||||||
const {
|
|
||||||
form
|
|
||||||
} = params, {
|
|
||||||
distributionMode
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
if (!['2', '3', '6'].includes(distributionMode)) return
|
|
||||||
|
|
||||||
const relationShip = {
|
|
||||||
'distributionMode': distributionMode !== '6' ? <BalanceConversionRules ecId={`${this && this.props && this.props.ecId || ''}_BalanceConversionRules@farn38`} /> : <MixBalanceConversionRulesNew ecId={`${this && this.props && this.props.ecId || ''}_MixBalanceConversionRulesNew@b6kx3x`} />
|
|
||||||
}
|
|
||||||
|
|
||||||
return relationShip;
|
|
||||||
}
|
|
||||||
|
|
||||||
handleFormChange = (cb) => {
|
|
||||||
const key = Object.keys(cb)[0];
|
|
||||||
const value = cb[key].value;
|
|
||||||
|
|
||||||
const {
|
|
||||||
formElements,
|
|
||||||
} = this.props.commonStore, {
|
|
||||||
form,
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
//切换【应用范围】,重置【分部】浏览按钮
|
|
||||||
(key === 'scopeType' && value === '0') && ['scopeValue'].map(key => {
|
|
||||||
form.updateFields({
|
|
||||||
[key]: []
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
//下拉框【请假单位】选中项不为'1','3'项时,或【计算请假时长方式】不为第'1'项时,重置【日折算时长】
|
|
||||||
((key === 'minimumUnit' && !['1', '3'].includes(value)) || (key === 'computingMode') && value !== '1') && ['hoursToDay'].map(key => {
|
|
||||||
this.updateFormFields(key, 8);
|
|
||||||
});
|
|
||||||
|
|
||||||
//关闭【启用假期余额】开关后,重置【余额发放方式】、【有效期规则】、【允许延长有效期】和【释放规则】
|
|
||||||
(key === 'balanceEnable' && value === '0') && ['distributionMode', 'validityRule', 'extensionEnable', 'releaseRule'].map((key, index) => {
|
|
||||||
const val = [2, 3].includes(index) ? '0' : '1';
|
|
||||||
this.updateFormFields(key, val);
|
|
||||||
});
|
|
||||||
|
|
||||||
//下拉框【余额发放方式】选中项不为2、3、6项时,重置定制化组件数据
|
|
||||||
(key === 'distributionMode' && !['2', '3', '6'].includes(value)) && ['resetBalanceConversionRules'].map(f => {
|
|
||||||
this.props.hrmHolidayRule[f]()
|
|
||||||
});
|
|
||||||
|
|
||||||
//下拉框【余额发放方式】选中项不为【每年自动发放固定天数】时,重置【每人发放天数】
|
|
||||||
(key === 'distributionMode' && value !== '4') && ['annualAmount'].map(key => {
|
|
||||||
this.updateFormFields(key, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
//下拉框【有效期规则】选中项不为【自定义次年失效日期】时,重置【失效日期】
|
|
||||||
(key === 'validityRule' && value !== '3') && ['expirationMonth', 'expirationDay'].map(key => {
|
|
||||||
this.updateFormFields(key, '1');
|
|
||||||
});
|
|
||||||
|
|
||||||
//关闭【允许延长有效期】开关后,重置开关后面的Input框
|
|
||||||
(key === 'extensionEnable' && value === '0') && ['extendedDays'].map((key, index) => {
|
|
||||||
this.updateFormFields(key, 90);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
if (key === 'minimumUnit') {
|
|
||||||
this.props.hrmHolidayRule.handleMinimumUnitChange(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//更新表单元素的值
|
|
||||||
updateFormFields = (key, val) => {
|
|
||||||
const {
|
|
||||||
formElements,
|
|
||||||
} = this.props.commonStore, {
|
|
||||||
form,
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
form.updateFields({
|
|
||||||
[key]: {
|
|
||||||
value: val
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
getTransverseSecondComponent = (conditions) => {
|
|
||||||
if (conditions.length === 0) return;
|
|
||||||
|
|
||||||
let transverseSecondComponents = [];
|
|
||||||
|
|
||||||
conditions[0].items.map(item => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
if (['extendedDays', 'expirationDay'].includes(domkey[0])) {
|
|
||||||
transverseSecondComponents.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return transverseSecondComponents
|
|
||||||
}
|
|
||||||
|
|
||||||
getLabels = (form) => {
|
|
||||||
const {
|
|
||||||
minimumUnit
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
const label = (minimumUnit !== '3') ? getLabel('389334', "每人发放天数") : getLabel('388956', "每人发放小时数");
|
|
||||||
|
|
||||||
return {
|
|
||||||
'annualAmount': label
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
commonStore,
|
|
||||||
hrmHolidayRule
|
|
||||||
} = this.props, {
|
|
||||||
dialog,
|
|
||||||
dialogStaticProps,
|
|
||||||
formElements,
|
|
||||||
table,
|
|
||||||
} = commonStore, {
|
|
||||||
style,
|
|
||||||
formConfig,
|
|
||||||
dynamicTips,
|
|
||||||
renderBlacklist,
|
|
||||||
} = hrmHolidayRule, {
|
|
||||||
title,
|
|
||||||
visible,
|
|
||||||
} = dialog, {
|
|
||||||
form,
|
|
||||||
date,
|
|
||||||
loading,
|
|
||||||
conditions
|
|
||||||
} = formElements, {
|
|
||||||
index
|
|
||||||
} = table;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@c49fzl`}
|
|
||||||
title={title}
|
|
||||||
visible={visible}
|
|
||||||
style={style}
|
|
||||||
buttons={getDialogButtons({datas:this.getBtnConfigDatas()})}
|
|
||||||
onCancel={this.handleCancel}
|
|
||||||
{...dialogStaticProps}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
loading
|
|
||||||
? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@8zomd8`} size='sm' />
|
|
||||||
: ['-1','0'].includes(index)
|
|
||||||
? <MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@gyari6`}
|
|
||||||
{...formElements}
|
|
||||||
{...formConfig}
|
|
||||||
renderBlacklist={renderBlacklist}
|
|
||||||
date={date}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
dynamicTips={dynamicTips}
|
|
||||||
labels={this.getLabels(form)}
|
|
||||||
transverseSiblingComponents={this.getTransverseSiblingComponents({
|
|
||||||
form,
|
|
||||||
items: this.getTransverseSecondComponent(conditions),
|
|
||||||
})}
|
|
||||||
customizations={this.getCustomizedComponent({
|
|
||||||
form
|
|
||||||
})}
|
|
||||||
onFormElementsChange={this.handleFormChange}
|
|
||||||
/>
|
|
||||||
: <MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@wcmwb2`}
|
|
||||||
{...formElements}
|
|
||||||
date={date}
|
|
||||||
isFormInit={form.isFormInit}/>
|
|
||||||
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Dialog
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTab,
|
|
||||||
} from 'ecCom';
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class Search extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.commonStore.getSearchCondition();
|
|
||||||
}
|
|
||||||
|
|
||||||
setShowSearchAd = (bool) => {
|
|
||||||
this.props.commonStore.changeSearchPanelStatus(bool);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSearch = () => {
|
|
||||||
this.props.commonStore.getSearchList();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSearchChange = (val) => {
|
|
||||||
this.props.commonStore.changeAdvanceSearchField(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
search,
|
|
||||||
searchBaseValue,
|
|
||||||
searchsAd,
|
|
||||||
buttonsAd,
|
|
||||||
advanceHeight
|
|
||||||
} = this.props.commonStore, {
|
|
||||||
isPanelShow,
|
|
||||||
} = search;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@37tovc`}
|
|
||||||
searchsBaseValue={searchBaseValue}
|
|
||||||
searchsAd={searchsAd}
|
|
||||||
buttonsAd={buttonsAd}
|
|
||||||
showSearchAd={isPanelShow}
|
|
||||||
advanceHeight={advanceHeight}
|
|
||||||
setShowSearchAd={this.setShowSearchAd}
|
|
||||||
onSearch={this.handleSearch}
|
|
||||||
onSearchChange={this.handleSearchChange}
|
|
||||||
hasMask={false}
|
|
||||||
searchType={['base','advanced']}/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Search
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaCheckbox,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
confirmation,
|
|
||||||
} from '../../util/save-time-util.js';
|
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class Table extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.editParams = {
|
|
||||||
title: getLabel('388998', "编辑假期"),
|
|
||||||
type: 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
this.props.commonStore.getSearchList();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
this.props.commonStore.resetTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
reRenderColumns = (columns) => {
|
|
||||||
const {
|
|
||||||
handleCkChange,
|
|
||||||
collectCheckedId,
|
|
||||||
} = this.props.hrmHolidayRule;
|
|
||||||
|
|
||||||
columns.map(c => {
|
|
||||||
if (c.dataIndex === 'leaveName') {
|
|
||||||
c.render = (t, r) => {
|
|
||||||
const {
|
|
||||||
leaveNamespan,
|
|
||||||
randomFieldId
|
|
||||||
} = r;
|
|
||||||
|
|
||||||
return <a onClick={() => ['setSelectedRowId','setSelectedRowIndex' ,'openDialog'].map( (f,i) => {
|
|
||||||
let params;
|
|
||||||
if (i === 0) {
|
|
||||||
params = randomFieldId;
|
|
||||||
} else if(i === 1){
|
|
||||||
params = '0';
|
|
||||||
}else{
|
|
||||||
params = this.editParams;
|
|
||||||
};
|
|
||||||
this.props.commonStore[f](params)
|
|
||||||
}) }>{leaveNamespan}</a>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.dataIndex === 'isEnable') {
|
|
||||||
c.render = (t, r) => {
|
|
||||||
const {
|
|
||||||
isEnablespan,
|
|
||||||
randomFieldId
|
|
||||||
} = r;
|
|
||||||
|
|
||||||
if (isEnablespan === '1') collectCheckedId(randomFieldId)
|
|
||||||
|
|
||||||
return <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@5p582y@${c.dataIndex}`} value={isEnablespan} onChange={val => handleCkChange(val,randomFieldId)}/>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onOperatesClick = (record, rowIndex, operate) => {
|
|
||||||
const {
|
|
||||||
randomFieldId
|
|
||||||
} = record, {
|
|
||||||
index
|
|
||||||
} = operate;
|
|
||||||
|
|
||||||
const {
|
|
||||||
setSelectedRowId,
|
|
||||||
setSelectedRowIndex,
|
|
||||||
openDialog,
|
|
||||||
delTableRows,
|
|
||||||
} = this.props.commonStore;
|
|
||||||
|
|
||||||
//设置选中行的id
|
|
||||||
setSelectedRowId(randomFieldId);
|
|
||||||
//设置选中行的索引值
|
|
||||||
setSelectedRowIndex(index);
|
|
||||||
//根据索引值,执行相应的函数
|
|
||||||
switch (index) {
|
|
||||||
case '0': //编辑
|
|
||||||
openDialog(this.editParams);
|
|
||||||
break;
|
|
||||||
case '1': //删除
|
|
||||||
confirmation.showDelConfirm({
|
|
||||||
type: 0, //单个删除
|
|
||||||
logic: (type) => delTableRows(type),
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case '3': //同步
|
|
||||||
openDialog({
|
|
||||||
title: getLabel('21952', "同步设置"),
|
|
||||||
type: 0, //同步单个假期
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
commonStore,
|
|
||||||
} = this.props, {
|
|
||||||
table
|
|
||||||
} = commonStore, {
|
|
||||||
tableStore,
|
|
||||||
} = table;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@x0ys1i`}
|
|
||||||
comsWeaTableStore={tableStore}
|
|
||||||
hasOrder
|
|
||||||
needScroll
|
|
||||||
getColumns={columns => this.reRenderColumns(columns)}
|
|
||||||
onOperatesClick={this.onOperatesClick}/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Table
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaRightMenu,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
toJS
|
|
||||||
} from 'mobx';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
} from '../../public/learn';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
import Table from './Table';
|
|
||||||
import Search from './Search';
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.commonStore.getMenus();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
commonStore,
|
|
||||||
hrmHolidayRule
|
|
||||||
} = this.props, {
|
|
||||||
topTitle,
|
|
||||||
} = hrmHolidayRule, {
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas,
|
|
||||||
topComponentStaticProps,
|
|
||||||
table,
|
|
||||||
} = commonStore, {
|
|
||||||
tableStore,
|
|
||||||
canViewTable
|
|
||||||
} = table;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@fbdv8o`}
|
|
||||||
title={getLabel('505561', "假期规则")}
|
|
||||||
loading={tableStore.loading}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
{...topComponentStaticProps}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@2f5pr8`} datas={dropMenuDatas}>
|
|
||||||
<Search ecId={`${this && this.props && this.props.ecId || ''}_Search@nfyk0e`} />
|
|
||||||
{canViewTable ? <Table ecId={`${this && this.props && this.props.ecId || ''}_Table@7tmvko`} /> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@j8lc03`} />}
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaTop>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Top
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
|
|
||||||
import * as asyncFetch from '../../apis/holidayRule';
|
|
||||||
|
|
||||||
import Top from './Top';
|
|
||||||
import Dialog from './Dialog';
|
|
||||||
|
|
||||||
@inject('commonStore')
|
|
||||||
@inject('hrmHolidayRule')
|
|
||||||
@observer
|
|
||||||
class HolidayRule extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
const {
|
|
||||||
pageConfig
|
|
||||||
} = this.props.hrmHolidayRule;
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
...pageConfig,
|
|
||||||
customizedStore: this.props.hrmHolidayRule,
|
|
||||||
};
|
|
||||||
|
|
||||||
['resetStorePropertys', 'setPageConfig', 'getPermissionInfo'].map((f, i) => {
|
|
||||||
this.props.commonStore[f](i === 1 && params);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.props.commonStore.refreshPage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
commonStore,
|
|
||||||
} = this.props, {
|
|
||||||
pageAccessPermission
|
|
||||||
} = commonStore, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = pageAccessPermission;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@wczjmo`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@7wai04`} />
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@y19d18`} />
|
|
||||||
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@f3uah2`} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HolidayRule
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaHelpfulTip,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Icon
|
|
||||||
} from '../../public/learn';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Annotation extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
summary,
|
|
||||||
colorIconProps,
|
|
||||||
hasHelpfulTip,
|
|
||||||
helpfulTipProps,
|
|
||||||
handleIconClick,
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
annotations,
|
|
||||||
iconStates
|
|
||||||
} = summary;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>{
|
|
||||||
annotations.map( (annotation,index) => {
|
|
||||||
const {
|
|
||||||
changeType,
|
|
||||||
bgColor,
|
|
||||||
typeName,
|
|
||||||
value
|
|
||||||
} = annotation;
|
|
||||||
|
|
||||||
const enhanceIconProps = {
|
|
||||||
...colorIconProps,
|
|
||||||
bgColor,
|
|
||||||
className:`linear-gradient-${index}`,
|
|
||||||
iconState: iconStates[index],
|
|
||||||
onIconClick: (value) => handleIconClick(value, index)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div key={changeType} className='hrm-holiday-count-item'>
|
|
||||||
<div className='hrm-holiday-color-icon'>
|
|
||||||
<Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@g0evc6@${index}`} {...enhanceIconProps}/>
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
{`${typeName} : `} <b>{value}</b> {`${getLabel('505553',"天")}`}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}{
|
|
||||||
hasHelpfulTip && <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@zfrt61`} {...helpfulTipProps} />
|
|
||||||
}</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Annotation
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDatePicker,
|
|
||||||
WeaInputSearch,
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
import Tab from './Tab';
|
|
||||||
import Annotation from './Annotation';
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class ConditionGroup extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getLeftlayout = () => {
|
|
||||||
const {
|
|
||||||
datePicker,
|
|
||||||
datePickerProps
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
const leftlayout = (
|
|
||||||
<div>
|
|
||||||
<div className='hrm-holiday-tab'>
|
|
||||||
<Tab ecId={`${this && this.props && this.props.ecId || ''}_Tab@zd0bq8`} />
|
|
||||||
</div>
|
|
||||||
<div className='hrm-holiday-tab'>
|
|
||||||
<WeaDatePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaDatePicker@wlxerf`} {...datePickerProps} {...datePicker}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
return leftlayout;
|
|
||||||
}
|
|
||||||
|
|
||||||
getRightlayout = () => {
|
|
||||||
const {
|
|
||||||
tab,
|
|
||||||
inputSearch,
|
|
||||||
inputSearchProps,
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
selectedKey
|
|
||||||
} = tab;
|
|
||||||
|
|
||||||
let rightlayout;
|
|
||||||
|
|
||||||
if (selectedKey === '0') {
|
|
||||||
return (
|
|
||||||
<div className='hrm-holiday-count'>
|
|
||||||
<Annotation ecId={`${this && this.props && this.props.ecId || ''}_Annotation@c9v5qv`} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<WeaInputSearch ecId={`${this && this.props && this.props.ecId || ''}_WeaInputSearch@knxtnx`} {...inputSearch} {...inputSearchProps}/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div className='hrm-holiday-condition-group'>
|
|
||||||
{this.getLeftlayout()}
|
|
||||||
{this.getRightlayout()}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default ConditionGroup;
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDialog,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
MagicForm
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn.js';
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Dialog extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getContent = () => {
|
|
||||||
const {
|
|
||||||
hasDialogContentLoaded,
|
|
||||||
formConfig,
|
|
||||||
formElements,
|
|
||||||
dialogType,
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
form
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
const filterConfig = !['3', '4'].includes(dialogType) ? formConfig : {};
|
|
||||||
|
|
||||||
if (hasDialogContentLoaded) {
|
|
||||||
return (
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@pg8mld`}
|
|
||||||
{...filterConfig}
|
|
||||||
{...formElements}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@lilwep`} size='sm' />
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
dialog,
|
|
||||||
dialogProps,
|
|
||||||
dialogTitle,
|
|
||||||
dialogButtons
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@ak1ge9`}
|
|
||||||
{...dialog}
|
|
||||||
{...dialogProps}
|
|
||||||
title={dialogTitle}
|
|
||||||
buttons={dialogButtons}
|
|
||||||
>
|
|
||||||
{this.getContent()}
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Dialog
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Tab extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
tab,
|
|
||||||
tabProps,
|
|
||||||
handleTabClick,
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
datas,
|
|
||||||
} = tabProps, {
|
|
||||||
selectedKey
|
|
||||||
} = tab;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>{
|
|
||||||
datas.map( (data,index) => {
|
|
||||||
const {
|
|
||||||
key,
|
|
||||||
title
|
|
||||||
} = data;
|
|
||||||
|
|
||||||
const style = {
|
|
||||||
cursor: 'pointer'
|
|
||||||
};
|
|
||||||
|
|
||||||
if(key === selectedKey){
|
|
||||||
Object.assign(style,{
|
|
||||||
color: '#2DB7F5'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if(index === 1){
|
|
||||||
Object.assign(style,{
|
|
||||||
marginLeft: 10
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span onClick={() => handleTabClick(key)} style={style}>{title}</span>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Tab
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Table extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
reRenderColumns = (columns) => {
|
|
||||||
columns.map(c => {
|
|
||||||
if (c.dataIndex === 'holidayDate') {
|
|
||||||
c.render = (t, r) => {
|
|
||||||
const {
|
|
||||||
holidayDatespan,
|
|
||||||
randomFieldId
|
|
||||||
} = r;
|
|
||||||
|
|
||||||
return <a onClick={() => this.handleClick(randomFieldId) }>{holidayDatespan}</a>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleClick = (randomFieldId) => {
|
|
||||||
const funcs = ['setOperatedRowId', 'setDialogType', 'openDialog'],
|
|
||||||
params = [randomFieldId, '2', ''];
|
|
||||||
|
|
||||||
funcs.map((func, index) => {
|
|
||||||
this.props.hrmHolidySettingNew[func](params[index])
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
table,
|
|
||||||
tableProps
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@mwpapv`}
|
|
||||||
{...table}
|
|
||||||
{...tableProps}
|
|
||||||
getColumns={this.reRenderColumns}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Table
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaRightMenu,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
WeaLeftRightLayout
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
LeftTree,
|
|
||||||
NoData,
|
|
||||||
} from '../../public/learn';
|
|
||||||
|
|
||||||
import ConditionGroup from './ConditionGroup';
|
|
||||||
import Year from './Year';
|
|
||||||
import Table from './Table';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount () {
|
|
||||||
this.props.hrmHolidySettingNew.getRightMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
getRightLayout = () => {
|
|
||||||
const {
|
|
||||||
noDataProps,
|
|
||||||
dropMenuDatas,
|
|
||||||
hasRightLayout,
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
if (hasRightLayout) {
|
|
||||||
return (
|
|
||||||
<div style={{ height: '100%' }}>
|
|
||||||
<ConditionGroup ecId={`${this && this.props && this.props.ecId || ''}_ConditionGroup@qrj8xa`} />
|
|
||||||
<div className='tabPane' style={{ top: 50 }}>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@t4uag3`} datas={dropMenuDatas}>
|
|
||||||
{this.getContent()}
|
|
||||||
</WeaRightMenu>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return <NoData ecId={`${this && this.props && this.props.ecId || ''}_NoData@0zwye2`} {...noDataProps} />
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getContent = () => {
|
|
||||||
const {
|
|
||||||
tab
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
selectedKey
|
|
||||||
} = tab;
|
|
||||||
|
|
||||||
if (selectedKey === '0') {
|
|
||||||
return <Year ecId={`${this && this.props && this.props.ecId || ''}_Year@20jmlg`} />
|
|
||||||
} else {
|
|
||||||
return <Table ecId={`${this && this.props && this.props.ecId || ''}_Table@yp4i2x`} />
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render () {
|
|
||||||
const {
|
|
||||||
topProps,
|
|
||||||
toploading,
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas,
|
|
||||||
tree,
|
|
||||||
treeProps,
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@ot4tdi`}
|
|
||||||
title={getLabel('505580', "节假日设置")}
|
|
||||||
{...topProps}
|
|
||||||
loading={toploading}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
>
|
|
||||||
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@agargf`}
|
|
||||||
isNew={true}
|
|
||||||
leftCom={<LeftTree ecId={`${this && this.props && this.props.ecId || ''}_LeftTree@pk326c`} {...treeProps} {...tree} />}
|
|
||||||
resize={true}
|
|
||||||
leftWidth={320}
|
|
||||||
>
|
|
||||||
{this.getRightLayout()}
|
|
||||||
</WeaLeftRightLayout>
|
|
||||||
</WeaTop>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Top;
|
|
||||||
|
|
@ -1,123 +0,0 @@
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
toJS
|
|
||||||
} from 'mobx';
|
|
||||||
import {
|
|
||||||
WeaYear,
|
|
||||||
WeaNewScroll,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Tooltip,
|
|
||||||
Spin,
|
|
||||||
} from 'antd';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
class Year extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
yearDateCellRender = (_date) => {
|
|
||||||
const {
|
|
||||||
calendar
|
|
||||||
} = this.props.hrmHolidySettingNew;
|
|
||||||
|
|
||||||
const year = _date.getYear(),
|
|
||||||
month = _date.getMonth() + 1,
|
|
||||||
day = _date.getDayOfMonth();
|
|
||||||
|
|
||||||
const item = toJS(calendar)[month - 1][day - 1];
|
|
||||||
|
|
||||||
if (!item) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const {
|
|
||||||
date,
|
|
||||||
bgColor,
|
|
||||||
changeType,
|
|
||||||
typeName,
|
|
||||||
fontColor,
|
|
||||||
desc,
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
const yearOfItem = (date || '').length >= 4 ? date.substring(0,4) : '' ;
|
|
||||||
if(year != yearOfItem){
|
|
||||||
return null ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bgColor) {
|
|
||||||
const className = `linear-gradient-${['#00CC66','#FF0000','#0066FF'].findIndex(color => color === bgColor)}`;
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
date,
|
|
||||||
desc,
|
|
||||||
typeName
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<Tooltip ecId={`${this && this.props && this.props.ecId || ''}_Tooltip@ei8y41`} placement="right" title={this.getTooltip(params)}>
|
|
||||||
<div style={{backgroundColor:bgColor,color:fontColor}} className={className} title=''>
|
|
||||||
{day}
|
|
||||||
</div>
|
|
||||||
</Tooltip>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<div style={{color:fontColor}}>
|
|
||||||
{day}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getTooltip = (params) => {
|
|
||||||
const labels = [getLabel('22823', "日期"), getLabel('25734', "说明"), getLabel('505579', "类型")];
|
|
||||||
|
|
||||||
const values = Object.values(params);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ul>{
|
|
||||||
labels.map( (label,index) => {
|
|
||||||
return <li>{`${label}: ${values[index]}`}</li>
|
|
||||||
})
|
|
||||||
}</ul>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
year,
|
|
||||||
yearProps,
|
|
||||||
isyearloaded,
|
|
||||||
} = this.props.hrmHolidySettingNew, {
|
|
||||||
loading
|
|
||||||
} = year;
|
|
||||||
|
|
||||||
if (isyearloaded) {
|
|
||||||
return (
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@kr5vfg`} height={'100%'}>
|
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@xxcmhk`} spinning={loading}>
|
|
||||||
<WeaYear ecId={`${this && this.props && this.props.ecId || ''}_WeaYear@lo8xaz`}
|
|
||||||
{...year}
|
|
||||||
{...yearProps}
|
|
||||||
dateCellRender={date => this.yearDateCellRender(date)}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</WeaNewScroll>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@3oc2iy`} size='mid'/>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Year
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
import Import from '../importRelatedComponet/index';
|
|
||||||
import '../../style/holidaySetting.css';
|
|
||||||
|
|
||||||
import Top from './Top';
|
|
||||||
import Dialog from './Dialog';
|
|
||||||
|
|
||||||
@inject('hrmImportCommon')
|
|
||||||
@inject('hrmHolidySettingNew')
|
|
||||||
@observer
|
|
||||||
export default class HolidaySettingNew extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount () {
|
|
||||||
this.props.hrmHolidySettingNew.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount () {
|
|
||||||
this.init()
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.props.hrmHolidySettingNew.refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
params
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const funcs = ['setAttendanceId', 'getPermissionInfo'];
|
|
||||||
funcs.map((func, index) => {
|
|
||||||
this.props.hrmHolidySettingNew[func](index === 0 && params);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render () {
|
|
||||||
const {
|
|
||||||
hrmImportCommon,
|
|
||||||
hrmHolidySettingNew
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
importDialog
|
|
||||||
} = hrmImportCommon;
|
|
||||||
const {
|
|
||||||
pageAccessPermission
|
|
||||||
} = hrmHolidySettingNew, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = pageAccessPermission;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@6q3cm2`} size='lg' /> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@s1mo4g`} />
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<div id='hrmHolidySettingNew'>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@2kx7mg`} />
|
|
||||||
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@v0bvku`} />
|
|
||||||
{importDialog.visible && <Import ecId={`${this && this.props && this.props.ecId || ''}_Import@k20s1s`} />}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDialog,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
import DialogForm from './DialogForm';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Dialog extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
DIALOG,
|
|
||||||
dialog,
|
|
||||||
dialogButtons,
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@czsk0a`}
|
|
||||||
{...DIALOG}
|
|
||||||
{...dialog}
|
|
||||||
buttons={dialogButtons}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
dialog.loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@wibicp`} /> : <DialogForm ecId={`${this && this.props && this.props.ecId || ''}_DialogForm@0gz6yk`} store={store}/>
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class DialogForm extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleFormChange = (data, form) => {
|
|
||||||
const key = Object.keys(data)[0];
|
|
||||||
const value = data[key].value;
|
|
||||||
|
|
||||||
//清空分部浏览按钮
|
|
||||||
if (key === 'scopeType' && value === '0') {
|
|
||||||
form.updateFields({
|
|
||||||
'scopeValue': []
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//重置日折算时长
|
|
||||||
if (key === 'computingMode' && value === '1') {
|
|
||||||
form.updateFields({
|
|
||||||
'hoursToDay': {
|
|
||||||
value: 8
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key === 'minimumUnit') {
|
|
||||||
this.props.store.onHolidayUnitChange(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
dialog,
|
|
||||||
FORMCONFIG,
|
|
||||||
dynamicTips,
|
|
||||||
renderBlacklist,
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@kphltr`}
|
|
||||||
{...dialog}
|
|
||||||
{...FORMCONFIG}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
dynamicTips={dynamicTips}
|
|
||||||
renderBlacklist={renderBlacklist}
|
|
||||||
onFormElementsChange={data => this.handleFormChange(data,form)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTab
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Search extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
TAB,
|
|
||||||
tab,
|
|
||||||
searchsBaseValue,
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = tab;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@ucu7s1`}
|
|
||||||
{...TAB}
|
|
||||||
{...tab}
|
|
||||||
searchsBaseValue={searchsBaseValue}
|
|
||||||
searchsAd= {<div
|
|
||||||
onKeyDown={(e) =>{
|
|
||||||
if (e.keyCode == 13 && e.target.tagName === "INPUT") {
|
|
||||||
store.onSearch()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>{form.render()}</div>}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
WeaCheckbox
|
|
||||||
} from 'ecCom';
|
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Table extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
reRenderColumns = (columns, store) => {
|
|
||||||
const {
|
|
||||||
onTableTdClick,
|
|
||||||
collectChecked,
|
|
||||||
onCheckBoxChange,
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
columns.map(c => {
|
|
||||||
if (c.dataIndex === 'leaveName') {
|
|
||||||
c.render = function(text, record) {
|
|
||||||
const {
|
|
||||||
randomFieldId
|
|
||||||
} = record;
|
|
||||||
|
|
||||||
return <a onClick={() => onTableTdClick(randomFieldId)}>{text}</a>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.dataIndex === 'isEnable') {
|
|
||||||
c.render = function(text, record) {
|
|
||||||
const {
|
|
||||||
randomFieldId
|
|
||||||
} = record;
|
|
||||||
|
|
||||||
(text === '1') && collectChecked(randomFieldId)
|
|
||||||
|
|
||||||
return <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@75w5pn@${c.dataIndex}`} value={text} onChange={val => onCheckBoxChange(val,randomFieldId) }/>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onOperatesClick = (record, rIndex, operate, store) => {
|
|
||||||
const {
|
|
||||||
randomFieldId
|
|
||||||
} = record, {
|
|
||||||
index
|
|
||||||
} = operate;
|
|
||||||
|
|
||||||
const {
|
|
||||||
onTableTdClick,
|
|
||||||
del,
|
|
||||||
log,
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
if (index === '0') {
|
|
||||||
onTableTdClick(randomFieldId);
|
|
||||||
}
|
|
||||||
if (index === '1') {
|
|
||||||
del(randomFieldId);
|
|
||||||
}
|
|
||||||
if (index === '2') {
|
|
||||||
log(randomFieldId, 'table')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
TABLE,
|
|
||||||
table
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@bsi0ui`}
|
|
||||||
{...TABLE}
|
|
||||||
{...table}
|
|
||||||
getColumns={columns => this.reRenderColumns(columns,store)}
|
|
||||||
onOperatesClick={(record, index, operate) => this.onOperatesClick(record,index, operate,store)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaRightMenu,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import Table from './Table';
|
|
||||||
import Search from './Search';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
TOP,
|
|
||||||
top,
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@8rs7ky`}
|
|
||||||
{...TOP}
|
|
||||||
{...top}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@ohdsk2`} datas={dropMenuDatas}>
|
|
||||||
<Search ecId={`${this && this.props && this.props.ecId || ''}_Search@xys11o`} store={store}/>
|
|
||||||
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@t9rsn2`} store={store}/>
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaTop>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
import Top from './Top';
|
|
||||||
import Dialog from './Dialog';
|
|
||||||
|
|
||||||
@inject('hrmHolidayType')
|
|
||||||
@observer
|
|
||||||
export default class HolidayType extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
const {
|
|
||||||
hrmHolidayType: store
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
store.getPermissionInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmHolidayType: store
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
store.getRightMenu();
|
|
||||||
store.getSearchForm();
|
|
||||||
store.setShowSearchAd(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmHolidayType: store
|
|
||||||
} = this.props, {
|
|
||||||
permission,
|
|
||||||
dialog,
|
|
||||||
} = store, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = permission, {
|
|
||||||
visible
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@neqbar`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@6d831k`} />
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@8fldpk`} store={store}/>
|
|
||||||
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@cxgmn0`} store={store}/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
||||||
import React, {
|
|
||||||
Component
|
|
||||||
} from 'react';
|
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaAlertPage,
|
|
||||||
WeaRightMenu,
|
|
||||||
WeaSearchGroup,
|
|
||||||
WeaNewScroll,
|
|
||||||
WeaLocaleProvider
|
|
||||||
} from 'ecCom';
|
|
||||||
import {Spin} from 'antd';
|
|
||||||
import ImportResource from '../../../hrmengine/components/importresource/Import';
|
|
||||||
import {
|
|
||||||
i18n
|
|
||||||
} from '../../public/i18n';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmImportExternalAttendance')
|
|
||||||
@inject('hrmImportResource')
|
|
||||||
@observer
|
|
||||||
export default class ImportExtenalAttendanceData extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
const {
|
|
||||||
hrmImportExternalAttendance: store,
|
|
||||||
} = this.props;
|
|
||||||
store.resetImportResource();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmImportExternalAttendance: store,
|
|
||||||
hrmImportResource
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
checkAuthorized,
|
|
||||||
initData
|
|
||||||
} = store;
|
|
||||||
store.setImportResource(hrmImportResource);
|
|
||||||
checkAuthorized('schedulesignimport', null, initData);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmImportExternalAttendance: store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
topBtnAndMenu,
|
|
||||||
message,
|
|
||||||
spinning
|
|
||||||
} = store;
|
|
||||||
const {
|
|
||||||
btns,
|
|
||||||
menus
|
|
||||||
} = topBtnAndMenu();
|
|
||||||
let children = [];
|
|
||||||
if (message.length > 0) {
|
|
||||||
message.map(m => {
|
|
||||||
children.push(<div>{m}</div>)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const msgCom = <div style={{color: 'red'}}>{children}</div>;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized &&
|
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@6dduhy`} spinning={spinning}>
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@41obf7`}
|
|
||||||
title={getLabel(33539, '考勤外部数据导入')}
|
|
||||||
icon={<i className='icon-coms-hrm'/>}
|
|
||||||
iconBgcolor='#217346'
|
|
||||||
showDropIcon={true}
|
|
||||||
buttons={btns}
|
|
||||||
dropMenuDatas={menus}
|
|
||||||
>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@7xtqlv`} height={'100%'}>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@jef71e`} datas={menus}>
|
|
||||||
<ImportResource ecId={`${this && this.props && this.props.ecId || ''}_ImportResource@751eto`}/>
|
|
||||||
{
|
|
||||||
message.length > 0 &&
|
|
||||||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@1trxhn`} col={1} showGroup={true} title={getLabel(24960, '提示信息')} items={[{com:msgCom}]}/>
|
|
||||||
}
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaNewScroll>
|
|
||||||
</WeaTop>
|
|
||||||
</Spin>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@6hkmms`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,202 +0,0 @@
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
toJS
|
|
||||||
} from 'mobx';
|
|
||||||
import {
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Icon,
|
|
||||||
Steps,
|
|
||||||
Spin,
|
|
||||||
Button,
|
|
||||||
Tooltip,
|
|
||||||
QueueAnim,
|
|
||||||
} from 'antd';
|
|
||||||
import {addContentPath} from '../../util/index.js'
|
|
||||||
const Step = Steps.Step;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
const InitStatus = props => {
|
|
||||||
const {
|
|
||||||
status
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
switch (status) {
|
|
||||||
case '0':
|
|
||||||
return <i className='icon-coms-Clear' style={{color: '#FF0000'}}/>
|
|
||||||
break;
|
|
||||||
case '1':
|
|
||||||
return <Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@mwbz2q`} type="check-circle" style={{color: '#00CC00'}}/>
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
return <Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4140j1`} />
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const Detail = props => {
|
|
||||||
const {
|
|
||||||
description
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
const translate = (description) => {
|
|
||||||
return (<ul>{
|
|
||||||
description.map(d => <li>{d}</li>)
|
|
||||||
}</ul>)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Tooltip ecId={`${this && this.props && this.props.ecId || ''}_Tooltip@kgagak`} placement="right" title={Array.isArray(description) ? translate(description) : description }>
|
|
||||||
<span title=''>
|
|
||||||
<i className='icon-coms-Read' style={{color:'#666'}}/>
|
|
||||||
<span className='holiday-link' style={{marginLeft: 5}}>{getLabel('505586','详情')}</span>
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const Supply = props => {
|
|
||||||
const {
|
|
||||||
description
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
const supply = [];
|
|
||||||
|
|
||||||
const insert = (html) => {
|
|
||||||
supply.push(html);
|
|
||||||
return supply;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (description) {
|
|
||||||
insert(<br />).push(<Detail ecId={`${this && this.props && this.props.ecId || ''}_Detail@2jnhw9`} description={description}/>);
|
|
||||||
}
|
|
||||||
|
|
||||||
return supply;
|
|
||||||
}
|
|
||||||
|
|
||||||
const InitSteps = props => {
|
|
||||||
const {
|
|
||||||
currentIndex,
|
|
||||||
items
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Steps ecId={`${this && this.props && this.props.ecId || ''}_Steps@ufuli7`} current={currentIndex}>
|
|
||||||
{
|
|
||||||
items.map( (item,index) => {
|
|
||||||
const {
|
|
||||||
title,
|
|
||||||
status
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Step ecId={`${this && this.props && this.props.ecId || ''}_Step@0mb2d9@${index}`} status={status} description={(currentIndex === index) ? <b>{title}</b> : title}/>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</Steps>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const Result = props => {
|
|
||||||
const {
|
|
||||||
results,
|
|
||||||
names,
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<QueueAnim ecId={`${this && this.props && this.props.ecId || ''}_QueueAnim@vk0yt5`} type={['right', 'left']} style={{marginTop: 50}}>
|
|
||||||
{
|
|
||||||
results.map( (result,index) => {
|
|
||||||
const {
|
|
||||||
name,
|
|
||||||
status,
|
|
||||||
sketch,
|
|
||||||
description,
|
|
||||||
url,
|
|
||||||
} = result;
|
|
||||||
|
|
||||||
return (<div key={index} className='wea-f14 hrm-init-analysis-item'>
|
|
||||||
<span className='hrm-init-analysis-item-index'>
|
|
||||||
<i className={`icon-coms-${index + 1}`} style={{color:'#b2b2b2'}}/>
|
|
||||||
</span>
|
|
||||||
<span className='hrm-init-analysis-item-name hrm-over-flow'>
|
|
||||||
{name}
|
|
||||||
</span>
|
|
||||||
<span className='hrm-init-analysis-item-icon'>
|
|
||||||
<InitStatus ecId={`${this && this.props && this.props.ecId || ''}_InitStatus@pp2wvq@${index}`} status={status} />
|
|
||||||
</span>
|
|
||||||
<p className='hrm-init-analysis-item-desc hrm-over-flow wea-f12' style={{color: (status === '0') && '#FF0000',lineHeight:description && '25px' }} title={sketch}>
|
|
||||||
{ sketch }
|
|
||||||
{ description && <Supply ecId={`${this && this.props && this.props.ecId || ''}_Supply@7s1nml@${index}`} description={description}/> }
|
|
||||||
</p>
|
|
||||||
{
|
|
||||||
url && (<span className='hrm-init-analysis-item-link wea-f12'>
|
|
||||||
<i className='icon-coms-link'/>
|
|
||||||
<a href={addContentPath(url)} target='_blank' className='hrm-init-analysis-item-link-a'>{names[index]}</a>
|
|
||||||
</span>)
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</QueueAnim>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const Back = props => {
|
|
||||||
const {
|
|
||||||
back
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@dlyq65`} type="primary" icon="left" style={{float:'right',marginTop: 30}} onClick={() => back()}>{getLabel('505587','返回上一步')}</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@inject('hrmInit')
|
|
||||||
@observer
|
|
||||||
export default class AnalysisResult extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmInit
|
|
||||||
} = this.props, {
|
|
||||||
currentIndex,
|
|
||||||
steps,
|
|
||||||
analysis,
|
|
||||||
isInitFinish,
|
|
||||||
hasAnalysisResult,
|
|
||||||
back,
|
|
||||||
initItemNames,
|
|
||||||
} = hrmInit, {
|
|
||||||
items
|
|
||||||
} = steps, {
|
|
||||||
results
|
|
||||||
} = analysis;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-init-analysis'>
|
|
||||||
<div className='wea-f12'>
|
|
||||||
<InitSteps ecId={`${this && this.props && this.props.ecId || ''}_InitSteps@8h7k0n`}
|
|
||||||
currentIndex={currentIndex}
|
|
||||||
items={items}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<Result ecId={`${this && this.props && this.props.ecId || ''}_Result@7h2mle`} results={toJS(results)} names={initItemNames}/>
|
|
||||||
{hasAnalysisResult && isInitFinish && <Back ecId={`${this && this.props && this.props.ecId || ''}_Back@29u6g0`} back={() => back()}/>}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,299 +0,0 @@
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
Button,
|
|
||||||
Popconfirm
|
|
||||||
} from 'antd';
|
|
||||||
import {
|
|
||||||
WeaFormItem,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
WeaSlideModal,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaSwitch
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
DistanceToPeak,
|
|
||||||
} from '../../public/learn.js';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
const InitButton = props => {
|
|
||||||
const {
|
|
||||||
handleClick,
|
|
||||||
confirm,
|
|
||||||
cancel,
|
|
||||||
visible,
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-init-btnparent'>
|
|
||||||
<Popconfirm ecId={`${this && this.props && this.props.ecId || ''}_Popconfirm@yvyjv7`} title={getLabel('505588','本次操作将会覆盖上一次初始化的数据,确认覆盖?')}
|
|
||||||
onConfirm={confirm}
|
|
||||||
onCancel={cancel}
|
|
||||||
placement='bottom'
|
|
||||||
visible={visible}
|
|
||||||
>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bn6wcl`}
|
|
||||||
type="primary"
|
|
||||||
className='hrm-init-btnparent-button'
|
|
||||||
onClick={() => handleClick()}
|
|
||||||
>
|
|
||||||
{getLabel('505589',"开始初始化")}
|
|
||||||
</Button>
|
|
||||||
</Popconfirm>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const Guide = props => {
|
|
||||||
const {
|
|
||||||
visible,
|
|
||||||
open,
|
|
||||||
close,
|
|
||||||
datas,
|
|
||||||
top,
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
let width;
|
|
||||||
if (screen) {
|
|
||||||
width = (screen.width >= 1920) ? 400 : 300
|
|
||||||
} else {
|
|
||||||
width = 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='guide' style={{right:window.e9_locale.userLanguage === 8 && -170}}>
|
|
||||||
<div onClick={open} className='wrapper'>
|
|
||||||
<div className='icon float'>
|
|
||||||
<i className='icon-coms-investigate' />
|
|
||||||
</div>
|
|
||||||
<div className='title wea-f14 float'>{
|
|
||||||
getLabel('505590','初始化说明')
|
|
||||||
}</div>
|
|
||||||
</div>
|
|
||||||
<WeaSlideModal ecId={`${this && this.props && this.props.ecId || ''}_WeaSlideModal@8uw1rd`}
|
|
||||||
visible={visible}
|
|
||||||
top={top}
|
|
||||||
width={width}
|
|
||||||
height={100}
|
|
||||||
direction={'right'}
|
|
||||||
measureY={'%'}
|
|
||||||
title={<SlideModalTitle ecId={`${this && this.props && this.props.ecId || ''}_SlideModalTitle@4va3qy`} close={close}/>}
|
|
||||||
content={<SlideModalContent ecId={`${this && this.props && this.props.ecId || ''}_SlideModalContent@yo3u6c`} datas={datas}/>}
|
|
||||||
onClose={close}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const SlideModalTitle = props => {
|
|
||||||
const {
|
|
||||||
close
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='header-title'>
|
|
||||||
<span className='header-title-icon' onClick={close}>
|
|
||||||
<i className='icon-coms-Left'/>
|
|
||||||
</span>
|
|
||||||
<span>{getLabel('505590','初始化说明')}</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const SlideModalContent = props => {
|
|
||||||
const {
|
|
||||||
datas
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{
|
|
||||||
datas.map((data, index) => {
|
|
||||||
const {
|
|
||||||
title,
|
|
||||||
desc,
|
|
||||||
key
|
|
||||||
} = data;
|
|
||||||
|
|
||||||
const len = desc.length;
|
|
||||||
let c;
|
|
||||||
if(len > 1){
|
|
||||||
c = (d,i) => <p>{`${i + 1}. ${d}`}</p>
|
|
||||||
}else{
|
|
||||||
c = (d,i) => <p>{d}</p>
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div key={key}>
|
|
||||||
<div className='slide-modal'>
|
|
||||||
<HorizontalLine ecId={`${this && this.props && this.props.ecId || ''}_HorizontalLine@1mcsvh@${index}`} />
|
|
||||||
<span className='slide-modal-title'>
|
|
||||||
<i className='icon-coms-task-list' />
|
|
||||||
{title}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className='slide-modal-content'>{
|
|
||||||
desc.map( (d,i) => c(d,i))
|
|
||||||
}</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const HorizontalLine = props => {
|
|
||||||
return (
|
|
||||||
<div className='line'></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@inject('hrmInit')
|
|
||||||
@observer
|
|
||||||
export default class InitForm extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmInit.getFormMaterial();
|
|
||||||
}
|
|
||||||
|
|
||||||
getTransverseSiblingComponents = (params) => {
|
|
||||||
const {
|
|
||||||
form,
|
|
||||||
items
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
if (!items) return
|
|
||||||
|
|
||||||
let timerRanger;
|
|
||||||
|
|
||||||
items.map((item, index) => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
if (domkey[0] === 'restTime_start') {
|
|
||||||
//【排除休息时间】开关的状态值
|
|
||||||
const excludeRestTime = form.getFormParams().excludeRestTime;
|
|
||||||
|
|
||||||
if (excludeRestTime !== '1') return;
|
|
||||||
|
|
||||||
timerRanger = (
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@0ru0vo@${index}`}
|
|
||||||
label={''}
|
|
||||||
colon={false}
|
|
||||||
labelCol={{span: 0}}
|
|
||||||
wrapperCol={{span: 24}}
|
|
||||||
error={form.getError(item) }
|
|
||||||
tipPosition='bottom'
|
|
||||||
style={{position: 'absolute', top: 0 ,left: 58}}
|
|
||||||
>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@rar62w@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const transverseSiblingComponents = {
|
|
||||||
'excludeRestTime': timerRanger,
|
|
||||||
};
|
|
||||||
|
|
||||||
return transverseSiblingComponents;
|
|
||||||
}
|
|
||||||
|
|
||||||
getTransverseSecondComponent = (conditions) => {
|
|
||||||
if (conditions.length === 0) return;
|
|
||||||
|
|
||||||
let transverseSecondComponents = [];
|
|
||||||
|
|
||||||
conditions[0].items.map(item => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
if (['restTime_start'].includes(domkey[0])) {
|
|
||||||
transverseSecondComponents.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return transverseSecondComponents
|
|
||||||
}
|
|
||||||
|
|
||||||
getDistanceToPeak = (distance) => {
|
|
||||||
const {
|
|
||||||
hrmInit: store
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const {
|
|
||||||
setDistanceToPeak
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
setDistanceToPeak(distance);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmInit
|
|
||||||
} = this.props, {
|
|
||||||
formConfig,
|
|
||||||
formElements,
|
|
||||||
hasInitButton,
|
|
||||||
handleInitButtonClick,
|
|
||||||
errors,
|
|
||||||
confirm,
|
|
||||||
cancel,
|
|
||||||
switchSlideModal,
|
|
||||||
close,
|
|
||||||
popConfirmVisible,
|
|
||||||
slideModalVisible,
|
|
||||||
slideModalDatas,
|
|
||||||
slideTop,
|
|
||||||
} = hrmInit, {
|
|
||||||
form,
|
|
||||||
conditions,
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-init-form'>
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@ndpw8o`}
|
|
||||||
{...formElements}
|
|
||||||
{...formConfig}
|
|
||||||
transverseSiblingComponents={this.getTransverseSiblingComponents({
|
|
||||||
form,
|
|
||||||
items: this.getTransverseSecondComponent(conditions),
|
|
||||||
})}
|
|
||||||
wrapperStyle={{padding: 0}}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
errors={errors}
|
|
||||||
/>
|
|
||||||
{
|
|
||||||
hasInitButton && <InitButton ecId={`${this && this.props && this.props.ecId || ''}_InitButton@56cdfm`}
|
|
||||||
handleClick={handleInitButtonClick}
|
|
||||||
confirm={() => confirm()}
|
|
||||||
cancel={() => cancel()}
|
|
||||||
visible={popConfirmVisible}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
hasInitButton && <Guide ecId={`${this && this.props && this.props.ecId || ''}_Guide@u43oq9`}
|
|
||||||
visible={slideModalVisible}
|
|
||||||
open={() => switchSlideModal()}
|
|
||||||
close={() => close()}
|
|
||||||
datas={slideModalDatas}
|
|
||||||
top={slideTop}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
<DistanceToPeak ecId={`${this && this.props && this.props.ecId || ''}_DistanceToPeak@ye3y6n`} requestDistanceToPeak={distance => this.getDistanceToPeak(distance)}/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaRightMenu,
|
|
||||||
} from 'ecCom';
|
|
||||||
|
|
||||||
import InitForm from './InitForm';
|
|
||||||
import AnalysisResult from './AnalysisResult';
|
|
||||||
|
|
||||||
@inject('hrmInit')
|
|
||||||
@observer
|
|
||||||
class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmInit.getRightMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
topProps,
|
|
||||||
toploading,
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas,
|
|
||||||
hasInit,
|
|
||||||
} = this.props.hrmInit;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@ff4n4w`}
|
|
||||||
{...topProps}
|
|
||||||
loading={toploading}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@g1rp54`} datas={dropMenuDatas}>
|
|
||||||
{
|
|
||||||
hasInit ? <AnalysisResult ecId={`${this && this.props && this.props.ecId || ''}_AnalysisResult@zfqlrg`} /> : <InitForm ecId={`${this && this.props && this.props.ecId || ''}_InitForm@yq1l4h`} />
|
|
||||||
}
|
|
||||||
</WeaRightMenu>
|
|
||||||
</WeaTop>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Top;
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
||||||
import React ,{
|
|
||||||
Component
|
|
||||||
}from 'react';
|
|
||||||
import {
|
|
||||||
WeaTools,
|
|
||||||
WeaDialog,
|
|
||||||
WeaLocaleProvider
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
Button,
|
|
||||||
message
|
|
||||||
} from 'antd';
|
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
const check = (params) => {
|
|
||||||
return WeaTools.callApi('/api/kq/setupwizard/checkNeedInit', 'GET', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const checkNeedInit = (onOk) => {
|
|
||||||
check().then(datas => {
|
|
||||||
const {
|
|
||||||
status,
|
|
||||||
message,
|
|
||||||
} = datas;
|
|
||||||
|
|
||||||
if (status === "2") {
|
|
||||||
const div = document.createElement("div");
|
|
||||||
document.body.appendChild(div);
|
|
||||||
ReactDOM.render(<UpgrageConfirm ecId={`${this && this.props && this.props.ecId || ''}_UpgrageConfirm@c8klle`} message={message} onOk={onOk}/>, div);
|
|
||||||
} else {
|
|
||||||
onOk();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
message.warning();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
class UpgrageConfirm extends Component{
|
|
||||||
constructor(props){
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
visible:false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.setState({visible:true});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleOk = () => {
|
|
||||||
this.props.onOk && this.props.onOk();
|
|
||||||
this.handleCancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleCancel = () => {
|
|
||||||
this.setState({visible:false});
|
|
||||||
}
|
|
||||||
|
|
||||||
getButtons = () => {
|
|
||||||
return[
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@7ef8ou`} onClick={this.handleOk} type="primary">{getLabel(33703, '确定')}</Button>,
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
visible
|
|
||||||
} = this.state, {
|
|
||||||
message
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const pstyle = {
|
|
||||||
display: "table-cell",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
padding: "0 15px"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!visible) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@a5c9nv`}
|
|
||||||
hasScroll
|
|
||||||
title={getLabel(131329, '信息确认')}
|
|
||||||
icon="icon-coms02-Warning"
|
|
||||||
iconBgcolor="#ff9900"
|
|
||||||
visible={visible}
|
|
||||||
style={{width:380,height:100}}
|
|
||||||
onCancel={this.handleCancel}
|
|
||||||
buttons={this.getButtons()}
|
|
||||||
>
|
|
||||||
<div style={{height:"100%",display: "table",margin: "0 auto"}}>
|
|
||||||
<p style={pstyle} dangerouslySetInnerHTML={{__html: message}} />
|
|
||||||
</div>
|
|
||||||
</WeaDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
import '../../style/init.less'
|
|
||||||
|
|
||||||
import Top from './Top';
|
|
||||||
|
|
||||||
@inject('hrmInit')
|
|
||||||
@observer
|
|
||||||
export default class Init extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
this.props.hrmInit.refresh((domain) => domain.newForm());
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmInit.getPermissionInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.props.hrmInit.refresh((domain) => domain.resetForm());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmInit,
|
|
||||||
} = this.props, {
|
|
||||||
pageAccessPermission
|
|
||||||
} = hrmInit, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = pageAccessPermission;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@t4gws4`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@87vbbn`} />
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@p6rcho`} />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaDialog, WeaNewScroll} from 'ecCom';
|
|
||||||
import {FormInfo} from '../../../hrmComsPublic/index';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class CreateGroup extends Component{
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {createFieldDefineDialogProps, formTarget, feildDefineFormItemRender} = store;
|
|
||||||
|
|
||||||
const {
|
|
||||||
createFieldDefineForm: form,
|
|
||||||
createFieldDefineFormFields: fields
|
|
||||||
} = formTarget;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@8v63w6`} {...createFieldDefineDialogProps} key={new Date().getTime()}>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@541rr8`} height={'100%'}>
|
|
||||||
<FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@g0ptvy`}
|
|
||||||
className='formComponent'
|
|
||||||
center={false}
|
|
||||||
form={form}
|
|
||||||
formFields={fields}
|
|
||||||
itemRender={feildDefineFormItemRender}/>
|
|
||||||
</WeaNewScroll>
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaRightMenu, WeaTableEditable} from 'ecCom';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class FieldDataList extends Component{
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
resize: new Date().getTime()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
window.addEventListener('resize', this.resizeHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
window.removeEventListener('resize', this.resizeHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
resizeHandle = (e) => {
|
|
||||||
this.setState({
|
|
||||||
resize: new Date().getTime()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {resize} = this.state;
|
|
||||||
const {
|
|
||||||
rightMenu,
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {fieldListTableProps} = store;
|
|
||||||
|
|
||||||
let tableProps = {};
|
|
||||||
if (this.tabDom) {
|
|
||||||
tableProps = {
|
|
||||||
scroll: {
|
|
||||||
y: this.tabDom.offsetHeight - 40,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="tabPane" ref={dom => {this.tabDom = dom}}>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@nv7532`} datas={rightMenu}>
|
|
||||||
<WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@cfv3an`} {...fieldListTableProps} tableProps={tableProps}/>
|
|
||||||
</WeaRightMenu>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {Tabs} from '../../../hrmComsPublic/index';
|
|
||||||
import FieldDataList from './FieldDataList.js';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class FieldTabs extends Component{
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {mainTabProps} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Tabs ecId={`${this && this.props && this.props.ecId || ''}_Tabs@vwdm59`} {...mainTabProps}>
|
|
||||||
<FieldDataList ecId={`${this && this.props && this.props.ecId || ''}_FieldDataList@qitkvh`} />
|
|
||||||
</Tabs>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaDialog, WeaTableEditable} from 'ecCom';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class GroupListSetting extends Component{
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props;
|
|
||||||
const {groupListSettingDialogProps, groupListTableProps} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@h1w7s0`} {...groupListSettingDialogProps}>
|
|
||||||
<WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@q1ppvf`} {...groupListTableProps}/>
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
import '../../style/kqMonthReportSetting.less';
|
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {inject,observer} from 'mobx-react';
|
|
||||||
import {WeaTop, WeaAlertPage} from 'ecCom';
|
|
||||||
import {i18n} from '../../public/i18n';
|
|
||||||
import {Spin} from 'antd'
|
|
||||||
import FieldTabs from './FieldTabs.js';
|
|
||||||
import CreateFieldDefine from './CreateFieldDefine.js';
|
|
||||||
import CreateGroup from './CreateGroup.js';
|
|
||||||
import GroupListSetting from './GroupListSetting.js';
|
|
||||||
|
|
||||||
@inject('kqMonthReportSetting')
|
|
||||||
@observer
|
|
||||||
export default class KQMonthReportSetting extends Component{
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
kqMonthReportSetting: store
|
|
||||||
} = this.props;
|
|
||||||
store.checkAuthorized('kq/reportFieldDefine', null, store.init, null, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {
|
|
||||||
kqMonthReportSetting: store
|
|
||||||
} = this.props;
|
|
||||||
const {
|
|
||||||
containerInitFinished,
|
|
||||||
loading,
|
|
||||||
topProps
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="hrm_module_container kqMonthReportSetting">
|
|
||||||
{
|
|
||||||
containerInitFinished.init && containerInitFinished.authorized &&
|
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4h8le8`} spinning = {loading}>
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@u7retr`} {...topProps}>
|
|
||||||
<FieldTabs ecId={`${this && this.props && this.props.ecId || ''}_FieldTabs@79s71v`} store={store} />
|
|
||||||
<CreateFieldDefine ecId={`${this && this.props && this.props.ecId || ''}_CreateFieldDefine@dizbxs`} store={store} />
|
|
||||||
<CreateGroup ecId={`${this && this.props && this.props.ecId || ''}_CreateGroup@em7d7j`} store={store} />
|
|
||||||
<GroupListSetting ecId={`${this && this.props && this.props.ecId || ''}_GroupListSetting@n4v9ye`} store={store} />
|
|
||||||
</WeaTop>
|
|
||||||
</Spin>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
containerInitFinished.init && !containerInitFinished.authorized &&
|
|
||||||
<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@pwskl5`}>
|
|
||||||
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
|
|
||||||
</WeaAlertPage>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,364 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaFormItem,
|
|
||||||
WeaInputNumber,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {i18n} from '../../public/i18n.js'
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
class BalanceConversionRules extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
//头部
|
|
||||||
getHeader = () => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
conversionRules,
|
|
||||||
dialog,
|
|
||||||
setTimeInterval,
|
|
||||||
} = store, {
|
|
||||||
timeInterval
|
|
||||||
} = conversionRules, {
|
|
||||||
form,
|
|
||||||
isEnable
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
const {
|
|
||||||
distributionMode, //余额发放方式
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='hrm-customized-input' style={{borderBottom: '1px solid #eee',marginBottom: 10,paddingBottom: 10}}>
|
|
||||||
<span style={{marginRight: 3}}>
|
|
||||||
<i className='icon-coms-Tile' />
|
|
||||||
<b style={{marginLeft: 5}}>
|
|
||||||
{ distributionMode === '2' ? i18n.label['527582'] : getLabel('505549',"工龄")}
|
|
||||||
{`${getLabel('505550',"区间")} : `}
|
|
||||||
</b>
|
|
||||||
</span>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@ty2szd`}
|
|
||||||
min={0}
|
|
||||||
disabled={isEnable === '0' ? true :false}
|
|
||||||
value={timeInterval}
|
|
||||||
onChange={val => setTimeInterval(val)}/>
|
|
||||||
<span>
|
|
||||||
<b>{i18n.label['527583']}</b>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getBalancePaymentMethods = () => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
conversionRules,
|
|
||||||
dialog,
|
|
||||||
changeBalanceConversionRules,
|
|
||||||
delBalanceConversionRule,
|
|
||||||
} = store, {
|
|
||||||
balanceConversionRules,
|
|
||||||
unit
|
|
||||||
} = conversionRules, {
|
|
||||||
form,
|
|
||||||
isEnable,
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
const {
|
|
||||||
distributionMode, //余额发放方式
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
const balancePaymentMethods = [];
|
|
||||||
|
|
||||||
balanceConversionRules.map((balanceConversionRule, index) => {
|
|
||||||
const {
|
|
||||||
timePoint,
|
|
||||||
amount
|
|
||||||
} = balanceConversionRule;
|
|
||||||
|
|
||||||
balancePaymentMethods.push(
|
|
||||||
<div className='hrm-customized-input' style={{position:'relative'}}>
|
|
||||||
<span>
|
|
||||||
{ distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")}
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{`${index === 0 ? '<' : '≥'}`}
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{`${[0,1].includes(index) ? 1 : timePoint}${getLabel('505552',"年")} , ` }
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{getLabel('505551',"享有")}
|
|
||||||
</span>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@jmr30e@${index}`}
|
|
||||||
viewAttr={3}
|
|
||||||
value={amount}
|
|
||||||
min={0}
|
|
||||||
disabled={isEnable === '0' ? true :false}
|
|
||||||
onChange={val => changeBalanceConversionRules(index, val)}/>
|
|
||||||
<span>
|
|
||||||
|
|
||||||
{`${unit ? unit : getLabel(505553,'天')}${window.e9_locale.userLanguage == '7'? '' : ' '}${i18n.label['527585']}`}
|
|
||||||
</span>
|
|
||||||
{( (isEnable === '1') && (index > 1) && index === (balanceConversionRules.length - 1) ) && <span className='wea-f14' style={{position:'absolute',top:7, marginLeft: 10}} onClick={() =>delBalanceConversionRule()}>
|
|
||||||
<i className='icon-coms-Clear hrm-del-icon' />
|
|
||||||
</span>}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return balancePaymentMethods;
|
|
||||||
}
|
|
||||||
|
|
||||||
addRule = () => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
addBalanceConversionRule,
|
|
||||||
dialog
|
|
||||||
} = store, {
|
|
||||||
isEnable
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
if (isEnable === '0') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span className='holiday-link' onClick={addBalanceConversionRule}>
|
|
||||||
<i className='icon-coms-Add-to-o'/>
|
|
||||||
<span style={{marginLeft: 5}}>{getLabel('505555',"添加规则")}</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (<div style={{padding:15, border: '1px solid #D9D9D9'}}>
|
|
||||||
{
|
|
||||||
this.getHeader()
|
|
||||||
}
|
|
||||||
{
|
|
||||||
this.getBalancePaymentMethods()
|
|
||||||
}
|
|
||||||
{
|
|
||||||
this.addRule()
|
|
||||||
}
|
|
||||||
</div>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@observer
|
|
||||||
class MixBalanceConversionRulesNew extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getHeader = () => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
dialog,
|
|
||||||
conversionRules
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = dialog, {
|
|
||||||
unit: ut
|
|
||||||
} = conversionRules;
|
|
||||||
|
|
||||||
const labels = [getLabel('505549', "工龄"), getLabel('505548', "司龄"), getLabel('505556', "法定年假"), getLabel('505557', "福利年假")];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{padding: '12px 0', backgroundColor:'#eee' }}>
|
|
||||||
{
|
|
||||||
labels.map( (label,index) => {
|
|
||||||
let unit;
|
|
||||||
if([0,1].includes(index)){
|
|
||||||
unit = getLabel('505552',"年");
|
|
||||||
}else{
|
|
||||||
unit = ut ? ut : getLabel(505553,'天');
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div className='hrm-over-flow' style={{display:'inline-block', width: [0,1].includes(index) ? 70 : 97,textAlign: 'center' }} title={`${label}(${unit})`}>
|
|
||||||
<i className='icon-coms-Tile'/>
|
|
||||||
<span style={{marginLeft: 5}}>{`${label}(${unit})`}</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
getBalancePaymentMethods = () => {
|
|
||||||
const {
|
|
||||||
conversionRules,
|
|
||||||
changeEntryTime, //司龄输入框事件
|
|
||||||
changeWorkYear, //工龄输入框事件
|
|
||||||
changeLegalAmount, //法定年假输入框事件
|
|
||||||
changeWelfareAmount, //福利年假输入框事件
|
|
||||||
delBalanceConversionRule,
|
|
||||||
dialog
|
|
||||||
} = this.props.store, {
|
|
||||||
mixBalanceConversionRules, //工龄+司龄余额发放规则
|
|
||||||
} = conversionRules, {
|
|
||||||
isEnable
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
const balancePaymentMethods = [];
|
|
||||||
|
|
||||||
//工龄、司龄列
|
|
||||||
const ageInputNumber = (params) => {
|
|
||||||
const {
|
|
||||||
value,
|
|
||||||
handleChange
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span>
|
|
||||||
<span><b>≥</b></span>
|
|
||||||
<span style={{display: 'inline-block',width: 45,marginLeft: 5}}>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@5vrbtr`}
|
|
||||||
viewAttr={3}
|
|
||||||
min={0}
|
|
||||||
disabled={isEnable === '0' ? true :false}
|
|
||||||
value={value}
|
|
||||||
onChange={val => handleChange(val)}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
//法定年假、福利年假列
|
|
||||||
const balanceInputNumber = (params) => {
|
|
||||||
const {
|
|
||||||
value,
|
|
||||||
handleChange
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span style={{display: 'inline-block',width: 75}}>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@3gpcmo`}
|
|
||||||
viewAttr={3}
|
|
||||||
min={0}
|
|
||||||
disabled={isEnable === '0' ? true :false}
|
|
||||||
value={value}
|
|
||||||
onChange={val => handleChange(val)}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
//遍历混合余额发放规则
|
|
||||||
mixBalanceConversionRules.map((mixBalanceConversionRule, outsideIndex) => {
|
|
||||||
const {
|
|
||||||
entryTime, //司龄
|
|
||||||
workYear, //工龄
|
|
||||||
legalAmount, //法定年假
|
|
||||||
welfareAmount, //福利年假
|
|
||||||
} = mixBalanceConversionRule;
|
|
||||||
|
|
||||||
//outsideIndex: 行索引值
|
|
||||||
balancePaymentMethods.push(
|
|
||||||
<div style={{lineHeight: '45px',borderBottom: '1px solid #eee',position:'relative' }}>
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
ageInputNumber({
|
|
||||||
value: workYear,
|
|
||||||
handleChange: (val) => changeWorkYear(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 15}}>
|
|
||||||
{
|
|
||||||
ageInputNumber({
|
|
||||||
value: entryTime,
|
|
||||||
handleChange: (val) => changeEntryTime(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 20}}>
|
|
||||||
{
|
|
||||||
balanceInputNumber({
|
|
||||||
value: legalAmount,
|
|
||||||
handleChange: (val) => changeLegalAmount(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 23}}>
|
|
||||||
{
|
|
||||||
balanceInputNumber({
|
|
||||||
value: welfareAmount,
|
|
||||||
handleChange: (val) => changeWelfareAmount(outsideIndex, val)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
{
|
|
||||||
(isEnable === '1' && outsideIndex > 0 && outsideIndex === (mixBalanceConversionRules.length - 1) ) && (
|
|
||||||
<span style={{position: 'absolute',right: -10,top: 2}} className='wea-f14' onClick={() => delBalanceConversionRule({type:'mix'}) }>
|
|
||||||
<i className='icon-coms-Clear hrm-del-icon' />
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return balancePaymentMethods
|
|
||||||
}
|
|
||||||
|
|
||||||
addRule = () => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
addBalanceConversionRule,
|
|
||||||
dialog
|
|
||||||
} = store, {
|
|
||||||
isEnable
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
if (isEnable === '0') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span className='holiday-link' style={{display: 'inline-block', marginTop: 6}} onClick={() => addBalanceConversionRule({type:'mix'})}>
|
|
||||||
<i className='icon-coms-Add-to-o' />
|
|
||||||
<span style={{marginLeft: 5}}>
|
|
||||||
{getLabel('505555',"添加规则")}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div style={{padding:15, border: '1px solid #D9D9D9'}}>
|
|
||||||
<div style={{clear:'both',marginTop: 8}}>
|
|
||||||
{
|
|
||||||
this.getHeader()
|
|
||||||
}
|
|
||||||
{
|
|
||||||
this.getBalancePaymentMethods()
|
|
||||||
}
|
|
||||||
{
|
|
||||||
this.addRule()
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
BalanceConversionRules,
|
|
||||||
MixBalanceConversionRulesNew,
|
|
||||||
}
|
|
||||||
|
|
@ -1,227 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaSwitch
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
WeaFormItem,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
BalanceConversionRules,
|
|
||||||
MixBalanceConversionRulesNew
|
|
||||||
} from './BalanceConversionRules.js';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class DialogForm extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleFormChange = (data) => {
|
|
||||||
const key = Object.keys(data)[0];
|
|
||||||
const value = data[key].value;
|
|
||||||
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
dialog,
|
|
||||||
getUnitName,
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
(key === 'scopeType' && value === '0') && ['scopeValue'].map(key => {
|
|
||||||
form.updateFields({
|
|
||||||
[key]: []
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
(key === 'distributionMode' && !['2', '3', '6'].includes(value)) && ['resetBalanceConversionRules'].map(f => {
|
|
||||||
this.props.store[f]()
|
|
||||||
});
|
|
||||||
|
|
||||||
(key === 'distributionMode' && value !== '4') && ['annualAmount'].map(key => {
|
|
||||||
this.updateFormFields(key, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
(key === 'validityRule' && value !== '3') && ['expirationMonth', 'expirationDay'].map(key => {
|
|
||||||
this.updateFormFields(key, '1');
|
|
||||||
});
|
|
||||||
|
|
||||||
(key === 'extensionEnable' && value === '0') && ['extendedDays'].map((key, index) => {
|
|
||||||
this.updateFormFields(key, 90);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (key === 'typeId') {
|
|
||||||
getUnitName(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
updateFormFields = (key, val) => {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
dialog
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
form.updateFields({
|
|
||||||
[key]: {
|
|
||||||
value: val
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取同一行的表单元素
|
|
||||||
getTransverseSiblingComponents = (params) => {
|
|
||||||
const {
|
|
||||||
items,
|
|
||||||
form
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
//当没有表单元素传入时,直接返回
|
|
||||||
if (!items) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let extendedDays, expirationDay;
|
|
||||||
|
|
||||||
items.map((item, index) => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
if (domkey[0] === 'extendedDays') {
|
|
||||||
const {
|
|
||||||
extensionEnable
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
if (parseInt(extensionEnable) === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//同一行的第二个表单元素
|
|
||||||
extendedDays = (
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@7uxosi@${index}`}
|
|
||||||
label={`${getLabel('505558',"超过有效期")}`}
|
|
||||||
colon={false}
|
|
||||||
labelCol={{span: 5}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
error={form.getError(item) }
|
|
||||||
tipPosition='bottom'
|
|
||||||
style={{float:'right',width:'86%',marginBottom: 0}}
|
|
||||||
>
|
|
||||||
<div style={{display: 'inline-block',width: 60,marginRight:13}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@idxz8e@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</div>
|
|
||||||
{`${getLabel('505553',"天")}${getLabel('505559',"内")}${getLabel('505560',"可继续使用")}`}
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (domkey[0] === 'expirationDay') {
|
|
||||||
expirationDay = (
|
|
||||||
<div style={{marginLeft: 10, display:'inline-block'}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@05qzjm@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const transverseSiblingComponents = {
|
|
||||||
'extensionEnable': extendedDays,
|
|
||||||
'expirationMonth': expirationDay
|
|
||||||
};
|
|
||||||
|
|
||||||
return transverseSiblingComponents;
|
|
||||||
}
|
|
||||||
|
|
||||||
getTransverseSecondComponent = (conditions) => {
|
|
||||||
if (conditions.length === 0) return;
|
|
||||||
|
|
||||||
let transverseSecondComponents = [];
|
|
||||||
|
|
||||||
conditions[0].items.map(item => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
//extensionEnable & extendedDays
|
|
||||||
//expirationMonth & expirationDay
|
|
||||||
if (['extendedDays', 'expirationDay'].includes(domkey[0])) {
|
|
||||||
transverseSecondComponents.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return transverseSecondComponents
|
|
||||||
}
|
|
||||||
|
|
||||||
//【余额发放方式】开关联动自定义组件
|
|
||||||
getCustomizedComponent = (store) => {
|
|
||||||
const {
|
|
||||||
dialog
|
|
||||||
} = store, {
|
|
||||||
form
|
|
||||||
} = dialog, {
|
|
||||||
distributionMode
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
|
|
||||||
if (!['2', '3', '6'].includes(distributionMode)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const c = {
|
|
||||||
'distributionMode': distributionMode !== '6' ? <BalanceConversionRules ecId={`${this && this.props && this.props.ecId || ''}_BalanceConversionRules@2oh0j2`} store={store}/> : <MixBalanceConversionRulesNew ecId={`${this && this.props && this.props.ecId || ''}_MixBalanceConversionRulesNew@9ystxo`} store={store}/>
|
|
||||||
}
|
|
||||||
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
store
|
|
||||||
} = this.props, {
|
|
||||||
dialog,
|
|
||||||
FORMCONFIG,
|
|
||||||
staticTips,
|
|
||||||
dynamicTips,
|
|
||||||
renderBlacklist,
|
|
||||||
} = store, {
|
|
||||||
form,
|
|
||||||
conditions,
|
|
||||||
} = dialog;
|
|
||||||
|
|
||||||
//同行的第二个表单元素
|
|
||||||
const transverseSecondComponent = this.getTransverseSecondComponent(conditions);
|
|
||||||
|
|
||||||
//横向复合表单元素
|
|
||||||
const transverseSiblingComponents = this.getTransverseSiblingComponents({
|
|
||||||
form,
|
|
||||||
items: transverseSecondComponent,
|
|
||||||
})
|
|
||||||
|
|
||||||
//定制组件
|
|
||||||
const customizations = this.getCustomizedComponent(store);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@ahf6wv`}
|
|
||||||
{...dialog}
|
|
||||||
{...FORMCONFIG}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
staticTips={staticTips}
|
|
||||||
dynamicTips={dynamicTips}
|
|
||||||
renderBlacklist={renderBlacklist}
|
|
||||||
transverseSiblingComponents={transverseSiblingComponents}
|
|
||||||
customizations={customizations}
|
|
||||||
onFormElementsChange={data => this.handleFormChange(data)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
import Top from './Top';
|
|
||||||
import Dialog from './Dialog';
|
|
||||||
|
|
||||||
@inject('hrmNewHolidayRule')
|
|
||||||
@observer
|
|
||||||
export default class NewHolidayRule extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
const {
|
|
||||||
hrmNewHolidayRule: store
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const callback = () => {
|
|
||||||
store.getRightMenu();
|
|
||||||
store.getSearchForm();
|
|
||||||
store.setShowSearchAd(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
store.getPermissionInfo(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmNewHolidayRule: store
|
|
||||||
} = this.props, {
|
|
||||||
permission,
|
|
||||||
} = store, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = permission;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@2pxusp`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@45x72h`} />
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@g08ae3`} store={store}/>
|
|
||||||
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@d6pkqi`} store={store}/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,403 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaDialog,
|
|
||||||
WeaFormItem,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaSwitch
|
|
||||||
} from 'comsMobx';
|
|
||||||
import DirtyComponent from './DirtyComponent.js';
|
|
||||||
import {
|
|
||||||
CompositeForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn.js';
|
|
||||||
import {
|
|
||||||
getDialogButtons
|
|
||||||
} from '../../util/save-time-util.js';
|
|
||||||
import RestTime from './RestTime';
|
|
||||||
import Form from './Form'
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmOvertimeRule')
|
|
||||||
@observer
|
|
||||||
class Dialog extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleCancel = () => {
|
|
||||||
this.props.hrmOvertimeRule.closeDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
getBtnConfigDatas = () => {
|
|
||||||
const {
|
|
||||||
overtimeRuleFormStore: { saveForm, formStore: { loading } }
|
|
||||||
} = this.props.hrmOvertimeRule;
|
|
||||||
|
|
||||||
const btnDatas = [{
|
|
||||||
name: getLabel('505564', '保存'),
|
|
||||||
disabled: loading,
|
|
||||||
onBtnClick: saveForm
|
|
||||||
}];
|
|
||||||
|
|
||||||
return btnDatas
|
|
||||||
}
|
|
||||||
|
|
||||||
getDynamicFields = () => {
|
|
||||||
//【工作日加班】表单动态域的配置项
|
|
||||||
const workTime = [{
|
|
||||||
passiveKey: 'startTime2', //加班起算时间
|
|
||||||
activeKey: 'computingMode2', //加班方式计算
|
|
||||||
showValue: '1,2,3'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'minimumLen2', //最小加班时长
|
|
||||||
activeKey: 'computingMode2', //加班方式计算
|
|
||||||
showValue: '1,2,3'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'computingMode2', //加班方式计算
|
|
||||||
activeKey: 'overtimeEnable2', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'startTime2', //加班起算时间
|
|
||||||
activeKey: 'overtimeEnable2', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'minimumLen2', //最小加班时长
|
|
||||||
activeKey: 'overtimeEnable2', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'paidLeaveEnable2', //转为调休余额
|
|
||||||
activeKey: 'overtimeEnable2', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfOvertime2', //加班时长
|
|
||||||
activeKey: 'paidLeaveEnable2', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfLeave2', //调休时长
|
|
||||||
activeKey: 'paidLeaveEnable2', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}];
|
|
||||||
|
|
||||||
//【休息日加班】表单动态域的配置项
|
|
||||||
const restTime = [{
|
|
||||||
passiveKey: 'minimumLen3', //最小加班时长
|
|
||||||
activeKey: 'computingMode3', //加班方式计算
|
|
||||||
showValue: '1,2,3'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'computingMode3', //加班方式计算
|
|
||||||
activeKey: 'overtimeEnable3', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'minimumLen3', //最小加班时长
|
|
||||||
activeKey: 'overtimeEnable3', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'paidLeaveEnable3', //转为调休余额
|
|
||||||
activeKey: 'overtimeEnable3', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'hasRestTime3', //排除休息时间
|
|
||||||
activeKey: 'overtimeEnable3', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfOvertime3', //加班时长
|
|
||||||
activeKey: 'paidLeaveEnable3', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfLeave3', //调休时长
|
|
||||||
activeKey: 'paidLeaveEnable3', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}];
|
|
||||||
|
|
||||||
//【节假日加班】表单动态域的配置项
|
|
||||||
const holidayTime = [{
|
|
||||||
passiveKey: 'minimumLen1', //最小加班时长
|
|
||||||
activeKey: 'computingMode1', //加班方式计算
|
|
||||||
showValue: '1,2,3'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'computingMode1', //加班方式计算
|
|
||||||
activeKey: 'overtimeEnable1', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'minimumLen1', //最小加班时长
|
|
||||||
activeKey: 'overtimeEnable1', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'paidLeaveEnable1', //转为调休余额
|
|
||||||
activeKey: 'overtimeEnable1', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'hasRestTime1', //排除休息时间
|
|
||||||
activeKey: 'overtimeEnable1', //允许加班
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfOvertime1', //加班时长
|
|
||||||
activeKey: 'paidLeaveEnable1', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}, {
|
|
||||||
passiveKey: 'lenOfLeave1', //调休时长
|
|
||||||
activeKey: 'paidLeaveEnable1', //转为调休余额
|
|
||||||
showValue: '1'
|
|
||||||
}];
|
|
||||||
|
|
||||||
const dynamicFields = [...workTime, ...restTime, ...holidayTime];
|
|
||||||
|
|
||||||
return dynamicFields;
|
|
||||||
}
|
|
||||||
|
|
||||||
getDirtyKeys = () => {
|
|
||||||
return ['startTime2', 'minimumLen2', 'minimumLen3', 'minimumLen1'];
|
|
||||||
}
|
|
||||||
|
|
||||||
handleFormChange = (form, cb) => {
|
|
||||||
const key = Object.keys(cb)[0];
|
|
||||||
//关闭【允许加班】开关后,重置【加班方式计算】,包括:radio select、加班起算时间和最小加班时长
|
|
||||||
//勾掉【转为调休余额】时,重置调休比例。
|
|
||||||
if (cb[key].value === '0') {
|
|
||||||
[2, 3, 1].map(v => {
|
|
||||||
if (key === `overtimeEnable${v}`) {
|
|
||||||
['computingMode', 'paidLeaveEnable', 'minimumLen', 'lenOfOvertime', 'lenOfLeave', 'hasRestTime'].map((key, index) => {
|
|
||||||
let value;
|
|
||||||
if (index === 0) {
|
|
||||||
value = '1';
|
|
||||||
} else if ([1, 5].includes(index)) {
|
|
||||||
value = '0';
|
|
||||||
} else if (index === 2) {
|
|
||||||
value = 30
|
|
||||||
} else {
|
|
||||||
value = 1
|
|
||||||
}
|
|
||||||
form.updateFields({
|
|
||||||
[`${key}${v}`]: {
|
|
||||||
value
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (v === 2) {
|
|
||||||
form.updateFields({
|
|
||||||
[`startTime${v}`]: {
|
|
||||||
value: 30
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if ([3, 1].includes(v)) {
|
|
||||||
this.props.hrmOvertimeRule.resetRestTime(v === 3 ? 'rstTimes' : 'vacationTimes');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (key === `paidLeaveEnable${v}`) {
|
|
||||||
['lenOfOvertime', 'lenOfLeave'].map((key, index) => {
|
|
||||||
form.updateFields({
|
|
||||||
[`${key}${v}`]: {
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (key === `hasRestTime${v}`) {
|
|
||||||
this.props.hrmOvertimeRule.resetRestTime(v === 3 ? 'rstTimes' : 'vacationTimes');
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
getLongitudinalSiblingComponents = (params) => {
|
|
||||||
const {
|
|
||||||
form,
|
|
||||||
items
|
|
||||||
} = params;
|
|
||||||
|
|
||||||
if (items.length === 0) return;
|
|
||||||
|
|
||||||
const all = {};
|
|
||||||
//items为二维数组
|
|
||||||
items.map((oneDimensionalArray, index) => {
|
|
||||||
const innerArray = [];
|
|
||||||
|
|
||||||
const number = (index === 0) ? 2 : (index === 1) ? 3 : 1;
|
|
||||||
|
|
||||||
let lenOfOvertime, lenOfLeave;
|
|
||||||
|
|
||||||
['lenOfOvertime', 'lenOfLeave'].map((key, index) => {
|
|
||||||
const value = form.getFormParams()[`${key}${number}`];
|
|
||||||
if (index === 0) {
|
|
||||||
lenOfOvertime = value
|
|
||||||
} else {
|
|
||||||
lenOfLeave = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
oneDimensionalArray.map((item, index) => {
|
|
||||||
const propertys = {
|
|
||||||
tipPosition: 'bottom',
|
|
||||||
error: form.getError(item),
|
|
||||||
colon: false,
|
|
||||||
};
|
|
||||||
if (index === 0) {
|
|
||||||
Object.assign(propertys, {
|
|
||||||
label: getLabel('505598', "加班时间转调休时间的比例"),
|
|
||||||
labelCol: {
|
|
||||||
span: 17
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
span: 7
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
width: '47%'
|
|
||||||
},
|
|
||||||
errorStyle: {
|
|
||||||
width: 140,
|
|
||||||
marginLeft: -90
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Object.assign(propertys, {
|
|
||||||
label: '',
|
|
||||||
labelCol: {
|
|
||||||
span: 2
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
span: 22
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
width: '48%'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(propertys.style, {
|
|
||||||
float: 'left'
|
|
||||||
})
|
|
||||||
|
|
||||||
innerArray.push(
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@kahqzi@${index}`}
|
|
||||||
{...propertys}
|
|
||||||
>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@nm24zh@${index}`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
{
|
|
||||||
(index === 0)&&<span style={{position:'absolute',top: 5,left: '109%'}}>:</span>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
(index === 1) && <span style={{marginLeft: 12, color:'#999'}}>{`${getLabel('6151',"加班")}${lenOfOvertime ? lenOfOvertime : ''}${getLabel('391',"小时")}, ${getLabel('505599',"转调休")}${lenOfLeave ? lenOfLeave : ''}${getLabel('391',"小时")}`}</span>
|
|
||||||
}
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
Object.assign(all, {
|
|
||||||
[`paidLeaveEnable${number}`]: <div className='hrm-overtime-input' style={{paddingTop: 10}}>{innerArray}</div>
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const longitudinalSiblingComponents = {};
|
|
||||||
|
|
||||||
['paidLeaveEnable2', 'paidLeaveEnable3', 'paidLeaveEnable1'].map(field => {
|
|
||||||
if (form.getFormParams()[field] === '1') {
|
|
||||||
Object.assign(longitudinalSiblingComponents, {
|
|
||||||
[field]: all[field]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return longitudinalSiblingComponents;
|
|
||||||
}
|
|
||||||
|
|
||||||
getLongitudinalSecondComponent = (conditions) => {
|
|
||||||
const longitudinalSecondComponents = [];
|
|
||||||
|
|
||||||
let innerArray = [];
|
|
||||||
|
|
||||||
conditions.map(c => {
|
|
||||||
c.items.map(item => {
|
|
||||||
const {
|
|
||||||
domkey
|
|
||||||
} = item;
|
|
||||||
|
|
||||||
if (['lenOfOvertime2', 'lenOfLeave2', 'lenOfOvertime3', 'lenOfLeave3', 'lenOfOvertime1', 'lenOfLeave1'].includes(domkey[0])) {
|
|
||||||
innerArray.push(item);
|
|
||||||
|
|
||||||
if (innerArray.length === 2) {
|
|
||||||
longitudinalSecondComponents.push(innerArray);
|
|
||||||
innerArray = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return longitudinalSecondComponents;
|
|
||||||
}
|
|
||||||
|
|
||||||
getRenderBlacklist = () => {
|
|
||||||
return ['lenOfOvertime2', 'lenOfLeave2', 'lenOfOvertime3', 'lenOfLeave3', 'lenOfOvertime1', 'lenOfLeave1'];
|
|
||||||
}
|
|
||||||
|
|
||||||
getCustomizedComponent = (form) => {
|
|
||||||
const {
|
|
||||||
hasRestTime3,
|
|
||||||
hasRestTime1,
|
|
||||||
} = form.getFormParams();
|
|
||||||
const {
|
|
||||||
restTime
|
|
||||||
} = this.props.hrmOvertimeRule, {
|
|
||||||
rstTimes,
|
|
||||||
vacationTimes
|
|
||||||
} = restTime
|
|
||||||
|
|
||||||
const customizations = {
|
|
||||||
hasRestTime3: hasRestTime3 === '1' && <RestTime ecId={`${this && this.props && this.props.ecId || ''}_RestTime@ct2h1i`} times={rstTimes} type='rstTimes'/>,
|
|
||||||
hasRestTime1: hasRestTime1 === '1' && <RestTime ecId={`${this && this.props && this.props.ecId || ''}_RestTime@9vbcbi`} times={vacationTimes} type='vacationTimes'/>
|
|
||||||
}
|
|
||||||
|
|
||||||
return customizations;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
dialog,
|
|
||||||
dialogStaticProps,
|
|
||||||
style,
|
|
||||||
formElements,
|
|
||||||
overtimeRuleFormStore
|
|
||||||
} = this.props.hrmOvertimeRule, {
|
|
||||||
title,
|
|
||||||
visible,
|
|
||||||
} = dialog, {
|
|
||||||
form,
|
|
||||||
date,
|
|
||||||
loading,
|
|
||||||
conditions,
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1ee0gz`}
|
|
||||||
title={title}
|
|
||||||
visible={visible}
|
|
||||||
style={style}
|
|
||||||
buttons={getDialogButtons({datas:this.getBtnConfigDatas()})}
|
|
||||||
onCancel={this.handleCancel}
|
|
||||||
{...dialogStaticProps}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
visible && (
|
|
||||||
<div className='overtimeForm'>
|
|
||||||
<Form ecId={`${this && this.props && this.props.ecId || ''}_Form@yi8ny4`} store={overtimeRuleFormStore}/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Dialog
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
import {
|
|
||||||
WeaFormItem,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaSwitch
|
|
||||||
} from 'comsMobx';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
class DirtyComponent extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
getChildren = () => {
|
|
||||||
const {
|
|
||||||
domkey,
|
|
||||||
label,
|
|
||||||
form,
|
|
||||||
item,
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
const stuff = (<div style={{display:'inline-block',width: 60 ,marginRight: 14}}>
|
|
||||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@s24nrm`} fieldConfig={item} form={form} formParams={form.getFormParams()} />
|
|
||||||
</div>);
|
|
||||||
|
|
||||||
if (domkey === 'startTime2') {
|
|
||||||
return (<div>
|
|
||||||
<span style={{marginRight: 8}}>
|
|
||||||
{`${getLabel('505600',"最后一次下班后")}`}
|
|
||||||
</span>
|
|
||||||
{stuff}
|
|
||||||
<span>
|
|
||||||
{`${getLabel('15049',"分钟")}, ${getLabel('505601',"开始计算加班")}` }
|
|
||||||
</span>
|
|
||||||
</div>)
|
|
||||||
} else {
|
|
||||||
return (<div>
|
|
||||||
{stuff}
|
|
||||||
<span>
|
|
||||||
{`${getLabel('15049',"分钟")}`}
|
|
||||||
</span>
|
|
||||||
<span style={{marginLeft: 15, color:'#999'}}>
|
|
||||||
{`${getLabel('505602',"小于该时长则加班时长记为0")}`}
|
|
||||||
</span>
|
|
||||||
</div>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
label,
|
|
||||||
form,
|
|
||||||
item
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@2w4kyf`}
|
|
||||||
label={label}
|
|
||||||
labelCol={{span: 6}}
|
|
||||||
wrapperCol={{span: 18}}
|
|
||||||
error={form.getError(item)}
|
|
||||||
tipPosition='bottom'
|
|
||||||
style={{width: '110%', padding:'4px 0',marginBottom: 4}}
|
|
||||||
>
|
|
||||||
{this.getChildren()}
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default DirtyComponent
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
import {
|
|
||||||
observer
|
|
||||||
} from 'mobx-react'
|
|
||||||
import {
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn.js'
|
|
||||||
import { MagicForm } from '../../public/valhalla/components/index.js'
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Form extends React.Component {
|
|
||||||
componentDidMount() {
|
|
||||||
const { store: { getForm } } = this.props
|
|
||||||
getForm()
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { store: { formStore } } = this.props
|
|
||||||
const { loading } = formStore
|
|
||||||
|
|
||||||
if (loading) {
|
|
||||||
return <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@w8jt4o`} />
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@jg28ho`} store={formStore}/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
import {
|
|
||||||
WeaError,
|
|
||||||
WeaTimePicker,
|
|
||||||
WeaInputNumber,
|
|
||||||
} from 'ecCom'
|
|
||||||
import { i18n } from '../../public/i18n';
|
|
||||||
|
|
||||||
export default class OvertimeRule extends React.Component {
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
datas,
|
|
||||||
onChange,
|
|
||||||
groupType,
|
|
||||||
ruleType,
|
|
||||||
onAdd,
|
|
||||||
onDel,
|
|
||||||
onRef,
|
|
||||||
rowConfigs,
|
|
||||||
startDelIndex,
|
|
||||||
className,
|
|
||||||
width = 400,
|
|
||||||
hasBtn = true,
|
|
||||||
onBlur,
|
|
||||||
errorTip = i18n.label['528763']()
|
|
||||||
} = this.props
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={`overtimeCompensation ${className}`} style={{width}}>
|
|
||||||
{datas.map( (data,index) => {
|
|
||||||
return (
|
|
||||||
<p>
|
|
||||||
{rowConfigs.map(c => {
|
|
||||||
const {label,key} = c
|
|
||||||
const value = data[key]
|
|
||||||
|
|
||||||
if (label) {
|
|
||||||
return <span>{label}</span>
|
|
||||||
}else{
|
|
||||||
if ([ 'time','startTime','endTime'].includes(key) ) {
|
|
||||||
return (
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@g9yk4m@${index}`}
|
|
||||||
tipPosition='bottom'
|
|
||||||
ref={ref => onRef(ref,index,groupType)}
|
|
||||||
error={data.errorTip || errorTip}
|
|
||||||
className='overtimeError'
|
|
||||||
>
|
|
||||||
<WeaTimePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaTimePicker@7r87bg@${index}`} value={value} disabled={data.disabled} onBlur={val => onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} viewAttr={data.viewAttr ? data.viewAttr : '3'}/>
|
|
||||||
</WeaError>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if ([ 'work','overtime'].includes(key) ) {
|
|
||||||
return (
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@5r5w3n@${index}`}
|
|
||||||
tipPosition='bottom'
|
|
||||||
ref={ref => onRef(ref,index,groupType)}
|
|
||||||
error={data.errorTip || errorTip}
|
|
||||||
className='overtimeError'
|
|
||||||
>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@8njdes@${index}`} value={value} disabled={data.disabled} onBlur={val => onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} min={0} precision={2} viewAttr={3}/>
|
|
||||||
</WeaError>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<WeaError ecId={`${this && this.props && this.props.ecId || ''}_WeaError@wjwedz@${index}`}
|
|
||||||
tipPosition='bottom'
|
|
||||||
ref={ref => onRef(ref,index,ruleType)}
|
|
||||||
error={data.errorTip || errorTip}
|
|
||||||
className='overtimeError'
|
|
||||||
>
|
|
||||||
<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@02ctex@${index}`} value={value} disabled={data.disabled} onBlur={val => onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} min={0} precision={2} viewAttr={3}/>
|
|
||||||
</WeaError>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
{
|
|
||||||
(index >= startDelIndex && datas.length > 1 && hasBtn ) && <span className='del' onClick={() => onDel(index, groupType,ruleType)}>{i18n.label.delete()}</span>
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
{
|
|
||||||
hasBtn && (
|
|
||||||
<span>
|
|
||||||
<i className="icon-coms-Add-to-o" />
|
|
||||||
<span onClick={() => onAdd(groupType,ruleType)}>{i18n.label['388877']()}</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaSelect,
|
|
||||||
WeaFormItem,
|
|
||||||
WeaTimePicker,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmOvertimeRule')
|
|
||||||
@observer
|
|
||||||
class RestTime extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmOvertimeRule,
|
|
||||||
times,
|
|
||||||
type,
|
|
||||||
} = this.props, {
|
|
||||||
handleTimePickerChange,
|
|
||||||
handleSelectChange,
|
|
||||||
addRestTime,
|
|
||||||
delRestTime,
|
|
||||||
options,
|
|
||||||
} = hrmOvertimeRule;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{border: '1px solid #E4E4E4',padding: 10, width:'128%'}}>{
|
|
||||||
times.map( (time,rowIndex) => {
|
|
||||||
const {
|
|
||||||
startTime,
|
|
||||||
endTime,
|
|
||||||
startType,
|
|
||||||
endType,
|
|
||||||
} = time;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{width:'100%',position: 'relative'}}>
|
|
||||||
<div style={{width:'100%'}}>
|
|
||||||
{
|
|
||||||
[getLabel('505603',"休息时间"),'-'].map( (label,colIndex) => {
|
|
||||||
return (
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@obntvy@${rowIndex}${colIndex}`}
|
|
||||||
label={label}
|
|
||||||
colon={colIndex === 0 ? true : false}
|
|
||||||
labelCol={{span: colIndex === 0 ? 8 : 2}}
|
|
||||||
wrapperCol={{span: colIndex === 0 ? 16 : 22}}
|
|
||||||
style={{
|
|
||||||
display: 'inline-block',
|
|
||||||
width: colIndex === 0 ? '54%' : '36%',
|
|
||||||
marginLeft:(colIndex === 1 && '3%'),
|
|
||||||
paddingTop: 0,
|
|
||||||
paddingBottom: 0
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<WeaTimePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaTimePicker@o6v7l1@${rowIndex}${colIndex}`}
|
|
||||||
viewAttr={3}
|
|
||||||
value={colIndex === 0 ? startTime : endTime}
|
|
||||||
onChange={value => handleTimePickerChange(value,rowIndex,colIndex,type)}
|
|
||||||
/>
|
|
||||||
</WeaFormItem>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
{times.length > 1 && <span style={{width:'17%',position: 'absolute', top: 5,right: -55}} className='holiday-link' onClick={() => delRestTime(rowIndex,type)}>{getLabel('91',"删除")}</span>}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
<span className='holiday-link' onClick={() => addRestTime(type)}>
|
|
||||||
<i className='icon-coms-Add-to-o' />
|
|
||||||
<span style={{marginLeft: 5}}>{getLabel('505604',"添加休息时间")}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default RestTime
|
|
||||||
|
|
@ -1,135 +0,0 @@
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaLocaleProvider,
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
WeaTableNew
|
|
||||||
} from 'comsMobx';
|
|
||||||
import {
|
|
||||||
confirmation,
|
|
||||||
} from '../../util/save-time-util.js';
|
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmOvertimeRule')
|
|
||||||
@observer
|
|
||||||
class Table extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
this.props.hrmOvertimeRule.getSearchList();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
this.props.hrmOvertimeRule.resetTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
reRenderColumns = (columns) => {
|
|
||||||
const {
|
|
||||||
openDialog,
|
|
||||||
setCheckedRowId,
|
|
||||||
setSelectedRowId,
|
|
||||||
} = this.props.hrmOvertimeRule;
|
|
||||||
|
|
||||||
columns.map(c => {
|
|
||||||
//加班规则名称
|
|
||||||
if (c.dataIndex === 'name') {
|
|
||||||
c.render = (text, record, index) => {
|
|
||||||
const {
|
|
||||||
namespan,
|
|
||||||
randomFieldId
|
|
||||||
} = record;
|
|
||||||
|
|
||||||
return <a onClick={() => {setSelectedRowId(randomFieldId);openDialog({
|
|
||||||
title: getLabel('505605', "编辑加班规则"),
|
|
||||||
type: 1
|
|
||||||
})} }>{namespan}</a>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//是否默认
|
|
||||||
if (c.dataIndex === 'isDefault') {
|
|
||||||
c.render = (text, record, index) => {
|
|
||||||
const {
|
|
||||||
isDefault,
|
|
||||||
randomFieldId
|
|
||||||
} = record;
|
|
||||||
|
|
||||||
//当前行是否选中
|
|
||||||
const isChecked = (isDefault === '1') ? true : false;
|
|
||||||
//设置默认选中行的id
|
|
||||||
(isDefault === '1') && setCheckedRowId(randomFieldId);
|
|
||||||
|
|
||||||
return <input type='radio' name='overtimeRule' defaultChecked={isChecked} onChange={this.handleRadioChange.bind(this,randomFieldId)}/>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleRadioChange = (id) => {
|
|
||||||
this.props.hrmOvertimeRule.setCheckedRowId(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
onOperatesClick = (record, rowIndex, operate) => {
|
|
||||||
const {
|
|
||||||
randomFieldId
|
|
||||||
} = record, {
|
|
||||||
index
|
|
||||||
} = operate;
|
|
||||||
|
|
||||||
const {
|
|
||||||
setSelectedRowId,
|
|
||||||
openDialog,
|
|
||||||
delOverTimeRule,
|
|
||||||
log,
|
|
||||||
} = this.props.hrmOvertimeRule;
|
|
||||||
|
|
||||||
//设置选中行的id
|
|
||||||
setSelectedRowId(randomFieldId);
|
|
||||||
|
|
||||||
if (index === '0') {
|
|
||||||
openDialog({
|
|
||||||
title: getLabel('505605', "编辑加班规则"),
|
|
||||||
type: 1
|
|
||||||
});
|
|
||||||
};
|
|
||||||
if (index === '1') {
|
|
||||||
confirmation.showDelConfirm({
|
|
||||||
type: 0,
|
|
||||||
logic: (type) => delOverTimeRule(type)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (index === '2') {
|
|
||||||
log(randomFieldId, 'table');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmOvertimeRule
|
|
||||||
} = this.props, {
|
|
||||||
table
|
|
||||||
} = hrmOvertimeRule, {
|
|
||||||
tableStore,
|
|
||||||
} = table;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@1641pn`}
|
|
||||||
comsWeaTableStore={tableStore}
|
|
||||||
hasOrder
|
|
||||||
needScroll
|
|
||||||
getColumns={columns => this.reRenderColumns(columns)}
|
|
||||||
onOperatesClick={this.onOperatesClick}/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Table
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
||||||
import {
|
|
||||||
inject,
|
|
||||||
observer
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
WeaTop,
|
|
||||||
WeaTab,
|
|
||||||
WeaRightMenu,
|
|
||||||
WeaLocaleProvider,
|
|
||||||
WeaHelpfulTip
|
|
||||||
} from 'ecCom';
|
|
||||||
import {
|
|
||||||
MagicForm,
|
|
||||||
} from '../../public/sweet-form.js';
|
|
||||||
import Table from './Table';
|
|
||||||
import TimeSelectionSetting from '../timeSelection';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@inject('hrmOvertimeRule')
|
|
||||||
@observer
|
|
||||||
class Top extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.hrmOvertimeRule.getMenus();
|
|
||||||
}
|
|
||||||
|
|
||||||
getWrapperStyle = () => {
|
|
||||||
const width = window.innerWidth || document.body.clientWidth;
|
|
||||||
|
|
||||||
if (width < 1366) {
|
|
||||||
return {
|
|
||||||
padding: '20px 26%'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
padding: '20px 33%'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getTransverseSiblingComponents = () => {
|
|
||||||
const {
|
|
||||||
form
|
|
||||||
} = this.props.hrmOvertimeRule.formElements, {
|
|
||||||
timeselection
|
|
||||||
} = form.getFormParams();
|
|
||||||
|
|
||||||
if(timeselection === "1"){
|
|
||||||
return {
|
|
||||||
timeselection: <span className="name-def" onClick={() => this.props.hrmOvertimeRule.getDefForm(3)}>{getLabel('513303','选项名称定义')}</span>,
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return {
|
|
||||||
timeselection: <span><WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@vfg68t`} style={{marginLeft: 10}} title={getLabel('514037','前端选择具体起止时间时,时长不满半天的算半天,满半天不满一天的,算一天')} /></span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmOvertimeRule
|
|
||||||
} = this.props, {
|
|
||||||
topButtons,
|
|
||||||
dropMenuDatas,
|
|
||||||
topComponentStaticProps,
|
|
||||||
table,
|
|
||||||
tab,
|
|
||||||
tabStaticProps,
|
|
||||||
formElements,
|
|
||||||
formConfig,
|
|
||||||
dynamicTips,
|
|
||||||
handleFormElementsChange,
|
|
||||||
timeSelectionDialog,
|
|
||||||
formTarget
|
|
||||||
} = hrmOvertimeRule, {
|
|
||||||
tableStore
|
|
||||||
} = table, {
|
|
||||||
selectedKey
|
|
||||||
} = tab, {
|
|
||||||
form
|
|
||||||
} = formElements;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@4cxsw4`}
|
|
||||||
loading={tableStore.loading}
|
|
||||||
buttons={topButtons}
|
|
||||||
dropMenuDatas={dropMenuDatas}
|
|
||||||
{...topComponentStaticProps}
|
|
||||||
>
|
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@f9ig68`} datas={dropMenuDatas}>
|
|
||||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@fs4xnx`} {...tabStaticProps} {...tab}/>
|
|
||||||
{
|
|
||||||
(selectedKey === '0')
|
|
||||||
? <Table ecId={`${this && this.props && this.props.ecId || ''}_Table@sq6b8v`} />
|
|
||||||
: <MagicForm ecId={`${this && this.props && this.props.ecId || ''}_MagicForm@klcgok`}
|
|
||||||
{...formElements}
|
|
||||||
{...formConfig}
|
|
||||||
wrapperStyle={this.getWrapperStyle()}
|
|
||||||
dynamicTips={dynamicTips}
|
|
||||||
isFormInit={form.isFormInit}
|
|
||||||
transverseSiblingComponents={this.getTransverseSiblingComponents()}
|
|
||||||
onFormElementsChange={() => handleFormElementsChange()}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</WeaRightMenu>
|
|
||||||
<TimeSelectionSetting ecId={`${this && this.props && this.props.ecId || ''}_TimeSelectionSetting@3a3avi`} dialog={timeSelectionDialog} formTarget={formTarget}/>
|
|
||||||
</WeaTop>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Top
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
observer,
|
|
||||||
inject
|
|
||||||
} from 'mobx-react';
|
|
||||||
import {
|
|
||||||
AlertPage,
|
|
||||||
Loading,
|
|
||||||
} from '../../public/learn';
|
|
||||||
|
|
||||||
import Top from './Top';
|
|
||||||
import Dialog from './Dialog';
|
|
||||||
import {Dialog as DemoDialog} from '../../public/valhalla/components/index.js'
|
|
||||||
import {addContentPath} from '../../util/index.js'
|
|
||||||
import '../../style/overtimeRule.less'
|
|
||||||
|
|
||||||
@inject('hrmOvertimeRule')
|
|
||||||
@observer
|
|
||||||
class OvertimeRule extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.init()
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (this.props.location.key !== nextProps.location.key) {
|
|
||||||
this.props.hrmOvertimeRule.refreshPage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
init = () => {
|
|
||||||
['refreshPage', 'getPermissionInfo'].map(f => {
|
|
||||||
this.props.hrmOvertimeRule[f]();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hrmOvertimeRule
|
|
||||||
} = this.props, {
|
|
||||||
pageAccessPermission,
|
|
||||||
overtimeRuleFormStore:{dialogStore,demonstration}
|
|
||||||
} = hrmOvertimeRule, {
|
|
||||||
hasRight,
|
|
||||||
loading
|
|
||||||
} = pageAccessPermission;
|
|
||||||
|
|
||||||
if (!hasRight) {
|
|
||||||
return loading ? <Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@38jxlw`} size='lg'/> : <AlertPage ecId={`${this && this.props && this.props.ecId || ''}_AlertPage@12x3fc`} />
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@9oztsv`} />
|
|
||||||
<Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@0q9i8u`} />
|
|
||||||
<DemoDialog ecId={`${this && this.props && this.props.ecId || ''}_DemoDialog@eebr2t`} store={dialogStore}>
|
|
||||||
{demonstration.map(data => {
|
|
||||||
const {title,desc} = data
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='otrDemo'>
|
|
||||||
<div className='otrDemo-title'>{title}</div>
|
|
||||||
{ desc.map(d => {
|
|
||||||
if (/\.jpg$/.test(d)) {
|
|
||||||
return (
|
|
||||||
<img src={addContentPath(d)} alt=""/>
|
|
||||||
)
|
|
||||||
}else{
|
|
||||||
return <p>{d}</p>
|
|
||||||
}
|
|
||||||
}) }
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</DemoDialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default OvertimeRule
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {Table} from 'antd';
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Analysis extends Component{
|
|
||||||
constructor(props){
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
h: 300
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount(){
|
|
||||||
window.addEventListener('resize', this.resizeHandle);
|
|
||||||
this.calculateH();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
window.removeEventListener('resize', this.resizeHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
resizeHandle = (e) => {
|
|
||||||
this.calculateH();
|
|
||||||
}
|
|
||||||
|
|
||||||
calculateH = () =>{
|
|
||||||
let h = $('.content').height() - 81 - 30;
|
|
||||||
this.setState({
|
|
||||||
h
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {store} = this.props;
|
|
||||||
const {analysisTable} = store;
|
|
||||||
const {columns, datas} = store.toJS(analysisTable);
|
|
||||||
const x = (columns.length -2) * 51 + 250, y = this.state.h;
|
|
||||||
return (
|
|
||||||
<div className='tabPane content'>
|
|
||||||
<div className='table'>
|
|
||||||
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@2w8ang`} bordered columns={columns} dataSource={datas} scroll={{x, y}} pagination={false}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaDatePicker, WeaAuth, WeaUpload, WeaLocaleProvider} from 'ecCom';
|
|
||||||
import {Button} from 'antd';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class Bar extends Component{
|
|
||||||
render(){
|
|
||||||
const {store} = this.props;
|
|
||||||
const {searchDate, setSearchDate, getBatchShiftScheduleFrom, batchShiftScheduleFromParams, holidaySetting, importExcel, exportExcel, showHasNotAccount, showAll, multiDelete, multiDeleteSchedule} = store;
|
|
||||||
return (
|
|
||||||
<div className='btnBar'>
|
|
||||||
<WeaDatePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaDatePicker@vh47xd`}
|
|
||||||
arrow
|
|
||||||
date={searchDate}
|
|
||||||
type="month"
|
|
||||||
style={{marginRight: 10}}
|
|
||||||
onChange={setSearchDate}
|
|
||||||
/>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@tblcc7`} type='primary' onClick={holidaySetting}>{getLabel('505580', "节假日设置")}</Button>
|
|
||||||
<WeaUpload ecId={`${this && this.props && this.props.ecId || ''}_WeaUpload@bzsfj1`}
|
|
||||||
uploadUrl='/api/doc/upload/uploadFile'
|
|
||||||
category='string'
|
|
||||||
limitType='xls,xlsx'
|
|
||||||
maxFilesNumber={1}
|
|
||||||
onChange = {
|
|
||||||
(ids, list) => {
|
|
||||||
importExcel(ids[0]);
|
|
||||||
}
|
|
||||||
} >
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@x08ajm`} type="primary">{getLabel('500461','导入排班')}</Button>
|
|
||||||
</WeaUpload>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bygt0b`} type='primary' onClick={exportExcel}>{getLabel('500462','导出排班')}</Button>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@qra8nt`} type='primary' disabled={multiDelete} onClick={multiDeleteSchedule}>{getLabel('500463','批量删除排班')}</Button>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@9rd9ca`} type='primary' onClick={getBatchShiftScheduleFrom}>{getLabel('500473','批量排班')}</Button>
|
|
||||||
<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@zlunbm`} size="small" style={{ height: '28px' }} onClick={showAll} title={showHasNotAccount ? getLabel('31504','显示无账号人员') : getLabel('500013','不显示无账号人员')}>
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
showHasNotAccount ?
|
|
||||||
<i className='icon-coms-ShowNoAccount' style={{ color: '#2DB7F5' }} />
|
|
||||||
:
|
|
||||||
<i className='icon-coms-NoAccountNoDisplay' style={{ color: '#8A8A8A' }} />
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
</Button>
|
|
||||||
{
|
|
||||||
batchShiftScheduleFromParams.visible && <WeaAuth ecId={`${this && this.props && this.props.ecId || ''}_WeaAuth@ni8izr`} {...batchShiftScheduleFromParams} modalClassName='scheduleSetting-auth'/>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
import React, {Component} from 'react';
|
|
||||||
import {observer} from 'mobx-react';
|
|
||||||
import {WeaNewScroll, WeaFormItem, WeaSelect, WeaLocaleProvider} from 'ecCom';
|
|
||||||
import { i18n } from '../../public/i18n';
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
@observer
|
|
||||||
export default class CycleSetting extends Component{
|
|
||||||
constructor(props){
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
key: "1",
|
|
||||||
showname: getLabel('125899','继续排班'),
|
|
||||||
selected: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "2",
|
|
||||||
showname: getLabel('125837','取消排班'),
|
|
||||||
}
|
|
||||||
],
|
|
||||||
value: '1',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onClickHandle = serial => {
|
|
||||||
const {store, target, date, record, hide } = this.props;
|
|
||||||
const data = {
|
|
||||||
serial,
|
|
||||||
date
|
|
||||||
}
|
|
||||||
if(record != null)
|
|
||||||
Object.assign(data, {
|
|
||||||
resourceid: record.resourceid
|
|
||||||
});
|
|
||||||
store.onCycleClick([data], target, this.state.value === '1');
|
|
||||||
hide && hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
onSelectChangeHandle = (v, showname) => {
|
|
||||||
this.setState({value: v})
|
|
||||||
this.props.onSelectHandle && this.props.onSelectHandle();
|
|
||||||
}
|
|
||||||
|
|
||||||
render(){
|
|
||||||
const {store, target ,onSelectHandle} = this.props;
|
|
||||||
const {onSelectChangeHandle} = store;
|
|
||||||
const serialInfo = store.toJS(store.serialInfo);
|
|
||||||
let lbl;
|
|
||||||
switch(target){
|
|
||||||
case 'resource':
|
|
||||||
lbl = <div className='tips text-elli' title={getLabel('500464','按周期排班当月班期')}>{getLabel('500465','当月排班')}</div>;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
lbl = <div className='tips text-elli' title={getLabel('500466','从该天开始周期排班至月底')}>{getLabel('500466','从该天开始周期排班至月底')}</div>;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='tabPane tabPane-dialog'>
|
|
||||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@uaj9yv`} height={'100%'}>
|
|
||||||
<div className='daySetting'>
|
|
||||||
{lbl}
|
|
||||||
<div className='holiday'>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@f3f9vo`}
|
|
||||||
label={getLabel('500436','')}
|
|
||||||
labelCol={{span: 8}}
|
|
||||||
wrapperCol={{span: 16}}>
|
|
||||||
<WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@pbldpi`} {...this.state} onChange={this.onSelectChangeHandle}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
</div>
|
|
||||||
<div className='holiday'>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@7uph9o`}
|
|
||||||
label={i18n.label[529182]()}
|
|
||||||
labelCol={{span: 8}}
|
|
||||||
wrapperCol={{span: 16}}>
|
|
||||||
<WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@xnsa7f`} options={this.state.options} onChange={val => {
|
|
||||||
onSelectHandle && onSelectHandle()
|
|
||||||
onSelectChangeHandle(val,'2')
|
|
||||||
}}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
</div>
|
|
||||||
<div className='holiday'>
|
|
||||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@aoulv1`}
|
|
||||||
label={i18n.label[529183]()}
|
|
||||||
labelCol={{span: 8}}
|
|
||||||
wrapperCol={{span: 16}}>
|
|
||||||
<WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@cetuqm`} options={this.state.options} onChange={val => {
|
|
||||||
onSelectHandle && onSelectHandle()
|
|
||||||
onSelectChangeHandle(val,'3')
|
|
||||||
}}/>
|
|
||||||
</WeaFormItem>
|
|
||||||
</div>
|
|
||||||
{
|
|
||||||
serialInfo.map(serial => <div className='item text-elli' title={serial.name} style={{background: serial.bgColor}} onClick={() => this.onClickHandle(serial.serial)}>{serial.name}</div>)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</WeaNewScroll>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue