goodsGroup.html
7.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<include file="public/layout" />
<style type="text/css">
.dn{display: none;}
.layermbox{text-align: center;}
.layer_box{font-size: 0; background-color: #FFFFFF; text-align: center;position: absolute;left: 28%;border: 1px solid #D7D7D7;padding: 10px;z-index: 9999;}
.contentTxt{width: 300px; height: 20px;line-height: 20px;resize: none;border: 1px solid #D7D7D7;background-color: #999;}
.contentTxt:hover{border-color:#C4182E ;}
.layer_box input{vertical-align: middle;}
.copySuccess{font-size: 14px; width: 150px;padding: 10px; background-color: #FFFFFF;border: 1px solid #D7D7D7;margin: auto;}
.js-copy{font-size: 14px;vertical-align: middle;display: inline-block;*display: inline;*zoom: 1;cursor: pointer;border: 1px solid #D7D7D7;border-left:0 ; height: 22px;padding:0 5px;}
.js-copy:hover{background-color: #EEEEEE;}
</style>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<!--隐藏 20170425-->
<!--<div class="subject">
<h3>商品分类管理</h3>
<h5>系统商品分类添加与管理</h5>
</div>-->
<div class="ftitle">
<h3>商品分组列表</h3>
<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
</div>
</div>
</div>
<div id="explanation" class="explanation">
<div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
<span title="收起提示" id="explanationZoom"></span>
</div>
<ul>
<li>商品分组</li>
</ul>
</div>
<form method="post">
<input type="hidden" value="ok" name="form_submit">
<input type="hidden" value="{$store_id}" id="store_id">
<div class="flexigrid">
<div class="hDiv">
<div class="hDivBox">
<table cellspacing="0" cellpadding="0">
<thead>
<tr>
<th align="center" axis="col4" class="w250"><div style="text-align: center; ">新增分组</div></th>
<!--<th align="center" axis="col5"><div style="text-align: center; width: 80px;">是否推荐</div></th>-->
<th align="center" axis="col6" class="w100"><div style="text-align: center; ">是否显示</div></th>
<!--<th align="center" axis="col8"><div style="text-align: center; width: 60px;">分组</div></th>-->
<th align="center" axis="col9" class="w100"><div style="text-align: center;">排序</div></th>
<th align="center" axis="col1" class="handle w150"><div style="text-align: center; ">操作</div></th>
<!--<th axis="col10"><div></div></th>-->
</tr>
</thead>
</table>
</div>
</div>
<div class="tDiv">
<div class="tDiv2">
<a href="{:U('Goods/goodsGroupInfo')}">
<div class="fbutton">
<div title="新增分组" class="add">
<span><i class="fa fa-plus"></i>新增分组</span>
</div>
</div>
</a>
</div>
<div style="clear:both"></div>
</div>
<div style="height: auto;" class="bDiv">
<table cellspacing="0" cellpadding="0" border="0" id="article_cat_table" class="flex-table autoht">
<tbody id="treet1">
<empty name="grouplist">
<tr>
<td colspan="6" class="norecord">
<div class="warning-option"><i class="icon-warning-sign"></i><span>暂无符合条件的数据记录</span></div>
</td>
</tr>
<else/>
<foreach name="grouplist" item="vo" key="k" >
<tr id="tr{$vo['gpid']}">
<td class="sign w50">
</td>
<td class="name w200">
<div style="text-align: left; ">
<input type="text" value="{$vo.gpname}" onChange="changeTableVal('goods_group','gpid','{$vo.gpid}','gpname',this)" style="text-align: left; width:90%;"/>
</div>
</td>
<td align="center" class="w100">
<div style="text-align: center; ">
<if condition='$vo[status] eq 1'>
<span class="yes" onClick="changeTableVal('goods_group','gpid','{$vo.gpid}','status',this)" ><i class="fa fa-check-circle"></i>是</span>
<else />
<span class="no" onClick="changeTableVal('goods_group','gpid','{$vo.gpid}','status',this)" ><i class="fa fa-ban"></i>否</span>
</if>
</div>
</td>
<td class="sort w100">
<div style="text-align: center; ">
<input type="text" onblur="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('goods_group','gpid','{$vo.gpid}','gp_ordid',this)" size="4" value="{$vo.gp_ordid}" />
</div>
</td>
<td class="handle w150">
<div style="text-align: center;" class="">
<a class="aClick btn green" gpid="{$vo['gpid']}"><i class="fa fa-link"></i>链接</a>
<a href="{:U('Goods/goodsGroupInfo',array('gpid'=>$vo['gpid']))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>编辑</a>
<a class="btn red" href="javascript:get_event_log('1','删除商品分组');del_fun('{:U('Goods/delGoodsGroup',array('gpid'=>$vo['gpid']))}');"><i class="fa fa-trash-o"></i>删除</a>
</div>
</td>
<!--删除 20170425-->
<!--<td style="width: 100%; height: ">
<div> </div>
</td>-->
</tr>
</foreach>
</empty>
</tbody>
</table>
<Div style="height: 40px;"></Div>
</div>
</div>
</form>
</div>
<div class="layer_box dn">
<input readonly="readonly" class="contentTxt" id="content" value="" />
<div id="btn" class="js-copy" data-clipboard-target="#content"><span>复制</span></div>
</div>
</body>
</html>
<script src="__PUBLIC__/js/clipboard.min.js"></script>
<script type="text/javascript">
var btn = document.getElementById('btn');
var clipboard = new Clipboard(btn);//实例化
//复制成功执行的回调,可选
clipboard.on('success', function(e) {
layer.alert('复制成功', {
closeBtn: 0
}, function() {
layer.closeAll();
$(".layer_box").addClass("dn");
});
});
//复制失败执行的回调,可选
clipboard.on('error', function(e) {
layer.alert('复制失败');
});
$(".aClick").click(function(e) {
var store_id = $("#store_id").val();
var gpid = $(this).attr("gpid");
var http ="";
var ishttps = 'https:' == document.location.protocol ? true : false;
if(ishttps) {http ="https://"; } else {http ="http://";}
var host = window.location.host;
var controller = "/Mobile/Goods/goodsList/stoid/";
var val = store_id+"/gid/"+gpid;
var url = http+host+controller+val;
$("#content").val(url);
var t = $(this).parents("tr").index();
$(".layer_box").css("top", (t + 1) * 47 + 180)
$(".layer_box").removeClass("dn");
e.stopPropagation();//阻止冒泡到body
});
// 点击刷新数据
$('.fa-refresh').click(function(){
layer.msg('加载中...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '10px', time:100000}) ;
location.href = location.href;
});
$(" body").click(function(){
$(".layer_box").addClass("dn");
});
</script>