educode_sales 0.7.2 → 0.7.3
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/businesses_controller.rb +11 -1
- data/app/controllers/educode_sales/follow_ups_controller.rb +13 -1
- data/app/controllers/educode_sales/results_controller.rb +54 -0
- data/app/models/educode_sales/result.rb +4 -0
- data/app/views/educode_sales/businesses/edit_follow_record.html.erb +150 -114
- data/app/views/educode_sales/businesses/get_export_data.json.jbuilder +1 -0
- data/app/views/educode_sales/businesses/index.html.erb +24 -18
- data/app/views/educode_sales/businesses/index.json.jbuilder +1 -0
- data/app/views/educode_sales/businesses/new_follow_record.html.erb +156 -119
- data/app/views/educode_sales/businesses/show_follow.html.erb +25 -20
- data/app/views/educode_sales/businesses/show_follow.json.jbuilder +1 -0
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +8 -1
- data/app/views/educode_sales/results/edit.html.erb +111 -0
- data/app/views/educode_sales/results/index.html.erb +0 -0
- data/app/views/educode_sales/results/index.json.jbuilder +13 -0
- data/app/views/educode_sales/results/new.html.erb +58 -0
- data/app/views/educode_sales/results/show.json.jbuilder +9 -0
- data/app/views/layouts/educode_sales/application.html.erb +9 -3
- data/config/routes.rb +7 -1
- data/db/migrate/20220314053856_add_service_start_time_to_follow_ups.rb +6 -0
- data/db/migrate/20220314074354_add_service_time_long_to_follow_ups.rb +5 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32e3ce754e3aeac0c5f424b9188254b88b1da494feb591b5eb1e2d100f0362c2
|
|
4
|
+
data.tar.gz: 2be5f9d03ccc4781ff534e59ffe8aee273185a0d635c08ca09e60403a4b4d221
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec4b1594bcc4ac5766e6e3c0fc189f17b8b24b0789328ee1ed75a33022438b6d5f2c2c78f221ae6bf3db2dbb9b4253f7d5f428df24f6c336aa0a3ea5bd081aaf
|
|
7
|
+
data.tar.gz: '082c2c1a08570db3b4ea942c932c73ad08fd2e2bde8b4be2cff38816a4d3eed64bf503fb151ece68a0140e2db841c153923335fcf10d1142370b41f8f6a10a2f'
|
|
@@ -198,7 +198,11 @@ module EducodeSales
|
|
|
198
198
|
end
|
|
199
199
|
|
|
200
200
|
if params[:sort].present? && params[:sort][:field]
|
|
201
|
-
|
|
201
|
+
if params[:sort][:field] = "service_end_time"
|
|
202
|
+
@businesses = @businesses.order("service_time_long #{params[:sort][:order]}")
|
|
203
|
+
else
|
|
204
|
+
@businesses = @businesses.order("#{params[:sort][:field]} #{params[:sort][:order]}")
|
|
205
|
+
end
|
|
202
206
|
else
|
|
203
207
|
@businesses = @businesses.order("educode_sales_businesses.created_at desc")
|
|
204
208
|
end
|
|
@@ -208,6 +212,9 @@ module EducodeSales
|
|
|
208
212
|
@businesses = @businesses.select("
|
|
209
213
|
educode_sales_businesses.*,
|
|
210
214
|
last_follow.invitation_at,
|
|
215
|
+
last_follow.service_time_long,
|
|
216
|
+
last_follow.service_end_time,
|
|
217
|
+
last_follow.service_start_time,
|
|
211
218
|
last_follow.reception_at,
|
|
212
219
|
last_follow.bidded_date,
|
|
213
220
|
last_follow.signed_date,
|
|
@@ -559,6 +566,9 @@ module EducodeSales
|
|
|
559
566
|
educode_sales_businesses.*,
|
|
560
567
|
last_follow.invitation_at,
|
|
561
568
|
last_follow.reception_at,
|
|
569
|
+
last_follow.service_time_long,
|
|
570
|
+
last_follow.service_end_time,
|
|
571
|
+
last_follow.service_start_time,
|
|
562
572
|
last_follow.bidded_date,
|
|
563
573
|
last_follow.signed_date,
|
|
564
574
|
last_follow.created_at as latest_time,
|
|
@@ -63,11 +63,17 @@ module EducodeSales
|
|
|
63
63
|
def create
|
|
64
64
|
load_business
|
|
65
65
|
follow_up = @business.follow_ups.build(follow_up_params)
|
|
66
|
+
if params[:service_time].present?
|
|
67
|
+
date = params[:service_time].split(" - ")
|
|
68
|
+
follow_up.service_start_time = date[0]
|
|
69
|
+
follow_up.service_end_time = date[1]
|
|
70
|
+
follow_up.service_time_long = (date[1].to_date - date[0].to_date).to_i
|
|
71
|
+
end
|
|
66
72
|
follow_up.staff = @current_admin
|
|
67
73
|
params[:assign_follow_up].each do |d|
|
|
68
74
|
follow_up.assign_follow_ups.build(staff_id: d)
|
|
69
75
|
end
|
|
70
|
-
|
|
76
|
+
|
|
71
77
|
follow_up.profit_amount = follow_up.actual_amount - (follow_up.divide_amount.to_i) if follow_up.actual_amount
|
|
72
78
|
if follow_up.save
|
|
73
79
|
if @business.last_follow_up.present?
|
|
@@ -106,6 +112,12 @@ module EducodeSales
|
|
|
106
112
|
def update
|
|
107
113
|
follow_up = FollowUp.find(params[:id])
|
|
108
114
|
follow_up.assign_attributes(follow_up_params)
|
|
115
|
+
if params[:service_time].present?
|
|
116
|
+
date = params[:service_time].split(" - ")
|
|
117
|
+
follow_up.service_start_time = date[0]
|
|
118
|
+
follow_up.service_end_time = date[1]
|
|
119
|
+
follow_up.service_time_long = (date[1].to_date - date[0].to_date).to_i
|
|
120
|
+
end
|
|
109
121
|
assign_follow_ups = []
|
|
110
122
|
params[:assign_follow_up].each do |d|
|
|
111
123
|
assign_follow_ups << follow_up.assign_follow_ups.find_or_initialize_by(staff_id: d)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require_dependency "educode_sales/application_controller"
|
|
2
|
+
|
|
3
|
+
module EducodeSales
|
|
4
|
+
class ResultsController < ApplicationController
|
|
5
|
+
|
|
6
|
+
def index
|
|
7
|
+
respond_to do |format|
|
|
8
|
+
format.html do
|
|
9
|
+
end
|
|
10
|
+
format.json do
|
|
11
|
+
# @commons = Common.group("clazz").page(params[:page]).per(params[:limit])
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# def create
|
|
17
|
+
# common = Common.new(name: params[:name], clazz: params[:clazz])
|
|
18
|
+
# if common.save
|
|
19
|
+
# render_success
|
|
20
|
+
# else
|
|
21
|
+
# render_failure common
|
|
22
|
+
# end
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# def edit
|
|
26
|
+
# @common = Common.find(params[:id])
|
|
27
|
+
# render layout: false
|
|
28
|
+
# end
|
|
29
|
+
#
|
|
30
|
+
# def update
|
|
31
|
+
# common = Common.find(params[:id])
|
|
32
|
+
# if common.update(common_params)
|
|
33
|
+
# render_success
|
|
34
|
+
# else
|
|
35
|
+
# render_failure common
|
|
36
|
+
# end
|
|
37
|
+
# end
|
|
38
|
+
#
|
|
39
|
+
# def new
|
|
40
|
+
# render layout: false
|
|
41
|
+
# end
|
|
42
|
+
#
|
|
43
|
+
# def show
|
|
44
|
+
# commons = Common.find(params[:id])
|
|
45
|
+
# @commons = Common.where(clazz: commons.clazz).order('position')
|
|
46
|
+
# end
|
|
47
|
+
#
|
|
48
|
+
# private
|
|
49
|
+
#
|
|
50
|
+
# def common_params
|
|
51
|
+
# params.permit(:name, :position)
|
|
52
|
+
# end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
<label class="layui-form-label required">项目类型</label>
|
|
20
20
|
<%if EducodeSales::FollowUp.where(business_id: @follow_up.business.id,clazz_id: EducodeSales::Common.find_by(name: @o_name).id).count >= 2 %>
|
|
21
21
|
<div class="layui-input-inline">
|
|
22
|
-
<%= select_tag "clazz_id", options_for_select([[@o_name,EducodeSales::Common.find_by(name: @o_name).id]])
|
|
22
|
+
<%= select_tag "clazz_id", options_for_select([[@o_name, EducodeSales::Common.find_by(name: @o_name).id]]), { 'lay-filter': 'clazz_id', class: 'required', :disabled => true } %>
|
|
23
23
|
</div>
|
|
24
24
|
<%else %>
|
|
25
25
|
<div class="layui-input-inline">
|
|
26
|
-
<%= select_tag "clazz_id", options_for_select(@clazz, @follow_up&.clazz_id), class: 'required' %>
|
|
26
|
+
<%= select_tag "clazz_id", options_for_select(@clazz, @follow_up&.clazz_id), { 'lay-filter': 'clazz_id', class: 'required' } %>
|
|
27
27
|
</div>
|
|
28
28
|
<%end %>
|
|
29
29
|
</div>
|
|
@@ -60,21 +60,29 @@
|
|
|
60
60
|
<label class="layui-form-label">验收时间</label>
|
|
61
61
|
<div class="layui-input-inline">
|
|
62
62
|
<input type="text" class="layui-input" value="<%= @follow_up.reception_at %>" name="reception_at"
|
|
63
|
-
|
|
63
|
+
id="reception_at_edit" placeholder="请选择日期">
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
66
|
<br>
|
|
67
|
+
<div class="layui-inline service_show layui-hide">
|
|
68
|
+
<label class="layui-form-label required">服务期</label>
|
|
69
|
+
<div class="layui-input-inline">
|
|
70
|
+
<input type="text" class="layui-input required" id="service_time" name="service_time" placeholder=" - " autocomplete="off" value="<%= (@follow_up.service_start_time.present? && @follow_up.service_end_time.present?) ? (@follow_up.service_start_time.to_s + ' - ' + @follow_up.service_end_time.to_s) : '' %>">
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<br class="service_show layui-hide">
|
|
67
74
|
<div class="layui-inline">
|
|
68
75
|
<label class="layui-form-label">总额(万)</label>
|
|
69
76
|
<div class="layui-input-inline">
|
|
70
77
|
<input name="total_amount" type="number" class="layui-input" value="<%= @follow_up.total_amount %>">
|
|
71
78
|
</div>
|
|
72
|
-
客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
|
|
79
|
+
客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
|
|
80
|
+
</div>
|
|
73
81
|
<br>
|
|
74
82
|
<div class="layui-inline">
|
|
75
83
|
<label class="layui-form-label">合同额(万)</label>
|
|
76
84
|
<div class="layui-input-inline">
|
|
77
|
-
|
|
85
|
+
<input name="actual_amount" type="number" class="layui-input" placeholder="本单位的签单金额" value="<%= @follow_up.actual_amount %>">
|
|
78
86
|
</div>
|
|
79
87
|
客户签给头歌的费用。合同额的生命历程:1.在中标之前,合同额都是0;2.在中标之后,实际与头歌签合同的金额。
|
|
80
88
|
</div>
|
|
@@ -146,128 +154,156 @@
|
|
|
146
154
|
</div>
|
|
147
155
|
|
|
148
156
|
<script>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
laydate.render({
|
|
160
|
-
elem: '#invitation_at_edit'
|
|
161
|
-
})
|
|
162
|
-
laydate.render({
|
|
163
|
-
elem: '#edit_year',
|
|
164
|
-
type: 'year'
|
|
165
|
-
})
|
|
157
|
+
layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'laydate', 'xmSelect'], function () {
|
|
158
|
+
var form = layui.form,
|
|
159
|
+
layer = layui.layer,
|
|
160
|
+
table = layui.table,
|
|
161
|
+
xmSelect = layui.xmSelect,
|
|
162
|
+
laytpl = layui.laytpl,
|
|
163
|
+
request = layui.request,
|
|
164
|
+
laydate = layui.laydate,
|
|
165
|
+
$ = layui.$;
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
flag =
|
|
168
|
+
<%=@follow_up&.clazz_id == EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>
|
|
169
|
+
if (flag) {
|
|
170
|
+
$(".service_show").removeClass('layui-hide')
|
|
171
|
+
}
|
|
170
172
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
paging: true,
|
|
177
|
-
pageRemote: true,
|
|
178
|
-
filterable: true,
|
|
179
|
-
remoteMethod: function (val, cb, show, pageIndex) {
|
|
180
|
-
$.ajax( '/missions/sales_staff', {
|
|
181
|
-
method: 'get',
|
|
182
|
-
data: {
|
|
183
|
-
q: val,
|
|
184
|
-
page: pageIndex
|
|
185
|
-
},
|
|
186
|
-
dataType: 'json',
|
|
187
|
-
success: function (res) {
|
|
188
|
-
var data = res.data;
|
|
189
|
-
if (res.code == 0) {
|
|
190
|
-
cb(res.data, res.count);
|
|
173
|
+
form.on('select(clazz_id)', function (data) {
|
|
174
|
+
console.log(data.value)
|
|
175
|
+
const value = data.value;
|
|
176
|
+
if (value == <%= EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>) {
|
|
177
|
+
$(".service_show").removeClass('layui-hide')
|
|
191
178
|
} else {
|
|
192
|
-
|
|
179
|
+
console.log(data.value)
|
|
180
|
+
$(".service_show").addClass('layui-hide')
|
|
193
181
|
}
|
|
194
|
-
}
|
|
195
182
|
})
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
183
|
+
|
|
184
|
+
laydate.render({
|
|
185
|
+
elem: '#invitation_at_edit'
|
|
186
|
+
})
|
|
187
|
+
laydate.render({
|
|
188
|
+
elem: '#service_time',
|
|
189
|
+
range: true
|
|
190
|
+
});
|
|
191
|
+
laydate.render({
|
|
192
|
+
elem: '#edit_year',
|
|
193
|
+
type: 'year'
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
laydate.render({
|
|
197
|
+
elem: '#reception_at_edit'
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var sales_list = xmSelect.render({
|
|
201
|
+
el: '#edit_assign_follow',
|
|
202
|
+
remoteSearch: true,
|
|
203
|
+
clickClose: true,
|
|
204
|
+
delay: 1000,
|
|
205
|
+
paging: true,
|
|
206
|
+
pageRemote: true,
|
|
207
|
+
filterable: true,
|
|
208
|
+
remoteMethod: function (val, cb, show, pageIndex) {
|
|
209
|
+
$.ajax('/missions/sales_staff', {
|
|
210
|
+
method: 'get',
|
|
211
|
+
data: {
|
|
212
|
+
q: val,
|
|
213
|
+
page: pageIndex
|
|
214
|
+
},
|
|
215
|
+
dataType: 'json',
|
|
216
|
+
success: function (res) {
|
|
217
|
+
var data = res.data;
|
|
218
|
+
if (res.code == 0) {
|
|
219
|
+
cb(res.data, res.count);
|
|
220
|
+
} else {
|
|
221
|
+
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
})
|
|
215
225
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
226
|
+
})
|
|
227
|
+
sales_list.setValue(gon.sales)
|
|
228
|
+
var places_list = xmSelect.render({
|
|
229
|
+
el: '#edit_place',
|
|
230
|
+
remoteSearch: true,
|
|
231
|
+
clickClose: true,
|
|
232
|
+
model: {
|
|
233
|
+
icon: 'hidden',
|
|
234
|
+
label: {
|
|
235
|
+
type: 'text',
|
|
236
|
+
text: {
|
|
237
|
+
//左边拼接的字符
|
|
238
|
+
left: '',
|
|
239
|
+
//右边拼接的字符
|
|
240
|
+
right: '',
|
|
241
|
+
//中间的分隔符
|
|
242
|
+
separator: ', ',
|
|
243
|
+
},
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
delay: 1000,
|
|
247
|
+
radio: true,
|
|
248
|
+
paging: true,
|
|
249
|
+
pageRemote: true,
|
|
250
|
+
filterable: true,
|
|
251
|
+
remoteMethod: function (val, cb, show, pageIndex) {
|
|
252
|
+
$.ajax('/missions/sales_place', {
|
|
253
|
+
method: 'get',
|
|
254
|
+
data: {
|
|
255
|
+
q: val,
|
|
256
|
+
page: pageIndex
|
|
257
|
+
},
|
|
258
|
+
dataType: 'json',
|
|
259
|
+
success: function (res) {
|
|
260
|
+
var data = res.data;
|
|
261
|
+
if (res.code == 0) {
|
|
262
|
+
cb(res.data, res.count);
|
|
263
|
+
} else {
|
|
264
|
+
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
})
|
|
236
268
|
}
|
|
237
|
-
}
|
|
238
269
|
})
|
|
239
|
-
|
|
240
|
-
})
|
|
241
|
-
places_list.setValue(gon.place)
|
|
270
|
+
places_list.setValue(gon.place)
|
|
242
271
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
272
|
+
form.render();
|
|
273
|
+
form.on('submit(update_follow_up)', function (data) {
|
|
274
|
+
if (data.field.clazz_id == <%= EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>) {
|
|
275
|
+
if (data.field.service_time.length == 0) {
|
|
276
|
+
layer.msg('请选择服务期', {time: 2000, icon: 2, shade: 0.01});
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
var assign_follow = [];
|
|
281
|
+
sales_list.getValue().forEach(function (d) {
|
|
282
|
+
assign_follow.push(d.value);
|
|
283
|
+
})
|
|
284
|
+
data.field.assign_follow_up = assign_follow;
|
|
285
|
+
data.field.place_id = places_list.getValue()[0].value;
|
|
286
|
+
request.authPut("missions/follow_ups/<%= @follow_up.id%>", data.field, function (res) {
|
|
287
|
+
if (res.success == false) {
|
|
288
|
+
layer.alert(res.msg)
|
|
289
|
+
} else {
|
|
290
|
+
layer.close(parent.sale_plan_edit_open);
|
|
291
|
+
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
|
292
|
+
parent.table.reload('sale_plan_follow_table')
|
|
293
|
+
parent.table.reload('businesses_table')
|
|
294
|
+
parent.table.reload('teachers_table')
|
|
295
|
+
}
|
|
296
|
+
})
|
|
262
297
|
|
|
263
298
|
|
|
264
|
-
|
|
265
|
-
|
|
299
|
+
return false;
|
|
300
|
+
});
|
|
266
301
|
|
|
267
|
-
|
|
302
|
+
});
|
|
268
303
|
</script>
|
|
269
304
|
<style>
|
|
270
|
-
.place_select xm-select > .xm-body{
|
|
271
|
-
width: 300px;
|
|
305
|
+
.place_select xm-select > .xm-body {
|
|
306
|
+
width: 300px;
|
|
307
|
+
!important;
|
|
272
308
|
}
|
|
273
309
|
</style>
|
|
@@ -15,6 +15,7 @@ json.data do
|
|
|
15
15
|
json.bidded_date d.last_follow_up&.bidded_date.to_s
|
|
16
16
|
json.signed_date d.last_follow_up&.signed_date.to_s
|
|
17
17
|
json.total_amount d.last_follow_up&.total_amount
|
|
18
|
+
json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
|
|
18
19
|
json.actual_amount d.last_follow_up&.actual_amount
|
|
19
20
|
json.return_money d.return_money
|
|
20
21
|
json.wait_return_money d.wait_return_money.to_i.round(2)
|
|
@@ -338,26 +338,32 @@
|
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
field: 'signed_date',
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
width: 105,
|
|
342
|
+
title: '签单时间',
|
|
343
343
|
sort: true
|
|
344
344
|
},
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
345
|
+
{
|
|
346
|
+
field: 'reception_at',
|
|
347
|
+
width: 105,
|
|
348
|
+
title: '验收时间',
|
|
349
|
+
sort: true
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
field: 'service_end_time',
|
|
353
|
+
width: 200,
|
|
354
|
+
title: '服务期',
|
|
355
|
+
sort: true
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
field: 'total_amount',
|
|
359
|
+
width: 100,
|
|
360
|
+
title: '总额',
|
|
361
|
+
totalRow: true,
|
|
362
|
+
sort: true
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
field: 'actual_amount',
|
|
366
|
+
width: 100,
|
|
361
367
|
title: '合同额',
|
|
362
368
|
totalRow: true,
|
|
363
369
|
sort: true
|
|
@@ -17,6 +17,7 @@ json.data do
|
|
|
17
17
|
json.reception_at d.last_follow_up&.reception_at.to_s
|
|
18
18
|
json.bidded_date d.last_follow_up&.bidded_date.to_s
|
|
19
19
|
json.signed_date d.last_follow_up&.signed_date.to_s
|
|
20
|
+
json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
|
|
20
21
|
json.year d.last_follow_up&.year.to_s
|
|
21
22
|
json.total_amount d.last_follow_up&.total_amount
|
|
22
23
|
json.actual_amount d.last_follow_up&.actual_amount
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
<label class="layui-form-label required">项目类型</label>
|
|
20
20
|
<%if @last_follow_up&.clazz&.name == @o_name %>
|
|
21
21
|
<div class="layui-input-inline">
|
|
22
|
-
<%= select_tag "clazz_id", options_for_select([[@o_name,EducodeSales::Common.find_by(name: @o_name).id]])
|
|
22
|
+
<%= select_tag "clazz_id", options_for_select([[@o_name, EducodeSales::Common.find_by(name: @o_name).id]]), { 'lay-filter': 'clazz_id', class: 'required', :disabled => true } %>
|
|
23
23
|
</div>
|
|
24
24
|
<%else %>
|
|
25
25
|
<div class="layui-input-inline">
|
|
26
|
-
<%= select_tag "clazz_id", options_for_select(@clazz, @last_follow_up&.clazz_id), class: 'required' %>
|
|
26
|
+
<%= select_tag "clazz_id", options_for_select(@clazz, @last_follow_up&.clazz_id), { 'lay-filter': 'clazz_id', class: 'required', } %>
|
|
27
27
|
</div>
|
|
28
28
|
<%end %>
|
|
29
29
|
</div>
|
|
@@ -64,23 +64,31 @@
|
|
|
64
64
|
<div class="layui-input-inline">
|
|
65
65
|
<input type="text" class="layui-input" name="reception_at" autocomplete="off" id="reception_at_add"
|
|
66
66
|
value="<%= @last_follow_up&.reception_at%>"
|
|
67
|
-
|
|
67
|
+
placeholder="请选择日期">
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
70
|
<br>
|
|
71
|
+
<div class="layui-inline service_show layui-hide">
|
|
72
|
+
<label class="layui-form-label required">服务期</label>
|
|
73
|
+
<div class="layui-input-inline">
|
|
74
|
+
<input type="text" class="layui-input required" id="service_time" name="service_time" placeholder=" - " autocomplete="off">
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<br class="service_show layui-hide">
|
|
71
78
|
<div class="layui-inline">
|
|
72
79
|
<label class="layui-form-label">总额(万)</label>
|
|
73
80
|
<div class="layui-input-inline">
|
|
74
81
|
<input name="total_amount" type="number" class="layui-input" autocomplete="off"
|
|
75
|
-
|
|
82
|
+
value="<%= @last_follow_up&.total_amount %>">
|
|
76
83
|
</div>
|
|
77
|
-
客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
|
|
84
|
+
客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
|
|
85
|
+
</div>
|
|
78
86
|
<br>
|
|
79
87
|
<div class="layui-inline">
|
|
80
88
|
<label class="layui-form-label">合同额(万)</label>
|
|
81
89
|
<div class="layui-input-inline">
|
|
82
90
|
<input name="actual_amount" type="number" class="layui-input" autocomplete="off" placeholder="本单位的签单金额"
|
|
83
|
-
|
|
91
|
+
value="<%= @last_follow_up&.actual_amount %>">
|
|
84
92
|
</div>
|
|
85
93
|
客户签给头歌的费用。合同额的生命历程:1.在中标之前,合同额都是0;2.在中标之后,实际与头歌签合同的金额。
|
|
86
94
|
</div>
|
|
@@ -150,132 +158,161 @@
|
|
|
150
158
|
</div>
|
|
151
159
|
|
|
152
160
|
<script>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'laydate', 'xmSelect'], function () {
|
|
162
|
+
var form = layui.form,
|
|
163
|
+
layer = layui.layer,
|
|
164
|
+
table = layui.table,
|
|
165
|
+
laytpl = layui.laytpl,
|
|
166
|
+
request = layui.request,
|
|
167
|
+
laydate = layui.laydate,
|
|
168
|
+
xmSelect = layui.xmSelect,
|
|
169
|
+
$ = layui.$;
|
|
162
170
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
elem: '#invitation_at_add'
|
|
169
|
-
})
|
|
171
|
+
flag =
|
|
172
|
+
<%=@last_follow_up&.clazz&.name == @o_name %>
|
|
173
|
+
if (flag) {
|
|
174
|
+
$(".service_show").removeClass('layui-hide')
|
|
175
|
+
}
|
|
170
176
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
} else {
|
|
195
|
-
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
196
|
-
}
|
|
177
|
+
form.on('select(clazz_id)', function (data) {
|
|
178
|
+
console.log(data.value)
|
|
179
|
+
const value = data.value;
|
|
180
|
+
if (value == <%= EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>) {
|
|
181
|
+
$(".service_show").removeClass('layui-hide')
|
|
182
|
+
} else {
|
|
183
|
+
console.log(data.value)
|
|
184
|
+
$(".service_show").addClass('layui-hide')
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
laydate.render({
|
|
189
|
+
elem: '#service_time',
|
|
190
|
+
range: true
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
laydate.render({
|
|
194
|
+
elem: '#year',
|
|
195
|
+
type: 'year'
|
|
196
|
+
})
|
|
197
|
+
laydate.render({
|
|
198
|
+
elem: '#invitation_at_add'
|
|
199
|
+
})
|
|
197
200
|
|
|
201
|
+
laydate.render({
|
|
202
|
+
elem: '#reception_at_add'
|
|
203
|
+
});
|
|
204
|
+
var sales_list = xmSelect.render({
|
|
205
|
+
el: '#assign_follow',
|
|
206
|
+
remoteSearch: true,
|
|
207
|
+
clickClose: true,
|
|
208
|
+
delay: 1000,
|
|
209
|
+
paging: true,
|
|
210
|
+
pageRemote: true,
|
|
211
|
+
filterable: true,
|
|
212
|
+
remoteMethod: function (val, cb, show, pageIndex) {
|
|
213
|
+
$.ajax('/missions/sales_staff', {
|
|
214
|
+
method: 'get',
|
|
215
|
+
data: {
|
|
216
|
+
q: val,
|
|
217
|
+
page: pageIndex
|
|
218
|
+
},
|
|
219
|
+
dataType: 'json',
|
|
220
|
+
success: function (res) {
|
|
221
|
+
var data = res.data;
|
|
222
|
+
if (res.code == 0) {
|
|
223
|
+
cb(res.data, res.count);
|
|
224
|
+
} else {
|
|
225
|
+
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
}
|
|
229
|
+
})
|
|
198
230
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
separator: ', ',
|
|
216
|
-
},
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
clickClose: true,
|
|
220
|
-
delay: 1000,
|
|
221
|
-
paging: true,
|
|
222
|
-
radio: true,
|
|
223
|
-
pageRemote: true,
|
|
224
|
-
filterable: true,
|
|
225
|
-
remoteMethod: function (val, cb, show, pageIndex) {
|
|
226
|
-
$.ajax( '/missions/sales_place', {
|
|
227
|
-
method: 'get',
|
|
228
|
-
data: {
|
|
229
|
-
q: val,
|
|
230
|
-
page: pageIndex
|
|
231
|
-
},
|
|
232
|
-
dataType: 'json',
|
|
233
|
-
success: function (res) {
|
|
234
|
-
var data = res.data;
|
|
235
|
-
if (res.code == 0) {
|
|
236
|
-
cb(res.data, res.count);
|
|
237
|
-
} else {
|
|
238
|
-
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
231
|
+
})
|
|
232
|
+
var place_list = xmSelect.render({
|
|
233
|
+
el: '#place',
|
|
234
|
+
remoteSearch: true,
|
|
235
|
+
model: {
|
|
236
|
+
icon: 'hidden',
|
|
237
|
+
label: {
|
|
238
|
+
type: 'text',
|
|
239
|
+
text: {
|
|
240
|
+
//左边拼接的字符
|
|
241
|
+
left: '',
|
|
242
|
+
//右边拼接的字符
|
|
243
|
+
right: '',
|
|
244
|
+
//中间的分隔符
|
|
245
|
+
separator: ', ',
|
|
246
|
+
},
|
|
239
247
|
}
|
|
248
|
+
},
|
|
249
|
+
clickClose: true,
|
|
250
|
+
delay: 1000,
|
|
251
|
+
paging: true,
|
|
252
|
+
radio: true,
|
|
253
|
+
pageRemote: true,
|
|
254
|
+
filterable: true,
|
|
255
|
+
remoteMethod: function (val, cb, show, pageIndex) {
|
|
256
|
+
$.ajax('/missions/sales_place', {
|
|
257
|
+
method: 'get',
|
|
258
|
+
data: {
|
|
259
|
+
q: val,
|
|
260
|
+
page: pageIndex
|
|
261
|
+
},
|
|
262
|
+
dataType: 'json',
|
|
263
|
+
success: function (res) {
|
|
264
|
+
var data = res.data;
|
|
265
|
+
if (res.code == 0) {
|
|
266
|
+
cb(res.data, res.count);
|
|
267
|
+
} else {
|
|
268
|
+
layer.msg(res.msg, {time: 2000, icon: 2, shade: 0.01});
|
|
269
|
+
}
|
|
240
270
|
|
|
271
|
+
}
|
|
272
|
+
})
|
|
241
273
|
}
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
})
|
|
274
|
+
})
|
|
245
275
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
276
|
+
sales_list.setValue(gon.sales);
|
|
277
|
+
place_list.setValue(gon.place);
|
|
278
|
+
form.render();
|
|
249
279
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
280
|
+
form.on('submit(add_follow_up)', function (data) {
|
|
281
|
+
if (data.field.clazz_id == <%= EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>) {
|
|
282
|
+
if (data.field.service_time.length == 0) {
|
|
283
|
+
layer.msg('请选择服务期', {time: 2000, icon: 2, shade: 0.01});
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
$(".submit-btn").addClass("layui-hide");
|
|
288
|
+
var assign_follow = [];
|
|
289
|
+
sales_list.getValue().forEach(function (d) {
|
|
290
|
+
assign_follow.push(d.value);
|
|
291
|
+
})
|
|
292
|
+
data.field.assign_follow_up = assign_follow;
|
|
293
|
+
data.field.business_id = "<%= @business.id %>";
|
|
294
|
+
data.field.place_id = place_list.getValue('valueStr');
|
|
295
|
+
request.authPost("missions/follow_ups", data.field, function (res) {
|
|
296
|
+
if (res.success == false) {
|
|
297
|
+
layer.alert(res.msg)
|
|
298
|
+
} else {
|
|
299
|
+
layer.close(parent.sale_plan_index);
|
|
300
|
+
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
|
301
|
+
parent.table.reload('sale_plan_follow_table')
|
|
302
|
+
parent.table.reload('businesses_table')
|
|
303
|
+
parent.table.reload('teachers_table')
|
|
304
|
+
}
|
|
305
|
+
})
|
|
270
306
|
|
|
271
307
|
|
|
272
|
-
|
|
273
|
-
|
|
308
|
+
return false;
|
|
309
|
+
});
|
|
274
310
|
|
|
275
|
-
|
|
311
|
+
});
|
|
276
312
|
</script>
|
|
277
313
|
<style>
|
|
278
|
-
.new_place_select xm-select > .xm-body{
|
|
279
|
-
width: 300px;
|
|
314
|
+
.new_place_select xm-select > .xm-body {
|
|
315
|
+
width: 300px;
|
|
316
|
+
!important;
|
|
280
317
|
}
|
|
281
318
|
</style>
|
|
@@ -163,26 +163,31 @@
|
|
|
163
163
|
width: 110,
|
|
164
164
|
title: '中标时间',
|
|
165
165
|
},
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
166
|
+
{
|
|
167
|
+
field: 'signed_date',
|
|
168
|
+
width: 110,
|
|
169
|
+
title: '签单时间',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
field: 'reception_at',
|
|
173
|
+
width: 110,
|
|
174
|
+
title: '验收时间',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
field: 'service_end_time',
|
|
178
|
+
width: 200,
|
|
179
|
+
title: '服务期',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
field: 'total_amount',
|
|
183
|
+
width: 100,
|
|
184
|
+
title: '总额',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
field: 'actual_amount',
|
|
188
|
+
width: 100,
|
|
189
|
+
title: '合同额',
|
|
190
|
+
},
|
|
186
191
|
{
|
|
187
192
|
field: 'divide_amount',
|
|
188
193
|
width: 100,
|
|
@@ -9,6 +9,7 @@ json.data do
|
|
|
9
9
|
json.reception_at d.reception_at&.to_s(:date)
|
|
10
10
|
json.bidded_date d.bidded_date&.to_s(:date)
|
|
11
11
|
json.signed_date d.signed_date&.to_s(:date)
|
|
12
|
+
json.service_end_time (d.service_start_time.present? && d.service_end_time.present?) ? (d.service_start_time&.to_s + "-" + d.service_end_time&.to_s) : ''
|
|
12
13
|
json.total_amount d.total_amount
|
|
13
14
|
json.actual_amount d.actual_amount
|
|
14
15
|
json.divide_amount d.divide_amount ? d.divide_amount : ""
|
|
@@ -49,7 +49,14 @@
|
|
|
49
49
|
<div class="layui-inline">
|
|
50
50
|
<label class="layui-form-label">验收时间:</label>
|
|
51
51
|
<div class="layui-input-inline">
|
|
52
|
-
|
|
52
|
+
<%= @follow_up.reception_at.to_s %>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<br>
|
|
56
|
+
<div class="layui-inline">
|
|
57
|
+
<label class="layui-form-label">服务期:</label>
|
|
58
|
+
<div class="layui-input-inline">
|
|
59
|
+
<%= @follow_up.service_start_time.to_s + "-" + @follow_up.service_end_time.to_s %>
|
|
53
60
|
</div>
|
|
54
61
|
</div>
|
|
55
62
|
<br>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<div class="layuimini-main" style="height: 100%;">
|
|
2
|
+
|
|
3
|
+
<div class="layui-form layuimini-form" lay-filter="common_edit">
|
|
4
|
+
<fieldset class="table-search-fieldset">
|
|
5
|
+
<legend>添加字典</legend>
|
|
6
|
+
<div class="layui-form-item">
|
|
7
|
+
<label class="layui-form-label required">字典名称</label>
|
|
8
|
+
<div class="layui-input-block">
|
|
9
|
+
<%= select_tag"clazz" ,
|
|
10
|
+
options_for_select(EducodeSales::Common.clazzs.map{|d| d },
|
|
11
|
+
EducodeSales::Common.clazzs[@common.clazz]), {'lay-filter': 'clazz',
|
|
12
|
+
disabled: true} %>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="layui-form-item">
|
|
16
|
+
<label class="layui-form-label required">选项名称</label>
|
|
17
|
+
<div class="layui-input-block">
|
|
18
|
+
<input type="text" name="name" autocomplete="off" lay-verify="required" lay-reqtext="选项名称不能为空" placeholder="请输入选项名称" value="" class="layui-input">
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<hr>
|
|
22
|
+
<div class="layui-form-item">
|
|
23
|
+
<div class="layui-input-block">
|
|
24
|
+
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确定添加</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</fieldset>
|
|
28
|
+
<h4 class="m-t-10">选项列表</h4>
|
|
29
|
+
<table class="layui-hide" id="edit_table" lay-filter="edit_table"></table>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<script type="text/html" id="edit_currentTableBar">
|
|
33
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">保存</a>
|
|
34
|
+
</script>
|
|
35
|
+
<script>
|
|
36
|
+
layui.use(['form', 'table', 'upload', 'laytpl', 'request'], function() {
|
|
37
|
+
var form = layui.form,
|
|
38
|
+
layer = layui.layer,
|
|
39
|
+
table = layui.table,
|
|
40
|
+
laytpl = layui.laytpl,
|
|
41
|
+
request = layui.request,
|
|
42
|
+
$ = layui.$;
|
|
43
|
+
|
|
44
|
+
form.render();
|
|
45
|
+
|
|
46
|
+
// 当前弹出层,防止ID被覆盖
|
|
47
|
+
var parentIndex = layer.index;
|
|
48
|
+
|
|
49
|
+
//监听提交
|
|
50
|
+
form.on('submit(saveBtn)', function(data) {
|
|
51
|
+
|
|
52
|
+
request.authPost("missions/commons", data.field, function(res) {
|
|
53
|
+
if (res.success == false) {
|
|
54
|
+
layer.alert(res.msg)
|
|
55
|
+
} else {
|
|
56
|
+
layer.alert('添加成功')
|
|
57
|
+
form.val('common_edit', {
|
|
58
|
+
'name': ''
|
|
59
|
+
})
|
|
60
|
+
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
|
61
|
+
parent.table.reload('table')
|
|
62
|
+
table.reload('edit_table')
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
return false;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
table.render({
|
|
69
|
+
elem: '#edit_table',
|
|
70
|
+
url: '/missions/commons/' + parent.commont_id,
|
|
71
|
+
cols: [
|
|
72
|
+
[{
|
|
73
|
+
field: 'id',
|
|
74
|
+
width: 80,
|
|
75
|
+
title:'序号',type: 'numbers',
|
|
76
|
+
sort: true
|
|
77
|
+
}, {
|
|
78
|
+
field: 'name',
|
|
79
|
+
width: 300,
|
|
80
|
+
title: '选项名称',
|
|
81
|
+
edit: true
|
|
82
|
+
}, {
|
|
83
|
+
field: 'position',
|
|
84
|
+
width: 100,
|
|
85
|
+
title: '位置',
|
|
86
|
+
edit: true
|
|
87
|
+
}, {
|
|
88
|
+
title: '操作',
|
|
89
|
+
minWidth: 150,
|
|
90
|
+
toolbar: '#edit_currentTableBar',
|
|
91
|
+
}]
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
table.on('tool(edit_table)', function (obj) {
|
|
96
|
+
var data = obj.data;
|
|
97
|
+
if (obj.event === 'edit') {
|
|
98
|
+
request.authPut('missions/commons/' + data.id, data,
|
|
99
|
+
function(res) {
|
|
100
|
+
if (res.success) {
|
|
101
|
+
table.reload('edit_table')
|
|
102
|
+
} else {
|
|
103
|
+
layer.alert(res.msg)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
});
|
|
111
|
+
</script>
|
|
File without changes
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<div class="layuimini-main" style="height: 100%;">
|
|
2
|
+
|
|
3
|
+
<div class="layui-form layuimini-form">
|
|
4
|
+
<div class="layui-form-item">
|
|
5
|
+
<label class="layui-form-label required">字典名称</label>
|
|
6
|
+
<div class="layui-input-block">
|
|
7
|
+
<%= select_tag "clazz", options_for_select(EducodeSales::Common.clazzs.map{|d| d }), {'lay-filter': 'clazz'} %>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="layui-form-item">
|
|
11
|
+
<label class="layui-form-label required">选项名称</label>
|
|
12
|
+
<div class="layui-input-block">
|
|
13
|
+
<input type="text" name="name" autocomplete="off" lay-verify="required" lay-reqtext="选项名称不能为空"
|
|
14
|
+
placeholder="请输入选项名称" value="" class="layui-input">
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<hr>
|
|
18
|
+
<div class="layui-form-item">
|
|
19
|
+
<div class="layui-input-block">
|
|
20
|
+
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
layui.use(['form', 'table', 'upload', 'laytpl', 'request'], function () {
|
|
28
|
+
var form = layui.form,
|
|
29
|
+
layer = layui.layer,
|
|
30
|
+
table = layui.table,
|
|
31
|
+
laytpl = layui.laytpl,
|
|
32
|
+
request = layui.request,
|
|
33
|
+
$ = layui.$;
|
|
34
|
+
|
|
35
|
+
form.render();
|
|
36
|
+
|
|
37
|
+
// 当前弹出层,防止ID被覆盖
|
|
38
|
+
var parentIndex = layer.index;
|
|
39
|
+
|
|
40
|
+
//监听提交
|
|
41
|
+
form.on('submit(saveBtn)', function (data) {
|
|
42
|
+
|
|
43
|
+
request.authPost("/missions/commons", data.field, function(res) {
|
|
44
|
+
if (res.success == false) {
|
|
45
|
+
alert(res.msg)
|
|
46
|
+
} else {
|
|
47
|
+
layer.close(parent.index);
|
|
48
|
+
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
|
49
|
+
parent.table.reload('table')
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
return false;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
});
|
|
58
|
+
</script>
|
|
@@ -84,13 +84,19 @@
|
|
|
84
84
|
<% if can? :read, EducodeSales::SalePlan %>
|
|
85
85
|
<dd><a href="/missions/plans" class="<%= current?('layui-this', plans_path) %>"><i style="padding-right: 35px"></i><%= image_tag "educode_sales/6.销售计划.png",size:"15"%><i style="font-size: 25px; padding-right: 15px"></i>销售计划</a></dd>
|
|
86
86
|
<% end %>
|
|
87
|
+
<!-- <dd>-->
|
|
88
|
+
<!-- <a href="/missions/results" class="<%#= current?('layui-this', results_path) %>"><i style="padding-right: 35px"></i><%#= image_tag "educode_sales/6.销售计划.png", size: "15" %>-->
|
|
89
|
+
<!-- <i style="font-size: 25px; padding-right: 15px"></i>绩效考核</a></dd>-->
|
|
87
90
|
<% if @current_admin.is_admin %>
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
<dd>
|
|
92
|
+
<a href="/missions/recycles" class="<%= current?('layui-this', recycles_path) %>"><i style="padding-right: 35px"></i><%= image_tag "educode_sales/回收站.png", size: "15" %>
|
|
93
|
+
<i style="font-size: 25px; padding-right: 15px"></i>回收站</a></dd>
|
|
94
|
+
<% end %>
|
|
90
95
|
</dl>
|
|
91
96
|
</li>
|
|
92
97
|
<li class="layui-nav-item layui-nav-itemed menu-li">
|
|
93
|
-
<a class="" href="javascript:;"><b><%= image_tag "educode_sales/7.运营活动.png",size:"15"
|
|
98
|
+
<a class="" href="javascript:;"><b><%= image_tag "educode_sales/7.运营活动.png", size: "15" %>
|
|
99
|
+
<i style="font-size: 25px; padding-right: 25px"></i>运营活动</b></a>
|
|
94
100
|
<dl class="layui-nav-child">
|
|
95
101
|
<% if can? :read, EducodeSales::OperationTrend %>
|
|
96
102
|
<dd>
|
data/config/routes.rb
CHANGED
|
@@ -162,7 +162,6 @@ EducodeSales::Engine.routes.draw do
|
|
|
162
162
|
end
|
|
163
163
|
end
|
|
164
164
|
|
|
165
|
-
|
|
166
165
|
resources :import_teachers
|
|
167
166
|
|
|
168
167
|
resources :upload_files do
|
|
@@ -173,6 +172,13 @@ EducodeSales::Engine.routes.draw do
|
|
|
173
172
|
member do
|
|
174
173
|
end
|
|
175
174
|
end
|
|
175
|
+
resources :results do
|
|
176
|
+
collection do
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
member do
|
|
180
|
+
end
|
|
181
|
+
end
|
|
176
182
|
|
|
177
183
|
resources :teachers do
|
|
178
184
|
collection do
|
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.7.
|
|
4
|
+
version: 0.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- anke1460
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -153,6 +153,7 @@ files:
|
|
|
153
153
|
- app/controllers/educode_sales/places_controller.rb
|
|
154
154
|
- app/controllers/educode_sales/plans_controller.rb
|
|
155
155
|
- app/controllers/educode_sales/recycles_controller.rb
|
|
156
|
+
- app/controllers/educode_sales/results_controller.rb
|
|
156
157
|
- app/controllers/educode_sales/roles_controller.rb
|
|
157
158
|
- app/controllers/educode_sales/sale_reports_controller.rb
|
|
158
159
|
- app/controllers/educode_sales/sale_trends_controller.rb
|
|
@@ -196,6 +197,7 @@ files:
|
|
|
196
197
|
- app/models/educode_sales/place.rb
|
|
197
198
|
- app/models/educode_sales/place_area.rb
|
|
198
199
|
- app/models/educode_sales/recycle.rb
|
|
200
|
+
- app/models/educode_sales/result.rb
|
|
199
201
|
- app/models/educode_sales/role.rb
|
|
200
202
|
- app/models/educode_sales/role_area.rb
|
|
201
203
|
- app/models/educode_sales/role_permission.rb
|
|
@@ -329,6 +331,11 @@ files:
|
|
|
329
331
|
- app/views/educode_sales/recycles/monthly.json.jbuilder
|
|
330
332
|
- app/views/educode_sales/recycles/weekPlan.json.jbuilder
|
|
331
333
|
- app/views/educode_sales/recycles/weekly.json.jbuilder
|
|
334
|
+
- app/views/educode_sales/results/edit.html.erb
|
|
335
|
+
- app/views/educode_sales/results/index.html.erb
|
|
336
|
+
- app/views/educode_sales/results/index.json.jbuilder
|
|
337
|
+
- app/views/educode_sales/results/new.html.erb
|
|
338
|
+
- app/views/educode_sales/results/show.json.jbuilder
|
|
332
339
|
- app/views/educode_sales/roles/edit.html.erb
|
|
333
340
|
- app/views/educode_sales/roles/index.html.erb
|
|
334
341
|
- app/views/educode_sales/roles/index.json.jbuilder
|
|
@@ -422,6 +429,8 @@ files:
|
|
|
422
429
|
- db/migrate/20220121060006_create_educode_sales_business_export_records.rb
|
|
423
430
|
- db/migrate/20220125013811_create_educode_sales_staff_schools.rb
|
|
424
431
|
- db/migrate/20220125033552_create_educode_sales_customer_adds.rb
|
|
432
|
+
- db/migrate/20220314053856_add_service_start_time_to_follow_ups.rb
|
|
433
|
+
- db/migrate/20220314074354_add_service_time_long_to_follow_ups.rb
|
|
425
434
|
- lib/educode_sales.rb
|
|
426
435
|
- lib/educode_sales/engine.rb
|
|
427
436
|
- lib/educode_sales/version.rb
|