<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/product_update.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/ueditor.config.js?dir=product&host={{ kg['server']['HTTP_HOST'] }}"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/ueditor.all.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/third-party/codemirror/codemirror.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/ueditor/third-party/zeroclipboard/ZeroClipboard.js"></script>
<script src="{{kg['tpl_url']}}script/amazeui.datetimepicker.min.js"></script>
<script src="{{kg['tpl_url']}}script/cropper.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{ kg['tpl_url'] }}script/product_update.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				添加商品
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li><a href="product_manage">商品与产品管理</a></li>
				<li class="active">添加商品</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold"> <span class="am-icon-code"></span>&nbsp;添加商品</div>
					<div class="tpl-portlet-input tpl-fz-ml am-no-margintop">
						<div class="am-btn-toolbar  ngre-Hdadd-paddidngT">
							<div class="am-btn-group am-btn-group-xs">
								<a class="am-btn am-btn-secondary" id="regbaocun3"><span class="am-icon-save"></span>&nbsp;保存</a>
								<a href="product_update" class="am-btn am-btn-success"><span class="am-icon-retweet"></span>&nbsp;重置</a>
								<a href="product_manage" class="am-btn  am-btn-danger"><span class="am-icon-mail-reply"></span>&nbsp;返回</a>
							</div>
						</div>
					</div>
				</div>
				<input type="hidden" id="data_id" value="{{data['id']}}"/>
				<div class="tpl-block">
					<div class="am-g">
						<div class="tpl-form-body tpl-form-line">
							<form method="post" action="" class="am-form tpl-form-line-form" id="form-sublime2">
								<div class="am-form-group posi_box">
									<label for="Category" class="am-u-md-2 am-form-label ">所属栏目&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Column</span></label>
									<div class="am-u-md-2  am_fl_zi_tihuan posi_box2 ng-add-span ag-add-width">
										<select data-am-selected="{btnSize: 'sm'}" id="lanmu" name="category" style="display: none;">
											{% set cate = category|length %}
											{% if cate > 1 %}
											{% for row in category %}
											{% if row['title'] == data['category_title'] %}
											<option selected="selected" value="{{row['id']}}">
												{% if row['level'] > 1 %}
												├
												{%- for i in range(row['level']-1) -%}
												───
												{%- endfor -%}
												{% endif %}
												{{row['title']}}</option>
											{% else %}
											<option value="{{row['id']}}">
												{% if row['level'] > 1 %}
												├
												{%- for i in range(row['level']-1) -%}
												───
												{%- endfor -%}
												{% endif %}
												{{row['title']}}</option>
											{% endif %}
											{% endfor %}
											{% endif %}
										</select>
									</div>
								</div>
								<div class="am-form-group speci-div">
									<label for="Model" class="am-u-md-2 am-form-label ">商品规格&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Specifications</span></label>
									{% if not data['price']|length %}
									<div class="speci-box">
										{% for row in speci %}
										<div class="am-u-md-2 modify-width">
											<select data-am-selected="{btnSize: 'sm'}" name="speci_{{row['id']}}">
												<option value="null">请选择{{row['name']}}</option>
												{% for var in row['param'] %}
												{% set index = loop.index0 %}
												<option value="{{loop.index0}}">{{var}}</option>
												{% endfor %}
											</select>
										</div>
										{% endfor %}
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">库存<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" id="Model" name="inventory[]" value="" placeholder="" class=""></div>
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">价格<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" name="price[]" value="" placeholder="" class=""></div>
										<div class="am-u-md-2" style="height: 40px; width: 40px;">
											<input type="hidden" name="specipic[]" value="">
										</div>
										<div class="ewm-upload  btn-add" id="" data-btn="speci" style="height: 40px; width: 40px;">
											<input name="image" type="text" class="input-file" id="qrcodeInput">
											<div class="sm-shuline"></div>
											<div class="sm-hengline"></div>
										</div>
										<div class="am-u-md-2 input-number am-plus-box">
											<span class="am-icon-plus-circle"></span>
										</div>
									</div>
									{% endif %}
									{% for i in range(data['price']|length) %}
									{% if loop.index0 == 0 %}
									<div class="speci-box">
										{% for row in speci %}
										<div class="am-u-md-2 modify-width">
											<select data-am-selected="{btnSize: 'sm'}" name="speci_{{row['id']}}">
												<option value="null">请选择{{row['name']}}</option>
												{% for var in row['param'] %}
												{% set index = loop.index0 %}
												<option {% for a in data['speci'][i] %}{% if a[0] == row['id'] and a[1] == index %}selected="selected"{% endif %}{% endfor %} value="{{loop.index0}}">{{var}}</option>
												{% endfor %}
											</select>
										</div>
										{% endfor %}
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">库存<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" id="Model" name="inventory[]" value="{{data['inventory'][i]}}" placeholder="" class=""></div>
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">价格<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" name="price[]" value="{{data['price'][i]}}" placeholder="" class=""></div>
										<div class="am-u-md-2" style="height: 40px; width: 40px;">
											{% if data['specipic'][i] %}<img src="{{data['specipic'][i]}}" style="height: 40px; width: 40px"/>{% endif %}
											<input type="hidden" name="specipic[]" value="{{data['specipic'][i]}}">
										</div>
										<div class="ewm-upload  btn-add" id="" data-btn="speci" style="height: 40px; width: 40px;">
											<input name="image" type="text" class="input-file" id="qrcodeInput">
											<div class="sm-shuline"></div>
											<div class="sm-hengline"></div>
										</div>
										<div class="am-u-md-2 input-number am-plus-box">
											<span class="am-icon-plus-circle"></span>
										</div>
									</div>
									{% else %}
									<div class="speci-box add-margin">
										{% for row in speci %}
										<div class="am-u-md-2 modify-width">
											<select data-am-selected="{btnSize: 'sm'}" name="speci_{{row['id']}}">
												<option value="null">请选择{{row['name']}}</option>
												{% for var in row['param'] %}
												{% set index = loop.index0 %}
												<option {% for a in data['speci'][i] %}{% if a[0] == row['id'] and a[1] == index %}selected="selected"{% endif %}{% endfor %} value="{{loop.index0}}">{{var}}</option>
												{% endfor %}
											</select>
										</div>
										{% endfor %}
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">库存<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" id="Model" name="inventory[]" value="{{data['inventory'][i]}}" placeholder="" class=""></div>
										<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">价格<span class="tpl-form-line-small-title"></span></label>
										<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" name="price[]" value="{{data['price'][i]}}" placeholder="" class=""></div>
										<div class="am-u-md-2" style="height: 40px; width: 40px;">
											{% if data['specipic'][i] %}<img src="{{data['specipic'][i]}}" style="height: 40px; width: 40px"/>{% endif %}
											<input type="hidden" name="specipic[]" value="{{data['specipic'][i]}}">
										</div>
										<div class="ewm-upload  btn-add" id="" data-btn="speci" style="height: 40px; width: 40px;">
											<input name="image" type="text" class="input-file" id="qrcodeInput">
											<div class="sm-shuline"></div>
											<div class="sm-hengline"></div>
										</div>
										<div class="am-u-md-2 input-number am-plus-box">
											<span class="am-icon-minus-circle"></span>
										</div>
									</div>
									{% endif %}
									{% endfor %}
								</div>
								<div class="am-form-group am-form-icon am-form-feedback">
									<label for="Title" class="am-u-md-2 am-form-label">商品名称&nbsp;/&nbsp;<span class="tpl-form-line-small-title">TradeName</span></label>
									<div class="am-u-md-8  am_fl_zi_tihuan posi_box">
										<input type="text" placeholder="输入商品名称" class="tpl-form-input am-reg-input ngco_Ojs_bitian" id="Title" name="title" value="{{data['title']}}">
										<i class=""></i>
									</div>
								</div>
								<div class="am-form-group">
									<label for="Tag" class="am-u-md-2 am-form-label ">Tag标签&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Tag</span></label>
									<div class="am-u-md-8 am_fl_zi_tihuan"><input type="text" id="Tag" name="tag" value="{{data['tag']}}" placeholder="输入Tag标签" class=""></div>
								</div>
								<div class="am-form-group">
								</div>
								<div class="am-form-group">
									<label for="Sort" class="am-u-md-2 am-form-label ">自定义排序&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Sort</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<input type="text" id="Sort" name="sort" value="{{data['sort']}}" placeholder="">
										<div></div>
									</div>
									<label for="Market" class="am-u-md-1 am-form-label ">市场价</label>
									<div class="am-u-md-1 am_fl_zi_tihuan"><input type="text" id="Market" name="market" value="{{data['market']}}" placeholder="" class=""></div>
									<label for="Brand" class="am-u-md-1 am-form-label ">品牌</label>
									<div class="am-u-md-2 am_fl_zi_tihuan"><input type="text" name="brand" id="Brand" value="{{data['brand']}}" placeholder="品牌" class=""></div>
								</div>
								<div class="am-form-group">
									<label for="Filename" class="am-u-md-2 am-form-label ">自定义文件名&nbsp;/&nbsp;<span class="tpl-form-line-small-title">File</span></label>
									<div class="am-u-md-8 am_fl_zi_tihuan"><input type="text" id="Filename" name="filename" value="{{data['filename']}}" placeholder="" class=""></div>
								</div>
								<div class="am-form-group">
									<label for="Introduction" class="am-u-md-2 am-form-label ">内容摘要&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Abstract</span></label>
									<div class="am-u-md-8 am_fl_zi_tihuan"><input type="text" id="Introduction" name="introduction" value="{{data['introduction']}}" placeholder="" class=""></div>
								</div>
								<div class="am-form-group div_posi posi_box4">
									<label for="Units" class="am-u-md-2 am-form-label ">计量单位&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Company</span></label>
									<div class="am-u-md-2 am_fl_zi_tihuan "><input type="text" id="Units" class=" input_class" name="units" value="{{data['units']}}" size="7" maxlength="20"></div>
									<div class="am-u-md-2  am_fl_zi_tihuan ngpr-Ofu-diwei ty-units">
										<select data-am-selected="{btnSize: 'sm'}" style="display: none;">
											<option selected="selected" value="0">请选择计量单位</option>
											<option value="个">个</option>
										</select>
									</div>
								</div>
								<div class="am-form-group">
									<label for="Click" class="am-u-md-2 am-form-label ">浏览次数&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Browse</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan"><input type="text" id="Click" name="click" value="{{data['click']}}" placeholder=""></div>
									<label for="Agree" class="am-u-md-1 am-form-label ">顶帖人数</label>
									<div class="am-u-md-1 am_fl_zi_tihuan"><input type="text" id="Agree" name="agree" value="{{data['agree']}}" placeholder="" class=""></div>
									<label for="Commenttotal" class="am-u-md-1 am-form-label ">评论人数</label>
									<div class="am-u-md-1 am_fl_zi_tihuan"><input type="text" name="commenttotal" value="{{data['commenttotal']}}" id="Commenttotal" placeholder="" class=""></div>
									<label for="Favorite" class="am-u-md-1 am-form-label ">收藏人数</label>
									<div class="am-u-md-1 am_fl_zi_tihuan"><input type="text" id="Favorite" name="favorite" value="{{data['favorite']}}" placeholder="" class="" /></div>
								</div>
								<div class="am-form-group">
									<label for="Model" class="am-u-md-2 am-form-label ">商品型号&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Model</span></label>
									<div class="am-u-md-2 am_fl_zi_tihuan"><input type="text" id="Model" name="model" value="{{data['model']}}" placeholder="" class=""></div>
									<label for="Coding" class="am-u-md-1 am-form-label ">商品编码</label>
									<div class="am-u-md-2 am_fl_zi_tihuan"><input type="text" name="coding" id="coding" value="{{data['coding']}}" placeholder="" class=""></div>
								</div>



<!--								缩略图-->
								<div class="am-form-group a-clic">
									<label class="am-u-md-2 am-form-label">缩略图&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Thumbnail</span></label>
									<ul data-am-widget="gallery" class="am-gallery sm-block-grid-2 md-block-grid-3 lg-block-grid-4 am-gallery-bordered ngsty-Iul am-no-layout" data-am-gallery="{ pureview: true }" id="picture_view">
										{% if data['thumbnail'] %}
										<li style="float: left;position: relative">
											<div class="tpl-table-images-content-i-info absolute-middle">
												<button type="button" class="btn1 btnsty am-btn-circle am-btn am-btn-success am-margin-horizontal btn-update ty-button" data-btn='update2'><i class="am-icon-pencil-square-o"></i>&nbsp;修改</button>
												<button type="button" class="btnsty am-btn-circle am-btn am-btn-danger am-margin-horizontal btn-remove ty-button" data-btn='remove2'><i class="am-icon-remove ngsty-rem"></i>&nbsp;删除</button>
												<button type="button" class="btnsty am-btn-circle am-btn am-btn-secondary am-margin-horizontal btn-search ty-button" data-btn='search'><span class="search1"><i class="am-icon-search ngsty-rem"></i>&nbsp;查看</span></button>
											</div>
											<img src="{{data['thumbnail']}}" height="150" width="265" alt="">
											<input type="hidden" name="thumbnail" value="{{data['thumbnail']}}"/>
										</li>
										{% endif %}
									</ul>
									{% if not data['thumbnail'] %}
									<div class="ewm-upload  btn-add" id="thumbnail" data-btn="add2">
										<input name="image" type="text" class="input-file" id="qrcodeInput">
										<div class="shuline"></div>
										<div class="hengline"></div>
									</div>
									{% endif %}
								</div>
								<!-- 上传图片 -->
								<div class="am-form-group a-clic ngar-Simg">
									<label class="am-u-md-2 am-form-label ngar-Simlab">上传图片&nbsp;/&nbsp;<span class="tpl-form-line-small-title">UploadImg</span></label>
									<ul data-am-widget="gallery" class="am-gallery sm-block-grid-2 md-block-grid-3 lg-block-grid-4 am-gallery-bordered ngsty-Iul am-no-layout" data-am-gallery="{ pureview: true }" id="picture_view">
										{% for row in data['picture'] %}
										<li style="float: left;position: relative">
											<div class="tpl-table-images-content-i-info absolute-middle">
												<button type="button" class="btn1 btnsty am-btn-circle am-btn am-btn-success am-margin-horizontal btn-update ty-button" data-btn='update'><i class="am-icon-pencil-square-o"></i>&nbsp;修改</button>
												<button type="button" class="btnsty am-btn-circle am-btn am-btn-danger am-margin-horizontal btn-remove ty-button" data-btn='remove'><i class="am-icon-remove ngsty-rem"></i>&nbsp;删除</button>
												<button type="button" class="btnsty am-btn-circle am-btn am-btn-secondary am-margin-horizontal btn-search ty-button" data-btn='search'><span class="search1"><i class="am-icon-search ngsty-rem"></i>&nbsp;查看</span></button>
											</div>
											<img src="{{row}}" height="150" width="265" alt="">
											<input type="hidden" name="picture[]" value="{{row}}"/>
										</li>
										{% endfor %}
									</ul>
									<div class="ewm-upload  btn-add" id="qrcodeUpload" data-btn="add" style="height: 75px; width: 75px;">
										<input name="image" type="text" class="input-file" id="qrcodeInput">
										<div class="shuline"></div>
										<div class="hengline"></div>
									</div>
								</div>
								<!-- 上传图片结束 -->
								<div class="am-form-group">
									<div class="tpl-switch">
										<label class="am-u-md-2 am-form-label">所有人可以访问&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Visit</span></label>
										<div class="am-u-md-1  am_fl_zi_tihuan">
											<input name="authority[]" type="radio" id="all" value="0" class="ios-switch bigswitch tpl-switch-btn" {% if 0 in data['authority'] %}checked=""{% endif %}>
											<div class="tpl-switch-btn-view" id="button-all">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group" id="permission">
									<label class="am-u-md-2 am-form-label">权限设置&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Jurisdiction</span></label>
									<div class="am-u-md-1  am_fl_zi_tihuan" style="width: 80%">
										{% for row in rank %}
										<label class="am-radio-inline">
											<input type="checkbox" {% if row['id'] in data['authority'] %}checked="checked"{% endif %} name="authority[]" value="{{ row['id'] }}"> {{ row['rankname'] }}
										</label>
										{% endfor %}
									</div>
								</div>



								<div class="am-form-group">
									<label for="virtual" class="am-u-md-2 am-form-label ">虚拟商品&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Fictitious</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Comment" name="virtual" class="ios-switch bigswitch tpl-switch-btn" {% if data['virtual'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
									<label for="Status" class="am-u-md-2 am-form-label ">销售状态&nbsp;/&nbsp;<span class="tpl-form-line-small-title">State</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Comment" name="status" class="ios-switch bigswitch tpl-switch-btn" {% if data['status'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
									<label for="Audit" class="am-u-md-2 am-form-label ">审核&nbsp;/&nbsp;<span class=""><span class="tpl-form-line-small-title">Examine</span></span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Comment" name="audit" class="ios-switch bigswitch tpl-switch-btn" {% if data['audit'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group">
									<label for="comment" class="am-u-md-2 am-form-label ">是否允许评论&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Comment</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Comment" name="comment" class="ios-switch bigswitch tpl-switch-btn" {% if data['comment'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
									<label for="published" class="am-u-md-2 am-form-label ">是否发布&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Release</span></label>
									<div class="am-u-md-1 am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Published" name="published" class="ios-switch bigswitch tpl-switch-btn" {% if data['published'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
									<label for="recom" class="am-u-md-2 am-form-label">是否推荐&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Recommend</span></label>
									<div class="am-u-md-1  am_fl_zi_tihuan">
										<div class="tpl-switch">
											<input type="checkbox" id="Recom" name="recom" class="ios-switch bigswitch tpl-switch-btn" {% if data['recom'] %}checked{% endif %} />
											<div class="tpl-switch-btn-view">
												<div></div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group">
									<label for="Template" class="am-u-md-2 am-form-label ">指定模板&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Template</span></label>
									<div class="am-u-md-8 am_fl_zi_tihuan"><input type="text" name="template" id="Template" value="{{data['template']}}"  class=""></div>
								</div>
								<div class="am-form-group">
									<label for="Sales" class="am-u-md-2 am-form-label ">已销售数量&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Sale</span></label>
									<div class="am-u-md-3 am_fl_zi_tihuan"><input type="text" name="sales" id="Sales" value="{{data['sales']}}" placeholder="" class=""></div>
								</div>
								<div class="am-form-group">
									<label for="Keyword" class="am-u-md-2 am-form-label ">SEO关键字&nbsp;/&nbsp;<span class="tpl-form-line-small-title">SEOKeyword</span></label>
									<div class="am-u-md-8 am_fl_zi_tihuan"><input type="text" name="keyword" id="Keyword" value="{{data['keyword']}}" placeholder="多个关键词请用逗号隔开" class=""></div>
								</div>
								<div class="am-form-group">
									<label for="Describe" class="am-u-md-2 am-form-label ">SEO页面描述&nbsp;/&nbsp;<span class="tpl-form-line-small-title">SEODescribe</span></label>
									<div class="am-u-md-8  am_fl_zi_tihuan"><input type="text" placeholder="" id="Describe" name="description" value="{{data['description']}}"></div>
								</div>
								<div class="am-form-group">
									<label for="Publisher" class="am-u-md-2 am-form-label ">发布者&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Publisher</span></label>
									<div class="am-u-md-3 am_fl_zi_tihuan"><input type="text" id="Publisher" name="publisher" value="{{data['publisher']}}" placeholder=""></div>
									<label for="datetimepicker" class="am-u-md-1 am-form-label ">添加日期&nbsp;/&nbsp;<span class="tpl-form-line-small-title">date</span></label>
									<div class="am-u-md-4 am_fl_zi_tihuan am-form-icon am-form-feedback" id="dateBox2">
										<div class="tpl-switch role-select">
											<div class="tpl-switch-btn-view" id="switch">
												<div></div>
											</div>
										</div>
										<input type="text" id="datetimepicker" name="period_time" value="{{data['pushtime']}}" class="form-datetime-lang am-form-field ngco_Ojs_bitian2" />
										<i class=""></i>
									</div>
								</div>
								<div class="am-form-group">
									<label for="ser-intro" class="am-u-md-2 am-form-label">详情内容&nbsp;/&nbsp;Content</label>
									<textarea id="kgcmsEditor" style="width:83%; height:400px; margin:0; padding:0; overflow:hidden;" class="edui-default">{{data['content']}}</textarea>
									<script>
									UE.getEditor('kgcmsEditor')
									</script>
								</div>
								<input type="hidden" name='action' value="submit">
							</form>
							<div class="am-form-group">
								<div class="am-u-sm-8 am-u-sm-push-2">
									<button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success" id="am-regSubmit2">立即添加</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>




	<!-- 模态框 -->
	<div class="am-modal am-modal-confirm modal" tabindex="-1">
		<div class="am-modal-dialog">
			<div class="am-modal-hd modal-header ngdo-D2">
			</div>
			<div class="am-modal-bd am-padding-bottom-0">
				<form class="am-form" id="imgInFo">
					<div data-am-widget="list_news" class="am-list-news am-list-news-default">
						<div class="am-list-news-bd">
							<ul class="am-list">
								<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right border-none bg-transparent am-padding-bottom-0 ngdo-Li1">
									<div class="am-col am-u-md-8 am-list-main ngdo-D1">
										<div class="am-input-group am-input-group-primary am-margin-bottom-sm" style="    margin: 0px;">
											<div class="am-form-group am-form-file" style="margin-left: 4rem; margin-bottom: 0rem;">
												<button type="button" title="未选择任何图片" class="am-btn am-btn-danger am-btn-sm title2div ngdo-Bu1" id="originalImg">
													<i class="am-icon-cloud-upload"></i>&nbsp;原始上传
												</button>
												<input type="file" id="originalChoose" class="ngco-No-widht image" />
												<input type="hidden" name="image" id="originalUpdate" value='' />
												<button type="button" title="未选择任何图片" class="am-btn am-btn-danger am-btn-sm title2div" id="replaceImg">
													<i class="am-icon-cloud-upload"></i>&nbsp;裁切上传
												</button>
												<!--图片裁剪框 -->
												<div style="display: none" class="tailoring-container">
													<div class="black-cloth ngad-Jsj-click"></div>
													<div class="tailoring-content">
														<div class="tailoring-content-one">
															<label title="上传图片" for="chooseImg" class="l-btn choose-btn">
																<input type="file" name="filename" accept="image/*" id="chooseImg" class="hidden ngad-Ksj-change">
																选择图片
																<input type="hidden" name="image" id="imgUpdate" value='' />
															</label>
															<div class="close-tailoring ngad-Usj-click">×</div>
														</div>
														<div class="tailoring-content-two">
															<!-- 大裁剪图片 -->
															<div class="tailoring-box-parcel">
																<img id="tailoringImg" src="/" alt=""/>
															</div>
															<div class="preview-box-parcel">
																<p>图片预览：</p>
																<div class="square previewImg">
																</div>
																<div class="circular previewImg">
																</div>
															</div>
														</div>
														<div class="tailoring-content-three">
															<button class="l-btn cropper-reset-btn" type="button">复位</button>
															<button class="l-btn cropper-rotate-btn" type="button">旋转</button>
															<button class="l-btn cropper-scaleX-btn" type="button">换向</button>
															<button class="l-btn sureCut" id="sureCut" type="button">确定</button>
														</div>
													</div>
												</div>
												<!--图片裁剪框 -->
												<input id="doc-form-file" type="file" multiple="" class="ngco-No-widht">
											</div>
											<!-- 图片区域结束 -->
										</div>
										<div class="am-form-group am-form-file am-hide">
											<input type="file" multiple>
										</div>
									</div>
									<div class="am-col am-u-md-4 am-list-thumb fubox_img">
										<img src="{{kg['tpl_url']}}images/a1.png" id="finalImg" />
										<div id="loading"></div>
									</div>
								</li>
							</ul>
						</div>
					</div>
			</div>
			<div class="am-modal-footer">
				<span class="am-modal-btn" id="false" data-am-modal-cancel>取消</span>
				<span class="am-modal-btn" id="true" data-am-modal-confirm>确定</span>
			</div>
		</div>
	</div>
	

<script type="application/javascript">
	$(function () {
		var speci_html = '<div class="speci-box add-margin">' +
							{% for row in speci %}
                            '<div class="am-u-md-2 modify-width">'+
                                '<select data-am-selected="{btnSize: \'sm\'}" name="speci_{{row['id']}}" style="display: none;">'+
                                	'<option value="null">请选择{{row['name']}}</option>'+
                                	{% for var in row['param'] %}
                                    '<option value="{{loop.index0}}">{{var}}</option>'+
                                    {% endfor %}
                                '</select>'+
                            '</div>'+
                            {% endfor %}
                            '<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">库存:<span class="tpl-form-line-small-title"></span></label>'+
                            '<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" id="Model" name="inventory[]" value="" placeholder="" class=""></div>'+
                            '<label for="Coding" class="am-u-md-1 am-form-label modify-input-width">价格:<span class="tpl-form-line-small-title"></span></label>'+
                            '<div class="am-u-md-2 am_fl_zi_tihuan input-number"><input type="text" name="price[]" value="" placeholder="" class=""></div>'+
                            '<div class="am-u-md-2" style="height: 40px; width: 40px;"><input type="hidden" name="specipic[]" value=""></div>'+
                            '<div class="ewm-upload  btn-add" id="" data-btn="speci" style="height: 40px; width: 40px;">'+
								'<input name="image" type="text" class="input-file" id="qrcodeInput">'+
								'<div class="sm-shuline"></div>'+
								'<div class="sm-hengline"></div>'+
							'</div>'+
							'<div class="am-u-md-2 input-number am-plus-box">'+
								'<span class="am-icon-minus-circle"></span>'+
							'</div>'+
                        '</div>'
		$('.am-icon-plus-circle').click(function() {
			$(this).parents('.speci-div').append(speci_html);
			$(".speci-div").trigger('changed.dom.amui');
		})
		$('.speci-div').on('click', '.am-icon-minus-circle', function() {
			$(this).parents('.speci-box').remove();
		})
	})

</script>
	</body>
</html>