addDirectCoupon.html
7.9 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
<style>
form select{min-width: 0;}
</style>
<div class="pageheader notab">
<h1 class="pagetitle">添加直减优惠券信息</h1>
<span class="pagedesc">用于添加直减优惠券信息,并设置相关直减优惠券规则</span>
<ul class="hornav">
<li class="current"><a href="javascript:void(0)">直减优惠券信息</a></li>
</ul>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
<div class="contenttitle2">
<h3>直减优惠券信息表单</h3>
</div>
<!--contenttitle-->
<form class="stdform stdform2" method="post" action="javascript:void(0);">
<p>
<label>优惠券名称</label>
<span class="field">
<input type="text" id="firstname2" class="longinput" name="name"
ng-model="coupon.couponName" ng-value="{{coupon.couponName}}" style="width: 300px;"/>
<span style="color: red;">(优惠券名称不能为空)</span>
</span>
</p>
<p ng-show="isEdit == 0">
<label>优惠券范围</label>
<span class="field" ng-show="suppliersFlag == 1">
<select name="typeId" id="selection2" style="width: 150px;" ng-model="productRangeObj" ng-change="selectProductRange()"
ng-options="range.text for range in productRanges">
<option value=''>--选择优惠券范围--</option>
</select>
<span style="color: red;">(优惠券范围不能为空)</span>
</span>
<span class="field" ng-show="suppliersFlag == 0">
<select name="typeId" id="selection2" style="width: 150px;" ng-model="productRangeObj" ng-change="selectProductRange()"
>
<option value=''>全品类</option>
</select>
<span style="color: red;">(优惠券范围不能为空)</span>
</span>
</p>
<p ng-show="isEdit == 1">
<label>优惠券范围</label>
<span class="field" style="color: red">
{{coupon.rangTypeStr}}
</span>
</p>
<p ng-show="coupon.productRange == 1 && isEdit == 0">
<label>选择专场</label>
<span class="field">
<select name="campaginId" id="selection2" ng-model="campaginCategory" ng-options="campagincategory.name for campagincategory in campaginCategorys">
<option value="">--选择商品专场--</option>
</select>
</span>
</p>
<p ng-show="coupon.productRange == 1 && isEdit == 1">
<label>选择专场</label>
<span class="field" style="color: red">
{{coupon.rangeName}}
</span>
</p>
<p ng-show="coupon.productRange == 2 && isEdit == 0">
<label>选择商品</label>
<span class="field">
<select name="selection" id="selection2"
ng-change="onChangeCategoryId()"
ng-model="parentCategoryObj"
ng-options="category.name for category in parentCategory" style="width: 120px;">
<option value="">--选择商品分类--</option>
</select>
<select name="selection" id="selection2"
ng-change="onChangeChildCategory()"
ng-model="childrenCategoryObj"
ng-options="childcategory.name for childcategory in childrenCategory" style="width: 160px;">
<option value="">--选择商品二级分类--</option>
</select>
<select name="selection" id="selection2"
ng-change="onChangeSecondChildCategory()"
ng-model="secondChildrenCategoryObj"
ng-options="childcategory.name for childcategory in secondChildrenCategory" style="width: 200px;">
<option value="">--选择商品三级分类--</option>
</select>
<select name="selection" id="selection2"
ng-change="onChangeProduct()"
ng-model="productObj"
ng-options="product.name for product in productList" style="width: 280px;">
<option value="">--选择商品--</option>
</select>
</span>
</p>
<p ng-if="coupon.productRange == 2 && isEdit == 1">
<label>选择商品</label>
<span class="field" style="color: red">
{{coupon.rangeName}}
</span>
</p>
<p>
<label>优惠券面额</label>
<span class="field">
<input type="text" id="firstname2" class="longinput" name="buyLimitNum"
ng-model="coupon.couponMoney" ng-value="{{coupon.couponMoney}}" style="width: 150px;"/> 元
<span style="color: red;">*(必填项)</span>
</span>
</p>
<p>
<label>优惠券发行量</label>
<span class="field">
<input type="text" id="firstname2" class="longinput" name="buyLimitNum"
ng-model="coupon.couponNum" ng-value="{{coupon.couponNum}}" style="width: 150px;"/>
<span style="color: red;">*(必填项)</span>
</span>
</p>
<p>
<label>优惠券发放日期</label>
<span class="field">
<input type="text" id="receiveStartDate" date-format placeholder="请输入开始日期" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="width: 150px;" ng-model="coupon.receiveStartDate" ng-value="{{coupon.receiveStartDate}}"/>
--<input type="text" id="receiveEndDate" date-format placeholder="请输入结束日期" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss',choose:checkDate})" style="width: 150px;" ng-model="coupon.receiveEndDate" ng-value="{{coupon.receiveEndDate}}"/>
</span>
</p>
<p ng-if="isEdit == 0 && suppliersFlag == 0">
<label>发放方式</label>
<span class="field">
<select name="typeId" id="selection2" style="width: 150px;" ng-model="coupon.getSource" >
<option value=''>--选择优惠券发放方式--</option>
<option value='0'>V商城</option>
<option value='1'>新微商</option>
</select>
<span style="color: red;">*(必填项)</span>
</span>
</p>
<p ng-if="isEdit == 1">
<label>发放方式</label>
<span class="field" ng-if="coupon.getSource == 0">
V商城
</span>
<span class="field" ng-if="coupon.getSource == 1">
新微商
</span>
</p>
<p>
<label>优惠券使用有效期</label>
<span class="field">
<input type="text" id="useStartDate" date-format placeholder="请输入开始日期" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="width: 150px;" ng-model="coupon.useStartDate" ng-value="{{coupon.useStartDate}}"/>
--<input type="text" id="useEndDate" date-format placeholder="请输入结束日期" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss',choose:checkUserDate})" style="width: 150px;" ng-model="coupon.useEndDate" ng-value="{{coupon.useEndDate}}"/>
</span>
</p>
<p>
<label>使用说明</label>
<span class="field">
<textarea rows="4" cols="220" class="longinput" name="remark" ng-model="coupon.directCutInstruction" ng-value="{{coupon.directCutInstruction}}"></textarea>
<span style="color: red;">(使用说明不能为空)</span>
</span>
</p>
<p>
<label>激活状态</label> <span class="field">
<select name="typeId" id="status" style="width: 150px;" ng-model="coupon.status" >
<option value='0' selected="selected">未生效 </option>
<option value='1' >激活</option>
</select>
</span>
</p>
<p class="stdformbutton">
<button class="submit radius2" ng-click="onSubmitDirectCoupon()">提交</button>
<button class="reset radius2" onClick="history.go(-1);" style="background-color: #c0c0c0; border:1px solid #c0c0c0; margin-left:20px;">返回</button>
</p>
</form>
<br />
</div>
<!--subcontent-->
</div>
<!--contentwrapper-->
<script>
function checkDate(){
var endDate = $("#receiveEndDate").val();
if(endDate !=null && endDate !=""){
if(endDate.substring("11",endDate.length) =="00:00:00" ){
$("#receiveEndDate").val(endDate.substring(0,10)+" 23:59:59");
}
}
}
function checkUserDate(){
var endDate = $("#useEndDate").val();
if(endDate !=null && endDate !=""){
if(endDate.substring("11",endDate.length) =="00:00:00" ){
$("#useEndDate").val(endDate.substring(0,10)+" 23:59:59");
}
}
}
</script>