educode_sales 1.10.49 → 1.10.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/educode_sales/modules/easyeditor/easyeditor.css +1 -1
- data/app/controllers/educode_sales/application_controller.rb +10 -0
- data/app/controllers/educode_sales/business_courses_controller.rb +58 -33
- data/app/controllers/educode_sales/businesses_controller.rb +43 -7
- data/app/controllers/educode_sales/contracts_controller.rb +6 -0
- data/app/controllers/educode_sales/money_plan_records_controller.rb +6 -2
- data/app/controllers/educode_sales/money_plans_controller.rb +3 -0
- data/app/controllers/educode_sales/plans_controller.rb +392 -9
- data/app/controllers/educode_sales/sale_trends_controller.rb +1 -1
- data/app/controllers/educode_sales/shixun_dectects_controller.rb +77 -16
- data/app/controllers/educode_sales/shixuns_controller.rb +65 -4
- data/app/controllers/educode_sales/subject_trends_controller.rb +99 -892
- data/app/controllers/educode_sales/subjects_controller.rb +29 -18
- data/app/helpers/educode_sales/application_helper.rb +3 -1
- data/app/helpers/educode_sales/business_courses_helper.rb +29 -6
- data/app/helpers/educode_sales/sale_trends_helper.rb +52 -52
- data/app/helpers/educode_sales/subject_helper.rb +5 -1
- data/app/models/educode_sales/business.rb +5 -5
- data/app/models/educode_sales/business_deliver_subject.rb +3 -2
- data/app/models/educode_sales/business_subject.rb +9 -3
- data/app/models/educode_sales/business_subject_shixun.rb +37 -8
- data/app/models/educode_sales/business_subject_staff.rb +1 -0
- data/app/models/educode_sales/permission.rb +7 -0
- data/app/models/educode_sales/sales_target_history.rb +11 -0
- data/app/views/educode_sales/business_courses/edit.html.erb +30 -4
- data/app/views/educode_sales/business_courses/index.html.erb +34 -12
- data/app/views/educode_sales/business_courses/index.json.jbuilder +2 -2
- data/app/views/educode_sales/business_courses/list_shixuns.html.erb +132 -64
- data/app/views/educode_sales/business_courses/list_shixuns.json.jbuilder +12 -6
- data/app/views/educode_sales/business_courses/list_subjects.html.erb +29 -34
- data/app/views/educode_sales/business_courses/list_subjects.json.jbuilder +7 -2
- data/app/views/educode_sales/business_courses/new.html.erb +45 -20
- data/app/views/educode_sales/businesses/index.html.erb +11 -9
- data/app/views/educode_sales/contracts/_list.html.erb +16 -1
- data/app/views/educode_sales/contracts/index.html.erb +5 -2
- data/app/views/educode_sales/contracts/list.js.erb +4 -1
- data/app/views/educode_sales/money_plan_records/_index.html.erb +21 -5
- data/app/views/educode_sales/money_plan_records/index.js.erb +4 -1
- data/app/views/educode_sales/money_plans/list.html.erb +6 -2
- data/app/views/educode_sales/plans/_year_execute.html.erb +293 -0
- data/app/views/educode_sales/plans/_year_target.html.erb +677 -0
- data/app/views/educode_sales/plans/index.html.erb +104 -81
- data/app/views/educode_sales/plans/year_execute.js.erb +1 -0
- data/app/views/educode_sales/plans/year_target.js.erb +1 -0
- data/app/views/educode_sales/plans/year_target.json.jbuilder +48 -0
- data/app/views/educode_sales/plans/years_all_target.json.jbuilder +53 -0
- data/app/views/educode_sales/sale_trends/_return_money_forecast.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/_user_stat.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/_visit_analysis.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/return_money_forecast.js.erb +1 -1
- data/app/views/educode_sales/sale_trends/trends.html.erb +6 -6
- data/app/views/educode_sales/sale_trends/user_stat.js.erb +1 -1
- data/app/views/educode_sales/sale_trends/visit_analysis.js.erb +1 -1
- data/app/views/educode_sales/shixun_dectects/index.html.erb +97 -47
- data/app/views/educode_sales/shixun_dectects/index.json.jbuilder +4 -3
- data/app/views/educode_sales/shixun_dectects/markdown.html.erb +1 -1
- data/app/views/educode_sales/shixuns/edit.html.erb +35 -13
- data/app/views/educode_sales/shixuns/index.html.erb +348 -138
- data/app/views/educode_sales/shixuns/index.json.jbuilder +9 -5
- data/app/views/educode_sales/shixuns/new.html.erb +22 -12
- data/app/views/educode_sales/subject_trends/trends.html.erb +177 -575
- data/app/views/educode_sales/subjects/edit.html.erb +4 -4
- data/app/views/educode_sales/subjects/index.html.erb +50 -12
- data/app/views/educode_sales/subjects/index.json.jbuilder +3 -3
- data/app/views/educode_sales/subjects/list_shixuns.html.erb +143 -17
- data/app/views/educode_sales/subjects/list_shixuns.json.jbuilder +9 -4
- data/app/views/educode_sales/subjects/new.html.erb +4 -4
- data/app/views/layouts/educode_sales/application.html.erb +2 -2
- data/config/routes.rb +7 -2
- data/db/migrate/20230729085359_create_educode_sales_sales_target_histories.rb +45 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +10 -4
- data/app/views/educode_sales/plans/_target_track.html.erb +0 -178
- data/app/views/educode_sales/plans/target_track.js.erb +0 -1
@@ -1,99 +1,122 @@
|
|
1
1
|
<div class="layui-tab" lay-filter="sale_tab">
|
2
2
|
<ul class="layui-tab-title">
|
3
|
-
<li
|
4
|
-
<li data="weekly">周报</li
|
5
|
-
<li data="month">月计划</li
|
6
|
-
<li data="monthly">月报</li
|
7
|
-
<li data="year">年计划</li
|
8
|
-
|
3
|
+
<!-- <li data="week">周计划</li>-->
|
4
|
+
<!-- <li data="weekly">周报</li>-->
|
5
|
+
<!-- <li data="month">月计划</li>-->
|
6
|
+
<!-- <li data="monthly">月报</li>-->
|
7
|
+
<!-- <li data="year">年计划</li>-->
|
8
|
+
<li class="layui-this" data="year_execute">年度执行</li>
|
9
|
+
<li data="year_plan">年度目标</li>
|
9
10
|
</ul>
|
10
11
|
<div class="layui-tab-content">
|
11
|
-
<div class="layui-tab-item layui-show"
|
12
|
-
|
12
|
+
<!-- <div class="layui-tab-item layui-show">-->
|
13
|
+
<%#= render 'weekPlan' %>
|
14
|
+
<!-- </div>-->
|
15
|
+
<!-- <div class="layui-tab-item">-->
|
16
|
+
<!-- <div id="weekly_tab_wraper"></div>-->
|
17
|
+
<!-- </div>-->
|
18
|
+
<!-- <div class="layui-tab-item ">-->
|
19
|
+
<!-- <div id="month_plan_tab_wraper"></div>-->
|
20
|
+
<!-- </div>-->
|
21
|
+
<!-- <div class="layui-tab-item">-->
|
22
|
+
<!-- <div id="monthly_tab_wraper"></div>-->
|
23
|
+
<!-- </div>-->
|
24
|
+
<!-- <div class="layui-tab-item">-->
|
25
|
+
<!-- <div id="year_plan_tab_wraper"></div>-->
|
26
|
+
<!-- </div>-->
|
27
|
+
<div class="layui-tab-item layui-show" id="year_execute_tab">
|
13
28
|
</div>
|
14
|
-
<div class="layui-tab-item">
|
15
|
-
<div id="weekly_tab_wraper"></div>
|
16
|
-
</div>
|
17
|
-
<div class="layui-tab-item ">
|
18
|
-
<div id="month_plan_tab_wraper"></div>
|
19
|
-
</div>
|
20
|
-
<div class="layui-tab-item">
|
21
|
-
<div id="monthly_tab_wraper"></div>
|
22
|
-
</div>
|
23
|
-
<div class="layui-tab-item">
|
24
|
-
<div id="year_plan_tab_wraper"></div>
|
25
|
-
</div>
|
26
|
-
<div class="layui-tab-item" id="target_track_tab">
|
29
|
+
<div class="layui-tab-item " id="year_target_tab">
|
27
30
|
</div>
|
28
31
|
</div>
|
29
32
|
</div>
|
30
33
|
|
31
34
|
<script>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
// })
|
35
|
+
layui.use(['element', 'table', 'jquery'], function () {
|
36
|
+
var $ = layui.jquery,
|
37
|
+
table = layui.table,
|
38
|
+
element = layui.element;
|
39
|
+
// element.on('tab(sale_tab)', function (data) {
|
40
|
+
// var status = $(this).attr('data')
|
41
|
+
// switch (status) {
|
42
|
+
// case 'week':
|
43
|
+
// $("#week_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
|
44
|
+
// $("#week_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height="auto";
|
45
|
+
// break;
|
46
|
+
// case 'weekly':
|
47
|
+
// $("#sales_weelky_table .layui-table-fixed-r")[0].classList.remove('layui-hide');
|
48
|
+
// $("#sales_weelky_table .layui-table-fixed-r .layui-table-body")[0].style.height="auto";
|
49
|
+
// break;
|
50
|
+
// ;
|
51
|
+
// case 'monthly':
|
52
|
+
// $("#monthly_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
|
53
|
+
// $("#monthly_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height="auto";
|
54
|
+
// break;
|
55
|
+
// case 'month':
|
56
|
+
// $("#month_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
|
57
|
+
// $("#month_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height="auto";
|
58
|
+
// break;
|
59
|
+
// case 'year':
|
60
|
+
// $("#year_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
|
61
|
+
// $("#year_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height="auto";
|
62
|
+
// break;
|
63
|
+
// }
|
64
64
|
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
66
|
+
// })
|
67
|
+
loadPage('/missions/plans/year_execute')
|
68
|
+
element.render();
|
69
|
+
element.on('tab(sale_tab)', function (data) {
|
70
|
+
if (data.index === 0 && $("#year_execute_wraper").length == 0) {
|
71
|
+
loadPage('/missions/plans/year_execute')
|
72
|
+
} else if (data.index === 1 && $("#year_target_wraper").length == 0) {
|
73
|
+
loadPage('/missions/plans/year_target')
|
74
|
+
}
|
75
|
+
});
|
76
|
+
/*
|
77
|
+
element.on('tab(sale_tab)', function (data) {
|
78
|
+
if (data.index == 1 && $("#sales_weelky_table").length == 0) {
|
79
|
+
loadPage('/missions/plans/weekly')
|
80
|
+
} else if (data.index == 2 && $("#month_table_wraper").length == 0) {
|
81
|
+
loadPage('/missions/plans/month_plan')
|
82
|
+
} else if (data.index == 3 && $("#monthly_table_wraper").length == 0) {
|
83
|
+
loadPage('/missions/plans/monthly')
|
84
|
+
} else if (data.index == 4 && $("#year_table_wraper").length == 0) {
|
85
|
+
loadPage('/missions/plans/year_plan')
|
86
|
+
} else if (data.index == 5 && $("#year_execute_wraper").length == 0) {
|
87
|
+
loadPage('/missions/plans/year_execute')
|
88
|
+
} else if (data.index == 6 && $("#year_target_wraper").length == 0) {
|
89
|
+
loadPage('/missions/plans/year_target')
|
90
|
+
}
|
91
|
+
});
|
92
|
+
*/
|
80
93
|
|
81
94
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
95
|
+
function loadPage(url) {
|
96
|
+
var layer_index = layer.load(0, {shade: [0.1, '#fff']});
|
97
|
+
Rails.ajax({
|
98
|
+
url: url,
|
99
|
+
type: 'GET',
|
100
|
+
dataType: "script",
|
101
|
+
success: function (res) {
|
102
|
+
layer.close(layer_index);
|
103
|
+
}
|
104
|
+
});
|
90
105
|
}
|
91
|
-
|
92
|
-
|
93
|
-
})
|
94
|
-
</script>
|
106
|
+
})
|
107
|
+
</script>
|
95
108
|
<style>
|
96
|
-
.layui-table-tool-temp{
|
97
|
-
padding-right: 30px;
|
109
|
+
.layui-table-tool-temp {
|
110
|
+
padding-right: 30px;
|
111
|
+
!important;
|
112
|
+
}
|
113
|
+
|
114
|
+
.layui-table-view .layui-table td[data-edit] .layui-table-cell {
|
115
|
+
background: #e4fad2;
|
116
|
+
}
|
117
|
+
|
118
|
+
.mtarget {
|
119
|
+
color: #46d1db;
|
120
|
+
font-weight: bold;
|
98
121
|
}
|
99
122
|
</style>
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#year_execute_tab").html("<%= j render 'year_execute' %>");
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#year_target_tab").html("<%= j render 'year_target' %>");
|
@@ -0,0 +1,48 @@
|
|
1
|
+
json.data do
|
2
|
+
json.array! @data do |d|
|
3
|
+
json.id d.id
|
4
|
+
json.num d.num
|
5
|
+
json.is_use d.is_use
|
6
|
+
json.staff d.staff.user.real_name
|
7
|
+
json.staff_id d.staff_id
|
8
|
+
json.school_tag d.school_tag.name
|
9
|
+
json.school_tag_id d.school_tag_id
|
10
|
+
json.year d.year
|
11
|
+
json.target_clazz d.target_clazz
|
12
|
+
json.year_target d.year_target
|
13
|
+
json.year_finish d.year_finish
|
14
|
+
json.year_diff d.year_diff
|
15
|
+
json.reviewer d.reviewer&.user&.real_name
|
16
|
+
json.comment d.comment
|
17
|
+
json.state d.state
|
18
|
+
json.target_1 d.target_1
|
19
|
+
json.m_target_1 d.m_target_1
|
20
|
+
json.target_2 d.target_2
|
21
|
+
json.m_target_2 d.m_target_2
|
22
|
+
json.target_3 d.target_3
|
23
|
+
json.m_target_3 d.m_target_3
|
24
|
+
json.target_4 d.target_4
|
25
|
+
json.m_target_4 d.m_target_4
|
26
|
+
json.target_5 d.target_5
|
27
|
+
json.m_target_5 d.m_target_5
|
28
|
+
json.target_6 d.target_6
|
29
|
+
json.m_target_6 d.m_target_6
|
30
|
+
json.target_7 d.target_7
|
31
|
+
json.m_target_7 d.m_target_7
|
32
|
+
json.target_8 d.target_8
|
33
|
+
json.m_target_8 d.m_target_8
|
34
|
+
json.target_9 d.target_9
|
35
|
+
json.m_target_9 d.m_target_9
|
36
|
+
json.target_10 d.target_10
|
37
|
+
json.m_target_10 d.m_target_10
|
38
|
+
json.target_11 d.target_11
|
39
|
+
json.m_target_11 d.m_target_11
|
40
|
+
json.target_12 d.target_12
|
41
|
+
json.m_target_12 d.m_target_12
|
42
|
+
json.updated_at d.updated_at.to_s(:date)
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
json.code 0
|
48
|
+
json.count @data.total_count
|
@@ -0,0 +1,53 @@
|
|
1
|
+
json.data do
|
2
|
+
json.array! @data do |item|
|
3
|
+
json.id item['id']
|
4
|
+
json.name item['name']
|
5
|
+
json.school_tag_id item['school_tag_id']
|
6
|
+
json.school_tag_name item['school_tag_name']
|
7
|
+
json.target_clazz item['target_clazz']
|
8
|
+
json.target_1 item['target_1'].present? ? item['target_1'].round(2) : 0
|
9
|
+
json.target_2 item['target_2'].present? ? item['target_2'].round(2) : 0
|
10
|
+
json.target_3 item['target_3'].present? ? item['target_3'].round(2) : 0
|
11
|
+
json.target_4 item['target_4'].present? ? item['target_4'].round(2) : 0
|
12
|
+
json.target_5 item['target_5'].present? ? item['target_5'].round(2) : 0
|
13
|
+
json.target_6 item['target_6'].present? ? item['target_6'].round(2) : 0
|
14
|
+
json.target_7 item['target_7'].present? ? item['target_7'].round(2) : 0
|
15
|
+
json.target_8 item['target_8'].present? ? item['target_8'].round(2) : 0
|
16
|
+
json.target_9 item['target_9'].present? ? item['target_9'].round(2) : 0
|
17
|
+
json.target_10 item['target_10'].present? ? item['target_10'].round(2) : 0
|
18
|
+
json.target_11 item['target_11'].present? ? item['target_11'].round(2) : 0
|
19
|
+
json.target_12 item['target_12'].present? ? item['target_12'].round(2) : 0
|
20
|
+
json.finish_1 item['finish_1'].present? ? item['finish_1'].round(2) : 0
|
21
|
+
json.finish_2 item['finish_2'].present? ? item['finish_2'].round(2) : 0
|
22
|
+
json.finish_3 item['finish_3'].present? ? item['finish_3'].round(2) : 0
|
23
|
+
json.finish_4 item['finish_4'].present? ? item['finish_4'].round(2) : 0
|
24
|
+
json.finish_5 item['finish_5'].present? ? item['finish_5'].round(2) : 0
|
25
|
+
json.finish_6 item['finish_6'].present? ? item['finish_6'].round(2) : 0
|
26
|
+
json.finish_7 item['finish_7'].present? ? item['finish_7'].round(2) : 0
|
27
|
+
json.finish_8 item['finish_8'].present? ? item['finish_8'].round(2) : 0
|
28
|
+
json.finish_9 item['finish_9'].present? ? item['finish_9'].round(2) : 0
|
29
|
+
json.finish_10 item['finish_10'].present? ? item['finish_10'].round(2) : 0
|
30
|
+
json.finish_11 item['finish_11'].present? ? item['finish_11'].round(2) : 0
|
31
|
+
json.finish_12 item['finish_12'].present? ? item['finish_12'].round(2) : 0
|
32
|
+
json.plan_1 item['plan_1'].present? ? item['plan_1'].round(2) : 0
|
33
|
+
json.plan_2 item['plan_2'].present? ? item['plan_2'].round(2) : 0
|
34
|
+
json.plan_3 item['plan_3'].present? ? item['plan_3'].round(2) : 0
|
35
|
+
json.plan_4 item['plan_4'].present? ? item['plan_4'].round(2) : 0
|
36
|
+
json.plan_5 item['plan_5'].present? ? item['plan_5'].round(2) : 0
|
37
|
+
json.plan_6 item['plan_6'].present? ? item['plan_6'].round(2) : 0
|
38
|
+
json.plan_7 item['plan_7'].present? ? item['plan_7'].round(2) : 0
|
39
|
+
json.plan_8 item['plan_8'].present? ? item['plan_8'].round(2) : 0
|
40
|
+
json.plan_9 item['plan_9'].present? ? item['plan_9'].round(2) : 0
|
41
|
+
json.plan_10 item['plan_10'].present? ? item['plan_10'].round(2) : 0
|
42
|
+
json.plan_11 item['plan_11'].present? ? item['plan_11'].round(2) : 0
|
43
|
+
json.plan_12 item['plan_12'].present? ? item['plan_12'].round(2) : 0
|
44
|
+
json.year_target 0
|
45
|
+
json.year_clazz_target (item['target_1'].present? ? item['target_1'].round(2) : 0)+(item['target_2'].present? ? item['target_2'].round(2) : 0)+(item['target_3'].present? ? item['target_3'].round(2) : 0)+(item['target_4'].present? ? item['target_4'].round(2) : 0)+(item['target_5'].present? ? item['target_5'].round(2) : 0)+(item['target_6'].present? ? item['target_6'].round(2) : 0)+(item['target_7'].present? ? item['target_7'].round(2) : 0)+(item['target_8'].present? ? item['target_8'].round(2) : 0)+(item['target_9'].present? ? item['target_9'].round(2) : 0)+(item['target_10'].present? ? item['target_10'].round(2) : 0)+(item['target_11'].present? ? item['target_11'].round(2) : 0)+(item['target_12'].present? ? item['target_12'].round(2) : 0)
|
46
|
+
json.year_plan (item['plan_1'].present? ? item['plan_1'].round(2) : 0)+(item['plan_2'].present? ? item['plan_2'].round(2) : 0)+(item['plan_3'].present? ? item['plan_3'].round(2) : 0)+(item['plan_4'].present? ? item['plan_4'].round(2) : 0)+(item['plan_5'].present? ? item['plan_5'].round(2) : 0)+(item['plan_6'].present? ? item['plan_6'].round(2) : 0)+(item['plan_7'].present? ? item['plan_7'].round(2) : 0)+(item['plan_8'].present? ? item['plan_8'].round(2) : 0)+(item['plan_9'].present? ? item['plan_9'].round(2) : 0)+(item['plan_10'].present? ? item['plan_10'].round(2) : 0)+(item['plan_11'].present? ? item['plan_11'].round(2) : 0)+(item['plan_12'].present? ? item['plan_12'].round(2) : 0)
|
47
|
+
json.year_finish (item['finish_1'].present? ? item['finish_1'].round(2) : 0)+(item['finish_2'].present? ? item['finish_2'].round(2) : 0)+(item['finish_3'].present? ? item['finish_3'].round(2) : 0)+(item['finish_4'].present? ? item['finish_4'].round(2) : 0)+(item['finish_5'].present? ? item['finish_5'].round(2) : 0)+(item['finish_6'].present? ? item['finish_6'].round(2) : 0)+(item['finish_7'].present? ? item['finish_7'].round(2) : 0)+(item['finish_8'].present? ? item['finish_8'].round(2) : 0)+(item['finish_9'].present? ? item['finish_9'].round(2) : 0)+(item['finish_10'].present? ? item['finish_10'].round(2) : 0)+(item['finish_11'].present? ? item['finish_11'].round(2) : 0)+(item['finish_12'].present? ? item['finish_12'].round(2) : 0)
|
48
|
+
json.year_diff ((item['plan_1'].present? ? item['plan_1'].round(2) : 0)+(item['plan_2'].present? ? item['plan_2'].round(2) : 0)+(item['plan_3'].present? ? item['plan_3'].round(2) : 0)+(item['plan_4'].present? ? item['plan_4'].round(2) : 0)+(item['plan_5'].present? ? item['plan_5'].round(2) : 0)+(item['plan_6'].present? ? item['plan_6'].round(2) : 0)+(item['plan_7'].present? ? item['plan_7'].round(2) : 0)+(item['plan_8'].present? ? item['plan_8'].round(2) : 0)+(item['plan_9'].present? ? item['plan_9'].round(2) : 0)+(item['plan_10'].present? ? item['plan_10'].round(2) : 0)+(item['plan_11'].present? ? item['plan_11'].round(2) : 0)+(item['plan_12'].present? ? item['plan_12'].round(2) : 0)) - ((item['finish_1'].present? ? item['finish_1'].round(2) : 0)+(item['finish_2'].present? ? item['finish_2'].round(2) : 0)+(item['finish_3'].present? ? item['finish_3'].round(2) : 0)+(item['finish_4'].present? ? item['finish_4'].round(2) : 0)+(item['finish_5'].present? ? item['finish_5'].round(2) : 0)+(item['finish_6'].present? ? item['finish_6'].round(2) : 0)+(item['finish_7'].present? ? item['finish_7'].round(2) : 0)+(item['finish_8'].present? ? item['finish_8'].round(2) : 0)+(item['finish_9'].present? ? item['finish_9'].round(2) : 0)+(item['finish_10'].present? ? item['finish_10'].round(2) : 0)+(item['finish_11'].present? ? item['finish_11'].round(2) : 0)+(item['finish_12'].present? ? item['finish_12'].round(2) : 0))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
json.code 0
|
53
|
+
json.count @total_count
|
@@ -1 +1 @@
|
|
1
|
-
$("#
|
1
|
+
$("#page_7").html("<%= j render 'return_money_forecast' %>");
|
@@ -6,9 +6,9 @@
|
|
6
6
|
<li class="">商机区域分布</li>
|
7
7
|
<li class="">销售人员跟进分析</li>
|
8
8
|
<li class="">中标预测图</li>
|
9
|
+
<li class="">回款预测图</li>
|
9
10
|
<li class="">用户分析</li>
|
10
11
|
<li class="">拜访分析</li>
|
11
|
-
<li class="">回款预测图</li>
|
12
12
|
</ul>
|
13
13
|
<div class="layui-tab-content">
|
14
14
|
<div class="layui-tab-item layui-show">
|
@@ -141,7 +141,7 @@
|
|
141
141
|
<div class="panel layui-bg-number">
|
142
142
|
<div class="panel-body">
|
143
143
|
<div class="panel-title">
|
144
|
-
<h5>已回款<a href="/missions/
|
144
|
+
<h5>已回款<a href="/missions/money_plans/list?date_at=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
|
145
145
|
</div>
|
146
146
|
<div class="panel-content y-t-10">
|
147
147
|
<h1 class="no-margins"><%= @return_amount %>万</h1>
|
@@ -192,7 +192,7 @@
|
|
192
192
|
<div class="panel layui-bg-number">
|
193
193
|
<div class="panel-body">
|
194
194
|
<div class="panel-title">
|
195
|
-
<h5>应收款<a href="/missions/
|
195
|
+
<h5>应收款<a href="/missions/contracts?date_at=<%= @year %>" style="color: #0000FF;float: right">查看商机</a></h5>
|
196
196
|
</div>
|
197
197
|
<div class="panel-content y-t-10">
|
198
198
|
<h1 class="no-margins"><%= @receivable_amount.round(2) %>万</h1>
|
@@ -271,11 +271,11 @@
|
|
271
271
|
} else if (data.index == 5 && $("#tab_6").length == 0) {
|
272
272
|
loadPage('/missions/sale_trends/goal_forecast')
|
273
273
|
} else if (data.index == 6 && $("#tab_7").length == 0) {
|
274
|
-
loadPage('/missions/sale_trends/
|
274
|
+
loadPage('/missions/sale_trends/return_money_forecast')
|
275
275
|
} else if (data.index == 7 && $("#tab_8").length == 0) {
|
276
|
-
loadPage('/missions/sale_trends/
|
276
|
+
loadPage('/missions/sale_trends/user_stat')
|
277
277
|
} else if (data.index == 8 && $("#tab_9").length == 0) {
|
278
|
-
loadPage('/missions/sale_trends/
|
278
|
+
loadPage('/missions/sale_trends/visit_analysis')
|
279
279
|
}
|
280
280
|
});
|
281
281
|
|
@@ -1 +1 @@
|
|
1
|
-
$("#
|
1
|
+
$("#page_8").html("<%= j render 'user_stat' %>");
|
@@ -1 +1 @@
|
|
1
|
-
$("#
|
1
|
+
$("#page_9").html("<%= j render 'visit_analysis' %>");
|