df3c8e8dc276060a3e4b796673bd3c60.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. <?php /*a:4:{s:57:"/data/web/pl.valimart.net/app/admin/view/goods/index.html";i:1657785096;s:59:"/data/web/pl.valimart.net/app/admin/view/public/header.html";i:1657785098;s:64:"/data/web/pl.valimart.net/app/admin/view/public/admin_items.html";i:1657785098;s:59:"/data/web/pl.valimart.net/app/admin/view/public/footer.html";i:1657785098;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title><?php echo htmlentities((isset($html_title) && ($html_title !== '')?$html_title:config('ds_config.site_name'))); ?><?php echo htmlentities(lang('system_backend')); ?></title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
  10. <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
  11. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
  12. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
  13. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
  14. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
  15. <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
  16. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
  17. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
  18. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
  19. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
  20. <script type="text/javascript">
  21. var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
  22. var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
  23. var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
  24. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  25. var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
  26. </script>
  27. </head>
  28. <body>
  29. <div id="append_parent"></div>
  30. <div id="ajaxwaitid"></div>
  31. <div class="page">
  32. <div class="fixed-bar">
  33. <div class="item-title">
  34. <div class="subject">
  35. <h3><?php echo htmlentities(lang('ds_goods_manage')); ?></h3>
  36. <h5></h5>
  37. </div>
  38. <?php if($admin_item): ?>
  39. <ul class="tab-base ds-row">
  40. <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
  41. <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
  42. <?php endforeach; endif; else: echo "" ;endif; ?>
  43. </ul>
  44. <?php endif; ?>
  45. </div>
  46. </div>
  47. <div class="fixed-empty"></div>
  48. <div class="explanation" id="explanation">
  49. <div class="title" id="checkZoom">
  50. <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
  51. <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
  52. </div>
  53. <ul>
  54. <li><?php echo htmlentities(lang('goods_index_help1')); ?></li>
  55. <li><?php echo htmlentities(lang('goods_index_help2')); ?></li>
  56. </ul>
  57. </div>
  58. <form method="get" name="formSearch" id="formSearch">
  59. <div class="ds-search-form">
  60. <dl>
  61. <dt><?php echo htmlentities(lang('ds_goods_name')); ?></dt>
  62. <dd><input type="text" value="<?php echo htmlentities((app('request')->get('search_goods_name') ?: '')); ?>" name="search_goods_name" id="search_goods_name" class="txt"></dd>
  63. </dl>
  64. <dl>
  65. <dt><?php echo htmlentities(lang('search_commonid')); ?></dt>
  66. <dd><input type="text" value="<?php echo htmlentities((app('request')->get('search_commonid') ?: '')); ?>" name="search_commonid" id="search_commonid" class="txt" /></dd>
  67. </dl>
  68. <dl>
  69. <dt><?php echo htmlentities(lang('goods_index_class_name')); ?></dt>
  70. <dd id="searchgc_td"></dd>
  71. <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
  72. </dl>
  73. <dl>
  74. <dt><?php echo htmlentities(lang('goods_index_store_name')); ?></dt>
  75. <dd><input type="text" value="<?php echo htmlentities((app('request')->get('search_store_name') ?: '')); ?>" name="search_store_name" id="search_store_name" class="txt"></dd>
  76. </dl>
  77. <dl>
  78. <dt><?php echo htmlentities(lang('goods_index_brand')); ?></dt>
  79. <dd>
  80. <div id="ajax_brand" class="dssc-brand-select w180">
  81. <div class="selection">
  82. <input name="b_name" id="b_name" value="<?php echo htmlentities((app('request')->param('b_name') ?: '')); ?>" type="text" class="txt w180" readonly="readonly" />
  83. <input type="hidden" name="b_id" id="b_id" value="<?php echo htmlentities((app('request')->param('b_id') ?: '')); ?>" />
  84. </div>
  85. <div class="dssc-brand-select-container">
  86. <div class="brand-index" data-url="<?php echo url('Common/ajax_get_brand'); ?>">
  87. <div class="letter" dstype="letter">
  88. <ul>
  89. <li><a href="javascript:void(0);" data-letter="all"><?php echo htmlentities(lang('all_brands')); ?></a></li>
  90. <li><a href="javascript:void(0);" data-letter="A">A</a></li>
  91. <li><a href="javascript:void(0);" data-letter="B">B</a></li>
  92. <li><a href="javascript:void(0);" data-letter="C">C</a></li>
  93. <li><a href="javascript:void(0);" data-letter="D">D</a></li>
  94. <li><a href="javascript:void(0);" data-letter="E">E</a></li>
  95. <li><a href="javascript:void(0);" data-letter="F">F</a></li>
  96. <li><a href="javascript:void(0);" data-letter="G">G</a></li>
  97. <li><a href="javascript:void(0);" data-letter="H">H</a></li>
  98. <li><a href="javascript:void(0);" data-letter="I">I</a></li>
  99. <li><a href="javascript:void(0);" data-letter="J">J</a></li>
  100. <li><a href="javascript:void(0);" data-letter="K">K</a></li>
  101. <li><a href="javascript:void(0);" data-letter="L">L</a></li>
  102. <li><a href="javascript:void(0);" data-letter="M">M</a></li>
  103. <li><a href="javascript:void(0);" data-letter="N">N</a></li>
  104. <li><a href="javascript:void(0);" data-letter="O">O</a></li>
  105. <li><a href="javascript:void(0);" data-letter="P">P</a></li>
  106. <li><a href="javascript:void(0);" data-letter="Q">Q</a></li>
  107. <li><a href="javascript:void(0);" data-letter="R">R</a></li>
  108. <li><a href="javascript:void(0);" data-letter="S">S</a></li>
  109. <li><a href="javascript:void(0);" data-letter="T">T</a></li>
  110. <li><a href="javascript:void(0);" data-letter="U">U</a></li>
  111. <li><a href="javascript:void(0);" data-letter="V">V</a></li>
  112. <li><a href="javascript:void(0);" data-letter="W">W</a></li>
  113. <li><a href="javascript:void(0);" data-letter="X">X</a></li>
  114. <li><a href="javascript:void(0);" data-letter="Y">Y</a></li>
  115. <li><a href="javascript:void(0);" data-letter="Z">Z</a></li>
  116. <li><a href="javascript:void(0);" data-letter="0-9"><?php echo htmlentities(lang('goods_index_other')); ?></a></li>
  117. </ul>
  118. </div>
  119. <div class="search" dstype="search"><input name="search_brand_keyword" id="search_brand_keyword" type="text" class="text" /><a href="javascript:void(0);" class="dssc-btn-mini" style="vertical-align: top;">Go</a></div>
  120. </div>
  121. <div class="brand-list" dstype="brandList">
  122. <ul dstype="brand_list">
  123. <?php if(!(empty($brand_list) || (($brand_list instanceof \think\Collection || $brand_list instanceof \think\Paginator ) && $brand_list->isEmpty()))): if(is_array($brand_list) || $brand_list instanceof \think\Collection || $brand_list instanceof \think\Paginator): if( count($brand_list)==0 ) : echo "" ;else: foreach($brand_list as $key=>$val): ?>
  124. <li data-id='<?php echo htmlentities($val['brand_id']); ?>'data-name='<?php echo htmlentities($val['brand_name']); ?>'><em><?php echo htmlentities($val['brand_initial']); ?></em><?php echo htmlentities($val['brand_name']); ?></li>
  125. <?php endforeach; endif; else: echo "" ;endif; ?>
  126. <?php endif; ?>
  127. </ul>
  128. </div>
  129. <div class="no-result" dstype="noBrandList" style="display: none;"><?php echo lang('no_brand_result'); ?></div>
  130. </div>
  131. </div>
  132. </dd>
  133. </dl>
  134. <?php if($type == 'allgoods'): ?>
  135. <dl>
  136. <dt><?php echo htmlentities(lang('goods_index_show')); ?></dt>
  137. <dd>
  138. <select name="goods_state">
  139. <option value=""><?php echo htmlentities(lang('ds_please_choose')); ?>...</option>
  140. <?php if(is_array($state) || $state instanceof \think\Collection || $state instanceof \think\Paginator): if( count($state)==0 ) : echo "" ;else: foreach($state as $key=>$val): ?>
  141. <option value="<?php echo htmlentities($key); ?>" <?php if(isset($search['goods_state']) && $search['goods_state'] == $key): ?>selected<?php endif; ?>><?php echo htmlentities($val); ?></option>
  142. <?php endforeach; endif; else: echo "" ;endif; ?>
  143. </select>
  144. </dd>
  145. </dl>
  146. <dl>
  147. <dt><?php echo htmlentities(lang('goods_verify')); ?></dt>
  148. <dd>
  149. <select name="goods_verify">
  150. <option value="" ><?php echo htmlentities(lang('ds_please_choose')); ?>...</option>
  151. <?php if(is_array($verify) || $verify instanceof \think\Collection || $verify instanceof \think\Paginator): if( count($verify)==0 ) : echo "" ;else: foreach($verify as $key=>$val): ?>
  152. <option value="<?php echo htmlentities($key); ?>" <?php if(isset($search['goods_verify']) && $search['goods_verify'] == $key): ?>selected<?php endif; ?>><?php echo htmlentities($val); ?></option>
  153. <?php endforeach; endif; else: echo "" ;endif; ?>
  154. </select>
  155. </dd>
  156. </dl>
  157. <?php endif; ?>
  158. <div class="btn_group">
  159. <input type="hidden" name="type" value="<?php echo htmlentities(app('request')->param('type')); ?>">
  160. <a href="javascript:void(0);" id="dssubmit" class="btn " title="<?php echo htmlentities(lang('ds_query')); ?>"><?php echo htmlentities(lang('ds_query')); ?></a>
  161. <a href="<?php echo url('Goods/index',['type'=>app('request')->param('type')]); ?>" class="btn btn-default" title="<?php echo htmlentities(lang('ds_cancel')); ?>"><?php echo htmlentities(lang('ds_cancel')); ?></a>
  162. </div>
  163. </div>
  164. </form>
  165. <table class="ds-default-table">
  166. <thead>
  167. <tr class="thead">
  168. <th class="w24"></th>
  169. <th class="w24"></th>
  170. <th class="w60 align-center"><?php echo htmlentities(lang('search_commonid')); ?></th>
  171. <th class="w24"><?php echo htmlentities(lang('goods_id')); ?></th>
  172. <th colspan="2"><?php echo htmlentities(lang('ds_goods_name')); ?></th>
  173. <th><?php echo htmlentities(lang('goods_index_brand')); ?>&<?php echo htmlentities(lang('goods_index_class_name')); ?></th>
  174. <th class="w72 align-center"><?php echo htmlentities(lang('goods_price')); ?></th>
  175. <th class="w72 align-center"><?php echo htmlentities(lang('goods_storage')); ?></th>
  176. <th class="w72 align-center"><?php echo htmlentities(lang('goods_state')); ?></th>
  177. <th class="w72 align-center"><?php echo htmlentities(lang('goods_verify')); ?></th>
  178. <?php if($type == 'allgoods'): ?>
  179. <th class="w72 align-center"><?php echo htmlentities(lang('mall_goods_commend')); ?></th>
  180. <th class="w72 align-center"><?php echo htmlentities(lang('ds_sort')); ?></th>
  181. <?php endif; ?>
  182. <th class="w200 align-center" ><?php echo htmlentities(lang('ds_handle')); ?></th>
  183. </tr>
  184. </thead>
  185. <tbody>
  186. <?php if(!(empty($goods_list) || (($goods_list instanceof \think\Collection || $goods_list instanceof \think\Paginator ) && $goods_list->isEmpty()))): if(is_array($goods_list) || $goods_list instanceof \think\Collection || $goods_list instanceof \think\Paginator): if( count($goods_list)==0 ) : echo "" ;else: foreach($goods_list as $key=>$v): ?>
  187. <tr class="hover edit" id="ds_row_<?php echo htmlentities($v['goods_commonid']); ?>">
  188. <td><input type="checkbox" value="<?php echo htmlentities($v['goods_commonid']); ?>" class="checkitem"></td>
  189. <td><i class="iconfont icon-jia" status="open" style="cursor: pointer;" dstype="ajaxGoodsList" data-comminid="<?php echo htmlentities($v['goods_commonid']); ?>" title="<?php echo htmlentities(lang('show_all_spec')); ?>"></i></td>
  190. <td class="align-center"><?php echo htmlentities($v['goods_commonid']); ?></td>
  191. <td class="align-center"><?php echo htmlentities($storage_array[$v['goods_commonid']]['goods_id']); ?></td>
  192. <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><img src="<?php echo goods_thumb($v, 240); ?>" width="56" height="56"/></span></div></td>
  193. <td>
  194. <dl class="goods-info"><dt class="goods-name"><?php echo htmlentities($v['goods_name']); ?></dt>
  195. <dd class="goods-type">
  196. <?php if($v['is_virtual'] == 1): ?><span class="virtual" ><?php echo htmlentities(lang('ds_virtual')); ?></span><?php endif; if($v['is_goodsfcode'] == 1): ?><span class="fcode" ><?php echo htmlentities(lang('ds_fcode')); ?></span><?php endif; if($v['is_appoint'] == 1): ?><span class="appoint" ><?php echo htmlentities(lang('ds_appoint')); ?></span><?php endif; ?>
  197. <i class="iconfont <?php if($v['mobile_body'] != ''): ?>open<?php endif; ?>" >&#xe72b;</i>
  198. </dd>
  199. <dd class="goods-store"><?php if(isset($ownShopIds[$v['store_id']])): ?><?php echo htmlentities(lang('ds_platform')); else: ?><?php echo htmlentities(lang('ds_three_party')); ?><?php endif; ?><?php echo htmlentities(lang('ds_store')); ?>:<?php echo htmlentities($v['store_name']); ?></dd></dl>
  200. </td>
  201. <td>
  202. <p><?php echo htmlentities($v['gc_name']); ?></p>
  203. <p class="goods-brand"><?php echo htmlentities(lang('ds_brand')); ?>:<?php echo htmlentities($v['brand_name']); ?></p>
  204. </td>
  205. <td class="align-center"><?php echo htmlentities($v['goods_price']); ?></td>
  206. <td class="align-center"><?php echo htmlentities($storage_array[$v['goods_commonid']]['sum']); ?></td>
  207. <td class="align-center"><?php echo htmlentities($state[$v['goods_state']]); ?></td>
  208. <td class="align-center"><?php echo htmlentities($verify[$v['goods_verify']]); ?></td>
  209. <?php if($type == 'allgoods'): ?>
  210. <td class="align-center yes-onoff">
  211. <?php if($v['mall_goods_commend'] == '0'): ?>
  212. <a href="JavaScript:void(0);" class="disabled" ajax_branch='mall_goods_commend' ds_type="inline_edit" fieldname="mall_goods_commend" fieldid="<?php echo htmlentities($v['goods_commonid']); ?>" fieldvalue="0" title="<?php echo htmlentities(lang('ds_editable')); ?>"><img src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/transparent.gif"></a>
  213. <?php else: ?>
  214. <a href="JavaScript:void(0);" class="enabled" ajax_branch='mall_goods_commend' ds_type="inline_edit" fieldname="mall_goods_commend" fieldid="<?php echo htmlentities($v['goods_commonid']); ?>" fieldvalue="1" title="<?php echo htmlentities(lang('ds_editable')); ?>"><img src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/transparent.gif"></a>
  215. <?php endif; ?>
  216. </td>
  217. <td class="align-center sort">
  218. <span class="editable" ds_type="inline_edit" fieldname="mall_goods_sort" ajax_branch='mall_goods_sort' fieldid="<?php echo htmlentities($v['goods_commonid']); ?>" datatype="pint" maxvalue="255" title="<?php echo htmlentities(lang('ds_editable')); ?>"><?php echo htmlentities($v['mall_goods_sort']); ?></span>
  219. </td>
  220. <?php endif; ?>
  221. <td class="align-center">
  222. <a href="<?php echo url('/home/goods/index',['goods_id' =>$storage_array[$v['goods_commonid']]['goods_id']]); ?>" target="_blank" class="dsui-btn-view"><i class="iconfont"></i><?php echo htmlentities(lang('ds_view')); ?></a>
  223. <?php if($type == 'lockup'): ?>
  224. <a href="javascript:dsLayerConfirm('<?php echo url('Goods/goods_del',['common_id'=>$v['goods_commonid']]); ?>','<?php echo htmlentities(lang('ds_ensure_del')); ?>',<?php echo htmlentities($v['goods_commonid']); ?>)" class="dsui-btn-del"><i class="iconfont"></i><?php echo htmlentities(lang('ds_del')); ?></a>
  225. <?php elseif($type == 'waitverify'): ?>
  226. <a href="javascript:void(0);" onclick="goods_verify(<?php echo htmlentities($v['goods_commonid']); ?>);" class="dsui-btn-edit"><i class="iconfont"></i><?php echo htmlentities(lang('ds_verify')); ?></a>
  227. <?php elseif($type == 'allgoods'): ?>
  228. <a href="javascript:void(0);" onclick="goods_lockup(<?php echo htmlentities($v['goods_commonid']); ?>);" class="dsui-btn-del"><i class="iconfont"></i><?php echo htmlentities(lang('goods_index_lock')); ?></a>
  229. <?php endif; ?>
  230. </td>
  231. </tr>
  232. <tr style="display:none;">
  233. <td colspan="20"><div class="dssc-goods-sku ps-container"></div></td>
  234. </tr>
  235. <?php endforeach; endif; else: echo "" ;endif; else: ?>
  236. <tr class="no_data">
  237. <td colspan="15"><?php echo htmlentities(lang('ds_no_record')); ?></td>
  238. </tr>
  239. <?php endif; ?>
  240. </tbody>
  241. <tfoot>
  242. <tr class="tfoot">
  243. &nbsp;&nbsp;
  244. <?php if($type == 'lockup'): ?>
  245. <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
  246. <td colspan="16"><label for="checkallBottom"><?php echo htmlentities(lang('ds_select_all')); ?></label>
  247. &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span><?php echo htmlentities(lang('ds_del')); ?></span></a>
  248. </td>
  249. <?php elseif($type == 'waitverify'): ?>
  250. <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
  251. <td colspan="16"><label for="checkallBottom"><?php echo htmlentities(lang('ds_select_all')); ?></label>
  252. <a href="javascript:void(0);" class="btn btn-small" dstype="verify_batch"><span><?php echo htmlentities(lang('ds_verify')); ?></span></a>
  253. </td>
  254. <?php elseif($type == 'allgoods'): ?>
  255. <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
  256. <td colspan="16"><label for="checkallBottom"><?php echo htmlentities(lang('ds_select_all')); ?></label>
  257. <a href="JavaScript:void(0);" class="btn btn-small" dstype="lockup_batch"><span><?php echo htmlentities(lang('goods_index_lock')); ?></span></a>
  258. </td>
  259. <?php endif; ?>
  260. </tr>
  261. </tfoot>
  262. </table>
  263. <?php echo $show_page; ?>
  264. </div>
  265. <script type="text/javascript" src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/jquery.edit.js" charset="utf-8"></script>
  266. <script type="text/javascript" src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.mousewheel.js"></script>
  267. <script type="text/javascript" src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/mlselection.js" charset="utf-8"></script>
  268. <script type="text/javascript">
  269. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  270. $(function(){
  271. //商品分类
  272. init_gcselect(<?php echo $gc_choose_json; ?>,<?php echo $gc_json; ?>);
  273. /* AJAX选择品牌 */
  274. $("#ajax_brand").brandinit();
  275. $('#dssubmit').click(function(){
  276. $('#formSearch').submit();
  277. });
  278. // 审核批量处理
  279. $('a[dstype="verify_batch"]').click(function(){
  280. ids_str = getItems();
  281. if (ids_str) {
  282. goods_verify(ids_str);
  283. }
  284. });
  285. // 违规下架批量处理
  286. $('a[dstype="lockup_batch"]').click(function(){
  287. ids_str = getItems();
  288. if (ids_str) {
  289. goods_lockup(ids_str);
  290. }
  291. });
  292. // ajax获取商品列表
  293. $('i[dstype="ajaxGoodsList"]').click(
  294. function(){
  295. var status = $(this).attr("status");
  296. if (status == 'open') {
  297. $(this).attr('status', 'close');
  298. $(this).removeClass('icon-jia').addClass('icon-jian');
  299. var _parenttr = $(this).parents('tr');
  300. var _commonid = $(this).attr('data-comminid');
  301. var _div = _parenttr.next().find('.dssc-goods-sku');
  302. if (_div.html() == '') {
  303. $.getJSON('<?php echo url("Goods/get_goods_list_ajax"); ?>' , {commonid : _commonid}, function(date){
  304. if (date != 'false') {
  305. var _ul = $('<ul class="dssc-goods-sku-list"></ul>');
  306. var res = eval('(' + date + ')');
  307. for (var i = 0; i < res.length; i++)
  308. {
  309. $('<li><div class="goods-thumb" title="<?php echo htmlentities(lang('goods_serial')); ?>:' + res[i].goods_serial + '"><a href="' + res[i].url + '" target="_blank"><image src="' + res[i].goods_image + '" ></a></div>' + res[i].goods_spec + '<div class="goods-price"><?php echo htmlentities(lang('goods_price')); ?>:<em title="¥' + res[i].goods_price + '">¥' + res[i].goods_price + '</em></div><div class="goods-storage"><?php echo htmlentities(lang('goods_storage')); ?>:<em title="' + res[i].goods_storage + '">' + res[i].goods_storage + '</em></div><a href="' + res[i].url + '" target="_blank" class="dssc-btn-mini"><?php echo htmlentities(lang('show_goods_detail')); ?></a></li>').appendTo(_ul);
  310. _ul.appendTo(_div);
  311. _parenttr.next().show();
  312. }
  313. // 计算div的宽度
  314. _div.css('width', document.body.clientWidth-54);
  315. // _div.perfectScrollbar();
  316. }
  317. });
  318. } else {
  319. _parenttr.next().show()
  320. }
  321. }else{
  322. $(this).attr('status', 'open');
  323. $(this).removeClass('icon-jian').addClass('icon-jia');
  324. $(this).parents('tr').next().hide();
  325. }
  326. }
  327. );
  328. });
  329. // 获得选中ID
  330. function getItems() {
  331. /* 获取选中的项 */
  332. var items = '';
  333. $('.checkitem:checked').each(function () {
  334. items += this.value + ',';
  335. });
  336. if (items != '') {
  337. items = items.substr(0, (items.length - 1));
  338. }else{
  339. layer.alert('<?php echo htmlentities(lang('please_select_input')); ?>', {icon: 2})
  340. }
  341. return items;
  342. }
  343. // 商品下架
  344. function goods_lockup(ids_str) {
  345. _uri = ADMINSITEURL+"/Goods/goods_lockup?commonid=" + ids_str;
  346. dsLayerOpen(_uri,'<?php echo htmlentities(lang('goods_index_lock_reason')); ?>','400px','500px');
  347. }
  348. // 商品审核
  349. function goods_verify(ids_str) {
  350. _uri = ADMINSITEURL+"/Goods/goods_verify?commonid=" + ids_str;
  351. dsLayerOpen(_uri,'<?php echo htmlentities(lang('goods_verify')); ?>','400px','200px');
  352. }
  353. function submit_delete(ids_str){
  354. _uri = ADMINSITEURL+"/Goods/goods_del.html?common_id=" + ids_str;
  355. dsLayerConfirm(_uri,'<?php echo htmlentities(lang('ds_ensure_del')); ?>');
  356. }
  357. </script>