Commit a642cb5d authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar页面样式调整

parent 1516dded
...@@ -17666,8 +17666,8 @@ ...@@ -17666,8 +17666,8 @@
var theme = { var theme = {
'common.border': '1px solid #e5e5e5', 'common.border': '1px solid #e5e5e5',
'common.backgroundColor': 'white', 'common.backgroundColor': 'white',
'common.holiday.color': '#ff4040', 'common.holiday.color': 'red',
'common.saturday.color': '#333', 'common.saturday.color': 'red',
'common.dayname.color': '#333', 'common.dayname.color': '#333',
'common.today.color': '#333', 'common.today.color': '#333',
...@@ -17676,14 +17676,14 @@ ...@@ -17676,14 +17676,14 @@
'common.creationGuide.border': '1px solid #515ce6', 'common.creationGuide.border': '1px solid #515ce6',
// month header 'dayname' // month header 'dayname'
'month.dayname.height': '31px', 'month.dayname.height': '45px',
'month.dayname.borderLeft': 'none', 'month.dayname.borderLeft': 'none',
'month.dayname.paddingLeft': '10px', 'month.dayname.paddingLeft': '0',
'month.dayname.paddingRight': '0', 'month.dayname.paddingRight': '0',
'month.dayname.backgroundColor': 'inherit', 'month.dayname.backgroundColor': 'inherit',
'month.dayname.fontSize': '12px', 'month.dayname.fontSize': '20px',
'month.dayname.fontWeight': 'normal', 'month.dayname.fontWeight': 'normal',
'month.dayname.textAlign': 'left', 'month.dayname.textAlign': 'center',
// month day grid cell 'day' // month day grid cell 'day'
'month.holidayExceptThisMonth.color': 'rgba(255, 64, 64, 0.4)', 'month.holidayExceptThisMonth.color': 'rgba(255, 64, 64, 0.4)',
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
$scope.agendaOnclick = function (agenda) { $scope.agendaOnclick = function (agenda) {
console.log('agendaOnclick', agenda); console.log('agendaOnclick', agenda);
var e = { var e = {
schedule : agenda schedule: agenda
}; };
showDetailPopUp(e); showDetailPopUp(e);
}; };
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
} }
], ],
statusList: [{ name: '未完成', value: 0, checked: true }, { name: '已完成', value: 1, checked: true }], 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: [], allScheduleList: [],
...@@ -358,11 +358,13 @@ ...@@ -358,11 +358,13 @@
useDetailPopup: false, useDetailPopup: false,
calendars: CalendarList, calendars: CalendarList,
month: { month: {
daynames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
narrowWeekend: false, narrowWeekend: false,
startDayOfWeek: 1, startDayOfWeek: 0,
workweek: false workweek: false,
isAlways6Week: false
}, },
week:{ week: {
narrowWeekend: false, narrowWeekend: false,
startDayOfWeek: 1, startDayOfWeek: 1,
workweek: false workweek: false
...@@ -447,7 +449,7 @@ ...@@ -447,7 +449,7 @@
//} else if (schedule.location) { //} else if (schedule.location) {
// html.push('<span class="fa fa-paperclip"></span>'); // html.push('<span class="fa fa-paperclip"></span>');
//} //}
} }
return html.join(''); return html.join('');
...@@ -619,7 +621,8 @@ ...@@ -619,7 +621,8 @@
if (!userDefine) { if (!userDefine) {
SweetAlert.warning($translate.instant('UserDefineNotInTaxProjectName')); SweetAlert.warning($translate.instant('UserDefineNotInTaxProjectName'));
return; return;
}; }
;
$scope.popupOptions.operateModel = { $scope.popupOptions.operateModel = {
staff: loginContext.userName, staff: loginContext.userName,
...@@ -638,6 +641,7 @@ ...@@ -638,6 +641,7 @@
$scope.popupOptions.operateType = constant.Operation.Add; $scope.popupOptions.operateType = constant.Operation.Add;
} }
function saveNewSchedule(scheduleData) { function saveNewSchedule(scheduleData) {
var calendar = scheduleData.calendar || findCalendar(scheduleData.calendarId); var calendar = scheduleData.calendar || findCalendar(scheduleData.calendarId);
var schedule = { var schedule = {
...@@ -678,20 +682,20 @@ ...@@ -678,20 +682,20 @@
var span = input.nextSibling; var span = input.nextSibling;
if (input.checked) { if (input.checked) {
propertyIds.push(input.value); propertyIds.push(input.value);
if (span.style.borderColor != "rgb(170, 170, 170)") { // if (span.style.borderColor != "rgb(170, 170, 170)") {
span.style.backgroundColor = span.style.borderColor; // span.style.backgroundColor = span.style.borderColor;
} else { // } else {
if (span.className != 'fa fa-check') { if (span.className != 'fa fa-check') {
$(span).addClass('fa').addClass('fa-check'); $(span).addClass('fa').addClass('fa-check');
} // }
} }
} else { } else {
if (span.style.borderColor != "rgb(170, 170, 170)") { // if (span.style.borderColor != "rgb(170, 170, 170)") {
span.style.backgroundColor = 'transparent'; // span.style.backgroundColor = 'transparent';
} else { // } else {
$(span).removeClass('fa').removeClass('fa-check'); $(span).removeClass('fa').removeClass('fa-check');
} // }
} }
}); });
...@@ -720,9 +724,9 @@ ...@@ -720,9 +724,9 @@
var allSpan = e.target.nextElementSibling; var allSpan = e.target.nextElementSibling;
if (calendarId === 'all') { if (calendarId === 'all') {
allCheckedCalendars = checked; allCheckedCalendars = checked;
if (checked && allSpan.className != 'fa fa-check') { if (checked && allSpan.className != 'fa fa-check') {
$(allSpan).addClass('fa').addClass('fa-check'); $(allSpan).addClass('fa').addClass('fa-check');
} else if (!checked) { } else if (!checked) {
...@@ -753,8 +757,7 @@ ...@@ -753,8 +757,7 @@
var eleType = $(e.target).attr("eleType"); var eleType = $(e.target).attr("eleType");
if (eleType) { if (eleType) {
refreshFilterChoise(); refreshFilterChoise();
} } else {
else {
//设置状态 //设置状态
_.filter(CalendarList, function (ca) { _.filter(CalendarList, function (ca) {
return ca.id === calendarId return ca.id === calendarId
...@@ -890,7 +893,9 @@ ...@@ -890,7 +893,9 @@
// 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.taskTypeId })[0]; var calendar = _.filter(CalendarList, function (ca) {
return ca.id === dto.taskTypeId
})[0];
schedule.color = calendar.color; schedule.color = calendar.color;
schedule.bgColor = calendar.bgColor; schedule.bgColor = calendar.bgColor;
...@@ -924,6 +929,7 @@ ...@@ -924,6 +929,7 @@
}; };
$scope.permissionData = {}; $scope.permissionData = {};
function setSchedules() { function setSchedules() {
taxCalendarService.getCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (result) { taxCalendarService.getCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (result) {
//如果登录用户没有查看,则不显示相应的税务日历 //如果登录用户没有查看,则不显示相应的税务日历
...@@ -938,7 +944,7 @@ ...@@ -938,7 +944,7 @@
//没有id的是从config表中生成数据,存在id的是从event表中查询出的数据 //没有id的是从config表中生成数据,存在id的是从event表中查询出的数据
var scheduleDtoList = {}; var scheduleDtoList = {};
if(result.result) { if (result.result) {
scheduleDtoList = result.data; scheduleDtoList = result.data;
} }
...@@ -955,7 +961,6 @@ ...@@ -955,7 +961,6 @@
}; };
//根据ScheduleList更新界面显示 //根据ScheduleList更新界面显示
function refreshSchedule() { function refreshSchedule() {
$scope.agendas = ScheduleList; $scope.agendas = ScheduleList;
...@@ -980,8 +985,8 @@ ...@@ -980,8 +985,8 @@
}); });
calendarList.innerHTML = html.join('\n'); calendarList.innerHTML = html.join('\n');
renderList(entityList, 'entityList','#aaa'); renderList(entityList, 'entityList', '#aaa');
renderList(dataOptions.statusList, 'statusList','#aaa'); renderList(dataOptions.statusList, 'statusList', '#aaa');
// renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa'); // renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa');
var viewAll = document.getElementById('viewAll'); var viewAll = document.getElementById('viewAll');
...@@ -989,17 +994,26 @@ ...@@ -989,17 +994,26 @@
} }
//选中列表(id,name格式) 显示 //选中列表(id,name格式) 显示
function renderList(List, elementId,color) { function renderList(List, elementId, color) {
var elementList = document.getElementById(elementId); var elementList = document.getElementById(elementId);
var html = []; var html = [];
List.forEach(function (item) { List.forEach(function (item) {
//style="border: 1px #aaa solid;" //style="border: 1px #aaa solid;"
html.push('<div class="lnb-calendars-item"><label>' + if (elementId === "entityList") {
html.push('<div class="lnb-calendars-item" style="background:#EB8C00;"><label>' +
'<input type="checkbox" class="tui-full-calendar-checkbox-round" eleType="entityList" value="' + item.value + '" checked>' +
'<span class="fa fa-check" style="margin-top: 5px;display: inline-block;vertical-align: top;color: white;line-height: 9px;padding-left: 2px;font-size: 11px;"></span>' +
'<span style="display:inline-block;line-height:20px;width:80%;color:white;">' + item.name + '</span>' +
'</label></div>'
);
} else {
html.push('<div class="lnb-calendars-item"><label>' +
'<input type="checkbox" class="tui-full-calendar-checkbox-round" eleType=' + elementId + ' value="' + item.value + '" checked>' + '<input type="checkbox" class="tui-full-calendar-checkbox-round" eleType=' + elementId + ' value="' + item.value + '" checked>' +
'<span class="fa fa-check" style="border-color: ' + color + ';border-size: 1px; margin-top:4px;display:inline-block;vertical-align:top;color:#aaa;line-height:9px;padding-left: 2px;font-size: 11px;"></span>' + '<span class="fa fa-check" style="border-color: ' + color + ';border-size: 1px; margin-top:4px;display:inline-block;vertical-align:top;color:#aaa;line-height:9px;padding-left: 2px;font-size: 11px;"></span>' +
'<span style="display:inline-block;line-height:20px;width:80%;">' + item.name + '</span>' + '<span style="display:inline-block;line-height:20px;width:80%;">' + item.name + '</span>' +
'</label></div>' '</label></div>'
); );
}
}); });
elementList.innerHTML = html.join('\n'); elementList.innerHTML = html.join('\n');
} }
...@@ -1024,9 +1038,9 @@ ...@@ -1024,9 +1038,9 @@
var getTaskTypeList = function () { var getTaskTypeList = function () {
taskTypeList = []; taskTypeList = [];
var setColor = function (data) { var setColor = function (data) {
var colorLength = dataOptions.colorArray.length; var colorLength = dataOptions.colorArray.length;
for (var key = 0; key < data.length; key++) { for (var key = 0; key < data.length; key++) {
var value = data[key]; var value = data[key];
...@@ -1086,7 +1100,7 @@ ...@@ -1086,7 +1100,7 @@
setDropdownCalendarType(); setDropdownCalendarType();
setRenderRangeText(); setRenderRangeText();
getTaskTypeList(); getTaskTypeList();
setEventListener(); setEventListener();
renderFilter(); renderFilter();
...@@ -1094,9 +1108,7 @@ ...@@ -1094,9 +1108,7 @@
}; };
//读取API的service //读取API的service
var getService = { var getService = {};
};
//新增数据的service //新增数据的service
var addService = { var addService = {
...@@ -1165,8 +1177,7 @@ ...@@ -1165,8 +1177,7 @@
//p2p的时候,发票来源为报销的时候,需要放在p2p,发票的所有的操作都在这儿完成 //p2p的时候,发票来源为报销的时候,需要放在p2p,发票的所有的操作都在这儿完成
if (!$scope.permission.isP2P) { if (!$scope.permission.isP2P) {
deferred.resolve(false); deferred.resolve(false);
} } else {
else {
deferred.resolve(true); deferred.resolve(true);
} }
}); });
...@@ -1191,36 +1202,35 @@ ...@@ -1191,36 +1202,35 @@
// 直接重新取数据 // 直接重新取数据
var data = { var data = {
id : param.data.id, id: param.data.id,
taskName : param.data.taskName, taskName: param.data.taskName,
entityId : param.data.entityId, entityId: param.data.entityId,
entityName : param.data.entityName, entityName: param.data.entityName,
taskTypeId : param.data.taskTypeId, taskTypeId: param.data.taskTypeId,
taskTypeName : param.data.taskTypeName, taskTypeName: param.data.taskTypeName,
notes : param.data.notes, notes: param.data.notes,
staff : param.data.staff, staff: param.data.staff,
orderIndex : param.data.orderIndex, orderIndex: param.data.orderIndex,
type : param.data.type, type: param.data.type,
effectiveDate : param.data.effectiveDate, effectiveDate: param.data.effectiveDate,
dueDate : param.data.dueDate, dueDate: param.data.dueDate,
status : param.data.status, status: param.data.status,
createTime : param.data.createTime, createTime: param.data.createTime,
fileList: param.data.fileList fileList: param.data.fileList
}; };
if (param.type === 'addSuccess') { if (param.type === 'addSuccess') {
SweetAlert.success("添加成功"); SweetAlert.success("添加成功");
scheduleDataSourceList.push(data); scheduleDataSourceList.push(data);
} } else if (param.type === 'deleteSuccess') {
else if (param.type === 'deleteSuccess') {
SweetAlert.success("删除成功"); SweetAlert.success("删除成功");
scheduleDataSourceList = _.filter(scheduleDataSourceList, function (r) { scheduleDataSourceList = _.filter(scheduleDataSourceList, function (r) {
return r.id != data.id return r.id != data.id
}); });
} else if (param.type === 'updateSuccess') { } else if (param.type === 'updateSuccess') {
SweetAlert.success("更新成功"); SweetAlert.success("更新成功");
var index = _.findIndex(scheduleDataSourceList, { id: param.data.id }); var index = _.findIndex(scheduleDataSourceList, {id: param.data.id});
if (index > -1) { if (index > -1) {
scheduleDataSourceList[index] = data; scheduleDataSourceList[index] = data;
} }
...@@ -1243,7 +1253,7 @@ ...@@ -1243,7 +1253,7 @@
var guide = e.guide; var guide = e.guide;
// use guideEl$'s left, top to locate your schedule creation popup // use guideEl$'s left, top to locate your schedule creation popup
var guideEl$ = guide.guideElement ? var guideEl$ = guide.guideElement ?
guide.guideElement : guide.guideElements[Object.keys(guide.guideElements)[0]]; guide.guideElement : guide.guideElements[Object.keys(guide.guideElements)[0]];
var guideBound = guideEl$.getBoundingClientRect(); var guideBound = guideEl$.getBoundingClientRect();
...@@ -1252,7 +1262,8 @@ ...@@ -1252,7 +1262,8 @@
if (!userDefine) { if (!userDefine) {
SweetAlert.warning($translate.instant('UserDefineNotInTaxProjectName')); SweetAlert.warning($translate.instant('UserDefineNotInTaxProjectName'));
return; return;
}; }
;
$scope.popupOptions.operateModel = { $scope.popupOptions.operateModel = {
staff: loginContext.userName, staff: loginContext.userName,
...@@ -1277,7 +1288,7 @@ ...@@ -1277,7 +1288,7 @@
if (e.schedule) { if (e.schedule) {
// get origianl data // get origianl data
var model = _.find(scheduleDataSourceList, { id: e.schedule.id }); var model = _.find(scheduleDataSourceList, {id: e.schedule.id});
var temp = getTaxProject(model.taskTypeId); var temp = getTaxProject(model.taskTypeId);
...@@ -1302,7 +1313,7 @@ ...@@ -1302,7 +1313,7 @@
if (!taskTypeList || taskTypeList.length === 0) { if (!taskTypeList || taskTypeList.length === 0) {
return null; return null;
} }
return taskTypeList[0]; return taskTypeList[0];
}; };
...@@ -1312,7 +1323,7 @@ ...@@ -1312,7 +1323,7 @@
return dataOptions.colorArray[0]; return dataOptions.colorArray[0];
} }
var tax = _.find(taskTypeList, { id: id }); var tax = _.find(taskTypeList, {id: id});
if (tax) { if (tax) {
return tax.colorGroup; return tax.colorGroup;
} }
......
...@@ -16,14 +16,18 @@ ...@@ -16,14 +16,18 @@
</label> </label>
</div> </div>
</div> </div>
<div id="calendarList" class="lnb-calendars-d1">
</div> <div style="border-bottom: 2px solid #696969;padding: 15px 5px 0 0;">
<span style="font-size: 16px;font-weight: 700;margin: 1px 5px;display: inline-block;">Type of Task</span>
<div id="entityList" class="lnb-calendars-d1">
</div> </div>
<div id="calendarList" class="lnb-calendars-d1" style="padding: 5px 5px 12px 0;"></div>
<div id="statusList" class="lnb-calendars-d1"> <div style="border-bottom: 2px solid #696969;padding: 15px 5px 0 0;">
<span style="font-size: 16px;font-weight: 700;margin: 1px 5px;display: inline-block;">Entity</span>
</div> </div>
<div id="entityList" class="lnb-calendars-d1" style="padding: 5px 5px 12px 0;"></div>
<div id="statusList" class="lnb-calendars-d1"></div>
<!-- <div id="calendarTypeList" class="lnb-calendars-d1">--> <!-- <div id="calendarTypeList" class="lnb-calendars-d1">-->
<!-- </div>--> <!-- </div>-->
......
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