193 lines
8.0 KiB
HTML
193 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<head>
|
|
<th:block th:include="include :: header('代理商管理列表')" />
|
|
</head>
|
|
<style>
|
|
#element1{
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: flex-start;
|
|
flex-wrap: wrap;
|
|
}
|
|
.select-list li p, .select-list li label:not(.radio-box){
|
|
width: 80px;
|
|
}
|
|
.bootstrap-table table {
|
|
table-layout: fixed;
|
|
}
|
|
.word-warp{
|
|
word-break: break-all;
|
|
}
|
|
</style>
|
|
<body class="gray-bg">
|
|
<div class="container-div">
|
|
<div class="row">
|
|
<div class="col-sm-12 search-collapse">
|
|
<form id="formId">
|
|
<div class="select-list">
|
|
<ul id="element1">
|
|
<li>
|
|
<label>代理商编码:</label>
|
|
<input type="text" name="partnerCode"/>
|
|
</li>
|
|
<li>
|
|
<label>代理商名称:</label>
|
|
<input type="text" name="partnerName"/>
|
|
</li>
|
|
|
|
<li>
|
|
<label>所在省:</label>
|
|
<select name="province" class="province form-control" data-first-title="选择省">
|
|
<option value="">请选择</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>所在市:</label>
|
|
<select name="city" class="city form-control" data-first-title="选择省">
|
|
<option value="">请选择</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>认证级别:</label>
|
|
<select name="level" th:with="type=${@dict.getType('identify_level')}">
|
|
<option value="">所有</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:partner:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:partner:remove">
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:partner:export">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
</div>
|
|
<div class="col-sm-12 select-table table-striped">
|
|
<table id="bootstrap-table"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: jquery-cxselect-js"/>
|
|
<th:block th:include="include :: bootstrap-table-fixed-columns-js" />
|
|
<script th:inline="javascript">
|
|
var editFlag = [[${@permission.hasPermi('system:partner:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('system:partner:remove')}]];
|
|
var qrCodeFlag = [[${@permission.hasPermi('system:partner:qrCode')}]];
|
|
var levelDatas = [[${@dict.getType('identify_level')}]];
|
|
var prefix = ctx + "system/partner";
|
|
function generatedQrCode(id){
|
|
window.location.href = prefix + `/qr/code?id=` +id;
|
|
}
|
|
$(function() {
|
|
var options = {
|
|
url: prefix + "/list",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
modalName: "代理商管理",
|
|
fixedColumns:true,
|
|
fixedRightNumber:1,
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'id',
|
|
title: '主键',
|
|
visible: false
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'partnerCode',
|
|
title: '代理商编码'
|
|
},
|
|
{
|
|
width: 200,
|
|
field: 'partnerName',
|
|
title: '代理商名称'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'province',
|
|
title: '省'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'city',
|
|
title: '市'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'address',
|
|
title: '详细地址'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'contactPerson',
|
|
title: '联系人'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'contactPhone',
|
|
title: '联系电话'
|
|
},
|
|
{
|
|
width:100,
|
|
class:'word-warp',
|
|
field: 'contactEmail',
|
|
title: '邮件'
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'level',
|
|
title: '认证级别',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(levelDatas, value);
|
|
}
|
|
},
|
|
{
|
|
width:100,
|
|
field: 'createAt',
|
|
title: '创建时间'
|
|
},
|
|
{
|
|
width:170,
|
|
title: '操作',
|
|
align: 'center',
|
|
formatter: function(value, row, index) {
|
|
var actions = [];
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
actions.push('<a style="margin-left: 5px" class="btn btn-info btn-xs '+qrCodeFlag+' " href="javascript:void(0)" onclick="generatedQrCode(\'' + row.id + '\')"><i class="fa fa-remove"></i>生成二维码</a>');
|
|
return actions.join('');
|
|
}
|
|
}]
|
|
};
|
|
$.table.init(options);
|
|
var urlChina = '/cnarea/select';
|
|
$.cxSelect.defaults.url = urlChina;
|
|
// $.cxSelect.defaults.jsonSpace = 'data';
|
|
$('#element1').cxSelect({
|
|
selects: ['province', 'city'],
|
|
nodata: 'none'
|
|
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |