Edit.html
16 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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<form id="basicForm" role="form" class="form-horizontal form-bordered" method="post" action="<%action%>">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">基本信息</h4>
</div>
<div class="panel-body" id="basicInfo">
</div>
<div class="panel-heading">
<h4 class="panel-title">销售属性</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">颜色分类 <span class="red">*</span></label>
<p>
<%if list%>
<%each list as item%>
<button type="button" class="btn btn-default sortadd btn-xs" data-id="<%item.id%>"><%item.colorName%></button>
<%/each%>
<%/if%>
</p>
</div>
<div id="basicTable"></div>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a class="btn btn-default" href="/product/base/index">取消</a>
<button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/template" id="template">
[[each goodsSizeList as item __index]]
<div class="form-group">
<!-- <label class="col-sm-1 red">*</label> -->
<div class="col-sm-2">
<select class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码">
<option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option>
</select>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
<option value="Y">可补货</option>
</select>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-upmCode" value="[[item.upmCode]]" placeholder="UPM条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
[[if __index==goodsSizeList.length-1]]
<button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
[[/if]]
[[if __index!=0]]
<button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
[[/if]]
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="template2">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">品牌 <span class="red">*</span></label>
<div class="col-sm-2">
<select id="brandId" class="form-control" required placeholder="品牌">
<option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
</select>
</div>
<!-- <label class="col-sm-2 control-label">JIT供应商</label>
<div class="col-sm-2">
<select id="supplierId" class="form-control">
<option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option>
</select>
<div class="col-sm-12 control-label red">JIT商品必须选择JIT供应商</div>
</div> -->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">分类<span class="red">*</span></label>
<div class="col-sm-4">
<div id="tree"></div>
</div>
<label class="col-sm-1 control-label">厂家编号</label>
<div class="col-sm-2">
<input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
<div class="col-sm-10">
<input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">货品年<span class="red">*</span></label>
<div class="col-sm-2">
<select id="goodsYears" class="form-control" value="[[goodsYears||'2016']]">
[[each ENUMYEAR as item index]]
<option value="[[item.YEAR]]">[[item.YEAR]]</option>
[[/each]]
</select>
</div>
<label class="col-sm-1 control-label">货品季<span class="red">*</span></label>
<div class="col-sm-2">
<select id="goodsSeason" class="form-control" value="[[goodsSeason]]">
<option value="1">春</option>
<option value="2">夏</option>
<option value="3">秋</option>
<option value="4">冬</option>
<option value="5">春夏</option>
<option value="6">秋冬</option>
</select>
</div>
<!-- <label class="col-sm-1 control-label">商品属性<span class="red">*</span></label>
<div class="col-sm-2">
<select id="attribute" class="form-control" value="[[attribute]]">
<option value="1">普通商品</option>
<option value="2">赠品</option>
<option value="3">虚拟商品</option>
</select>
</div> -->
</div>
<!-- <div class="form-group">
<label class="col-sm-2 control-label">商品话题</label>
<div class="col-sm-10">
<input type="text" id="productTag" class="form-control" value="[[productTag]]" />
</div>
</div> -->
<div class="form-group">
<label class="col-sm-2 control-label">年龄层<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="checkbox" name="ageLevel" value="1">成人</label>
<label class="radio-inline">
<input type="checkbox" name="ageLevel" value="2">大童</label>
<label class="radio-inline">
<input type="checkbox" name="ageLevel" value="3">小童</label>
<label class="radio-inline">
<input type="checkbox" name="ageLevel" value="4">中童</label>
<label class="radio-inline">
<input type="checkbox" name="ageLevel" value="5">幼童</label>
<input type="hidden" id="ageLevel" name="ageLevel" value="[[ageLevel]]" for="checkbox" placeholder="年龄层" required />
</div>
<label class="col-sm-1 control-label">性别<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="gender" value="1">男</label>
<label class="radio-inline">
<input type="radio" name="gender" value="2">女</label>
<label class="radio-inline">
<input type="radio" name="gender" value="3">通用</label>
<input type="hidden" id="gender" name="gender" value="[[gender||'1']]" for="radio" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">重点款<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="grade" value="1">是</label>
<label class="radio-inline">
<input type="radio" name="grade" value="0">否</label>
</div>
<input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>
<label class="col-sm-1 control-label">适销季<span class="red">*</span></label>
<div class="col-sm-4">
<label class="radio-inline">
<input type="checkbox" name="seasons" value="spring">春</label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="summer">夏</label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="autumn">秋</label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="winter">冬</label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="年龄层" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">限量款</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="isLimited" value="Y">是</label>
<label class="radio-inline">
<input type="radio" name="isLimited" value="N">否</label>
</div>
<input id="isLimited" type="hidden" value="[[isLimited||'N']]" for="radio" />
[[if isAuditing==200]]
<label class="col-sm-1 control-label">是否预售</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="isAdvance" value="Y">是</label>
<label class="radio-inline">
<input type="radio" name="isAdvance" value="N">否</label>
<input type="hidden" id="isAdvance" value="[[isAdvance||'N']]" for="radio" />
</div>
[[/if]]
</div>
<!-- [[if isAuditing==200]]
<div class="form-group">
<label class="col-sm-2 control-label">是否奥莱</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="isOutLets" value="Y">是</label>
<label class="radio-inline">
<input type="radio" name="isOutLets" value="N">否</label>
<input type="hidden" id="isOutLets" value="[[isOutLets||'N']]" for="radio" />
</div>
</div>
[[/if]] -->
<!-- [[if isAuditing==200]]
<div class="form-group">
<label class="col-sm-2 control-label">是否VIP</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="isVip" value="B">品牌设置</label>
<label class="radio-inline">
<input type="radio" name="isVip" value="Y">开启</label>
<label class="radio-inline">
<input type="radio" name="isVip" value="N">关闭</label>
<input type="hidden" id="isVip" value="[[isVip||'B']]" for="radio" />
</div>
</div>
[[/if]]
-->
<div class="form-group">
<label class="col-sm-2 control-label">吊牌价<span class="red">*</span></label>
<div class="col-sm-2">
<input type="text" id="retailPriceStr" class="form-control" required value="[[retailPriceStr]]" match="numbers" placeholder="吊牌价" />
</div>
<label class="col-sm-1 control-label">销售价<span class="red">*</span></label>
<div class="col-sm-2">
<input type="text" id="salesPriceStr" class="form-control" required value="[[salesPriceStr]]" match="numbers" placeholder="销售价" />
</div>
</div>
<div class="form-group">
[[if isAdvance=='Y']]
<label class="col-sm-2 control-label" id="expectArrivalTimeStrTxt">预计到货时间<span class="red">*</span></label>
<div class="col-sm-2">
<input type="text" id="expectArrivalTimeStr" jsaction="time" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" required placeholder="预计到货时间" />
</div>
[[else]]
<label class="col-sm-2 control-label" id="expectArrivalTimeStrTxt">预计到货时间</label>
<div class="col-sm-2">
<input type="text" id="expectArrivalTimeStr" jsaction="time" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" placeholder="预计到货时间" />
</div>
[[/if]]
</div>
</div>
</script>
<script type="text/template" id="template3">
<div class="form-group">
[[if inputType=='checkbox']]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" value="[[__val||'']]" [[required]] for="checkbox" placeholder="[[attributeName]]"/>
[[/if]]
[[if inputType=='radio']]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" />
[[/if]]
[[if inputType=='select']]
<select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]>
<option value="">请选择[[attributeName]]</option>
[[each idNameList as item index ]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
[[/if]]
[[if inputType=='text']]
<input type="text" class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/>
[[/if]]
[[if inputType=='textarea']]
<textarea class="form-control attr_input" data-index='[[__index]]' [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]">[[val||'']]</textarea>
[[/if]]
</div>
</script>
<%include '../../../common/views/__ui/footer'%>