educode_sales 0.9.6 → 0.9.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/stylesheets/educode_sales/app.css +16 -0
- data/app/controllers/educode_sales/follow_ups_controller.rb +6 -3
- data/app/views/educode_sales/businesses/index.html.erb +1 -1
- data/app/views/educode_sales/businesses/index.json.jbuilder +1 -0
- data/app/views/educode_sales/sale_trends/_sales_analysis.html.erb +27 -4
- data/app/views/educode_sales/sale_trends/trends.html.erb +1 -1
- data/db/migrate/20220921131116_add_change_clazz_to_follow_up.rb +5 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa0d6ecd7b1640ebee8c24dfedb2fa8aea54ebae05121178a5d7276a5e89bdcc
|
4
|
+
data.tar.gz: e187d271d9f14998d6c7dbcdc82bf12f82e8f2b53b0f5fe98262f63fffa8c8c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dfd27a654570f6f321fc71cf68ed3993d3be0f24a075b3a038d4ba83473a7a5b6f957d06e6d9fc3ad6ed8bb2e06269886f98853e8421c99f1c167511cf6064c
|
7
|
+
data.tar.gz: 8c589a6c2c1dee705f74167849a1ea69a4fa784193ab2b7063481d74b3114d0bb13e6cfec9b9d43c180d4a9642c4f7d6a873ee97c98db8e0f3c8c4c60e8e544a
|
@@ -278,4 +278,20 @@ td .layui-table-cell .layui-form-select {
|
|
278
278
|
.layui-form textarea:-ms-input-placeholder {
|
279
279
|
/* Internet Explorer 10+ */
|
280
280
|
color: #ccc;
|
281
|
+
}
|
282
|
+
|
283
|
+
.changed-true {
|
284
|
+
position: relative;
|
285
|
+
display: inline-block;
|
286
|
+
padding-left: 7px;
|
287
|
+
}
|
288
|
+
.changed-true::before {
|
289
|
+
content: " ";
|
290
|
+
width: 6px;
|
291
|
+
left: 0px;
|
292
|
+
position: absolute;
|
293
|
+
top: 10px;
|
294
|
+
height: 6px;
|
295
|
+
border-radius: 6px;
|
296
|
+
background-color: red;
|
281
297
|
}
|
@@ -82,19 +82,22 @@ module EducodeSales
|
|
82
82
|
end
|
83
83
|
|
84
84
|
follow_up.profit_amount = follow_up.actual_amount - (follow_up.divide_amount.to_i) if follow_up.actual_amount
|
85
|
+
last_follow_up = @business.last_follow_up
|
86
|
+
follow_up.clazz_changed = last_follow_up.clazz_id != follow_up.clazz_id if last_follow_up.present?
|
85
87
|
if follow_up.save
|
86
|
-
if
|
87
|
-
|
88
|
+
if last_follow_up.present?
|
89
|
+
last_follow_up.key_person.each do |d|
|
88
90
|
key_person = d.dup
|
89
91
|
key_person.follow_up_id = follow_up.id
|
90
92
|
key_person.save
|
91
93
|
end
|
92
|
-
|
94
|
+
last_follow_up.money_plans.each do |d|
|
93
95
|
money = d.dup
|
94
96
|
money.staff = @current_admin
|
95
97
|
money.follow_up_id = follow_up.id
|
96
98
|
money.save
|
97
99
|
end
|
100
|
+
|
98
101
|
end
|
99
102
|
@business.update(last_follow_up_id: follow_up.id)
|
100
103
|
render_success
|
@@ -306,7 +306,7 @@
|
|
306
306
|
field: 'clazz',
|
307
307
|
width: 80,
|
308
308
|
title: '类型',
|
309
|
-
templet:
|
309
|
+
templet: "<div><span title='{{d.clazz}}' class='changed-{{d.clazz_changed}}'>{{d.clazz}}</span></div>",
|
310
310
|
hide: gon.filter.clazz
|
311
311
|
},
|
312
312
|
{
|
@@ -12,6 +12,7 @@ json.data do
|
|
12
12
|
follow_count += follow_ups_count
|
13
13
|
json.follow_up_id d.last_follow_up_id
|
14
14
|
json.clazz d.last_follow_up&.clazz&.name || ""
|
15
|
+
json.clazz_changed d.last_follow_up&.clazz_changed || false
|
15
16
|
json.stage d.last_follow_up&.stage&.name
|
16
17
|
json.invitation_at d.last_follow_up&.invitation_at.to_s
|
17
18
|
json.reception_at d.last_follow_up&.reception_at.to_s
|
@@ -29,8 +29,8 @@
|
|
29
29
|
</div>
|
30
30
|
</form>
|
31
31
|
</div>
|
32
|
-
<canvas id="myChart2" width="960" height="
|
33
|
-
|
32
|
+
<canvas id="myChart2" width="960" height="250"></canvas>
|
33
|
+
<canvas id="myChart2_1" width="960" height="250" style="margin-top: 30px;"></canvas>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
<script>
|
@@ -49,13 +49,13 @@
|
|
49
49
|
animation: {
|
50
50
|
duration: 1,
|
51
51
|
onComplete: function () {
|
52
|
-
var chartInstance = this.chart,
|
53
|
-
ctx = chartInstance.ctx;
|
52
|
+
var chartInstance = this.chart, ctx = chartInstance.ctx;
|
54
53
|
ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, Chart.defaults.global.defaultFontStyle, Chart.defaults.global.defaultFontFamily);
|
55
54
|
ctx.textAlign = 'center';
|
56
55
|
ctx.textBaseline = 'bottom';
|
57
56
|
|
58
57
|
this.data.datasets.forEach(function (dataset, i) {
|
58
|
+
ctx.fillStyle = "#444";
|
59
59
|
var meta = chartInstance.controller.getDatasetMeta(i);
|
60
60
|
meta.data.forEach(function (bar, index) {
|
61
61
|
var data = dataset.data[index];
|
@@ -66,6 +66,20 @@
|
|
66
66
|
}
|
67
67
|
};
|
68
68
|
|
69
|
+
var res_data = <%=raw @goal_count_data.to_json %>;
|
70
|
+
var datasets = [];
|
71
|
+
var color = ['#44D7B6', '#4CACFF', '#F7B500', '#FF0000', '#FF7F00' ];
|
72
|
+
res_data.datasets.forEach(function(d, i) {
|
73
|
+
datasets.push({
|
74
|
+
label: d.label,
|
75
|
+
type: 'line',
|
76
|
+
data: d.data,borderColor: color[i],
|
77
|
+
pointRadius: 1,
|
78
|
+
fill: false,
|
79
|
+
lineTension: 0
|
80
|
+
})
|
81
|
+
})
|
82
|
+
|
69
83
|
laydate.render({
|
70
84
|
type: 'year',
|
71
85
|
elem: '#goal_date_year',
|
@@ -104,6 +118,15 @@
|
|
104
118
|
data: <%=raw @goal_count_data.to_json %>,
|
105
119
|
options: opt
|
106
120
|
});
|
121
|
+
var ctx3 = document.getElementById('myChart2_1');
|
122
|
+
var myChart3 = new Chart(ctx3, {
|
123
|
+
type: 'line',
|
124
|
+
data: {
|
125
|
+
labels: res_data.labels,
|
126
|
+
datasets: datasets
|
127
|
+
},
|
128
|
+
options: opt
|
129
|
+
});
|
107
130
|
form.render();
|
108
131
|
form.on("submit(search_sales)", function(data) {
|
109
132
|
var layer_index = layer.load(0, {shade: [0.1, '#fff']});
|
@@ -191,7 +191,7 @@
|
|
191
191
|
<h5>应收款<a href="/missions/businesses?name=(销售态势-<%=@year %>-应收款商机)" style="color: #0000FF;float: right">查看商机</a></h5>
|
192
192
|
</div>
|
193
193
|
<div class="panel-content y-t-10">
|
194
|
-
<h1 class="no-margins"><%= @receivable_amount %>万</h1>
|
194
|
+
<h1 class="no-margins"><%= @receivable_amount.round(2) %>万</h1>
|
195
195
|
</div>
|
196
196
|
</div>
|
197
197
|
</div>
|
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.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -473,6 +473,7 @@ files:
|
|
473
473
|
- db/migrate/20220523023609_update_assessment_month_column_to_assessment_settings.rb
|
474
474
|
- db/migrate/20220523101628_update_column_to_follow_ups.rb
|
475
475
|
- db/migrate/20220827130438_create_educode_sales_login_histories.rb
|
476
|
+
- db/migrate/20220921131116_add_change_clazz_to_follow_up.rb
|
476
477
|
- lib/educode_sales.rb
|
477
478
|
- lib/educode_sales/engine.rb
|
478
479
|
- lib/educode_sales/version.rb
|