seimin 1 year ago
parent
commit
bd6de2aff7

+ 4 - 4
assets/js/controllers/system/user/schedulingplan.js

@@ -171,9 +171,9 @@ app.controller("calendarCtrl", function($scope,$rootScope, $filter, $q, $timeout
171
             for (var i = 0; i < $scope.selectedDate.length; i++) {
171
             for (var i = 0; i < $scope.selectedDate.length; i++) {
172
                 console.log(moment(date).format('YYYY-MM-DD HH:mm:ss'), moment($scope.selectedDate[i]).format('YYYY-MM-DD HH:mm:ss'));
172
                 console.log(moment(date).format('YYYY-MM-DD HH:mm:ss'), moment($scope.selectedDate[i]).format('YYYY-MM-DD HH:mm:ss'));
173
                 if (angular.equals(date, $scope.selectedDate[i]) == true) {
173
                 if (angular.equals(date, $scope.selectedDate[i]) == true) {
174
-                    ischeck = false
174
+                    ischeck = true
175
                     break
175
                     break
176
-                } else { ischeck = true }
176
+                } else { ischeck = false }
177
             }
177
             }
178
             console.log(date);
178
             console.log(date);
179
             // var ymd = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join("-");
179
             // var ymd = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join("-");
@@ -194,7 +194,7 @@ app.controller("calendarCtrl", function($scope,$rootScope, $filter, $q, $timeout
194
             //         "isWork": ischeck
194
             //         "isWork": ischeck
195
             //     }
195
             //     }
196
             // }
196
             // }
197
-    
197
+
198
             // api_bpm_data.addData('workdayexception', monedata).then(function(response) {
198
             // api_bpm_data.addData('workdayexception', monedata).then(function(response) {
199
             //     if (response.status == 200) {
199
             //     if (response.status == 200) {
200
             //         SweetAlert.swal({
200
             //         SweetAlert.swal({
@@ -211,7 +211,7 @@ app.controller("calendarCtrl", function($scope,$rootScope, $filter, $q, $timeout
211
             //             type: "error"
211
             //             type: "error"
212
             //         });
212
             //         });
213
             //     }
213
             //     }
214
-    
214
+
215
             // })
215
             // })
216
         }else{
216
         }else{
217
             SweetAlert.swal({
217
             SweetAlert.swal({

+ 25 - 24
assets/views/system/user/matrialcalendar.html

@@ -2,22 +2,22 @@
2
     .dayparts {
2
     .dayparts {
3
         width: 750px;
3
         width: 750px;
4
     }
4
     }
5
-    
5
+
6
     .dayparts table {
6
     .dayparts table {
7
         width: 100%;
7
         width: 100%;
8
     }
8
     }
9
-    
9
+
10
     .dayparts td {
10
     .dayparts td {
11
         cursor: pointer;
11
         cursor: pointer;
12
         width: 26px;
12
         width: 26px;
13
         height: 26px;
13
         height: 26px;
14
         border: 1px solid #ccc;
14
         border: 1px solid #ccc;
15
     }
15
     }
16
-    
16
+
17
     .dayparts th {
17
     .dayparts th {
18
         font-weight: normal;
18
         font-weight: normal;
19
     }
19
     }
20
-    
20
+
21
     .dayparts td,
21
     .dayparts td,
22
     .dayparts th {
22
     .dayparts th {
23
         -webkit-touch-callout: none;
23
         -webkit-touch-callout: none;
@@ -28,42 +28,42 @@
28
         user-select: none;
28
         user-select: none;
29
         padding: 0;
29
         padding: 0;
30
     }
30
     }
31
-    
31
+
32
     .dayparts tr:first-child th {
32
     .dayparts tr:first-child th {
33
         text-align: left;
33
         text-align: left;
34
         text-indent: -4px;
34
         text-indent: -4px;
35
     }
35
     }
36
-    
36
+
37
     .dayparts tr:not(:first-child) th {
37
     .dayparts tr:not(:first-child) th {
38
         text-align: right;
38
         text-align: right;
39
         padding-right: 5px;
39
         padding-right: 5px;
40
     }
40
     }
41
-    
41
+
42
     .dayparts .selected {
42
     .dayparts .selected {
43
         background: #1e4163;
43
         background: #1e4163;
44
         color: white;
44
         color: white;
45
     }
45
     }
46
-    
46
+
47
     .dayparts button {
47
     .dayparts button {
48
         margin-top: 10px;
48
         margin-top: 10px;
49
         float: right;
49
         float: right;
50
         cursor: pointer;
50
         cursor: pointer;
51
         margin-right: 25px;
51
         margin-right: 25px;
52
     }
52
     }
53
-    
53
+
54
     .dayparts a {
54
     .dayparts a {
55
         cursor: pointer;
55
         cursor: pointer;
56
     }
56
     }
57
-    
57
+
58
     .dayparts a:hover {
58
     .dayparts a:hover {
59
         color: #333333;
59
         color: #333333;
60
     }
60
     }
61
-    
61
+
62
     .flex-size {
62
     .flex-size {
63
         -webkit-flex: 1;
63
         -webkit-flex: 1;
64
         flex: 1;
64
         flex: 1;
65
     }
65
     }
66
-    
66
+
67
     .calendar-md {
67
     .calendar-md {
68
         display: -webkit-flex;
68
         display: -webkit-flex;
69
         display: flex;
69
         display: flex;
@@ -73,7 +73,7 @@
73
         min-height: 100%;
73
         min-height: 100%;
74
         height: 100%;
74
         height: 100%;
75
     }
75
     }
76
-    
76
+
77
     .calendar-md .subheader {
77
     .calendar-md .subheader {
78
         background: rgba(0, 0, 0, 0.02);
78
         background: rgba(0, 0, 0, 0.02);
79
         border: 1px solid rgba(0, 0, 0, 0.12);
79
         border: 1px solid rgba(0, 0, 0, 0.12);
@@ -82,21 +82,21 @@
82
         /* border-top-left-radius: 8px; */
82
         /* border-top-left-radius: 8px; */
83
         /* border-top-right-radius: 8px; */
83
         /* border-top-right-radius: 8px; */
84
     }
84
     }
85
-    
85
+
86
     .layout-row {
86
     .layout-row {
87
         display: inherit;
87
         display: inherit;
88
         flex-direction: row;
88
         flex-direction: row;
89
     }
89
     }
90
-    
90
+
91
     .layout-row.entity {
91
     .layout-row.entity {
92
         border-radius: 8px;
92
         border-radius: 8px;
93
     }
93
     }
94
-    
94
+
95
     .layout-padding {
95
     .layout-padding {
96
         padding: 8px;
96
         padding: 8px;
97
         flex: 1;
97
         flex: 1;
98
     }
98
     }
99
-    
99
+
100
     .layout-height {
100
     .layout-height {
101
         /* display: inherit; */
101
         /* display: inherit; */
102
         display: inline-block;
102
         display: inline-block;
@@ -104,32 +104,32 @@
104
         flex: 1;
104
         flex: 1;
105
         align-content: center;
105
         align-content: center;
106
     }
106
     }
107
-    
107
+
108
     .subheader-day {
108
     .subheader-day {
109
         min-width: 48px;
109
         min-width: 48px;
110
     }
110
     }
111
-    
111
+
112
     .weekday {
112
     .weekday {
113
         border: 1px solid rgba(0, 0, 0, 0.12);
113
         border: 1px solid rgba(0, 0, 0, 0.12);
114
         cursor: pointer;
114
         cursor: pointer;
115
     }
115
     }
116
-    
116
+
117
     .flex {
117
     .flex {
118
         -webkit-flex: 1;
118
         -webkit-flex: 1;
119
         flex: 1;
119
         flex: 1;
120
         box-sizing: border-box;
120
         box-sizing: border-box;
121
     }
121
     }
122
-    
122
+
123
     angular-dayparts .calendar-md .layout-row.entity .weekday:hover {
123
     angular-dayparts .calendar-md .layout-row.entity .weekday:hover {
124
         background: #f5f5f5;
124
         background: #f5f5f5;
125
     }
125
     }
126
-    
126
+
127
     angular-dayparts .calendar-md .layout-row.entity *:disabled {
127
     angular-dayparts .calendar-md .layout-row.entity *:disabled {
128
         color: rgba(0, 0, 0, 0.3);
128
         color: rgba(0, 0, 0, 0.3);
129
         pointer-events: none;
129
         pointer-events: none;
130
         cursor: auto;
130
         cursor: auto;
131
     }
131
     }
132
-    
132
+
133
     angular-dayparts .calendar-md .layout-row.entity .weekday.active {
133
     angular-dayparts .calendar-md .layout-row.entity .weekday.active {
134
         box-shadow: 5px 5px 3px 0px rgba(0, 0, 0, 0.75);
134
         box-shadow: 5px 5px 3px 0px rgba(0, 0, 0, 0.75);
135
         background: rgba(17, 110, 191, 0.75);
135
         background: rgba(17, 110, 191, 0.75);
@@ -179,8 +179,9 @@ angular.module('app', ['angular-dayparts']).controller('main', function($scope){
179
     <div ng-if="calendarView=='week'" ng-model="options.selected" class="margin-top-20">
179
     <div ng-if="calendarView=='week'" ng-model="options.selected" class="margin-top-20">
180
         <angular-dayparts options="options"></angular-dayparts>
180
         <angular-dayparts options="options"></angular-dayparts>
181
         <p class="fontcolor-one">操作提示:此处为周排班设置,即在此处可以根据学校人员出勤情况勾选一个星期需出勤的星期数,点击即为出勤天,未做操作即为休息日,如有其它非常规休息日,你可到额外排班调整中将其点击取消出勤日。</p>
181
         <p class="fontcolor-one">操作提示:此处为周排班设置,即在此处可以根据学校人员出勤情况勾选一个星期需出勤的星期数,点击即为出勤天,未做操作即为休息日,如有其它非常规休息日,你可到额外排班调整中将其点击取消出勤日。</p>
182
+        <p class="fontcolor-one" style="color: red;font-weight: bold;font-size: 16px;">注意:配置周工作日后,会重置额外排班,需要重新设置额外排班。</p>
182
     </div>
183
     </div>
183
-    <div ng-if="calendarView=='month'">
184
+    <div ng-show="calendarView=='month'">
184
         <calendar-md flex layout layout-fill calendar-direction="direction" on-prev-month="prevMonth" on-next-month="nextMonth" on-day-click="dayClick" title-format="'MMMM y'" ng-model='selectedDate' day-format="'d'" day-label-format="'EEE'" day-label-tooltip-format="'EEEE'"
185
         <calendar-md flex layout layout-fill calendar-direction="direction" on-prev-month="prevMonth" on-next-month="nextMonth" on-day-click="dayClick" title-format="'MMMM y'" ng-model='selectedDate' day-format="'d'" day-label-format="'EEE'" day-label-tooltip-format="'EEEE'"
185
             day-tooltip-format="'fullDate'" week-starts-on="firstDayOfWeek" day-content="setDayContent"></calendar-md>
186
             day-tooltip-format="'fullDate'" week-starts-on="firstDayOfWeek" day-content="setDayContent"></calendar-md>
186
     </div>
187
     </div>