educode_sales 0.9.73 → 0.9.74
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/contracts_controller.rb +309 -0
- data/app/controllers/educode_sales/follow_ups_controller.rb +1 -1
- data/app/controllers/educode_sales/home_controller.rb +7 -0
- data/app/controllers/educode_sales/ideas_controller.rb +146 -76
- data/app/controllers/educode_sales/roles_controller.rb +2 -1
- data/app/controllers/educode_sales/upload_files_controller.rb +3 -0
- data/app/models/educode_sales/assign_staff.rb +6 -0
- data/app/models/educode_sales/contract_date_list.rb +6 -0
- data/app/models/educode_sales/follow_up.rb +6 -0
- data/app/models/educode_sales/idea.rb +16 -5
- data/app/models/educode_sales/idea_follow.rb +11 -0
- data/app/models/educode_sales/permission.rb +2 -1
- data/app/models/educode_sales/role_area.rb +2 -1
- data/app/views/educode_sales/businesses/_contract_list.html.erb +160 -0
- data/app/views/educode_sales/contracts/_follows.html.erb +323 -0
- data/app/views/educode_sales/contracts/_list.html.erb +596 -0
- data/app/views/educode_sales/contracts/follow_ups.json.jbuilder +23 -0
- data/app/views/educode_sales/contracts/index.html.erb +50 -0
- data/app/views/educode_sales/contracts/index.json.jbuilder +74 -0
- data/app/views/educode_sales/contracts/list.js.erb +1 -0
- data/app/views/educode_sales/contracts/new_follow_up.html.erb +671 -0
- data/app/views/educode_sales/home/staff_business.json.jbuilder +9 -0
- data/app/views/educode_sales/idea_recycles/detail.html.erb +4 -4
- data/app/views/educode_sales/idea_recycles/index.html.erb +5 -5
- data/app/views/educode_sales/ideas/_follows.html.erb +258 -0
- data/app/views/educode_sales/ideas/_index.html.erb +544 -0
- data/app/views/educode_sales/ideas/detail.html.erb +7 -7
- data/app/views/educode_sales/ideas/edit.html.erb +77 -15
- data/app/views/educode_sales/ideas/files.html.erb +157 -0
- data/app/views/educode_sales/ideas/files.json.jbuilder +13 -0
- data/app/views/educode_sales/ideas/follow_ups.json.jbuilder +14 -0
- data/app/views/educode_sales/ideas/index.html.erb +12 -353
- data/app/views/educode_sales/ideas/index.json.jbuilder +7 -1
- data/app/views/educode_sales/ideas/new.html.erb +81 -25
- data/app/views/educode_sales/ideas/new_follow_up.html.erb +105 -0
- data/app/views/educode_sales/ideas/search_new.html.erb +1 -1
- data/app/views/educode_sales/ideas/show_schools.html.erb +84 -0
- data/app/views/educode_sales/ideas/show_schools.json.jbuilder +12 -0
- data/app/views/educode_sales/ideas/show_teachers.html.erb +372 -0
- data/app/views/educode_sales/ideas/upload_file.html.erb +43 -0
- data/app/views/educode_sales/projects/detail.html.erb +1 -1
- data/app/views/educode_sales/projects/edit.html.erb +1 -1
- data/app/views/educode_sales/roles/edit.html.erb +16 -0
- data/app/views/layouts/educode_sales/application.html.erb +5 -5
- data/config/routes.rb +19 -0
- data/db/migrate/20230227061043_create_educode_sales_ideas.rb +2 -2
- data/db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb +21 -0
- data/db/migrate/20230430040332_create_educode_sales_contract_date_lists.rb +15 -0
- data/db/migrate/20230430104708_create_idea_follows.rb +25 -0
- data/db/migrate/20230430121335_add_permissions_for_ideas.rb +16 -0
- data/db/migrate/20230430134710_create_educode_sales_assign_staffs.rb +11 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +30 -2
@@ -0,0 +1,105 @@
|
|
1
|
+
<%= Gon::Base.render_data %>
|
2
|
+
<div class="layui-form layuimini-form">
|
3
|
+
<div class="layui-form-item" style="padding: 25px">
|
4
|
+
<div class="layui-row">
|
5
|
+
<h2 style="padding-left: 25px">跟进</h2>
|
6
|
+
</div>
|
7
|
+
<div class="layui-row" style="padding-top: 15px">
|
8
|
+
<div class="layui-col-md6">
|
9
|
+
<labeL class="layui-form-label required">销售经理:</labeL>
|
10
|
+
<div class="layui-input-block">
|
11
|
+
<div id="new_sale_staff_id"></div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="layui-col-md6">
|
15
|
+
<labeL class="layui-form-label">方案经理:</labeL>
|
16
|
+
<div class="layui-input-block">
|
17
|
+
<div id="new_idea_staff_id"></div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<div class="layui-row" style="padding-top: 15px">
|
22
|
+
<div class="layui-col-md6">
|
23
|
+
<labeL class="layui-form-label">预算:</labeL>
|
24
|
+
<div class="layui-input-block">
|
25
|
+
<input type="number" name="money" autocomplete="off" placeholder="请输入硬件规模" value="<%= @idea_follow&.money %>" class="layui-input">
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="layui-col-md6">
|
29
|
+
<labeL class="layui-form-label">状态:</labeL>
|
30
|
+
<div class="layui-input-block">
|
31
|
+
<%= select_tag "status", options_for_select(EducodeSales::IdeaFollow.statuses.keys, @idea_follow&.status), { 'lay-filter': 'status', include_blank: false } %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="layui-row" style="padding-top: 15px">
|
36
|
+
<labeL class="layui-form-label">团队建议:</labeL>
|
37
|
+
<div class="layui-input-block">
|
38
|
+
<textarea name="content" placeholder="团队建议" class="layui-textarea"><%= @idea_follow&.content.to_s %></textarea>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class="layui-row" style="padding-top: 15px">
|
42
|
+
<labeL class="layui-form-label">最新进展:</labeL>
|
43
|
+
<div class="layui-input-block">
|
44
|
+
<textarea name="content" placeholder="团队建议" class="layui-textarea"><%= @idea_follow&.content.to_s %></textarea>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<div class="layui-row" style="padding-top: 30px; float: left">
|
48
|
+
<div class="layui-input-block">
|
49
|
+
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn_follow">确认保存</button>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<script>
|
59
|
+
layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'laydate'], function () {
|
60
|
+
var form = layui.form,
|
61
|
+
layer = layui.layer,
|
62
|
+
table = layui.table,
|
63
|
+
laytpl = layui.laytpl,
|
64
|
+
request = layui.request,
|
65
|
+
laydate = layui.laydate,
|
66
|
+
$ = layui.$;
|
67
|
+
|
68
|
+
form.render();
|
69
|
+
|
70
|
+
|
71
|
+
var staff_list = xmSelect.render({
|
72
|
+
el: '#new_idea_staff_id',
|
73
|
+
data: gon.staffs,
|
74
|
+
filterable: true,
|
75
|
+
radio: true,
|
76
|
+
})
|
77
|
+
var sale_staff_list = xmSelect.render({
|
78
|
+
el: '#new_sale_staff_id',
|
79
|
+
data: gon.staffs,
|
80
|
+
filterable: true,
|
81
|
+
radio: true,
|
82
|
+
})
|
83
|
+
|
84
|
+
|
85
|
+
//监听提交
|
86
|
+
form.on('submit(saveBtn_follow)', function (data) {
|
87
|
+
data.field.idea_id = "<%= @idea.id %>";
|
88
|
+
data.field.idea_staff_id = staff_list.getValue('valueStr');
|
89
|
+
data.field.sale_staff_id = sale_staff_list.getValue('valueStr');
|
90
|
+
request.authPost("missions/ideas/" + data.field.idea_id + "/follow_up", data.field, function (res) {
|
91
|
+
if (res.success == false) {
|
92
|
+
layer.alert(res.msg)
|
93
|
+
} else {
|
94
|
+
layer.close(parent.followup_index);
|
95
|
+
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
96
|
+
table.reload('activity_followp_table');
|
97
|
+
table.reload('ideas_table')
|
98
|
+
}
|
99
|
+
})
|
100
|
+
return false;
|
101
|
+
});
|
102
|
+
|
103
|
+
|
104
|
+
});
|
105
|
+
</script>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<div class="min-height-table">
|
2
|
+
<table class="layui-hide" id="show_school_table" style="min-height: 300px;" lay-filter="show_school_table"></table>
|
3
|
+
</div>
|
4
|
+
<script type="text/html" id="school_toolbar">
|
5
|
+
<div class="layui-btn-container">
|
6
|
+
<span class="table-label">教师列表</span>
|
7
|
+
</div>
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<script type="text/html" id="teachers_count">
|
11
|
+
<a href="javascript:void(0);" lay-event="teachers_count" class="layui-table-link">{{ d.teachers_count}}</a>
|
12
|
+
</script>
|
13
|
+
<script>
|
14
|
+
|
15
|
+
layui.use(['form', 'table', 'miniPage', 'element', 'request'], function () {
|
16
|
+
var $ = layui.jquery,
|
17
|
+
form = layui.form,
|
18
|
+
request = layui.request,
|
19
|
+
miniPage = layui.miniPage;
|
20
|
+
|
21
|
+
table = layui.table;
|
22
|
+
table.render({
|
23
|
+
elem: '#show_school_table',
|
24
|
+
url: '/missions/activities/' + parent.idea_id + '/show_schools',
|
25
|
+
defaultToolbar: ['filter'],
|
26
|
+
toolbar: '#school_toolbar',
|
27
|
+
cols: [
|
28
|
+
[
|
29
|
+
{
|
30
|
+
field: 'id',
|
31
|
+
width: 60,
|
32
|
+
title: '序号',
|
33
|
+
type: 'numbers',
|
34
|
+
},
|
35
|
+
{
|
36
|
+
field: 'school',
|
37
|
+
width: 300,
|
38
|
+
title: '单位',
|
39
|
+
},
|
40
|
+
{
|
41
|
+
field: 'department',
|
42
|
+
width: 200,
|
43
|
+
title: '部门'
|
44
|
+
},
|
45
|
+
{
|
46
|
+
field: 'teachers_count',
|
47
|
+
title: '教师数',
|
48
|
+
width: 120,
|
49
|
+
templet: "#teachers_count"
|
50
|
+
},
|
51
|
+
]
|
52
|
+
],
|
53
|
+
page: true,
|
54
|
+
});
|
55
|
+
|
56
|
+
|
57
|
+
table.on('tool(show_school_table)', function (obj) {
|
58
|
+
if (obj.event === 'teachers_count') {
|
59
|
+
idea_id = parent.idea_id;
|
60
|
+
school_id = obj.data.school_id;
|
61
|
+
content = miniPage.getHrefContent('/missions/activities/show_teachers');
|
62
|
+
openWH = miniPage.getOpenWidthHeight();
|
63
|
+
index2 = layer.open({
|
64
|
+
title: '活动列表/' + parent.activity_name,
|
65
|
+
type: 1,
|
66
|
+
shade: 0.2,
|
67
|
+
maxmin: true,
|
68
|
+
shadeClose: true,
|
69
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
70
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
71
|
+
content: content,
|
72
|
+
success: function (layero, index) {
|
73
|
+
form.render('select');
|
74
|
+
},
|
75
|
+
});
|
76
|
+
$(window).on("resize", function () {
|
77
|
+
layer.full(index);
|
78
|
+
});
|
79
|
+
return false;
|
80
|
+
}
|
81
|
+
})
|
82
|
+
|
83
|
+
});
|
84
|
+
</script>
|
@@ -0,0 +1,372 @@
|
|
1
|
+
<div class="min-height-table">
|
2
|
+
|
3
|
+
<table class="layui-hide" id="show_teachers_table" style="min-height: 300px;" lay-filter="teachers_table"></table>
|
4
|
+
</div>
|
5
|
+
<script type="text/html" id="teacher_toolbar">
|
6
|
+
<div class="layui-btn-container">
|
7
|
+
<span class="table-label">教师列表</span>
|
8
|
+
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="search_new"> 添加教师
|
9
|
+
</button>
|
10
|
+
</div>
|
11
|
+
</script>
|
12
|
+
<script type="text/html" id="show_teachersTableBar">
|
13
|
+
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
|
14
|
+
</script>
|
15
|
+
<script type="text/html" id="name">
|
16
|
+
{{# if (d.login) { }}
|
17
|
+
<a href="<%= base_url%>/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.name }}</a>
|
18
|
+
{{# } else {}}
|
19
|
+
<a href="javascript:;" class="">{{ d.name }}</a>
|
20
|
+
{{# }}}
|
21
|
+
</script>
|
22
|
+
<script type="text/html" id="courses">
|
23
|
+
<a href="javascript:void(0);" lay-event="courses" class="layui-table-link">{{ d.course_subjects_count }}</a>
|
24
|
+
</script>
|
25
|
+
<script type="text/html" id="event">
|
26
|
+
<a href="javascript:void(0);" lay-event="event" class="layui-table-link">{{ d.activities_count }}</a>
|
27
|
+
</script>
|
28
|
+
<script type="text/html" id="class">
|
29
|
+
<a href="javascript:void(0);" lay-event="class" class="layui-table-link">{{ d.courses_count }}</a>
|
30
|
+
</script>
|
31
|
+
<script type="text/html" id="follow">
|
32
|
+
<a href="javascript:void(0);" lay-event="follow" class="layui-table-link">{{ d.teacher_follows_count }}</a>
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script>
|
37
|
+
layui.use('laydate', function () {
|
38
|
+
var laydate = layui.laydate;
|
39
|
+
//执行一个laydate实例
|
40
|
+
laydate.render({
|
41
|
+
elem: '#test',
|
42
|
+
range: true //或 range: '~' 来自定义分割字符
|
43
|
+
});
|
44
|
+
})
|
45
|
+
|
46
|
+
layui.use(['form', 'table', 'miniPage', 'element', 'request'], function () {
|
47
|
+
var $ = layui.jquery,
|
48
|
+
form = layui.form,
|
49
|
+
request = layui.request,
|
50
|
+
miniPage = layui.miniPage;
|
51
|
+
|
52
|
+
table = layui.table;
|
53
|
+
table.render({
|
54
|
+
elem: '#show_teachers_table',
|
55
|
+
url: '/missions/teachers?idea_id=' + parent.idea_id + "&school_id=" + (parent.school_id ? parent.school_id : ''),
|
56
|
+
toolbar: '#teacher_toolbar',
|
57
|
+
defaultToolbar: ['filter'],
|
58
|
+
cols: [
|
59
|
+
[
|
60
|
+
{
|
61
|
+
field: 'id',
|
62
|
+
width: 60,
|
63
|
+
title: '序号', type: 'numbers',
|
64
|
+
},
|
65
|
+
{
|
66
|
+
field: 'name',
|
67
|
+
width: 90,
|
68
|
+
title: '用户名',
|
69
|
+
templet: "#name"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
field: 'school',
|
73
|
+
width: 120,
|
74
|
+
title: '单位',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
field: 'department',
|
78
|
+
width: 120,
|
79
|
+
title: '部门'
|
80
|
+
},
|
81
|
+
{
|
82
|
+
field: 'professional_title',
|
83
|
+
title: '职称',
|
84
|
+
width: 80,
|
85
|
+
templet: '#show_follow'
|
86
|
+
},
|
87
|
+
{
|
88
|
+
field: 'job',
|
89
|
+
width: 80,
|
90
|
+
title: '职务',
|
91
|
+
templet: '#show_keys'
|
92
|
+
|
93
|
+
},
|
94
|
+
{
|
95
|
+
field: 'source',
|
96
|
+
width: 100,
|
97
|
+
title: '来源',
|
98
|
+
},
|
99
|
+
{
|
100
|
+
field: 'attitude',
|
101
|
+
width: 80,
|
102
|
+
title: '态度',
|
103
|
+
},
|
104
|
+
{
|
105
|
+
field: 'course_subjects_count',
|
106
|
+
width: 90,
|
107
|
+
title: '课程方向',
|
108
|
+
templet: "#courses"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
field: 'teacher_follows_count',
|
112
|
+
width: 90,
|
113
|
+
title: '跟进情况',
|
114
|
+
templet: "#follow"
|
115
|
+
},
|
116
|
+
{
|
117
|
+
field: 'teacher_used',
|
118
|
+
width: 110,
|
119
|
+
title: '学院渗透率',
|
120
|
+
},
|
121
|
+
{
|
122
|
+
field: 'students',
|
123
|
+
width: 60,
|
124
|
+
title: '学生',
|
125
|
+
},
|
126
|
+
{
|
127
|
+
field: 'courses_count',
|
128
|
+
width: 60,
|
129
|
+
title: '课堂',
|
130
|
+
templet: "#class"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
field: 'activities_count',
|
134
|
+
width: 100,
|
135
|
+
title: '参与活动',
|
136
|
+
templet: "#event"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
field: 'regist_at',
|
140
|
+
width: 120,
|
141
|
+
title: '注册时间',
|
142
|
+
},
|
143
|
+
{
|
144
|
+
title: '操作',
|
145
|
+
minWidth: 150,
|
146
|
+
toolbar: '#show_teachersTableBar',
|
147
|
+
align: "center",
|
148
|
+
fixed: 'right'
|
149
|
+
}
|
150
|
+
]
|
151
|
+
],
|
152
|
+
page: true,
|
153
|
+
});
|
154
|
+
|
155
|
+
// 监听搜索操作
|
156
|
+
form.on('submit(data-search-btn)', function (data) {
|
157
|
+
var result = JSON.stringify(data.field);
|
158
|
+
layer.alert(result, {
|
159
|
+
title: '最终的搜索信息'
|
160
|
+
});
|
161
|
+
|
162
|
+
//执行搜索重载
|
163
|
+
table.reload('currentTableId', {
|
164
|
+
page: {
|
165
|
+
curr: 1
|
166
|
+
},
|
167
|
+
where: {
|
168
|
+
searchParams: result
|
169
|
+
}
|
170
|
+
}, 'data');
|
171
|
+
|
172
|
+
return false;
|
173
|
+
});
|
174
|
+
|
175
|
+
/**
|
176
|
+
* toolbar事件监听
|
177
|
+
*/
|
178
|
+
table.on('toolbar(teachers_table)', function (obj) {
|
179
|
+
if (obj.event === 'add') { // 手动添加
|
180
|
+
var content = miniPage.getHrefContent('/missions/teachers/new');
|
181
|
+
var openWH = miniPage.getOpenWidthHeight();
|
182
|
+
index = layer.open({
|
183
|
+
title: '手动添加',
|
184
|
+
type: 1,
|
185
|
+
shade: 0.2,
|
186
|
+
maxmin: true,
|
187
|
+
shadeClose: true,
|
188
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
189
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
190
|
+
content: content,
|
191
|
+
});
|
192
|
+
$(window).on("resize", function () {
|
193
|
+
layer.full(index);
|
194
|
+
});
|
195
|
+
} else if (obj.event === 'search_new') { // 搜索添加
|
196
|
+
var content = miniPage.getHrefContent('/missions/teachers/new');
|
197
|
+
// var content = miniPage.getHrefContent('/missions/teachers/search_new');
|
198
|
+
var openWH = miniPage.getOpenWidthHeight();
|
199
|
+
idea_id = parent.idea_id;
|
200
|
+
index = layer.open({
|
201
|
+
title: '添加老师',
|
202
|
+
type: 1,
|
203
|
+
shade: 0.2,
|
204
|
+
maxmin: true,
|
205
|
+
shadeClose: true,
|
206
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
207
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
208
|
+
content: content,
|
209
|
+
});
|
210
|
+
$(window).on("resize", function () {
|
211
|
+
layer.full(index);
|
212
|
+
});
|
213
|
+
}
|
214
|
+
});
|
215
|
+
|
216
|
+
//监听表格复选框选择
|
217
|
+
table.on('checkbox(teachers_table)', function (obj) {
|
218
|
+
console.log(obj)
|
219
|
+
});
|
220
|
+
|
221
|
+
table.on('tool(teachers_table)', function (obj) {
|
222
|
+
var data = obj.data;
|
223
|
+
id = data.id
|
224
|
+
if (obj.event === 'edit') { //编辑
|
225
|
+
var content = miniPage.getHrefContent('/missions/teachers/' + id + '/edit');
|
226
|
+
var openWH = miniPage.getOpenWidthHeight();
|
227
|
+
sindex = layer.open({
|
228
|
+
title: '编辑',
|
229
|
+
type: 1,
|
230
|
+
shade: 0.2,
|
231
|
+
maxmin: true,
|
232
|
+
shadeClose: true,
|
233
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
234
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
235
|
+
content: content,
|
236
|
+
// success: function (layero, index) {
|
237
|
+
// $("#edit_username").val(data.username);
|
238
|
+
// $("#edit_company").val(data.company);
|
239
|
+
// $("#edit_dep").val(data.dep);
|
240
|
+
// },
|
241
|
+
});
|
242
|
+
$(window).on("resize", function () {
|
243
|
+
layer.full(sindex);
|
244
|
+
});
|
245
|
+
return false;
|
246
|
+
} else if (obj.event === 'delete') {
|
247
|
+
console.log(data);
|
248
|
+
layer.confirm('确定删除' + data.name, function (index) {
|
249
|
+
request.delete('missions/teachers/' + data.id, {idea_id: idea_id}, function (res) {
|
250
|
+
layer.close(index);
|
251
|
+
table.reload("activities_table")
|
252
|
+
table.reload("show_teachers_table")
|
253
|
+
})
|
254
|
+
});
|
255
|
+
} else if (obj.event === 'addWeek') {
|
256
|
+
var content = miniPage.getHrefContent('/missions/operation_plans/new_week');
|
257
|
+
var openWH = miniPage.getOpenWidthHeight();
|
258
|
+
|
259
|
+
sindex = layer.open({
|
260
|
+
title: '添加周计划',
|
261
|
+
type: 1,
|
262
|
+
shade: 0.2,
|
263
|
+
maxmin: true,
|
264
|
+
shadeClose: true,
|
265
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
266
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
267
|
+
content: content
|
268
|
+
});
|
269
|
+
$(window).on("resize", function () {
|
270
|
+
layer.full(sindex);
|
271
|
+
});
|
272
|
+
} else if (obj.event === 'addMonth') {
|
273
|
+
var content = miniPage.getHrefContent('/missions/operation_plans/new_month');
|
274
|
+
var openWH = miniPage.getOpenWidthHeight();
|
275
|
+
sindex = layer.open({
|
276
|
+
title: '添加月计划',
|
277
|
+
type: 1,
|
278
|
+
shade: 0.2,
|
279
|
+
maxmin: true,
|
280
|
+
shadeClose: true,
|
281
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
282
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
283
|
+
content: content
|
284
|
+
});
|
285
|
+
$(window).on("resize", function () {
|
286
|
+
layer.full(sindex);
|
287
|
+
});
|
288
|
+
|
289
|
+
} else if (obj.event === 'courses') {
|
290
|
+
teacher_id = data.id
|
291
|
+
content = miniPage.getHrefContent('/missions/teachers/add_courses?id='+data.id);
|
292
|
+
openWH = miniPage.getOpenWidthHeight();
|
293
|
+
index = layer.open({
|
294
|
+
title: '课程方向',
|
295
|
+
type: 1,
|
296
|
+
shade: 0.2,
|
297
|
+
maxmin: true,
|
298
|
+
shadeClose: true,
|
299
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
300
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
301
|
+
content: content,
|
302
|
+
success: function (layero, index) {
|
303
|
+
// 重新渲染弹层中的下拉选择框select
|
304
|
+
// form.render('select');
|
305
|
+
}
|
306
|
+
});
|
307
|
+
$(window).on("resize", function () {
|
308
|
+
layer.full(index);
|
309
|
+
});
|
310
|
+
}else if (obj.event === 'event') {
|
311
|
+
content = miniPage.getHrefContent('/missions/teachers/add_event');
|
312
|
+
openWH = miniPage.getOpenWidthHeight();
|
313
|
+
teacher_id = obj.data.id
|
314
|
+
index = layer.open({
|
315
|
+
title: '参与活动',
|
316
|
+
type: 1,
|
317
|
+
shade: 0.2,
|
318
|
+
maxmin: true,
|
319
|
+
shadeClose: true,
|
320
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
321
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
322
|
+
content: content
|
323
|
+
});
|
324
|
+
$(window).on("resize", function () {
|
325
|
+
layer.full(index);
|
326
|
+
});
|
327
|
+
} else if (obj.event === 'class') {
|
328
|
+
content = miniPage.getHrefContent('/missions/teachers/show_class');
|
329
|
+
openWH = miniPage.getOpenWidthHeight();
|
330
|
+
user_id = obj.data.user_id
|
331
|
+
index = layer.open({
|
332
|
+
title: '课堂列表',
|
333
|
+
type: 1,
|
334
|
+
shade: 0.2,
|
335
|
+
maxmin: true,
|
336
|
+
shadeClose: true,
|
337
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
338
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
339
|
+
content: content,
|
340
|
+
success: function (layero, index) {
|
341
|
+
// 重新渲染弹层中的下拉选择框select
|
342
|
+
// form.render('select');
|
343
|
+
}
|
344
|
+
});
|
345
|
+
$(window).on("resize", function () {
|
346
|
+
layer.full(index);
|
347
|
+
});
|
348
|
+
} else if (obj.event === 'follow') {
|
349
|
+
content = miniPage.getHrefContent('/missions/teachers/show_follow?id=' + data.id);
|
350
|
+
openWH = miniPage.getOpenWidthHeight();
|
351
|
+
index = layer.open({
|
352
|
+
title: '跟进记录',
|
353
|
+
type: 1,
|
354
|
+
shade: 0.2,
|
355
|
+
maxmin: true,
|
356
|
+
shadeClose: true,
|
357
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
358
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
359
|
+
content: content,
|
360
|
+
success: function (layero, index) {
|
361
|
+
// 重新渲染弹层中的下拉选择框select
|
362
|
+
// form.render('select');
|
363
|
+
}
|
364
|
+
});
|
365
|
+
$(window).on("resize", function () {
|
366
|
+
layer.full(index);
|
367
|
+
});
|
368
|
+
}
|
369
|
+
});
|
370
|
+
|
371
|
+
});
|
372
|
+
</script>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div style="padding-left: 50px">
|
2
|
+
<button type="button" class="layui-btn" id="get_file"><i class="layui-icon"></i>选择文件</button>
|
3
|
+
</div>
|
4
|
+
<script>
|
5
|
+
layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'selectInput'], function () {
|
6
|
+
var form = layui.form,
|
7
|
+
layer = layui.layer,
|
8
|
+
table = layui.table,
|
9
|
+
laytpl = layui.laytpl,
|
10
|
+
upload = layui.upload,
|
11
|
+
request = layui.request,
|
12
|
+
$ = layui.$;
|
13
|
+
selectInput = layui.selectInput;
|
14
|
+
|
15
|
+
form.render();
|
16
|
+
|
17
|
+
//指定允许上传的文件类型
|
18
|
+
var idea_id = parent.idea_id
|
19
|
+
var renderObj = upload.render({
|
20
|
+
elem: '#get_file'
|
21
|
+
, url: '/missions/upload_files?idea_id=' + idea_id //此处配置你自己的上传接口即可
|
22
|
+
, accept: 'file' //普通文件
|
23
|
+
, headers: {
|
24
|
+
'X-CSRF-Token': $('meta[name=csrf-token]').attr('content')
|
25
|
+
}
|
26
|
+
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
|
27
|
+
layer.load(); //上传loading
|
28
|
+
}
|
29
|
+
, done: function (res) {
|
30
|
+
layer.msg('导入成功');
|
31
|
+
table.reload('file');
|
32
|
+
layer.closeAll('loading'); //关闭loading
|
33
|
+
layer.close(parent.import_index)
|
34
|
+
}
|
35
|
+
,error: function(index, upload){
|
36
|
+
table.reload('file');
|
37
|
+
layer.closeAll('loading'); //关闭loading
|
38
|
+
layer.alert('导入失败,请检查文件格式')
|
39
|
+
layer.close(parent.import_index)
|
40
|
+
}
|
41
|
+
});
|
42
|
+
});
|
43
|
+
</script>
|
@@ -156,7 +156,7 @@
|
|
156
156
|
<div class="layui-row" style="padding-top: 15px">
|
157
157
|
<labeL class="layui-form-label">问题备注:</labeL>
|
158
158
|
<div class="layui-input-block">
|
159
|
-
<textarea name="p_content" placeholder="
|
159
|
+
<textarea name="p_content" placeholder="需求说明" class="layui-textarea"><%= @project&.p_content.to_s %></textarea>
|
160
160
|
</div>
|
161
161
|
</div>
|
162
162
|
</div>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
<div class="layui-row" style="padding-top: 15px">
|
149
149
|
<labeL class="layui-form-label">问题备注:</labeL>
|
150
150
|
<div class="layui-input-block">
|
151
|
-
<textarea name="p_content" placeholder="
|
151
|
+
<textarea name="p_content" placeholder="需求说明" class="layui-textarea"><%= @project&.p_content.to_s %></textarea>
|
152
152
|
</div>
|
153
153
|
</div>
|
154
154
|
<div class="layui-row" style="padding-top: 30px; float: left">
|
@@ -36,6 +36,14 @@
|
|
36
36
|
<%= radio_button_tag("business", "全部", @areas.include?("商机管理-全部"), { title: '全部列表', id: 3 }) %>
|
37
37
|
</div>
|
38
38
|
</div>
|
39
|
+
<div class="layui-form-item" style="border-top: 1px solid #ddd;">
|
40
|
+
<label class="layui-form-label">合同管理</label>
|
41
|
+
<div class="layui-input-block">
|
42
|
+
<%= radio_button_tag("contract", "自己", @areas.include?("合同管理-自己"), { title: '本人创建列表' }) %>
|
43
|
+
<%= radio_button_tag("contract", "区域", @areas.include?("合同管理-区域"), { title: '本人负责区域及监管院校列表' }) %>
|
44
|
+
<%= radio_button_tag("contract", "全部", @areas.include?("合同管理-全部"), { title: '全部列表' }) %>
|
45
|
+
</div>
|
46
|
+
</div>
|
39
47
|
<div class="layui-form-item" style="border-top: 1px solid #ddd;">
|
40
48
|
<label class="layui-form-label">回款计划</label>
|
41
49
|
<div class="layui-input-block">
|
@@ -84,6 +92,14 @@
|
|
84
92
|
<%= radio_button_tag("operation", "全部", @areas.include?("运营计划-全部"), { title: '全部列表', id: 12 }) %>
|
85
93
|
</div>
|
86
94
|
</div>
|
95
|
+
<div class="layui-form-item">
|
96
|
+
<label class="layui-form-label">方案管理</label>
|
97
|
+
<div class="layui-input-block">
|
98
|
+
<%= radio_button_tag("idea", "自己", @areas.include?("方案管理-自己"), { title: '本人创建列表', id: 101 }) %>
|
99
|
+
<%= radio_button_tag("idea", "区域", @areas.include?("方案管理-区域"), { title: '本人负责区域及监管院校列表', id: 102 }) %>
|
100
|
+
<%= radio_button_tag("idea", "全部", @areas.include?("方案管理-全部"), { title: '全部列表', id: 103 }) %>
|
101
|
+
</div>
|
102
|
+
</div>
|
87
103
|
<div class="m-t-20">
|
88
104
|
<div class="layui-input-block">
|
89
105
|
<button type="submit" class="layui-btn" lay-submit="" lay-filter="data">提交</button>
|