educode_sales 1.10.49 → 1.10.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/educode_sales/modules/easyeditor/easyeditor.css +1 -1
- data/app/controllers/educode_sales/application_controller.rb +10 -0
- data/app/controllers/educode_sales/business_courses_controller.rb +58 -33
- data/app/controllers/educode_sales/businesses_controller.rb +43 -7
- data/app/controllers/educode_sales/contracts_controller.rb +6 -0
- data/app/controllers/educode_sales/money_plan_records_controller.rb +6 -2
- data/app/controllers/educode_sales/money_plans_controller.rb +3 -0
- data/app/controllers/educode_sales/plans_controller.rb +392 -9
- data/app/controllers/educode_sales/sale_trends_controller.rb +1 -1
- data/app/controllers/educode_sales/shixun_dectects_controller.rb +77 -16
- data/app/controllers/educode_sales/shixuns_controller.rb +65 -4
- data/app/controllers/educode_sales/subject_trends_controller.rb +99 -892
- data/app/controllers/educode_sales/subjects_controller.rb +29 -18
- data/app/helpers/educode_sales/application_helper.rb +3 -1
- data/app/helpers/educode_sales/business_courses_helper.rb +29 -6
- data/app/helpers/educode_sales/sale_trends_helper.rb +52 -52
- data/app/helpers/educode_sales/subject_helper.rb +5 -1
- data/app/models/educode_sales/business.rb +5 -5
- data/app/models/educode_sales/business_deliver_subject.rb +3 -2
- data/app/models/educode_sales/business_subject.rb +9 -3
- data/app/models/educode_sales/business_subject_shixun.rb +37 -8
- data/app/models/educode_sales/business_subject_staff.rb +1 -0
- data/app/models/educode_sales/permission.rb +7 -0
- data/app/models/educode_sales/sales_target_history.rb +11 -0
- data/app/views/educode_sales/business_courses/edit.html.erb +30 -4
- data/app/views/educode_sales/business_courses/index.html.erb +34 -12
- data/app/views/educode_sales/business_courses/index.json.jbuilder +2 -2
- data/app/views/educode_sales/business_courses/list_shixuns.html.erb +132 -64
- data/app/views/educode_sales/business_courses/list_shixuns.json.jbuilder +12 -6
- data/app/views/educode_sales/business_courses/list_subjects.html.erb +29 -34
- data/app/views/educode_sales/business_courses/list_subjects.json.jbuilder +7 -2
- data/app/views/educode_sales/business_courses/new.html.erb +45 -20
- data/app/views/educode_sales/businesses/index.html.erb +11 -9
- data/app/views/educode_sales/contracts/_list.html.erb +16 -1
- data/app/views/educode_sales/contracts/index.html.erb +5 -2
- data/app/views/educode_sales/contracts/list.js.erb +4 -1
- data/app/views/educode_sales/money_plan_records/_index.html.erb +21 -5
- data/app/views/educode_sales/money_plan_records/index.js.erb +4 -1
- data/app/views/educode_sales/money_plans/list.html.erb +6 -2
- data/app/views/educode_sales/plans/_year_execute.html.erb +293 -0
- data/app/views/educode_sales/plans/_year_target.html.erb +677 -0
- data/app/views/educode_sales/plans/index.html.erb +104 -81
- data/app/views/educode_sales/plans/year_execute.js.erb +1 -0
- data/app/views/educode_sales/plans/year_target.js.erb +1 -0
- data/app/views/educode_sales/plans/year_target.json.jbuilder +48 -0
- data/app/views/educode_sales/plans/years_all_target.json.jbuilder +53 -0
- data/app/views/educode_sales/sale_trends/_return_money_forecast.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/_user_stat.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/_visit_analysis.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/return_money_forecast.js.erb +1 -1
- data/app/views/educode_sales/sale_trends/trends.html.erb +6 -6
- data/app/views/educode_sales/sale_trends/user_stat.js.erb +1 -1
- data/app/views/educode_sales/sale_trends/visit_analysis.js.erb +1 -1
- data/app/views/educode_sales/shixun_dectects/index.html.erb +97 -47
- data/app/views/educode_sales/shixun_dectects/index.json.jbuilder +4 -3
- data/app/views/educode_sales/shixun_dectects/markdown.html.erb +1 -1
- data/app/views/educode_sales/shixuns/edit.html.erb +35 -13
- data/app/views/educode_sales/shixuns/index.html.erb +348 -138
- data/app/views/educode_sales/shixuns/index.json.jbuilder +9 -5
- data/app/views/educode_sales/shixuns/new.html.erb +22 -12
- data/app/views/educode_sales/subject_trends/trends.html.erb +177 -575
- data/app/views/educode_sales/subjects/edit.html.erb +4 -4
- data/app/views/educode_sales/subjects/index.html.erb +50 -12
- data/app/views/educode_sales/subjects/index.json.jbuilder +3 -3
- data/app/views/educode_sales/subjects/list_shixuns.html.erb +143 -17
- data/app/views/educode_sales/subjects/list_shixuns.json.jbuilder +9 -4
- data/app/views/educode_sales/subjects/new.html.erb +4 -4
- data/app/views/layouts/educode_sales/application.html.erb +2 -2
- data/config/routes.rb +7 -2
- data/db/migrate/20230729085359_create_educode_sales_sales_target_histories.rb +45 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +10 -4
- data/app/views/educode_sales/plans/_target_track.html.erb +0 -178
- data/app/views/educode_sales/plans/target_track.js.erb +0 -1
@@ -3,12 +3,21 @@
|
|
3
3
|
margin-bottom: 10px;
|
4
4
|
margin-right: 10px;
|
5
5
|
}
|
6
|
+
.markdown_list img{
|
7
|
+
max-width: 500px;
|
8
|
+
}
|
9
|
+
.layui-table-cell{
|
10
|
+
height: auto !important;
|
11
|
+
width: auto;
|
12
|
+
white-space: normal;
|
13
|
+
/*line-height: 28px;*/
|
14
|
+
}
|
6
15
|
</style>
|
7
|
-
<div class="layui-tab" style="margin: 10px">
|
16
|
+
<div class="layui-tab" style="margin: 10px" lay-filter="shixun_nav">
|
8
17
|
<ul class="layui-tab-title">
|
9
|
-
<li id="category_1" class="layui-this" lay-id="
|
10
|
-
<li id="category_2" lay-id="
|
11
|
-
<li id="category_3" lay-id="
|
18
|
+
<li id="category_1" class="layui-this" lay-id="1">管培</li>
|
19
|
+
<li id="category_2" lay-id="2">全职</li>
|
20
|
+
<li id="category_3" lay-id="3">专职</li>
|
12
21
|
|
13
22
|
</ul>
|
14
23
|
<div class="layui-tab-content">
|
@@ -28,8 +37,9 @@
|
|
28
37
|
<label class="layui-form-label">项目状态</label>
|
29
38
|
<div class="layui-input-inline">
|
30
39
|
<%= select_tag "status", options_for_select(
|
31
|
-
[["全部", 0], ["待建设", 1], ["
|
32
|
-
["审核中", 4], ["返修中", 5], ["已内部发布", 6], ["已公开发布", 7]
|
40
|
+
[["全部", 0], ["待建设", 1], ["建设中", 3],
|
41
|
+
["审核中", 4], ["返修中", 5], ["已内部发布", 6], ["已公开发布", 7],
|
42
|
+
["已付费用",8],["审核通过",9]], selected: 0
|
33
43
|
), { include_blank: true } %>
|
34
44
|
</div>
|
35
45
|
</div>
|
@@ -39,6 +49,13 @@
|
|
39
49
|
<input type="text" class="layui-input" name="time" id="ID-laydate-demo" placeholder="yyyy-MM-dd">
|
40
50
|
</div>
|
41
51
|
</div>
|
52
|
+
|
53
|
+
<!-- <div class="layui-inline inner_div">-->
|
54
|
+
<!-- <label class="layui-form-label">商机名称</label>-->
|
55
|
+
<!-- <div class="layui-inline" id="ID-laydate-range">-->
|
56
|
+
<!-- <input type="text" class="layui-input" name="business_name" id="business_name">-->
|
57
|
+
<!-- </div>-->
|
58
|
+
<!-- </div>-->
|
42
59
|
</div>
|
43
60
|
<div>
|
44
61
|
<div class="layui-inline borders inner_div">
|
@@ -48,7 +65,7 @@
|
|
48
65
|
</div>
|
49
66
|
</div>
|
50
67
|
<div class="layui-inline borders inner_div">
|
51
|
-
<label class="layui-form-label" style="width:
|
68
|
+
<label class="layui-form-label" style="width: 130px">实践课程名称</label>
|
52
69
|
<div class="layui-input-inline">
|
53
70
|
<input type="text" class="layui-input" name="subject_name">
|
54
71
|
</div>
|
@@ -66,7 +83,7 @@
|
|
66
83
|
<div id="contact_table_wraper">
|
67
84
|
<table class="layui-hide" id="shixuns_table" lay-filter="shixuns_table"></table>
|
68
85
|
</div>
|
69
|
-
<input type="text" class="layui-input" name="subject_name"
|
86
|
+
<input type="text" class="layui-input" name="subject_name" id="shixun_nav_type_id" value="1" style="display: none">
|
70
87
|
</div>
|
71
88
|
</div>
|
72
89
|
|
@@ -96,6 +113,10 @@
|
|
96
113
|
<span>已内部发布</span>
|
97
114
|
{{# } else if(d.shixun_status === 7){ }}
|
98
115
|
<span>已公开发布</span>
|
116
|
+
{{# } else if(d.shixun_status === 8){ }}
|
117
|
+
<span>已付费用</span>
|
118
|
+
{{# } else if(d.shixun_status === 9){ }}
|
119
|
+
<span>审核通过</span>
|
99
120
|
{{# } }}
|
100
121
|
</script>
|
101
122
|
<script type="text/html" id="show_level">
|
@@ -113,11 +134,60 @@
|
|
113
134
|
</script>
|
114
135
|
<script type="text/html" id="shixun_table_bar">
|
115
136
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
137
|
+
{{# if(d.shixun_status === 3 || d.shixun_status === 5){ }}
|
116
138
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="examine">提交审核</a>
|
139
|
+
{{# } else { }}
|
140
|
+
<a class="layui-btn layui-btn-disabled layui-btn-xs data-count-edit">提交审核</a>
|
141
|
+
{{# } }}
|
142
|
+
</script>
|
143
|
+
<!--<script type="text/html" id="show_markdown">-->
|
144
|
+
<!-- {{# if(d.dectect_feedback !== null && d.dectect_feedback !== '' ){ }}-->
|
145
|
+
<!-- <a lay-event="show_markdown">点击查看</a>-->
|
146
|
+
<!-- {{# } else { }}-->
|
147
|
+
<!-- <span>---</span>-->
|
148
|
+
<!-- {{# } }}-->
|
149
|
+
<!--</script>-->
|
150
|
+
|
151
|
+
<script type="text/html" id="shixun_name_t">
|
152
|
+
{{# if(d.s_identifier !== null && d.s_identifier !== ''){ }}
|
153
|
+
<a target='_blank' style='color: #1E9FFF' href='<%=@url %>/shixuns/{{=d.s_identifier}}/challenges'>{{=d.shixun_name}}</a>
|
154
|
+
{{# } else { }}
|
155
|
+
<a target='_blank' style='color: #1E9FFF' href='{{=d.link}}'>{{=d.shixun_name}}</a>
|
156
|
+
{{# } }}
|
157
|
+
</script>
|
158
|
+
<script type="text/html" id="subject_name_t">
|
159
|
+
{{# if(d.subject_name !== '--'){ }}
|
160
|
+
<a target='_blank' style='color: #1E9FFF' href='<%=@url %>/paths/{{=d.subjects_identifier}}'>{{=d.subject_name}}</a>
|
161
|
+
{{# } else { }}
|
162
|
+
<a style='color: #1E9FFF' >{{=d.subject_name}}</a>
|
163
|
+
{{# } }}
|
117
164
|
</script>
|
165
|
+
<script src="/markdown/marked.min.js" type="text/javascript" charset="utf-8"></script>
|
118
166
|
<script>
|
119
|
-
|
167
|
+
function extractFirstTenCharsAndImage(markdownText) {
|
168
|
+
let firstTenChars = '';
|
169
|
+
let imageTag = '';
|
170
|
+
// 行内图片的正则表达式
|
171
|
+
const inlineImageRegex = /!\[.*?\]\((.*?)\)/g;
|
172
|
+
// 处理行内图片
|
173
|
+
markdownText = markdownText.replace(inlineImageRegex, (_, imagePath) => {
|
174
|
+
// 如果匹配到行内图片,则生成图片标签,并将匹配的图片部分替换为空字符串
|
175
|
+
imageTag = `<img style="max-height: 100px" src="${imagePath}" />`;
|
176
|
+
return '';
|
177
|
+
});
|
178
|
+
// 去除Markdown格式,只保留纯文本内容
|
179
|
+
const pureText = markdownText.replace(/(^|\n)(\d+\.|)\s*/g, '$1').trim();
|
180
|
+
// 获取前十个字符
|
181
|
+
firstTenChars = pureText.substring(0, 10);
|
182
|
+
// 输出结果
|
183
|
+
return `<div lay-event="show_markdown"><p>${firstTenChars}</p> ${imageTag}</div>`
|
184
|
+
}
|
185
|
+
layui.config({
|
186
|
+
base: '/markdown/mods/' //存放layui拓展模块的目录位置
|
187
|
+
}).use(['form', 'table', 'miniPage', 'element', 'laydate', 'dropdown', 'jquery','easyeditor'], function () {
|
120
188
|
var laydate = layui.laydate,
|
189
|
+
easyeditor = layui.easyeditor,
|
190
|
+
element = layui.element,
|
121
191
|
form = layui.form,
|
122
192
|
table = layui.table,
|
123
193
|
$ = layui.jquery,
|
@@ -129,15 +199,12 @@
|
|
129
199
|
range: true
|
130
200
|
});
|
131
201
|
|
132
|
-
|
133
|
-
// 默认管培
|
134
|
-
data.category = 1
|
202
|
+
|
135
203
|
var cols_table = [
|
136
204
|
[
|
137
205
|
{
|
138
206
|
field: 'id',
|
139
207
|
width: 60,
|
140
|
-
fixed: 'left',
|
141
208
|
title: '序号', type: 'numbers',
|
142
209
|
align: 'center',
|
143
210
|
},
|
@@ -153,6 +220,135 @@
|
|
153
220
|
title: '实践课程名称',
|
154
221
|
width: 200,
|
155
222
|
align: 'center',
|
223
|
+
templet: "#subject_name_t",
|
224
|
+
hide: gon.filter.subject_name
|
225
|
+
},
|
226
|
+
{
|
227
|
+
field: 'reception_at',
|
228
|
+
title: '交付时间',
|
229
|
+
width: 150,
|
230
|
+
align: 'center',
|
231
|
+
hide: gon.filter.reception_at
|
232
|
+
},
|
233
|
+
{
|
234
|
+
field: 'type',
|
235
|
+
title: '项目类型',
|
236
|
+
width: 150,
|
237
|
+
align: 'center',
|
238
|
+
templet: (d)=>{
|
239
|
+
return d.type === 1? "实践项目":"非实践项目"
|
240
|
+
},
|
241
|
+
hide: gon.filter.type
|
242
|
+
},
|
243
|
+
{
|
244
|
+
field: 'shixun_name',
|
245
|
+
title: '项目名称',
|
246
|
+
width: 150,
|
247
|
+
align: 'center',
|
248
|
+
templet: "#shixun_name_t",
|
249
|
+
hide: gon.filter.shixun_name
|
250
|
+
},
|
251
|
+
{
|
252
|
+
field: 'level',
|
253
|
+
title: '项目级别',
|
254
|
+
width: 150,
|
255
|
+
align: 'center',
|
256
|
+
templet: '#show_level',
|
257
|
+
hide: gon.filter.level
|
258
|
+
},
|
259
|
+
{
|
260
|
+
field: 'shixun_status',
|
261
|
+
title: '项目状态',
|
262
|
+
width: 150,
|
263
|
+
templet: '#show_state',
|
264
|
+
align: 'center',
|
265
|
+
hide: gon.filter.shixun_status
|
266
|
+
},
|
267
|
+
{
|
268
|
+
field: 'deliver_date',
|
269
|
+
title: '制作完成时间',
|
270
|
+
width: 150,
|
271
|
+
align: 'center',
|
272
|
+
hide: gon.filter.deliver_date
|
273
|
+
},
|
274
|
+
{
|
275
|
+
field: 'commit_dectect_time',
|
276
|
+
title: '提交审核时间',
|
277
|
+
width: 150,
|
278
|
+
align: 'center',
|
279
|
+
hide: gon.filter.commit_dectect_time
|
280
|
+
},
|
281
|
+
{
|
282
|
+
field: 'dectect_feedback',
|
283
|
+
title: '审核反馈',
|
284
|
+
width: 150,
|
285
|
+
align: 'center',
|
286
|
+
templet: (d)=>{
|
287
|
+
if(d.dectect_feedback){
|
288
|
+
return extractFirstTenCharsAndImage(d.dectect_feedback)
|
289
|
+
}
|
290
|
+
return ''
|
291
|
+
},
|
292
|
+
hide: gon.filter.dectect_feedback
|
293
|
+
},
|
294
|
+
{
|
295
|
+
field: 'shixun_producer',
|
296
|
+
title: '项目制作人',
|
297
|
+
width: 150,
|
298
|
+
align: 'center',
|
299
|
+
hide: gon.filter.shixun_producer
|
300
|
+
},
|
301
|
+
{
|
302
|
+
field: 'shixun_manages',
|
303
|
+
title: '课程组长',
|
304
|
+
width: 150,
|
305
|
+
align: 'center',
|
306
|
+
hide: gon.filter.shixun_manages
|
307
|
+
},
|
308
|
+
{
|
309
|
+
field: 'max_manage',
|
310
|
+
title: '课程组主管',
|
311
|
+
width: 150,
|
312
|
+
align: 'center',
|
313
|
+
hide: gon.filter.max_manage
|
314
|
+
},
|
315
|
+
{
|
316
|
+
field: 'shixun_staff',
|
317
|
+
title: '销售',
|
318
|
+
width: 150,
|
319
|
+
align: 'center',
|
320
|
+
hide: gon.filter.shixun_staff
|
321
|
+
},
|
322
|
+
{
|
323
|
+
title: '操作',
|
324
|
+
align: 'center',
|
325
|
+
width: 150,
|
326
|
+
templet: "#shixun_table_bar"
|
327
|
+
}
|
328
|
+
]
|
329
|
+
]
|
330
|
+
|
331
|
+
var money_cols_table = [
|
332
|
+
[
|
333
|
+
{
|
334
|
+
field: 'id',
|
335
|
+
width: 60,
|
336
|
+
title: '序号', type: 'numbers',
|
337
|
+
align: 'center',
|
338
|
+
},
|
339
|
+
{
|
340
|
+
field: 'school_name',
|
341
|
+
title: '交付单位',
|
342
|
+
width: 150,
|
343
|
+
align: 'center',
|
344
|
+
hide: gon.filter.school_name
|
345
|
+
},
|
346
|
+
{
|
347
|
+
field: 'subject_name',
|
348
|
+
title: '实践课程名称',
|
349
|
+
width: 200,
|
350
|
+
align: 'center',
|
351
|
+
templet: "#subject_name_t",
|
156
352
|
hide: gon.filter.subject_name
|
157
353
|
},
|
158
354
|
{
|
@@ -162,11 +358,22 @@
|
|
162
358
|
align: 'center',
|
163
359
|
hide: gon.filter.reception_at
|
164
360
|
},
|
361
|
+
{
|
362
|
+
field: 'type',
|
363
|
+
title: '项目类型',
|
364
|
+
width: 150,
|
365
|
+
align: 'center',
|
366
|
+
templet: (d)=>{
|
367
|
+
return d.type === 1? "实践项目":"非实践项目"
|
368
|
+
},
|
369
|
+
hide: gon.filter.type
|
370
|
+
},
|
165
371
|
{
|
166
372
|
field: 'shixun_name',
|
167
373
|
title: '项目名称',
|
168
374
|
width: 150,
|
169
375
|
align: 'center',
|
376
|
+
templet: "#shixun_name_t",
|
170
377
|
hide: gon.filter.shixun_name
|
171
378
|
},
|
172
379
|
{
|
@@ -204,6 +411,12 @@
|
|
204
411
|
title: '审核反馈',
|
205
412
|
width: 150,
|
206
413
|
align: 'center',
|
414
|
+
templet: (d)=>{
|
415
|
+
if(d.dectect_feedback){
|
416
|
+
return extractFirstTenCharsAndImage(d.dectect_feedback)
|
417
|
+
}
|
418
|
+
return ''
|
419
|
+
},
|
207
420
|
hide: gon.filter.dectect_feedback
|
208
421
|
},
|
209
422
|
{
|
@@ -238,12 +451,24 @@
|
|
238
451
|
title: '操作',
|
239
452
|
align: 'center',
|
240
453
|
width: 150,
|
241
|
-
fixed: 'right',
|
242
454
|
templet: "#shixun_table_bar"
|
243
455
|
}
|
244
456
|
]
|
245
457
|
]
|
458
|
+
var data = form.val("search_form");
|
459
|
+
// 默认管培
|
460
|
+
data.category = gon.category
|
461
|
+
localStorage.setItem("is_admin-<%=session[:admin_id] %>",gon.is_admin)
|
462
|
+
element.tabChange("shixun_nav", gon.category);
|
463
|
+
console.log("is_admin-<%=session[:admin_id] %>")
|
464
|
+
console.log(gon.is_admin)
|
465
|
+
if (gon.is_admin && data.category == 3 ){
|
466
|
+
console.log("admin")
|
467
|
+
money_cols_table[0].splice(8, 0, {field: 'money',title: '金额',width: 150, align: 'center',hide: gon.filter.money })
|
468
|
+
// console.log(demo)
|
469
|
+
}
|
246
470
|
|
471
|
+
var tableDataCount = 0
|
247
472
|
var id = localStorage.getItem("subjects_id")
|
248
473
|
console.log(id)
|
249
474
|
var shixuns_table = table.render({
|
@@ -254,13 +479,29 @@
|
|
254
479
|
title: '实践项目列表',
|
255
480
|
toolbar: '#bussinessBar',
|
256
481
|
defaultToolbar: ['filter'],
|
257
|
-
cols:
|
482
|
+
cols: money_cols_table,
|
258
483
|
limit: 10,
|
259
484
|
limits: [10, 15, 20, 30, 40, 50, 60, 70, 80, 90],
|
260
485
|
page: true,
|
261
|
-
skin: 'line'
|
486
|
+
skin: 'line',
|
487
|
+
done:function (res, curr, count){
|
488
|
+
tableDataCount = count;
|
489
|
+
}
|
490
|
+
});
|
491
|
+
// 重置
|
492
|
+
form.on('submit(reset_business_search)', function (data) {
|
493
|
+
$(".layui-form")[0].reset();
|
494
|
+
var category = localStorage.getItem("category")
|
495
|
+
console.log(category)
|
496
|
+
table.reload('shixuns_table', {
|
497
|
+
page: {
|
498
|
+
curr: 1
|
499
|
+
},
|
500
|
+
where: {q: {category:category}}
|
501
|
+
}, 'data');
|
502
|
+
form.render()
|
503
|
+
return false;
|
262
504
|
});
|
263
|
-
|
264
505
|
var sort = {}, search = {};
|
265
506
|
// 监听搜索操作
|
266
507
|
form.on('submit(search_contract)', function (data) {
|
@@ -289,7 +530,7 @@
|
|
289
530
|
type: 1,
|
290
531
|
shade: 0.2,
|
291
532
|
maxmin: true,
|
292
|
-
shadeClose:
|
533
|
+
shadeClose: false,
|
293
534
|
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
294
535
|
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
295
536
|
content: content
|
@@ -297,7 +538,7 @@
|
|
297
538
|
$(window).on("resize", function () {
|
298
539
|
});
|
299
540
|
return false;
|
300
|
-
} else if (obj.event === 'examine'){
|
541
|
+
} else if (obj.event === 'examine') {
|
301
542
|
var status = data.shixun_status
|
302
543
|
console.log(status)
|
303
544
|
if (status != 3 && status != 5) {
|
@@ -312,15 +553,39 @@
|
|
312
553
|
success: function (res) {
|
313
554
|
var data = res.data;
|
314
555
|
console.log(res)
|
315
|
-
if(res.success){
|
556
|
+
if (res.success) {
|
316
557
|
layer.msg("提交成功")
|
558
|
+
search = form.val()
|
559
|
+
search.category = document.getElementById('shixun_nav_type_id').value
|
560
|
+
console.log(search)
|
561
|
+
table.reload('shixuns_table', {
|
562
|
+
page: {
|
563
|
+
curr: 1
|
564
|
+
},
|
565
|
+
where: {q: search, sort: sort}
|
566
|
+
}, 'data');
|
567
|
+
return false;
|
317
568
|
}
|
318
569
|
},
|
319
|
-
error:(res)=>{
|
570
|
+
error: (res) => {
|
320
571
|
layer.msg("已经提交过了")
|
321
572
|
}
|
322
573
|
})
|
323
574
|
return false
|
575
|
+
}else if(obj.event === 'show_markdown'){
|
576
|
+
if(data.dectect_feedback !== '--'){
|
577
|
+
var text = `<div class="markdown_list" style="margin: 50px" >` + data.dectect_feedback + `</div>`
|
578
|
+
layer.open({
|
579
|
+
type: 1,
|
580
|
+
title: '审核反馈',
|
581
|
+
area: ['900px', '700px'], // 宽高
|
582
|
+
content: text,
|
583
|
+
move: '#ID-test-layer-move'
|
584
|
+
});
|
585
|
+
easyeditor.render({
|
586
|
+
elem: ".markdown_list"
|
587
|
+
});
|
588
|
+
}
|
324
589
|
}
|
325
590
|
});
|
326
591
|
|
@@ -335,56 +600,83 @@
|
|
335
600
|
type: 1,
|
336
601
|
shade: 0.2,
|
337
602
|
maxmin: true,
|
338
|
-
shadeClose:
|
603
|
+
shadeClose: false,
|
339
604
|
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
340
605
|
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
341
606
|
content: content,
|
342
607
|
});
|
343
608
|
$(window).on("resize", function () {
|
344
609
|
});
|
345
|
-
}else if(obj.event === 'LAYTABLE_COLS') {
|
346
|
-
layui.form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(objs) {
|
610
|
+
} else if (obj.event === 'LAYTABLE_COLS') {
|
611
|
+
layui.form.on('checkbox(LAY_TABLE_TOOL_COLS)', function (objs) {
|
347
612
|
var value = objs.elem.checked
|
613
|
+
console.log(objs)
|
348
614
|
var name = objs.elem.attributes[1].value
|
615
|
+
console.log(name)
|
349
616
|
$.ajax({
|
350
617
|
url: "filter",
|
351
618
|
type: "GET",
|
352
619
|
data: "type=shixuns&name=" + name + "&check=" + value,
|
353
|
-
success: function (data){
|
354
|
-
let hide_type = "[data-field='"+name+"']"
|
355
|
-
if (data.hidden === 1){
|
620
|
+
success: function (data) {
|
621
|
+
let hide_type = "[data-field='" + name + "']"
|
622
|
+
if (data.hidden === 1) {
|
356
623
|
$(hide_type).addClass('layui-hide');
|
357
|
-
}else if (data.hidden === 0){
|
624
|
+
} else if (data.hidden === 0) {
|
358
625
|
$(hide_type).removeClass('layui-hide');
|
359
626
|
}
|
360
627
|
//(因为触发筛选器出现的checkbox是根据cols的值得到 这里必须修改 cols的值 然后才会出现下次点击筛选器时 checkbox正常显示)
|
361
|
-
for (i=1;i<cols_table[0].length;i++){
|
362
|
-
if (name === cols_table[0][i].field
|
628
|
+
for (i = 1; i < cols_table[0].length; i++) {
|
629
|
+
if (name === cols_table[0][i].field) {
|
363
630
|
cols_table[0][i].hide = !value
|
364
|
-
|
631
|
+
obj.config.cols = cols_table
|
632
|
+
}
|
633
|
+
|
634
|
+
if (i < money_cols_table[0].length && name === money_cols_table[0][i].field) {
|
635
|
+
money_cols_table[0][i].hide = !value
|
636
|
+
obj.config.cols = money_cols_table
|
365
637
|
}
|
366
638
|
}
|
367
639
|
},
|
368
|
-
error: function (data){
|
640
|
+
error: function (data) {
|
369
641
|
layer.msg("操作失败")
|
370
642
|
},
|
371
643
|
dataType: 'Json'
|
372
644
|
})
|
373
645
|
});
|
646
|
+
}else if(obj.event === 'list'){
|
647
|
+
table.reload('shixuns_table',{
|
648
|
+
page: 1,
|
649
|
+
limit:tableDataCount, //加载所有数据
|
650
|
+
done:function (){
|
651
|
+
//导出所有数据
|
652
|
+
table.exportFile("shixuns_table",false,"xls");
|
653
|
+
//恢复数据分页显示
|
654
|
+
table.reload('shixuns_table',{
|
655
|
+
page: 1,
|
656
|
+
limit:20,
|
657
|
+
done:function (res, curr, count){
|
658
|
+
tableDataCount = count;
|
659
|
+
}
|
660
|
+
})
|
661
|
+
|
662
|
+
}
|
663
|
+
})
|
374
664
|
}
|
375
665
|
});
|
376
666
|
|
377
667
|
|
378
668
|
for (let i = 1; i <= 3; i++) {
|
379
669
|
if (i !== 3) {
|
670
|
+
console.log("tabchange是否跳转")
|
380
671
|
$("#category_" + i).click(function () {
|
672
|
+
$(".layui-form")[0].reset();
|
381
673
|
data.category = i
|
382
|
-
|
674
|
+
localStorage.setItem("category",i)
|
383
675
|
table.reload('shixuns_table', {
|
384
676
|
page: {
|
385
677
|
curr: 1
|
386
678
|
},
|
387
|
-
cols:cols_table,
|
679
|
+
cols: cols_table,
|
388
680
|
where: {q: data}
|
389
681
|
})
|
390
682
|
// 更换面包屑后,跟新类型
|
@@ -392,117 +684,35 @@
|
|
392
684
|
});
|
393
685
|
} else if (i === 3) {
|
394
686
|
$("#category_" + i).click(function () {
|
395
|
-
|
687
|
+
$(".layui-form")[0].reset();
|
396
688
|
data.category = i
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
},
|
405
|
-
{
|
406
|
-
field: 'school_name',
|
407
|
-
title: '交付单位',
|
408
|
-
width: 150,
|
409
|
-
align: 'center'
|
410
|
-
},
|
411
|
-
{
|
412
|
-
field: 'subject_name',
|
413
|
-
title: '实践课程名称',
|
414
|
-
width: 200,
|
415
|
-
align: 'center'
|
416
|
-
},
|
417
|
-
{
|
418
|
-
field: 'reception_at',
|
419
|
-
title: '交付时间',
|
420
|
-
width: 150,
|
421
|
-
align: 'center'
|
422
|
-
},
|
423
|
-
{
|
424
|
-
field: 'shixun_name',
|
425
|
-
title: '项目名称',
|
426
|
-
width: 150,
|
427
|
-
align: 'center'
|
428
|
-
},
|
429
|
-
{
|
430
|
-
field: 'level',
|
431
|
-
title: '项目级别',
|
432
|
-
width: 150,
|
433
|
-
align: 'center',
|
434
|
-
templet: '#show_level'
|
435
|
-
},
|
436
|
-
{
|
437
|
-
field: 'shixun_status',
|
438
|
-
title: '项目状态',
|
439
|
-
width: 150,
|
440
|
-
templet: '#show_state',
|
441
|
-
align: 'center'
|
442
|
-
},
|
443
|
-
{
|
444
|
-
field: 'deliver_date',
|
445
|
-
title: '制作完成时间',
|
446
|
-
width: 150,
|
447
|
-
align: 'center'
|
448
|
-
},
|
449
|
-
{
|
450
|
-
field: 'money',
|
451
|
-
title: '金额',
|
452
|
-
width: 150,
|
453
|
-
align: 'center'
|
454
|
-
},
|
455
|
-
{
|
456
|
-
field: 'time2',
|
457
|
-
title: '提交审核时间',
|
458
|
-
width: 150,
|
459
|
-
align: 'center'
|
460
|
-
},
|
461
|
-
{
|
462
|
-
field: 'feedback',
|
463
|
-
title: '审核反馈',
|
464
|
-
width: 150,
|
465
|
-
align: 'center'
|
466
|
-
},
|
467
|
-
{
|
468
|
-
field: 'shixun_producer',
|
469
|
-
title: '项目制作人',
|
470
|
-
width: 150,
|
471
|
-
align: 'center'
|
472
|
-
},
|
473
|
-
{
|
474
|
-
field: 'shixun_manages',
|
475
|
-
title: '课程组长',
|
476
|
-
width: 150,
|
477
|
-
align: 'center'
|
478
|
-
},
|
479
|
-
{
|
480
|
-
field: 'shixun_manages',
|
481
|
-
title: '课程组主管',
|
482
|
-
width: 150,
|
483
|
-
align: 'center'
|
484
|
-
},
|
485
|
-
{
|
486
|
-
field: 'shixun_staff',
|
487
|
-
title: '销售',
|
488
|
-
width: 150,
|
489
|
-
align: 'center'
|
490
|
-
},
|
491
|
-
{
|
492
|
-
title: '操作',
|
493
|
-
align: 'center',
|
494
|
-
width: 150,
|
495
|
-
fixed: 'right',
|
496
|
-
templet: "#shixun_table_bar"
|
689
|
+
localStorage.setItem("category",i)
|
690
|
+
|
691
|
+
var flag = true
|
692
|
+
for(let i = 0; i < money_cols_table[0].length; i ++){
|
693
|
+
if(money_cols_table[0][i].field === "money"){
|
694
|
+
flag = false
|
695
|
+
break
|
497
696
|
}
|
498
|
-
|
697
|
+
}
|
698
|
+
|
699
|
+
var is_admin = localStorage.getItem("is_admin-<%=session[:admin_id] %>")
|
700
|
+
if (flag && is_admin !== 'false' && data.category == 3 ){
|
701
|
+
hash = {field: 'money',title: '金额',width: 150, align: 'center',hide: gon.filter.money }
|
702
|
+
money_cols_table[0].splice(8, 0, hash)
|
703
|
+
}
|
499
704
|
table.reload('shixuns_table', {
|
500
705
|
page: {
|
501
706
|
curr: 1
|
502
707
|
},
|
503
|
-
cols:
|
504
|
-
where: {q: data}
|
708
|
+
cols: money_cols_table,
|
709
|
+
where: {q: data},
|
710
|
+
done:function (res, curr, count){
|
711
|
+
tableDataCount = count;
|
712
|
+
}
|
505
713
|
})
|
714
|
+
|
715
|
+
|
506
716
|
document.getElementById('shixun_nav_type_id').value = i
|
507
717
|
});
|
508
718
|
}
|