app/views/educode_sales/staffs/edit.html.erb in educode_sales-0.9.40 vs app/views/educode_sales/staffs/edit.html.erb in educode_sales-0.9.41
- old
+ new
@@ -33,11 +33,19 @@
<div class="layui-form-item" >
<label class="layui-form-label">监管学校</label>
<div class="layui-input-inline" style="">
<div id="edit_assign_follow" style="width: 1140px;"></div>
</div>
+ </div>
+ <% if can?(:special, EducodeSales::Business) %>
+ <div class="layui-form-item">
+ <label class="layui-form-label">专项客户类型</label>
+ <div class="layui-input-inline">
+ <div id="school_properties" style="width: 600px;"></div>
</div>
+ </div>
+ <% end %>
<div class="layui-form-item">
<label class="layui-form-label required">生效日期</label>
<div class="layui-input-block">
<input type="text" id="day" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="生效日期不能为空"
name="enabled_at" value="<%= @staff.enabled_at&.to_s(:date) %>" placeholder="">
@@ -76,12 +84,18 @@
form.render();
laydate.render({
elem: '#day'
});
+ if (document.getElementById("school_properties")) {
+ var school_properties_list = xmSelect.render({
+ el: '#school_properties',
+ data: gon.school_properties,
+ filterable: true,
+ })
+ }
-
var parentIndex = layer.index;
transfer.render({
elem: '#area',
data: gon.areas,
id: 'area_list',
@@ -134,11 +148,18 @@
})
var schools = [];
sales_list.getValue().forEach(function(d) {
schools.push(d.value);
})
+ var tag_ids = [];
+ if (document.getElementById("school_properties")) {
+ school_properties_list.getValue().forEach(function(d) {
+ tag_ids.push(d.value);
+ })
+ }
data.field['school_ids'] = schools;
data.field['area_ids'] = area_ids;
+ data.field['school_tag_ids'] = tag_ids;
request.authPut("missions/staffs/" + parent.staff_id, data.field, function (res) {
console.log(res.success == false)
if (res.success == false) {
layer.alert(res.msg)
} else {
\ No newline at end of file