|
@@ -4,7 +4,63 @@
|
|
|
<head>
|
|
|
<title>赠送超级会员</title>
|
|
|
<meta name="decorator" content="default"/>
|
|
|
- <script type="text/javascript">
|
|
|
+ <script>
|
|
|
+ //点击添加机构
|
|
|
+ function showSelectClub() {
|
|
|
+ var url = "${ctx}/coupon/cmCoupon/toAddClub";
|
|
|
+ var title = '';
|
|
|
+ title = "选择机构";
|
|
|
+ top.$.jBox("iframe:" + url, {
|
|
|
+ iframeScrolling: 'yes',
|
|
|
+ width: $(top.document).width() - 400,
|
|
|
+ height: $(top.document).height() - 160,
|
|
|
+ persistent: true,
|
|
|
+ title: title,
|
|
|
+ buttons: {"确定": '1', "取消": '-1'},
|
|
|
+ submit: function (v, h, f) {
|
|
|
+ //确定
|
|
|
+ var $jboxFrame = top.$('#jbox-iframe');
|
|
|
+ var $mainFrame = top.$('#mainFrame');
|
|
|
+ if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
|
+ var items = $jboxFrame[0].contentWindow.getCheckedItems();
|
|
|
+ console.log(items);
|
|
|
+ insertHtmlClub(items);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function insertHtmlClub(data) {
|
|
|
+ var html = '<tr>' +
|
|
|
+ '<td>' +
|
|
|
+ data.clubID+
|
|
|
+ '</td>' +
|
|
|
+ '<td>' +
|
|
|
+ data.name +
|
|
|
+ '</td>' +
|
|
|
+ '<td>' +
|
|
|
+ data.linkMan +
|
|
|
+ '</td>' +
|
|
|
+ '<td>' +
|
|
|
+ data.contractMobile +
|
|
|
+ '</td>' +
|
|
|
+ '<td>' +
|
|
|
+ '<a href="javascript:;" onclick="deleteClub()">删除</a>' +
|
|
|
+ '</td>' +
|
|
|
+ '</tr>';
|
|
|
+ $("#contentTableClub").show();
|
|
|
+ $("#chooseClub").hide();
|
|
|
+ $("#hotSearchClub").html(html);
|
|
|
+ $("#userId").val(data.userID);
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteClub() {
|
|
|
+ $("#hotSearchClub").html("");
|
|
|
+ $("#contentTableClub").hide();
|
|
|
+ $("#chooseClub").show();
|
|
|
+ $("#userId").val("");
|
|
|
+ }
|
|
|
|
|
|
</script>
|
|
|
</head>
|
|
@@ -22,11 +78,12 @@
|
|
|
<label class="control-label"><font color="red">*</font>机构:</label>
|
|
|
<div class="controls">
|
|
|
<a href="javascript:void(0);" onclick="showSelectClub()" id="chooseClub">请选择机构</a>
|
|
|
+ <input type="hidden" name="userId" id="userId" value="${cmCoupon.userId}">
|
|
|
<table id="contentTableClub" class="table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
+ <th>机构ID</th>
|
|
|
<th>机构名称</th>
|
|
|
- <th>机构简称</th>
|
|
|
<th>联系人</th>
|
|
|
<th>手机号</th>
|
|
|
<th>操作</th>
|
|
@@ -48,63 +105,5 @@
|
|
|
</div>
|
|
|
</form:form>
|
|
|
</body>
|
|
|
-<script>
|
|
|
- //点击添加机构
|
|
|
- function showSelectClub() {
|
|
|
- var url = "${ctx}/coupon/cmCoupon/toAddClub";
|
|
|
- var title = '';
|
|
|
- title = "选择机构";
|
|
|
- top.$.jBox("iframe:" + url, {
|
|
|
- iframeScrolling: 'yes',
|
|
|
- width: $(top.document).width() - 400,
|
|
|
- height: $(top.document).height() - 160,
|
|
|
- persistent: true,
|
|
|
- title: title,
|
|
|
- buttons: {"确定": '1', "取消": '-1'},
|
|
|
- submit: function (v, h, f) {
|
|
|
- //确定
|
|
|
- var $jboxFrame = top.$('#jbox-iframe');
|
|
|
- var $mainFrame = top.$('#mainFrame');
|
|
|
- if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
|
- var items = $jboxFrame[0].contentWindow.getCheckedItems();
|
|
|
- console.log(items);
|
|
|
- insertHtmlClub(items);
|
|
|
- }
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- function insertHtmlClub(data) {
|
|
|
- var html = '<tr>' +
|
|
|
- '<td>' +
|
|
|
- data.name +
|
|
|
- '</td>' +
|
|
|
- '<td>' +
|
|
|
- data.shortName +
|
|
|
- '</td>' +
|
|
|
- '<td>' +
|
|
|
- data.linkMan +
|
|
|
- '</td>' +
|
|
|
- '<td>' +
|
|
|
- data.contractMobile +
|
|
|
- '</td>' +
|
|
|
- '<td>' +
|
|
|
- '<a href="javascript:;" onclick="deleteClub()">删除</a>' +
|
|
|
- '</td>' +
|
|
|
- '</tr>';
|
|
|
- $("#contentTableClub").show();
|
|
|
- $("#chooseClub").hide();
|
|
|
- $("#hotSearchClub").html(html);
|
|
|
- $("#userId").val(data.userID);
|
|
|
- }
|
|
|
-
|
|
|
- function deleteClub() {
|
|
|
- $("#hotSearchClub").html("");
|
|
|
- $("#contentTableClub").hide();
|
|
|
- $("#chooseClub").show();
|
|
|
- $("#userId").val("");
|
|
|
- }
|
|
|
|
|
|
-</script>
|
|
|
</html>
|