educode_sales 0.8.7 → 0.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa6e3ad4c5385f2be6eaea6affcdcde6284c8bc04986877ca5880c2a26eff5c0
4
- data.tar.gz: 19ec51101d14bd95976a5c2211f66209fc6ef27f2894f84d9c21c5d1a4fbb5b2
3
+ metadata.gz: f53f1760e66e10622abeeb7b8487804a5905e70b6adaec22df103fccd5e91bde
4
+ data.tar.gz: 5ba593e92ec3ec068cf850fcb4f5ff2ab61c47a0b3c93104649b0e38f96cc9b5
5
5
  SHA512:
6
- metadata.gz: 4091a85e044edea498641d586ea567b878af526f524e1ac32c947d02274379ebb3301ea7b9cd4fd02950b39ca7897a5d392079098ec74e96e59553d37e61bddb
7
- data.tar.gz: 59d6fa56fafcab5ab09d228f65b443ec70658e72d9bfaba56b7df38492ac46e80404dc95198e874d4a89c3d65dbbb86d96e573abb7c91da450ee08843647d9cf
6
+ metadata.gz: 3ae71fcb67e0946049f0cbe4f3b99dc1cbc6109042726beebfa78d1b59e7b4b00d3f84d261d1f9c3d8dfcd29d4a7b9d489827225d6d45e4c1678a85d80f702cd
7
+ data.tar.gz: a43d02fa863b87ae1df795af04f71080dda11153cc54c8cfeedcc43e10c2d5ab7104f598de8bdb1eb5983646ee6a6176be872b95ecc6f87973c54b602c1b7c94
@@ -50,6 +50,13 @@ module EducodeSales
50
50
  JOIN schools ON departments.school_id = schools.id
51
51
  ").where("province = ?", p)
52
52
  end
53
+
54
+ if params[:q].present? && params[:q][:description].present?
55
+ @follow_ups = @follow_ups.joins(:business).joins("JOIN educode_sales_businesses ON educode_sales_businesses.id = educode_sales_follow_ups.business_id
56
+ ").where("educode_sales_follow_ups.description LIKE ?" ,"%#{params[:q][:description]}%")
57
+
58
+ end
59
+
53
60
  if params[:sort].present? && params[:sort][:field]
54
61
  @follow_ups = @follow_ups.order("#{params[:sort][:field]} #{params[:sort][:order]}")
55
62
  else
@@ -31,6 +31,12 @@
31
31
  <input type="text" class="layui-input" id="follows_date" name="follows_date" autocomplete="off" placeholder=" - ">
32
32
  </div>
33
33
  </div>
34
+ <div class="layui-inline">
35
+ <label class="layui-form-label">最新进展</label>
36
+ <div class="layui-input-inline">
37
+ <input type="text" name="description" autocomplete="off" class="layui-input">
38
+ </div>
39
+ </div>
34
40
 
35
41
  <div class="layui-inline">
36
42
  <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_follows_search">重置
@@ -195,7 +201,7 @@
195
201
  where: {q: search, sort: sort}
196
202
  }, 'data');
197
203
  form.val('search_form', {
198
- name: data.field.name, department: data.field.department, staff_id: data.field.staff_id, area: data.field.area
204
+ name: data.field.name, department: data.field.department, staff_id: data.field.staff_id, area: data.field.area , description: data.field.description
199
205
  })
200
206
  return false;
201
207
  });
@@ -207,6 +213,7 @@
207
213
  follows_date: "",
208
214
  name: "",
209
215
  department: "",
216
+ description: "",
210
217
  staff_id: ""
211
218
  })
212
219
  return false;
@@ -14,11 +14,17 @@ json.data do
14
14
  json.reception_at d.last_follow_up&.reception_at.to_s
15
15
  json.bidded_date d.last_follow_up&.bidded_date.to_s
16
16
  json.signed_date d.last_follow_up&.signed_date.to_s
17
- json.total_amount d.last_follow_up&.total_amount
17
+ json.total_amount d.last_follow_up&.total_amount.to_f.round(2)
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
- json.actual_amount d.last_follow_up&.actual_amount
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
25
+ json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
20
26
  json.return_money d.return_money
21
- json.wait_return_money d.wait_return_money.to_i.round(2)
27
+ json.wait_return_money d.wait_return_money.to_f.round(2)
22
28
  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 : ''
23
29
  json.place d.last_follow_up&.place&.name
24
30
  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
@@ -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
@@ -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 : ''
@@ -87,7 +87,7 @@
87
87
  <label class="layui-form-label">总额(万)</label>
88
88
  <div class="layui-input-inline">
89
89
  <input name="total_amount" type="number" class="layui-input" autocomplete="off"
90
- value="<%= @last_follow_up&.total_amount %>">
90
+ value="<%= @last_follow_up&.total_amount.to_f.round(2) %>">
91
91
  </div>
92
92
  客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
93
93
  </div>
@@ -96,7 +96,7 @@
96
96
  <label class="layui-form-label">合同额(万)</label>
97
97
  <div class="layui-input-inline">
98
98
  <input name="actual_amount" type="number" class="layui-input" autocomplete="off" placeholder="本单位的签单金额"
99
- value="<%= @last_follow_up&.actual_amount %>">
99
+ value="<%= @last_follow_up&.actual_amount.to_f.round(2) %>">
100
100
  </div>
101
101
  客户签给头歌的费用。合同额的生命历程:1.在中标之前,合同额都是0;2.在中标之后,实际与头歌签合同的金额。
102
102
  </div>
@@ -111,7 +111,7 @@
111
111
  <div class="layui-inline">
112
112
  <label class="layui-form-label">渠道分成(万)</label>
113
113
  <div class="layui-input-inline">
114
- <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) %>">
115
115
  </div>
116
116
  总额里,渠道拿到的部分。
117
117
  </div>
@@ -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
@@ -75,13 +75,13 @@
75
75
  <div class="layui-inline">
76
76
  <label class="layui-form-label">总额:</label>
77
77
  <div class="layui-input-inline">
78
- <%= @follow_up.total_amount %>万
78
+ <%= @follow_up.total_amount.to_f.round(2) %>万
79
79
  </div>
80
80
  </div>
81
81
  <div class="layui-inline">
82
82
  <label class="layui-form-label">合同额:</label>
83
83
  <div class="layui-input-inline">
84
- <%= @follow_up.actual_amount %>万
84
+ <%= @follow_up.actual_amount.to_f.round(2) %>万
85
85
  </div>
86
86
  </div>
87
87
  <br>
@@ -94,7 +94,7 @@
94
94
  <div class="layui-inline">
95
95
  <label class="layui-form-label">渠道分成:</label>
96
96
  <div class="layui-input-inline">
97
- <%= @follow_up.divide_amount %>万
97
+ <%= @follow_up.divide_amount.to_f.round(2) %>万
98
98
  </div>
99
99
  </div>
100
100
  <div class="layui-form-item">
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.8.7'
2
+ VERSION = '0.9.2'
3
3
  end
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.7
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails