Commit 61e550a8 authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar display

parent 486c2277
......@@ -10,11 +10,10 @@ import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto;
import pwc.taxtech.atms.service.ICalendarService;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
/**
* <p> @Description </p>
......@@ -56,8 +55,8 @@ public class CalendarController {
}
@PostMapping("getCalendarDataForDisplay")
public OperationResultDto getTaxCalendarDataForDisplay(@Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime){
return calendarServiceImpl.getTaxCalendarDataForDisplay(queryStartTime, queryEndTime);
public OperationResultDto getCalendarDataForDisplay(@RequestBody CalendarDisplayQueryParamDto queryParamDto){
return calendarServiceImpl.getCalendarDataForDisplay(queryParamDto);
}
@PostMapping("saveCalendarConfig")
......
package pwc.taxtech.atms.dto.calendar;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-14 22:20
* @Version: 1.0
**/
public class CalendarDisplayQueryParamDto {
private Date queryStartTime;
private Date queryEndTime;
private Integer type;
public Date getQueryStartTime() {
return queryStartTime;
}
public void setQueryStartTime(Date queryStartTime) {
this.queryStartTime = queryStartTime;
}
public Date getQueryEndTime() {
return queryEndTime;
}
public void setQueryEndTime(Date queryEndTime) {
this.queryEndTime = queryEndTime;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
......@@ -7,6 +7,7 @@ import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto;
import java.util.Date;
import java.util.List;
......@@ -39,5 +40,5 @@ public interface ICalendarService {
OperationResultDto getMaxConfigOrder();
OperationResultDto getTaxCalendarDataForDisplay(Date queryStartTime, Date queryEndTime);
OperationResultDto getCalendarDataForDisplay(CalendarDisplayQueryParamDto queryParamDto);
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.calendar.dto.CalendarConfigDto;
import pwc.taxtech.atms.calendar.dto.CalendarConfigGroupByEntityDto;
import pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto;
import pwc.taxtech.atms.calendar.dto.EntityDto;
import pwc.taxtech.atms.calendar.dto.*;
import pwc.taxtech.atms.calendar.dao.*;
import pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper;
import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.calendar.entity.*;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto;
import pwc.taxtech.atms.service.ICalendarService;
import javax.annotation.Resource;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
......@@ -39,6 +37,9 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
@Resource
private CalendarConfigurationMapper calendarConfigurationMapper;
@Resource
private CalendarEventMapper calendarEventMapper;
@Resource
private CalendarTaskTypeMapper calendarTaskTypeMapper;
......@@ -277,7 +278,7 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
private String splice(List<String> list) {
StringBuilder sb = new StringBuilder();
if(CollectionUtils.isNotEmpty(list)) {
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(p -> sb.append(p).append(", "));
}
return sb.toString();
......@@ -304,9 +305,9 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
Map<Long, List<CalendarConfigDto>> resultMap = new HashMap<>();
Map<Long, EntityDto> entityMap = calendarExtMapper.getAllEntityMapList();
Map<Long, EntityDto> activeEntityMap = calendarExtMapper.getActiveEntityMapList();
if (entityMap == null) {
if (activeEntityMap == null) {
return null;
}
......@@ -315,14 +316,19 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
String[] entityIdArr = p.getEntityIds().split(",");
Arrays.stream(entityIdArr).forEach(idStr -> {
Long id = Long.parseLong(idStr);
if(!resultMap.containsKey(id)) {
if (!activeEntityMap.containsKey(id)) {
return;
}
if (!resultMap.containsKey(id)) {
resultMap.put(id, new ArrayList<>());
}
resultMap.get(id).add(p);
});
});
resultMap.forEach((k,v) -> resultList.add(new CalendarConfigGroupByEntityDto(entityMap.get(k).getName(), v.size(), 0, v )));
resultMap.forEach((k, v) -> resultList.add(new CalendarConfigGroupByEntityDto(activeEntityMap.get(k).getName(), v.size(), 0, v)));
return resultList;
}
......@@ -346,13 +352,165 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
}
@Override
public OperationResultDto getTaxCalendarDataForDisplay(Date queryStartTime, Date queryEndTime) {
public OperationResultDto getCalendarDataForDisplay(CalendarDisplayQueryParamDto queryParamDto) {
List<CalendarEvent> eventList = getCalendarEventData(queryParamDto);
List<CalendarEventDto> eventDtoList = new ArrayList<>();
for (CalendarEvent p : eventList) {
CalendarEventDto dto = new CalendarEventDto();
beanUtil.copyProperties(p, dto);
eventDtoList.add(dto);
}
return new OperationResultDto(CollectionUtils.isNotEmpty(eventDtoList), "", eventDtoList);
}
public List getCalendarEventData(CalendarDisplayQueryParamDto queryParamDto) {
Date start = formatQueryDateTime(queryParamDto.getQueryStartTime(), false);
Date end = formatQueryDateTime(queryParamDto.getQueryEndTime(), true);
String startYearStr = String.format("%tY", start);
String endYearStr = String.format("%tY", end);
List<CalendarConfiguration> configList = null;
List<CalendarEvent> eventList = null;
//获取有效期内calendar_configuration列表
try {
CalendarConfigurationExample configExample = new CalendarConfigurationExample();
configExample.createCriteria()
.andValidDateStartLessThanOrEqualTo(end)
.andValidDateEndGreaterThan(end)
.andStatusEqualTo(Byte.parseByte("1"));
configList = calendarConfigurationMapper.selectByExample(configExample);
} catch (Exception e) {
log.error("configList error", e);
}
Map<Long, EntityDto> activeEntityMap = calendarExtMapper.getActiveEntityMapList();
if (activeEntityMap == null) {
return null;
}
CalendarConfigurationExample configExample = new CalendarConfigurationExample();
configExample.createCriteria().andValidDateStartGreaterThanOrEqualTo(queryStartTime).andValidDateEndLessThanOrEqualTo(queryEndTime);
List<CalendarConfiguration> configList = calendarConfigurationMapper.selectByExample(configExample);
//转化
List<CalendarEvent> config2EventList = config2EventList(configList, startYearStr, endYearStr, start, end, activeEntityMap);
//获取due_date在查询时间内的calendar_event列表
try {
CalendarEventExample eventExample = new CalendarEventExample();
eventExample.createCriteria()
.andDueDateGreaterThanOrEqualTo(start)
.andDueDateLessThan(end);
eventList = calendarEventMapper.selectByExample(eventExample);
} catch (Exception e) {
log.error("eventList error", e);
}
return null;
if (CollectionUtils.isEmpty(eventList)) {
return config2EventList;
}
if (CollectionUtils.isEmpty(config2EventList)) {
return eventList;
}
//todo 去除config中重复的
return mergeEventList(config2EventList, eventList);
}
private List mergeEventList(List<CalendarEvent> config2EventList, List<CalendarEvent> eventList) {
List resultList = new ArrayList();
resultList.addAll(eventList);
resultList.addAll(config2EventList.stream()
.filter(l1 -> eventList.stream()
.anyMatch(l2 -> !l1.getEntityId().equals(l2.getEntityId())
&& !l1.getTaskTypeId().equals(l2.getTaskTypeId())
&& DateUtils.isSameDay(l1.getDueDate(), l2.getDueDate())
))
.collect(Collectors.toList()));
return resultList;
}
private List<CalendarEvent> config2EventList(List<CalendarConfiguration> configList, String startYearStr, String endYearStr, Date start, Date end, Map<Long, EntityDto> activeEntityMap) {
List<CalendarEvent> config2EventList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(configList)) {
try {
configList.forEach(p -> Arrays.stream(p.getEntityIds().split(","))
.forEach(entityIdStr -> {
if (!activeEntityMap.containsKey(Long.parseLong(entityIdStr))) {
return;
}
Arrays.stream(p.getTaskTypeIds().split(","))
.forEach(taskTypeIdStr -> Arrays.stream(p.getProjectMonths().split(","))
.forEach(month -> Arrays.stream(p.getProjectDays().split(","))
.forEach(day -> {
//TODO 跨年未处理 特殊日期未处理
Date dueDate = str2Date(startYearStr + "-" + month + "-" + day);
if (dueDate != null && dueDate.compareTo(start) >= 0 && dueDate.compareTo(end) < 0) {
CalendarEvent event = new CalendarEvent();
event.setId(p.getId());
event.setTaskName(p.getTaskName());
event.setEntityId(Long.parseLong(entityIdStr));
event.setTaskTypeId(Long.parseLong(taskTypeIdStr));
event.setStaff(p.getStaff());
event.setNotes(p.getNotes());
event.setOrderIndex(p.getOrderIndex());
event.setStatus(Byte.parseByte("0"));
event.setCreateTime(p.getCreateTime());
event.setDueDate(dueDate);
event.setEffectiveDate(p.getCreateTime());
config2EventList.add(event);
}
})
)
);
}
)
);
} catch (Exception e) {
log.error("config2EventList error", e);
}
}
return config2EventList;
}
private Date str2Date(String strDate) {
Date str2Date = null;
try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
ParsePosition pos = new ParsePosition(0);
str2Date = formatter.parse(strDate, pos);
} catch (Exception e) {
log.warn("str2Date error; strDate: {}, e: {}", strDate, e.getMessage());
}
return str2Date;
}
private Date formatQueryDateTime(Date date, boolean addOneDay) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
// 将时分秒,毫秒域清零
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
//把日期往后增加一天
if (addOneDay) {
calendar.add(Calendar.DATE, 1);
}
return calendar.getTime();
}
}
......@@ -45,6 +45,10 @@ public interface CalendarExtMapper extends MyMapper {
@MapKey("id")
Map<Long, EntityDto> getAllEntityMapList();
@Select("SELECT id, name FROM organization WHERE is_active = 1")
@MapKey("id")
Map<Long, EntityDto> getActiveEntityMapList();
@Select("SELECT name FROM calendar_task_type WHERE id IN (${ids})")
List<String> getAllTaskTypes(@Param("ids") String ids);
......
......@@ -202,7 +202,7 @@
columns: [
{ dataField: 'entityName', caption: $translate.instant('Company'), allowHeaderFiltering: false },
{ dataField: 'calendarCount', caption: $translate.instant('TaxCalendarCount'), allowHeaderFiltering: false },
{ dataField: 'taskTypeCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
// { dataField: 'taskTypeCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
],
masterDetail: {
enabled: true,
......
......@@ -12,48 +12,49 @@
$scope.agendaFlag = false;
$scope.agendas = [
{
name: "Hong Kong 1 Limited",
desc: "Renewal of business License/Fee payment",
date: "01/01/2019",
week: "Tuesday",
isUrgent: true,
color: "#d93954"
},
{
name: "Hong Kong 1 Limited",
desc: "Renewal of business License/Fee payment",
date: "01/01/2019",
week: "Tuesday",
isUrgent: false,
color: "#d93954"
},
{
name: "Hong Kong 1 Limited",
desc: "Renewal of business License/Fee payment",
date: "01/01/2019",
week: "Tuesday",
isUrgent: true,
color: "#ffbf1f"
},
{
name: "Hong Kong 1 Limited",
desc: "Renewal of business License/Fee payment",
date: "01/01/2019",
week: "Tuesday",
isUrgent: false,
color: "#fd6412"
},
{
name: "Hong Kong 1 Limited",
desc: "Renewal of business License/Fee payment",
date: "01/01/2019",
week: "Tuesday",
isUrgent: true,
color: "#ffbf1f"
}
];
$scope.agendas = ScheduleList;
// $scope.agendas = [
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#d93954"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: false,
// color: "#d93954"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#ffbf1f"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: false,
// color: "#fd6412"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#ffbf1f"
// }
// ];
//全局变量初始化放顶上
var entityList = [];
......@@ -280,7 +281,7 @@
],
statusList: [{ name: '未完成', value: 0, checked: true }, { name: '已完成', value: 1, checked: true }],
calendarTypeList: [{ name: '我的事项', value: true, checked: true }, { name: '他人事项', value: false, checked: true }],
// calendarTypeList: [{ name: '我的事项', value: true, checked: true }, { name: '他人事项', value: false, checked: true }],
allScheduleList: [],
recogizeStatus: {
......@@ -615,13 +616,13 @@
$scope.popupOptions.operateModel = {
operatorNames: loginContext.userName,
type: 1,
companyID: '',
companyName: '',
entityId: '',
entityName: '',
operatorIDs: loginContext.userId,
eventDate: start,
status: 0,
btnCreate: true,
taxProjectID: userDefine.id,
taskTypeId: userDefine.id,
taskTypeName: userDefine.taskTypeName,
colorGroup: userDefine.colorGroup
};
......@@ -695,9 +696,9 @@
//刷新筛选选择
function refreshFilterChoise() {
//链式传递筛选结果
var cScheduleList = filterScheduleProperty(entityList, 'companyList', 'companyID', dataOptions.allScheduleList);
var cScheduleList = filterScheduleProperty(entityList, 'entityList', 'entityId', dataOptions.allScheduleList);
var sScheduleList = filterScheduleProperty(dataOptions.statusList, 'statusList', 'status', cScheduleList);
ScheduleList = filterScheduleProperty(dataOptions.calendarTypeList, 'calendarTypeList', 'calendarType', sScheduleList);
ScheduleList = filterScheduleProperty(CalendarList, 'calendarList', 'calendarId', sScheduleList);
refreshSchedule();
}
......@@ -705,7 +706,7 @@
var calendarId = e.target.value;
var checked = e.target.checked;
var viewAll = document.querySelector('.lnb-calendars-item input');
var calendarElements = Array.prototype.slice.call(document.querySelectorAll('#calendarList input,#companyList input,#statusList input,#calendarTypeList input'));
var calendarElements = Array.prototype.slice.call(document.querySelectorAll('#calendarList input,#entityList input,#statusList input,#calendarTypeList input'));
var allCheckedCalendars = true;
var allSpan = e.target.nextElementSibling;
......@@ -851,8 +852,8 @@
//提取Compay ID Name 并排重
//entityList = _.uniq(_.map(scheduleDtoList, function (dt) {
// return {
// value: dt.companyID,
// name: dt.companyName,
// value: dt.entityId,
// name: dt.entityName,
// checked: true
// }
//}), false, function (sch) { return sch.value });
......@@ -863,36 +864,37 @@
_.each(scheduleDtoList, function (dto) {
var schedule = new ScheduleInfo();
schedule.id = dto.id;
schedule.calendarId = dto.taxProjectID;
schedule.title = dto.eventName + (dto.status == "0" ? "-未完成" : "-已完成");
schedule.calendarId = dto.taskTypeId;
schedule.title = dto.taskName + (dto.status == "0" ? "-未完成" : "-已完成");
schedule.isAllday = true;
schedule.start = new Date(dto.start);
schedule.end = new Date(dto.end);
schedule.notes = dto.notes;
schedule.start = new Date(dto.dueDate);
schedule.end = new Date(dto.dueDate);
schedule.category = 'allday';
schedule.companyID = dto.companyID;
schedule.entityId = dto.entityId;
schedule.status = dto.status.toString();
schedule.calendarType = (!!dto.operatorNames && (dto.operatorNames.toLowerCase() === loginContext.userName.toLowerCase())).toString();
// schedule.calendarType = (!!dto.operatorNames && (dto.operatorNames.toLowerCase() === loginContext.userName.toLowerCase())).toString();
var calendar = _.filter(CalendarList, function (ca) { return ca.id === dto.taxProjectID })[0];
var calendar = _.filter(CalendarList, function (ca) { return ca.id === dto.taskTypeId })[0];
schedule.color = calendar.color;
schedule.bgColor = calendar.bgColor;
schedule.dragBgColor = calendar.dragBgColor;
schedule.borderColor = calendar.borderColor;
schedule.location = dto.workPlaceName;
// schedule.location = dto.workPlaceName;
schedule.recurrenceRule = false;
schedule.raw = {
fileList: dto.fileList,
hasToOrCc: false,
hasRecurrenceRule: false,
location: dto.workPlaceName,
// location: dto.workPlaceName,
class: 'public', // or 'private'
creator: {
name: dto.operatorNames,
company: dto.companyName
name: dto.staff,
company: dto.entityName
}
}
......@@ -910,7 +912,7 @@
$scope.permissionData = {};
function setSchedules() {
taxCalendarService.getCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (scheduleDtoList) {
taxCalendarService.getCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (result) {
//如果登录用户没有查看,则不显示相应的税务日历
// userService.getUserPermissionNew(loginContext.userName, function (data) {
// $scope.permissionData = data;
......@@ -921,15 +923,18 @@
// }
// });
// 自定义事件,只能显示自己自定义的
scheduleDtoList = _.filter(scheduleDtoList, function (r) {
if (r.type === constant.EnumTaxEventType.UserDefine && r.operatorIDs != loginContext.userId) {
return false;
}
if(result.result) {
// result = _.filter(result.data, function (r) {
// if (r.type === constant.EnumTaxEventType.UserDefine) {
// return false;
// }
// return true;
// });
result = result.data;
}
return true;
});
refreshAll(scheduleDtoList);
refreshAll(result);
}).error(function (ex) {
$log.error(ex);
......@@ -945,6 +950,9 @@
//根据ScheduleList更新界面显示
function refreshSchedule() {
$scope.agendas = ScheduleList;
$scope.agendasLen = ScheduleList.length;
cal.clear();
//generateSchedule(cal.getViewName(), cal.getDateRangeStart(), cal.getDateRangeEnd());
cal.createSchedules(ScheduleList);
......@@ -964,9 +972,9 @@
});
calendarList.innerHTML = html.join('\n');
renderList(entityList, 'companyList','#aaa');
renderList(entityList, 'entityList','#aaa');
renderList(dataOptions.statusList, 'statusList','#aaa');
renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa');
// renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa');
var viewAll = document.getElementById('viewAll');
viewAll.checked = true;
......@@ -1006,7 +1014,7 @@
return target.dataset ? target.dataset.action : target.getAttribute('data-action');
}
var getTaxProjectList = function () {
var getTaskTypeList = function () {
taskTypeList = [];
var setColor = function (data) {
......@@ -1036,6 +1044,7 @@
var colorGroup = value.colorGroup;
CalendarList.push({
id: value.id,
value: value.id,
name: value.name,
checked: true,
color: colorGroup.color,
......@@ -1068,7 +1077,7 @@
setDropdownCalendarType();
setRenderRangeText();
getTaxProjectList();
getTaskTypeList();
setEventListener();
renderFilter();
......@@ -1176,12 +1185,12 @@
var data = {
id: param.data.id,
type: param.data.type,
taxProjectID: param.data.taxProjectID,
taskTypeId: param.data.taskTypeId,
taskTypeName: param.data.taskTypeName,
companyID: param.data.companyID,
companyName: param.data.companyName,
workPlaceID: param.data.workPlaceID,
workPlaceName: param.data.workPlaceName,
entityId: param.data.entityId,
entityName: param.data.entityName,
// workPlaceID: param.data.workPlaceID,
// workPlaceName: param.data.workPlaceName,
isRelatedTaxMoney: param.data.isRelatedTaxMoney,
operatorIDs: param.data.operatorIDs,
operatorNames: param.data.operatorNames,
......@@ -1252,13 +1261,13 @@
$scope.popupOptions.operateModel = {
operatorNames: loginContext.userName,
type: 1,
companyID: '',
companyName: '',
entityId: '',
entityName: '',
operatorIDs: loginContext.userId,
eventDate: e.start,
status: 0,
guideBound: guideBound,
taxProjectID: userDefine.id,
taskTypeId: userDefine.id,
taskTypeName: userDefine.taskTypeName,
colorGroup: userDefine.colorGroup
};
......@@ -1273,7 +1282,7 @@
var model = _.find(scheduleDataSourceList, { id: e.schedule.id });
var temp = getTaxProject(model.taxProjectID);
var temp = getTaxProject(model.taskTypeId);
//var guideBound = e.event.target.getBoundingClientRect();
......@@ -1316,7 +1325,7 @@
};
//获取用户的可访问的公司列表
var getCompanyList = function () {
var getEntityList = function () {
entityList = [];
taxCalendarService.getActiveEntityList().success(function (result) {
if (result.result) {
......@@ -1345,7 +1354,7 @@
initScopeVariable();
initControls();
getCompanyList();
getEntityList();
//getTaskTypeList();
})();
......
......@@ -19,14 +19,14 @@
<div id="calendarList" class="lnb-calendars-d1">
</div>
<div id="companyList" class="lnb-calendars-d1">
<div id="entityList" class="lnb-calendars-d1">
</div>
<div id="statusList" class="lnb-calendars-d1">
</div>
<div id="calendarTypeList" class="lnb-calendars-d1">
</div>
<!-- <div id="calendarTypeList" class="lnb-calendars-d1">-->
<!-- </div>-->
</div>
......@@ -75,30 +75,30 @@
<span id="menu-navi">
<button ng-show="agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today" ng-click="changeAgendaFlag(false)">Agenda</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" ng-click="changeAgendaFlag(true)">Month</button>
<button type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today">Today</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-next">
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today">Today</button>
<button type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-next">
<i class="calendar-icon ic-arrow-line-right" data-action="move-next"></i>
</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-prev">
<button type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-prev">
<i class="calendar-icon ic-arrow-line-left" data-action="move-prev"></i>
</button>
</span>
<span ng-show="!agendaFlag" id="renderRange" class="render-range" style="font-weight: bolder;"></span>
<span ng-show="agendaFlag" class="render-range" style="font-weight: bolder;margin: 0 15px;font-size: 20px;">Total task: 11</span>
<span id="renderRange" class="render-range" style="font-weight: bolder;"></span>
<span ng-show="agendaFlag" class="render-range" style="font-weight: bolder;margin: 0 30px;font-size: 20px;vertical-align: middle;">Total task: {{agendasLen}}</span>
</div>
<div id="calendar" style="height: 85%;" ng-show="!agendaFlag"></div>
<div id="agenda-list" class="agenda-list-container" ng-show="agendaFlag">
<div class="agenda-info" ng-click="editAgenda(id)" ng-repeat="agenda in agendas track by $index">
<div class="agenda-color" style="background: {{agenda.color}}"></div>
<div class="agenda-color" style="background: {{agenda.borderColor}}"></div>
<div class="agenda-detail">
<div>
<span style="float: left;font-weight: bolder;">{{agenda.week}}</span>
<span style="float: right;">{{agenda.date}}</span>
<span style="float: left;font-weight: bolder;">{{agenda.end | date:'EEEE' }}</span>
<span style="float: right;">{{agenda.end | date:'yyyy-MM-dd'}}</span>
</div>
<div>
<span style="float: left;">{{agenda.desc}}</span>
<span style="float: right;width: 20%;text-align: right;">{{agenda.name}}</span>
<span style="float: left;">{{agenda.title}}</span>
<span style="float: right;width: 20%;text-align: right;">{{agenda.entityName}}</span>
<span style="float: right;padding: 0px 50px;font-weight: bolder;color: red;" ng-if="agenda.isUrgent">!Urgent</span>
</div>
</div>
......
......@@ -175,7 +175,7 @@
$scope.isReadOnly = false;
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
$scope.editModel.taxProjectNameShow = $scope.editModel.taskTypeName;
$scope.editModel.taskTypeNameShow = $scope.editModel.taskTypeName;
$scope.editModel.id = window.PWC.newGuid();
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
......@@ -191,8 +191,8 @@
}
$scope.isRead = true;
$scope.editModel.companyName = cacheDataService.userOwnOrg.name;
$scope.editModel.companyID = cacheDataService.userOwnOrg.id;
$scope.editModel.entityName = cacheDataService.userOwnOrg.name;
$scope.editModel.entityId = cacheDataService.userOwnOrg.id;
popupService.locationHander = dateLocationService;
popupService.show();
......@@ -209,7 +209,7 @@
showText += ' ' + $scope.operateModel.calendarNumber;
}
$scope.editModel.taxProjectNameShow = showText;
$scope.editModel.taskTypeNameShow = showText;
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
$scope.editModel.typeText = $translate.instant(taxEventType[$scope.editModel.type]);
......
......@@ -3,46 +3,51 @@
<div class="tui-full-calendar-close">
</div>
<form id="editCalendarEventForm" dx-validation-group="{}">
<div class="row-block">
<div class="inline-width5" translate="TaxEventNameColon"></div>
<div class="inline-width20 edit-box" dx-text-box="{bindingOptions:{value:'editModel.eventName',disabled:'isReadOnly'}}" dx-validator="taxProjectNameValidateOpt"></div>
</div>
<div class="row-block" style="padding-bottom: 9px;">
<div class="inline-width5" translate="TaxProjectNameColon"></div>
<div class="inline-width20 text-definition">
<label class="taskType">
<input type="checkbox" class="tui-full-calendar-checkbox-round" value="1" checked="">
<span ng-style="styleOptions"></span><span>{{editModel.taxProjectNameShow}}</span>
<span ng-style="styleOptions"></span><span>{{editModel.taskTypeNameShow}}</span>
</label>
</div>
</div>
<div class="row-block">
<div class="inline-width5" translate="TaxEventNameColon"></div>
<div class="inline-width20 edit-box" dx-text-box="{bindingOptions:{value:'editModel.eventName',disabled:'isReadOnly'}}" dx-validator="taxProjectNameValidateOpt"></div>
</div>
<div class="row-block">
<div class="inline-width5" translate="CompanyNameColon"></div>
<div ng-model="editModel.companyName" class="inline-width20 edit-box" dx-text-box="{disabled:true}"></div>
</div>
<!-- <div class="row-block">-->
<!-- <div class="inline-width5" translate="CompanyNameColon"></div>-->
<!-- <div ng-model="editModel.companyName" class="inline-width20 edit-box" dx-text-box="{disabled:true}"></div>-->
<!-- </div>-->
<div class="row-block">
<div class="inline-width5" translate="WorkPlaceNameColon"></div>
<div dx-select-box="addressOptions" class="inline-width9 edit-box"></div>
<div class="inline-width5" translate="RelatedTaxMoneyColon"></div>
<div class="inline-width9 radio-wrapper">
<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="1" ng-model="editModel.isRelatedTaxMoney"><span></span>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="0" ng-model="editModel.isRelatedTaxMoney"><span></span>
</div>
<div dx-select-box="addressOptions" class="inline-width20 edit-box"></div>
<!-- <div class="inline-width5" translate="RelatedTaxMoneyColon"></div>-->
<!-- <div class="inline-width9 radio-wrapper">-->
<!-- <input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="1" ng-model="editModel.isRelatedTaxMoney"><span>是</span>-->
<!-- &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="0" ng-model="editModel.isRelatedTaxMoney"><span>否</span>-->
<!-- </div>-->
</div>
<div class="row-block">
<div class="inline-width5" translate="OperatorNamesColon"></div>
<div class="inline-width9 edit-box" dx-text-box="{disabled:true,bindingOptions:{value:'editModel.operatorNames'}}"></div>
<div class="inline-width5" translate="TaxEventDateColon"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.eventDate',disabled:'isReadOnly'}}"></div>
<div class="inline-width5" translate="TaxEventDateColon"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.eventDate',disabled:'isReadOnly'}}"></div>
</div>
<div class="row-block">
<div class="inline-width5" translate="RelatedPerson"></div>
<div class="inline-width20 edit-box" dx-text-box="{disabled: true, bindingOptions:{value:'editModel.notifierNames'}}"></div>
<div class="inline-width5" translate="OperatorNamesColon"></div>
<div class="inline-width9 edit-box" dx-text-box="{disabled:true,bindingOptions:{value:'editModel.operatorNames'}}"></div>
</div>
<!-- <div class="row-block">-->
<!-- <div class="inline-width5" translate="RelatedPerson"></div>-->
<!-- <div class="inline-width20 edit-box" dx-text-box="{disabled: true, bindingOptions:{value:'editModel.notifierNames'}}"></div>-->
<!-- </div>-->
<div class="row-block">
<div class="inline-width5" translate="RemarkColon"></div>
<div class="remark" dx-text-area="{bindingOptions:{value:'editModel.remark',disabled:'isReadOnly'}}"></div>
......
......@@ -25,7 +25,7 @@ webservices.factory('taxCalendarService', ['$http', 'apiConfig', function ($http
return $http.post('/calendar/saveCalendarConfig', data, apiConfig.create());
},
getCalendarDataForDisplay: function (startData, endDate) {
return $http.post('/calendar/getCalendarDataForDisplay', { queryStartTime: (new Date(startData)).dateTimeToString('yyyyMMdd'), queryEndTime: (new Date(endDate)).dateTimeToString('yyyyMMdd') + " 23:59:59", userID: '', userName: '' }, apiConfig.create());
return $http.post('/calendar/getCalendarDataForDisplay', { queryStartTime: new Date(startData), queryEndTime: new Date(endDate), userID: '', userName: '' }, apiConfig.create());
},
getMaxNumber: function () {
return $http.get('/calendar/getMaxConfigOrder', apiConfig.create());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment