educode_sales 0.4.7 → 0.5.1
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 +4 -4
- data/app/assets/images/educode_sales//345/233/236/346/224/266/347/253/231.png +0 -0
- data/app/controllers/educode_sales/businesses_controller.rb +81 -5
- data/app/controllers/educode_sales/follow_ups_controller.rb +2 -2
- data/app/controllers/educode_sales/home_controller.rb +1 -1
- data/app/controllers/educode_sales/operation_plans_controller.rb +12 -4
- data/app/controllers/educode_sales/operations_controller.rb +1 -1
- data/app/controllers/educode_sales/plans_controller.rb +26 -18
- data/app/controllers/educode_sales/recycles_controller.rb +95 -0
- data/app/controllers/educode_sales/sale_reports_controller.rb +1 -1
- data/app/controllers/educode_sales/sale_trends_controller.rb +6 -6
- data/app/controllers/educode_sales/sales_controller.rb +2 -2
- data/app/controllers/educode_sales/staffs_controller.rb +4 -4
- data/app/controllers/educode_sales/upload_files_controller.rb +105 -0
- data/app/models/concerns/deletable.rb +8 -0
- data/app/models/educode_sales/application_record.rb +2 -0
- data/app/models/educode_sales/business.rb +15 -2
- data/app/models/educode_sales/common.rb +4 -0
- data/app/models/educode_sales/follow_up.rb +4 -2
- data/app/models/educode_sales/recycle.rb +5 -0
- data/app/models/educode_sales/sale_plan.rb +4 -0
- data/app/models/educode_sales/sale_report.rb +2 -0
- data/app/views/educode_sales/businesses/edit_follow_record.html.erb +15 -0
- data/app/views/educode_sales/businesses/edit_plan.html.erb +2 -2
- data/app/views/educode_sales/businesses/file.html.erb +154 -0
- data/app/views/educode_sales/businesses/index.html.erb +65 -3
- data/app/views/educode_sales/businesses/index.json.jbuilder +3 -1
- data/app/views/educode_sales/businesses/new_follow_record.html.erb +22 -1
- data/app/views/educode_sales/businesses/show_follow.html.erb +54 -12
- data/app/views/educode_sales/businesses/show_follow.json.jbuilder +3 -0
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +80 -2
- data/app/views/educode_sales/businesses/time_line.html.erb +62 -0
- data/app/views/educode_sales/businesses/upload_file.html.erb +43 -0
- data/app/views/educode_sales/operation_plans/_monthly.html.erb +4 -4
- data/app/views/educode_sales/operation_plans/_weekly.html.erb +4 -4
- data/app/views/educode_sales/operation_plans/edit_month.html.erb +6 -6
- data/app/views/educode_sales/operation_plans/edit_week.html.erb +7 -7
- data/app/views/educode_sales/operation_plans/new_month.html.erb +17 -2
- data/app/views/educode_sales/operation_plans/new_week.html.erb +21 -6
- data/app/views/educode_sales/operation_reports/audit.html.erb +20 -14
- data/app/views/educode_sales/operation_reports/edit.html.erb +11 -11
- data/app/views/educode_sales/operation_reports/show.html.erb +20 -14
- data/app/views/educode_sales/plans/_monthly.html.erb +4 -4
- data/app/views/educode_sales/plans/_weekly.html.erb +4 -4
- data/app/views/educode_sales/plans/edit_month.html.erb +6 -6
- data/app/views/educode_sales/plans/edit_week.html.erb +7 -7
- data/app/views/educode_sales/plans/new_month.html.erb +1 -1
- data/app/views/educode_sales/plans/new_monthly.html.erb +6 -6
- data/app/views/educode_sales/plans/new_week.html.erb +2 -2
- data/app/views/educode_sales/plans/new_weekly.html.erb +7 -7
- data/app/views/educode_sales/recycles/_business.html.erb +122 -0
- data/app/views/educode_sales/recycles/_monthPlan.html.erb +123 -0
- data/app/views/educode_sales/recycles/_monthly.html.erb +121 -0
- data/app/views/educode_sales/recycles/_weekPlan.html.erb +128 -0
- data/app/views/educode_sales/recycles/_weekly.html.erb +122 -0
- data/app/views/educode_sales/recycles/business.json.jbuilder +16 -0
- data/app/views/educode_sales/recycles/index.html.erb +58 -0
- data/app/views/educode_sales/recycles/monthPlan.json.jbuilder +16 -0
- data/app/views/educode_sales/recycles/monthly.json.jbuilder +15 -0
- data/app/views/educode_sales/recycles/weekPlan.json.jbuilder +16 -0
- data/app/views/educode_sales/recycles/weekly.json.jbuilder +15 -0
- data/app/views/educode_sales/sale_reports/audit.html.erb +21 -12
- data/app/views/educode_sales/sale_reports/edit.html.erb +9 -9
- data/app/views/educode_sales/sale_reports/show.html.erb +12 -6
- data/app/views/educode_sales/sale_trends/trends.html.erb +6 -6
- data/app/views/educode_sales/teachers/add_keys.html.erb +2 -2
- data/app/views/educode_sales/teachers/index.html.erb +1 -1
- data/app/views/educode_sales/teachers/show_follow.html.erb +9 -3
- data/app/views/educode_sales/upload_files/index.json.jbuilder +13 -0
- data/app/views/layouts/educode_sales/application.html.erb +3 -0
- data/config/routes.rb +27 -0
- data/db/migrate/20210902064109_create_educode_sales_role_permissions.rb +6 -0
- data/db/migrate/20211102085743_add_bidded_date_educode_sales_follow_ups.rb +6 -0
- data/db/migrate/20211109015617_create_educode_sales_recycles.rb +25 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +24 -2
@@ -11,13 +11,13 @@
|
|
11
11
|
</script>
|
12
12
|
<h1 class="m-t-20 text-center">报告人员:<%=@name %></h1>
|
13
13
|
<form class="layui-form layui-form-pane" style="padding-right: 20px">
|
14
|
-
<div class="layui-form-item">
|
14
|
+
<div class="layui-form-item" style="margin-bottom: 0">
|
15
15
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
16
16
|
<label>负责区域:</label>
|
17
17
|
<span><%= @area%></span>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
|
-
<div class="layui-form-item">
|
20
|
+
<div class="layui-form-item" style="margin-bottom: 0">
|
21
21
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
22
22
|
<label>完成率:</label>
|
23
23
|
<span><%= @sale_report.finish_rate %>%</span>
|
@@ -97,32 +97,32 @@
|
|
97
97
|
cols: [
|
98
98
|
[{
|
99
99
|
field: 'id',
|
100
|
-
width:
|
100
|
+
width: 60,
|
101
101
|
title:'序号',type: 'numbers',
|
102
102
|
},
|
103
103
|
{
|
104
104
|
field: 'staff',
|
105
|
-
width:
|
105
|
+
width: 80,
|
106
106
|
title: '姓名'
|
107
107
|
},
|
108
108
|
{
|
109
109
|
field: 'teacher_name',
|
110
|
-
width:
|
110
|
+
width: 120,
|
111
111
|
title: '教师姓名',
|
112
112
|
},
|
113
113
|
{
|
114
114
|
field: 'school',
|
115
|
-
width:
|
115
|
+
width: 170,
|
116
116
|
title: '单位'
|
117
117
|
},
|
118
118
|
{
|
119
119
|
field: 'department',
|
120
|
-
width:
|
120
|
+
width: 170,
|
121
121
|
title: '部门'
|
122
122
|
},
|
123
123
|
{
|
124
124
|
field: 'week',
|
125
|
-
width:
|
125
|
+
width: 80,
|
126
126
|
title: '周次',
|
127
127
|
},
|
128
128
|
{
|
@@ -132,18 +132,18 @@
|
|
132
132
|
},
|
133
133
|
{
|
134
134
|
field: 'count',
|
135
|
-
width:
|
135
|
+
width: 80,
|
136
136
|
title: '跟进',
|
137
137
|
templet: '#show_follow_edit'
|
138
138
|
},
|
139
139
|
{
|
140
140
|
field: 'rate',
|
141
|
-
width:
|
141
|
+
width: 80,
|
142
142
|
title: '完成率',
|
143
143
|
},
|
144
144
|
{
|
145
145
|
field: 'updated_at',
|
146
|
-
width:
|
146
|
+
width: 170,
|
147
147
|
title: '更新时间',
|
148
148
|
sort: true,
|
149
149
|
},
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<h1 class="m-t-20 text-center">报告人员:<%=@name %></h1>
|
2
2
|
<form class="layui-form layui-form-pane" action="" style="padding-right: 20px">
|
3
|
-
<div class="layui-form-item">
|
3
|
+
<div class="layui-form-item" style="margin-bottom: 0">
|
4
4
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
5
5
|
<label>负责区域:</label>
|
6
6
|
<span><%= @area%></span>
|
7
7
|
</div>
|
8
8
|
</div>
|
9
|
-
<div class="layui-form-item">
|
9
|
+
<div class="layui-form-item" style="margin-bottom: 0">
|
10
10
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
11
11
|
<label>完成率:</label>
|
12
12
|
<span><%= @sale_report.finish_rate %>%</span>
|
@@ -31,7 +31,8 @@
|
|
31
31
|
3、补充说明需要上级解决的问题和挑战。" disabled class="layui-textarea autosize"><%= @sale_report.content %></textarea>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
|
-
|
34
|
+
<% if @sale_report.level1_opinion.present? || @sale_report.level1_score %>
|
35
|
+
<div class="layui-form-item layui-form-text" style="margin-bottom: 0px">
|
35
36
|
<label class="layui-form-label">大区意见</label>
|
36
37
|
<div class="layui-input-block">
|
37
38
|
<textarea name="desc" placeholder="给出评价、提醒、建议、办法等。" disabled
|
@@ -39,7 +40,9 @@
|
|
39
40
|
</div>
|
40
41
|
</div>
|
41
42
|
<div id="weekStar4" style="margin-bottom: 40px"></div>
|
42
|
-
|
43
|
+
<%end %>
|
44
|
+
<% if @sale_report.level2_opinion.present? || @sale_report.level2_score %>
|
45
|
+
<div class="layui-form-item layui-form-text" style="margin-bottom: 0px">
|
43
46
|
<label class="layui-form-label">总监意见</label>
|
44
47
|
<div class="layui-input-block">
|
45
48
|
<textarea name="desc" placeholder="给出评价、提醒、建议、办法等。" disabled
|
@@ -47,7 +50,9 @@
|
|
47
50
|
</div>
|
48
51
|
</div>
|
49
52
|
<div id="weekStar5" style="margin-bottom: 40px"></div>
|
50
|
-
|
53
|
+
<%end %>
|
54
|
+
<% if @sale_report.level3_opinion.present? || @sale_report.level3_score %>
|
55
|
+
<div class="layui-form-item layui-form-text" style="margin-bottom: 0px">
|
51
56
|
<label class="layui-form-label">副总意见</label>
|
52
57
|
<div class="layui-input-block">
|
53
58
|
<textarea name="desc" placeholder="给出评价、提醒、建议、办法等。" disabled
|
@@ -55,6 +60,7 @@
|
|
55
60
|
</div>
|
56
61
|
</div>
|
57
62
|
<div id="weekStar6" style="margin-bottom: 40px"></div>
|
63
|
+
<%end %>
|
58
64
|
<br>
|
59
65
|
</div>
|
60
66
|
</form>
|
@@ -111,32 +117,32 @@
|
|
111
117
|
cols: [
|
112
118
|
[{
|
113
119
|
field: 'id',
|
114
|
-
width:
|
120
|
+
width: 60,
|
115
121
|
title:'序号',type: 'numbers',
|
116
122
|
},
|
117
123
|
{
|
118
124
|
field: 'staff',
|
119
|
-
width:
|
125
|
+
width: 80,
|
120
126
|
title: '姓名'
|
121
127
|
},
|
122
128
|
{
|
123
129
|
field: 'teacher_name',
|
124
|
-
width:
|
130
|
+
width: 120,
|
125
131
|
title: '教师姓名',
|
126
132
|
},
|
127
133
|
{
|
128
134
|
field: 'school',
|
129
|
-
width:
|
135
|
+
width: 170,
|
130
136
|
title: '单位'
|
131
137
|
},
|
132
138
|
{
|
133
139
|
field: 'department',
|
134
|
-
width:
|
140
|
+
width: 170,
|
135
141
|
title: '部门'
|
136
142
|
},
|
137
143
|
{
|
138
144
|
field: 'week',
|
139
|
-
width:
|
145
|
+
width: 80,
|
140
146
|
title: '周次',
|
141
147
|
},
|
142
148
|
{
|
@@ -146,18 +152,18 @@
|
|
146
152
|
},
|
147
153
|
{
|
148
154
|
field: 'count',
|
149
|
-
width:
|
155
|
+
width: 80,
|
150
156
|
title: '跟进',
|
151
157
|
templet: '#show_follow_show'
|
152
158
|
},
|
153
159
|
{
|
154
160
|
field: 'rate',
|
155
|
-
width:
|
161
|
+
width: 80,
|
156
162
|
title: '完成率',
|
157
163
|
},
|
158
164
|
{
|
159
165
|
field: 'updated_at',
|
160
|
-
width:
|
166
|
+
width: 170,
|
161
167
|
title: '更新时间',
|
162
168
|
sort: true,
|
163
169
|
},
|
@@ -122,7 +122,7 @@
|
|
122
122
|
},
|
123
123
|
{
|
124
124
|
field: 'level1_score',
|
125
|
-
width:
|
125
|
+
width: 120,
|
126
126
|
title: '大区',
|
127
127
|
templet: function (d) {
|
128
128
|
return '<div class="star1"></div>'
|
@@ -130,7 +130,7 @@
|
|
130
130
|
},
|
131
131
|
{
|
132
132
|
field: 'level2_score',
|
133
|
-
width:
|
133
|
+
width: 120,
|
134
134
|
title: '总监',
|
135
135
|
templet: function (d) {
|
136
136
|
return '<div class="star2"></div>'
|
@@ -138,7 +138,7 @@
|
|
138
138
|
},
|
139
139
|
{
|
140
140
|
field: 'level3_score',
|
141
|
-
width:
|
141
|
+
width: 120,
|
142
142
|
title: '副总',
|
143
143
|
templet: function (d) {
|
144
144
|
return '<div class="star3"></div>'
|
@@ -146,7 +146,7 @@
|
|
146
146
|
},
|
147
147
|
{
|
148
148
|
field: 'created_at',
|
149
|
-
width:
|
149
|
+
width: 200,
|
150
150
|
title: '提交时间',
|
151
151
|
},
|
152
152
|
{
|
@@ -124,7 +124,7 @@
|
|
124
124
|
},
|
125
125
|
{
|
126
126
|
field: 'level1_score',
|
127
|
-
width:
|
127
|
+
width: 120,
|
128
128
|
title: '大区',
|
129
129
|
templet: function (d) {
|
130
130
|
return '<div class="star1"></div>'
|
@@ -132,7 +132,7 @@
|
|
132
132
|
},
|
133
133
|
{
|
134
134
|
field: 'level2_score',
|
135
|
-
width:
|
135
|
+
width: 120,
|
136
136
|
title: '总监',
|
137
137
|
templet: function (d) {
|
138
138
|
return '<div class="star2"></div>'
|
@@ -140,7 +140,7 @@
|
|
140
140
|
},
|
141
141
|
{
|
142
142
|
field: 'level3_score',
|
143
|
-
width:
|
143
|
+
width: 120,
|
144
144
|
title: '副总',
|
145
145
|
templet: function (d) {
|
146
146
|
return '<div class="star3"></div>'
|
@@ -149,7 +149,7 @@
|
|
149
149
|
},
|
150
150
|
{
|
151
151
|
field: 'created_at',
|
152
|
-
width:
|
152
|
+
width: 200,
|
153
153
|
title: '提交时间',
|
154
154
|
},
|
155
155
|
{
|
@@ -1,28 +1,28 @@
|
|
1
1
|
<form class="layui-form " action="">
|
2
2
|
<div class="layui-form-item" style="padding: 25px">
|
3
3
|
<div class="layui-inline">
|
4
|
-
<label class="layui-form-label">月份</label>
|
4
|
+
<label class="layui-form-label required">月份</label>
|
5
5
|
<div class="layui-input-inline">
|
6
6
|
<input type="text" class="layui-input" id="edit_month_plan_month" autocomplete="off" name="month">
|
7
7
|
</div>
|
8
8
|
</div>
|
9
9
|
<div class="layui-inline">
|
10
|
-
<label class="layui-form-label">商机</label>
|
10
|
+
<label class="layui-form-label required">商机</label>
|
11
11
|
<div class="layui-input-inline" style="width: 500px">
|
12
|
-
<%= select_tag "business_id", options_for_select(@businesses, @sale_plan.business_id),
|
12
|
+
<%= select_tag "business_id", options_for_select(@businesses, @sale_plan.business_id), {"lay-verify": "required", include_blank: true} %>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
<div class="layui-form-item layui-form-text">
|
16
|
-
<label class="layui-form-label">计划内容</label>
|
16
|
+
<label class="layui-form-label required">计划内容</label>
|
17
17
|
<div class="layui-input-block">
|
18
|
-
<textarea name="content" placeholder="简要填写具体的营销计划,例如:
|
18
|
+
<textarea name="content" lay-verify="required" placeholder="简要填写具体的营销计划,例如:
|
19
19
|
1、推动xx老师用起来;
|
20
20
|
2、与xx老师介绍一下我们的方案;
|
21
21
|
3、与xx领导深度沟通一下,以获取到关键建设规划信息等等。" class="layui-textarea" rows="10"><%= @sale_plan.content %></textarea>
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
<div class="layui-inline">
|
25
|
-
<label class="layui-form-label">完成率</label>
|
25
|
+
<label class="layui-form-label required">完成率</label>
|
26
26
|
<div class="layui-input-inline">
|
27
27
|
<%= select_tag "finish_rate", options_for_select(@finish_rates, @sale_plan.finish_rate) %>
|
28
28
|
</div>
|
@@ -1,36 +1,36 @@
|
|
1
1
|
<div class="layui-form layuimini-form">
|
2
2
|
<div class="layui-form-item" style="padding: 25px">
|
3
3
|
<div class="layui-inline">
|
4
|
-
<label class="layui-form-label">月份</label>
|
4
|
+
<label class="layui-form-label required">月份</label>
|
5
5
|
<div class="layui-input-inline">
|
6
6
|
<input type="text" class="layui-input" id="edit_week_plan_month" autocomplete="off" name="month">
|
7
7
|
</div>
|
8
8
|
</div>
|
9
9
|
<% if @sale_plan.weekly.present? %>
|
10
10
|
<div class="layui-inline">
|
11
|
-
<label class="layui-form-label">周次</label>
|
11
|
+
<label class="layui-form-label required">周次</label>
|
12
12
|
<div class="layui-input-inline">
|
13
13
|
<%= select_tag "weekly", options_for_select(@weeks, @sale_plan.weekly), class: 'required' %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<% end %>
|
17
17
|
<div class="layui-inline">
|
18
|
-
<label class="layui-form-label">商机</label>
|
18
|
+
<label class="layui-form-label required">商机</label>
|
19
19
|
<div class="layui-input-inline" style="width: 500px">
|
20
|
-
<%= select_tag "business_id", options_for_select(@businesses, @sale_plan.business_id),
|
20
|
+
<%= select_tag "business_id", options_for_select(@businesses, @sale_plan.business_id), {"lay-verify": "required", include_blank: true} %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
<div class="layui-form-item layui-form-text">
|
24
|
-
<label class="layui-form-label">计划内容</label>
|
24
|
+
<label class="layui-form-label required">计划内容</label>
|
25
25
|
<div class="layui-input-block">
|
26
|
-
<textarea name="content" placeholder="简要填写具体的营销计划,例如:
|
26
|
+
<textarea name="content" lay-verify="required" placeholder="简要填写具体的营销计划,例如:
|
27
27
|
1、推动xx老师用起来;
|
28
28
|
2、与xx老师介绍一下我们的方案;
|
29
29
|
3、与xx领导深度沟通一下,以获取到关键建设规划信息等等。" class="layui-textarea" rows="10"><%= @sale_plan.content %></textarea>
|
30
30
|
</div>
|
31
31
|
</div>
|
32
32
|
<div class="layui-inline">
|
33
|
-
<label class="layui-form-label">完成率</label>
|
33
|
+
<label class="layui-form-label required">完成率</label>
|
34
34
|
<div class="layui-input-inline">
|
35
35
|
<%= select_tag "finish_rate", options_for_select(@finish_rates, @sale_plan.finish_rate) %>
|
36
36
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="layui-inline">
|
4
4
|
<label class="layui-form-label required">月份</label>
|
5
5
|
<div class="layui-input-inline">
|
6
|
-
<input type="text" class="layui-input" id="new_month_month" autocomplete="off" name="month">
|
6
|
+
<input type="text" lay-verify="required" class="layui-input" id="new_month_month" autocomplete="off" name="month">
|
7
7
|
</div>
|
8
8
|
</div>
|
9
9
|
<div class="layui-inline">
|
@@ -112,33 +112,33 @@
|
|
112
112
|
},
|
113
113
|
{
|
114
114
|
field: 'staff',
|
115
|
-
width:
|
115
|
+
width: 80,
|
116
116
|
title: '姓名'
|
117
117
|
},
|
118
118
|
{
|
119
119
|
field: 'business_name',
|
120
|
-
width:
|
120
|
+
width: 170,
|
121
121
|
title: '商机名称',
|
122
122
|
},
|
123
123
|
{
|
124
124
|
field: 'school',
|
125
|
-
width:
|
125
|
+
width: 170,
|
126
126
|
title: '单位'
|
127
127
|
},
|
128
128
|
{
|
129
129
|
field: 'department',
|
130
|
-
width:
|
130
|
+
width: 170,
|
131
131
|
title: '部门'
|
132
132
|
},
|
133
133
|
{
|
134
134
|
field: 'follow_ups_count',
|
135
|
-
width:
|
135
|
+
width: 80,
|
136
136
|
title: '跟进',
|
137
137
|
templet: '#show_follow'
|
138
138
|
},
|
139
139
|
{
|
140
140
|
field: 'finish_rate',
|
141
|
-
width:
|
141
|
+
width: 80,
|
142
142
|
title: '完成率',
|
143
143
|
},
|
144
144
|
{
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<div class="layui-inline">
|
4
4
|
<label class="layui-form-label required">月份</label>
|
5
5
|
<div class="layui-input-inline">
|
6
|
-
<input type="text" class="layui-input" id="new_week_month" autocomplete="off" name="month">
|
6
|
+
<input type="text" lay-verify="required" class="layui-input" id="new_week_month" autocomplete="off" name="month">
|
7
7
|
</div>
|
8
8
|
</div>
|
9
9
|
<div class="layui-inline">
|
10
10
|
<label class="layui-form-label required">周次</label>
|
11
11
|
<div class="layui-input-inline">
|
12
|
-
<%= select_tag "weekly", options_for_select(@weeks), class: 'required' %>
|
12
|
+
<%= select_tag "weekly", options_for_select(@weeks,@week), class: 'required' %>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
<div class="layui-inline">
|
@@ -134,38 +134,38 @@
|
|
134
134
|
},
|
135
135
|
{
|
136
136
|
field: 'staff',
|
137
|
-
width:
|
137
|
+
width: 80,
|
138
138
|
title: '姓名'
|
139
139
|
},
|
140
140
|
{
|
141
141
|
field: 'business_name',
|
142
|
-
width:
|
142
|
+
width: 170,
|
143
143
|
title: '商机名称',
|
144
144
|
},
|
145
145
|
{
|
146
146
|
field: 'school',
|
147
|
-
width:
|
147
|
+
width: 170,
|
148
148
|
title: '单位'
|
149
149
|
},
|
150
150
|
{
|
151
151
|
field: 'department',
|
152
|
-
width:
|
152
|
+
width: 170,
|
153
153
|
title: '部门'
|
154
154
|
},
|
155
155
|
{
|
156
156
|
field: 'weekly',
|
157
|
-
width:
|
157
|
+
width: 80,
|
158
158
|
title: '周次',
|
159
159
|
},
|
160
160
|
{
|
161
161
|
field: 'follow_ups_count',
|
162
|
-
width:
|
162
|
+
width: 80,
|
163
163
|
title: '跟进',
|
164
164
|
templet: '#show_follow'
|
165
165
|
},
|
166
166
|
{
|
167
167
|
field: 'finish_rate',
|
168
|
-
width:
|
168
|
+
width: 80,
|
169
169
|
title: '完成率',
|
170
170
|
},
|
171
171
|
{
|
@@ -0,0 +1,122 @@
|
|
1
|
+
<script type="text/html" id="toolbarDemo5">
|
2
|
+
<div class="layui-btn-container">
|
3
|
+
<span class="table-label">商机列表</span>
|
4
|
+
</div>
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<table class="layui-hide" id="business" lay-filter="business"></table>
|
8
|
+
|
9
|
+
<script type="text/html" id="currentTableBar5">
|
10
|
+
<%# if can? :update, EducodeSales::business %>
|
11
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="restore">还原</a>
|
12
|
+
<%# end %>
|
13
|
+
<%# if can? :destroy, EducodeSales::business %>
|
14
|
+
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
|
15
|
+
<%# end %>
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<script type="text/html" id="showchance">
|
19
|
+
<a href="/missions/businesses" class="layui-table-link">{{ d.chance }}</a>
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
layui.use(['form', 'table', 'miniPage', 'element', 'request'], function () {
|
24
|
+
var $ = layui.jquery,
|
25
|
+
form = layui.form,
|
26
|
+
table = layui.table,
|
27
|
+
request = layui.request,
|
28
|
+
miniPage = layui.miniPage;
|
29
|
+
|
30
|
+
table.render({
|
31
|
+
elem: '#business',
|
32
|
+
url: '/missions/recycles/business',
|
33
|
+
toolbar: '#toolbarDemo5',
|
34
|
+
totalRow:true,
|
35
|
+
defaultToolbar: [],
|
36
|
+
cols: [
|
37
|
+
[
|
38
|
+
{
|
39
|
+
field: 'id',
|
40
|
+
title:'序号',type: 'numbers',
|
41
|
+
},
|
42
|
+
{
|
43
|
+
field: 'name',
|
44
|
+
title: '名称'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
field: 'school',
|
48
|
+
title: '单位'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
field: 'department',
|
52
|
+
title: '部门'
|
53
|
+
},
|
54
|
+
{
|
55
|
+
field: 'last_follow_person',
|
56
|
+
width: 150,
|
57
|
+
title: '最新跟进人'
|
58
|
+
},
|
59
|
+
{
|
60
|
+
field: 'latest_time',
|
61
|
+
title: '最新跟进时间',
|
62
|
+
},
|
63
|
+
{
|
64
|
+
field: 'deleter',
|
65
|
+
width: 90,
|
66
|
+
title: '删除人',
|
67
|
+
},
|
68
|
+
{
|
69
|
+
field: 'delete_time',
|
70
|
+
title: '删除时间',
|
71
|
+
sort: true,
|
72
|
+
|
73
|
+
},
|
74
|
+
{
|
75
|
+
title: '操作',
|
76
|
+
width: 120,
|
77
|
+
toolbar: '#currentTableBar5',
|
78
|
+
align: "center"
|
79
|
+
}
|
80
|
+
]
|
81
|
+
],
|
82
|
+
limit: 20,
|
83
|
+
limits: [10,15,20,30,40,50,60,70,80,90],
|
84
|
+
page: true
|
85
|
+
});
|
86
|
+
|
87
|
+
var sort = {}, search = {};
|
88
|
+
table.on('sort(business)', function (obj) {
|
89
|
+
sort.field = obj.field;
|
90
|
+
sort.order = obj.type;
|
91
|
+
table.reload('business', {
|
92
|
+
initSort: obj,
|
93
|
+
where: {
|
94
|
+
sort: sort,
|
95
|
+
q: search
|
96
|
+
}
|
97
|
+
});
|
98
|
+
})
|
99
|
+
|
100
|
+
|
101
|
+
table.on('tool(business)', function (obj) {
|
102
|
+
var data = obj.data;
|
103
|
+
var id = data.id
|
104
|
+
if (obj.event === 'restore') {
|
105
|
+
layer.confirm('确定恢复' + data.name, function (index) {
|
106
|
+
request.get('missions/recycles/' + data.id + '/restore_businesses', {}, function (res) {
|
107
|
+
layer.close(index);
|
108
|
+
table.reload("business")
|
109
|
+
})
|
110
|
+
});
|
111
|
+
} else if (obj.event === 'delete') {
|
112
|
+
layer.confirm('确定删除' + data.name, function (index) {
|
113
|
+
request.delete('missions/recycles/' + data.id, {}, function (res) {
|
114
|
+
layer.close(index);
|
115
|
+
table.reload("business")
|
116
|
+
})
|
117
|
+
});
|
118
|
+
}
|
119
|
+
});
|
120
|
+
|
121
|
+
});
|
122
|
+
</script>
|