index.html
11.7 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<include file="public/layout"/>
<link href="__PUBLIC__/static/css/base_add.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/static/css/seller_center_add.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/static/js/layer/laydate/laydate.js"></script>
<style type="text/css">
.form { padding-left: 15px; padding-right: 40px;color: #000000;}
.revalua_type {
display: flex; justify-content: center;
align-items: center; width: 150px; height: 45px;
border: 1px solid rgb(0, 0, 0);
margin-right: 27px; border-radius: 5px;
font-size: 15px; color: #000000;
}
dl { margin-top: 15px; }
dd { margin-left: 5px;}
.type {
display: flex; justify-content: center;
align-items: center; width: 150px;height: 45px;
margin-right: 27px;border-radius: 5px;
font-size: 15px; background-color: rgb(22, 155, 213);
color: rgb(255, 255, 255); border: 1px solid rgb(22, 155, 213);
}
.ncap-form-default dt.tit{width: auto}
.ncap-form-default .input-txt, .ncap-form-all .input-txt.num{ width: 70px !important; height: 18px; line-height: 18px; }
</style>
<!--以下是在线编辑器 代码 -->
<script type="text/javascript">
/*
* 在线编辑器相 关配置 js
* 参考 地址 http://fex.baidu.com/ueditor/
*/
window.UEDITOR_Admin_URL = "/public/plugins/Ueditor/";
var URL_upload = "{$URL_upload}";
var URL_fileUp = "{$URL_fileUp}";
var URL_scrawlUp = "{$URL_scrawlUp}";
var URL_getRemoteImage = "{$URL_getRemoteImage}";
var URL_imageManager = "{$URL_imageManager}";
var URL_imageUp = "{$URL_imageUp}";
var URL_getMovie = "{$URL_getMovie}";
var URL_home = "{$URL_home}";
</script>
<script type="text/javascript" charset="utf-8" src="/public/plugins/Ueditor/ueditor.config.js?v=__CSSVERSION__"></script>
<script type="text/javascript" charset="utf-8" src="/public/plugins/Ueditor/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="/public/plugins/Ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8" src="/public/plugins/Ueditor/lang/en/en.js"></script>
<script type="text/javascript">
var url = "{:url('Ueditor/index',array('savepath'=>'userevaluation'))}";
var editor;
$(function () {
//具体参数配置在 editor_config.js 中
var options = {
zIndex: 999,
initialFrameWidth: "95%", //初化宽度
initialFrameHeight: 400, //初化高度
focus: false, //初始化时,是否让编辑器获得焦点true或false
maximumWords: 99999, removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign'
, //允许的最大字符数 'fullscreen',
pasteplain: false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
autoHeightEnabled: true
, serverUrl: url
};
editor = new UE.ui.Editor(options);
editor.render("goods_content"); // 指定 textarea 的 id 为 goods_content
});
</script>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="subject">
<h3>评价有礼活动设置</h3>
<h5>设置评价有礼的内容</h5>
</div>
<ul class="tab-base nc-row">
<li><a href="{:U('Userevaluation/index',array('type'=>'1'))}" <if condition="$type eq 1">class="current"</if> ><span>商城订单评价</span></a></li>
<li><a href="{:U('Userevaluation/index',array('type'=>'2'))}" <if condition="$type eq 2">class="current"</if> ><span>美容师评价</span></a></li>
</ul>
</div>
</div>
<!-- 操作说明 -->
<div id="explanation" class="explanation"
style="color: rgb(44, 188, 163); background-color: rgb(237, 251, 248); width: 99%; height: 100%; min-height: 27px;min-width: 100px;">
<div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
<span title="收起提示" id="explanationZoom" style="display: block;"></span>
</div>
<ul>
<li><p>1、评价类型包含:导购评价、美容师评价、商城订单评价;</p>
<p>2、评价奖励包含:积分、成长值、优惠券、服务项目可由商家自行选择;</p>
</li>
</ul>
</div>
</div>
<form id="form_set" class="form" action="{:U('userevaluation/index')}" method="post" >
<!-- 类型 -->
<input type="hidden" value="{$type}" name="type">
<input type="hidden" value="1" name="is_ajax">
<div class="ncap-form-default">
<dl class="row">
<dt style="display: flex;justify-content:flex-end">
<a href="{:U('Newpeoplegift/lqlist',['type'=>2])}" class="ncap-btn ncap-btn-green"
style="display: flex;justify-content:center;align-items: center; border-radius: 7px;">领取记录</a>
</dt>
</dl>
<dl class="row" style="display: flex;align-items: center;">
<dt class="tit">*活动时间</dt>
<dd class="opt">
<input type="text" class="input-txt" id="startTime" placeholder="开始时间"
onkeydown="strkeydown(event, this, 'sumbitbtn')" name="begindate" value="{$list.begindate?date('Y-m-d H:i:s',$list.begindate):''}"
style="text-align: center; width: 140px !important"/>
<span style="margin:0px 3px;">至</span>
<input type="text" class="input-txt" id="endTime" placeholder="结束时间"
onkeydown="strkeydown(event, this, 'sumbitbtn')" name="enddate" value="{$list.enddate?date('Y-m-d H:i:s',$list.enddate):''}"
style="text-align: center;width: 140px !important"/>
</dd>
</dl>
<dl class="row" style="display: flex;">
<dt class="tit">
<div>*奖励类型</div>
</dt>
<dd class="opt" style="margin-top: 5px">
<span>礼包</span>
<select style="margin-left:5px;width: 110px;height: 25px"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
name="giftbagid" id="giftbagid">
<option value="">请选择</option>
<volist name="lblist" id="item">
<option value="{$item.id}" <if condition="$list.giftbagid eq $item.id">selected</if>>{$item.lbtitle}</option>
</volist>
</select>
<font color="red" style="margin-left: 20px">获取礼包为仅限活动使用</font>
</dd>
</dl>
<dl class="row" style="display: flex;">
<dt class="tit">*发放条件</dt>
<dd class="opt" >
<input id="condition1" type="checkbox" name="condition1" <if condition="stripos($list.sendconditions,',1,') nheq false">checked</if> style="margin-right: 5px;"><span>评价字数</span>
<input id="evaluatenum" name="evaluatenum" placeholder="字数" onkeydown="strkeydown(event, this, 'sumbitbtn')"
onkeyup="set_num(this)"
value="{$list.evaluatenum}" maxlength="5" class="input-txt num" type="text" >字
<!-- 只有商品评价才有晒图的选项 -->
<if condition="$type eq 1">
<br>
<input id="condition2" type="checkbox" name="condition2" <if condition="stripos($list.sendconditions,',2,') nheq false">checked</if> style="margin-right: 5px;">
<span style="margin-right: 5px;">评价嗮图</span>
</if>
</dd>
</dl>
<dl class="row">
<dt class="tit">*发放时间</dt>
<dd class="opt" >
即时奖励
</dd>
</dl>
<dl class="row">
<dt class="tit">
<div>*活动说明</div>
</dt>
<dd class="opt" >
<textarea class="span12 ckeditor" id="goods_content" name="remark" style="width: 800px;height: 500px;">{$list.remark}</textarea>
</dd>
</dl>
<dl class="row">
<div class="bot" style="padding:0; margin-left: 10px">
<a id="sumbitbtn" onclick="sumbitbtn()" class="ncap-btn-big ncap-btn-green" style="margin-left: 70px">确认提交</a>
</div>
</dl>
</div>
</form>
</body>
<script type="text/javascript">
$(document).ready(function () {
$("#startTime").layDate();
$("#endTime").layDate();
// 点击刷新数据
$('.fa-refresh').click(function () {
location.href = location.href;
});
// 表格行点击选中切换
$('#ajax_return').on('click', 'table>tbody >tr', function () {
$(this).toggleClass('trSelected');
var checked = $(this).hasClass('trSelected');
$(this).find('input[type="checkbox"]').attr('checked', checked);
});
// 刷选条件 鼠标 移动进去 移出 样式
$(".hDivBox > table > thead > tr > th").mousemove(function () {
$(this).addClass('thOver');
}).mouseout(function () {
$(this).removeClass('thOver');
});
if ($("input[name='order1']").val() == "") {
$("input[name='order1']").val("goods_id");
$("input[name='order2']").val("asc");
}
});
window.onload = function () {
var lis = document.getElementsByClassName("revalua_type");
var diagram = document.getElementById("diagram");
for (var i = 0; i <= lis.length; i++) {
lis[i].onclick = function () {
if (this.className == 'revalua_type') {
this.className = "type";
} else {
this.className = "revalua_type";
if(i==1) { $("#diagram").show(); }
}
}
}
}
function sumbitbtn() {
/*---时间---*/
if($('#startTime').val()==""){
layer.msg('请输入活动的开始时间', {icon: 2, time: 2000}); return false;
}
if($('#endTime').val()==""){
layer.msg('请输入活动的结束时间', {icon: 2, time: 2000});return false;
}
var exchange_startime = new Date($('#startTime').val().replace(/-/g, "/"));
var exchange_endtime = new Date($('#endTime').val().replace(/-/g, "/"));
if (exchange_endtime <= exchange_startime) {
$('#endtime').next().removeClass('dn');
layer.msg('结束时间必须大于开始时间', {icon: 2, time: 2000});
return false;
}
/*--选择礼包--*/
if($("#gifbagid").val()==""){
layer.msg('请选择礼包', {icon: 2, time: 2000});return false;
}
/*---发放条件--*/
var condition1=$("#condition1").is(':checked')
var condition2=$("#condition2").is(':checked')
if(!condition1 && !condition2){
layer.msg('请选择发放条件', {icon: 2, time: 2000});return false;
}
if(condition1){
var word_num= $.trim($("#evaluatenum").val());
if(word_num=="") { layer.msg('请填写评价字数', {icon: 2, time: 2000});return false;}
}
$("#form_set").submit();
}
function set_num(ob) {
var value=$(ob).val();
value=value.replace(/[^\d]/g,'')
$(ob).val(value);
}
</script>