educode_sales 1.10.17 → 1.10.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/educode_sales/money_plan_records_controller.rb +11 -0
- data/app/views/educode_sales/money_plan_records/_index.html.erb +23 -2
- data/app/views/educode_sales/money_plan_records/index.json.jbuilder +1 -0
- data/app/views/educode_sales/money_plans/index.json.jbuilder +2 -2
- data/lib/educode_sales/version.rb +1 -1
- metadata +6 -7
- data/app/assets/images/educode_sales/indexlogo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8037147081840dd2c090f239b68e31c0262e1e395be83430565da7dab45da06e
|
4
|
+
data.tar.gz: 40e32c9627b100fc6da0e7fdd66fc0cecf3e745263aaf9df12fdbd80803d83e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9dcc35f2f24582825fd8a74e840f1c9534240934a28cf6771f263d4b9295382c1b8c870695c1be5fd20f643ded2aec496675f8c1b379ed74b5f14fd32e41f9c
|
7
|
+
data.tar.gz: 036a61625d1c003e35d8602e56e57635aa4108d6e9246853da7d97c06aa31ec9be40821a027d6a8890e91690489f89ddd63d60eed602ee924fe9670b083a59d2
|
@@ -12,6 +12,8 @@ module EducodeSales
|
|
12
12
|
gon.edit_record = can?(:update_record, EducodeSales::MoneyPlan)
|
13
13
|
gon.edit_record_self = can?(:update_record_self, EducodeSales::MoneyPlan)
|
14
14
|
gon.staff_id = @current_admin.id
|
15
|
+
common = Common.find_by(clazz: 'staff_type', name: '销售')
|
16
|
+
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 } }
|
15
17
|
end
|
16
18
|
format.json do
|
17
19
|
@money_plan_records = MoneyPlanRecord.left_joins(:money_plan_claims).group("educode_sales_money_plan_records.id").select("educode_sales_money_plan_records.*, COUNT(educode_sales_money_plan_claims.id) AS claim_num")
|
@@ -50,6 +52,15 @@ module EducodeSales
|
|
50
52
|
end
|
51
53
|
|
52
54
|
end
|
55
|
+
|
56
|
+
if params[:q].present? && params[:q][:staff_manages].present?
|
57
|
+
# 销售经理
|
58
|
+
@money_plan_records = @money_plan_records.joins(:business).joins("
|
59
|
+
LEFT JOIN educode_sales_follow_ups AS last_follow_up ON educode_sales_businesses.last_follow_up_id = last_follow_up.id AND last_follow_up.deleted_at IS NULL
|
60
|
+
LEFT JOIN educode_sales_assign_follow_ups ON educode_sales_assign_follow_ups.follow_up_id = last_follow_up.id").
|
61
|
+
where("(educode_sales_assign_follow_ups.id IS NOT NULL AND educode_sales_assign_follow_ups.staff_id = ?) OR (educode_sales_assign_follow_ups.id IS NULL AND educode_sales_businesses.staff_id = ?)", params[:q][:staff_manages], params[:q][:staff_manages])
|
62
|
+
end
|
63
|
+
|
53
64
|
if params[:q].present? && params[:q][:amount].present?
|
54
65
|
@money_plan_records = @money_plan_records.where(amount: params[:q][:amount])
|
55
66
|
end
|
@@ -32,6 +32,12 @@
|
|
32
32
|
<%= select_tag "state", options_for_select(['已认领', '待认领', '无对应合同', '无对应应收款']), { 'lay-filter': 'state', include_blank: true, "lay-search": "" } %>
|
33
33
|
</div>
|
34
34
|
</div>
|
35
|
+
<div class="layui-inline show_item">
|
36
|
+
<label class="layui-form-label">销售经理</label>
|
37
|
+
<div class="layui-input-inline">
|
38
|
+
<div id="staff_manages" style="width: 190px;"></div>
|
39
|
+
</div>
|
40
|
+
</div>
|
35
41
|
<div class="layui-inline">
|
36
42
|
<button type="reset" class="layui-btn layui-btn-primary" lay-submit
|
37
43
|
lay-filter="reset_business_search_record">重置
|
@@ -69,11 +75,12 @@
|
|
69
75
|
</script>
|
70
76
|
|
71
77
|
<script>
|
72
|
-
layui.use(['form', 'table', 'miniPage', 'element', 'request', 'upload'], function() {
|
78
|
+
layui.use(['form', 'table', 'miniPage', 'element', 'request', 'upload', 'xmSelect'], function() {
|
73
79
|
var $ = layui.jquery,
|
74
80
|
form = layui.form,
|
75
81
|
request = layui.request,
|
76
82
|
upload = layui.upload,
|
83
|
+
xmSelect = layui.xmSelect,
|
77
84
|
miniPage = layui.miniPage;
|
78
85
|
laydate = layui.laydate;
|
79
86
|
table = layui.table;
|
@@ -110,6 +117,11 @@
|
|
110
117
|
title: '回款日期',
|
111
118
|
sort: true
|
112
119
|
},
|
120
|
+
{
|
121
|
+
field: 'staff_manages',
|
122
|
+
width: 180,
|
123
|
+
title: '销售经理',
|
124
|
+
},
|
113
125
|
{
|
114
126
|
field: 'business',
|
115
127
|
width: 180,
|
@@ -146,6 +158,13 @@
|
|
146
158
|
uploadMoneyPlan()
|
147
159
|
}
|
148
160
|
});
|
161
|
+
|
162
|
+
var staff_manages_list = xmSelect.render({
|
163
|
+
el: '#staff_manages',
|
164
|
+
data: gon.staffs,
|
165
|
+
filterable: true,
|
166
|
+
radio: true,
|
167
|
+
})
|
149
168
|
var sort = {},
|
150
169
|
search = {};
|
151
170
|
table.on('sort(money_plan_record_table)', function(obj) {
|
@@ -161,7 +180,8 @@
|
|
161
180
|
})
|
162
181
|
// 监听搜索操作
|
163
182
|
form.on('submit(submit_form_record)', function(data) {
|
164
|
-
search = data.field
|
183
|
+
search = data.field;
|
184
|
+
search.staff_manages = staff_manages_list.getValue('valueStr');
|
165
185
|
table.reload('money_plan_record_table', {
|
166
186
|
page: {
|
167
187
|
curr: 1
|
@@ -184,6 +204,7 @@
|
|
184
204
|
school: "",
|
185
205
|
business: ""
|
186
206
|
});
|
207
|
+
staff_manages_list.setValue([]);
|
187
208
|
return false;
|
188
209
|
});
|
189
210
|
table.on('toolbar(money_plan_record_table)', function(obj) {
|
@@ -13,6 +13,7 @@ json.data do
|
|
13
13
|
json.staff_id d.staff_id
|
14
14
|
json.number d.business&.number
|
15
15
|
json.payer_name d.payer_name
|
16
|
+
json.staff_manages d.business&.last_follow_up&.assign_follow_ups.present? ? (d.business.last_follow_up.assign_follow_ups.map{ |s| s.staff.user.real_name}.join("、")) : d.business&.staff&.user&.real_name
|
16
17
|
if d['claim_num'] > 0
|
17
18
|
json.state '已认领'
|
18
19
|
elsif d.business&.name.nil?
|
@@ -8,9 +8,9 @@ json.data do
|
|
8
8
|
json.clazz d.clazz
|
9
9
|
json.business d.business.name
|
10
10
|
json.business_id d.business.id
|
11
|
-
json.school d.business.school
|
11
|
+
json.school d.business.school&.name
|
12
12
|
json.school_id d.business.school_id
|
13
|
-
json.staff d.staff
|
13
|
+
json.staff d.staff&.user&.real_name
|
14
14
|
json.staff_id d.staff_id
|
15
15
|
json.number d.business.number
|
16
16
|
json.category d.category || ''
|
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: 1.10.
|
4
|
+
version: 1.10.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,7 +105,6 @@ 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
|
109
108
|
- app/assets/images/educode_sales/loading-0.gif
|
110
109
|
- app/assets/images/educode_sales/loading-1.gif
|
111
110
|
- app/assets/images/educode_sales/loading-2.gif
|
@@ -745,7 +744,7 @@ homepage: https://www.educoder.net
|
|
745
744
|
licenses:
|
746
745
|
- MIT
|
747
746
|
metadata: {}
|
748
|
-
post_install_message:
|
747
|
+
post_install_message:
|
749
748
|
rdoc_options: []
|
750
749
|
require_paths:
|
751
750
|
- lib
|
@@ -760,8 +759,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
760
759
|
- !ruby/object:Gem::Version
|
761
760
|
version: '0'
|
762
761
|
requirements: []
|
763
|
-
rubygems_version: 3.0.
|
764
|
-
signing_key:
|
762
|
+
rubygems_version: 3.0.0
|
763
|
+
signing_key:
|
765
764
|
specification_version: 4
|
766
765
|
summary: Summary of EducodeSales.
|
767
766
|
test_files: []
|
Binary file
|