From d88ad0bcd36da19b1021961485cce364f4946c91 Mon Sep 17 00:00:00 2001
From: luosongbai <15272473386@163.com>
Date: Fri, 4 Dec 2020 15:35:28 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pmcalendar.php | 62 ++++++++++++++++++++++++--------------------------
1 file changed, 30 insertions(+), 32 deletions(-)
diff --git a/pmcalendar.php b/pmcalendar.php
index 33b57c5..b0f32a9 100644
--- a/pmcalendar.php
+++ b/pmcalendar.php
@@ -444,19 +444,19 @@ if ($act == 'newevent') {

-
17
+

-
17
+

-
17
+
@@ -1202,10 +1202,10 @@ if ($act == 'newevent') {
eventClick: function (calEvent, jsEvent, view) {
console.log(calEvent.className[0])
notid = calEvent.id;
- if ("=$canEdit?>" != "1") {
+ // if ("=$canEdit?>" != "1") {
if (calEvent.className[0] == 'label-danger') {
- if ("=$isgxvrole?>" != "1" && "=$isgxyyerole?>" != "1" && "=$isgxcperole?>" != "1" && "=$isgxyferole?>" != "1") {
+ if ("=$isgxvrole?>" != "1" && "=$isgxyyerole?>" != "1" && "=$isgxcperole?>" != "1" && "=$isgxyferole?>" != "1" && "=$canEdit?>" != "1") {
return
} else {
$('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
@@ -1232,7 +1232,7 @@ if ($act == 'newevent') {
}
;
} else if (calEvent.className[0] == 'label-purple') {
- if ("=$isxfvrole?>" != "1" && "=$isxfyyerole?>" != "1") {
+ if ("=$isxfvrole?>" != "1" && "=$isxfyyerole?>" != "1" && "=$canEdit?>" != "1") {
return
} else {
$('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
@@ -1261,31 +1261,29 @@ if ($act == 'newevent') {
} else {
return
}
- }
+ // }else {
+ // $('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
+ // $('#uploader_yy').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yunyig&act=add')
+ // $("#uploader_yf").attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yanfa&act=add')
+ // //console.log($('#uploader').attr('action'))
- $('#uploader').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=chanpin&act=add');
- $('#uploader_yy').attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yunyig&act=add')
- $("#uploader_yf").attr('action', './?app=uploader&id=' + calEvent.id + '&bumen=yanfa&act=add')
-
- //console.log($('#uploader').attr('action'))
-
- dict = {};
- $.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) {
- var j = JSON.parse(txt);
- dict.start = j.start;
- dict.end = j.end;
- dict.id = calEvent.id;
- $('#game').val(j.game);
- $('#hour').val(j.shour);
- $('#min').val(j.smin);
- $('#event').val(j.event);
- $('#title').val(j.title);
- hourChange($('#hour'));
- });
- dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd');
- showEventData(calEvent.id);
-
+ // dict = {};
+ // $.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) {
+ // var j = JSON.parse(txt);
+ // dict.start = j.start;
+ // dict.end = j.end;
+ // dict.id = calEvent.id;
+ // $('#game').val(j.game);
+ // $('#hour').val(j.shour);
+ // $('#min').val(j.smin);
+ // $('#event').val(j.event);
+ // $('#title').val(j.title);
+ // hourChange($('#hour'));
+ // });
+ // dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd');
+ // showEventData(calEvent.id);
+ // }
}
@@ -1434,17 +1432,17 @@ if ($act == 'newevent') {
// $("#cptext").val(res.yanfa_remark)
// res.chanpin_remark = res.chanpin_remark.replace('\\','')
console.log(res.chanpin_remark)
- if (res.chanpin_remark != "") {
+ if (res.chanpin_remark != "" && res.chanpin_remark != null) {
var chanpin_remark = JSON.parse(res.chanpin_remark)
document.getElementById("cptext").innerHTML = chanpin_remark.msg;
document.getElementById("cptime").innerHTML = chanpin_remark.date;
}
- if (res.yunying_remark != "") {
+ if (res.yunying_remark != "" && res.yunying_remark != null) {
var yunying_remark = JSON.parse(res.yunying_remark);
document.getElementById("yytext").innerHTML = yunying_remark.msg;
document.getElementById("yytime").innerHTML = chanpin_remark.date;
}
- if (res.yanfa_remark != "") {
+ if (res.yanfa_remark != "" && res.yanfa_remark != null) {
var yanfa_remark = JSON.parse(res.yanfa_remark);
document.getElementById("yftext").innerHTML = yanfa_remark.msg;
document.getElementById("yftime").innerHTML = chanpin_remark.date;