176 lines
5.4 KiB
HTML
176 lines
5.4 KiB
HTML
{layout name="layout2" /}
|
|
<style>
|
|
.layui-form-label {
|
|
color: #6a6f6c;
|
|
width: 100px;
|
|
}
|
|
.layui-input-block {
|
|
margin-left: 130px;
|
|
}
|
|
.tips{
|
|
color: red;
|
|
}
|
|
.goods-li {
|
|
float: left;
|
|
opacity: 1;
|
|
position: relative;
|
|
}
|
|
|
|
.goods-img {
|
|
width: 80px;
|
|
height: 80px;
|
|
padding: 4px;
|
|
}
|
|
.goods-img-del-x {
|
|
position: absolute;
|
|
z-index: 100;
|
|
top: -4px;
|
|
right: -2px;
|
|
width: 20px;
|
|
height: 20px;
|
|
font-size: 16px;
|
|
line-height: 16px;
|
|
color: #fff;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
background: hsla(0, 0%, 60%, .6);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.category{
|
|
display: none;
|
|
}
|
|
|
|
</style>
|
|
<div class="layui-form" lay-filter="layuiadmin-form-user_level" id="layuiadmin-form-user_level" style="padding: 20px 30px 0 0;">
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">选择员工:</label>
|
|
<div class="layui-input-block" >
|
|
<select name="privilege" v-model="selectedOptions" multiple :limit="2" xm-select="privilege" xm-select-search="" xm-select-search-type="dl" xm-select-skin="normal">
|
|
{foreach $satff as $val}
|
|
<option value="{$val.id}">{$val.name} {$val.june}Km</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-hide">
|
|
<input type="button" lay-submit lay-filter="add-user_level-submit" id="add-user_level-submit" value="确认">
|
|
</div>
|
|
</div>
|
|
<style>
|
|
.layui-form-label {
|
|
width: 100px;
|
|
}
|
|
.layui-input-block {
|
|
margin-left: 130px;
|
|
}
|
|
</style>
|
|
<link rel="stylesheet" href="/static/plug/formSelects/formSelects-v4.css" />
|
|
<script src="/static/plug/formSelects/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
|
|
<script>
|
|
layui.config({
|
|
version:"{$front_version}",
|
|
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index','table','like','laydate'], function(){
|
|
var $ = layui.$
|
|
,form = layui.form
|
|
,table = layui.table
|
|
,like = layui.like
|
|
, laydate = layui.laydate;
|
|
|
|
//监听搜索
|
|
form.on('submit(user-search)', function(data){
|
|
var field = data.field;
|
|
//执行重载
|
|
table.reload('user-lists', {
|
|
where: field,
|
|
page: {
|
|
curr: 1 //重新从第 1 页开始
|
|
}
|
|
});
|
|
});
|
|
//日期时间范围
|
|
laydate.render({
|
|
elem: '#start_time'
|
|
,type: 'datetime'
|
|
,trigger: 'click'
|
|
});
|
|
|
|
//日期时间范围
|
|
laydate.render({
|
|
elem: '#end_time'
|
|
,type: 'datetime'
|
|
,trigger: 'click'
|
|
});
|
|
|
|
form.on('radio(link)', function (data) {
|
|
var value = data.value;
|
|
$('.link').hide();
|
|
switch (value) {
|
|
case '1':
|
|
$('.page').show();
|
|
$('.url-tips').show();
|
|
break;
|
|
case '2':
|
|
$('.page').show();
|
|
$('.url-tips').show();
|
|
break;
|
|
case '3':
|
|
$('.url').show();
|
|
$('.url-tips').show();
|
|
|
|
break;
|
|
}
|
|
|
|
})
|
|
//清空查询
|
|
form.on('submit(user-clear-search)', function(){
|
|
$('#keyword_type').val('sn');
|
|
$('#keyword').val(''); //清空输入框
|
|
$('#level').val(''); //清空输入框
|
|
$('#group_id').val(''); //清空输入框
|
|
$('#start_time').val(''); //清空输入框
|
|
$('#end_time').val(''); //清空输入框
|
|
form.render('select');
|
|
//刷新列表
|
|
table.reload('user-lists', {
|
|
where: [],
|
|
page: {
|
|
curr: 1 //重新从第 1 页开始
|
|
}
|
|
});
|
|
});
|
|
// 导出
|
|
$(document).on('click','.select-goods',function () {
|
|
layer.open({
|
|
type: 2
|
|
,title: '选择客户'
|
|
,content: '{:url("Orderautomatic/userlist")}'
|
|
,area: ['90%', '90%']
|
|
,btn: ['确认', '取消']
|
|
,yes: function(index, layero){
|
|
var data = window["layui-layer-iframe" + index].callbackdata();
|
|
if(data.length){
|
|
$('#goods_list tbody').remove();
|
|
var goods = data[0];
|
|
var goods_html = '<tr>\n' +
|
|
' <td style="text-align: center"><img class="image-show" width="80px" height="80px" src="'+goods.avatar +'">'+goods.nickname+'</td>\n' +
|
|
' <td style="text-align: center">'+goods.phone+'</td>\n' +
|
|
' </tr>';
|
|
$('#goods_list').prev().val(goods.id);
|
|
$('#goods_list').append(goods_html);
|
|
$('.goods').show();
|
|
}
|
|
}
|
|
|
|
})
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
</script> |