You've already forked guangan
工单
This commit is contained in:
78
plugs/think-plugs-ticket/src/view/ticket_outer/my.html
Normal file
78
plugs/think-plugs-ticket/src/view/ticket_outer/my.html
Normal file
@ -0,0 +1,78 @@
|
||||
{extend name="table"}
|
||||
|
||||
{block name="button"}
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-modal='{:url("index")}' data-title="所有工单">所有工单</button>
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="layui-tab">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col">
|
||||
<div class="article_list think-bg-white">
|
||||
{include file='ticket_outer/index_search'}
|
||||
<table class="layui-hide" data-url="{$request->url()}" data-target-search="form.form-search" id="ticketTable" lay-filter="ticketTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbar">
|
||||
<!--{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}-->
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block name='style'}
|
||||
<style>
|
||||
</style>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#ticketTable').layTable({
|
||||
height: 'full-250',
|
||||
toolbar: true,
|
||||
sort: {field: 'create_at', type: 'desc'},
|
||||
title: '工单列表',
|
||||
cols: [[
|
||||
{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:'ticket_address', title:'工单地址', width:200, templet:function(item){
|
||||
if (item.ticket_address) {
|
||||
return `${item.ticket_region} ${item.ticket_address}`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{field: 'imgs', title: '工单图片', width: 100, templet:function(item){
|
||||
if (item.imgs) {
|
||||
return item.imgs.split("|").map((img) => {
|
||||
return laytpl('<a target="_blank" data-tips-hover data-tips-image="{{d}}"><i class="layui-icon layui-icon-picture"></i></a>').render(img)
|
||||
}).concat(' ')
|
||||
} else {
|
||||
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
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{/block}
|
Reference in New Issue
Block a user