educode_sales 0.5.3 → 0.5.4
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/sale_trends_controller.rb +6 -6
- data/app/views/educode_sales/businesses/edit_follow_record.html.erb +3 -3
- data/app/views/educode_sales/businesses/file.html.erb +1 -1
- data/app/views/educode_sales/businesses/new_follow_record.html.erb +1 -1
- data/app/views/educode_sales/businesses/show_follow_record.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/trends.html.erb +3 -16
- data/lib/educode_sales/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 660c43183c6a1edf9d5aab4b549bce9d2b68edf789010d85379198372be1a120
|
4
|
+
data.tar.gz: 28beeb3a7026076f4e6da6dc966bf75523e7be06717b787041d2e14500902532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7f6b1515f819aac77b135ba6d52a3562c4fef76d650fd1a74c44bf3dcaffacc41ec34e1623337538a36bf40cff2591d14d40e83575cd7920a69fcfadb5662c4
|
7
|
+
data.tar.gz: ff102c87e89e482809f4b8e84e0f27c5f42a3dd22863f6ebfe0a4fd115eae1d026de70cd738c5b0d83e9e3ab78aee3a276eb0fed4f6a66c467ab8926c7737ed2
|
@@ -171,10 +171,10 @@ module EducodeSales
|
|
171
171
|
label: name[0],
|
172
172
|
data: dates.map{ |d| @follow_up = FollowUp.where(staff_id: name[1], created_at: d.beginning_of_day..d.end_of_day).where.not(business: x_business_ids).count },
|
173
173
|
backgroundColor: "#fff",
|
174
|
-
pointBorderColor:
|
174
|
+
pointBorderColor: colors[names.index(name)%15],
|
175
175
|
borderColor: colors[names.index(name)%15],
|
176
176
|
pointBackgroundColor: colors[names.index(name)%15],
|
177
|
-
borderWidth:
|
177
|
+
borderWidth: 4
|
178
178
|
}
|
179
179
|
end
|
180
180
|
}
|
@@ -188,10 +188,10 @@ module EducodeSales
|
|
188
188
|
label: name[0],
|
189
189
|
data: dates.map { |d| @follow_up = FollowUp.where( staff_id: name[1]).where("created_at >= ? AND created_at <= ?", "#{d}-01", "#{d}-31").where.not(business: x_business_ids).count },
|
190
190
|
backgroundColor: "#fff",
|
191
|
-
pointBorderColor:
|
191
|
+
pointBorderColor: colors[names.index(name)%15],
|
192
192
|
borderColor: colors[names.index(name)%15],
|
193
193
|
pointBackgroundColor: colors[names.index(name)%15],
|
194
|
-
borderWidth:
|
194
|
+
borderWidth: 4,
|
195
195
|
}
|
196
196
|
end
|
197
197
|
}
|
@@ -205,10 +205,10 @@ module EducodeSales
|
|
205
205
|
label: name[0],
|
206
206
|
data: dates.map { |d| @follow_up = FollowUp.where( staff_id: name[1]).where("created_at >= ? AND created_at <= ?", "#{d}-01-01", "#{d}-12-31").where.not(business: x_business_ids).count },
|
207
207
|
backgroundColor: "#fff",
|
208
|
-
pointBorderColor:
|
208
|
+
pointBorderColor: colors[names.index(name)%15],
|
209
209
|
borderColor: colors[names.index(name)%15],
|
210
210
|
pointBackgroundColor: colors[names.index(name)%15],
|
211
|
-
borderWidth:
|
211
|
+
borderWidth: 4
|
212
212
|
}
|
213
213
|
end
|
214
214
|
}
|
@@ -65,13 +65,13 @@
|
|
65
65
|
</div>
|
66
66
|
<br>
|
67
67
|
<div class="layui-inline">
|
68
|
-
<label class="layui-form-label"
|
68
|
+
<label class="layui-form-label">总额(万)</label>
|
69
69
|
<div class="layui-input-inline">
|
70
70
|
<input name="total_amount" type="number" class="layui-input" value="<%= @follow_up.total_amount %>">
|
71
71
|
</div>
|
72
72
|
</div>
|
73
73
|
<div class="layui-inline">
|
74
|
-
<label class="layui-form-label"
|
74
|
+
<label class="layui-form-label">合同额(万)</label>
|
75
75
|
<div class="layui-input-inline">
|
76
76
|
<input name="actual_amount" type="number" class="layui-input" placeholder="本单位的签单金额" value="<%= @follow_up.actual_amount %>">
|
77
77
|
</div>
|
@@ -84,7 +84,7 @@
|
|
84
84
|
</div>
|
85
85
|
</div>
|
86
86
|
<div class="layui-inline">
|
87
|
-
<label class="layui-form-label"
|
87
|
+
<label class="layui-form-label">渠道分成(万)</label>
|
88
88
|
<div class="layui-input-inline">
|
89
89
|
<input name="divide_amount" class="layui-input" value="<%= @follow_up.divide_amount%>">
|
90
90
|
</div>
|
@@ -126,7 +126,7 @@
|
|
126
126
|
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机
|
127
127
|
});
|
128
128
|
}else if (data.content_type.split("/")[1] === "pdf"){
|
129
|
-
var pdf = '/images/
|
129
|
+
var pdf = '/images/educode_sales/' + name;
|
130
130
|
console.log(pdf);
|
131
131
|
var openWH = miniPage.getOpenWidthHeight();
|
132
132
|
layer.open({
|
@@ -90,7 +90,7 @@
|
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
<div class="layui-inline">
|
93
|
-
<label class="layui-form-label"
|
93
|
+
<label class="layui-form-label">渠道分成(万)</label>
|
94
94
|
<div class="layui-input-inline">
|
95
95
|
<input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount%>">
|
96
96
|
</div>
|
@@ -189,7 +189,7 @@
|
|
189
189
|
<div class="layui-input-inline">
|
190
190
|
<input type="text" class="layui-input month layui-hide" id="date_month" name="date_month" placeholder=" - " value="<%=params[:date_month] %>" >
|
191
191
|
<input type="text" class="layui-input year layui-hide" id="date_year" name="date_year" placeholder=" - " value="<%=params[:date_year] %>">
|
192
|
-
<input type="text" class="layui-input day" id="date" name="date" placeholder=" - " value="<%=params[:date] %>">
|
192
|
+
<input type="text" class="layui-input day" id="date" name="date" placeholder=" - " value="<%=params[:date].present? ? params[:date] : (Time.now - 7.days).to_s(:date) + ' - ' + Time.now.to_s(:date) %>">
|
193
193
|
</div>
|
194
194
|
</div>
|
195
195
|
<div class="layui-inline">
|
@@ -223,7 +223,7 @@
|
|
223
223
|
<div class="layui-inline">
|
224
224
|
<label class="layui-form-label">时间范围</label>
|
225
225
|
<div class="layui-input-inline">
|
226
|
-
<input type="text" class="layui-input goal_month " id="goal_date_month" name="goal_date_month" placeholder=" - " value="<%=params[:goal_date_month] %>">
|
226
|
+
<input type="text" class="layui-input goal_month " id="goal_date_month" name="goal_date_month" placeholder=" - " value="<%=params[:goal_date_month].present? ? params[:goal_date_month] : Time.now.year.to_s + "-01" + " - " + Time.now.strftime("%Y-%m") %>">
|
227
227
|
<input type="text" class="layui-input goal_year layui-hide" id="goal_date_year" name="goal_date_year" placeholder=" - " value="<%=params[:goal_date_year] %>">
|
228
228
|
</div>
|
229
229
|
</div>
|
@@ -264,13 +264,12 @@
|
|
264
264
|
$(document).ready(function () {
|
265
265
|
$(".follow_count_bt").click(function () {
|
266
266
|
layer.msg("图表绘制中...", {
|
267
|
-
time: 0, //不自动关闭
|
268
267
|
offset:['40%','46%']
|
269
268
|
})
|
270
269
|
layer.load(0, {});
|
271
270
|
setTimeout(function () {
|
272
271
|
layer.closeAll('loading');
|
273
|
-
},
|
272
|
+
}, 3000);
|
274
273
|
});
|
275
274
|
});
|
276
275
|
if(follow_type == "day"){
|
@@ -328,43 +327,31 @@
|
|
328
327
|
// 时间选择器
|
329
328
|
laydate.render({
|
330
329
|
elem: '#date',
|
331
|
-
min: -15
|
332
|
-
,max: 0,
|
333
330
|
range: true
|
334
331
|
});
|
335
332
|
laydate.render({
|
336
333
|
type: 'week',
|
337
334
|
elem: '#date_week',
|
338
|
-
min: -90
|
339
|
-
,max: 0,
|
340
335
|
range: true
|
341
336
|
});
|
342
337
|
laydate.render({
|
343
338
|
type: 'month',
|
344
339
|
elem: '#date_month',
|
345
|
-
min: -365
|
346
|
-
,max: 0,
|
347
340
|
range: true
|
348
341
|
});
|
349
342
|
laydate.render({
|
350
343
|
type: 'year',
|
351
344
|
elem: '#date_year',
|
352
|
-
min: -3660
|
353
|
-
,max: 0,
|
354
345
|
range: true
|
355
346
|
});
|
356
347
|
laydate.render({
|
357
348
|
type: 'year',
|
358
349
|
elem: '#goal_date_year',
|
359
|
-
min: -3660
|
360
|
-
,max: 0,
|
361
350
|
range: true
|
362
351
|
});
|
363
352
|
laydate.render({
|
364
353
|
type: 'month',
|
365
354
|
elem: '#goal_date_month',
|
366
|
-
min: -365
|
367
|
-
,max: 0,
|
368
355
|
range: true
|
369
356
|
});
|
370
357
|
|