init project

This commit is contained in:
Jasder
2020-03-09 00:40:16 +08:00
commit 2937b2a94d
6549 changed files with 7215173 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<div class="modal fade admin-add-salesman-customer-user-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">添加客户</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="admin-add-salesman-user-form">
<%= hidden_field_tag(:salesman_id, nil) %>
<div class="form-group d-flex">
<label class="col-form-label">姓名:</label>
<div class="d-flex flex-column-reverse w-75">
<select id="user_ids" name="user_ids" class="form-control salesman-customer-user-select"></select>
</div>
</div>
<div class="error text-danger"></div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary submit-btn">确认</button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,38 @@
<table class="table table-hover text-center salesman-customer-list-table">
<thead class="thead-light">
<tr>
<th width="6%">序号</th>
<th width="20%" class="text-left">名称</th>
<th width="30%" class="text-left">单位</th>
<th width="12%" class="text-left">课堂数</th>
<th width="12%">实训数</th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if @customers.present? %>
<% @customers.each_with_index do |customer, index| %>
<tr class="customer-item salesman-customer-item-<%= customer.id %>">
<td><%= index + 1 %></td>
<td class="text-left">
<span><%= link_to customer.name, user_path(customer), :title => customer.name %></span>
</td>
<td class="text-left">
<span><%= customer.school_name %></span>
</td>
<td class="text-left">
<span><%= customer.courses_count %></span>
</td>
<td>
<%= customer.shixuns_count %>
</td>
<td>
<%= delete_link '删除', admins_salesman_customer_path(customer, salesman_id: customer.salesman_id, element: ".salesman-customer-item-#{customer.id}"), class: 'delete-salesman--action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>