@model CustomerGuanlianDTO;
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
Layout = null;
|
|
|
|
//List<CooperatecustomCustomerDTO> CooperatecustomCustomerDTOs = ViewData["CooperatecustomCustomerDTOs"] as List<CooperatecustomCustomerDTO>;
|
}
|
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="description" content="">
|
<meta name="author" content="ThemeBucket">
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/animate.min.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
|
<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
|
<!-- jqgrid-->
|
<script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js"></script>
|
|
<!--容器-->
|
<script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
|
<script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
|
<script src="~/js/TUJS.js"></script>
|
|
<style type="text/css">
|
|
div.clearfix > label {
|
padding-top: 8px;
|
}
|
|
.col-md-1.control-label {
|
padding-right: 0px;
|
font-weight: 400;
|
}
|
|
table {
|
border-collapse: collapse;
|
border: none;
|
width: 900px;
|
margin-left: 0px;
|
text-align: center;
|
}
|
|
td {
|
border: solid #000000 1px;
|
height: 30px;
|
}
|
</style>
|
|
|
</head>
|
|
<body class="gray-bg" style="overflow:auto">
|
<form id="fm" method="post">
|
<div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="ibox float-e-margins">
|
<div id="div_content" class="ibox-content" style="background-color:white;">
|
<div class="row">
|
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">关联客户<i class="red">*</i></label>
|
<div class="col-sm-7 col-md-7">
|
<a class="btn btn-success" id="xuanze" href="javascript:void(0)" onclick="xuanzekehu();" style="margin-left:4px; border-radius:4px;">
|
<i class="glyphicon glyphicon-ok"></i> <span class="bold">选择</span>
|
</a>
|
</div>
|
|
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label"></label>
|
<div class="col-sm-8 col-md-8">
|
<table style="width:95%;" id="kehutable">
|
@{
|
int i = 1;
|
}
|
<tr>
|
@*<td style="width:10%;"> 编号</td>*@
|
<td style="width:60%;"> 客户名称</td>
|
|
<td style="width:15%;"> 联系方式</td>
|
<td style="width:15%;"> 客户类型</td>
|
<td style="width:10%;"> 删除</td>
|
</tr>
|
@*<tr class="Customers">
|
|
<td> 1</td>
|
<td> 测试客户</td>
|
<td> 测试电话</td>
|
<td>
|
合作客户
|
<input type="hidden" name="Customername" value="测试客户" />
|
<input type="hidden" name="Phone" value="测试电话" />
|
<input type="hidden" name="Customertype" value="合作客户" />
|
<input type="hidden" name="CustomerId" value="32423423432432434" />
|
</td>
|
</tr>*@
|
|
@if (Model.cooperatecustomCustomerDTOs != null && Model.cooperatecustomCustomerDTOs.Count > 0)
|
{
|
@foreach (var cooperatecustomCustomerDTO in Model.cooperatecustomCustomerDTOs)
|
{
|
<tr class="Customers">
|
|
@*<td> @i</td>*@
|
<td> @cooperatecustomCustomerDTO.Name</td>
|
<td> @cooperatecustomCustomerDTO.Tel</td>
|
<td>
|
@cooperatecustomCustomerDTO.Customertype
|
<input type="hidden" name="Customername" value="@cooperatecustomCustomerDTO.Name" />
|
<input type="hidden" name="Phone" value="@cooperatecustomCustomerDTO.Tel" />
|
<input type="hidden" name="Customertype" value="@cooperatecustomCustomerDTO.Customertype" />
|
<input type="hidden" name="CustomerId" value="@cooperatecustomCustomerDTO.Id" />
|
</td>
|
<td style="width:10%;"> <button type="button" class="delBtn" onclick="delBtn(this, '@cooperatecustomCustomerDTO.Id','@Model.CustomerId')" data-type="3" style="width:32px">-</button> </td>
|
</tr>
|
|
i++;
|
}
|
}
|
</table>
|
</div>
|
|
|
</div>
|
|
|
|
|
<div class="clearfix layer-area" style="padding-bottom:60px;">
|
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
|
</form>
|
|
<script type="text/javascript">
|
|
var hh = document.body.clientHeight - $("#top").height() * 2 - 50;
|
$("#div_content").height(hh);
|
|
toastr.options = {
|
"closeButton": true,
|
"debug": false,
|
"progressBar": true,
|
"positionClass": "toast-bottom-right",
|
"onclick": null,
|
"showDuration": "300",
|
"hideDuration": "600",
|
"timeOut": "4500",
|
"extendedTimeOut": "600",
|
"showEasing": "swing",
|
"hideEasing": "linear",
|
"showMethod": "fadeIn",
|
"hideMethod": "fadeOut"
|
};
|
|
|
|
|
var xuanzekehu = function () {
|
OpenWindow("选择客户", "100%", "100%", "/CooperatecustomCustomer/IndexSelect?Id=@(Model.CustomerId)&Customertype=@(Html.Raw(Model.Customertype))");
|
}
|
|
|
var _reloadPageData = function () {
|
|
|
window.location = "/CooperatecustomCustomer/IndexCustomerGuanlian?CustomerId=@(Model.CustomerId)&Customertype=@(Html.Raw(Model.Customertype))";
|
|
|
}
|
|
|
function _pageAutoClose() {
|
try {
|
parent.window._reloadPageData();
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
parent.layer.close(index);
|
return false;
|
}
|
catch (err) {
|
var pathname = window.location.pathname;
|
var search = window.location.search;
|
parent._CloseTab1(pathname + search);
|
}
|
|
}
|
|
|
function delBtn(obj, id, CustomerId) {
|
|
|
$.ajax({
|
type: "POST",
|
url: "/CooperatecustomCustomer/DelCustomerGuanlian",
|
dataType: "json",
|
global: false,
|
data: { CustomerId: CustomerId, SecCustomerId: id},
|
success: function (data) {
|
|
if (data.Result) {
|
$(obj).parent().parent().remove();
|
layer.msg('删除成功', { icon: 6 });
|
//try {
|
// _pageAutoClose();//自动关闭页面方法
|
//}
|
//catch (err) {
|
// var pathname = window.location.pathname;
|
// var search = window.location.search;
|
// parent._CloseTab1(pathname + search);
|
//}
|
}
|
else {
|
layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
layer.msg('失败', { icon: 5 });
|
}
|
});
|
|
|
|
}
|
</script>
|
</body>
|
</html>
|