educode_sales 0.9.7 → 0.9.8
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/images/educode_sales/indexlogo.png +0 -0
- data/app/controllers/educode_sales/businesses_controller.rb +5 -0
- data/app/controllers/educode_sales/follow_ups_controller.rb +14 -0
- data/app/models/educode_sales/business.rb +2 -0
- data/app/views/educode_sales/businesses/get_export_data.json.jbuilder +1 -0
- data/app/views/educode_sales/businesses/index.html.erb +14 -1
- data/app/views/educode_sales/businesses/index.json.jbuilder +1 -0
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +8 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff567b174c17bc652954bfeb48e7782de31affa2fd4995a1565bfc970b1654af
|
4
|
+
data.tar.gz: 8e3cb25e06155a626a838c6f96605be47e8f8f0d7bd65351210c9fae24d2a0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e37e4e9cd7ffa20ab9294d8f929dcc11a7c1ef0c385cb801bef72edf8f7b849664d3c0fa09725e7bc4c2abdd19d704a79ad6cd06d27cca389fa79551720bb9
|
7
|
+
data.tar.gz: a7ac56a8babcb87de9fef65ffcca053be0925608b345505f00e5ed26960714e8c24405af3ff2e5fe56851ed12bda269b07b348b403b92a5a2bd1da4bae6438f1
|
Binary file
|
@@ -208,6 +208,11 @@ module EducodeSales
|
|
208
208
|
").where("educode_sales_follow_ups.invitation_at > ? AND educode_sales_follow_ups.invitation_at < ?", date[0] + '00:00:00', date[1] + '23:59:59')
|
209
209
|
end
|
210
210
|
|
211
|
+
# 根据编号获取商机
|
212
|
+
if params[:q].present? && params[:q][:number].present?
|
213
|
+
@businesses = @businesses.where("number like :data", data: "%#{params[:q][:number].strip}%")
|
214
|
+
end
|
215
|
+
|
211
216
|
if params[:sort].present? && params[:sort][:field]
|
212
217
|
if params[:sort][:field] = "service_end_time"
|
213
218
|
@businesses = @businesses.order("service_time_long #{params[:sort][:order]}")
|
@@ -100,6 +100,8 @@ module EducodeSales
|
|
100
100
|
|
101
101
|
end
|
102
102
|
@business.update(last_follow_up_id: follow_up.id)
|
103
|
+
# 增加o商机编号
|
104
|
+
add_business_number
|
103
105
|
render_success
|
104
106
|
else
|
105
107
|
render_failure follow_up
|
@@ -135,6 +137,9 @@ module EducodeSales
|
|
135
137
|
follow_up.assign_follow_ups = assign_follow_ups
|
136
138
|
follow_up.profit_amount = follow_up.actual_amount - (follow_up.divide_amount.to_i) * 0.01 if follow_up.actual_amount
|
137
139
|
if follow_up.save
|
140
|
+
# 增加o类商机
|
141
|
+
@business = follow_up.business
|
142
|
+
add_business_number
|
138
143
|
render_success
|
139
144
|
else
|
140
145
|
render_failure follow_up
|
@@ -235,6 +240,15 @@ module EducodeSales
|
|
235
240
|
@business = Business.find(params[:business_id])
|
236
241
|
end
|
237
242
|
|
243
|
+
# o类商机增加编号
|
244
|
+
def add_business_number
|
245
|
+
if (@business.number.blank?) && params[:clazz_id] == '74'
|
246
|
+
totual_count = EducodeSales::Business.unscoped.where("number like :data",data: "#{Time.now.year}%").count
|
247
|
+
current_number = Time.now.year*1000 + totual_count + 1
|
248
|
+
@business.update(number: current_number.to_s)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
238
252
|
def follow_up_params
|
239
253
|
params.permit(:clazz_id, :stage_id, :invitation_at, :reception_at, :total_amount, :actual_amount, :divide_amount, :description, :advise, :place_id, :bidded_date, :signed_date, :year, :o_business_deployment)
|
240
254
|
end
|
@@ -75,6 +75,12 @@
|
|
75
75
|
<input type="text" class="layui-input" id="invitation_at" name="invitation_at" placeholder=" - " autocomplete="off">
|
76
76
|
</div>
|
77
77
|
</div>
|
78
|
+
<div class="layui-inline show_item" style="display:none;">
|
79
|
+
<label class="layui-form-label">编号</label>
|
80
|
+
<div class="layui-input-inline">
|
81
|
+
<input type="text" class="layui-input" id="number" name="number" placeholder=" - " autocomplete="off">
|
82
|
+
</div>
|
83
|
+
</div>
|
78
84
|
<div class="layui-inline">
|
79
85
|
<button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_business_search">重置
|
80
86
|
</button>
|
@@ -266,6 +272,13 @@
|
|
266
272
|
totalRowText: '合计',
|
267
273
|
fixed: "left"
|
268
274
|
},
|
275
|
+
{
|
276
|
+
field: 'number',
|
277
|
+
width: 120,
|
278
|
+
title: '编号',
|
279
|
+
fixed: 'left',
|
280
|
+
hide: gon.filter.number
|
281
|
+
},
|
269
282
|
{
|
270
283
|
field: 'name',
|
271
284
|
width: 170,
|
@@ -849,7 +862,7 @@
|
|
849
862
|
var field = data.field;
|
850
863
|
form.val('search_form', {
|
851
864
|
name: '', department: '', staff_id: '', business_type: '', business_step: '',
|
852
|
-
place_id: '', date: '', area: '', invitation_at: '', business_year: ''
|
865
|
+
place_id: '', date: '', area: '', invitation_at: '', business_year: '', number: ''
|
853
866
|
})
|
854
867
|
business_type_list.setValue([])
|
855
868
|
business_step_list.setValue([])
|
@@ -7,6 +7,14 @@
|
|
7
7
|
<%= @follow_up.business.department&.school&.name %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
|
+
<%if @follow_up.business.number.present?%>
|
11
|
+
<div class="layui-inline">
|
12
|
+
<label class="layui-form-label">编号:</label>
|
13
|
+
<div class="layui-input-inline">
|
14
|
+
<%= @follow_up.business.number %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<%end %>
|
10
18
|
<div class="layui-inline">
|
11
19
|
<label class="layui-form-label">部门:</label>
|
12
20
|
<div class="layui-input-inline">
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- app/assets/images/educode_sales/icon-login.png
|
106
106
|
- app/assets/images/educode_sales/icon.png
|
107
107
|
- app/assets/images/educode_sales/indexLogo.png
|
108
|
+
- app/assets/images/educode_sales/indexlogo.png
|
108
109
|
- app/assets/images/educode_sales/loading-0.gif
|
109
110
|
- app/assets/images/educode_sales/loading-1.gif
|
110
111
|
- app/assets/images/educode_sales/loading-2.gif
|
@@ -482,7 +483,7 @@ homepage: https://www.educoder.net
|
|
482
483
|
licenses:
|
483
484
|
- MIT
|
484
485
|
metadata: {}
|
485
|
-
post_install_message:
|
486
|
+
post_install_message:
|
486
487
|
rdoc_options: []
|
487
488
|
require_paths:
|
488
489
|
- lib
|
@@ -497,8 +498,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
497
498
|
- !ruby/object:Gem::Version
|
498
499
|
version: '0'
|
499
500
|
requirements: []
|
500
|
-
rubygems_version: 3.0.
|
501
|
-
signing_key:
|
501
|
+
rubygems_version: 3.0.9
|
502
|
+
signing_key:
|
502
503
|
specification_version: 4
|
503
504
|
summary: Summary of EducodeSales.
|
504
505
|
test_files: []
|