44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
@model IEnumerable<SysUserConfig>
|
|
@{
|
|
Layout = "~/Views/Shared/_LayoutMini.cshtml";
|
|
}
|
|
|
|
@section CSS{
|
|
}
|
|
@section JS{
|
|
<script src="~/Statics/libs/bstable/bootstrap-table.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script src="~/Statics/libs/bstable/bootstrap-table-zh-CN.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script>
|
|
function transData(res) {
|
|
return res.obj;
|
|
}
|
|
|
|
$(function () {
|
|
$('#btnRemove').on('click', function () {
|
|
var sels = $('#table1').bootstrapTable('getSelections');
|
|
if (!sels.length) {
|
|
return main.alert('请选择一项进行删除操作');
|
|
}
|
|
var names = sels.map(x => x.ConfigName);
|
|
main.confirmPost('确认要删除所选项吗?', '/pricing/AjaxRemoveTemplate', { names }).done(function () {
|
|
$('#table1').bootstrapTable('remove', { field: 'ConfigName', values: names });
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|
|
<div class="p-4">
|
|
<div class="mb-4">
|
|
<button class="btn btn-primary" id="btnRemove">删除</button>
|
|
</div>
|
|
<table id="table1" class="table-sm" data-toggle="table" data-url="/pricing/AjaxGetTemplateList" data-response-handler="transData" data-click-to-select="true">
|
|
<thead>
|
|
<tr>
|
|
<th data-checkbox="true" data-align="center"></th>
|
|
<th data-field="ConfigName" data-align="center">模板名称</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|