人人商城

index.html 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. {template '_header'}
  2. <style>
  3. .newgoodsflag{
  4. width: 18px;height: 16px;
  5. background-color: #ff0000;
  6. color: #fff;
  7. text-align: center;
  8. position: relative;
  9. bottom: 40px;
  10. left: 22px;
  11. z-index:99;
  12. font-size: 12px;
  13. }
  14. </style>
  15. <div class="page-heading">
  16. <span class='pull-right'>
  17. {ifp 'goods.add'}
  18. <a class='btn btn-primary btn-sm' href="{php echo webUrl('goods/add')}"><i class='fa fa-plus'></i> 添加商品</a>
  19. {/if}
  20. </span>
  21. <h2>商品管理</h2> </div>
  22. <form action="./index.php" method="get" class="form-horizontal form-search" role="form">
  23. <input type="hidden" name="c" value="site" />
  24. <input type="hidden" name="a" value="entry" />
  25. <input type="hidden" name="m" value="ewei_shopv2" />
  26. <input type="hidden" name="do" value="web" />
  27. <input type="hidden" name="r" value="goods" />
  28. <input type="hidden" name="goodsfrom" value="{$goodsfrom}" />
  29. <div class="page-toolbar row m-b-sm m-t-sm">
  30. <div class="col-sm-4">
  31. <div class="input-group-btn">
  32. <button class="btn btn-default btn-sm" type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>
  33. {ifp 'goods.edit'}
  34. {if $_GPC['goodsfrom']=='sale'}
  35. <button class="btn btn-default btn-sm" type="button" data-toggle='batch' data-href="{php echo webUrl('goods/status',array('status'=>0))}"><i class='fa fa-circle-o'></i> 下架</button>
  36. {/if}
  37. {if $_GPC['goodsfrom']=='stock'}
  38. <button class="btn btn-default btn-sm" type="button" data-toggle='batch' data-href="{php echo webUrl('goods/status',array('status'=>1))}"><i class='fa fa-circle'></i> 上架</button>
  39. {/if}
  40. {/if}
  41. {if $_GPC['goodsfrom']=='cycle'}
  42. {ifp 'goods.delete1'}
  43. <button class="btn btn-default btn-sm" type="button" data-toggle='batch-remove' data-confirm="如果商品存在购买记录,会无法关联到商品, 确认要彻底删除吗?" data-href="{php echo webUrl('goods/delete1')}"><i class='fa fa-remove'></i> 彻底删除</button>
  44. {/if}
  45. {ifp 'goods.restore'}
  46. <button class="btn btn-default btn-sm" type="button" data-toggle='batch-remove' data-confirm="确认要恢复?" data-href="{php echo webUrl('goods/restore')}"><i class='fa fa-reply'></i> 恢复到仓库</button>
  47. {/if}
  48. {else}
  49. {ifp 'goods.delete'}
  50. <button class="btn btn-default btn-sm" type="button" data-toggle='batch-remove' data-confirm="确认要删除吗?" data-href="{php echo webUrl('goods/delete')}"><i class='fa fa-trash'></i> 删除</button>
  51. {/if}
  52. {/if}
  53. {if $_GPC['goodsfrom']=='verify'}
  54. <button class="btn btn-default btn-sm" type="button" data-toggle='batch-remove' data-confirm="确定要通过审核吗?" data-href="{php echo webUrl('goods/checked')}"><i class='fa fa-goods'></i> 批量审核通过</button>
  55. {/if}
  56. </div>
  57. </div>
  58. <div class="col-sm-8 pull-right">
  59. <select name="cate" class='form-control input-sm select-sm select2' style="width:200px;" data-placeholder="商品分类">
  60. <option value="" {if empty($_GPC['cate'])}selected{/if} >商品分类</option>
  61. {loop $category $c}
  62. <option value="{$c['id']}" {if $_GPC['cate']==$c['id']}selected{/if} >{$c['name']}</option>
  63. {/loop}
  64. </select>
  65. <div class="input-group">
  66. <input type="text" class="input-sm form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="ID/名称/编号/条码{if $merch_plugin}/商户名称{/if}"> <span class="input-group-btn">
  67. <button class="btn btn-sm btn-primary" type="submit"> 搜索</button> </span>
  68. </div>
  69. </div>
  70. </div>
  71. </form>
  72. {if count($list)>0 && cv('goods.main')}
  73. <table class="table table-hover table-responsive">
  74. <thead class="navbar-inner">
  75. <tr>
  76. <th style="width:25px;"><input type='checkbox' /></th>
  77. <th style="width:60px;text-align:center;">排序</th>
  78. <th style="width:60px;">商品</th>
  79. <th style="width:200px;">&nbsp;</th>
  80. <th style="width:90px;" >价格</th>
  81. <th style="width:70px;" >库存</th>
  82. <th style="width:80px;" >销量</th>
  83. {if $goodsfrom!='cycle'}
  84. <th style="width:60px;" >状态</th>
  85. {/if}
  86. <th style="">操作</th>
  87. </tr>
  88. </thead>
  89. <tbody>
  90. {loop $list $item}
  91. <tr>
  92. <td>
  93. <input type='checkbox' value="{$item['id']}"/>
  94. </td>
  95. <td style='text-align:center;'>
  96. {ifp 'goods.edit'}
  97. <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo webUrl('goods/change',array('type'=>'displayorder','id'=>$item['id']))}" >{$item['displayorder']}</a>
  98. {else}
  99. {$item['displayorder']}
  100. {/if}
  101. </td>
  102. <td>
  103. <img src="{php echo tomedia($item['thumb'])}" class="imgg" style="width:40px;height:40px;padding:1px;border:1px solid #ccc;" />
  104. {if !empty($item['newgoods'])}
  105. <!--新-->
  106. <div class="newgoodsflag">新</div>
  107. {/if}
  108. </td>
  109. <td class='full' style="overflow-x: hidden">
  110. {if !empty($category[$item['pcate']])}
  111. <span class="text-danger">[{$category[$item['pcate']]['name']}]</span>
  112. {/if}
  113. {if !empty($category[$item['ccate']])}
  114. <span class="text-info">[{$category[$item['ccate']]['name']}]</span>
  115. {/if}
  116. {if !empty($category[$item['tcate']]) && intval($shopset['catlevel'])==3}
  117. <span class="text-info">[{$category[$item['tcate']]['name']}]</span>
  118. {/if}
  119. <br/>
  120. {ifp 'goods.edit'}
  121. <a href='javascript:;' data-toggle='ajaxEdit' data-edit='textarea' data-href="{php echo webUrl('goods/change',array('type'=>'title','id'=>$item['id']))}" >{$item['title']}</a>
  122. {else}
  123. {$item['title']}
  124. {/if}
  125. </td>
  126. <td>
  127. {if $item['hasoption']==1}
  128. {ifp 'goods.edit'}
  129. <span data-toggle='tooltip' title='多规格不支持快速修改'>{$item['marketprice']}</span>
  130. {else}
  131. {$item['marketprice']}
  132. {/if}
  133. {else}
  134. {ifp 'goods.edit'}
  135. <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo webUrl('goods/change',array('type'=>'marketprice','id'=>$item['id']))}" >{$item['marketprice']}</a>
  136. {else}
  137. {$item['marketprice']}
  138. {/if}{/if}
  139. </td>
  140. <td>
  141. {if !empty($item['hoteldaystock'])}
  142. <span data-toggle='tooltip' title='民宿类商品显示每日库存'>{$item['hoteldaystock']}/日</span>
  143. {else if $item['hasoption']==1}
  144. {ifp 'goods.edit'}
  145. <span data-toggle='tooltip' title='多规格不支持快速修改'>{$item['total']}</span>
  146. {else}
  147. {$item['total']}
  148. {/if}
  149. {else}
  150. {ifp 'goods.edit'}
  151. <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo webUrl('goods/change',array('type'=>'total','id'=>$item['id']))}" >{$item['total']}</a>
  152. {else}
  153. {$item['total']}
  154. {/if}
  155. {/if}
  156. </td>
  157. <td>{$item['salesreal']}</td>
  158. {if $goodsfrom!='cycle'}
  159. <td style="overflow:visible;">
  160. {if $item['status']==2}<span class="label label-danger">赠品</span>{else}
  161. <span class='label {if $item['status']==1}label-success{else}label-default{/if}'
  162. {ifp 'goods.edit'}
  163. data-toggle='ajaxSwitch'
  164. data-confirm = "确认是{if $item['status']==1}下架{else}上架{/if}?"
  165. data-switch-refresh='true'
  166. data-switch-value='{$item['status']}'
  167. data-switch-value0='0|下架|label label-default|{php echo webUrl('goods/status',array('status'=>1,'id'=>$item['id']))}'
  168. data-switch-value1='1|上架|label label-success|{php echo webUrl('goods/status',array('status'=>0,'id'=>$item['id']))}'
  169. {/if}
  170. >
  171. {if $item['status']==1}上架{else}下架{/if}</span>
  172. {/if}
  173. {if !empty($item['merchid'])}
  174. <br>
  175. <span class='label {if $item['checked']==0}label-success{else}label-warning{/if}'
  176. {ifp 'goods.edit'}
  177. data-toggle='ajaxSwitch'
  178. data-confirm = "确认是{if $item['checked']==0}审核中{else}审核通过{/if}?"
  179. data-switch-refresh='true'
  180. data-switch-value='{$item['checked']}'
  181. data-switch-value1='1|审核中|label label-warning|{php echo webUrl('goods/checked',array('checked'=>0,'id'=>$item['id']))}'
  182. data-switch-value0='0|通过|label label-success|{php echo webUrl('goods/checked',array('checked'=>1,'id'=>$item['id']))}'
  183. {/if}
  184. >
  185. {if $item['checked']==0}通过{else}审核中{/if}</span>
  186. {/if}
  187. </td>
  188. {/if}
  189. <td style="overflow:visible;position:relative">
  190. {ifp 'goods.edit|goods.view'}
  191. <a class='btn btn-default btn-sm' href="{php echo webUrl('goods/edit', array('id' => $item['id'],'goodsfrom'=>$goodsfrom,'page'=>$page))}" title="{ifp 'goods.edit'}编辑{else}查看{/if}"><i class='fa fa-edit'></i> </a>
  192. {/if}
  193. {if $_GPC['goodsfrom']=='cycle'}
  194. {ifp 'goods.restore'}
  195. <a class='btn btn-default btn-sm' data-toggle='ajaxRemove' href="{php echo webUrl('goods/restore', array('id' => $item['id']))}" data-confirm='确认要恢复?'><i class='fa fa-reply'></i> </a>
  196. {/if}
  197. {ifp 'goods.delete1'}
  198. <a class='btn btn-default btn-sm' data-toggle='ajaxRemove' href="{php echo webUrl('goods/delete1', array('id' => $item['id']))}" data-confirm='如果此商品存在购买记录,会无法关联到商品, 确认要彻底删除吗??'><i class='fa fa-remove'></i> </a>
  199. {/if}
  200. {else}
  201. {ifp 'goods.delete'}
  202. <a class='btn btn-default btn-sm' data-toggle='ajaxRemove' href="{php echo webUrl('goods/delete', array('id' => $item['id']))}" data-confirm='确认删除此商品?'><i class='fa fa-trash'></i> </a>
  203. {/if}
  204. {/if}
  205. {if $_GPC['goodsfrom']!='cycle'}
  206. <a href="javascript:;" class='btn btn-default btn-sm js-clip' data-url="{php echo mobileUrl('goods/detail', array('id' => $item['id']),true)}">
  207. <i class='fa fa-link'></i> 复制链接
  208. </a>
  209. <a href="javascript:void(0);" class="btn btn-default btn-sm" data-toggle="popover" data-trigger="hover" data-html="true"
  210. data-content="<img src='{$item['qrcode']}' width='130' alt='链接二维码'>" data-placement="auto right">
  211. <i class="glyphicon glyphicon-qrcode"></i>
  212. </a>
  213. {/if}
  214. </td>
  215. </tr>
  216. <tr>
  217. <td colspan='4' style='text-align: left;border-top:none;padding:5px 0;' class='aops'>
  218. {if !empty($item['merchname']) && $item['merchid'] > 0}
  219. <span class="text-default" style="margin-left: 95px;">商户名称:</span><span class="text-info">{$item['merchname']}</span>
  220. {/if}
  221. </td>
  222. <td colspan='{if $goodsfrom=='cycle'}4{else}5{/if}' style='text-align: right;border-top:none;padding:5px 0;' class='aops'>
  223. <a class='{if $item['isnew']==1}text-danger{else}text-default{/if}'
  224. {ifp 'goods.property'}
  225. data-toggle='ajaxSwitch'
  226. data-switch-value='{$item['isnew']}'
  227. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'new', 'data'=>1,'id'=>$item['id']))}'
  228. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'new','data'=>0,'id'=>$item['id']))}'
  229. {/if}
  230. >新品</a>
  231. <a class='{if $item['ishot']==1}text-danger{else}text-default{/if}'
  232. {ifp 'goods.property'}
  233. data-toggle='ajaxSwitch'
  234. data-switch-value='{$item['ishot']}'
  235. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'hot', 'data'=>1,'id'=>$item['id']))}'
  236. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'hot','data'=>0,'id'=>$item['id']))}'
  237. {/if}
  238. >热卖</a>
  239. <a class='{if $item['isrecommand']==1}text-danger{else}text-default{/if}'
  240. {ifp 'goods.property'}
  241. data-toggle='ajaxSwitch'
  242. data-switch-value='{$item['isrecommand']}'
  243. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'recommand', 'data'=>1,'id'=>$item['id']))}'
  244. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'recommand','data'=>0,'id'=>$item['id']))}'
  245. {/if}
  246. >推荐</a>
  247. <a class='{if $item['isdiscount']==1}text-danger{else}text-default{/if}'
  248. {ifp 'goods.property'}
  249. data-toggle='ajaxSwitch'
  250. data-switch-value='{$item['isdiscount']}'
  251. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'discount', 'data'=>1,'id'=>$item['id']))}'
  252. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'discount','data'=>0,'id'=>$item['id']))}'
  253. {/if}
  254. >促销</a>
  255. <a class='{if $item['issendfree']==1}text-danger{else}text-default{/if}'
  256. {ifp 'goods.property'}
  257. data-toggle='ajaxSwitch'
  258. data-switch-value='{$item['issendfree']}'
  259. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'sendfree', 'data'=>1,'id'=>$item['id']))}'
  260. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'sendfree','data'=>0,'id'=>$item['id']))}'
  261. {/if}
  262. >包邮</a>
  263. <a class='{if $item['istime']==1}text-danger{else}text-default{/if}'
  264. {ifp 'goods.property'}
  265. data-toggle='ajaxSwitch'
  266. data-switch-value='{$item['istime']}'
  267. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'time', 'data'=>1,'id'=>$item['id']))}'
  268. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'time','data'=>0,'id'=>$item['id']))}'
  269. {/if}
  270. >限时卖</a>
  271. <a class='{if $item['isnodiscount']==1}text-danger{else}text-default{/if}'
  272. {ifp 'goods.property'}
  273. data-toggle='ajaxSwitch'
  274. data-switch-value='{$item['isnodiscount']}'
  275. data-switch-value0='0||text-default|{php echo webUrl('goods/property',array('type'=>'nodiscount', 'data'=>1,'id'=>$item['id']))}'
  276. data-switch-value1='1||text-danger|{php echo webUrl('goods/property',array('type'=>'nodiscount','data'=>0,'id'=>$item['id']))}'
  277. {/if}
  278. >不参与折扣</a>
  279. </td>
  280. </tr>
  281. {/loop}
  282. </tbody>
  283. </table>
  284. {$pager}
  285. {else}
  286. <div class='panel panel-default'>
  287. <div class='panel-body' style='text-align: center;padding:30px;'>
  288. 暂时没有任何商品!
  289. </div>
  290. </div>
  291. {/if}
  292. {template '_footer'}