educode_sales 1.10.7 → 1.10.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/controllers/educode_sales/assessments_controller.rb +31 -1
- data/app/controllers/educode_sales/follow_ups_controller.rb +32 -1
- data/app/controllers/educode_sales/money_plan_records_controller.rb +26 -1
- data/app/models/educode_sales/follow_up.rb +1 -0
- data/app/models/educode_sales/follow_up_tag.rb +7 -0
- data/app/models/educode_sales/money_plan.rb +5 -5
- data/app/models/educode_sales/money_plan_claim.rb +9 -0
- data/app/models/educode_sales/money_plan_record.rb +1 -1
- data/app/models/educode_sales/tag.rb +7 -0
- data/app/models/educode_sales/watch_follow_up.rb +6 -0
- data/app/views/educode_sales/assessments/_attendances.html.erb +35 -1
- data/app/views/educode_sales/businesses/time_line.html.erb +30 -2
- data/app/views/educode_sales/follow_ups/add_tag.html.erb +48 -0
- data/app/views/educode_sales/home/search_money_plans.json.jbuilder +1 -1
- data/app/views/educode_sales/money_plan_records/_index.html.erb +31 -2
- data/app/views/educode_sales/money_plan_records/edit.html.erb +58 -0
- data/app/views/educode_sales/money_plans/list.html.erb +19 -8
- data/config/routes.rb +3 -0
- data/db/migrate/20230614141225_create_educode_sales_tags.rb +11 -0
- data/db/migrate/20230614141628_create_educode_sales_follow_up_tags.rb +11 -0
- data/db/migrate/20230614142145_create_educode_sales_watch_follow_ups.rb +10 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +14 -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: 93a3c4bdda6df52bc58177a34c5a39c7330d04d9cbaf4a5d4f4bbe3691d72759
|
4
|
+
data.tar.gz: dd64cb53bd80774ab02cdbd72a94b5684a827c47bd1d5aa51698b1183dbb758e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f7047b112cad5d0f53580aed23fe2fb65955d7418dd28169d7da3c6a5b96c0a30f14485a5b644961deb734b9fb0c59b968c38a5af6920409cdd2143e0de2d7
|
7
|
+
data.tar.gz: 4e3e0da1a8d21ed9d8cdb8cf8a3970dfa5ce554f8f87ad8b8dc30bc19248b63d555bc7ac0b52de91740753ac3ffa93c8b01b6ab9c1b8c415afaa584ca807d20f
|
@@ -434,6 +434,22 @@ module EducodeSales
|
|
434
434
|
render layout: false
|
435
435
|
end
|
436
436
|
|
437
|
+
#批量删除签到记录
|
438
|
+
def batch_delete
|
439
|
+
begin
|
440
|
+
ActiveRecord::Base.transaction do
|
441
|
+
if params[:ids].present?
|
442
|
+
ids = params[:ids]
|
443
|
+
attendances = EducodeSales::Attendance.where(id: ids)
|
444
|
+
attendances.destroy_all
|
445
|
+
end
|
446
|
+
end
|
447
|
+
render_success
|
448
|
+
rescue Exception => e
|
449
|
+
render_failure(e.message)
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
437
453
|
#导入签到记录接口
|
438
454
|
def import_attendances
|
439
455
|
render_failure("文件不存在或格式错误") if params[:file].blank? || !params[:file].is_a?(ActionDispatch::Http::UploadedFile)
|
@@ -453,7 +469,21 @@ module EducodeSales
|
|
453
469
|
address = d[6]
|
454
470
|
mobile_id = d[7]
|
455
471
|
ip_address = d[8]
|
456
|
-
|
472
|
+
if d[9].blank?
|
473
|
+
school_college_name = d[5].split("学院")[0]
|
474
|
+
school_university_name = d[5].split("大学")[0] + "大学"
|
475
|
+
school = School.where("name like ?", "%#{school_college_name}%").first
|
476
|
+
school01 = School.where("name like ?", "%#{school_university_name}%").first
|
477
|
+
if school.present?
|
478
|
+
customer = school.name
|
479
|
+
elsif school01.present?
|
480
|
+
customer = school01.name
|
481
|
+
else
|
482
|
+
customer = ""
|
483
|
+
end
|
484
|
+
else
|
485
|
+
customer = d[9]
|
486
|
+
end
|
457
487
|
target = d[10]
|
458
488
|
attendance_vales << {name: name, attendance_date: attendance_date, longitude: longitude, latitude: latitude, location: location,
|
459
489
|
address: address, mobile_id: mobile_id, ip_address: ip_address, customer: customer, target: target}
|
@@ -296,12 +296,43 @@ module EducodeSales
|
|
296
296
|
render layout: false
|
297
297
|
end
|
298
298
|
|
299
|
+
def add_tag
|
300
|
+
followup = FollowUp.find(params[:id])
|
301
|
+
gon.tags = []
|
302
|
+
tags = Tag.all.pluck(:name)
|
303
|
+
selecte_tags = followup.follow_up_tags.includes(:tag).map { |d| d.tag.name }
|
304
|
+
tags.each do |d|
|
305
|
+
gon.tags << {name: d, value: d, selected: selecte_tags.include?(d)}
|
306
|
+
end
|
307
|
+
render layout: false
|
308
|
+
end
|
309
|
+
|
310
|
+
def update_tags
|
311
|
+
followup = FollowUp.find(params[:id])
|
312
|
+
tags = []
|
313
|
+
tags_name = []
|
314
|
+
params[:tags].split(",").uniq.each do |d|
|
315
|
+
tag = Tag.find_or_initialize_by(name: d) do |d|
|
316
|
+
d.staff = @current_admin
|
317
|
+
end
|
318
|
+
tags_name << tag.name
|
319
|
+
tag.save unless tag.persisted?
|
320
|
+
t = FollowUpTag.find_or_initialize_by(tag_id: tag.id, follow_up_id: followup.id)
|
321
|
+
t.staff = @current_admin
|
322
|
+
tags << t
|
323
|
+
end
|
324
|
+
followup.follow_up_tags = tags
|
325
|
+
followup.save
|
326
|
+
render json: {success: true, tags: tags_name}
|
327
|
+
end
|
328
|
+
|
329
|
+
|
299
330
|
private
|
300
331
|
|
301
332
|
def edu_setting name
|
302
333
|
EduSetting.get(name)
|
303
334
|
end
|
304
|
-
|
335
|
+
|
305
336
|
def load_business
|
306
337
|
@business = Business.find(params[:business_id])
|
307
338
|
end
|
@@ -100,6 +100,26 @@ module EducodeSales
|
|
100
100
|
render json: { succcess: true}
|
101
101
|
end
|
102
102
|
|
103
|
+
def edit
|
104
|
+
@money_plan_record = MoneyPlanRecord.find(params[:id])
|
105
|
+
render layout: false
|
106
|
+
end
|
107
|
+
|
108
|
+
def update
|
109
|
+
money_plan_record = MoneyPlanRecord.find(params[:id])
|
110
|
+
if money_plan_record.update(money_plan_record_params)
|
111
|
+
render json: { succcess: true}
|
112
|
+
else
|
113
|
+
render_failure money_plan_record
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
def destroy
|
118
|
+
money_plan_record = MoneyPlanRecord.find(params[:id])
|
119
|
+
money_plan_record.destroy
|
120
|
+
render json: { succcess: true}
|
121
|
+
end
|
122
|
+
|
103
123
|
def confirm
|
104
124
|
money_plan_record = MoneyPlanRecord.find(params[:id])
|
105
125
|
money_plan_record.money_plan_claims.where.not(money_plan_id: params[:money_plan_ids]).delete_all
|
@@ -114,8 +134,13 @@ module EducodeSales
|
|
114
134
|
business.update(return_money: claim.money_plan.money_plan_claims.sum(:amount))
|
115
135
|
end
|
116
136
|
end
|
117
|
-
|
118
137
|
render_success
|
119
138
|
end
|
139
|
+
|
140
|
+
private
|
141
|
+
|
142
|
+
def money_plan_record_params
|
143
|
+
params.permit(:amount, :payer_name, :date_at)
|
144
|
+
end
|
120
145
|
end
|
121
146
|
end
|
@@ -22,6 +22,7 @@ module EducodeSales
|
|
22
22
|
has_many :key_person
|
23
23
|
has_many :teachers, through: :key_person
|
24
24
|
has_many :assign_follow_ups
|
25
|
+
has_many :follow_up_tags, dependent: :destroy
|
25
26
|
belongs_to :staff
|
26
27
|
belongs_to :stage, class_name: 'Common'
|
27
28
|
belongs_to :clazz, class_name: 'Common'
|
@@ -42,11 +42,11 @@ module EducodeSales
|
|
42
42
|
private
|
43
43
|
|
44
44
|
def update_return_money
|
45
|
-
if follow_up.business.last_follow_up_id == self.follow_up_id
|
46
|
-
|
47
|
-
else
|
48
|
-
|
49
|
-
end
|
45
|
+
# if follow_up.business.last_follow_up_id == self.follow_up_id
|
46
|
+
# follow_up.business.update(return_money: MoneyPlan.where(clazz: '实际回款', follow_up_id: self.follow_up_id).sum(:amount))
|
47
|
+
# else
|
48
|
+
# follow_up.update(return_money: follow_up.money_plans.where(clazz: '实际回款').sum(:amount))
|
49
|
+
# end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -3,5 +3,14 @@ module EducodeSales
|
|
3
3
|
belongs_to :money_plan
|
4
4
|
belongs_to :money_plan_record
|
5
5
|
belongs_to :staff
|
6
|
+
|
7
|
+
after_destroy :update_return_money
|
8
|
+
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def update_return_money
|
13
|
+
self.money_plan.business.update(return_money: self.money_plan.money_plan_claims.sum(:amount))
|
14
|
+
end
|
6
15
|
end
|
7
16
|
end
|
@@ -34,7 +34,8 @@
|
|
34
34
|
<script type="text/html" id="toolbarDemo">
|
35
35
|
<div class="layui-btn-container">
|
36
36
|
<span class="table-label">签到列表</span>
|
37
|
-
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="import_attendances"
|
37
|
+
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="import_attendances"><i class="layui-icon layui-icon-add-circle-fine"></i> 批量导入签到数据</button>
|
38
|
+
<button class="layui-btn layui-btn-normal layui-btn-sm layui-btn-danger data-delete-btn pull-right" lay-event="batch_delete"><i class="layui-icon layui-icon-delete"></i> 批量删除签到数据</button>
|
38
39
|
</div>
|
39
40
|
</script>
|
40
41
|
|
@@ -71,6 +72,10 @@
|
|
71
72
|
defaultToolbar: ['filter'],
|
72
73
|
cols: [
|
73
74
|
[
|
75
|
+
{
|
76
|
+
type: 'checkbox',
|
77
|
+
fixed: 'left'
|
78
|
+
},
|
74
79
|
{
|
75
80
|
field: 'id',
|
76
81
|
width: 100,
|
@@ -184,8 +189,13 @@
|
|
184
189
|
return false;
|
185
190
|
});
|
186
191
|
|
192
|
+
//监听表格复选框选择
|
193
|
+
table.on('checkbox(attendance_table)',function (obj) {});
|
194
|
+
|
187
195
|
//toorbar事件监听
|
188
196
|
table.on('toolbar(attendance_table)', function (obj) {
|
197
|
+
var data = obj.data;
|
198
|
+
var checkStatus = table.checkStatus(obj.config.id);
|
189
199
|
if (obj.event === 'import_attendances') { //批量导入签到记录
|
190
200
|
var content = miniPage.getHrefContent('/missions/assessments/import');
|
191
201
|
var openWH = miniPage.getOpenWidthHeight();
|
@@ -202,6 +212,30 @@
|
|
202
212
|
$(window).on("resize", function () {
|
203
213
|
layer.full(index);
|
204
214
|
});
|
215
|
+
}if (obj.event === 'batch_delete') { //批量删除签到记录
|
216
|
+
//定义数组存放批量删除的数据id
|
217
|
+
var ids = [];
|
218
|
+
//获取所有选中行的数据
|
219
|
+
var dataList = checkStatus.data;
|
220
|
+
//遍历选中的数据,将每一行的id存储到数据中
|
221
|
+
$.each(dataList,function (index, data) {
|
222
|
+
ids.push(data.id)
|
223
|
+
});
|
224
|
+
if (ids.length <= 0){
|
225
|
+
layer.msg('请选择要删除的签到记录', {icon: 5})
|
226
|
+
}else{
|
227
|
+
layer.confirm('确定要删除这些签到记录吗?', function (index) {
|
228
|
+
request.authPost("missions/assessments/batch_delete", {'ids': ids}, function (res) {
|
229
|
+
if (res.success === false){
|
230
|
+
layer.alert(res.msg)
|
231
|
+
}else{
|
232
|
+
layer.msg('删除成功');
|
233
|
+
layer.close(index);
|
234
|
+
table.reload("attendance_table")
|
235
|
+
}
|
236
|
+
})
|
237
|
+
})
|
238
|
+
}
|
205
239
|
}
|
206
240
|
});
|
207
241
|
|
@@ -26,8 +26,14 @@
|
|
26
26
|
<br/>
|
27
27
|
评论: <span><%= f.comment %></span> <a href="javascript:;" class="add_comment" data-id=<%= f.id %>>评论</a> <a href="javascript:;" class="uploadFile" data-id=<%= f.id %>>附件上传</a>
|
28
28
|
<br/>
|
29
|
+
<br/>
|
30
|
+
<span id="tag_<%= f.id %>">
|
31
|
+
<% f.follow_up_tags.each do |d| %>
|
32
|
+
<span class="layui-badge layui-bg-green"><%= d.tag.name %></span>
|
33
|
+
<% end %>
|
34
|
+
</span>
|
29
35
|
<!-- <span class="layui-badge layui-bg-green"></span> -->
|
30
|
-
<button type="button" class="layui-btn layui-btn-xs layui-btn-primary add-tag"><i class="layui-icon layui-icon-addition"></i>标签设置</button>
|
36
|
+
<button type="button" class="layui-btn layui-btn-xs layui-btn-primary add-tag" data-id="<%= f.id %>"><i class="layui-icon layui-icon-addition"></i>标签设置</button>
|
31
37
|
</p>
|
32
38
|
</div>
|
33
39
|
</li>
|
@@ -106,7 +112,7 @@
|
|
106
112
|
|
107
113
|
$(".uploadFile").on("click", function(e) {
|
108
114
|
var data = e.currentTarget.dataset;
|
109
|
-
follow_up_id =
|
115
|
+
follow_up_id = data.id
|
110
116
|
var content = miniPage.getHrefContent('/missions/follow_ups/' + follow_up_id + '/file');
|
111
117
|
var openWH = miniPage.getOpenWidthHeight();
|
112
118
|
lsindex = layer.open({
|
@@ -124,6 +130,28 @@
|
|
124
130
|
});
|
125
131
|
})
|
126
132
|
|
133
|
+
$(".add-tag").on("click", function(e) {
|
134
|
+
var data = e.currentTarget.dataset;
|
135
|
+
follow_up_id = data.id
|
136
|
+
var content = miniPage.getHrefContent('/missions/follow_ups/' + follow_up_id + '/add_tag');
|
137
|
+
var openWH = miniPage.getOpenWidthHeight();
|
138
|
+
tindex = layer.open({
|
139
|
+
title: '标签设置',
|
140
|
+
type: 1,
|
141
|
+
shade: 0.2,
|
142
|
+
maxmin: true,
|
143
|
+
shadeClose: true,
|
144
|
+
area: ['700px','600px'],
|
145
|
+
// offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
146
|
+
content: content
|
147
|
+
});
|
148
|
+
$(window).on("resize", function () {
|
149
|
+
layer.full(sindex);
|
150
|
+
});
|
151
|
+
})
|
152
|
+
|
153
|
+
|
154
|
+
|
127
155
|
});
|
128
156
|
function demo(){
|
129
157
|
layer.closeAll()
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%= Gon::Base.render_data %>
|
2
|
+
<div class="layui-form layuimini-form">
|
3
|
+
<div class="layui-form-item" style="padding: 25px">
|
4
|
+
<div id="tag"></div>
|
5
|
+
<div class="layui-form-item text-center" style="margin-top: 60px;">
|
6
|
+
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="btn">提交</button>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<script>
|
11
|
+
layui.use(['form', 'request', 'xmSelect'], function() {
|
12
|
+
var form = layui.form,
|
13
|
+
request = layui.request,
|
14
|
+
xmSelect = layui.xmSelect,
|
15
|
+
$ = layui.$;
|
16
|
+
|
17
|
+
var place_list = xmSelect.render({
|
18
|
+
el: '#tag',
|
19
|
+
name: "tags",
|
20
|
+
tips: '请输入或选择标签',
|
21
|
+
clickClose: true,
|
22
|
+
paging: true,
|
23
|
+
filterable: true,
|
24
|
+
data: gon.tags,
|
25
|
+
create: function(val, arr) {
|
26
|
+
return {
|
27
|
+
name: val,
|
28
|
+
value: val
|
29
|
+
}
|
30
|
+
},
|
31
|
+
})
|
32
|
+
|
33
|
+
form.on("submit(btn)", function(form) {
|
34
|
+
request.post('missions/follow_ups/' + parent.follow_up_id + '/update_tags',
|
35
|
+
form.field,
|
36
|
+
function(res) {
|
37
|
+
if (res.success) {
|
38
|
+
$("#tag_" + parent.follow_up_id).html("");
|
39
|
+
res.tags.forEach(function(tag) {
|
40
|
+
$("#tag_" + parent.follow_up_id).append(' <span class="layui-badge layui-bg-green">' + tag + '</span')
|
41
|
+
})
|
42
|
+
}
|
43
|
+
layer.close(tindex);
|
44
|
+
})
|
45
|
+
})
|
46
|
+
|
47
|
+
})
|
48
|
+
</script>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
json.data do
|
2
2
|
json.array! @data do |d|
|
3
3
|
json.value d.id
|
4
|
-
json.name "#{d.business
|
4
|
+
json.name "#{d.business&.number} / #{d.business.department&.school&.name.to_s}#{d.business.department&.name.to_s} / #{d.business.name} / #{d.business.last_follow_up&.actual_amount}万 / #{d.amount}万 /#{d.date_at.to_s(:date)}"
|
5
5
|
end
|
6
6
|
end
|
7
7
|
json.count @data.size
|
@@ -37,9 +37,11 @@
|
|
37
37
|
</form>
|
38
38
|
</div>
|
39
39
|
<script type="text/html" id="toolbar_money_plan_record">
|
40
|
+
<% if can? :add_record, EducodeSales::MoneyPlan %>
|
40
41
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" id="upload_money_plan_btn" style="margin-left: 20px;">批量导入回款计划</button>
|
41
42
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" style="margin-left: 20px;"
|
42
43
|
lay-event="add_record">添加回款记录</button>
|
44
|
+
<% end %>
|
43
45
|
</script>
|
44
46
|
|
45
47
|
<table class="layui-hide" id="money_plan_record_table" lay-filter="money_plan_record_table"></table>
|
@@ -50,6 +52,12 @@
|
|
50
52
|
</script>
|
51
53
|
|
52
54
|
<script type="text/html" id="currentTableBarmoney_record">
|
55
|
+
<% if can? :update_record, EducodeSales::MoneyPlan %>
|
56
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
57
|
+
<% end %>
|
58
|
+
<% if can? :delete_update_record, EducodeSales::MoneyPlan %>
|
59
|
+
<a class="layui-btn layui-btn-danger layui-btn-xs data-count-edit" lay-event="delete">删除</a>
|
60
|
+
<% end %>
|
53
61
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="confirm">认领回款</a>
|
54
62
|
</script>
|
55
63
|
|
@@ -210,8 +218,29 @@
|
|
210
218
|
$(window).on("resize", function() {
|
211
219
|
layer.full(sindex);
|
212
220
|
});
|
213
|
-
}
|
214
|
-
|
221
|
+
} else if (obj.event === 'edit') {
|
222
|
+
var content = miniPage.getHrefContent('/missions/money_plan_records/' + data.id + '/edit')
|
223
|
+
var openWH = miniPage.getOpenWidthHeight();
|
224
|
+
sindex = layer.open({
|
225
|
+
title: '编辑回款记录',
|
226
|
+
type: 1,
|
227
|
+
shade: 0.2,
|
228
|
+
maxmin: true,
|
229
|
+
shadeClose: true,
|
230
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
231
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
232
|
+
content: content
|
233
|
+
});
|
234
|
+
$(window).on("resize", function() {
|
235
|
+
layer.full(sindex);
|
236
|
+
});
|
237
|
+
} else if (obj.event == 'delete') {
|
238
|
+
layer.confirm('确定删除' + data.business + "的回款记录", function (index) {
|
239
|
+
request.delete('missions/money_plan_records/' + data.id, {}, function (res) {
|
240
|
+
layer.close(index);
|
241
|
+
table.reload("money_plan_record_table");
|
242
|
+
})
|
243
|
+
});
|
215
244
|
}
|
216
245
|
});
|
217
246
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<div style="padding:10px">
|
2
|
+
<div class="layui-form layuimini-form" lay-filter="searchform">
|
3
|
+
<div class="layui-form-item">
|
4
|
+
<label class="layui-form-label" style="width: 80px !important;">合同名称:</label>
|
5
|
+
<div class="layui-input-inline" style="line-height: 38px;">
|
6
|
+
<%= @money_plan_record.business.name %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<div class="layui-form-item">
|
10
|
+
<div class="layui-inline">
|
11
|
+
<label class="layui-form-label required">付款单位:</label>
|
12
|
+
<div class="layui-input-inline">
|
13
|
+
<input type="text" name="payer_name" value="<%= @money_plan_record.payer_name %>" class="layui-input" lay-verify="required">
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="layui-inline">
|
17
|
+
<label class="layui-form-label required">回款金额:</label>
|
18
|
+
<div class="layui-input-inline">
|
19
|
+
<input type="text" name="amount" value="<%= @money_plan_record.amount %>" class="layui-input" lay-verify="required">
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="layui-inline">
|
23
|
+
<label class="layui-form-label required" style="width: 110px;">回款日期:</label>
|
24
|
+
<div class="layui-input-inline">
|
25
|
+
<input type="text" name="date_at" value="<%= @money_plan_record.date_at %>" class="layui-input" lay-verify="required" id="date_at">
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</div>
|
30
|
+
<div class="layui-form-item">
|
31
|
+
<div class="layui-input-block">
|
32
|
+
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">保存</button>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<script>
|
39
|
+
layui.use(['form', 'table', 'upload', 'laytpl', 'request', 'laydate', 'selectInput'], function() {
|
40
|
+
var form = layui.form,
|
41
|
+
table = layui.table,
|
42
|
+
laydate = layui.laydate,
|
43
|
+
request = layui.request,
|
44
|
+
$ = layui.$;
|
45
|
+
form.render();
|
46
|
+
laydate.render({
|
47
|
+
elem: '#date_at',
|
48
|
+
});
|
49
|
+
|
50
|
+
form.on('submit(saveBtn)', function(data) {
|
51
|
+
request.put("missions/money_plan_records/" + parent.id, data.field, function(res) {
|
52
|
+
layer.close(parent.sindex)
|
53
|
+
parent.table.reload('money_plan_record_table')
|
54
|
+
})
|
55
|
+
return false;
|
56
|
+
});
|
57
|
+
});
|
58
|
+
</script>
|
@@ -2,16 +2,20 @@
|
|
2
2
|
<div class="layui-tab" lay-filter="money_plan_tab">
|
3
3
|
<ul class="layui-tab-title">
|
4
4
|
<li class="layui-this">回款计划</li>
|
5
|
+
<% if can? :record, EducodeSales::MoneyPlan %>
|
5
6
|
<li class="">回款记录</li>
|
7
|
+
<% end %>
|
6
8
|
<li class="">开票记录</li>
|
7
9
|
</ul>
|
8
10
|
<div class="layui-tab-content">
|
9
11
|
<div class="layui-tab-item layui-show">
|
10
12
|
<%=render 'index' %>
|
11
13
|
</div>
|
14
|
+
<% if can? :record, EducodeSales::MoneyPlan %>
|
12
15
|
<div class="layui-tab-item">
|
13
16
|
<div id="monley_plan_record_wraper"></div>
|
14
17
|
</div>
|
18
|
+
<% end %>
|
15
19
|
<div class="layui-tab-item">
|
16
20
|
<div id="invoice_wraper"></div>
|
17
21
|
</div>
|
@@ -32,14 +36,21 @@
|
|
32
36
|
|
33
37
|
|
34
38
|
element.render();
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
<% if can? :record, EducodeSales::MoneyPlan %>
|
40
|
+
element.on('tab(money_plan_tab)', function(data) {
|
41
|
+
if (data.index == 1 && $("#money_plan_record").length == 0) {
|
42
|
+
loadPage('/missions/money_plan_records')
|
43
|
+
} else if (data.index == 2 && $("#invoice_apply").length == 0) {
|
44
|
+
loadPage('/missions/invoices/apply_records')
|
45
|
+
}
|
46
|
+
});
|
47
|
+
<% else %>
|
48
|
+
element.on('tab(money_plan_tab)', function(data) {
|
49
|
+
if (data.index == 1 && $("#invoice_apply").length == 0) {
|
50
|
+
loadPage('/missions/invoices/apply_records')
|
51
|
+
}
|
52
|
+
});
|
53
|
+
<% end %>
|
43
54
|
|
44
55
|
function loadPage(url) {
|
45
56
|
var layer_index = layer.load(0, {shade: [0.1, '#fff']});
|
data/config/routes.rb
CHANGED
@@ -155,6 +155,8 @@ EducodeSales::Engine.routes.draw do
|
|
155
155
|
put :comment
|
156
156
|
get :file
|
157
157
|
get :upload_file
|
158
|
+
get :add_tag
|
159
|
+
post :update_tags
|
158
160
|
end
|
159
161
|
end
|
160
162
|
|
@@ -271,6 +273,7 @@ EducodeSales::Engine.routes.draw do
|
|
271
273
|
get :attendances
|
272
274
|
get :import
|
273
275
|
post :import_attendances
|
276
|
+
post :batch_delete
|
274
277
|
end
|
275
278
|
member do
|
276
279
|
get :edit_attendance
|
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.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: 2023-06-
|
11
|
+
date: 2023-06-15 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
|
@@ -224,6 +223,7 @@ files:
|
|
224
223
|
- app/models/educode_sales/eco_staff.rb
|
225
224
|
- app/models/educode_sales/filter.rb
|
226
225
|
- app/models/educode_sales/follow_up.rb
|
226
|
+
- app/models/educode_sales/follow_up_tag.rb
|
227
227
|
- app/models/educode_sales/follow_up_trend.rb
|
228
228
|
- app/models/educode_sales/idea.rb
|
229
229
|
- app/models/educode_sales/idea_follow.rb
|
@@ -258,10 +258,12 @@ files:
|
|
258
258
|
- app/models/educode_sales/staff_permission.rb
|
259
259
|
- app/models/educode_sales/staff_school.rb
|
260
260
|
- app/models/educode_sales/staff_school_tag.rb
|
261
|
+
- app/models/educode_sales/tag.rb
|
261
262
|
- app/models/educode_sales/teacher.rb
|
262
263
|
- app/models/educode_sales/teacher_assign_follow.rb
|
263
264
|
- app/models/educode_sales/teacher_follow.rb
|
264
265
|
- app/models/educode_sales/user_stat_service.rb
|
266
|
+
- app/models/educode_sales/watch_follow_up.rb
|
265
267
|
- app/services/return_forecast_service.rb
|
266
268
|
- app/views/educode_sales/activities/_follows.html.erb
|
267
269
|
- app/views/educode_sales/activities/_index.html.erb
|
@@ -362,6 +364,7 @@ files:
|
|
362
364
|
- app/views/educode_sales/customers/show_follow.json.jbuilder
|
363
365
|
- app/views/educode_sales/customers/show_follow_record.html.erb
|
364
366
|
- app/views/educode_sales/customers/show_majors.html.erb
|
367
|
+
- app/views/educode_sales/follow_ups/add_tag.html.erb
|
365
368
|
- app/views/educode_sales/follow_ups/file.html.erb
|
366
369
|
- app/views/educode_sales/follow_ups/index.json.jbuilder
|
367
370
|
- app/views/educode_sales/follow_ups/money_plans.json.jbuilder
|
@@ -453,6 +456,7 @@ files:
|
|
453
456
|
- app/views/educode_sales/money_plan_records/_index.html.erb
|
454
457
|
- app/views/educode_sales/money_plan_records/add.html.erb
|
455
458
|
- app/views/educode_sales/money_plan_records/confirm_plan.html.erb
|
459
|
+
- app/views/educode_sales/money_plan_records/edit.html.erb
|
456
460
|
- app/views/educode_sales/money_plan_records/index.js.erb
|
457
461
|
- app/views/educode_sales/money_plan_records/index.json.jbuilder
|
458
462
|
- app/views/educode_sales/money_plans/_index.html.erb
|
@@ -728,6 +732,9 @@ files:
|
|
728
732
|
- db/migrate/20230531144834_create_educode_sales_invoice_applies.rb
|
729
733
|
- db/migrate/20230601011835_create_educode_sales_invoices.rb
|
730
734
|
- db/migrate/20230601011943_create_educode_sales_invoice_details.rb
|
735
|
+
- db/migrate/20230614141225_create_educode_sales_tags.rb
|
736
|
+
- db/migrate/20230614141628_create_educode_sales_follow_up_tags.rb
|
737
|
+
- db/migrate/20230614142145_create_educode_sales_watch_follow_ups.rb
|
731
738
|
- lib/educode_sales.rb
|
732
739
|
- lib/educode_sales/engine.rb
|
733
740
|
- lib/educode_sales/version.rb
|
@@ -736,7 +743,7 @@ homepage: https://www.educoder.net
|
|
736
743
|
licenses:
|
737
744
|
- MIT
|
738
745
|
metadata: {}
|
739
|
-
post_install_message:
|
746
|
+
post_install_message:
|
740
747
|
rdoc_options: []
|
741
748
|
require_paths:
|
742
749
|
- lib
|
@@ -751,8 +758,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
751
758
|
- !ruby/object:Gem::Version
|
752
759
|
version: '0'
|
753
760
|
requirements: []
|
754
|
-
rubygems_version: 3.0.
|
755
|
-
signing_key:
|
761
|
+
rubygems_version: 3.0.0
|
762
|
+
signing_key:
|
756
763
|
specification_version: 4
|
757
764
|
summary: Summary of EducodeSales.
|
758
765
|
test_files: []
|
Binary file
|