Files
zszq-trs/YLErpWeb/Areas/Admin/Views/OwnerInfo/Index.cshtml
T
2024-05-09 14:06:26 +08:00

88 lines
2.9 KiB
Plaintext

@section scripts{
<script>
function Add() {
startclientView(0);
}
function addFunctionAlty(value, row, index) {
return [
'<button id="Delete" type="button" class="btn btn-primary">删除</button>',
].join('');
}
window.operateEvents = {
'click #Delete': function (e, value, row, index) {
deleteowner(row.ID);
},
'click #Edit': function (e, value, row, index) {
startclientView(row.ID);
}
};
$('#table').bootstrapTable({
url: "OwnerInfo/GetOwnerInfo",
onDblClickRow: function (arg1, arg2, arg3) {
startclientView(arg1.ID);
},
refreshOptions: function () { }
});
function startclientView(id) {
var srcurl = "/Admin/OwnerInfo/OwnerInfoEdit?ID=" + id;
layer.open({
type: 2,
title: "编辑确认书信息",
shadeClose: false,
shade: 0.4,
area: ['700px', '800px'],
content: srcurl
});
}
function Change() {
$('#table').bootstrapTable('refreshOptions', {});
}
function deleteowner(ID) {
if (confirm("确定删除吗?")) {
$.ajax({
type: "Post",
url: "/OwnerInfo/Deleteowner",
data: { id: ID },
success: function (data) {
Change();
},
error: function (msg) {
alert("error:" + msg);
}
});
}
}
</script>
}
<button class="btn btn-primary" onclick="Add()">添加</button>
<button class="btn btn-primary" onclick="Change()">刷新</button>
<table id="table" data-toggle="table">
<thead>
<tr>
<th data-field="ID" data-visible="false"></th>
<th data-field="Condition">条件</th>
<th data-field="FullName">公司全称</th>
<th data-field="CounterpartyCode">营业执照</th>
<th data-field="RegisteredAddress">注册地址</th>
<th data-field="LegalPerson">法人</th>
<th data-field="BankAccount">户名</th>
<th data-field="Bank">开户行</th>
<th data-field="Card">账号</th>
<th data-field="Payment">大额行号</th>
<th data-field="ContactName">联系人</th>
<th data-field="Address">地址</th>
<th data-field="Email">邮件</th>
<th data-field="PhoneNumber">电话</th>
<th data-field="Fax">传真</th>
<th data-events="operateEvents" data-formatter="addFunctionAlty">操作</th>
</tr>
</thead>
</table>