educode_sales 1.10.48 → 1.10.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/educode_sales/modules/easyeditor/easyeditor.css +130 -0
  3. data/app/assets/stylesheets/educode_sales/modules/easyeditor/fangge-style.css +4 -0
  4. data/app/controllers/educode_sales/application_controller.rb +22 -0
  5. data/app/controllers/educode_sales/business_courses_controller.rb +255 -0
  6. data/app/controllers/educode_sales/businesses_controller.rb +43 -7
  7. data/app/controllers/educode_sales/contracts_controller.rb +6 -0
  8. data/app/controllers/educode_sales/home_controller.rb +7 -0
  9. data/app/controllers/educode_sales/money_plan_records_controller.rb +6 -2
  10. data/app/controllers/educode_sales/money_plans_controller.rb +3 -0
  11. data/app/controllers/educode_sales/sale_trends_controller.rb +1 -1
  12. data/app/controllers/educode_sales/shixun_dectects_controller.rb +172 -0
  13. data/app/controllers/educode_sales/shixuns_controller.rb +218 -0
  14. data/app/controllers/educode_sales/subject_trends_controller.rb +144 -0
  15. data/app/controllers/educode_sales/subjects_controller.rb +213 -0
  16. data/app/helpers/educode_sales/application_helper.rb +10 -0
  17. data/app/helpers/educode_sales/business_courses_helper.rb +60 -0
  18. data/app/helpers/educode_sales/sale_trends_helper.rb +52 -52
  19. data/app/helpers/educode_sales/subject_helper.rb +33 -0
  20. data/app/models/educode_sales/business.rb +22 -0
  21. data/app/models/educode_sales/business_deliver_subject.rb +49 -0
  22. data/app/models/educode_sales/business_subject.rb +68 -0
  23. data/app/models/educode_sales/business_subject_shixun.rb +75 -0
  24. data/app/models/educode_sales/business_subject_staff.rb +36 -0
  25. data/app/models/educode_sales/permission.rb +2 -1
  26. data/app/models/educode_sales/shixun_dectect.rb +12 -0
  27. data/app/views/educode_sales/business_courses/edit.html.erb +174 -0
  28. data/app/views/educode_sales/business_courses/index.html.erb +334 -0
  29. data/app/views/educode_sales/business_courses/index.json.jbuilder +16 -0
  30. data/app/views/educode_sales/business_courses/list_shixuns.html.erb +292 -0
  31. data/app/views/educode_sales/business_courses/list_shixuns.json.jbuilder +23 -0
  32. data/app/views/educode_sales/business_courses/list_subjects.html.erb +212 -0
  33. data/app/views/educode_sales/business_courses/list_subjects.json.jbuilder +17 -0
  34. data/app/views/educode_sales/business_courses/new.html.erb +237 -0
  35. data/app/views/educode_sales/businesses/index.html.erb +11 -9
  36. data/app/views/educode_sales/contracts/_list.html.erb +16 -1
  37. data/app/views/educode_sales/contracts/index.html.erb +5 -2
  38. data/app/views/educode_sales/contracts/list.js.erb +4 -1
  39. data/app/views/educode_sales/money_plan_records/_index.html.erb +21 -5
  40. data/app/views/educode_sales/money_plan_records/index.js.erb +4 -1
  41. data/app/views/educode_sales/money_plans/list.html.erb +6 -2
  42. data/app/views/educode_sales/sale_trends/_return_money_forecast.html.erb +1 -1
  43. data/app/views/educode_sales/sale_trends/_user_stat.html.erb +1 -1
  44. data/app/views/educode_sales/sale_trends/_visit_analysis.html.erb +1 -1
  45. data/app/views/educode_sales/sale_trends/return_money_forecast.js.erb +1 -1
  46. data/app/views/educode_sales/sale_trends/trends.html.erb +6 -6
  47. data/app/views/educode_sales/sale_trends/user_stat.js.erb +1 -1
  48. data/app/views/educode_sales/sale_trends/visit_analysis.js.erb +1 -1
  49. data/app/views/educode_sales/shixun_dectects/index.html.erb +516 -0
  50. data/app/views/educode_sales/shixun_dectects/index.json.jbuilder +23 -0
  51. data/app/views/educode_sales/shixun_dectects/markdown.html.erb +60 -0
  52. data/app/views/educode_sales/shixuns/edit.html.erb +208 -0
  53. data/app/views/educode_sales/shixuns/index.html.erb +723 -0
  54. data/app/views/educode_sales/shixuns/index.json.jbuilder +26 -0
  55. data/app/views/educode_sales/shixuns/new.html.erb +261 -0
  56. data/app/views/educode_sales/subject_trends/trends.html.erb +676 -0
  57. data/app/views/educode_sales/subjects/edit.html.erb +86 -0
  58. data/app/views/educode_sales/subjects/index.html.erb +285 -0
  59. data/app/views/educode_sales/subjects/index.json.jbuilder +16 -0
  60. data/app/views/educode_sales/subjects/list_shixuns.html.erb +354 -0
  61. data/app/views/educode_sales/subjects/list_shixuns.json.jbuilder +22 -0
  62. data/app/views/educode_sales/subjects/new.html.erb +254 -0
  63. data/app/views/layouts/educode_sales/application.html.erb +38 -0
  64. data/config/routes.rb +37 -0
  65. data/lib/educode_sales/version.rb +1 -1
  66. metadata +42 -7
  67. data/app/assets/images/educode_sales/indexlogo.png +0 -0
@@ -1,4 +1,4 @@
1
- <div id="tab_9">
1
+ <div id="tab_7">
2
2
  <div class="" style="padding-right: 50px">
3
3
  <div style="margin: 10px 10px 10px 10px">
4
4
  <form class="layui-form layui-form-pane" lay-filter="search_form">
@@ -1,5 +1,5 @@
1
1
  <%= Gon::Base.render_data %>
2
- <div id="tab_7" lay-filter="test7">
2
+ <div id="tab_8" lay-filter="test7">
3
3
  <div class="" style="padding-right: 50px">
4
4
  <table class="layui-hide" id="table_7_year"></table>
5
5
  </div>
@@ -1,4 +1,4 @@
1
- <div id="tab_8">
1
+ <div id="tab_9">
2
2
  <div class="" style="padding-right: 50px">
3
3
  <div style="margin: 10px 10px 10px 10px">
4
4
  <form class="layui-form layui-form-pane" lay-filter="search_visit_form">
@@ -1 +1 @@
1
- $("#page_9").html("<%= j render 'return_money_forecast' %>");
1
+ $("#page_7").html("<%= j render 'return_money_forecast' %>");
@@ -6,9 +6,9 @@
6
6
  <li class="">商机区域分布</li>
7
7
  <li class="">销售人员跟进分析</li>
8
8
  <li class="">中标预测图</li>
9
+ <li class="">回款预测图</li>
9
10
  <li class="">用户分析</li>
10
11
  <li class="">拜访分析</li>
11
- <li class="">回款预测图</li>
12
12
  </ul>
13
13
  <div class="layui-tab-content">
14
14
  <div class="layui-tab-item layui-show">
@@ -141,7 +141,7 @@
141
141
  <div class="panel layui-bg-number">
142
142
  <div class="panel-body">
143
143
  <div class="panel-title">
144
- <h5>已回款<a href="/missions/businesses?name=(销售态势-<%=@year %>-已回款商机)&date_at=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
144
+ <h5>已回款<a href="/missions/money_plans/list?date_at=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
145
145
  </div>
146
146
  <div class="panel-content y-t-10">
147
147
  <h1 class="no-margins"><%= @return_amount %>万</h1>
@@ -192,7 +192,7 @@
192
192
  <div class="panel layui-bg-number">
193
193
  <div class="panel-body">
194
194
  <div class="panel-title">
195
- <h5>应收款<a href="/missions/businesses?name=(销售态势-<%=@year %>-应收款商机)&step=应收款&bidded_date_year=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
195
+ <h5>应收款<a href="/missions/contracts?date_at=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
196
196
  </div>
197
197
  <div class="panel-content y-t-10">
198
198
  <h1 class="no-margins"><%= @receivable_amount.round(2) %>万</h1>
@@ -271,11 +271,11 @@
271
271
  } else if (data.index == 5 && $("#tab_6").length == 0) {
272
272
  loadPage('/missions/sale_trends/goal_forecast')
273
273
  } else if (data.index == 6 && $("#tab_7").length == 0) {
274
- loadPage('/missions/sale_trends/user_stat')
274
+ loadPage('/missions/sale_trends/return_money_forecast')
275
275
  } else if (data.index == 7 && $("#tab_8").length == 0) {
276
- loadPage('/missions/sale_trends/visit_analysis')
276
+ loadPage('/missions/sale_trends/user_stat')
277
277
  } else if (data.index == 8 && $("#tab_9").length == 0) {
278
- loadPage('/missions/sale_trends/return_money_forecast')
278
+ loadPage('/missions/sale_trends/visit_analysis')
279
279
  }
280
280
  });
281
281
 
@@ -1 +1 @@
1
- $("#page_7").html("<%= j render 'user_stat' %>");
1
+ $("#page_8").html("<%= j render 'user_stat' %>");
@@ -1 +1 @@
1
- $("#page_8").html("<%= j render 'visit_analysis' %>");
1
+ $("#page_9").html("<%= j render 'visit_analysis' %>");
@@ -0,0 +1,516 @@
1
+ <!-- 图标 -->
2
+ <style>
3
+ .markdown_list img {
4
+ max-width: 700px;
5
+ }
6
+
7
+ .layui-table-cell {
8
+ height: auto !important;
9
+ width: auto;
10
+ white-space: normal;
11
+ /*line-height: 28px;*/
12
+ }
13
+ </style>
14
+ <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1531710_xb357ub1wmg.css"/>
15
+ <style>
16
+ .inner_div {
17
+ margin-bottom: 10px;
18
+ margin-right: 10px;
19
+ }
20
+ </style>
21
+ <div class="layui-tab" style="margin: 10px">
22
+ <ul class="layui-tab-title">
23
+ <li id="index_1" class="layui-this" lay-id="11">待审核</li>
24
+ <li id="index_2" lay-id="22">已审核</li>
25
+
26
+ </ul>
27
+ <div class="layui-tab-content">
28
+ <div>
29
+ <form class="layui-form layui-form-pane" lay-filter="search_form">
30
+ <div class="layui-inline show_item_contract inner_div">
31
+ <label class="layui-form-label">任务类型</label>
32
+ <div class="layui-input-inline">
33
+ <%= select_tag "category", options_for_select(
34
+ [["全部", 0], ["管培", 1], ["全职", 2], ["专职", 3]], selected: 0
35
+ ), { include_blank: true } %>
36
+ </div>
37
+ </div>
38
+ <div id="shixun_dectect_type_form" style="display: none" class="layui-inline show_item_contract inner_div">
39
+ <label class="layui-form-label">审核状态</label>
40
+ <div class="layui-input-inline">
41
+ <%= select_tag "dectect_type", options_for_select(
42
+ [["全部", 0], ["已通过", 1], ["已驳回", 2]], selected: 0
43
+ ), { include_blank: true } %>
44
+ </div>
45
+ </div>
46
+ <div class="layui-inline borders inner_div">
47
+ <label class="layui-form-label" style="width: 130px">实践项目名称</label>
48
+ <div class="layui-input-inline">
49
+ <input type="text" class="layui-input" name="shixun_name">
50
+ </div>
51
+ </div>
52
+ <div class="layui-inline borders inner_div">
53
+ <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_business_search">重置
54
+ </button>
55
+ <button type="submit" id="search_bt" class="layui-btn layui-btn-primary" lay-submit lay-filter="search_contract">搜索
56
+ </button>
57
+ </div>
58
+ </form>
59
+ </div>
60
+
61
+ <div id="contact_table_wraper">
62
+ <table class="layui-hide" id="shixun_dectects_table" lay-filter="shixun_dectects_table"></table>
63
+ </div>
64
+
65
+
66
+ </div>
67
+ </div>
68
+
69
+ <script type="text/html" id="shixun_table_bar">
70
+ <a class="layui-btn layui-btn-xs data-count-edit" lay-event="pass">通过</a>
71
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit layui-bg-red" lay-event="reject">驳回</a>
72
+ {{# if(d.audit_history.length > 0){ }}
73
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit layui-bg-blue" lay-event="info">详情</a>
74
+ {{# } }}
75
+ </script>
76
+
77
+ <script type="text/html" id="shixun_dectect_type">
78
+ {{# if(d.dectect_type === 1){ }}
79
+ <span style="color: green">已通过</span>
80
+ {{# } else if(d.dectect_type === 2){ }}
81
+ <span style="color: red">已驳回</span>
82
+
83
+ {{# } }}
84
+ </script>
85
+ <script type="text/html" id="category_list">
86
+ {{# if(d.category === 1){ }}
87
+ <span>管培</span>
88
+ {{# } else if(d.category === 2){ }}
89
+ <span>全职</span>
90
+ {{# } else if(d.category === 3){ }}
91
+ <span>专职</span>
92
+ {{# } }}
93
+ </script>
94
+
95
+ <script type="text/html" id="show_level">
96
+ {{# if(d.level === 1){ }}
97
+ <span>不明确</span>
98
+ {{# } else if(d.level === 2){ }}
99
+ <span>重要紧急</span>
100
+ {{# } else if(d.level === 3){ }}
101
+ <span>重要不紧急</span>
102
+ {{# } else if(d.level === 4){ }}
103
+ <span>不重要紧急</span>
104
+ {{# } else if(d.level === 5){ }}
105
+ <span>不重要不紧急</span>
106
+ {{# } }}
107
+ </script>
108
+ <script type="text/html" id="aherf">
109
+ {{# if(d.identifier !== null && d.identifier !== ''){ }}
110
+ <a target="_blank" style="color:deepskyblue" href="<%= @url %>/shixuns/{{= d.identifier}}/challenges">{{=d.shixun_name}}</a>
111
+ {{# } else { }}
112
+ <a style="color:deepskyblue">{{=d.shixun_name}}</a>
113
+ {{# } }}
114
+ </script>
115
+ <script type="text/html" id="show_state">
116
+ {{# if(d.shixun_status === 1){ }}
117
+ <span>待建设</span>
118
+ {{# } else if(d.shixun_status === 2){ }}
119
+ <span>已签协议</span>
120
+ {{# } else if(d.shixun_status === 3){ }}
121
+ <span>建设中</span>
122
+ {{# } else if(d.shixun_status === 4){ }}
123
+ <span>审核中</span>
124
+ {{# } else if(d.shixun_status === 5){ }}
125
+ <span>返修中</span>
126
+ {{# } else if(d.shixun_status === 6){ }}
127
+ <span>已内部发布</span>
128
+ {{# } else if(d.shixun_status === 7){ }}
129
+ <span>已公开发布</span>
130
+ {{# } }}
131
+ </script>
132
+ <script src="/markdown/marked.min.js" type="text/javascript" charset="utf-8"></script>
133
+ <script>
134
+ function extractFirstTenCharsAndImage(markdownText) {
135
+ let firstTenChars = '';
136
+ let imageTag = '';
137
+ // 行内图片的正则表达式
138
+ const inlineImageRegex = /!\[.*?\]\((.*?)\)/g;
139
+ // 处理行内图片
140
+ markdownText = markdownText.replace(inlineImageRegex, (_, imagePath) => {
141
+ // 如果匹配到行内图片,则生成图片标签,并将匹配的图片部分替换为空字符串
142
+ imageTag = `<img style="max-height: 100px" src="${imagePath}" />`;
143
+ return '';
144
+ });
145
+ // 去除Markdown格式,只保留纯文本内容
146
+ const pureText = markdownText.replace(/(^|\n)(\d+\.|)\s*/g, '$1').trim();
147
+ // 获取前十个字符
148
+ firstTenChars = pureText.substring(0, 10);
149
+ // 输出结果
150
+ return `<div lay-event="show_markdown"><p>${firstTenChars}</p> ${imageTag}</div>`
151
+ }
152
+
153
+
154
+ layui.config({
155
+ base: '/markdown/mods/' //存放layui拓展模块的目录位置
156
+ }).use(['form', 'table', 'miniPage', 'element', 'laydate', 'dropdown', 'easyeditor'], function () {
157
+ var laydate = layui.laydate,
158
+ form = layui.form,
159
+ table = layui.table,
160
+ miniPage = layui.miniPage,
161
+ easyeditor = layui.easyeditor
162
+ easyeditor.render({
163
+ elem: ".easyeditor-content"
164
+ });
165
+ var cols_table = [
166
+ [
167
+ {
168
+ field: 'id',
169
+ minWidth: 60,
170
+ title: '序号',
171
+ type: 'numbers',
172
+ align: 'center'
173
+ },
174
+ {
175
+ field: 'category',
176
+ title: '标签',
177
+ align: 'center',
178
+ templet: '#category_list',
179
+ },
180
+ {
181
+ field: 'school_name',
182
+ title: '交付单位',
183
+ align: 'center',
184
+ minWidth: 100
185
+
186
+ },
187
+ {
188
+ title: '实践项目名称',
189
+ minWidth: 200,
190
+ align: 'center',
191
+ templet: "#aherf"
192
+ },
193
+ {
194
+ field: 'shixun_producer',
195
+ title: '实训制作人',
196
+ minWidth: 200,
197
+ align: 'center'
198
+ },
199
+ {
200
+ field: 'shixun_manages',
201
+ title: '课程组长',
202
+ minWidth: 200,
203
+ align: 'center'
204
+ },
205
+ {
206
+ field: 'level',
207
+ title: '项目级别',
208
+ width: 150,
209
+ align: 'center',
210
+ templet: '#show_level'
211
+ },
212
+ {
213
+ field: 'deliver_date',
214
+ title: '交付时间',
215
+ width: 180,
216
+ align: 'center'
217
+ },
218
+ {
219
+ field: 'deliver_money',
220
+ title: '金额',
221
+ minWidth: 100,
222
+ align: 'center'
223
+ },
224
+ {
225
+ field: 'shixun_status',
226
+ title: '项目状态',
227
+ align: 'center',
228
+ minWidth: 100,
229
+ templet: '#show_state'
230
+ },
231
+ {
232
+ title: '操作',
233
+ width: 200,
234
+ toolbar: '#shixun_table_bar',
235
+ align: "center",
236
+ }
237
+ ]
238
+ ]
239
+ var data = form.val("search_form");
240
+ //默认显示待审核的
241
+ data.index = 1
242
+ table.render({
243
+ elem: '#shixun_dectects_table',
244
+ where: {q: data},
245
+ url: '/missions/shixun_dectects',
246
+ cellMinWidth: 80,
247
+ cols: cols_table,
248
+ limit: 10,
249
+ limits: [10, 15, 20, 30, 40, 50, 60, 70, 80, 90],
250
+ page: true
251
+ })
252
+ var sort = {}, search = {};
253
+ // 监听搜索操作
254
+ form.on('submit(search_contract)', function (data) {
255
+ search = data.field
256
+ var index = localStorage.getItem("index")
257
+ search.index = index
258
+ table.reload('shixun_dectects_table', {
259
+ page: {
260
+ curr: 1
261
+ },
262
+ where: {q: search, sort: sort}
263
+ }, 'data');
264
+ return false;
265
+ });
266
+ // 重置
267
+ form.on('submit(reset_business_search)', function (data) {
268
+ var index = localStorage.getItem("index")
269
+ table.reload('shixun_dectects_table', {
270
+ page: {
271
+ curr: 1
272
+ },
273
+ where: {
274
+ q: {
275
+ index: index
276
+ }
277
+ }
278
+ }, 'data');
279
+ $(".layui-form")[0].reset();
280
+ form.render()
281
+ return false;
282
+ });
283
+
284
+ table.on('tool(shixun_dectects_table)', function (obj) {
285
+ var data = obj.data;
286
+ // 编辑按钮监听
287
+ if (obj.event === 'pass') {
288
+ data.type = 1
289
+ $.ajax('/missions/shixun_dectects/examine', {
290
+ method: 'PUT',
291
+ data: data,
292
+ dataType: 'json',
293
+ success: function (res) {
294
+ var data = res.data;
295
+ if (res.success) {
296
+ table.reload('shixun_dectects_table', {
297
+ page: {
298
+ curr: 1
299
+ },
300
+ cols: cols_table,
301
+ where: {q: data}
302
+ })
303
+ }
304
+ }
305
+ })
306
+ return false;
307
+ } else if (obj.event === 'reject') {
308
+ data.type = 2
309
+
310
+ localStorage.setItem("reject_id", data.id)
311
+ var content = miniPage.getHrefContent('/missions/shixun_dectects/markdown');
312
+ var openWH = miniPage.getOpenWidthHeight();
313
+
314
+ var edit = layer.open({
315
+ title: '拒绝原因',
316
+ type: 1,
317
+ shade: 0.2,
318
+ maxmin: true,
319
+ shadeClose: false,
320
+ area: ['900px', '550px'],
321
+ // offset: [openWH[2] + 'px', openWH[3] + 'px'],
322
+ content: content
323
+ });
324
+ $(window).on("resize", function () {
325
+ });
326
+ return false;
327
+ } else if (obj.event === 'info') {
328
+ var text = `<div class="layui-timeline" style="margin: 40px">`
329
+ data.audit_history.forEach((item) => {
330
+ text += `<div class="layui-timeline-item">
331
+ <i class="layui-icon layui-timeline-axis"></i>
332
+ <div class="layui-timeline-content layui-text">
333
+ <h3 class="layui-timeline-title">` + new Date(item.created_at).toLocaleString('zh-CN') +
334
+ `-----` + item.examine_name + `</h3>
335
+ <p>
336
+ 审核状态:驳回
337
+ </p>
338
+ <p>
339
+ 拒绝原因:
340
+ <div class="markdown_list" >` + item.content + `</div>
341
+ </p>
342
+ </div>
343
+ </div>`
344
+ })
345
+ text += `</div>`
346
+
347
+ layer.open({
348
+ type: 1,
349
+ title: '审核记录',
350
+ area: ['900px', '500px'], // 宽高
351
+ content: text,
352
+ move: '#ID-test-layer-move'
353
+ });
354
+ easyeditor.render({
355
+ elem: ".markdown_list"
356
+ });
357
+ return false
358
+ } else if (obj.event === 'show_markdown') {
359
+ if (data.content !== '--') {
360
+ var text = `<div class="markdown_list" style="margin: 50px" >` + data.content + `</div>`
361
+ layer.open({
362
+ type: 1,
363
+ title: '审核反馈',
364
+ area: ['900px', '700px'], // 宽高
365
+ content: text,
366
+ move: '#ID-test-layer-move'
367
+ });
368
+ easyeditor.render({
369
+ elem: ".markdown_list"
370
+ });
371
+ }
372
+ }
373
+
374
+ });
375
+
376
+ form.on('submit(shixun_dectects_table)', function (data) {
377
+ search = data.field
378
+ table.reload('table', {
379
+ page: {
380
+ curr: 1
381
+ },
382
+ where: {q: search, sort: sort}
383
+ }, 'data');
384
+ return false;
385
+ });
386
+ $("#shixun_dectect_type_form").hide()
387
+ //控制顶部的待审核 和已审核
388
+ for (let i = 1; i <= 2; i++) {
389
+
390
+ if (i !== 2) {
391
+ $("#index_" + i).click(function () {
392
+ $(".layui-form")[0].reset();
393
+ $("#shixun_dectect_type_form").hide()
394
+ data.index = i
395
+ localStorage.setItem("index", i)
396
+ table.reload('shixun_dectects_table', {
397
+ page: {
398
+ curr: 1
399
+ },
400
+ cols: cols_table,
401
+ where: {q: data}
402
+ })
403
+ });
404
+ } else {
405
+ $("#index_" + i).click(function () {
406
+ $(".layui-form")[0].reset();
407
+ $("#shixun_dectect_type_form").show()
408
+ localStorage.setItem("index", i)
409
+ var arr = [
410
+ [
411
+ {
412
+ field: 'id',
413
+ minWidth: 60,
414
+ title: '序号',
415
+ type: 'numbers',
416
+ align: 'center'
417
+ },
418
+ {
419
+ field: 'category',
420
+ title: '标签',
421
+ align: 'center',
422
+ templet: '#category_list',
423
+ },
424
+ {
425
+ field: 'school_name',
426
+ title: '交付单位',
427
+ align: 'center',
428
+ minWidth: 100
429
+
430
+ },
431
+ {
432
+ title: '实践项目名称',
433
+ minWidth: 200,
434
+ align: 'center',
435
+ templet: "#aherf"
436
+ },
437
+ {
438
+ field: 'shixun_manages',
439
+ title: '课程负责人',
440
+ minWidth: 200,
441
+ align: 'center'
442
+ },
443
+ {
444
+ field: 'shixun_producer',
445
+ title: '实训制作人',
446
+ minWidth: 200,
447
+ align: 'center'
448
+ },
449
+ {
450
+ field: 'level',
451
+ title: '项目级别',
452
+ width: 150,
453
+ align: 'center',
454
+ templet: '#show_level'
455
+ },
456
+ {
457
+ field: 'deliver_date',
458
+ title: '交付时间',
459
+ width: 180,
460
+ align: 'center'
461
+ },
462
+ {
463
+ field: 'deliver_money',
464
+ title: '金额',
465
+ minWidth: 100,
466
+ align: 'center'
467
+ },
468
+ {
469
+ field: 'real_name',
470
+ title: '审核人',
471
+ align: 'center',
472
+ minWidth: 100,
473
+ },
474
+ {
475
+ title: '审核反馈',
476
+ templet: (d) => {
477
+ if (d.dectect_type === 2) {
478
+ return extractFirstTenCharsAndImage(d.content)
479
+ }
480
+ return ''
481
+ },
482
+ align: 'center',
483
+ minWidth: 100,
484
+ },
485
+ {
486
+ title: '状态',
487
+ width: 200,
488
+ toolbar: '#shixun_dectect_type',
489
+ align: "center",
490
+ }
491
+ ]
492
+ ]
493
+
494
+
495
+ data.index = i
496
+ table.reload('shixun_dectects_table', {
497
+ page: {
498
+ curr: 1
499
+ },
500
+ cols: arr,
501
+ where: {q: data},
502
+ success: (res) => {
503
+ easyeditor.render({
504
+ elem: ".markdown_list"
505
+ });
506
+ }
507
+ })
508
+
509
+ });
510
+ }
511
+
512
+ }
513
+
514
+
515
+ });
516
+ </script>
@@ -0,0 +1,23 @@
1
+ json.data do
2
+ json.array! @shixun_dectects do |d|
3
+ json.audit_history d.audit_history
4
+ json.content d.content
5
+ json.shixun_manages d.shixun_manages
6
+ json.shixun_producer d.shixun_producer
7
+ json.shixun_staff d.shixun_staff
8
+ json.type d.shixun_type
9
+ json.deliver_date handled_time_data @times["#{d.id}"]
10
+ json.deliver_money handled_data d.deliver_money
11
+ json.category d.category
12
+ json.school_name handled_data d.shixun_school
13
+ json.shixun_name d.shixun_name
14
+ json.shixun_status d.shixun_status
15
+ json.real_name d.real_name
16
+ json.dectect_type d.dectect_type
17
+ json.level d.level
18
+ json.identifier d.identifier
19
+ json.id d.id
20
+ end
21
+ end
22
+ json.code 0
23
+ json.count @shixun_dectects.total_count
@@ -0,0 +1,60 @@
1
+ <div style="margin: 20px;margin-bottom: 50px">
2
+ <p style="font-size: 30px;margin-bottom: 10px">原因:</p>
3
+ <div>
4
+ <form class="layui-form layui-form-pane" lay-filter="search_form">
5
+ <textarea id="L_content" name="content" style="" required lay-verify="required" class="layui-textarea editor"></textarea>
6
+ </form>
7
+ </div>
8
+
9
+ <div style="margin: 20px;float: right">
10
+ <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认</button>
11
+ <button class="layui-btn layui-btn-normal" lay-submit lay-filter="exit">取消</button>
12
+ </div>
13
+ </div>
14
+ <script src="/markdown/marked.min.js" type="text/javascript" charset="utf-8"></script>
15
+ <script>
16
+ layui.config({
17
+ base: '/markdown/mods/' //存放layui拓展模块的目录位置
18
+ }).use(['easyeditor','form','table'], function () {
19
+ var table = layui.table
20
+ var easyeditor = layui.easyeditor;
21
+ var form = layui.form
22
+ //初始化Markdown编辑器
23
+ easyeditor.init({
24
+ elem: '.editor' //textarea 元素class
25
+ , uploadUrl: '/api/attachments/' //图片上传地址
26
+ , uploadSize: '1024 * 10' //限制的上传大小 单位kb 默认 1024k
27
+
28
+ });
29
+ form.on('submit(saveBtn)', function (data) {
30
+ console.log(form.val())
31
+ var id = localStorage.getItem("reject_id")
32
+
33
+ let new_data = form.val();
34
+ new_data.type = 2
35
+ new_data.id = id
36
+ $.ajax('/missions/shixun_dectects/examine', {
37
+ method: 'PUT',
38
+ data: new_data,
39
+ dataType: 'json',
40
+ success: function (res) {
41
+ if (res.success) {
42
+ layer.closeAll();
43
+ table.reload('shixun_dectects_table', {
44
+ done: function () {
45
+ }
46
+ });
47
+ }
48
+ },
49
+ error: function (res) {
50
+ layer.msg('更新失败');
51
+ }
52
+ })
53
+ });
54
+
55
+ form.on('submit(exit)', function (data) {
56
+ layer.closeAll()
57
+ });
58
+
59
+ });
60
+ </script>