You've already forked guangan
分类
This commit is contained in:
@ -1,6 +1,14 @@
|
||||
{extend name="table"}
|
||||
|
||||
{block name="button"}
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-open='{:url("my")}' data-title="我审核的">我审核的</button>
|
||||
<!--{if auth("add")}-->
|
||||
<button type="button" class="layui-btn layui-btn-sm" data-modal='{:url("add")}' data-title="添加工单">添加工单</button>
|
||||
<!--{/if}-->
|
||||
<!--{if auth("import")}-->
|
||||
<a class="layui-btn layui-btn-sm layui-btn-active" target="_blank" href="/static/ticket_import_template.xlsx">下载导入模板</a>
|
||||
<button class='layui-btn layui-btn-sm layui-btn-success' data-file data-type="xlsx,xls" data-uptype='local' data-field="ticket_excel">导入工单</button>
|
||||
<!--{/if}-->
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
@ -8,7 +16,7 @@
|
||||
<div class="layui-row">
|
||||
<div class="layui-col">
|
||||
<div class="article_list think-bg-white">
|
||||
{include file='ticket_outer/index_search'}
|
||||
{include file='ticket/index_search'}
|
||||
<table class="layui-hide" data-url="{$request->url()}" data-target-search="form.form-search" id="ticketTable" lay-filter="ticketTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
@ -18,8 +26,13 @@
|
||||
<!--{if auth("detail")}-->
|
||||
<a data-modal="{:url('detail')}?id={{ d.id }}" data-height="90%" data-width="60%" class="layui-btn layui-btn-xs layui-btn-normal" title="详情">详情</a>
|
||||
<!--{/if}-->
|
||||
<!--{if auth("remove")}-->
|
||||
<a data-confirm="确定要永久删除此工单吗?" data-action="{:url('remove')}" data-value="id#{{ d.id }}" data-csrf="{:systoken('remove')}" class="layui-btn layui-btn-xs layui-btn-danger" title="删除">删除</a>
|
||||
{{# if (d.user_shares && d.user_shares.length > 0) { }}
|
||||
<!--{if auth("comment")}-->
|
||||
<a data-modal="{:url('comment')}?id={{ d.id }}" data-height="80%" data-width="80%" class="layui-btn layui-btn-xs layui-btn-normal" title="反馈信息">反馈信息</a>
|
||||
<!--{/if}-->
|
||||
{{# } }}
|
||||
<!--{if auth("edit")}-->
|
||||
<a data-modal="{:url('edit')}?id={{ d.id }}" data-height="80%" data-width="80%" class="layui-btn layui-btn-xs layui-btn-danger" title="修改工单">修改</a>
|
||||
<!--{/if}-->
|
||||
</script>
|
||||
{/block}
|
||||
@ -41,13 +54,13 @@
|
||||
{field:'create_at', title: '工单创建时间', width: 160, sort: true},
|
||||
{field:'source_type_name', title:'工单来源', width:120},
|
||||
{field:'type_name', title:'工单类型', width:160},
|
||||
{field:'content', title:'工单内容', minWidth:100},
|
||||
{field:'content', title:'工单内容', minWidth:120},
|
||||
{field:'ticket_address', title:'工单地址', width:200, templet:function(item){
|
||||
if (item.ticket_address) {
|
||||
return `${item.ticket_region} ${item.ticket_address}`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
if (item.ticket_address) {
|
||||
return `${item.ticket_region} ${item.ticket_address}`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{field: 'imgs', title: '工单图片', width: 100, templet:function(item){
|
||||
if (item.imgs) {
|
||||
@ -58,20 +71,32 @@
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{field:'status', title:'状态', width:80, templet:function(item){
|
||||
if(item.status == 0){
|
||||
return '<span style="color:red;">正在处理</span>';
|
||||
}else if(item.status == 1){
|
||||
return '<span style="color:green;">已处理</span>';
|
||||
}else{
|
||||
return '<span style="color:gray;">已关闭</span>';
|
||||
}
|
||||
}},
|
||||
|
||||
{fixed: 'right', title:'操作', toolbar: '#toolbar', width:200}
|
||||
]],
|
||||
page: true
|
||||
})
|
||||
/*!文件上传过程及事件处理 */
|
||||
$('[data-file]').on('upload.choose', function (files) {
|
||||
// 文件选择后的事件
|
||||
}).on('upload.hash', function (event, file) {
|
||||
// file 当前文件对象
|
||||
}).on('upload.progress', function (event, obj) {
|
||||
// obj.file 当前文件对象
|
||||
// obj.event 文件上传进度事件
|
||||
// obj.number 当前上传进度值
|
||||
}).on('upload.done', function (event, obj) {
|
||||
// obj.file 当前完成的文件对象,每个文件上传成功将会调用
|
||||
// obj.data 当前文件上传后服务端返回的内容,部分云上传不会返回数据
|
||||
|
||||
// obj.file 当前完成的文件对象
|
||||
// obj.data 当前文件上传后服务端返回的内容
|
||||
console.log(obj.file);
|
||||
console.log(obj.data);
|
||||
/*! 提交数据并返回结果 */
|
||||
if(obj.file.xurl) $.form.load('{:url("import")}', {file: obj.file.xurl}, 'post');
|
||||
}).on('upload.complete', function (event) {
|
||||
// 全部文件上传成功
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
Reference in New Issue
Block a user