educode_sales 0.9.22 → 0.9.23
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/follow_ups_controller.rb +17 -0
- data/app/controllers/educode_sales/staffs_controller.rb +8 -1
- data/app/models/educode_sales/staff.rb +2 -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: c58fda9ebef8022559880649de7e90de9c0b5537ccab09a2bdf1900bea0373a1
|
4
|
+
data.tar.gz: cea666fa1f5c0939b3ad387cf023faf9a27169495d607ce32918208c0562f326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0905e5bc74bb514316f7e053e54768ae633f42591929d627033acab86bdc180ad7c660b1df276104be4f99fda43d9d21f37c58170b973a22e65e9285077e681a'
|
7
|
+
data.tar.gz: 489498f262416a5a5ce3eed6327796116d705299eac68a08600d0ab6b2a3bfcfbe708214a921c3aa7cc6f1cf383ea11f7d69df774d7a3581d4ce6db97150f43b
|
Binary file
|
@@ -102,6 +102,7 @@ module EducodeSales
|
|
102
102
|
@business.update(last_follow_up_id: follow_up.id)
|
103
103
|
# 增加o商机编号
|
104
104
|
add_business_number
|
105
|
+
update_department
|
105
106
|
render_success
|
106
107
|
else
|
107
108
|
render_failure follow_up
|
@@ -140,6 +141,7 @@ module EducodeSales
|
|
140
141
|
# 增加o类商机
|
141
142
|
@business = follow_up.business
|
142
143
|
add_business_number
|
144
|
+
update_department
|
143
145
|
render_success
|
144
146
|
else
|
145
147
|
render_failure follow_up
|
@@ -258,6 +260,21 @@ module EducodeSales
|
|
258
260
|
params.permit(:clazz_id, :stage_id, :invitation_at, :reception_at, :total_amount, :actual_amount, :divide_amount, :divide_rate, :budget_amount, :description, :advise, :place_id, :bidded_date, :signed_date, :year, :o_business_deployment)
|
259
261
|
end
|
260
262
|
|
263
|
+
# 更新部门和部门下老师用户的状态
|
264
|
+
def update_department
|
265
|
+
clazz = %w[已中标 已签单 已验收 回款中 服务中]
|
266
|
+
name = @business.last_follow_up&.stage&.name
|
267
|
+
Rails.logger.debug("调试======#{clazz.include?(name)}")
|
268
|
+
if clazz.include?(name)
|
269
|
+
department = @business.department
|
270
|
+
if department
|
271
|
+
department.level = 2
|
272
|
+
department.save!
|
273
|
+
UserExtension.where(department_id:@business.department_id,identity:0).update_all(level:2)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
261
278
|
def teacher_params
|
262
279
|
params.permit(:professional_title, :job, :attitude_id, :sex, :birth_date, :remark, :tel)
|
263
280
|
end
|
@@ -2,7 +2,6 @@ require_dependency "educode_sales/application_controller"
|
|
2
2
|
|
3
3
|
module EducodeSales
|
4
4
|
class StaffsController < ApplicationController
|
5
|
-
|
6
5
|
def index
|
7
6
|
respond_to do |format|
|
8
7
|
format.html do
|
@@ -35,7 +34,9 @@ module EducodeSales
|
|
35
34
|
def create
|
36
35
|
user = User.find(params[:id])
|
37
36
|
staff = Staff.new(user_id: user.id)
|
37
|
+
params[:current_admin] = @current_admin.id
|
38
38
|
if staff.save
|
39
|
+
impressionist(staff, params)
|
39
40
|
render_success
|
40
41
|
else
|
41
42
|
render_failure staff
|
@@ -60,6 +61,8 @@ module EducodeSales
|
|
60
61
|
|
61
62
|
def destroy
|
62
63
|
staff = Staff.find(params[:id])
|
64
|
+
params[:current_admin] = @current_admin.id
|
65
|
+
impressionist(staff, params)
|
63
66
|
staff.update(deleted_at: Time.now, expired_at: Time.now.days_ago(1))
|
64
67
|
render_success
|
65
68
|
# rescue ActiveRecord::DeleteRestrictionError => e
|
@@ -68,6 +71,8 @@ module EducodeSales
|
|
68
71
|
|
69
72
|
def disable
|
70
73
|
staff = Staff.find(params[:id])
|
74
|
+
params[:current_admin] = @current_admin.id
|
75
|
+
impressionist(staff, params)
|
71
76
|
staff.update(expired_at: Time.now.days_ago(1))
|
72
77
|
render_success
|
73
78
|
end
|
@@ -89,6 +94,8 @@ module EducodeSales
|
|
89
94
|
else
|
90
95
|
staff.staff_schools.destroy_all
|
91
96
|
end
|
97
|
+
params[:current_admin] = @current_admin.id
|
98
|
+
impressionist(staff, params)
|
92
99
|
if staff.save
|
93
100
|
render_success
|
94
101
|
else
|
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.23
|
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-
|
11
|
+
date: 2022-12-02 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
|
@@ -488,7 +489,7 @@ homepage: https://www.educoder.net
|
|
488
489
|
licenses:
|
489
490
|
- MIT
|
490
491
|
metadata: {}
|
491
|
-
post_install_message:
|
492
|
+
post_install_message:
|
492
493
|
rdoc_options: []
|
493
494
|
require_paths:
|
494
495
|
- lib
|
@@ -503,8 +504,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
503
504
|
- !ruby/object:Gem::Version
|
504
505
|
version: '0'
|
505
506
|
requirements: []
|
506
|
-
rubygems_version: 3.0.
|
507
|
-
signing_key:
|
507
|
+
rubygems_version: 3.0.9
|
508
|
+
signing_key:
|
508
509
|
specification_version: 4
|
509
510
|
summary: Summary of EducodeSales.
|
510
511
|
test_files: []
|