save_info.html 31.1 KB
Newer Older
D
v1.2.0  
devil_gong 已提交
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
{{include file="public/header" /}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form form-validation view-save" action="{{:MyUrl('admin/goods/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/goods/index', $params)}}" enctype="multipart/form-data">
			<legend>
				<span class="fs-16">
					{{if empty($data['id'])}}
						商品添加
					{{else /}}
						商品编辑
					{{/if}}
				</span>
				<a href="{{:MyUrl('admin/goods/index', $params)}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
			</legend>

			<nav class="goods-nav">
				<ul>
					<li>
						<a href="#goods-nav-base">基础信息</a>
					</li>
					<li>
						<a href="#goods-nav-operations">商品规格</a>
					</li>
					<li>
						<a href="#goods-nav-photo">商品相册</a>
					</li>
					<li>
						<a href="#goods-nav-video">商品视频</a>
					</li>
					<li>
						<a href="#goods-nav-app">手机端详情</a>
					</li>
					<li>
						<a href="#goods-nav-web">电脑端详情</a>
					</li>
G
gongfuxiang 已提交
39 40 41
					<li>
						<a href="#goods-nav-extends">扩展数据</a>
					</li>
D
devil_gong 已提交
42 43 44
					<li>
						<a href="#goods-nav-seo">SEO</a>
					</li>
D
devil_gong 已提交
45 46 47
					<li class="am-text-center am-padding-xs nav-shrink-submit">
						<i class="am-icon-angle-double-right am-icon-sm"></i>
					</li>
D
v1.2.0  
devil_gong 已提交
48 49 50 51 52 53 54 55 56 57 58 59
				</ul>
			</nav>

			<!-- 基础信息 -->
			<div id="goods-nav-base" class="division-block">
				<label class="block nav-detail-title">基础信息</label>
				<div class="am-form-group">
					<label>标题名称</label>
					<div class="am-input-group am-input-group-sm">
						<input type="hidden" name="title_color" value="{{if !empty($data['title_color'])}}{{$data.title_color}}{{/if}}" />
						<input type="text" name="title" placeholder="标题名称" minlength="2" maxlength="60" data-validation-message="标题名称格式 2~60 个字符" class="am-form-field am-radius" {{if !empty($data)}} value="{{$data.title}}" {{/if}} {{if !empty($data['title_color'])}} style="color:{{$data.title_color}};" {{/if}} required />
						<span class="am-input-group-btn">
G
gongfuxiang 已提交
60
							<button class="am-btn am-btn-default am-btn-xs colorpicker-submit" type="button" data-input-tag="input[name='title']" data-color-tag="input[name='title_color']">
61
								<img src="{{$attachment_host}}/static/common/images/colorpicker.png" />
D
v1.2.0  
devil_gong 已提交
62 63 64 65
							</button>
						</span>
					</div>
				</div>
D
devil_gong 已提交
66 67
				<div class="am-form-group">
					<label>商品简述</label>
D
devil_gong 已提交
68
					<input type="text" name="simple_desc" placeholder="商品简述" maxlength="160" data-validation-message="商品简述格式 最多160个字符" class="am-radius" {{if !empty($data)}} value="{{$data.simple_desc}}"{{/if}} />
D
devil_gong 已提交
69
				</div>
D
v1.2.0  
devil_gong 已提交
70 71 72 73 74 75 76
				<div class="am-form-group">
					<label>商品型号</label>
					<input type="text" name="model" placeholder="商品型号" maxlength="30" data-validation-message="商品型号格式 最多30个字符" class="am-radius" {{if !empty($data)}} value="{{$data.model}}"{{/if}} />
				</div>
				<div class="am-form-group">
					<label>商品分类</label>
					<br />
D
devil_gong 已提交
77 78 79
					<select name="category_id" class="am-radius chosen-select" multiple="multiple" minchecked="1" data-placeholder="请选择..." data-validation-message="请至少选择一个商品分类" required>
						{{if !empty($goods_category_list)}}
							{{foreach $goods_category_list as $v}}
G
gongfuxiang 已提交
80 81 82 83 84 85 86 87 88 89 90
								<option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>一级 - {{$v.name}}</option>
								{{if !empty($v['items'])}}
									{{foreach $v.items as $vs}}
										<option style="padding-left: 30px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>二级-{{$vs.name}}</option>
										{{if !empty($vs['items'])}}
											{{foreach $vs.items as $vss}}
												<option style="padding-left: 60px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>三级-{{$vss.name}}</option>
											{{/foreach}}
										{{/if}}
									{{/foreach}}
								{{/if}}
D
v1.2.0  
devil_gong 已提交
91 92 93 94 95 96 97
							{{/foreach}}
						{{/if}}
					</select>
				</div>
				<div class="am-form-group">
					<label>品牌</label>
					<br />
D
devil_gong 已提交
98
					<select name="brand_id" class="am-radius chosen-select" data-placeholder="请选择..." data-validation-message="请至少选择一个商品分类">
D
v1.2.0  
devil_gong 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
						{{if !empty($brand_list)}}
							<option value="0">请选择...</option>
							{{foreach $brand_list as $v}}
								<optgroup label="{{$v.name}}">
									{{if !empty($v['items'])}}
										{{foreach $v.items as $vs}}
											<option style="padding-left: 30px;" value="{{$vs.id}}" {{if isset($data['brand_id']) and $data['brand_id'] eq $vs['id']}}selected{{/if}}>{{$vs.name}}</option>
										{{/foreach}}
									{{/if}}
								</optgroup>
							{{/foreach}}
						{{/if}}
					</select>
				</div>
				<div class="am-form-group">
					<label>生产地</label>
					<br />
D
devil_gong 已提交
116
					<select name="place_origin" class="am-radius chosen-select" data-placeholder="请选择..." data-validation-message="请选择生产地">
D
v1.2.0  
devil_gong 已提交
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
						<option value="0">请选择...</option>
						{{if !empty($region_province_list)}}
							{{foreach $region_province_list as $v}}
								<option value="{{$v.id}}" {{if !empty($data['place_origin']) and $v['id'] eq $data['place_origin']}}selected{{/if}}>{{$v.name}}</option>
							{{/foreach}}
						{{/if}}
					</select>
				</div>
				<div class="am-form-group">
					<label>库存单位</label>
					<input type="text" name="inventory_unit" placeholder="库存单位" minlength="1" maxlength="6" data-validation-message="库存单位格式 1~6 个字符" class="am-radius" {{if !empty($data)}} value="{{$data.inventory_unit}}"{{/if}} required />
				</div>
				<div class="am-form-group">
					<label>购买赠送积分</label>
					<input type="number" name="give_integral" placeholder="购买赠送积分" max="100000000" data-validation-message="购买赠送积分 0~100000000" class="am-radius" value="{{if empty($data)}}0{{else /}}{{$data.give_integral}}{{/if}}" required />
				</div>
				<div class="am-form-group">
D
devil_gong 已提交
134
					<label>最低起购数量<span class="am-form-group-label-tips">默认数值 1</span></label>
D
v1.2.0  
devil_gong 已提交
135 136 137
					<input type="number" name="buy_min_number" placeholder="最低起购数量" min="1" max="100000000" data-validation-message="最低起购数量 1~100000000" class="am-radius" value="{{if empty($data)}}1{{else /}}{{$data.buy_min_number}}{{/if}}" required />
				</div>
				<div class="am-form-group">
D
devil_gong 已提交
138
					<label>单次最大购买数量<span class="am-form-group-label-tips">单次最大数值 100000000, 小于等于0或空则不限</span></label>
D
v1.2.0  
devil_gong 已提交
139 140 141
					<input type="number" name="buy_max_number" placeholder="单次最大购买数量" min="0" max="100000000" data-validation-message="单次最大购买数量 1~100000000" class="am-radius" {{if !empty($data['buy_max_number'])}} value="{{$data.buy_max_number}}"{{/if}} />
				</div>
				<div class="am-form-group am-form-file">
D
devil_gong 已提交
142
					<label class="block">首页推荐图片<span class="am-form-group-label-tips">留空则取相册第一张图</span></label>
D
v1.2.0  
devil_gong 已提交
143 144 145 146 147 148 149 150 151 152 153 154
					<ul class="plug-file-upload-view goods-recommended-images-view" data-form-name="home_recommended_images" data-max-number="1" data-dialog-type="images">
						{{if !empty($data['home_recommended_images'])}}
							<li>
								<input type="text" name="home_recommended_images" value="{{$data.home_recommended_images}}" />
								<img src="{{$data.home_recommended_images}}" />
								<i>×</i>
							</li>
						{{/if}}
					</ul>
					<div class="plug-file-upload-submit" data-view-tag="ul.goods-recommended-images-view">+上传图片</div>
				</div>
				<div class="am-form-group">
D
devil_gong 已提交
155
					<label class="block">扣减库存<span class="am-form-group-label-tips">扣除规则根据后台配置->扣除库存规则而定</span></label>
D
v1.2.0  
devil_gong 已提交
156 157 158
					<input name="is_deduction_inventory" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if (isset($data['is_deduction_inventory']) and $data['is_deduction_inventory'] eq 1) or empty($data)}}checked="true"{{/if}} />
				</div>
				<div class="am-form-group">
D
devil_gong 已提交
159
					<label class="block">上下架<span class="am-form-group-label-tips">下架后用户不可见</span></label>
D
v1.2.0  
devil_gong 已提交
160 161 162
					<input name="is_shelves" value="1" type="checkbox" data-off-text="下架" data-on-text="上架" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if (isset($data['is_shelves']) and $data['is_shelves'] eq 1) or empty($data)}}checked="true"{{/if}} />
				</div>
				<div class="am-form-group">
D
devil_gong 已提交
163
					<label class="block">首页推荐<span class="am-form-group-label-tips">推荐后在首页展示</span></label>
D
v1.2.0  
devil_gong 已提交
164 165 166 167 168 169 170
					<input name="is_home_recommended" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_home_recommended']) and $data['is_home_recommended'] eq 1}}checked="true"{{/if}} />
				</div>
			</div>

			<!-- 规格 -->
			<div id="goods-nav-operations" class="division-block" data-spec-add-max-number="{{:MyC('common_spec_add_max_number', 3, true)}}">
				<label class="block nav-detail-title">商品规格</label>
D
devil_gong 已提交
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
				<div class="spec-quick am-margin-bottom-lg">
					<span class="business-operations-submit quick-spec-title-add">+快捷操作</span>
					<span class="business-operations-submit am-margin-left-sm am-icon-gg quick-spec-created">生成规格</span>
					<div class="goods-specifications">
						<table class="am-table am-table-bordered am-table-centered">
							<thead>
								<tr>
									<th class="spec-quick-th-title">规格名</th>
									<th class="spec-quick-th-value">规格值</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td class="am-text-middle">
										<i class="am-close am-close-spin quick-title-remove" data-index="168">×</i>
										<input type="text" name="spec_quick_title_0" placeholder="规格名" />
									</td>
									<td class="spec-quick-td-value am-cf">
										<div class="am-fl am-margin-xs value-item">
											<input type="text" class="am-fl" name="spec_quick_value_0" placeholder="规格值" />
											<i class="am-close am-close-spin quick-value-remove" data-index="168">×</i>
										</div>
										<div class="am-fl am-margin-xs value-item">
											<input type="text" class="am-fl" name="spec_quick_value_0" placeholder="规格值" />
											<i class="am-close am-close-spin quick-value-remove" data-index="168">×</i>
										</div>
										
										<div class="am-fl am-margin-xs value-item am-text-left">
											<span class="business-operations-submit quick-spec-value-add">+添加规格值</span>
										</div>
										
									</td>
								</tr>
								<tr>
									<td class="am-text-middle">
										<i class="am-close am-close-spin quick-title-remove" data-index="168">×</i>
										<input type="text" name="spec_quick_title_0" placeholder="规格名" />
									</td>
									<td class="spec-quick-td-value am-cf">
										<div class="am-fl am-margin-xs value-item">
											<input type="text" class="am-fl" name="spec_quick_value_0" placeholder="规格值" />
											<i class="am-close am-close-spin quick-value-remove" data-index="168">×</i>
										</div>
										<div class="am-fl am-margin-xs value-item">
											<input type="text" class="am-fl" name="spec_quick_value_0" placeholder="规格值" />
											<i class="am-close am-close-spin quick-value-remove" data-index="168">×</i>
										</div>
										
										<div class="am-fl am-margin-xs value-item am-text-left">
											<span class="business-operations-submit quick-spec-value-add">+添加规格值</span>
										</div>
										
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

D
v1.2.0  
devil_gong 已提交
230 231
				<span class="business-operations-submit specifications-nav-title-add">+添加规格</span>
				<div class="goods-specifications">
D
devil_gong 已提交
232
					<table class="am-table am-table-bordered am-table-centered specifications-table am-margin-bottom-sm">
D
v1.2.0  
devil_gong 已提交
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
						<thead class="title-nav">
							<tr>
								{{if !empty($specifications['type'])}}
									{{foreach $specifications.type as $type_v}}
										<th class="table-title table-title-{{$type_v.id}}">
											<i class="am-close am-close-spin title-nav-remove" data-index="{{$type_v.id}}">×</i>
											<input type="text" name="specifications_name_{{$type_v.id}}" placeholder="规格名" value="{{$type_v.name}}" data-validation-message="请填写规格名" required />
										</th>
									{{/foreach}}
								{{/if}}
								<th class="title-start">价格(元)</th>
								<th>库存</th>
								<th>重量(kg)</th>
								<th>规格编码</th>
								<th>条形码</th>
								<th>原价(元)</th>
G
gongfuxiang 已提交
249
								<th class="extend-btn">扩展</th>
D
v1.2.0  
devil_gong 已提交
250 251 252 253 254
								<th class="operation-btn">操作</th>
							</tr>
						</thead>
						<tbody>
							{{if empty($specifications['value'])}}
G
gongfuxiang 已提交
255
								<tr class="line-0" data-line-tag=".line-0">
D
v1.2.0  
devil_gong 已提交
256 257 258 259 260 261 262
									<td class="value-start">
										<input type="text" name="specifications_price[]" placeholder="价格" class="am-radius" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="请填写有效的销售金额" required />
									</td>
									<td>
										<input type="number" name="specifications_number[]" placeholder="库存" class="am-radius" min="1" max="100000000" pattern="^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$" data-validation-message="库存数量 1~100000000" required />
									</td>
									<td>
263
										<input type="number" name="specifications_weight[]" placeholder="重量" class="am-radius" maxlength="80" min="0.00" max="100000000.00" step="0.01" data-validation-message="规格重量 0.00~100000000.00" />
D
v1.2.0  
devil_gong 已提交
264 265 266 267 268 269 270 271
									</td>
									<td>
										<input type="text" name="specifications_coding[]" placeholder="编码" class="am-radius" maxlength="80" data-validation-message="规格编码最多80个字符" />
									</td>
									<td>
										<input type="text" name="specifications_barcode[]" placeholder="条形码" class="am-radius" maxlength="80" data-validation-message="条形码最多80个字符" />
									</td>
									<td>
G
gongfuxiang 已提交
272 273 274 275 276
										<input type="text" name="specifications_original_price[]" placeholder="原价" class="am-radius" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="请填写有效的原价" />
									</td>
									<td>
										<input type="hidden" name="specifications_extends[]" value="" class="line-extend-input" />
										<span class="fs-12 cr-blue c-p line-extend-btn">编辑</span>
D
v1.2.0  
devil_gong 已提交
277 278 279 280 281 282 283 284 285
									</td>
									<td>
										<!--operation-->
									</td>
								</tr>
							{{/if}}

							{{if !empty($specifications['value'])}}
								{{foreach $specifications.value as $line_k=>$line_v}}
G
gongfuxiang 已提交
286
									<tr class="line-{{$line_k}} {{if $line_k gt 0}} line-not-first{{/if}}" data-line-tag=".line-{{$line_k}}">
D
v1.2.0  
devil_gong 已提交
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
									{{foreach $line_v as $v}}
										{{if isset($v['data_type'])}}
											{{switch v.data_type}}
												{{case spec}}
													<td class="table-value table-value-{{$v.data.key}}">
														<input type="text" name="specifications_value_{{$v.data.key}}[]" placeholder="规格值" value="{{$v.data.value}}" data-validation-message="请填写规格值" required />
													</td>
												{{/case}}

												{{case base}}
													<td class="value-start">
														<input type="text" name="specifications_price[]" placeholder="价格" class="am-radius" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="请填写有效的销售金额" value="{{$v.data.price}}" required />
													</td>
													<td>
														<input type="number" name="specifications_number[]" placeholder="库存" class="am-radius" min="0" max="100000000" data-validation-message="库存数量 0~100000000" value="{{$v.data.inventory}}" required />
													</td>
													<td>
304
														<input type="number" name="specifications_weight[]" placeholder="重量" class="am-radius" min="0.00" max="100000000.00" step="0.01" data-validation-message="规格重量 0.00~100000000.00" value="{{if $v['data']['weight'] gt 0}}{{$v.data.weight}}{{/if}}" />
D
v1.2.0  
devil_gong 已提交
305 306 307 308 309 310 311 312
													</td>
													<td>
														<input type="text" name="specifications_coding[]" placeholder="编码" class="am-radius" maxlength="80" data-validation-message="规格编码最多80个字符" value="{{$v.data.coding}}" />
													</td>
													<td>
														<input type="text" name="specifications_barcode[]" placeholder="条形码" class="am-radius" maxlength="80" data-validation-message="条形码最多80个字符" value="{{$v.data.barcode}}" />
													</td>
													<td>
G
gongfuxiang 已提交
313 314 315
														<input type="text" name="specifications_original_price[]" placeholder="原价" class="am-radius" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="请填写有效的原价" value="{{if $v['data']['original_price'] gt 0}}{{$v.data.original_price}}{{/if}}" />
													</td>
													<td>
G
gongfuxiang 已提交
316
														<input type="hidden" name="specifications_extends[]" value="{{$v.data.extends}}" class="line-extend-input" />
G
gongfuxiang 已提交
317
														<span class="fs-12 cr-blue c-p line-extend-btn">编辑</span>
D
v1.2.0  
devil_gong 已提交
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
													</td>
													<td>
														{{if $line_k gt 0}}
															<span class="fs-12 cr-blue c-p m-r-5 line-copy">复制</span>
															<span class="fs-12 cr-red c-p line-remove">移除</span>
														{{else /}}
															<!--operation-->
														{{/if}}
													</td>
												{{/case}}
											{{/switch}}
										{{/if}}
									{{/foreach}}
									</tr>
								{{/foreach}}
							{{/if}}
						</tbody>
					</table>
					<span class="business-operations-submit specifications-line-add">+添加一行</span>
					<span class="business-operations-submit specifications-line-images-add m-l-10">+添加规格图片</span>
					<ul class="spec-images-list">
						<div class="am-alert am-alert-warning am-radius" data-am-alert>
G
gongfuxiang 已提交
340
						    规格名称与规格值保持一致,相同规格名称添加一次即可,重复添加则后面覆盖前面,顺序不影响前端展示效果。
D
v1.2.0  
devil_gong 已提交
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
						</div>
						{{if !empty($specifications['type'])}}
							{{foreach $specifications.type as $type}}
								{{if !empty($type['value'])}}
									{{foreach $type.value as $spec_key=>$spec}}
										{{if !empty($spec['images'])}}
											<li class="spec-images-items spec-images-items-{{$type.id}}{{$spec_key}}">
												<input type="text" name="spec_images_name[{{$type.id}}{{$spec_key}}]" placeholder="规格名称" class="am-radius t-c" data-validation-message="请填写规格名称" value="{{$spec.name}}" required >
												<ul class="plug-file-upload-view spec-images-view-{{$type.id}}{{$spec_key}}" data-form-name="spec_images[{{$type.id}}{{$spec_key}}]" data-max-number="1" data-delete='0' data-dialog-type="images">
													<li>
														<input type="hidden" name="spec_images[{{$type.id}}{{$spec_key}}]" value="{{$spec.images_old}}" data-validation-message="请上传规格图片" required />
														<img src="{{$spec.images}}" />
														<i>×</i>
													</li>
												</ul>
												<div class="plug-file-upload-submit" data-view-tag="ul.spec-images-view-{{$type.id}}{{$spec_key}}">+上传图片</div>
											</li>
										{{/if}}
									{{/foreach}}
								{{/if}}
							{{/foreach}}
						{{/if}}
					</ul>
				</div>
			</div>

			<!-- 相册 -->
			<div id="goods-nav-photo" class="division-block">
D
devil_gong 已提交
369
				<label class="block nav-detail-title">商品相册<span class="am-form-group-label-tips">可拖拽图片进行排序,建议图片尺寸一致</span></label>
D
devil_gong 已提交
370
				<ul class="plug-file-upload-view goods-photo-view" data-form-name="photo[]" data-max-number="30" data-dialog-type="images">
D
v1.2.0  
devil_gong 已提交
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387
					{{if !empty($data['photo'])}}
						{{foreach $data.photo as $v}}
							<li>
								<input type="text" name="photo[]" value="{{$v.images_old}}" />
								<img src="{{$v.images}}" />
								<i>×</i>
							</li>
						{{/foreach}}
					{{/if}}
				</ul>
				<div class="plug-file-upload-submit" data-view-tag="ul.goods-photo-view">+上传相册</div>
			</div>

			<!-- 视频 -->
			<div id="goods-nav-video" class="division-block">
				<label class="block nav-detail-title">商品视频</label>
				<div class="am-form-group am-form-file">
D
devil_gong 已提交
388
					<label class="block">短视频<span class="am-form-group-label-tips">视频比图文更有具带入感,仅支持 mp4 格式</span></label>
D
v1.2.0  
devil_gong 已提交
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
					<ul class="plug-file-upload-view plug-file-upload-view-video goods-video-view" data-form-name="video" data-max-number="1" data-dialog-type="video">
						{{if !empty($data['video'])}}
							<li>
								<input type="text" name="video" value="{{$data.video}}" />
								<video src="{{$data.video}}" controls>your browser does not support the video tag</video>
								<i>×</i>
							</li>
						{{/if}}
					</ul>
					<div class="plug-file-upload-submit" data-view-tag="ul.goods-video-view">+上传视频</div>
				</div>
			</div>

			<!-- app内容 -->
			<div id="goods-nav-app" class="division-block">
				<label class="block nav-detail-title">手机端详情</label>
				<ul class="content-app-items" data-max-count="10" data-required="1" data-images-name="content_app_images" data-content-name="content_app_text" data-images-text="图片" data-content-text="文本内容" data-delete-text="删除" data-drag-sort-text="拖拽排序">
					{{if !empty($data['content_app'])}}
						{{foreach $data.content_app as $v}}
							<li>
								<div>
									<div class="content-app-left">
										<label class="block">图片</label>
										<ul class="plug-file-upload-view goods-content-app-images-view-{{$v.id}}" data-form-name="content_app_images_{{$v.id}}" data-max-number="1" data-dialog-type="images">
											{{if !empty($v['images'])}}
												<li>
													<input type="text" name="content_app_images_{{$v.id}}" value="{{$v.images_old}}" />
													<img src="{{$v.images}}" />
													<i>×</i>
												</li>
											{{/if}}
										</ul>
										<div class="plug-file-upload-submit" data-view-tag="ul.goods-content-app-images-view-{{$v.id}}">+上传图片</div>
									</div>
									<div class="am-form-group content-app-right fr">
										<label>文本内容</label>
										<textarea rows="5" name="content_app_text_{{$v.id}}" maxlength="105000" class="am-radius" placeholder="文本内容" data-validation-message="文本内容最多 105000 个字符">{{if !empty($v)}}{{$v.content_old|raw}}{{/if}}</textarea>
									</div>
								</div>
								<i class="c-p fs-12 cr-red content-app-items-rem-sub">删除</i>
								<i class="c-m fs-12 drag-sort-submit">拖拽排序</i>
							</li>
						{{/foreach}}
					{{/if}}
				</ul>
				<span class="business-operations-submit content-app-items-add-sub">+添加手机详情</span>
			</div>

			<!-- web内容 -->
			<div id="goods-nav-web" class="division-block">
				<label class="block nav-detail-title">电脑端详情</label>
				<div class="am-form-group">
					<textarea class="am-radius am-validate" name="content_web" maxlength="105000" id="editor-tag" data-validation-message="电脑端详情内容最多 105000 个字符">{{if !empty($data)}}{{$data.content_web}}{{/if}}</textarea>
				</div>
			</div>

G
gongfuxiang 已提交
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
			<!-- 扩展数据 -->
			<div id="goods-nav-extends" class="division-block">
				<label class="block nav-detail-title">扩展数据<span class="am-form-group-label-tips-must">该区域为插件扩展数据,请按照插件文档填写相应的值</span></label>
				<!-- 插件扩展数据 start -->
				{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
	                <div class="plugins-tag">
	                    <span>plugins_view_admin_goods_save</span>
	                </div>
	            {{/if}}
				{{if !empty($plugins_view_admin_goods_save_data) and is_array($plugins_view_admin_goods_save_data)}}
					{{foreach $plugins_view_admin_goods_save_data as $hook}}
	                    {{if is_string($hook) or is_int($hook)}}
	                        {{$hook|raw}}
	                    {{/if}}
	                {{/foreach}}
				{{else /}}
					<div class="table-no"><i class="am-icon-warning"></i> 没有扩展数据</div>
				{{/if}}
				<!-- 插件扩展数据 end -->
			</div>

D
devil_gong 已提交
466 467 468
			<!-- seo -->
			<div id="goods-nav-seo" class="division-block">
				<label class="block nav-detail-title">SEO</label>
G
gongfuxiang 已提交
469
				{{include file="lib/seo" /}}
D
devil_gong 已提交
470 471
			</div>

G
gongfuxiang 已提交
472
			<div class="am-form-group am-form-group-refreshing">
D
v1.2.0  
devil_gong 已提交
473
				<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
G
gongfuxiang 已提交
474
				<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
D
v1.2.0  
devil_gong 已提交
475 476 477 478 479 480 481
			</div>
		</form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

G
gongfuxiang 已提交
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605
<!-- 规格扩展数据弹层 -->
<div class="am-popup" id="specifications-extends-popup">
	<div class="am-popup-inner">
		<div class="am-popup-hd">
			<h4 class="am-popup-title">规格扩展数据</h4>
			<span data-am-modal-close class="am-close">&times;</span>
		</div>
		<div class="am-popup-bd">
			<form class="am-form form-validation-specifications-extends view-save" request-type="sync" request-value="SpecificationsExtendsBack">
				{{if !empty($goods_specifications_extends) and is_array($goods_specifications_extends)}}
					{{foreach $goods_specifications_extends as $v}}
						<div class="am-alert am-alert-secondary">
							<label class="am-text-sm">{{$v.name}}</label>
							{{if !empty($v['desc'])}}
								<span class="am-text-xs am-text-warning am-margin-left-xs">{{$v.desc}}</span>
							{{/if}}
							{{if !empty($v['element'])}}
								{{foreach $v.element as $element}}
									<div class="am-form-group">
										<label class="block">{{$element.title}}{{if !empty($element['desc'])}}<span class="am-form-group-label-tips">{{$element.desc}}</span>{{/if}}</label>
										{{switch element.element}}
											{{case input}}
												{{if in_array($element['type'], ['radio', 'checkbox']) and !empty($element['element_data']) and is_array($element['element_data'])}}
													{{foreach $element.element_data as $element_data_key=>$element_data}}
														<label class="{{if isset($element['is_block']) and $element['is_block'] eq 1}}am-{{$element.type}}{{else /}}am-{{$element.type}}-inline{{/if}}">
															<input
																type="{{$element.type}}"
																name="{{$element.name}}"
																value="{{$element_data.value}}"

																{{if isset($data['config'][$element['name']]) and in_array($element_data['value'], explode(',', $data['config'][$element['name']]))}} checked{{/if}}

																{{if isset($element['minchecked']) and $element['type'] eq 'checkbox'}} minchecked="{{$element.minchecked}}"{{/if}}

																{{if isset($element['maxchecked']) and $element['type'] eq 'checkbox'}} maxchecked="{{$element.maxchecked}}"{{/if}}

																{{if isset($element['message'])}} data-validation-message="{{$element.message}}"{{/if}}

																{{if $element_data_key eq 0 and isset($element['is_required']) and $element['is_required'] eq 1}}required{{/if}}
																data-am-ucheck />
																{{$element_data.name}}
														</label>
													{{/foreach}}
												{{else /}}
													<input
														class="am-radius"
														type="{{$element.type}}"
														name="{{$element.name}}"
														value="{{if isset($data['config'][$element['name']])}}{{$data['config'][$element['name']]}}{{else /}}{{if isset($element['default'])}}{{$element.default}}{{/if}}{{/if}}"

														{{if isset($element['placeholder'])}} placeholder="{{$element.placeholder}}"{{/if}}

														{{if isset($element['message'])}} data-validation-message="{{$element.message}}"{{/if}}

														{{if isset($element['is_required']) and $element['is_required'] eq 1}} required{{/if}}
														/>
												{{/if}}
											{{/case}}
											{{case select}}
												{{if !empty($element['element_data']) and is_array($element['element_data'])}}
													<select
														class="chosen-select am-radius"
														name="{{$element.name}}"

														{{if isset($element['message'])}} data-validation-message="{{$element.message}}"{{/if}}

														{{if !empty($element['placeholder'])}} data-placeholder="{{$element.placeholder}}"{{/if}}

														{{if isset($element['is_multiple']) and $element['is_multiple'] eq 1}}
															multiple
															{{if isset($element['minchecked'])}} minchecked="{{$element.minchecked}}"{{/if}}
															{{if isset($element['maxchecked'])}} maxchecked="{{$element.maxchecked}}"{{/if}}
														{{/if}}

														{{if isset($element['is_required']) and $element['is_required'] eq 1}}required{{/if}}
													>
													{{if !isset($element['is_multiple']) or $element['is_multiple'] neq 1}}
														{{if !empty($element['placeholder'])}}
															<option value="">{{$element.placeholder}}</option>
														{{/if}}
													{{/if}}
														{{foreach $element.element_data as $element_data_key=>$element_data}}
															<option
																value="{{$element_data.value}}"
																{{if isset($data['config'][$element['name']]) and in_array($element_data['value'], explode(',', $data['config'][$element['name']]))}}selected{{/if}}
																>{{$element_data.name}}</option>
														{{/foreach}}
													</select>
												{{/if}}
											{{/case}}
											{{case textarea}}
												<textarea
													class="am-radius"
													name="{{$element.name}}"

													{{if isset($element['rows'])}} rows="{{$element.rows}}"{{/if}}

													{{if isset($element['placeholder'])}} placeholder="{{$element.placeholder}}"{{/if}}

													{{if isset($element['is_required']) and $element['is_required'] eq 1}}
														{{if isset($element['minlength'])}} minlength="{{$element.minlength}}"{{/if}}
														{{if isset($element['maxlength'])}} maxlength="{{$element.maxlength}}"{{/if}}
														required
													{{/if}}
												>{{if isset($data['config'][$element['name']])}}{{$data['config'][$element['name']]}}{{else /}}{{if isset($element['default'])}}{{$element.default}}{{/if}}{{/if}}</textarea>
											{{/case}}
										{{/switch}}
									</div>
								{{/foreach}}
							{{/if}}
						</div>
					{{/foreach}}

					<div class="am-form-group am-form-group-refreshing">
						<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block">确认</button>
					</div>
				{{else /}}
					<div class="table-no"><i class="am-icon-warning"></i> 没有扩展数据</div>
				{{/if}}
			</form>
		</div>
	</div>
</div>

D
v1.2.0  
devil_gong 已提交
606 607 608 609 610 611
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->

<!-- 拖拽排序初始化 -->
<script type="text/javascript">
G
gongfuxiang 已提交
612 613 614 615 616 617 618 619
// 规格扩展返回处理
function SpecificationsExtendsBack()
{
	var $extends_popup = $('#specifications-extends-popup');
    var data = GetFormVal('#specifications-extends-popup', true);
    $('.specifications-table').find($extends_popup.attr('data-line-extend')).find('.line-extend-input').val(JSON.stringify(data));
    $extends_popup.modal('close');
}
D
v1.2.0  
devil_gong 已提交
620
</script>