index.html 10.2 KB
Newer Older
D
v1.2.0  
devil_gong 已提交
1 2 3 4 5 6
{{include file="public/header" /}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
G
gongfuxiang 已提交
7 8 9 10 11 12 13 14 15 16
		<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('admin/goods/index')}}" request-type="form">
			<div class="thin">
                <div class="am-input-group am-input-group-sm am-fl so">
                    <input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="标题/型号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
                    <span class="am-input-group-btn">
                        <button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
                    </span>
                </div>
                <label class="am-fl thin_sub more-submit">
                    更多筛选条件
D
devil_gong 已提交
17 18 19 20 21 22 23
                    {{if isset($params['is_more']) and $params['is_more'] eq 1}}
                        <input type="checkbox" name="is_more" value="1" id="is_more" checked />
                        <i class="am-icon-angle-up"></i>
                    {{else /}}
                        <input type="checkbox" name="is_more" value="1" id="is_more" />
                        <i class="am-icon-angle-down"></i>
                    {{/if}}
G
gongfuxiang 已提交
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
                </label>
            </div>
			<table class="so-list more-where {{if !isset($params['is_more'])}}none{{/if}}">
                <tbody>
                	<tr>
                		<td>
                			<span>状态:</span>
                			<select name="is_shelves" class="chosen-select" data-placeholder="上下架...">
								<option value="-1">上下架...</option>
								{{foreach $common_is_shelves_list as $v}}
									<option value="{{$v.id}}" {{if isset($params['is_shelves']) and $params['is_shelves'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
								{{/foreach}}
							</select>
                		</td>
                		<td>
                			<span>推荐:</span>
                			<select name="is_home_recommended" class="chosen-select" data-placeholder="首页推荐...">
								<option value="-1">首页推荐...</option>
								{{foreach $common_is_text_list as $v}}
									<option value="{{$v.id}}" {{if isset($params['is_home_recommended']) and $params['is_home_recommended'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
								{{/foreach}}
							</select>
                		</td>
                	</tr>
                    <tr>
                        <td class="time">
							<span>时间:</span>
                            <span>
                                <input type="text" autocomplete="off" name="time_start" class="am-form-field am-input-sm am-radius Wdate" placeholder="起始时间" value="{{if !empty($params.time_start)}}{{$params.time_start}}{{/if}}" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" /><i class="am-icon-calendar"></i>
                            </span>
                            <em class="text-grey">~</em>
                            <span>
                                <input type="text" autocomplete="off" name="time_end" class="am-form-field am-input-sm am-radius Wdate" placeholder="结束时间" value="{{if !empty($params.time_end)}}{{$params.time_end}}{{/if}}" pattern="^[0-9]{4}-[0-9]{2}-[0-9]{2}$" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" /><i class="am-icon-calendar"></i>
                            </span>
                        </td>
                        <td>
                            <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
                            <a href="{{:MyUrl('admin/goods/index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
                        </td>
                    </tr>
                </tbody>
			</table>
D
v1.2.0  
devil_gong 已提交
66 67 68 69 70 71 72 73 74 75 76 77 78
        </form>
        <!-- form end -->

        <!-- operation start -->
        <div class="am-g m-t-15">
            <a href="{{:MyUrl('admin/goods/saveinfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> 新增</a>
        </div>
        <!-- operation end -->

		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10 goods-list">
			<thead>
				<tr>
D
devil_gong 已提交
79
					<th>编号</th>
D
v1.2.0  
devil_gong 已提交
80
					<th>标题名称</th>
G
gongfuxiang 已提交
81
					<th class="am-hide-sm-only">销售价格(元)</th>
D
v1.2.0  
devil_gong 已提交
82 83 84 85 86 87 88 89 90 91
					<th>上下架</th>
					<th class="am-hide-sm-only">首页推荐</th>
					<th class="am-hide-sm-only">库存数量</th>
					<th class="am-hide-sm-only">商品型号</th>
					<th class="am-hide-sm-only">品牌</th>
					<th>更多</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
G
gongfuxiang 已提交
92 93
				{{if !empty($data_list)}}
					{{foreach $data_list as $v}}
D
v1.2.0  
devil_gong 已提交
94
						<tr id="data-list-{{$v.id}}" {{if $v['is_shelves'] eq 0}}class="am-active"{{/if}}>
D
devil_gong 已提交
95
							<td>{{$v.id}}</td>
D
v1.2.0  
devil_gong 已提交
96 97 98 99 100
							<td>
								<a href="{{$v.goods_url}}" target="_blank" title="{{$v.title}}">
									<img src="{{$v['images']}}" class="am-img-thumbnail am-radius goods-images am-hide-sm-only" />
								</a>
								<a href="{{$v.goods_url}}" target="_blank" title="{{$v.title}}" {{if !empty($v['title_color'])}} style="color:{{$v.title_color}};" {{/if}} >{{$v.title}}</a>
G
gongfuxiang 已提交
101 102 103
                                {{if !empty($v['simple_desc'])}}
                                    <p class="cr-red am-hide-md-down">{{$v.simple_desc}}</p>
                                {{/if}}
D
v1.2.0  
devil_gong 已提交
104
							</td>
G
gongfuxiang 已提交
105
							<td class="am-hide-sm-only">
D
v1.2.0  
devil_gong 已提交
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
								{{$v.price}}
								{{if !empty($v['original_price']) and $v['original_price'] gt 0}}
									<br /><span class="am-badge am-radius">原价 {{$v.original_price}}</span>
								{{/if}}
							</td>
							<td>
								<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_shelves'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/goods/statusshelves')}}" data-id="{{$v.id}}" data-state="{{$v['is_shelves']}}"  data-is-update-status="1"></a>
							</td>
							<td class="am-hide-sm-only">
								<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_home_recommended'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/goods/statushomerecommended')}}" data-id="{{$v.id}}" data-state="{{$v['is_home_recommended']}}" data-is-update-status="0"></a>
							</td>
							<td class="am-hide-sm-only">{{$v.inventory}} {{$v.inventory_unit}}</td>
							<td class="am-hide-sm-only">{{$v.model}}</td>
							<td class="am-hide-sm-only">{{$v.brand_name}}</td>
							<td>
								<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
								<div class="am-popup am-radius" id="my-popup{{$v.id}}">
									<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">
											<dl class="dl-content">
												<dt>标题名称</dt>
												<dd>{{$v.title}}</dd>

D
devil_gong 已提交
134 135 136
                                                <dt>商品简述</dt>
                                                <dd>{{$v.simple_desc}}</dd>

D
v1.2.0  
devil_gong 已提交
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
												<dt>销售价格(元)</dt>
												<dd>
													{{$v.price}}
													{{if !empty($v['original_price']) and $v['original_price'] gt 0}}
														<br /><span class="am-badge am-radius">原价 {{$v.original_price}}</span>
													{{/if}}
												</dd>

												<dt>上下架</dt>
												<dd>{{:lang('common_is_shelves_list')[$v['is_shelves']]['name']}}</dd>

												<dt>库存数量</dt>
												<dd>{{$v.inventory}} {{$v.inventory_unit}}</dd>

												<dt>最低起购数量</dt>
												<dd>{{$v.buy_min_number}} {{$v.inventory_unit}}</dd>

												<dt>单次最大购买数量</dt>
												<dd>{{if $v['buy_max_number'] eq 0}}<span class="cr-ddd">不限</span>{{else /}}{{$v.buy_max_number}} {{$v.inventory_unit}}{{/if}}</dd>

												<dt>商品型号</dt>
												<dd>{{$v.model}}</dd>

												<dt>品牌</dt>
												<dd>{{$v.brand_name}}</dd>

												<dt>生产地</dt>
												<dd>{{$v.place_origin_name}}</dd>

												<dt>商品分类</dt>
												<dd>{{$v.category_text}}</dd>

												<dt>购买赠送积分</dt>
												<dd>{{$v.give_integral}}</dd>

												<dt>扣减库存</dt>
												<dd>{{:lang('common_is_text_list')[$v['is_deduction_inventory']]['name']}}</dd>

												<dt>访问次数</dt>
												<dd>{{$v.access_count}}</dd>

G
gongfuxiang 已提交
178 179 180 181 182 183 184 185 186
                                                <dt>SEO标题</dt>
                                                <dd>{{$v.seo_title}}</dd>

                                                <dt>SEO关键字</dt>
                                                <dd>{{$v.seo_keywords}}</dd>

                                                <dt>SEO描述</dt>
                                                <dd>{{$v.seo_desc}}</dd>

D
v1.2.0  
devil_gong 已提交
187 188 189 190 191 192 193 194 195 196 197 198
												<dt>创建时间</dt>
												<dd>{{$v.add_time}}</dd>

												<dt>更新时间</dt>
												<dd>{{$v.upd_time}}</dd>
											</dl>
										</div>
									</div>
								</div>
							</td>
							<td class="view-operation">
								<a href="{{:MyUrl('admin/goods/saveinfo', array_merge($params, ['id'=>$v['id']]))}}">
G
gongfuxiang 已提交
199
									<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
D
v1.2.0  
devil_gong 已提交
200
								</a>
G
gongfuxiang 已提交
201
								<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/goods/delete')}}" data-id="{{$v.id}}"> 删除</button>
D
v1.2.0  
devil_gong 已提交
202 203 204 205 206 207
							</td>
						</tr>
					{{/foreach}}
				{{/if}}
			</tbody>
		</table>
G
gongfuxiang 已提交
208 209 210
		{{if empty($data_list)}}
            <div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
        {{/if}}
D
v1.2.0  
devil_gong 已提交
211 212 213
		<!-- list end -->

		<!-- page start -->
G
gongfuxiang 已提交
214
		{{if !empty($data_list)}}
D
v1.2.0  
devil_gong 已提交
215 216 217 218 219 220 221 222 223 224
			{{$page_html|raw}}
		{{/if}}
		<!-- page end -->
	</div>
</div>
<!-- right content end  -->
		
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->