文件

149 行
4.7 KiB
HTML
可执行文件

<!--[1.1.96]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/goodsList.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css"/>
<style>
* {
margin: 0;
padding: 0;
}
table {
border: 1px solid #f1f1f1;
margin-top: 40px;
}
</style>
<div class="goodsBox">
<div class="goods_title">
<div class="goods_title_inner" id="goods_title_inner">
工单信息管理
</div>
</div>
</div>
<div class="goods_edit">
<div class="goods_edit_input">
<input class="searchInput form-control" type="text" placeholder="工单编号/问题标题" id="keyword" name="search">
</div>
<button type="button" class="layui-btn" id="Preservation">查询</button>
<if condition="$authArr['index'] eq true">
<button type="button" class="layui-btn layui-btn-warm" id="add">提工单</button>
</if>
</div>
<table class="layui-hide" id="test" lay-filter="demo"></table>
<script type="text/html" id="barDemo">
<if condition="$authArr['detail'] eq true">
<a class="layui-btn layui-btn-sm detail" lay-event="detail">详情</a>
</if>
</script>
<script>
$("#add").click(function () {
top.layer.open({
type: 2,
content: "{:U('Super/Question/index')}",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
btnAlign: 'c',
shade:0,
end:function () {
MenuApp.refreshWindow();
}
})
});
</script>
<script>
layui.use(['form', 'layedit', 'laydate', 'table'], function() {
// 日期
var laydate = layui.laydate;
var table = layui.table;
var form = layui.form
//展示已知数据
table.render({
elem: '#test',
url: "{:U('Work/getadmin')}",
method:'post',
limit:8,
cols: [
[ //标题栏
{
field: 'id',
title: '序号',
width:60
}, {
field: 'number',
title: '工单编号',
align:'center',
}, {
field: 'title',
title: '问题标题',
align:'center',
}, {
field:'type',
title:'问题类型',
align:'center',
}, {
field: 'addtime',
title: '提交时间',
align:'center',
}, {
field: 'lasttime',
title: '完成时间',
align:'center',
}, {
field: 'status',
title: '处理状态',
align:'center',
}, {
fixed: 'right',
title: '操作',
align: 'center',
toolbar: '#barDemo',
width:150
}
]
],
page: {
layout: [ 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
}, //是否开启分页
});
table.on('tool(demo)', function(obj){
var data = obj.data;
if (obj.event === 'detail') {
top.layer.open({
type: 2,
content: "{:U('Work/detail')}?id=" + data.number,
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
btnAlign: 'c',
shade:0,
end:function () {
table.reload('test', {
});
}
})
}
});
//查询
$('#Preservation').click(function () {
//执行重载
table.reload('test', {
page: {
curr: 1 //重新从第 1 页开始
}
,where: {
keyword:$('#keyword').val(),
}
});
})
function checkPwd(pwd){
var reg=/^[a-zA-Z0-9]{1,}$/;
if(reg.test(pwd)==false){
return false;
}
return true;
}
})
</script>