educode_sales 0.9.42 → 0.9.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,15 +16,15 @@
16
16
  <div class="layui-inline">
17
17
  <label class="layui-form-label">负责人</label>
18
18
  <div class="layui-input-inline">
19
- <%= select_tag "staff_id", options_for_select(@staffs,params[:staff_id]), { include_blank: true } %>
19
+ <%= select_tag "staff_id", options_for_select(@staffs, params[:staff_id]), { include_blank: true } %>
20
20
  </div>
21
21
  </div>
22
- <!-- <div class="layui-inline">-->
23
- <!-- <label class="layui-form-label">最后跟进</label>-->
24
- <!-- <div class="layui-input-inline">-->
25
- <!-- <input type="text" class="layui-input" id="date" name="date" placeholder=" - ">-->
26
- <!-- </div>-->
27
- <!-- </div>-->
22
+ <!-- <div class="layui-inline">-->
23
+ <!-- <label class="layui-form-label">最后跟进</label>-->
24
+ <!-- <div class="layui-input-inline">-->
25
+ <!-- <input type="text" class="layui-input" id="date" name="date" placeholder=" - ">-->
26
+ <!-- </div>-->
27
+ <!-- </div>-->
28
28
  <div class="layui-inline">
29
29
  <label class="layui-form-label">性质</label>
30
30
  <div class="layui-input-inline">
@@ -34,7 +34,8 @@
34
34
  <div class="layui-inline">
35
35
  <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_business_search">重置
36
36
  </button>
37
- <button type="submit" class="layui-btn layui-btn-primary" id="search_bt" lay-submit lay-filter="search_teachers">搜
37
+ <button type="submit" class="layui-btn layui-btn-primary" id="search_bt" lay-submit lay-filter="search_teachers">搜
38
+
38
39
  </button>
39
40
  </div>
40
41
  </div>
@@ -48,7 +49,7 @@
48
49
  <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add">添加客户</button>
49
50
  <% end %>
50
51
  <% if can? :give, EducodeSales::Customer %>
51
- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="give">分配/移交</button>
52
+ <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="give">分配/移交</button>
52
53
  <% end %>
53
54
  </button>
54
55
  </div>
@@ -61,17 +62,17 @@
61
62
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_department">添加部门</a>
62
63
  <% end %>
63
64
  <% if can? :create_follow, EducodeSales::Customer %>
64
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_follow">添加跟进记录</a>
65
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_follow">添加跟进记录</a>
65
66
  <% end %>
66
67
  <% if can? :update, EducodeSales::Customer %>
67
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
68
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
68
69
  <% end %>
69
70
  </script>
70
71
  <script type="text/html" id="business">
71
- <a href="/missions/businesses?school={{d.name}}" class="layui-table-link">{{ d.business }}</a>
72
+ <a href="/missions/businesses?school={{d.name}}" class="layui-table-link">{{ d.business }}</a>
72
73
  </script>
73
74
  <script type="text/html" id="name">
74
- <a href="<%= base_url%>/colleges/{{d.id}}/statistics" class="layui-table-link" target="_blank">{{ d.name }}</a>
75
+ <a href="<%= base_url %>/colleges/{{d.id}}/statistics" class="layui-table-link" target="_blank">{{ d.name }}</a>
75
76
  </script>
76
77
  <script type="text/html" id="department">
77
78
  <a href="javascript:void(0);" lay-event="department" class="layui-table-link">{{ d.department }}</a>
@@ -101,15 +102,7 @@
101
102
 
102
103
  var property_list = xmSelect.render({
103
104
  el: '#property',
104
- data: [
105
- {value: 0, name: '985工程'},
106
- {value: 1, name: '211工程'},
107
- {value: 2, name: '本科院校'},
108
- {value: 3, name: '大专院校'},
109
- {value: 4, name: '中专学校'},
110
- {value: 5, name: '军事院校'},
111
- {value: 6, name: '企业'}
112
- ]
105
+ data: gon.school_tags
113
106
  })
114
107
 
115
108
  laydate.render({
@@ -191,7 +184,7 @@
191
184
  ],
192
185
 
193
186
  limit: 20,
194
- limits: [10,15,20,30,40,50,60,70,80,90],
187
+ limits: [10, 15, 20, 30, 40, 50, 60, 70, 80, 90],
195
188
  page: true,
196
189
  });
197
190
 
@@ -200,7 +193,6 @@
200
193
  });
201
194
 
202
195
 
203
-
204
196
  function edit(id) {
205
197
  var content = miniPage.getHrefContent('/missions/teachers/' + id + '/edit');
206
198
  var openWH = miniPage.getOpenWidthHeight();
@@ -262,7 +254,7 @@
262
254
  // 监听搜索操作
263
255
  form.on('submit(search_teachers)', function (data) {
264
256
  var property = [];
265
- property_list.getValue().forEach(function(d) {
257
+ property_list.getValue().forEach(function (d) {
266
258
  property.push(d.value);
267
259
  })
268
260
  data.field.property = property.toString();
@@ -314,15 +306,15 @@
314
306
  $(window).on("resize", function () {
315
307
  layer.full(index);
316
308
  });
317
- }else if (obj.event === 'give') { //
309
+ } else if (obj.event === 'give') { //
318
310
  var school_ids = []
319
311
  var checkStatus = table.checkStatus('customers_table')
320
- ,data = checkStatus.data;
321
- for (var i=0,len=data.length; i<len; i++){
312
+ , data = checkStatus.data;
313
+ for (var i = 0, len = data.length; i < len; i++) {
322
314
  school_ids.push(data[i].id)
323
315
  }
324
316
  ids = school_ids
325
- if(ids.length == 0){
317
+ if (ids.length == 0) {
326
318
  layer.msg('请选择客户')
327
319
  return
328
320
  }
@@ -361,7 +353,6 @@
361
353
  });
362
354
 
363
355
 
364
-
365
356
  table.on('tool(customers_table)', function (obj) {
366
357
  var data = obj.data;
367
358
  id = data.id
@@ -427,7 +418,7 @@
427
418
 
428
419
  } else if (obj.event === 'courses') {
429
420
  teacher_id = data.id
430
- content = miniPage.getHrefContent('/missions/teachers/add_courses?id='+data.id);
421
+ content = miniPage.getHrefContent('/missions/teachers/add_courses?id=' + data.id);
431
422
  openWH = miniPage.getOpenWidthHeight();
432
423
  index = layer.open({
433
424
  title: '课程方向',
@@ -487,7 +478,7 @@
487
478
  $(window).on("resize", function () {
488
479
  layer.full(index);
489
480
  });
490
- } else if (obj.event === 'follow' || obj.event === 'name' ||obj.event === 'department' ) {
481
+ } else if (obj.event === 'follow' || obj.event === 'name' || obj.event === 'department') {
491
482
  id = data.id
492
483
  time = data.last_follow_time || ''
493
484
  content = miniPage.getHrefContent('/missions/customers/show_follow?id=' + data.id);
@@ -515,7 +506,8 @@
515
506
  });
516
507
  </script>
517
508
  <style>
518
- .layui-table-tool-temp{
519
- padding-right: 30px; !important;
509
+ .layui-table-tool-temp {
510
+ padding-right: 30px;
511
+ !important;
520
512
  }
521
513
  </style>
@@ -1,7 +1,7 @@
1
1
  x = EducodeSales::Common.find_by(extras: EducodeSales::Common::XTYPE)&.id
2
2
  json.data do
3
3
  json.array! @customers do |d|
4
- business_ids = EducodeSales::Business.where(school_id: d.id).ids
4
+ business_ids = EducodeSales::Business.where(school_id: d.id).ids
5
5
  follow_ups = EducodeSales::FollowUp.where(business_id: business_ids)
6
6
  customer_follows = EducodeSales::CustomerFollow.where(school_id: d.id)
7
7
  a_last_follow_time = follow_ups.last&.created_at&.to_s
@@ -14,18 +14,21 @@ json.data do
14
14
  json.id d.id
15
15
  json.name d.name
16
16
  json.area d.province
17
- school_property = d.school_property
18
- property = []
19
- if school_property.present?
20
- property << '985工程' if school_property.project_985
21
- property << '211工程' if school_property.project_211
22
- property << '本科院校' if school_property.regular_college
23
- property << '大专院校' if school_property.junior_college
24
- property << '中专学校' if school_property.secondary_school
25
- property << '军事院校' if school_property.military_school
26
- property << '企业' if school_property.enterprise
27
- end
28
- json.property property.join("、")
17
+ # school_property = d.school_property
18
+ # property = []
19
+ # if school_property.present?
20
+ # # property << '985工程' if school_property.project_985
21
+ # # property << '211工程' if school_property.project_211
22
+ # property << '本科院校' if school_property.regular_college
23
+ # property << '大专院校' if school_property.junior_college
24
+ # property << '中专学校' if school_property.secondary_school
25
+ # property << '军事院校' if school_property.military_school
26
+ # property << '企业' if school_property.enterprise
27
+ # property << '小学' if school_property.ele_school
28
+ # property << '中学' if school_property.mid_school
29
+ # property << '其他' if school_property.other
30
+ # end
31
+ json.property d.school_tags.where(for_missions: true).pluck(:name).join("、")
29
32
  json.department d.departments.size
30
33
  json.business EducodeSales::Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_businesses.school_id = ?", d.id).size
31
34
  json.follow follow_ups.size + customer_follows.size
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.9.42'
2
+ VERSION = '0.9.44'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: educode_sales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.42
4
+ version: 0.9.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2023-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails