educode_sales 0.4.3 → 0.4.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 +4 -4
- data/app/assets/images/educode_sales/1./351/224/200/345/224/256/346/264/273/345/212/250.png +0 -0
- data/app/assets/images/educode_sales/10./346/225/231/345/270/210/350/277/220/350/220/245.png +0 -0
- data/app/assets/images/educode_sales/11./346/264/273/345/212/250/350/277/220/350/220/245.png +0 -0
- data/app/assets/images/educode_sales/12./350/277/220/350/220/245/350/256/241/345/210/222.png +0 -0
- data/app/assets/images/educode_sales/13./347/263/273/347/273/237/350/256/276/347/275/256.png +0 -0
- data/app/assets/images/educode_sales/14./350/247/222/350/211/262/347/256/241/347/220/206.png +0 -0
- data/app/assets/images/educode_sales/15./344/272/272/345/221/230/347/256/241/347/220/206.png +0 -0
- data/app/assets/images/educode_sales/16./345/255/227/345/205/270/345/210/227/350/241/250.png +0 -0
- data/app/assets/images/educode_sales/2./345/270/202/345/234/272/346/200/201/345/212/277.png +0 -0
- data/app/assets/images/educode_sales/3./351/224/200/345/224/256/345/210/206/345/267/245.png +0 -0
- data/app/assets/images/educode_sales/4./345/225/206/346/234/272/347/256/241/347/220/206.png +0 -0
- data/app/assets/images/educode_sales/5./346/270/240/351/201/223/347/256/241/347/220/206.png +0 -0
- data/app/assets/images/educode_sales/6./351/224/200/345/224/256/350/256/241/345/210/222.png +0 -0
- data/app/assets/images/educode_sales/7./350/277/220/350/220/245/346/264/273/345/212/250.png +0 -0
- data/app/assets/images/educode_sales/8./350/277/220/350/220/245/346/200/201/345/212/277.png +0 -0
- data/app/assets/images/educode_sales/9./350/277/220/350/220/245/345/210/206/345/267/245.png +0 -0
- data/app/assets/images/educode_sales/a.png +0 -0
- data/app/assets/images/educode_sales/indexLogo.png +0 -0
- data/app/assets/images/educode_sales/logo.png +0 -0
- data/app/controllers/educode_sales/businesses_controller.rb +17 -12
- data/app/controllers/educode_sales/follow_ups_controller.rb +1 -1
- data/app/controllers/educode_sales/home_controller.rb +4 -0
- data/app/controllers/educode_sales/operation_plans_controller.rb +6 -2
- data/app/controllers/educode_sales/operation_reports_controller.rb +9 -3
- data/app/controllers/educode_sales/operations_controller.rb +1 -1
- data/app/controllers/educode_sales/plans_controller.rb +18 -6
- data/app/controllers/educode_sales/sale_reports_controller.rb +9 -3
- data/app/controllers/educode_sales/sale_trends_controller.rb +6 -5
- data/app/controllers/educode_sales/teacher_follows_controller.rb +1 -1
- data/app/models/educode_sales/teacher.rb +12 -19
- data/app/views/educode_sales/activities/index.html.erb +4 -0
- data/app/views/educode_sales/activities/index.json.jbuilder +6 -0
- data/app/views/educode_sales/activities/show_teachers.html.erb +16 -16
- data/app/views/educode_sales/businesses/edit_follow_record.html.erb +1 -1
- data/app/views/educode_sales/businesses/index.html.erb +15 -10
- data/app/views/educode_sales/businesses/index.json.jbuilder +7 -1
- data/app/views/educode_sales/businesses/new_follow_record.html.erb +1 -1
- data/app/views/educode_sales/businesses/show_follow.html.erb +2 -2
- data/app/views/educode_sales/businesses/show_follow.json.jbuilder +2 -2
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +1 -1
- data/app/views/educode_sales/home/index.html.erb +1 -1
- data/app/views/educode_sales/home/search_operation_teacher.json.jbuilder +12 -0
- data/app/views/educode_sales/operation_plans/_monthPlan.html.erb +12 -8
- data/app/views/educode_sales/operation_plans/_monthly.html.erb +18 -4
- data/app/views/educode_sales/operation_plans/_weekPlan.html.erb +13 -9
- data/app/views/educode_sales/operation_plans/_weekly.html.erb +18 -4
- data/app/views/educode_sales/operation_plans/index.json.jbuilder +10 -2
- data/app/views/educode_sales/operation_plans/new_month.html.erb +34 -3
- data/app/views/educode_sales/operation_plans/new_monthly.html.erb +16 -2
- data/app/views/educode_sales/operation_plans/new_week.html.erb +32 -4
- data/app/views/educode_sales/operation_plans/new_weekly.html.erb +16 -2
- data/app/views/educode_sales/operation_reports/audit.html.erb +52 -13
- data/app/views/educode_sales/operation_reports/edit.html.erb +16 -2
- data/app/views/educode_sales/operation_reports/index.json.jbuilder +7 -0
- data/app/views/educode_sales/operation_reports/show.html.erb +58 -15
- data/app/views/educode_sales/places/index.html.erb +5 -0
- data/app/views/educode_sales/plans/_monthPlan.html.erb +11 -8
- data/app/views/educode_sales/plans/_monthly.html.erb +18 -3
- data/app/views/educode_sales/plans/_weekPlan.html.erb +10 -7
- data/app/views/educode_sales/plans/_weekly.html.erb +19 -3
- data/app/views/educode_sales/plans/edit_month.html.erb +1 -1
- data/app/views/educode_sales/plans/edit_week.html.erb +1 -1
- data/app/views/educode_sales/plans/index.json.jbuilder +4 -0
- data/app/views/educode_sales/plans/new_month.html.erb +1 -1
- data/app/views/educode_sales/plans/new_monthly.html.erb +16 -2
- data/app/views/educode_sales/plans/new_week.html.erb +1 -1
- data/app/views/educode_sales/plans/new_weekly.html.erb +16 -2
- data/app/views/educode_sales/sale_reports/audit.html.erb +52 -13
- data/app/views/educode_sales/sale_reports/edit.html.erb +16 -2
- data/app/views/educode_sales/sale_reports/index.json.jbuilder +7 -0
- data/app/views/educode_sales/sale_reports/show.html.erb +58 -21
- data/app/views/educode_sales/sales/index.html.erb +6 -0
- data/app/views/educode_sales/sales/index.json.jbuilder +20 -4
- data/app/views/educode_sales/sales/operations.html.erb +4 -4
- data/app/views/educode_sales/sales/operations.json.jbuilder +12 -3
- data/app/views/educode_sales/teachers/index.html.erb +19 -14
- data/app/views/educode_sales/teachers/index.json.jbuilder +12 -2
- data/app/views/educode_sales/teachers/show_follow.html.erb +1 -1
- data/app/views/layouts/educode_sales/application.html.erb +104 -37
- data/config/routes.rb +1 -0
- data/db/migrate/20211022085324_add_teacher_used_to_teachers.rb +7 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +22 -3
- data/app/assets/images/educode_sales/indexlogo.png +0 -0
@@ -114,14 +114,16 @@
|
|
114
114
|
elem: '#businesses_table',
|
115
115
|
url: '/missions/businesses',
|
116
116
|
where: {q: form.val('search_form')},
|
117
|
+
defaultToolbar: ['filter'],
|
117
118
|
toolbar: '#bussinessBar',
|
118
|
-
|
119
|
+
totalRow: true,//开启合并行
|
119
120
|
cols: [
|
120
121
|
[
|
121
122
|
{
|
122
123
|
field: 'id',
|
123
124
|
width: 60,
|
124
125
|
title:'序号',type: 'numbers',
|
126
|
+
totalRowText: '合计',
|
125
127
|
},
|
126
128
|
{
|
127
129
|
field: 'name',
|
@@ -130,19 +132,20 @@
|
|
130
132
|
},
|
131
133
|
{
|
132
134
|
field: 'school',
|
133
|
-
width:
|
135
|
+
width: 150,
|
134
136
|
title: '单位',
|
135
137
|
},
|
136
138
|
{
|
137
139
|
field: 'department',
|
138
|
-
width:
|
140
|
+
width: 150,
|
139
141
|
title: '部门'
|
140
142
|
},
|
141
143
|
{
|
142
144
|
field: 'follow_ups_count',
|
143
145
|
title: '跟进',
|
144
146
|
width: 60,
|
145
|
-
templet: '#show_follow'
|
147
|
+
templet: '#show_follow',
|
148
|
+
totalRow: true,
|
146
149
|
},
|
147
150
|
// {
|
148
151
|
// field: 'teachers_count',
|
@@ -152,12 +155,12 @@
|
|
152
155
|
// },
|
153
156
|
{
|
154
157
|
field: 'clazz',
|
155
|
-
width:
|
158
|
+
width: 80,
|
156
159
|
title: '类型'
|
157
160
|
},
|
158
161
|
{
|
159
162
|
field: 'stage',
|
160
|
-
width:
|
163
|
+
width: 90,
|
161
164
|
title: '阶段'
|
162
165
|
},
|
163
166
|
{
|
@@ -176,27 +179,29 @@
|
|
176
179
|
field: 'total_amount',
|
177
180
|
width: 100,
|
178
181
|
title: '总额',
|
182
|
+
totalRow: true,
|
179
183
|
sort: true
|
180
184
|
},
|
181
185
|
{
|
182
186
|
field: 'return_money',
|
183
187
|
width: 100,
|
184
188
|
title: '回款',
|
185
|
-
sort: true
|
189
|
+
sort: true,
|
190
|
+
totalRow: true
|
186
191
|
},
|
187
192
|
{
|
188
193
|
field: 'place',
|
189
|
-
width:
|
194
|
+
width: 80,
|
190
195
|
title: '渠道'
|
191
196
|
},
|
192
197
|
{
|
193
198
|
field: 'source',
|
194
|
-
width:
|
199
|
+
width: 90,
|
195
200
|
title: '商机来源'
|
196
201
|
},
|
197
202
|
{
|
198
203
|
field: 'last_follow_person',
|
199
|
-
width:
|
204
|
+
width: 100,
|
200
205
|
title: '最新跟进人'
|
201
206
|
},
|
202
207
|
{
|
@@ -1,3 +1,4 @@
|
|
1
|
+
follow_ups_count = 0
|
1
2
|
json.data do
|
2
3
|
json.array! @businesses do |d|
|
3
4
|
json.id d.id
|
@@ -5,6 +6,7 @@ json.data do
|
|
5
6
|
json.department d.department.name
|
6
7
|
json.school d.department.school.name
|
7
8
|
json.follow_ups_count d.follow_ups_count
|
9
|
+
follow_ups_count += d.follow_ups_count
|
8
10
|
json.follow_up_id d.last_follow_up_id
|
9
11
|
# json.teachers_count d.follow_ups.sum(:key_people_count)
|
10
12
|
# json.teachers_count EducodeSales::FollowUp.order(created_at: :desc).find_by(business_id: d.id).present? ? EducodeSales::FollowUp.order(created_at: :desc).find_by(business_id: d.id).key_people_count : 0
|
@@ -15,7 +17,7 @@ json.data do
|
|
15
17
|
json.total_amount d.last_follow_up&.total_amount
|
16
18
|
json.return_money d.return_money
|
17
19
|
json.place d.last_follow_up&.place&.name
|
18
|
-
json.last_follow_person d.last_follow_up.present? ? d.last_follow_up.staff.user.real_name :
|
20
|
+
json.last_follow_person d.last_follow_up.present? ? d.last_follow_up.staff.user.real_name : EducodeSales::Staff.find(d.staff_id).user.real_name
|
19
21
|
json.source d.source
|
20
22
|
json.assign_follow_ups d.last_follow_up.present? ? d.last_follow_up.assign_follow_ups.pluck(:staff_id) : []
|
21
23
|
json.current_staff_id @current_admin.id
|
@@ -23,6 +25,10 @@ json.data do
|
|
23
25
|
json.latest_time d.last_follow_up.present? ? d.last_follow_up.created_at.to_s : ''
|
24
26
|
end
|
25
27
|
end
|
28
|
+
|
29
|
+
json.totalRow do
|
30
|
+
json.follow_ups_count follow_ups_count.to_s
|
31
|
+
end
|
26
32
|
json.code 0
|
27
33
|
json.count @businesses.total_count
|
28
34
|
json.msg 'succcess'
|
@@ -75,7 +75,7 @@
|
|
75
75
|
<div class="layui-inline">
|
76
76
|
<label class="layui-form-label">渠道分成</label>
|
77
77
|
<div class="layui-input-inline">
|
78
|
-
<input name="
|
78
|
+
<input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount%>">
|
79
79
|
</div>
|
80
80
|
</div>
|
81
81
|
<div class="layui-form-item">
|
@@ -72,7 +72,7 @@
|
|
72
72
|
elem: '#sale_plan_follow_table',
|
73
73
|
url: '/missions/businesses/show_follow?id=' + parent.id ,
|
74
74
|
toolbar: '#toolbarDemo_follow',
|
75
|
-
defaultToolbar: [],
|
75
|
+
defaultToolbar: ['filter'],
|
76
76
|
cols: [
|
77
77
|
[
|
78
78
|
{
|
@@ -128,7 +128,7 @@
|
|
128
128
|
title: '合同额',
|
129
129
|
},
|
130
130
|
{
|
131
|
-
field: '
|
131
|
+
field: 'divide_amount',
|
132
132
|
width: 100,
|
133
133
|
title: '渠道分成',
|
134
134
|
},
|
@@ -9,11 +9,11 @@ json.data do
|
|
9
9
|
json.reception_at d.reception_at&.to_s(:date)
|
10
10
|
json.total_amount d.total_amount
|
11
11
|
json.actual_amount d.actual_amount
|
12
|
-
json.
|
12
|
+
json.divide_amount d.divide_amount ? d.divide_amount : ""
|
13
13
|
json.staff d.staff.user.real_name
|
14
14
|
json.place d.place&.name
|
15
15
|
json.money_plans_count d.money_plans_count
|
16
|
-
json.money d.money_plans.where(clazz: 1).sum(:amount)
|
16
|
+
json.money d.money_plans.where(clazz: 1).sum(:amount).round(2)
|
17
17
|
json.is_latest d.id == @latest&.id
|
18
18
|
end
|
19
19
|
end
|
@@ -1 +1 @@
|
|
1
|
-
<div style="text-align:center;"><%= image_tag "educode_sales/
|
1
|
+
<div style="text-align:center;"><%= image_tag "educode_sales/indexLogo.png", width: "900" %></div>
|
@@ -77,32 +77,34 @@
|
|
77
77
|
elem: '#monthPlanTable',
|
78
78
|
url: '/missions/operation_plans?clazz=month',
|
79
79
|
toolbar: '#monthPlanToolbar',
|
80
|
-
|
80
|
+
totalRow:true,
|
81
|
+
defaultToolbar: ['filter'],
|
81
82
|
cols: [
|
82
83
|
[
|
83
84
|
{
|
84
85
|
field: 'id',
|
85
|
-
width:
|
86
|
+
width: 60,
|
86
87
|
title:'序号',type: 'numbers',
|
88
|
+
totalRowText:"合计",
|
87
89
|
},
|
88
90
|
{
|
89
91
|
field: 'staff',
|
90
|
-
width:
|
92
|
+
width: 90,
|
91
93
|
title: '姓名'
|
92
94
|
},
|
93
95
|
{
|
94
96
|
field: 'teacher_name',
|
95
|
-
width:
|
97
|
+
width: 120,
|
96
98
|
title: '教师姓名',
|
97
99
|
},
|
98
100
|
{
|
99
101
|
field: 'school',
|
100
|
-
width:
|
102
|
+
width: 170,
|
101
103
|
title: '单位'
|
102
104
|
},
|
103
105
|
{
|
104
106
|
field: 'department',
|
105
|
-
width:
|
107
|
+
width: 170,
|
106
108
|
title: '部门'
|
107
109
|
},
|
108
110
|
{
|
@@ -112,14 +114,16 @@
|
|
112
114
|
},
|
113
115
|
{
|
114
116
|
field: 'count',
|
115
|
-
width:
|
117
|
+
width: 80,
|
116
118
|
title: '跟进',
|
119
|
+
totalRow:true,
|
117
120
|
templet: '#show_follow2'
|
118
121
|
},
|
119
122
|
{
|
120
|
-
field: '
|
123
|
+
field: 'finish_rate',
|
121
124
|
width: 80,
|
122
125
|
title: '完成率',
|
126
|
+
totalRow:true,
|
123
127
|
},
|
124
128
|
{
|
125
129
|
field: 'updated_at',
|
@@ -78,27 +78,36 @@
|
|
78
78
|
elem: '#monthlyTable',
|
79
79
|
url: '/missions/operation_reports?clazz=month',
|
80
80
|
toolbar: '#monthlyToolbar',
|
81
|
-
defaultToolbar: [],
|
81
|
+
defaultToolbar: ['filter'],
|
82
|
+
totalRow:true,
|
82
83
|
cols: [
|
83
84
|
[
|
84
85
|
{
|
85
86
|
field: 'id',
|
86
|
-
width:
|
87
|
+
width: 60,
|
87
88
|
title:'序号',type: 'numbers',
|
89
|
+
totalRowText:"合计",
|
88
90
|
},
|
89
91
|
{
|
90
92
|
field: 'staff',
|
91
|
-
width:
|
93
|
+
width: 90,
|
92
94
|
title: '姓名'
|
93
95
|
},
|
94
96
|
{
|
95
|
-
field: '
|
97
|
+
field: 'month',
|
96
98
|
width: 100,
|
99
|
+
title: '月份'
|
100
|
+
},
|
101
|
+
{
|
102
|
+
field: 'finish_rate',
|
103
|
+
width: 80,
|
97
104
|
title: '完成率',
|
105
|
+
totalRow:true,
|
98
106
|
},
|
99
107
|
{
|
100
108
|
field: 'client',
|
101
109
|
width: 100,
|
110
|
+
totalRow:'{{ parseInt(d.TOTAL_NUMS) }}',
|
102
111
|
title: '运营教师'
|
103
112
|
},
|
104
113
|
{
|
@@ -130,6 +139,11 @@
|
|
130
139
|
return '<div class="star3"></div>'
|
131
140
|
}
|
132
141
|
},
|
142
|
+
{
|
143
|
+
field: 'created_at',
|
144
|
+
width: 300,
|
145
|
+
title: '提交时间',
|
146
|
+
},
|
133
147
|
{
|
134
148
|
title: '操作',
|
135
149
|
minWidth: 220,
|
@@ -78,32 +78,34 @@
|
|
78
78
|
elem: '#weekPlanTable1',
|
79
79
|
url: '/missions/operation_plans?clazz=week',
|
80
80
|
toolbar: '#weekPlanToolbar',
|
81
|
-
|
81
|
+
totalRow:true,
|
82
|
+
defaultToolbar: ['filter'],
|
82
83
|
cols: [
|
83
84
|
[
|
84
85
|
{
|
85
86
|
field: 'id',
|
86
|
-
width:
|
87
|
+
width: 60,
|
87
88
|
title:'序号',type: 'numbers',
|
89
|
+
totalRowText:"合计",
|
88
90
|
},
|
89
91
|
{
|
90
92
|
field: 'staff',
|
91
|
-
width:
|
93
|
+
width: 80,
|
92
94
|
title: '姓名'
|
93
95
|
},
|
94
96
|
{
|
95
97
|
field: 'teacher_name',
|
96
|
-
width:
|
98
|
+
width: 120,
|
97
99
|
title: '教师姓名',
|
98
100
|
},
|
99
101
|
{
|
100
102
|
field: 'school',
|
101
|
-
width:
|
103
|
+
width: 170,
|
102
104
|
title: '单位'
|
103
105
|
},
|
104
106
|
{
|
105
107
|
field: 'department',
|
106
|
-
width:
|
108
|
+
width: 170,
|
107
109
|
title: '部门'
|
108
110
|
},
|
109
111
|
{
|
@@ -113,7 +115,7 @@
|
|
113
115
|
},
|
114
116
|
{
|
115
117
|
field: 'week',
|
116
|
-
width:
|
118
|
+
width: 80,
|
117
119
|
title: '周次',
|
118
120
|
},
|
119
121
|
{
|
@@ -123,14 +125,16 @@
|
|
123
125
|
},
|
124
126
|
{
|
125
127
|
field: 'count',
|
126
|
-
width:
|
128
|
+
width: 80,
|
127
129
|
title: '跟进',
|
130
|
+
totalRow:true,
|
128
131
|
templet: '#show_follow1'
|
129
132
|
},
|
130
133
|
{
|
131
|
-
field: '
|
134
|
+
field: 'finish_rate',
|
132
135
|
width: 80,
|
133
136
|
title: '完成率',
|
137
|
+
totalRow:true,
|
134
138
|
},
|
135
139
|
{
|
136
140
|
field: 'updated_at',
|
@@ -79,27 +79,36 @@
|
|
79
79
|
elem: '#weeklyTable',
|
80
80
|
url: '/missions/operation_reports?clazz=week',
|
81
81
|
toolbar: '#weeklyToolbar',
|
82
|
-
|
82
|
+
totalRow:true,
|
83
|
+
defaultToolbar: ['filter'],
|
83
84
|
cols: [
|
84
85
|
[
|
85
86
|
{
|
86
87
|
field: 'id',
|
87
|
-
width:
|
88
|
+
width: 60,
|
88
89
|
title:'序号',type: 'numbers',
|
90
|
+
totalRowText:"合计",
|
89
91
|
},
|
90
92
|
{
|
91
93
|
field: 'staff',
|
92
|
-
width:
|
94
|
+
width: 90,
|
93
95
|
title: '姓名'
|
94
96
|
},
|
97
|
+
{
|
98
|
+
field: 'weekly',
|
99
|
+
width: 60,
|
100
|
+
title: '周次'
|
101
|
+
},
|
95
102
|
{
|
96
103
|
field: 'finish_rate',
|
97
|
-
width:
|
104
|
+
width: 80,
|
98
105
|
title: '完成率',
|
106
|
+
totalRow:true,
|
99
107
|
},
|
100
108
|
{
|
101
109
|
field: 'client',
|
102
110
|
width: 100,
|
111
|
+
totalRow:'{{ parseInt(d.TOTAL_NUMS) }}',
|
103
112
|
title: '运营教师'
|
104
113
|
},
|
105
114
|
{
|
@@ -131,6 +140,11 @@
|
|
131
140
|
return '<div class="star3"></div>'
|
132
141
|
}
|
133
142
|
},
|
143
|
+
{
|
144
|
+
field: 'created_at',
|
145
|
+
width: 300,
|
146
|
+
title: '提交时间',
|
147
|
+
},
|
134
148
|
{
|
135
149
|
title: '操作',
|
136
150
|
minWidth: 220,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
counts = 0
|
1
2
|
json.data do
|
2
3
|
json.array! @sale_plans do |d|
|
3
4
|
json.id d.id
|
@@ -9,11 +10,18 @@ json.data do
|
|
9
10
|
json.week d.weekly
|
10
11
|
json.teacher_id d.teacher_id
|
11
12
|
json.content d.content.truncate(30)
|
12
|
-
|
13
|
-
json.
|
13
|
+
count = d.teacher.teacher_follows_count
|
14
|
+
json.count count
|
15
|
+
counts += count
|
16
|
+
json.finish_rate "#{d.finish_rate}%"
|
14
17
|
json.updated_at d.updated_at.to_s
|
15
18
|
end
|
16
19
|
end
|
17
20
|
|
21
|
+
json.totalRow do
|
22
|
+
sum = @sale_plans.inject(0) { |score, i| score + i.finish_rate}
|
23
|
+
json.finish_rate ( @sale_plans.size > 0 ? (sum.to_f / @sale_plans.size).round(2).to_s : '0' ) + '%'
|
24
|
+
json.count counts.to_s
|
25
|
+
end
|
18
26
|
json.code 0
|
19
27
|
json.count @sale_plans.total_count
|
@@ -8,9 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
<div class="layui-inline">
|
10
10
|
<label class="layui-form-label required">教师</label>
|
11
|
-
<div class="layui-input-
|
12
|
-
<%= select_tag "teacher_id", options_for_select(@teachers, @teacher&.id), {"lay-verify": "required", include_blank: true} %>
|
13
|
-
</div>
|
11
|
+
<div class="layui-input-block" id="add_teacher" style="width: 400px"></div>
|
14
12
|
</div>
|
15
13
|
<div class="layui-form-item layui-form-text">
|
16
14
|
<label class="layui-form-label">计划内容</label>
|
@@ -55,9 +53,41 @@
|
|
55
53
|
request = layui.request,
|
56
54
|
laydate = layui.laydate,
|
57
55
|
$ = layui.$;
|
56
|
+
selectInput = layui.selectInput;
|
57
|
+
|
58
58
|
|
59
59
|
form.render();
|
60
60
|
|
61
|
+
var add_teacher = selectInput.render({
|
62
|
+
elem: '#add_teacher',
|
63
|
+
name: 'teacher_id', // 渲染的input的name值
|
64
|
+
layFilter: 'teacher_id', //同layui form参数lay-filter
|
65
|
+
layVerify: 'required', //同layui form参数lay-verify
|
66
|
+
layVerType: 'tips', // 同layui form参数lay-verType
|
67
|
+
layReqText: '请填写文本', //同layui form参数lay-ReqText
|
68
|
+
initValue: '', // 渲染初始化默认值
|
69
|
+
hasSelectIcon: false,
|
70
|
+
placeholder: '支持姓名搜索', // 渲染的inputplaceholder值
|
71
|
+
data: [],
|
72
|
+
remoteSearch: true, // 是否启用远程搜索 默认是false,和远程搜索回调保存同步
|
73
|
+
remoteMethod: function (value, cb) { // 远程搜索的回调函数
|
74
|
+
if (!value) {
|
75
|
+
return cb([]);
|
76
|
+
}
|
77
|
+
request.get('missions/search_operation_teacher?q=' + value, {}, function (res) {
|
78
|
+
return cb(res)
|
79
|
+
})
|
80
|
+
}
|
81
|
+
});
|
82
|
+
|
83
|
+
add_teacher.on('itemSelect(add_teacher)', function (obj) {
|
84
|
+
teacher_id = obj.data;
|
85
|
+
var name = obj.textContent
|
86
|
+
add_teacher.setValue(name)
|
87
|
+
});
|
88
|
+
|
89
|
+
|
90
|
+
|
61
91
|
laydate.render({
|
62
92
|
elem: '#new_month_plan',
|
63
93
|
type: 'month'
|
@@ -66,6 +96,7 @@
|
|
66
96
|
var parentIndex = layer.index;
|
67
97
|
|
68
98
|
form.on('submit(add_month_plan)', function (data) {
|
99
|
+
data.field.teacher_id = teacher_id
|
69
100
|
request.authPost("missions/operation_plans", data.field, function (res) {
|
70
101
|
if (res.success == false) {
|
71
102
|
layer.alert(res.msg)
|
@@ -4,7 +4,14 @@
|
|
4
4
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加计划</button>
|
5
5
|
</div>
|
6
6
|
</script>
|
7
|
-
<
|
7
|
+
<h1 class="m-t-20 text-center">报告人员:<%=@name %></h1>
|
8
|
+
<form class="layui-form layui-form-pane" action="" style="padding-right: 20px">
|
9
|
+
<div class="layui-form-item">
|
10
|
+
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
11
|
+
<label>负责区域:</label>
|
12
|
+
<span><%= @area %></span>
|
13
|
+
</div>
|
14
|
+
</div>
|
8
15
|
<div class="layui-form-item">
|
9
16
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
10
17
|
<label>完成率:</label>
|
@@ -16,6 +23,11 @@
|
|
16
23
|
<span><%= @departments_count%></span>
|
17
24
|
<%= hidden_field_tag 'client', @departments_count, {id: 'monthly_client_hide'} %>
|
18
25
|
</div>
|
26
|
+
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
27
|
+
<label style="margin-left: 100px">提交时间:</label>
|
28
|
+
<span><%= Time.now %></span>
|
29
|
+
<%= hidden_field_tag 'amount', @total_amount, {id: 'monthly_amount_hide'} %>
|
30
|
+
</div>
|
19
31
|
</div>
|
20
32
|
<div class="layui-form-item" style="margin-left: 18px">
|
21
33
|
<div class="layui-form-item layui-form-text">
|
@@ -35,7 +47,9 @@
|
|
35
47
|
</form>
|
36
48
|
|
37
49
|
<!--表格-->
|
38
|
-
<
|
50
|
+
<div style="padding: 20px">
|
51
|
+
<table class="layui-hide" id="newMonthlyTable" lay-filter="newMonthlyToolbar"></table>
|
52
|
+
</div>
|
39
53
|
|
40
54
|
<script type="text/html" id="currentMonthly">
|
41
55
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
|
@@ -14,10 +14,7 @@
|
|
14
14
|
</div>
|
15
15
|
<div class="layui-inline">
|
16
16
|
<label class="layui-form-label required">教师</label>
|
17
|
-
<div class="layui-input-
|
18
|
-
|
19
|
-
<%= select_tag "teacher_id", options_for_select(@teachers, @teacher&.id), {"lay-verify": "required", include_blank: true} %>
|
20
|
-
</div>
|
17
|
+
<div class="layui-input-block" id="add_teacher" style="width: 400px"></div>
|
21
18
|
</div>
|
22
19
|
<div class="layui-form-item layui-form-text">
|
23
20
|
<label class="layui-form-label required">计划内容</label>
|
@@ -62,9 +59,39 @@
|
|
62
59
|
request = layui.request,
|
63
60
|
laydate = layui.laydate,
|
64
61
|
$ = layui.$;
|
62
|
+
selectInput = layui.selectInput;
|
65
63
|
|
66
64
|
form.render();
|
67
65
|
|
66
|
+
var add_teacher = selectInput.render({
|
67
|
+
elem: '#add_teacher',
|
68
|
+
name: 'teacher_id', // 渲染的input的name值
|
69
|
+
layFilter: 'teacher_id', //同layui form参数lay-filter
|
70
|
+
layVerify: 'required', //同layui form参数lay-verify
|
71
|
+
layVerType: 'tips', // 同layui form参数lay-verType
|
72
|
+
layReqText: '请填写文本', //同layui form参数lay-ReqText
|
73
|
+
initValue: '', // 渲染初始化默认值
|
74
|
+
hasSelectIcon: false,
|
75
|
+
placeholder: '支持姓名搜索', // 渲染的inputplaceholder值
|
76
|
+
data: [],
|
77
|
+
remoteSearch: true, // 是否启用远程搜索 默认是false,和远程搜索回调保存同步
|
78
|
+
remoteMethod: function (value, cb) { // 远程搜索的回调函数
|
79
|
+
if (!value) {
|
80
|
+
return cb([]);
|
81
|
+
}
|
82
|
+
request.get('missions/search_operation_teacher?q=' + value, {}, function (res) {
|
83
|
+
return cb(res)
|
84
|
+
})
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
add_teacher.on('itemSelect(add_teacher)', function (obj) {
|
89
|
+
teacher_id = obj.data;
|
90
|
+
var name = obj.textContent
|
91
|
+
add_teacher.setValue(name)
|
92
|
+
});
|
93
|
+
|
94
|
+
|
68
95
|
laydate.render({
|
69
96
|
elem: '#new_week_plan',
|
70
97
|
type: 'month'
|
@@ -72,6 +99,7 @@
|
|
72
99
|
|
73
100
|
|
74
101
|
form.on('submit(add_week_plan)', function (data) {
|
102
|
+
data.field.teacher_id = teacher_id
|
75
103
|
request.authPost("missions/operation_plans", data.field, function (res) {
|
76
104
|
if (res.success == false) {
|
77
105
|
layer.alert(res.msg)
|
@@ -4,7 +4,14 @@
|
|
4
4
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加计划</button>
|
5
5
|
</div>
|
6
6
|
</script>
|
7
|
-
<
|
7
|
+
<h1 class="m-t-20 text-center">报告人员:<%=@name %></h1>
|
8
|
+
<form class="layui-form layui-form-pane" action="" style="padding-right: 20px">
|
9
|
+
<div class="layui-form-item">
|
10
|
+
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
11
|
+
<label>负责区域:</label>
|
12
|
+
<span><%= @area %></span>
|
13
|
+
</div>
|
14
|
+
</div>
|
8
15
|
<div class="layui-form-item">
|
9
16
|
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
10
17
|
<label>完成率:</label>
|
@@ -16,6 +23,11 @@
|
|
16
23
|
<span><%= @departments_count%></span>
|
17
24
|
<%= hidden_field_tag 'client', @departments_count, {id: 'weekly_client_hide'} %>
|
18
25
|
</div>
|
26
|
+
<div class="layui-inline" style="margin:18px; font-weight: bold">
|
27
|
+
<label style="margin-left: 100px">提交时间:</label>
|
28
|
+
<span><%= Time.now %></span>
|
29
|
+
<%= hidden_field_tag 'amount', @total_amount, {id: 'monthly_amount_hide'} %>
|
30
|
+
</div>
|
19
31
|
</div>
|
20
32
|
<div class="layui-form-item" style="margin-left: 18px">
|
21
33
|
<div class="layui-form-item layui-form-text">
|
@@ -35,7 +47,9 @@
|
|
35
47
|
</form>
|
36
48
|
|
37
49
|
<!--表格-->
|
38
|
-
<
|
50
|
+
<div style="padding: 20px">
|
51
|
+
<table class="layui-hide" id="newWeeklyTable" lay-filter="newWeeklyToolbar"></table>
|
52
|
+
</div>
|
39
53
|
|
40
54
|
<script type="text/html" id="currentWeekly">
|
41
55
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
|