educode_sales 0.6.8 → 0.7.2

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/educode_sales/businesses_controller.rb +191 -7
  3. data/app/controllers/educode_sales/customers_controller.rb +48 -15
  4. data/app/controllers/educode_sales/follow_ups_controller.rb +2 -2
  5. data/app/controllers/educode_sales/home_controller.rb +6 -0
  6. data/app/controllers/educode_sales/money_plans_controller.rb +3 -3
  7. data/app/controllers/educode_sales/operation_plans_controller.rb +4 -1
  8. data/app/controllers/educode_sales/plans_controller.rb +2 -1
  9. data/app/controllers/educode_sales/sale_trends_controller.rb +118 -116
  10. data/app/controllers/educode_sales/staffs_controller.rb +12 -0
  11. data/app/controllers/educode_sales/teachers_controller.rb +1 -1
  12. data/app/helpers/educode_sales/follow_up_helper.rb +7 -0
  13. data/app/models/educode_sales/customer_add.rb +4 -0
  14. data/app/models/educode_sales/money_plan.rb +3 -3
  15. data/app/models/educode_sales/staff.rb +1 -0
  16. data/app/models/educode_sales/staff_school.rb +6 -0
  17. data/app/views/educode_sales/businesses/edit_plan.html.erb +4 -4
  18. data/app/views/educode_sales/businesses/export_records.json.jbuilder +1 -2
  19. data/app/views/educode_sales/businesses/get_export_data.json.jbuilder +30 -0
  20. data/app/views/educode_sales/businesses/index.html.erb +209 -100
  21. data/app/views/educode_sales/businesses/index.json.jbuilder +6 -32
  22. data/app/views/educode_sales/businesses/show_follow.html.erb +49 -8
  23. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +2 -0
  24. data/app/views/educode_sales/customers/index.html.erb +30 -1
  25. data/app/views/educode_sales/customers/index.json.jbuilder +12 -0
  26. data/app/views/educode_sales/customers/new.html.erb +106 -53
  27. data/app/views/educode_sales/customers/show_follow.html.erb +1 -1
  28. data/app/views/educode_sales/follow_ups/index.json.jbuilder +1 -1
  29. data/app/views/educode_sales/follow_ups/money_plans.json.jbuilder +2 -4
  30. data/app/views/educode_sales/home/staff_schools.json.jbuilder +9 -0
  31. data/app/views/educode_sales/money_plans/index.html.erb +1 -1
  32. data/app/views/educode_sales/operation_plans/_monthPlan.html.erb +8 -3
  33. data/app/views/educode_sales/operation_plans/_monthly.html.erb +2 -2
  34. data/app/views/educode_sales/operation_plans/_weekPlan.html.erb +2 -2
  35. data/app/views/educode_sales/operation_plans/_weekly.html.erb +2 -2
  36. data/app/views/educode_sales/plans/_monthPlan.html.erb +8 -3
  37. data/app/views/educode_sales/plans/_monthly.html.erb +2 -2
  38. data/app/views/educode_sales/plans/_weekPlan.html.erb +2 -2
  39. data/app/views/educode_sales/plans/_weekly.html.erb +2 -2
  40. data/app/views/educode_sales/roles/edit.html.erb +17 -11
  41. data/app/views/educode_sales/sale_reports/audit.html.erb +2 -0
  42. data/app/views/educode_sales/sale_reports/edit.html.erb +2 -0
  43. data/app/views/educode_sales/sale_reports/show.html.erb +2 -0
  44. data/app/views/educode_sales/sale_trends/trends.html.erb +1 -1
  45. data/app/views/educode_sales/sales/index.html.erb +7 -7
  46. data/app/views/educode_sales/sales/index.json.jbuilder +1 -1
  47. data/app/views/educode_sales/staffs/edit.html.erb +46 -5
  48. data/app/views/educode_sales/staffs/index.html.erb +6 -0
  49. data/app/views/educode_sales/staffs/index.json.jbuilder +1 -0
  50. data/app/views/educode_sales/teachers/show_follow.html.erb +1 -1
  51. data/config/routes.rb +2 -0
  52. data/db/migrate/20210902064109_create_educode_sales_role_permissions.rb +5 -0
  53. data/db/migrate/20220125013811_create_educode_sales_staff_schools.rb +10 -0
  54. data/db/migrate/20220125033552_create_educode_sales_customer_adds.rb +9 -0
  55. data/lib/educode_sales/version.rb +1 -1
  56. metadata +9 -2
@@ -25,7 +25,12 @@
25
25
  <!-- <input type="text" class="layui-input" id="date" name="date" placeholder=" - ">-->
26
26
  <!-- </div>-->
27
27
  <!-- </div>-->
28
-
28
+ <div class="layui-inline">
29
+ <label class="layui-form-label">性质</label>
30
+ <div class="layui-input-inline">
31
+ <div id="property" style="width: 190px;"></div>
32
+ </div>
33
+ </div>
29
34
  <div class="layui-inline">
30
35
  <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_business_search">重置
31
36
  </button>
@@ -94,6 +99,19 @@
94
99
  // window.onload=hn;
95
100
  // });
96
101
 
102
+ var property_list = xmSelect.render({
103
+ 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
+ ]
113
+ })
114
+
97
115
  laydate.render({
98
116
  elem: '#date',
99
117
  range: true
@@ -122,6 +140,7 @@
122
140
  {
123
141
  field: 'name',
124
142
  title: '客户名称',
143
+ width: 150,
125
144
  templet: "#name"
126
145
  },
127
146
  {
@@ -129,6 +148,10 @@
129
148
  width: 100,
130
149
  title: '区域',
131
150
  },
151
+ {
152
+ field: 'property',
153
+ title: '性质',
154
+ },
132
155
  {
133
156
  field: 'department',
134
157
  width: 100,
@@ -238,6 +261,11 @@
238
261
 
239
262
  // 监听搜索操作
240
263
  form.on('submit(search_teachers)', function (data) {
264
+ var property = [];
265
+ property_list.getValue().forEach(function(d) {
266
+ property.push(d.value);
267
+ })
268
+ data.field.property = property.toString();
241
269
  search = data.field
242
270
  table.reload('customers_table', {
243
271
  page: {
@@ -263,6 +291,7 @@
263
291
  assist: "",
264
292
  teacher_source: ""
265
293
  });
294
+ property_list.setValue([])
266
295
  return false;
267
296
  });
268
297
  /**
@@ -14,6 +14,18 @@ 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
29
  json.department d.departments.size
18
30
  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
19
31
  json.follow follow_ups.size + customer_follows.size
@@ -1,53 +1,67 @@
1
+ <!--<form class="layui-form layuimini-form" id="custom_data" data-required="true" action="">-->
2
+ <!-- <div class="layui-form-item" style="padding: 25px">-->
3
+ <!-- <div class="layui-inline">-->
4
+ <!-- <label class="layui-form-label required">客户:</label>-->
5
+ <!-- <div class="layui-input-block" style="width: 500px;">-->
6
+ <!-- <input type="text" name="name" lay-verify="required" placeholder="请输入客户" autocomplete="off"-->
7
+ <!-- class="layui-input" id="inputFocus">-->
8
+ <!-- </div>-->
9
+ <!-- </div>-->
10
+ <!-- <br>-->
11
+ <!-- <div class="layui-inline city_input">-->
12
+ <!-- <label class="layui-form-label ">省:</label>-->
13
+ <!-- <div class="layui-input-block" style="width: 500px;">-->
14
+ <!-- <select id="province" class="province layui-input"></select>-->
15
+ <!-- </div>-->
16
+ <!-- </div>-->
17
+ <!-- <br>-->
18
+ <!-- <div class="layui-inline city_input">-->
19
+ <!-- <label class="layui-form-label ">市:</label>-->
20
+ <!-- <div class="layui-input-block" style="width: 500px;">-->
21
+ <!-- <select id="city" class="city layui-input"></select>-->
22
+ <!-- </div>-->
23
+ <!-- </div>-->
24
+ <!-- <br>-->
25
+ <!-- <div class="layui-inline">-->
26
+ <!-- <label class="layui-form-label ">地址:</label>-->
27
+ <!-- <div class="layui-input-block" style="width: 500px;">-->
28
+ <!-- <input type="text" name="address" autocomplete="off"-->
29
+ <!-- class="layui-input" placeholder="请输入地址" >-->
30
+ <!-- </div>-->
31
+ <!-- </div>-->
32
+ <!-- <br>-->
33
+ <!-- <div class="layui-form-item">-->
34
+ <!-- <label class="layui-form-label">学校性质:</label>-->
35
+ <!-- <div class="layui-input-block">-->
36
+ <!-- <input type="checkbox" name="project_985" lay-skin="primary" value="1" title="985工程">-->
37
+ <!-- <input type="checkbox" name="project_211" lay-skin="primary" value="1" title="211工程" >-->
38
+ <!-- <input type="checkbox" name="regular_college" lay-skin="primary" value="1" title="本科院校">-->
39
+ <!-- </div>-->
40
+ <!-- </div>-->
41
+ <!-- <div class="layui-form-item">-->
42
+ <!-- <div class="layui-input-block">-->
43
+ <!-- <input type="checkbox" name="junior_college" lay-skin="primary" value="1" title="大专院校">-->
44
+ <!-- <input type="checkbox" name="secondary_school" lay-skin="primary" value="1" title="中专院校" >-->
45
+ <!-- <input type="checkbox" name="military_school" lay-skin="primary" value="1" title="军事院校">-->
46
+ <!-- </div>-->
47
+ <!-- </div>-->
48
+ <!-- <div class="layui-form-item">-->
49
+ <!-- <div class="layui-input-block">-->
50
+ <!-- <input type="checkbox" name="enterprise" lay-skin="primary" value="1" title="企业">-->
51
+ <!-- </div>-->
52
+ <!-- </div>-->
53
+ <!-- <div class="layui-inline" style="padding-left: 120px">-->
54
+ <!-- <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="data-reset-btn">提交-->
55
+ <!-- </button>-->
56
+ <!-- </div>-->
57
+ <!-- </div>-->
58
+ <!--</form>-->
1
59
  <form class="layui-form layuimini-form" id="custom_data" data-required="true" action="">
2
60
  <div class="layui-form-item" style="padding: 25px">
3
- <div class="layui-inline">
4
- <label class="layui-form-label required">客户:</label>
5
- <div class="layui-input-block" style="width: 500px;">
6
- <input type="text" name="name" lay-verify="required" placeholder="请输入客户" autocomplete="off"
7
- class="layui-input" id="inputFocus">
8
- </div>
9
- </div>
10
- <br>
11
- <div class="layui-inline city_input">
12
- <label class="layui-form-label ">省:</label>
13
- <div class="layui-input-block" style="width: 500px;">
14
- <select id="province" class="province layui-input"></select>
15
- </div>
16
- </div>
17
- <br>
18
- <div class="layui-inline city_input">
19
- <label class="layui-form-label ">市:</label>
20
- <div class="layui-input-block" style="width: 500px;">
21
- <select id="city" class="city layui-input"></select>
22
- </div>
23
- </div>
24
- <br>
25
- <div class="layui-inline">
26
- <label class="layui-form-label ">地址:</label>
27
- <div class="layui-input-block" style="width: 500px;">
28
- <input type="text" name="address" autocomplete="off"
29
- class="layui-input" placeholder="请输入地址" >
30
- </div>
31
- </div>
32
- <br>
33
- <div class="layui-form-item">
34
- <label class="layui-form-label">学校性质:</label>
35
- <div class="layui-input-block">
36
- <input type="checkbox" name="project_985" lay-skin="primary" value="1" title="985工程">
37
- <input type="checkbox" name="project_211" lay-skin="primary" value="1" title="211工程" >
38
- <input type="checkbox" name="regular_college" lay-skin="primary" value="1" title="本科院校">
39
- </div>
40
- </div>
41
- <div class="layui-form-item">
42
- <div class="layui-input-block">
43
- <input type="checkbox" name="junior_college" lay-skin="primary" value="1" title="大专院校">
44
- <input type="checkbox" name="secondary_school" lay-skin="primary" value="1" title="中专院校" >
45
- <input type="checkbox" name="military_school" lay-skin="primary" value="1" title="军事院校">
46
- </div>
47
- </div>
48
- <div class="layui-form-item">
49
- <div class="layui-input-block">
50
- <input type="checkbox" name="enterprise" lay-skin="primary" value="1" title="企业">
61
+ <div class="layui-form-item" >
62
+ <label class="layui-form-label">学校</label>
63
+ <div class="layui-input-inline" style="">
64
+ <div id="edit_assign_follow" style="width: 1140px;"></div>
51
65
  </div>
52
66
  </div>
53
67
  <div class="layui-inline" style="padding-left: 120px">
@@ -56,10 +70,7 @@
56
70
  </div>
57
71
  </div>
58
72
  </form>
59
-
60
-
61
73
  <script>
62
- document.getElementById("inputFocus").focus();
63
74
 
64
75
  layui.use(['form', 'table', 'upload', 'laytpl', 'request', 'selectInput', 'transfer'], function () {
65
76
  var form = layui.form,
@@ -75,6 +86,39 @@
75
86
  // 当前弹出层,防止ID被覆盖
76
87
  var parentIndex = layer.index;
77
88
 
89
+ var sales_list = xmSelect.render({
90
+ el: '#edit_assign_follow',
91
+ remoteSearch: true,
92
+ autoRow: true,
93
+ // clickClose: true,
94
+ delay: 1000,
95
+ tips: '支持名称/省份搜索,请至少输入一个字符',
96
+ searchTips: '支持名称/省份搜索,请至少输入一个字符',
97
+ paging: true,
98
+ pageRemote: true,
99
+ filterable: true,
100
+ remoteMethod: function (val, cb, show, pageIndex) {
101
+ if(!val){
102
+ return cb([]);
103
+ }
104
+ $.ajax( '/missions/staff_schools', {
105
+ method: 'get',
106
+ data: {
107
+ q: val,
108
+ page: pageIndex
109
+ },
110
+ dataType: 'json',
111
+ success: function (res) {
112
+ var data = res.data;
113
+ if (res.code == 0) {
114
+ cb(res.data, res.count);
115
+ } else {
116
+ layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
117
+ }
118
+ }
119
+ })
120
+ }
121
+ })
78
122
 
79
123
  var dataCustom = [
80
124
  {
@@ -338,8 +382,17 @@
338
382
  });
339
383
  //监听提交
340
384
  form.on('submit(data-reset-btn)', function (data) {
341
- data.field.province = $("#province option:selected").text(); //获取选中的项
342
- data.field.city = $("#city option:selected").text(); //获取选中的项
385
+ var schools = [];
386
+ sales_list.getValue().forEach(function(d) {
387
+ schools.push(d.value);
388
+ })
389
+ if (schools.length == 0) {
390
+ layer.alert("请选择学校");
391
+ return false;
392
+ }
393
+ data.field['school_ids'] = schools;
394
+ // data.field.province = $("#province option:selected").text(); //获取选中的项
395
+ // data.field.city = $("#city option:selected").text(); //获取选中的项
343
396
  console.log(data.field);
344
397
  request.authPost("missions/customers", data.field, function (res) {
345
398
  if (res.success === false) {
@@ -203,7 +203,7 @@
203
203
 
204
204
 
205
205
 
206
- <!--未完成计划列表-->
206
+ <!--计划回款计划列表-->
207
207
  <script type="text/html" id="unfinish_toolbar">
208
208
  <div class="layui-btn-container">
209
209
  <span class="table-label">跟进记录</span>
@@ -12,7 +12,7 @@ json.data do
12
12
  json.business d.business.name
13
13
  json.business_id d.business.id
14
14
  teacher_ids = d.key_person.pluck(:teacher_id)
15
- json.key_people EducodeSales::Teacher.where(id: teacher_ids).pluck(:name).join('、')
15
+ json.key_people key_people(teacher_ids)
16
16
 
17
17
  end
18
18
  end
@@ -1,9 +1,7 @@
1
1
  json.data do
2
2
  json.array! @money_plans do |d|
3
- json.id d.id
4
- json.amount d.amount
5
- json.date_at d.date_at.to_s(:date)
6
- json.clazz d.clazz
3
+ json.(d, :id, :amount, :clazz)
4
+ json.date_at d.date_at.present? ? d.date_at.to_s(:date) : ''
7
5
  end
8
6
  end
9
7
 
@@ -0,0 +1,9 @@
1
+ json.data do
2
+ json.array! @schools do |d|
3
+ json.value d.id
4
+ json.name "#{d.name}-#{d.province}"
5
+ end
6
+ end
7
+ json.count @schools.size
8
+ json.code 0
9
+ json.msg "success"
@@ -22,7 +22,7 @@
22
22
  <div class="layui-inline">
23
23
  <label class="layui-form-label">状态</label>
24
24
  <div class="layui-input-inline">
25
- <%= select_tag "clazz", options_for_select(['已完成','未完成']), { include_blank: true } %>
25
+ <%= select_tag "clazz", options_for_select(['实际回款','计划回款']), { include_blank: true } %>
26
26
  </div>
27
27
  </div>
28
28
  <div class="layui-inline">
@@ -89,12 +89,12 @@
89
89
  field: 'id',
90
90
  width: 60,
91
91
  title:'序号',type: 'numbers',
92
- totalRowText:"合计",
92
+ totalRowText:'合计',fixed: 'left'
93
93
  },
94
94
  {
95
95
  field: 'staff',
96
96
  width: 90,
97
- title: '姓名'
97
+ title: '姓名',fixed: 'left'
98
98
  },
99
99
  {
100
100
  field: 'teacher_name',
@@ -289,4 +289,9 @@
289
289
  });
290
290
 
291
291
  });
292
- </script>
292
+ </script>
293
+ <style>
294
+ .layui-table-fixed .layui-table-body {
295
+ height: auto!important;
296
+ }
297
+ </style>
@@ -86,12 +86,12 @@
86
86
  field: 'id',
87
87
  width: 60,
88
88
  title:'序号',type: 'numbers',
89
- totalRowText:"合计",
89
+ totalRowText:'合计',fixed: 'left'
90
90
  },
91
91
  {
92
92
  field: 'staff',
93
93
  width: 90,
94
- title: '姓名'
94
+ title: '姓名',fixed: 'left'
95
95
  },
96
96
  {
97
97
  field: 'month',
@@ -90,12 +90,12 @@
90
90
  field: 'id',
91
91
  width: 60,
92
92
  title:'序号',type: 'numbers',
93
- totalRowText:"合计",
93
+ totalRowText:'合计',fixed: 'left'
94
94
  },
95
95
  {
96
96
  field: 'staff',
97
97
  width: 80,
98
- title: '姓名'
98
+ title: '姓名',fixed: 'left'
99
99
  },
100
100
  {
101
101
  field: 'teacher_name',
@@ -87,12 +87,12 @@
87
87
  field: 'id',
88
88
  width: 60,
89
89
  title:'序号',type: 'numbers',
90
- totalRowText:"合计",
90
+ totalRowText:'合计',fixed: 'left'
91
91
  },
92
92
  {
93
93
  field: 'staff',
94
94
  width: 90,
95
- title: '姓名'
95
+ title: '姓名',fixed: 'left'
96
96
  },
97
97
  {
98
98
  field: 'weekly',
@@ -88,12 +88,12 @@
88
88
  field: 'id',
89
89
  width: 60,
90
90
  title:'序号',type: 'numbers',
91
- totalRowText:"合计",
91
+ totalRowText:'合计',fixed: 'left'
92
92
  },
93
93
  {
94
94
  field: 'staff',
95
95
  width: 90,
96
- title: '姓名'
96
+ title: '姓名',fixed: 'left'
97
97
  },
98
98
  {
99
99
  field: 'business_name',
@@ -277,4 +277,9 @@
277
277
  });
278
278
 
279
279
  });
280
- </script>
280
+ </script>
281
+ <style>
282
+ .layui-table-fixed .layui-table-body {
283
+ height: auto!important;
284
+ }
285
+ </style>
@@ -85,12 +85,12 @@
85
85
  field: 'id',
86
86
  width: 60,
87
87
  title:'序号',type: 'numbers',
88
- totalRowText:"合计",
88
+ totalRowText:'合计',fixed: 'left'
89
89
  },
90
90
  {
91
91
  field: 'staff',
92
92
  width: 90,
93
- title: '姓名'
93
+ title: '姓名',fixed: 'left'
94
94
  },
95
95
  {
96
96
  field: 'month',
@@ -88,12 +88,12 @@
88
88
  field: 'id',
89
89
  width: 60,
90
90
  title:'序号',type: 'numbers',
91
- totalRowText: '合计'
91
+ totalRowText: '合计',fixed: 'left'
92
92
  },
93
93
  {
94
94
  field: 'staff',
95
95
  width: 90,
96
- title: '姓名'
96
+ title: '姓名',fixed: 'left'
97
97
  },
98
98
  {
99
99
  field: 'business_name',
@@ -87,12 +87,12 @@
87
87
  field: 'id',
88
88
  width: 60,
89
89
  title:'序号',type: 'numbers',
90
- totalRowText:"合计",
90
+ totalRowText:'合计',fixed: 'left'
91
91
  },
92
92
  {
93
93
  field: 'staff',
94
94
  width: 90,
95
- title: '姓名'
95
+ title: '姓名',fixed: 'left'
96
96
  },
97
97
  {
98
98
  field: 'weekly',
@@ -3,9 +3,9 @@
3
3
  <li class="layui-this">操作权限</li>
4
4
  <li>数据浏览权限</li>
5
5
  </ul>
6
- <div class="layui-tab-content">
7
- <div class="layui-tab-item layui-show">
8
- <form class="layui-form line" action="">
6
+ <div class="layui-tab-content caozuo">
7
+ <div class="layui-tab-item layui-show" style="height: 800px;!important;">
8
+ <form class="layui-form " action="">
9
9
  <% id = 0 %>
10
10
  <% EducodeSales::Permission.all.order(position: :asc).group_by{ |d| d.clazz}.each do |k, d| %>
11
11
  <div class="layui-form-item">
@@ -32,15 +32,15 @@
32
32
  <label class="layui-form-label">商机管理</label>
33
33
  <div class="layui-input-block">
34
34
  <%= radio_button_tag("business", "自己", @areas.include?("商机管理-自己"), {title: '本人创建列表', id: 1}) %>
35
- <%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), {title: '本人负责区域列表', id: 2}) %>
35
+ <%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), {title: '本人负责区域及监管院校列表', id: 2}) %>
36
36
  <%= radio_button_tag("business", "全部", @areas.include?("商机管理-全部"), {title: '全部列表', id: 3}) %>
37
37
  </div>
38
38
  </div>
39
39
  <div class="layui-form-item" style="border-top: 1px solid #ddd;">
40
- <label class="layui-form-label">回款管理</label>
40
+ <label class="layui-form-label">回款计划</label>
41
41
  <div class="layui-input-block">
42
42
  <%= radio_button_tag("money_plan", "自己", @areas.include?("回款管理-自己"), {title: '本人负责列表', id: 16}) %>
43
- <%= radio_button_tag("money_plan", "区域", @areas.include?("回款管理-区域"), {title: '本人负责区域列表', id: 17}) %>
43
+ <%= radio_button_tag("money_plan", "区域", @areas.include?("回款管理-区域"), {title: '本人负责区域及监管院校列表', id: 17}) %>
44
44
  <%= radio_button_tag("money_plan", "全部", @areas.include?("回款管理-全部"), {title: '全部列表', id: 18}) %>
45
45
  </div>
46
46
  </div>
@@ -48,7 +48,7 @@
48
48
  <label class="layui-form-label">客户管理</label>
49
49
  <div class="layui-input-block">
50
50
  <%= radio_button_tag("customer", "自己", @areas.include?("客户管理-自己"), {title: '本人负责列表', id: 13}) %>
51
- <%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), {title: '本人负责区域列表', id:14}) %>
51
+ <%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), {title: '本人负责区域及监管院校列表', id:14}) %>
52
52
  <%= radio_button_tag("customer", "全部", @areas.include?("客户管理-全部"), {title: '全部列表', id: 15}) %>
53
53
  </div>
54
54
  </div>
@@ -56,7 +56,7 @@
56
56
  <label class="layui-form-label">销售计划</label>
57
57
  <div class="layui-input-block">
58
58
  <%= radio_button_tag("sale_plan", "自己", @areas.include?("销售计划-自己"), {title: '本人创建列表', id: 4}) %>
59
- <%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), {title: '本人负责区域列表', id: 5}) %>
59
+ <%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), {title: '本人负责区域及监管院校列表', id: 5}) %>
60
60
  <%= radio_button_tag("sale_plan", "全部", @areas.include?("销售计划-全部"), {title: '全部列表', id: 6}) %>
61
61
  </div>
62
62
  </div>
@@ -64,7 +64,7 @@
64
64
  <label class="layui-form-label">教师运营</label>
65
65
  <div class="layui-input-block">
66
66
  <%= radio_button_tag("teacher", "自己", @areas.include?("教师运营-自己"), {title: '本人创建列表', id: 7}) %>
67
- <%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), {title: '本人负责区域列表', id:8}) %>
67
+ <%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), {title: '本人负责区域及监管院校列表', id:8}) %>
68
68
  <%= radio_button_tag("teacher", "全部", @areas.include?("教师运营-全部"), {title: '全部列表', id: 9}) %>
69
69
  </div>
70
70
  </div>
@@ -72,7 +72,7 @@
72
72
  <label class="layui-form-label">运营计划</label>
73
73
  <div class="layui-input-block">
74
74
  <%= radio_button_tag("operation", "自己", @areas.include?("运营计划-自己"), {title: '本人创建列表', id: 10}) %>
75
- <%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), {title: '本人负责区域列表', id:11}) %>
75
+ <%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), {title: '本人负责区域及监管院校列表', id:11}) %>
76
76
  <%= radio_button_tag("operation", "全部", @areas.include?("运营计划-全部"), {title: '全部列表', id: 12}) %>
77
77
  </div>
78
78
  </div>
@@ -139,4 +139,10 @@
139
139
  })
140
140
  //…
141
141
  });
142
- </script>
142
+ </script>
143
+ <style>
144
+ .caozuo .layui-tab-item {
145
+ width: 100% !important;
146
+ height: 900px !important;
147
+ }
148
+ </style>
@@ -151,6 +151,8 @@
151
151
  table.on('tool(showWeeklyTable)', function (obj) {
152
152
  var data = obj.data;
153
153
  if (obj.event === 'show_follow') {
154
+ business_id = obj.data.business_id
155
+ business_name = data.business_name
154
156
  id = data.business_id
155
157
  content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + data.business_id);
156
158
  openWH = miniPage.getOpenWidthHeight();
@@ -257,6 +257,8 @@
257
257
  });
258
258
  return false;
259
259
  } else if (obj.event === 'show_follow') {
260
+ business_id = obj.data.business_id
261
+ business_name = data.business_name
260
262
  id = data.business_id
261
263
  content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + data.business_id);
262
264
  openWH = miniPage.getOpenWidthHeight();
@@ -102,6 +102,8 @@
102
102
  table.on('tool(showWeeklyTable)', function (obj) {
103
103
  var data = obj.data;
104
104
  if (obj.event === 'show_follow') {
105
+ business_id = obj.data.business_id
106
+ business_name = data.business_name
105
107
  id = data.business_id
106
108
  content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + data.business_id);
107
109
  openWH = miniPage.getOpenWidthHeight();
@@ -621,7 +621,7 @@
621
621
  });
622
622
  $(".customer_bt").click(function () {
623
623
  layer.load(0, {});
624
- $.get('/missions/sale_trends/trends.json?customer_count_type=' + $("#customer_count_type").val() + '&customer_time_range=' + $("#customer_time_range").val()).done(function(res) {
624
+ $.get('/missions/sale_trends/trends.json?customer_count_type=' + $("#customer_count_type").val() + '&customer_time_range=' + $("#customer_time_range").val() + '&customer_date=' + $("#customer_date").val()).done(function(res) {
625
625
  layer.closeAll('loading');
626
626
  var data4 = res.data4;
627
627
  myChart4.data = data4