educode_sales 0.9.38 → 0.9.40
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/javascripts/educode_sales/application.js +1 -1
- data/app/controllers/educode_sales/businesses_controller.rb +3 -2
- data/app/models/educode_sales/staff.rb +6 -2
- data/app/views/educode_sales/businesses/index.html.erb +25 -1
- data/app/views/educode_sales/businesses/index.json.jbuilder +3 -1
- data/lib/educode_sales/version.rb +1 -1
- metadata +2 -3
- data/app/assets/javascripts/educode_sales/jquery.js +0 -10881
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41be1a85301a5d440bb31501f01a0ff9db5158f0890c5096916ff238ffc34e38
|
4
|
+
data.tar.gz: 81a70162b88c7d09eaf90b4181177f757d993264761d65ec376e7719307da53e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f2999ebcb569c813f3251d060e0347a5a2e488ae1f778d4a51b594ff03416854f7ef9ae8cc0fe5a433f95417801a7549c16e56f1c8a96d0e031a6ec2b9539b
|
7
|
+
data.tar.gz: 62a7671b59dbb8ffb5ad827d310ead46aecf6c5de76b6151d4d6c0c56a81c6835a490c4171d4ee55e40317af0098e30ad87ebab6e9be0be112442a0c15747ddc
|
@@ -10,10 +10,10 @@
|
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
12
12
|
//
|
13
|
+
//= require jquery2
|
13
14
|
//= require rails-ujs
|
14
15
|
//= require activestorage
|
15
16
|
//= require ./layui
|
16
17
|
//= require_tree ./extent
|
17
18
|
//= require ./jquery.cxselect
|
18
19
|
//= require ./table2excel
|
19
|
-
//= require ./jquery
|
@@ -10,7 +10,8 @@ module EducodeSales
|
|
10
10
|
respond_to do |format|
|
11
11
|
format.html do
|
12
12
|
common = Common.find_by(clazz: 'staff_type', name: '销售')
|
13
|
-
@staffs = Staff.joins(:user).where(job_type: common.id).where.not(role_id: 11).map { |d| [d.user.real_name, d.id]}
|
13
|
+
@staffs = Staff.joins(:user).where(job_type: common.id).where.not(role_id: 11).map { |d| [d.user.real_name, d.id]}
|
14
|
+
gon.staffs = Staff.joins(:user).where(job_type: common.id).where.not(role_id: 11).map { |d| {name: d.user.real_name, value: d.id } }
|
14
15
|
# @more = can?(:create, EducodeSales::SalePlan) || can?(:update, EducodeSales::Business) || can?(:destroy, EducodeSales::Business) || can?(:show_file, EducodeSales::Business)
|
15
16
|
@more = true
|
16
17
|
gon.menus = []
|
@@ -40,7 +41,7 @@ module EducodeSales
|
|
40
41
|
gon.bidded_date = Time.new(params[:bidded_date_year]).strftime("%Y-%m-%d") + " - " + Time.new(params[:bidded_date_year]).end_of_year.strftime("%Y-%m-%d")
|
41
42
|
end
|
42
43
|
end
|
43
|
-
|
44
|
+
|
44
45
|
if params[:signed_date_year].present? && params[:signed_date_year] != '全部'
|
45
46
|
gon.signed_date = Time.new(params[:signed_date_year]).strftime("%Y-%m-%d") + " - " + Time.new(params[:signed_date_year]).end_of_year.strftime("%Y-%m-%d")
|
46
47
|
end
|
@@ -47,9 +47,13 @@ module EducodeSales
|
|
47
47
|
|
48
48
|
def self.month_list
|
49
49
|
list = []
|
50
|
-
24.times
|
51
|
-
["#{d + 1}个月", d + 1]
|
50
|
+
24.times do |d|
|
51
|
+
list << ["#{d + 1}个月", d + 1]
|
52
52
|
end
|
53
|
+
8.times do |d|
|
54
|
+
list << ["#{d + 3}年", (d + 3) * 12]
|
55
|
+
end
|
56
|
+
list
|
53
57
|
end
|
54
58
|
|
55
59
|
def area_ids
|
@@ -30,7 +30,7 @@
|
|
30
30
|
<div class="layui-inline">
|
31
31
|
<label class="layui-form-label">最新跟进人</label>
|
32
32
|
<div class="layui-input-inline">
|
33
|
-
|
33
|
+
<div id="staffs_id" style="width: 190px;"></div>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
<div class="layui-inline">
|
@@ -268,6 +268,13 @@
|
|
268
268
|
data: gon.business_type
|
269
269
|
})
|
270
270
|
|
271
|
+
var staff_list = xmSelect.render({
|
272
|
+
el: '#staffs_id',
|
273
|
+
data: gon.staffs,
|
274
|
+
filterable: true,
|
275
|
+
radio: true,
|
276
|
+
})
|
277
|
+
|
271
278
|
var business_step_list = xmSelect.render({
|
272
279
|
el: '#business_step',
|
273
280
|
data: gon.business_step
|
@@ -322,6 +329,7 @@
|
|
322
329
|
data.business_year = gon.business_year;
|
323
330
|
data.business_type = business_type_list.getValue('valueStr')
|
324
331
|
data.business_step = business_step_list.getValue('valueStr');
|
332
|
+
data.staff_id = staff_list.getValue('valueStr');
|
325
333
|
|
326
334
|
table = layui.table;
|
327
335
|
var cols_table = [
|
@@ -413,6 +421,19 @@
|
|
413
421
|
title: '最新跟进人',
|
414
422
|
hide: gon.filter.last_follow_person
|
415
423
|
},
|
424
|
+
{
|
425
|
+
field: 'no_followup_days',
|
426
|
+
width: 100,
|
427
|
+
title: '无跟进天数',
|
428
|
+
hide: gon.filter.no_followup_days
|
429
|
+
},
|
430
|
+
{
|
431
|
+
field: 'created_at',
|
432
|
+
width: 200,
|
433
|
+
title: '商机创建时间',
|
434
|
+
sort: true,
|
435
|
+
hide: gon.filter.created_at
|
436
|
+
},
|
416
437
|
{
|
417
438
|
field: 'latest_time',
|
418
439
|
width: 200,
|
@@ -701,6 +722,7 @@
|
|
701
722
|
data.place_id = index_place_list.getValue('valueStr');
|
702
723
|
data.business_type = business_type.toString();
|
703
724
|
data.business_step = business_step.toString();
|
725
|
+
data.staff_id = staff_list.getValue('valueStr');
|
704
726
|
layer.load(0, {});
|
705
727
|
request.authPost("/missions/businesses/get_export_data", {
|
706
728
|
name: data.name,
|
@@ -912,6 +934,7 @@
|
|
912
934
|
business_step.push(d.value);
|
913
935
|
})
|
914
936
|
data.field.place_id = index_place_list.getValue('valueStr');
|
937
|
+
data.field.staff_id = staff_list.getValue('valueStr');
|
915
938
|
data.field.business_type = business_type.toString();
|
916
939
|
data.field.business_step = business_step.toString();
|
917
940
|
if (search['clazz']) {
|
@@ -958,6 +981,7 @@
|
|
958
981
|
business_type_list.setValue([])
|
959
982
|
business_step_list.setValue([])
|
960
983
|
index_place_list.setValue([])
|
984
|
+
staff_list.setValue([])
|
961
985
|
|
962
986
|
return false;
|
963
987
|
});
|
@@ -21,7 +21,9 @@ json.data do
|
|
21
21
|
json.signed_date d.last_follow_up&.signed_date.to_s
|
22
22
|
json.o_business_deployment EducodeSales::FollowUp::BUSINESS_DEPLOYMENT[1..-1].to_h.invert[d.last_follow_up&.o_business_deployment]
|
23
23
|
json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
|
24
|
-
|
24
|
+
json.created_at d.created_at.to_s
|
25
|
+
json.no_followup_days (d['latest_time'] ? DateTime.parse(Time.now.strftime("%Y-%m-%d")) - DateTime.parse(d['latest_time'].strftime("%Y-%m-%d")) : DateTime.parse(Time.now.strftime("%Y-%m-%d")) - DateTime.parse(d.created_at.strftime("%Y-%m-%d"))).to_i
|
26
|
+
|
25
27
|
json.divide_rate d.divide_rate
|
26
28
|
json.divide_money d.divide_amount.to_f.round(2)
|
27
29
|
json.budget_amount d.budget_amount.to_f.round(2) #d.follow_ups.where(stage_id: @budget_stage_ids).order("created_at desc").first&.total_amount&.round(2) || 0
|
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.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- app/assets/javascripts/educode_sales/extent/select_input.js
|
122
122
|
- app/assets/javascripts/educode_sales/extent/xm-select.js
|
123
123
|
- app/assets/javascripts/educode_sales/jquery.cxselect.js
|
124
|
-
- app/assets/javascripts/educode_sales/jquery.js
|
125
124
|
- app/assets/javascripts/educode_sales/layui.js
|
126
125
|
- app/assets/javascripts/educode_sales/table2excel.js
|
127
126
|
- app/assets/stylesheets/educode_sales/Chart.min.css
|