educode_sales 1.10.59 → 1.10.71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/educode_sales/application.js +1 -0
  3. data/app/assets/javascripts/educode_sales/functions.js +24 -0
  4. data/app/controllers/educode_sales/application_controller.rb +11 -3
  5. data/app/controllers/educode_sales/business_courses_controller.rb +19 -8
  6. data/app/controllers/educode_sales/follow_ups_controller.rb +4 -0
  7. data/app/controllers/educode_sales/plans_controller.rb +448 -124
  8. data/app/controllers/educode_sales/shixuns_controller.rb +20 -10
  9. data/app/controllers/educode_sales/subjects_controller.rb +10 -6
  10. data/app/controllers/educode_sales/teacher_follows_controller.rb +4 -0
  11. data/app/controllers/educode_sales/teachers_controller.rb +3 -0
  12. data/app/models/educode_sales/business.rb +5 -5
  13. data/app/models/educode_sales/sales_target.rb +10 -0
  14. data/app/models/educode_sales/sales_target_log.rb +11 -0
  15. data/app/views/educode_sales/business_courses/index.html.erb +1 -1
  16. data/app/views/educode_sales/business_courses/new.html.erb +2 -2
  17. data/app/views/educode_sales/businesses/_follows.html.erb +107 -100
  18. data/app/views/educode_sales/businesses/index.html.erb +6 -3
  19. data/app/views/educode_sales/businesses/index.json.jbuilder +2 -2
  20. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +1 -1
  21. data/app/views/educode_sales/contracts/_follows.html.erb +75 -69
  22. data/app/views/educode_sales/contracts/_list.html.erb +283 -249
  23. data/app/views/educode_sales/contracts/index.json.jbuilder +1 -1
  24. data/app/views/educode_sales/follow_ups/index.json.jbuilder +1 -1
  25. data/app/views/educode_sales/plans/_year_execute.html.erb +294 -159
  26. data/app/views/educode_sales/plans/_year_target.html.erb +330 -215
  27. data/app/views/educode_sales/plans/index.html.erb +3 -4
  28. data/app/views/educode_sales/plans/staff_year_business.html.erb +96 -0
  29. data/app/views/educode_sales/plans/staff_year_business.json.jbuilder +22 -0
  30. data/app/views/educode_sales/plans/staff_year_target.json.jbuilder +35 -0
  31. data/app/views/educode_sales/plans/staff_year_target_log.html.erb +62 -0
  32. data/app/views/educode_sales/plans/staff_year_target_log.json.jbuilder +34 -0
  33. data/app/views/educode_sales/plans/years_all_target.json.jbuilder +5 -4
  34. data/app/views/educode_sales/sales_details/_index.html.erb +6 -3
  35. data/app/views/educode_sales/shixun_dectects/markdown.html.erb +40 -1
  36. data/app/views/educode_sales/shixuns/index.html.erb +106 -97
  37. data/app/views/educode_sales/shixuns/new.html.erb +2 -2
  38. data/app/views/educode_sales/staffs/index.json.jbuilder +1 -1
  39. data/app/views/educode_sales/subjects/index.html.erb +1 -1
  40. data/app/views/educode_sales/subjects/new.html.erb +2 -2
  41. data/app/views/educode_sales/teachers/_follows.html.erb +24 -17
  42. data/app/views/educode_sales/teachers/_index.html.erb +6 -0
  43. data/app/views/layouts/educode_sales/application.html.erb +6 -3
  44. data/config/environments/development.rb +16 -0
  45. data/config/routes.rb +7 -0
  46. data/db/migrate/20230729085359_create_educode_sales_sales_target_histories.rb +1 -1
  47. data/lib/educode_sales/version.rb +1 -1
  48. metadata +11 -2
@@ -77,15 +77,15 @@
77
77
 
78
78
 
79
79
  <script>
80
- layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate'], function () {
80
+ layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate', 'functions'], function () {
81
81
  var $ = layui.jquery,
82
82
  form = layui.form,
83
83
  request = layui.request,
84
84
  dropdown = layui.dropdown,
85
85
  miniPage = layui.miniPage,
86
86
  laydate = layui.laydate;
87
-
88
87
  var laydate = layui.laydate;
88
+ var functions = layui.functions;
89
89
 
90
90
  laydate.render({
91
91
  elem: '#follows_date',
@@ -93,6 +93,74 @@
93
93
  });
94
94
 
95
95
  table = layui.table;
96
+ var columns = [
97
+ [
98
+ {
99
+ field: 'id',
100
+ width: 60,
101
+ title:'序号',type: 'numbers',
102
+ },
103
+ {
104
+ field: 'description',
105
+ title: '最新进展',
106
+ templet:'<div><span title="{{d.description}}">{{d.description}}</span></div>'
107
+ },
108
+ {
109
+ field: 'business',
110
+ width: 120,
111
+ title: '商机名称',
112
+ templet:'#business'
113
+ },
114
+ {
115
+ field: 'school',
116
+ width: 120,
117
+ title: '用户单位',
118
+ templet:'#school'
119
+ },
120
+ {
121
+ field: 'signed_department',
122
+ width: 160,
123
+ title: '签约单位'
124
+ },
125
+ {
126
+ field: 'stage',
127
+ title: '阶段',
128
+ width: 90,
129
+ templet:'<div><span title="{{d.stage}}">{{d.stage}}</span></div>'
130
+ },
131
+ {
132
+ field: 'staff_manages',
133
+ width: 120,
134
+ title: '销售经理',
135
+ },
136
+ {
137
+ field: 'clazz',
138
+ width: 100,
139
+ title: '信息类型',
140
+ },
141
+ {
142
+ field: 'staff',
143
+ width: 90,
144
+ title: '跟进人',
145
+ },
146
+ {
147
+ field: 'created_at',
148
+ width: 120,
149
+ title: '跟进时间',
150
+ sort: true,
151
+ templet:'<div><span title="{{d.created_at}}">{{d.created_at}}</span></div>'
152
+
153
+ },
154
+ {
155
+ title: '操作',
156
+ width: 160,
157
+ toolbar: '#currentTableBar_follows',
158
+ align: "center",
159
+ fixed: 'right'
160
+ }
161
+ ]
162
+ ];
163
+ columns[0] = functions.initTableColumnsFilter('contract_follows_table', columns[0]);
96
164
  table.render({
97
165
  elem: '#contract_follows_table',
98
166
  url: '/missions/contracts/follow_ups',
@@ -103,76 +171,14 @@
103
171
  field: 'created_at' //排序字段,对应 cols 设定的各字段名
104
172
  ,type: 'desc' //排序方式 asc: 升序、desc: 降序、null: 默认排序
105
173
  },
106
- cols: [
107
- [
108
- {
109
- field: 'id',
110
- width: 60,
111
- title:'序号',type: 'numbers',
112
- },
113
- {
114
- field: 'description',
115
- title: '最新进展',
116
- templet:'<div><span title="{{d.description}}">{{d.description}}</span></div>'
117
- },
118
- {
119
- field: 'business',
120
- width: 120,
121
- title: '商机名称',
122
- templet:'#business'
123
- },
124
- {
125
- field: 'school',
126
- width: 120,
127
- title: '用户单位',
128
- templet:'#school'
129
- },
130
- {
131
- field: 'signed_department',
132
- width: 160,
133
- title: '签约单位'
134
- },
135
- {
136
- field: 'stage',
137
- title: '阶段',
138
- width: 90,
139
- templet:'<div><span title="{{d.stage}}">{{d.stage}}</span></div>'
140
- },
141
- {
142
- field: 'staff_manages',
143
- width: 120,
144
- title: '销售经理',
145
- },
146
- {
147
- field: 'clazz',
148
- width: 100,
149
- title: '信息类型',
150
- },
151
- {
152
- field: 'staff',
153
- width: 90,
154
- title: '跟进人',
155
- },
156
- {
157
- field: 'created_at',
158
- width: 120,
159
- title: '跟进时间',
160
- sort: true,
161
- templet:'<div><span title="{{d.created_at}}">{{d.created_at}}</span></div>'
162
-
163
- },
164
- {
165
- title: '操作',
166
- width: 160,
167
- toolbar: '#currentTableBar_follows',
168
- align: "center",
169
- fixed: 'right'
170
- }
171
- ]
172
- ],
174
+ cols: columns,
173
175
  limit: 20,
174
176
  limits: [10,15,20,30,40,50,60,70,80,90],
175
177
  page: true,
178
+ done: function () {
179
+ var that = this;
180
+ functions.observerTableColumnFilter(that);
181
+ }
176
182
  });
177
183
 
178
184