educode_sales 0.8.5 → 0.8.9
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/stylesheets/educode_sales/layuimini.css +1 -1
- data/app/controllers/educode_sales/assessments_controller.rb +15 -6
- data/app/controllers/educode_sales/businesses_controller.rb +3 -3
- data/app/models/educode_sales/business.rb +0 -5
- data/app/views/educode_sales/assessments/index.html.erb +1 -1
- data/app/views/educode_sales/assessments/progress.json.jbuilder +51 -51
- data/app/views/educode_sales/businesses/get_export_data.json.jbuilder +7 -0
- data/app/views/educode_sales/businesses/index.html.erb +6 -9
- data/app/views/educode_sales/businesses/index.json.jbuilder +2 -2
- data/app/views/educode_sales/businesses/new.html.erb +1 -4
- data/app/views/educode_sales/businesses/new_follow_record.html.erb +6 -6
- data/app/views/educode_sales/businesses/show_follow.json.jbuilder +3 -3
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +5 -4
- data/app/views/educode_sales/customers/edit_follow_record.html.erb +0 -2
- data/app/views/educode_sales/places/index.html.erb +1 -1
- data/lib/educode_sales/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d40c49eb6d5bbbaea4b48a8ad0c8c5994bba11888e04ad256406e1fadd833ad2
|
4
|
+
data.tar.gz: f1733a819aadbe481b7a2f8d3233821bf24099612d1828109cd8c004e642be24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63bd36188bf06b9a4ef62edbffe8253d8fcd80ae432a748ea061f12e014b8caf0705b7c6449ebe0a82a347dc47ef79552e455fb8f0d644acaac6867087fe99dd
|
7
|
+
data.tar.gz: 851b51d8cdddd226d9854606a88e9441eb59e378a9e32e9a75faf41d3ccac32addeb9e4a65dfe6ec0d9106ee35067bf5a692ad080b71ae112adaf1841d974fc6
|
@@ -110,16 +110,11 @@ module EducodeSales
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
113
|
# 导出数据
|
117
114
|
def get_export_data
|
118
115
|
p 'get_export_data'
|
119
116
|
end
|
120
117
|
|
121
|
-
|
122
|
-
|
123
118
|
# 考核完成情况
|
124
119
|
def progress
|
125
120
|
p 'progress'
|
@@ -128,11 +123,25 @@ module EducodeSales
|
|
128
123
|
|
129
124
|
|
130
125
|
def progress_or_get_export_data
|
126
|
+
if @current_admin.is_admin?
|
127
|
+
@assessments = AssessmentsSetting.all
|
128
|
+
else
|
129
|
+
level = @current_admin.role.role_areas.find_by(clazz: '绩效考核').level
|
130
|
+
case level
|
131
|
+
when '自己'
|
132
|
+
@assessments = AssessmentsSetting.where(staff_id: @current_admin.id)
|
133
|
+
when '区域'
|
134
|
+
@staffs = EducodeSales::Staff.joins(:areas).where("educode_sales_commons.id in (?)", @current_admin.areas.pluck(:id)).distinct
|
135
|
+
@assessments = EducodeSales::AssessmentsSetting.where(staff_id: @staffs.select(:id))
|
136
|
+
else
|
137
|
+
@assessments = AssessmentsSetting.all
|
138
|
+
end
|
139
|
+
end
|
131
140
|
# common = Common.find_by(clazz: 'staff_type', name: '销售')
|
132
141
|
# @staff_ids = Staff.joins(:user).where(job_type: common.id).pluck(:id)
|
133
142
|
@assessment_id = params[:q].present? && params[:q][:assessment_id].present? ? params[:q][:assessment_id]:'1'
|
134
143
|
@assessment_year = params[:q].present? && params[:q][:assessment_year].present? ? params[:q][:assessment_year] : Time.now.year
|
135
|
-
@assessments
|
144
|
+
@assessments =@assessments.where(assessment: @assessment_id)
|
136
145
|
.where("assessment_year >= ? and assessment_year <= ?", "#{@assessment_year}-01-01 00:00:00".to_date, "#{@assessment_year}-12-31 23:59:00".to_date)
|
137
146
|
.order("created_at desc")
|
138
147
|
if @assessments.present?
|
@@ -597,10 +597,10 @@ module EducodeSales
|
|
597
597
|
last_follow.total_amount").joins("
|
598
598
|
LEFT JOIN educode_sales_follow_ups AS last_follow ON educode_sales_businesses.last_follow_up_id = last_follow.id
|
599
599
|
")
|
600
|
-
|
601
600
|
end
|
602
601
|
end
|
603
602
|
end
|
603
|
+
|
604
604
|
#关注接口
|
605
605
|
def following
|
606
606
|
if brs=follow_business(@current_admin.user_id,params[:business_id])
|
@@ -642,7 +642,7 @@ module EducodeSales
|
|
642
642
|
end
|
643
643
|
|
644
644
|
def followed
|
645
|
-
if
|
645
|
+
if follow_business(@current_admin.user_id,params[:business_id])
|
646
646
|
render json: {msg:'确定取消关注?'}
|
647
647
|
else
|
648
648
|
render json: {msg:'确定关注?'}
|
@@ -664,7 +664,7 @@ module EducodeSales
|
|
664
664
|
EduSetting.get(name)
|
665
665
|
end
|
666
666
|
|
667
|
-
def
|
667
|
+
def follow_business(user_id,business_id)
|
668
668
|
BusinessRelationShip.where(user_id:user_id,business_id:business_id).first
|
669
669
|
end
|
670
670
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<li data="assessments" > 考核指标设置</li>
|
8
8
|
<%end %>
|
9
9
|
</ul>
|
10
|
-
|
10
|
+
<!--<div class="layuimini-main min-height-table"></div>-->
|
11
11
|
<div class="layui-tab-content">
|
12
12
|
<%if can?(:show_result, EducodeSales::AssessmentsSetting) %>
|
13
13
|
<div class="layui-tab-item layui-show">
|
@@ -4,59 +4,59 @@ json.data do
|
|
4
4
|
# 目标任务
|
5
5
|
json.name assessment.staff.user.real_name
|
6
6
|
json.id assessment.id
|
7
|
-
json.annual assessment.annual.to_f
|
8
|
-
json.first_quarter assessment.first_quarter.to_f
|
9
|
-
json.january assessment.january.to_f
|
10
|
-
json.february assessment.february.to_f
|
11
|
-
json.march assessment.march.to_f
|
12
|
-
json.second_quarter assessment.second_quarter.to_f
|
13
|
-
json.april assessment.april.to_f
|
14
|
-
json.may assessment.may.to_f
|
15
|
-
json.june assessment.june.to_f
|
16
|
-
json.third_quarter assessment.third_quarter.to_f
|
17
|
-
json.july assessment.july.to_f
|
18
|
-
json.august assessment.august.to_f
|
19
|
-
json.september assessment.september.to_f
|
20
|
-
json.fourth_quarter assessment.fourth_quarter.to_f
|
21
|
-
json.october assessment.october.to_f
|
22
|
-
json.november assessment.november.to_f
|
23
|
-
json.december assessment.december.to_f
|
7
|
+
json.annual assessment.annual.to_f.round(2)
|
8
|
+
json.first_quarter assessment.first_quarter.to_f.round(2)
|
9
|
+
json.january assessment.january.to_f.round(2)
|
10
|
+
json.february assessment.february.to_f.round(2)
|
11
|
+
json.march assessment.march.to_f.round(2)
|
12
|
+
json.second_quarter assessment.second_quarter.to_f.round(2)
|
13
|
+
json.april assessment.april.to_f.round(2)
|
14
|
+
json.may assessment.may.to_f.round(2)
|
15
|
+
json.june assessment.june.to_f.round(2)
|
16
|
+
json.third_quarter assessment.third_quarter.to_f.round(2)
|
17
|
+
json.july assessment.july.to_f.round(2)
|
18
|
+
json.august assessment.august.to_f.round(2)
|
19
|
+
json.september assessment.september.to_f.round(2)
|
20
|
+
json.fourth_quarter assessment.fourth_quarter.to_f.round(2)
|
21
|
+
json.october assessment.october.to_f.round(2)
|
22
|
+
json.november assessment.november.to_f.round(2)
|
23
|
+
json.december assessment.december.to_f.round(2)
|
24
24
|
# 实际任务
|
25
|
-
json.annual_progress assessment.annual_progress.to_f
|
26
|
-
json.first_quarter_progress assessment.first_quarter_progress.to_f
|
27
|
-
json.january_progress assessment.january_progress.to_f
|
28
|
-
json.february_progress assessment.february_progress.to_f
|
29
|
-
json.march_progress assessment.march_progress.to_f
|
30
|
-
json.second_quarter_progress assessment.second_quarter_progress.to_f
|
31
|
-
json.april_progress assessment.april_progress.to_f
|
32
|
-
json.may_progress assessment.may_progress.to_f
|
33
|
-
json.june_progress assessment.june_progress.to_f
|
34
|
-
json.third_quarter_progress assessment.third_quarter_progress.to_f
|
35
|
-
json.july_progress assessment.july_progress.to_f
|
36
|
-
json.august_progress assessment.august_progress.to_f
|
37
|
-
json.september_progress assessment.september_progress.to_f
|
38
|
-
json.fourth_quarter_progress assessment.fourth_quarter_progress.to_f
|
39
|
-
json.october_progress assessment.october_progress.to_f
|
40
|
-
json.november_progress assessment.november_progress.to_f
|
41
|
-
json.december_progress assessment.december_progress.to_f
|
25
|
+
json.annual_progress assessment.annual_progress.to_f.round(2)
|
26
|
+
json.first_quarter_progress assessment.first_quarter_progress.to_f.round(2)
|
27
|
+
json.january_progress assessment.january_progress.to_f.round(2)
|
28
|
+
json.february_progress assessment.february_progress.to_f.round(2)
|
29
|
+
json.march_progress assessment.march_progress.to_f.round(2)
|
30
|
+
json.second_quarter_progress assessment.second_quarter_progress.to_f.round(2)
|
31
|
+
json.april_progress assessment.april_progress.to_f.round(2)
|
32
|
+
json.may_progress assessment.may_progress.to_f.round(2)
|
33
|
+
json.june_progress assessment.june_progress.to_f.round(2)
|
34
|
+
json.third_quarter_progress assessment.third_quarter_progress.to_f.round(2)
|
35
|
+
json.july_progress assessment.july_progress.to_f.round(2)
|
36
|
+
json.august_progress assessment.august_progress.to_f.round(2)
|
37
|
+
json.september_progress assessment.september_progress.to_f.round(2)
|
38
|
+
json.fourth_quarter_progress assessment.fourth_quarter_progress.to_f.round(2)
|
39
|
+
json.october_progress assessment.october_progress.to_f.round(2)
|
40
|
+
json.november_progress assessment.november_progress.to_f.round(2)
|
41
|
+
json.december_progress assessment.december_progress.to_f.round(2)
|
42
42
|
# 差值 dif
|
43
|
-
json.annual_dif assessment.annual.to_f - assessment.annual_progress.to_f
|
44
|
-
json.first_quarter_dif assessment.first_quarter.to_f - assessment.first_quarter_progress.to_f
|
45
|
-
json.january_dif assessment.january.to_f - assessment.january_progress.to_f
|
46
|
-
json.february_dif assessment.february.to_f - assessment.february_progress.to_f
|
47
|
-
json.march_dif assessment.march.to_f - assessment.may_progress.to_f
|
48
|
-
json.second_quarter_dif assessment.second_quarter.to_f - assessment.second_quarter_progress.to_f
|
49
|
-
json.april_dif assessment.april.to_f - assessment.april_progress.to_f
|
50
|
-
json.may_dif assessment.may.to_f - assessment.may_progress.to_f
|
51
|
-
json.june_dif assessment.june.to_f - assessment.june_progress.to_f
|
52
|
-
json.third_quarter_dif assessment.third_quarter.to_f - assessment.third_quarter_progress.to_f
|
53
|
-
json.july_dif assessment.july.to_f - assessment.july_progress.to_f
|
54
|
-
json.august_dif assessment.august.to_f - assessment.august_progress.to_f
|
55
|
-
json.september_dif assessment.september.to_f - assessment.september_progress.to_f
|
56
|
-
json.fourth_quarter_dif assessment.fourth_quarter.to_f - assessment.fourth_quarter_progress.to_f
|
57
|
-
json.october_dif assessment.october.to_f - assessment.october_progress.to_f
|
58
|
-
json.november_dif assessment.november.to_f - assessment.november_progress.to_f
|
59
|
-
json.december_dif assessment.december.to_f - assessment.december_progress.to_f
|
43
|
+
json.annual_dif (assessment.annual.to_f - assessment.annual_progress.to_f).round(2)
|
44
|
+
json.first_quarter_dif (assessment.first_quarter.to_f - assessment.first_quarter_progress.to_f).round(2)
|
45
|
+
json.january_dif (assessment.january.to_f - assessment.january_progress.to_f).round(2)
|
46
|
+
json.february_dif (assessment.february.to_f - assessment.february_progress.to_f).round(2)
|
47
|
+
json.march_dif (assessment.march.to_f - assessment.may_progress.to_f).round(2)
|
48
|
+
json.second_quarter_dif (assessment.second_quarter.to_f - assessment.second_quarter_progress.to_f).round(2)
|
49
|
+
json.april_dif (assessment.april.to_f - assessment.april_progress.to_f).round(2)
|
50
|
+
json.may_dif (assessment.may.to_f - assessment.may_progress.to_f).round(2)
|
51
|
+
json.june_dif (assessment.june.to_f - assessment.june_progress.to_f).round(2)
|
52
|
+
json.third_quarter_dif (assessment.third_quarter.to_f - assessment.third_quarter_progress.to_f).round(2)
|
53
|
+
json.july_dif (assessment.july.to_f - assessment.july_progress.to_f).round(2)
|
54
|
+
json.august_dif (assessment.august.to_f - assessment.august_progress.to_f).round(2)
|
55
|
+
json.september_dif (assessment.september.to_f - assessment.september_progress.to_f).round(2)
|
56
|
+
json.fourth_quarter_dif (assessment.fourth_quarter.to_f - assessment.fourth_quarter_progress.to_f).round(2)
|
57
|
+
json.october_dif (assessment.october.to_f - assessment.october_progress.to_f).round(2)
|
58
|
+
json.november_dif (assessment.november.to_f - assessment.november_progress.to_f).round(2)
|
59
|
+
json.december_dif (assessment.december.to_f - assessment.december_progress.to_f).round(2)
|
60
60
|
# 完成率completion_rate
|
61
61
|
json.annual_rate completion_rate(assessment.annual, assessment.annual_progress)
|
62
62
|
json.first_quarter_rate completion_rate(assessment.first_quarter, assessment.first_quarter_progress)
|
@@ -16,6 +16,12 @@ json.data do
|
|
16
16
|
json.signed_date d.last_follow_up&.signed_date.to_s
|
17
17
|
json.total_amount d.last_follow_up&.total_amount
|
18
18
|
json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
|
19
|
+
EducodeSales::FollowUp::BUSINESS_DEPLOYMENT[1..-1].each do |m|
|
20
|
+
if d.last_follow_up&.o_business_deployment == m[1]
|
21
|
+
json.o_business_deployment m[0]
|
22
|
+
break
|
23
|
+
end
|
24
|
+
end
|
19
25
|
json.actual_amount d.last_follow_up&.actual_amount
|
20
26
|
json.return_money d.return_money
|
21
27
|
json.wait_return_money d.wait_return_money.to_i.round(2)
|
@@ -27,5 +33,6 @@ json.data do
|
|
27
33
|
json.current_staff_id @current_admin.id
|
28
34
|
json.staff_id d.staff_id
|
29
35
|
json.latest_time d.last_follow_up.present? ? d.last_follow_up.created_at.to_s : ''
|
36
|
+
json.year d.last_follow_up&.year.to_s
|
30
37
|
end
|
31
38
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
</ul>
|
6
6
|
<div class="layui-tab-content">
|
7
7
|
<div class="layui-tab-item follows_div layui-show">
|
8
|
-
|
8
|
+
<!--跟进动态-->
|
9
9
|
<%=render 'follows' %>
|
10
10
|
</div>
|
11
11
|
<div class="layui-tab-item businesses_list_div">
|
@@ -431,10 +431,8 @@
|
|
431
431
|
field: 'followed',
|
432
432
|
templet:function(d){
|
433
433
|
if (d.followed==1){
|
434
|
-
|
435
434
|
return '<i class="layui-icon" style="color: goldenrod"></i> '
|
436
435
|
}
|
437
|
-
|
438
436
|
else return ''
|
439
437
|
},
|
440
438
|
width: 105,
|
@@ -452,6 +450,7 @@
|
|
452
450
|
}
|
453
451
|
]
|
454
452
|
]
|
453
|
+
|
455
454
|
var business_table = table.render({
|
456
455
|
elem: '#businesses_table',
|
457
456
|
url: '/missions/businesses',
|
@@ -472,13 +471,13 @@
|
|
472
471
|
drowpdwonRender()
|
473
472
|
export_drowpdwonRender()
|
474
473
|
}
|
475
|
-
|
476
474
|
});
|
477
475
|
|
478
476
|
var dropmenu = gon.menus;
|
479
477
|
var dropmenu2=JSON.parse(JSON.stringify(dropmenu));
|
480
478
|
var export_dropmenu = gon.export_menus;
|
481
|
-
dropmenu2[dropmenu2.findIndex(function (elem)
|
479
|
+
dropmenu2[dropmenu2.findIndex(function (elem)
|
480
|
+
{return elem.title.includes("关注")})].title="取消关注";
|
482
481
|
|
483
482
|
drowpdwonRender = function() {
|
484
483
|
dropdown.render({
|
@@ -695,10 +694,8 @@
|
|
695
694
|
url: '/missions/businesses/following',
|
696
695
|
data: {business_id:id},
|
697
696
|
success: function (da) {
|
698
|
-
|
699
697
|
layer.msg(da.msg,{icon: da.code==200? 1:2})
|
700
698
|
table.reload("businesses_table")
|
701
|
-
|
702
699
|
},
|
703
700
|
error:function (da){
|
704
701
|
alert('请求错误')
|
@@ -840,7 +837,6 @@
|
|
840
837
|
form.val('search_follows', {
|
841
838
|
name: data.field.name, department: data.field.department, staff_id: data.field.staff_id, area: data.field.area
|
842
839
|
})
|
843
|
-
|
844
840
|
return false;
|
845
841
|
});
|
846
842
|
|
@@ -848,6 +844,7 @@
|
|
848
844
|
$(".show_item").toggle()
|
849
845
|
return false;
|
850
846
|
});
|
847
|
+
|
851
848
|
form.on('submit(reset_business_search)', function (data) {
|
852
849
|
var field = data.field;
|
853
850
|
form.val('search_form', {
|
@@ -860,7 +857,7 @@
|
|
860
857
|
|
861
858
|
return false;
|
862
859
|
});
|
863
|
-
table.on('toolbar(businesses_table)', function (obj) {
|
860
|
+
table.on('toolbar(businesses_table)', function ( obj) {
|
864
861
|
switch (obj.event) {
|
865
862
|
case 'LAYTABLE_COLS':
|
866
863
|
layui.form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(objs) {
|
@@ -25,8 +25,8 @@ json.data do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
json.year d.last_follow_up&.year.to_s
|
28
|
-
json.total_amount d.last_follow_up&.total_amount
|
29
|
-
json.actual_amount d.last_follow_up&.actual_amount
|
28
|
+
json.total_amount d.last_follow_up&.total_amount.to_f.round(2)
|
29
|
+
json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
|
30
30
|
json.return_money d.return_money
|
31
31
|
json.wait_return_money d.wait_return_money.to_f.round(2)
|
32
32
|
json.return_money_days d.last_follow_up&.reception_at.present? && d.last_follow_up.money_plans.where(clazz: '实际回款').present? ? (d.last_follow_up.money_plans.where(clazz: '实际回款').order(created_at: :asc).first.date_at.to_s(:date).to_date - d.last_follow_up&.reception_at).to_i : ''
|
@@ -30,7 +30,7 @@
|
|
30
30
|
</div>
|
31
31
|
<script>
|
32
32
|
document.getElementById("inputFocus").focus();
|
33
|
-
|
33
|
+
layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'selectInput'], function () {
|
34
34
|
var form = layui.form,
|
35
35
|
layer = layui.layer,
|
36
36
|
table = layui.table,
|
@@ -85,10 +85,7 @@
|
|
85
85
|
parent.table.reload('businesses_table')
|
86
86
|
}
|
87
87
|
})
|
88
|
-
|
89
|
-
|
90
88
|
return false;
|
91
89
|
});
|
92
|
-
|
93
90
|
});
|
94
91
|
</script>
|
@@ -74,18 +74,20 @@
|
|
74
74
|
<input type="text" class="layui-input required" id="service_time" name="service_time" placeholder=" - " autocomplete="off" value="<%= (@last_follow_up&.service_start_time.present? && @last_follow_up&.service_end_time.present?) ? (@last_follow_up.service_start_time.to_s + " - " + @last_follow_up.service_end_time.to_s) : '' %>">
|
75
75
|
</div>
|
76
76
|
</div>
|
77
|
+
|
77
78
|
<div class="layui-inline deployment_type layui-hide">
|
78
79
|
<label class="layui-form-label required">部署类型</label>
|
79
80
|
<div class="layui-input-inline">
|
80
|
-
<%= select_tag "o_business_deployment", options_for_select(@deployment_type,
|
81
|
+
<%= select_tag "o_business_deployment", options_for_select(@deployment_type, @last_follow_up&.o_business_deployment), class: 'required' %>
|
81
82
|
</div>
|
82
83
|
</div>
|
84
|
+
|
83
85
|
<br class="service_show layui-hide">
|
84
86
|
<div class="layui-inline">
|
85
87
|
<label class="layui-form-label">总额(万)</label>
|
86
88
|
<div class="layui-input-inline">
|
87
89
|
<input name="total_amount" type="number" class="layui-input" autocomplete="off"
|
88
|
-
value="<%= @last_follow_up&.total_amount %>">
|
90
|
+
value="<%= @last_follow_up&.total_amount.to_f.round(2) %>">
|
89
91
|
</div>
|
90
92
|
客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
|
91
93
|
</div>
|
@@ -94,7 +96,7 @@
|
|
94
96
|
<label class="layui-form-label">合同额(万)</label>
|
95
97
|
<div class="layui-input-inline">
|
96
98
|
<input name="actual_amount" type="number" class="layui-input" autocomplete="off" placeholder="本单位的签单金额"
|
97
|
-
value="<%= @last_follow_up&.actual_amount %>">
|
99
|
+
value="<%= @last_follow_up&.actual_amount.to_f.round(2) %>">
|
98
100
|
</div>
|
99
101
|
客户签给头歌的费用。合同额的生命历程:1.在中标之前,合同额都是0;2.在中标之后,实际与头歌签合同的金额。
|
100
102
|
</div>
|
@@ -109,7 +111,7 @@
|
|
109
111
|
<div class="layui-inline">
|
110
112
|
<label class="layui-form-label">渠道分成(万)</label>
|
111
113
|
<div class="layui-input-inline">
|
112
|
-
<input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount%>">
|
114
|
+
<input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount.to_f.round(2) %>">
|
113
115
|
</div>
|
114
116
|
总额里,渠道拿到的部分。
|
115
117
|
</div>
|
@@ -317,8 +319,6 @@
|
|
317
319
|
parent.table.reload('teachers_table')
|
318
320
|
}
|
319
321
|
})
|
320
|
-
|
321
|
-
|
322
322
|
return false;
|
323
323
|
});
|
324
324
|
|
@@ -17,9 +17,9 @@ json.data do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
20
|
-
json.total_amount d.total_amount
|
21
|
-
json.actual_amount d.actual_amount
|
22
|
-
json.divide_amount d.divide_amount ? d.divide_amount : ""
|
20
|
+
json.total_amount d.total_amount.to_f.round(2)
|
21
|
+
json.actual_amount d.actual_amount.to_f.round(2)
|
22
|
+
json.divide_amount (d.divide_amount ? d.divide_amount : "").to_f.round(2)
|
23
23
|
json.staff d.staff.user.real_name
|
24
24
|
json.place d.place&.name
|
25
25
|
json.money_plans_count d.money_plans_count
|
@@ -52,6 +52,7 @@
|
|
52
52
|
<%= @follow_up.reception_at.to_s %>
|
53
53
|
</div>
|
54
54
|
</div>
|
55
|
+
|
55
56
|
<br>
|
56
57
|
<%if @follow_up.clazz_id == EducodeSales::Common.find_by(extras: EducodeSales::Common::OTYPE)&.id %>
|
57
58
|
<div class="layui-inline">
|
@@ -70,16 +71,17 @@
|
|
70
71
|
</div>
|
71
72
|
<% end %>
|
72
73
|
<br>
|
74
|
+
|
73
75
|
<div class="layui-inline">
|
74
76
|
<label class="layui-form-label">总额:</label>
|
75
77
|
<div class="layui-input-inline">
|
76
|
-
<%= @follow_up.total_amount %>万
|
78
|
+
<%= @follow_up.total_amount.to_f.round(2) %>万
|
77
79
|
</div>
|
78
80
|
</div>
|
79
81
|
<div class="layui-inline">
|
80
82
|
<label class="layui-form-label">合同额:</label>
|
81
83
|
<div class="layui-input-inline">
|
82
|
-
<%= @follow_up.actual_amount %>万
|
84
|
+
<%= @follow_up.actual_amount.to_f.round(2) %>万
|
83
85
|
</div>
|
84
86
|
</div>
|
85
87
|
<br>
|
@@ -92,7 +94,7 @@
|
|
92
94
|
<div class="layui-inline">
|
93
95
|
<label class="layui-form-label">渠道分成:</label>
|
94
96
|
<div class="layui-input-inline">
|
95
|
-
<%= @follow_up.divide_amount %>万
|
97
|
+
<%= @follow_up.divide_amount.to_f.round(2) %>万
|
96
98
|
</div>
|
97
99
|
</div>
|
98
100
|
<div class="layui-form-item">
|
@@ -137,7 +139,6 @@
|
|
137
139
|
</form>
|
138
140
|
<div style=" text-align:center;">
|
139
141
|
<div class="layui-btn-group">
|
140
|
-
|
141
142
|
<%if @pre_id != 0 %>
|
142
143
|
<button type="button" class="layui-btn" onclick="pre_follow()">上一条</button>
|
143
144
|
<%else %>
|
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.8.
|
4
|
+
version: 0.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|