educode_sales 0.5.6 → 0.5.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3990eb5d7556c5bab5819c03981769a0385a28d52a8357ca8116cc1083ab6d0
4
- data.tar.gz: 073e8a50229f8a39a2966fdfad84bd177efceb1101e82c6553dbc3fc905542b2
3
+ metadata.gz: ef5373cd46335d53f4f5062b2ac750c01fa8797ddf1626c4373c6997e5e1fa9f
4
+ data.tar.gz: f27164e66b64b22b5b0c889ffb3c5c2c6567559f490a00e4af8a32f4298841dd
5
5
  SHA512:
6
- metadata.gz: 7fefe63cc01a8977e73b6f4f758aee060afe88f6c9706effda0e61ec0ab4cf38a21fa5a825e2ccf7420940a17d3712c91ac2e9a9a5268040d897dae24df55197
7
- data.tar.gz: 03a089117cb9d969c68e38fb91904983dd978c459a33e8d0a03264355852e3716044fd85e280f5f9d62d54445332e516f4a0d0f324178305d8d988dd8ca3365a
6
+ metadata.gz: a9d42047fdaeba4c49096c40dd92b9d33ed77f84ef7a65410f34bab1a0408be55c7db38caa5e30aab0456d1b93af4db2a0c79c953dfdfd9f39579f26e5a1cef2
7
+ data.tar.gz: 2850fa03b263d9a06f0d2af5c9649b9ccd30719a58e5a0f0dac41bb2b495c2745e2ed1b8711ecabdac249166c75dadec3d26b7219800398ee7ff219c6fa167c7
@@ -18,13 +18,13 @@ module EducodeSales
18
18
  business_ids = Business.joins(last_follow_up: :assign_follow_ups).where("educode_sales_assign_follow_ups.staff_id = ?", @current_admin.id).pluck(:id)
19
19
  @businesses = Business.where("educode_sales_businesses.staff_id = ? OR educode_sales_businesses.id in (?)", @current_admin.id, business_ids)
20
20
  business_ids = @businesses.pluck(:id)
21
- @follow_ups = @follow_ups.where(business_id: business_ids)
21
+ @follow_ups = FollowUp.where(business_id: business_ids)
22
22
  when '区域'
23
23
  school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id)
24
24
  business_ids = Business.joins(last_follow_up: :assign_follow_ups).where("educode_sales_assign_follow_ups.staff_id = ?", @current_admin.id).pluck(:id)
25
25
  @businesses = Business.joins("JOIN departments ON educode_sales_businesses.department_id = departments.id").where("departments.school_id in (?) OR educode_sales_businesses.staff_id = #{@current_admin.id} OR educode_sales_businesses.id in (?)", school_ids, business_ids)
26
26
  business_ids = @businesses.pluck(:id)
27
- @follow_ups = @follow_ups.where(business_id: business_ids)
27
+ @follow_ups = FollowUp.where(business_id: business_ids)
28
28
  else
29
29
  @follow_ups = FollowUp.all
30
30
  end
@@ -45,18 +45,19 @@ module EducodeSales
45
45
  when '自己'
46
46
  @teachers = Teacher.where(is_key: false)
47
47
  @teachers = @teachers.where(staff_id: @current_admin.id)
48
+ teacher_ids = EducodeSales::Teacher.where(staff_id: 0).pluck(:id) - EducodeSales::TeacherAssignFollow.all.pluck(:Teacher_id) + EducodeSales::TeacherAssignFollow.where(staff_id: @current_admin.id).pluck(:teacher_id) + @teachers.ids
49
+ @teachers = Teacher.where(id: teacher_ids)
48
50
  when '区域'
49
51
  school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id)
50
52
  @teachers = Teacher.joins("JOIN departments ON educode_sales_teachers.department_id = departments.id").where(is_key: false).where("departments.school_id in (?) OR educode_sales_teachers.staff_id = #{@current_admin.id}", school_ids)
53
+ teacher_ids = EducodeSales::Teacher.where(staff_id: 0).pluck(:id) - EducodeSales::TeacherAssignFollow.all.pluck(:Teacher_id) + EducodeSales::TeacherAssignFollow.where(staff_id: @current_admin.id).pluck(:teacher_id) + @teachers.ids
54
+ @teachers = Teacher.where(id: teacher_ids)
51
55
  else
52
56
  @teachers = Teacher.where(is_key: false)
53
57
  end
54
58
  end
55
59
 
56
- public_teacher_ids = EducodeSales::Teacher.where(staff_id: 0).pluck(:id) - EducodeSales::TeacherAssignFollow.all.pluck(:Teacher_id)
57
- teacher_ids = @teachers.ids
58
- teacher_ids = teacher_ids + public_teacher_ids + EducodeSales::TeacherAssignFollow.where(staff_id: @current_admin.id).pluck(:teacher_id)
59
- @teachers = @teachers.where(id: teacher_ids)
60
+
60
61
 
61
62
  if params[:q].present? && params[:q][:assist].present?
62
63
  staff_id = params[:q][:assist].to_i
@@ -74,9 +75,9 @@ module EducodeSales
74
75
  end
75
76
  if params[:q].present? && params[:q][:status].present?
76
77
  if params[:q][:status] == "1"
77
- @teachers = @teachers.where("educode_sales_teachers.regist_at is not null AND educode_sales_teachers.user_id is not null")
78
+ @teachers = @teachers.where("educode_sales_teachers.user_id is not null")
78
79
  else
79
- @teachers = @teachers.where("educode_sales_teachers.regist_at is null OR educode_sales_teachers.user_id is null")
80
+ @teachers = @teachers.where("educode_sales_teachers.user_id is null")
80
81
  end
81
82
  end
82
83
  if params[:q].present? && params[:q][:attitude].present?
@@ -77,7 +77,7 @@
77
77
  </div>
78
78
  </div>
79
79
  <br>
80
- <div class="layui-inline">
80
+ <div class="layui-inline place_select">
81
81
  <label class="layui-form-label">渠道</label>
82
82
  <div class="layui-input-inline" style="z-index: 101">
83
83
  <div id="edit_place" style="width: 190px;"></div>
@@ -234,6 +234,7 @@
234
234
  parent.layer.close(parent.layer.getFrameIndex(window.name))
235
235
  parent.table.reload('sale_plan_follow_table')
236
236
  parent.table.reload('businesses_table')
237
+ parent.table.reload('teachers_table')
237
238
  }
238
239
  })
239
240
 
@@ -242,4 +243,9 @@
242
243
  });
243
244
 
244
245
  });
245
- </script>
246
+ </script>
247
+ <style>
248
+ .place_select xm-select > .xm-body{
249
+ width: 300px; !important;
250
+ }
251
+ </style>
@@ -38,7 +38,7 @@
38
38
  <%= select_tag "business_type", options_for_select(EducodeSales::Common.where(clazz: 'business_type').pluck(:name, :id), params[:clazz_id]), { 'lay-filter': 'clazz_id', include_blank: true } %>
39
39
  </div>
40
40
  </div>
41
- <div class="layui-inline m-t-10">
41
+ <div class="layui-inline">
42
42
  <label class="layui-form-label">项目阶段</label>
43
43
  <div class="layui-input-inline">
44
44
  <%= select_tag "business_step", options_for_select(EducodeSales::Common.where(clazz: 'business_step').pluck(:name, :id)), { include_blank: true } %>
@@ -83,7 +83,7 @@
83
83
  </div>
84
84
  </div>
85
85
  <br>
86
- <div class="layui-inline">
86
+ <div class="layui-inline new_place_select">
87
87
  <label class="layui-form-label">渠道</label>
88
88
  <div class="layui-input-inline" style="z-index: 101">
89
89
  <div id="place" style="width: 190px;"></div>
@@ -246,6 +246,7 @@
246
246
  parent.layer.close(parent.layer.getFrameIndex(window.name))
247
247
  parent.table.reload('sale_plan_follow_table')
248
248
  parent.table.reload('businesses_table')
249
+ parent.table.reload('teachers_table')
249
250
  }
250
251
  })
251
252
 
@@ -254,4 +255,9 @@
254
255
  });
255
256
 
256
257
  });
257
- </script>
258
+ </script>
259
+ <style>
260
+ .new_place_select xm-select > .xm-body{
261
+ width: 300px; !important;
262
+ }
263
+ </style>
@@ -248,6 +248,7 @@
248
248
  layer.close(index);
249
249
  table.reload("businesses_table");
250
250
  table.reload("sale_plan_follow_table");
251
+ table.reload('teachers_table')
251
252
  })
252
253
  });
253
254
  } else if (obj.event === 'show') { // 监听添加操作
@@ -342,27 +343,26 @@
342
343
  [
343
344
  {
344
345
  field: 'id',
345
- width: 80,
346
+ width: 60,
346
347
  title:'序号',type: 'numbers',
347
348
  },
348
349
  {
349
350
  field: 'staff',
350
- width: 140,
351
+ width: 100,
351
352
  title: '姓名'
352
353
  },
353
354
  {
354
355
  field: 'month',
355
- width: 120,
356
+ width: 100,
356
357
  title: '月份',
357
358
  },
358
359
  {
359
360
  field: 'weekly',
360
- width: 120,
361
+ width: 100,
361
362
  title: '周次'
362
363
  },
363
364
  {
364
365
  field: 'content',
365
- width: 300,
366
366
  title: '计划内容'
367
367
  },
368
368
  {
@@ -59,7 +59,7 @@
59
59
  templet: "#xschool",
60
60
  totalRow:true,
61
61
  sort: true,
62
- width: 120
62
+ width: 170
63
63
  },
64
64
  ]
65
65
  ],
@@ -98,7 +98,7 @@
98
98
  <%# if can? :destroy, EducodeSales::Teacher %>
99
99
  <!-- <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>-->
100
100
  <%# end %>
101
- <% if can? :add_follow, EducodeSales::Teacher %>
101
+ <% if can? :create, EducodeSales::TeacherFollow %>
102
102
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
103
103
  <% end %>
104
104
  <% if @more %>
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
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.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2021-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails