PointsController.class.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. * ==========================================================================
  6. * @link http://www.liofis.com/
  7. * @copyright Copyright (c) 2015 liofis.com.
  8. * @license http://www.liofis.com/license.html License
  9. * ==========================================================================
  10. *
  11. * @author fish
  12. *
  13. */
  14. namespace Seller\Controller;
  15. class PointsController extends CommonController{
  16. protected function _initialize(){
  17. parent::_initialize();
  18. }
  19. public function goods()
  20. {
  21. $pindex = I('get.page', 1);
  22. $psize = 20;
  23. $starttime_arr = I('get.time');
  24. $starttime = isset($starttime_arr['start']) ? strtotime($starttime_arr['start']) : strtotime(date('Y-m-d'.' 00:00:00'));
  25. $endtime = isset($starttime_arr['end']) ? strtotime($starttime_arr['end']) : strtotime(date('Y-m-d'.' 23:59:59'));
  26. $this->starttime = $starttime;
  27. $this->endtime = $endtime;
  28. $searchtime = I('get.searchtime','');
  29. $this->searchtime = $searchtime;
  30. $shop_data = array();
  31. $type = I('get.type','all');
  32. //---begin
  33. $count_common_where ="";
  34. if (defined('ROLE') && ROLE == 'agenter' ) {
  35. $supper_info = get_agent_logininfo();
  36. $supper_goods_list = M('lionfish_comshop_good_common')->field('goods_id')->where( array('supply_id' =>$supper_info['id'] ) )->select();
  37. $gids_list = array();
  38. foreach($supper_goods_list as $vv)
  39. {
  40. $gids_list[] = $vv['goods_id'];
  41. }
  42. if( !empty($gids_list) )
  43. {
  44. $count_common_where = " and id in ( ".implode(',', $gids_list )." )";
  45. }else{
  46. $count_common_where = " and id in (0)";
  47. }
  48. }
  49. $all_count = D('Seller/Goods')->get_goods_count(" and type = 'integral' {$count_common_where}");//全部商品数量
  50. $onsale_count = D('Seller/Goods')->get_goods_count(" and grounding = 1 and type = 'integral' {$count_common_where}");//出售中商品数量
  51. $getdown_count = D('Seller/Goods')->get_goods_count(" and grounding = 0 and type = 'integral' {$count_common_where}");//已下架商品数量
  52. $warehouse_count = D('Seller/Goods')->get_goods_count(" and grounding = 2 and type = 'integral' {$count_common_where}");//仓库商品数量
  53. $recycle_count = D('Seller/Goods')->get_goods_count(" and grounding = 3 and type = 'integral' {$count_common_where}");//回收站商品数量
  54. $waishen_count = D('Seller/Goods')->get_goods_count(" and grounding = 4 and type = 'integral' {$count_common_where}");//审核商品数量
  55. $unsuccshen_count = D('Seller/Goods')->get_goods_count(" and grounding = 5 and type = 'integral' {$count_common_where}");//拒绝审核商品数量
  56. $this->assign('waishen_count',$waishen_count);
  57. $this->assign('unsuccshen_count',$unsuccshen_count);
  58. //recycle 仓库
  59. //--end
  60. //recycle 仓库 get_config_by_name($name)
  61. $goods_stock_notice = D('Home/Front')->get_config_by_name('goods_stock_notice');
  62. $goods_stock_notice = intval($goods_stock_notice);
  63. if( empty($goods_stock_notice) )
  64. {
  65. $goods_stock_notice = 0;
  66. }
  67. $stock_notice_count = D('Admin/Goods')->get_goods_count(" and grounding = 1 and total<= {$goods_stock_notice} and type = 'normal' {$count_common_where} ");//回收站商品数量
  68. //goods_stock_notice
  69. //grounding 1
  70. //type all 全部
  71. //saleon 1 出售中
  72. //getdown 0 已下架
  73. //warehouse 2 仓库中
  74. //recycle 3 回收站
  75. $psize = 20;
  76. $condition = ' WHERE g.type = "integral" ';
  77. $sqlcondition = "";
  78. if( !empty($type) && $type != 'all')
  79. {
  80. switch($type)
  81. {
  82. case 'saleon':
  83. $condition .= " and g.grounding = 1";
  84. break;
  85. case 'getdown':
  86. $condition .= " and g.grounding = 0";
  87. break;
  88. case 'warehouse':
  89. $condition .= " and g.grounding = 2";
  90. break;
  91. case 'wait_shen':
  92. $condition .= " and g.grounding = 4";
  93. break;
  94. case 'refuse':
  95. $condition .= " and g.grounding = 5";
  96. break;
  97. case 'recycle':
  98. $condition .= " and g.grounding = 3";
  99. break;
  100. case 'stock_notice':
  101. $condition .= " and g.grounding = 1 and g.total<= {$goods_stock_notice} ";
  102. break;
  103. }
  104. }else{
  105. $condition .= " and g.grounding != 3 ";
  106. }
  107. $keyword = I('get.keyword','');
  108. $this->keyword = $keyword;
  109. if (!(empty($keyword))) {
  110. $condition .= " AND (g.`id` = '{$keyword}' or g.`goodsname` LIKE '%{$keyword}%' or g.`codes` LIKE '%{$keyword}%' ) ";
  111. }
  112. if (defined('ROLE') && ROLE == 'agenter' )
  113. {
  114. $supper_info = get_agent_logininfo();
  115. $sqlcondition .= ' , ' . C('DB_PREFIX'). 'lionfish_comshop_good_common as gm ';
  116. $condition .= ' and gm.goods_id =g.id AND gm.supply_id ='.$supper_info['id'].' ';
  117. }
  118. if( !empty($searchtime) )
  119. {
  120. switch( $searchtime )
  121. {
  122. case 'create':
  123. $condition .= ' AND (gm.begin_time >='.$starttime.' and gm.end_time < '.$endtime.' )';
  124. if (!defined('ROLE') && ROLE != 'agenter' )
  125. {
  126. $sqlcondition .= ' left join ' . C('DB_PREFIX'). 'lionfish_comshop_good_common as gm on gm.goods_id = g.id ';
  127. }
  128. break;
  129. }
  130. }
  131. $cate = I('get.cate', '');
  132. $this->cate = $cate;
  133. if( !empty($cate) )
  134. {
  135. $cate_list = M('lionfish_comshop_goods_to_category')->field('goods_id')->where(array('cate_id' => $cate))->select();
  136. $catids_arr = array();
  137. foreach($cate_list as $val)
  138. {
  139. $catids_arr[] = $val['goods_id'];
  140. }
  141. if( !empty($catids_arr) )
  142. {
  143. $catids_str = implode(',', $catids_arr);
  144. $condition .= ' and g.id in ('.$catids_str.')';
  145. }else{
  146. $condition .= " and 1=0 ";
  147. }
  148. }
  149. $sql = 'SELECT COUNT(g.id) as count FROM ' .C('DB_PREFIX'). 'lionfish_comshop_goods g ' .$sqlcondition. $condition ;
  150. $total_arr = M()->query($sql);
  151. $total = $total_arr[0]['count'];
  152. $pager = pagination2($total, $pindex, $psize);
  153. if (!(empty($total))) {
  154. $sql = 'SELECT g.* FROM ' .C('DB_PREFIX'). 'lionfish_comshop_goods g ' .$sqlcondition . $condition . '
  155. ORDER BY g.istop DESC, g.settoptime DESC, g.`id` DESC ';
  156. $sql .= ' limit ' . (($pindex - 1) * $psize) . ',' . $psize;
  157. $list = M()->query($sql);
  158. foreach ($list as $key => &$value ) {
  159. $price_arr = D('Home/Pingoods')->get_goods_price($value['id']);
  160. $value['price_arr'] = $price_arr;
  161. $thumb = M('lionfish_comshop_goods_images')->where( array('goods_id' => $value['id']) )->order('id asc')->find();
  162. if( empty($thumb['thumb']) )
  163. {
  164. $value['thumb'] = $thumb['image'];
  165. }else{
  166. $value['thumb'] = $thumb['thumb'];
  167. }
  168. //is_take_fullreduction
  169. $gd_common = M('lionfish_comshop_good_common')->field('is_take_fullreduction,supply_id')->where( array('goods_id' => $value['id']) )->find();
  170. $value['is_take_fullreduction'] = $gd_common['is_take_fullreduction'];
  171. $value['supply_name'] = '';
  172. if( empty($gd_common['supply_id']) || $gd_common['supply_id'] ==0 )
  173. {
  174. $value['supply_id'] = 0;
  175. }else{
  176. $value['supply_id'] = $gd_common['supply_id'];
  177. $sub_info = M('lionfish_comshop_supply')->field('name')->where( array('id' => $gd_common['supply_id'] ) )->find();
  178. $value['supply_name'] = $sub_info['name'];
  179. }
  180. $categorys = M('lionfish_comshop_goods_to_category')->where( array('goods_id' => $value['id']) )->order('id asc')->select();
  181. $value['cate'] = $categorys;
  182. $time_info = D('home/front')->get_goods_common_field($value['id'] , 'begin_time,end_time');
  183. $value['begin_time'] = $time_info['begin_time'];
  184. $value['end_time'] = $time_info['end_time'];
  185. //团长数量
  186. $head_count = 0;
  187. if( $value['is_all_sale'] == 1 )
  188. {
  189. $head_count = M('lionfish_community_head')->count();
  190. }else{
  191. $head_count = M('lionfish_community_head_goods')->where( array('goods_id' => $value['id'] ) )->count();
  192. }
  193. $value['head_count'] = $head_count;
  194. }
  195. }
  196. $categorys = D('Seller/GoodsCategory')->getFullCategory(true,false,'pintuan');
  197. $category = array();
  198. foreach ($categorys as $cate ) {
  199. $category[$cate['id']] = $cate;
  200. }
  201. $this->category =$category;
  202. $this->type = $type;
  203. $this->all_count = $all_count;
  204. $this->onsale_count = $onsale_count;
  205. $this->getdown_count = $getdown_count;
  206. $this->warehouse_count = $warehouse_count;
  207. $this->recycle_count = $recycle_count;
  208. $this->stock_notice_count = $stock_notice_count;
  209. $this->assign('list',$list);// 赋值数据集
  210. $this->assign('pager',$pager);// 赋值分页输出
  211. $is_open_fullreduction = 0;
  212. $this->assign('is_open_fullreduction',$is_open_fullreduction);
  213. $index_sort_method = D('Home/Front')->get_config_by_name('index_sort_method');
  214. if( empty($index_sort_method) || $index_sort_method == 0 )
  215. {
  216. $index_sort_method = 0;
  217. }
  218. $this->index_sort_method = $index_sort_method;
  219. //---
  220. $supply_add_goods_shenhe = D('Home/Front')->get_config_by_name('supply_add_goods_shenhe');
  221. $supply_edit_goods_shenhe = D('Home/Front')->get_config_by_name('supply_edit_goods_shenhe');
  222. $supply_add_goods_shenhe = 0;
  223. $supply_edit_goods_shenhe = 0;
  224. $is_open_shenhe = 0;
  225. $this->supply_add_goods_shenhe = $supply_add_goods_shenhe;
  226. $this->supply_edit_goods_shenhe = $supply_edit_goods_shenhe;
  227. $this->assign('is_open_shenhe',$is_open_shenhe);
  228. //--
  229. //团长分组
  230. $group_default_list = array(
  231. array('id' => 'default', 'groupname' => '默认分组')
  232. );
  233. $this->group_list = array();
  234. $config_data = D('Seller/Config')->get_all_config();
  235. $pintuan_model_buy = 0;
  236. $this->pintuan_model_buy = $pintuan_model_buy;
  237. //团长分组
  238. $group_default_list = array(
  239. array('id' => 'default', 'groupname' => '默认分组')
  240. );
  241. $this->group_list = $group_list;
  242. $is_index = false;
  243. $is_top = false;
  244. $is_updown = false;
  245. $is_fullreduce = false;
  246. $is_vir_count = false;
  247. $is_newbuy = false;
  248. $is_goodsspike = false;
  249. $this->config_data = $config_data;
  250. $this->is_index = $is_index;
  251. $this->is_top = $is_top;
  252. $this->is_updown = $is_updown;
  253. $this->is_fullreduce = $is_fullreduce;
  254. $this->is_vir_count = $is_vir_count;
  255. $this->is_newbuy = $is_newbuy;
  256. $this->is_goodsspike = $is_goodsspike;
  257. $this->display();
  258. }
  259. public function editgoods()
  260. {
  261. $id = I('get.id');
  262. if (IS_POST) {
  263. $_GPC = I('post.');
  264. if( !isset($_GPC['thumbs']) || empty($_GPC['thumbs']) )
  265. {
  266. show_json(0, array('message' => '商品图片必须上传' ,'url' => $_SERVER['HTTP_REFERER']) );
  267. die();
  268. }
  269. D('Seller/Goods')->modify_goods('integral');
  270. $http_refer = S('HTTP_REFERER');
  271. $http_refer = empty($http_refer) ? $_SERVER['HTTP_REFERER'] : $http_refer;
  272. show_json(1, array('message'=>'修改商品成功!','url' => $http_refer ));
  273. }
  274. //sss
  275. S('HTTP_REFERER', $_SERVER['HTTP_REFERER']);
  276. $this->id = $id;
  277. $item = D('Seller/Goods')->get_edit_goods_info($id,0);
  278. //-------------------------以上是获取资料
  279. $limit_goods = array();
  280. $this->limit_goods = $limit_goods;
  281. $category = D('Seller/GoodsCategory')->getFullCategory(true, true);
  282. $this->category = $category;
  283. $spec_list = D('Seller/Spec')->get_all_spec();
  284. $this->spec_list = $spec_list;
  285. $dispatch_data = M('lionfish_comshop_shipping')->where( array('enabled' => 1, 'isdefault' => 1) )->order('sort_order desc')->select();
  286. $this->dispatch_data = $dispatch_data;
  287. $set = D('Seller/Config')->get_all_config();
  288. $this->set = $set;
  289. $commission_level = array();
  290. $config_data = $set;
  291. $this->config_data = $config_data;
  292. $default = array('id' => 'default', 'levelname' => empty($config_data['commission_levelname']) ? '默认等级' : $config_data['commission_levelname'], 'commission1' => $config_data['commission1'], 'commission2' => $config_data['commission2'], 'commission3' => $config_data['commission3']);
  293. //$others = pdo_fetchall('SELECT * FROM ' . tablename('lionfish_comshop_commission_level') . ' WHERE uniacid = \'' . $_W['uniacid'] . '\' ORDER BY commission1 asc');
  294. //$commission_level = array_merge(array($default), $others);
  295. $commission_level = array();
  296. //$level['key']
  297. foreach($commission_level as $key => $val)
  298. {
  299. $val['key'] = $val['id'];
  300. $commission_level[$key] = $val;
  301. }
  302. $shopset_level = empty($set['commiss_level']) ? 0: $set['commiss_level'];
  303. $this->shopset_level = $shopset_level;
  304. $open_buy_send_score = empty($set['open_buy_send_score']) ? 0: $set['open_buy_send_score'];
  305. $this->open_buy_send_score = $open_buy_send_score;
  306. $delivery_type_express = $config_data['delivery_type_express'];
  307. if( empty($delivery_type_express) )
  308. {
  309. $delivery_type_express = 2;
  310. }
  311. $this->delivery_type_express = $delivery_type_express;
  312. $is_open_fullreduction = $config_data['is_open_fullreduction'];
  313. $this->is_open_fullreduction = $is_open_fullreduction;
  314. $community_head_level = M('lionfish_comshop_community_head_level')->order('id asc')->select();
  315. $head_commission_levelname = $config_data['head_commission_levelname'];
  316. $default_comunity_money = $config_data['default_comunity_money'];
  317. $list_default = array(
  318. array('id' => '0','level'=>0,'levelname' => empty($head_commission_levelname) ? '默认等级' : $head_commission_levelname, 'commission' => $default_comunity_money, )
  319. );
  320. $community_head_level = array_merge($list_default, $community_head_level);
  321. $community_head_commission_info = D('Seller/Communityhead')->get_goods_head_level_bili( $id );
  322. $mb_level = M('lionfish_comshop_member_level')->count();
  323. $this->mb_level = $mb_level;
  324. if( !empty($community_head_commission_info) )
  325. {
  326. foreach( $community_head_commission_info as $kk => $vv)
  327. {
  328. $item[$kk] = $vv;
  329. }
  330. }
  331. $this->community_head_commission_info = $community_head_commission_info;
  332. $this->item = $item;
  333. $this->community_head_level = $community_head_level;
  334. //end
  335. $community_money_type = $config_data['community_money_type'];
  336. $this->community_money_type = $community_money_type;
  337. $index_sort_method = D('Home/Front')->get_config_by_name('index_sort_method');
  338. if( empty($index_sort_method) || $index_sort_method == 0 )
  339. {
  340. $index_sort_method = 0;
  341. }
  342. $this->index_sort_method = $index_sort_method;
  343. $is_open_only_express = $config_data['is_open_only_express'];
  344. $this->is_open_only_express = $is_open_only_express;
  345. $is_open_goods_relative_goods = 0;
  346. $this->is_open_goods_relative_goods = $is_open_goods_relative_goods;
  347. //供应商权限begin
  348. $is_index = true;
  349. $is_top = true;
  350. $is_updown = true;
  351. $is_fullreduce = true;
  352. $is_vir_count = true;
  353. $is_newbuy = true;
  354. $is_goodsspike = true;
  355. //供应商权限end
  356. $this->is_index = $is_index;
  357. $this->is_top = $is_top;
  358. $this->is_updown = $is_updown;
  359. $this->is_fullreduce = $is_fullreduce;
  360. $this->is_vir_count = $is_vir_count;
  361. $this->is_newbuy = $is_newbuy;
  362. $this->is_goodsspike = $is_goodsspike;
  363. $pintuan_model_buy = 0;
  364. //供应商权限begin community_head_level
  365. $this->pintuan_model_buy = $pintuan_model_buy;
  366. $this->display('Points/addgoods');
  367. }
  368. public function addgoods()
  369. {
  370. if (IS_POST) {
  371. $_GPC = I('request.');
  372. if( !isset($_GPC['thumbs']) || empty($_GPC['thumbs']) )
  373. {
  374. show_json(0, array('message' => '商品图片必须上传' ,'url' => $_SERVER['HTTP_REFERER']) );
  375. die();
  376. }
  377. D('Seller/Goods')->addgoods('integral');
  378. $http_refer = S('HTTP_REFERER');
  379. $http_refer = empty($http_refer) ? $_SERVER['HTTP_REFERER'] : $http_refer;
  380. show_json(1, array('message' => '添加商品成功!','url' => $http_refer ));
  381. }
  382. S('HTTP_REFERER', $_SERVER['HTTP_REFERER']);
  383. $this->category = array();
  384. $spec_list = D('Seller/Spec')->get_all_spec();
  385. $this->spec_list = $spec_list;
  386. $dispatch_data = M('lionfish_comshop_shipping')->where( array('enabled' => 1,'isdefault' =>1) )->order('sort_order desc')->select();
  387. $this->dispatch_data = $dispatch_data;
  388. $set = D('Seller/Config')->get_all_config();
  389. $commission_level = array();
  390. $config_data = $set;
  391. $this->config_data = $config_data;
  392. $default = array('id' => 'default', 'levelname' => empty($config_data['commission_levelname']) ? '默认等级' : $config_data['commission_levelname'], 'commission1' => $config_data['commission1'], 'commission2' => $config_data['commission2'], 'commission3' => $config_data['commission3']);
  393. $others = M('lionfish_comshop_commission_level')->order('commission1 asc')->select();
  394. $commission_level = array_merge(array($default), $others);
  395. $communityhead_commission = $config_data['default_comunity_money'];
  396. $this->communityhead_commission = $communityhead_commission;
  397. //$level['key']
  398. foreach($commission_level as $key => $val)
  399. {
  400. $val['key'] = $val['id'];
  401. $commission_level[$key] = $val;
  402. }
  403. $this->commission_level = $commission_level;
  404. $shopset_level = empty($set['commiss_level']) ? 0: $set['commiss_level'];
  405. $this->shopset_level = $shopset_level;
  406. $open_buy_send_score = empty($set['open_buy_send_score']) ? 0: $set['open_buy_send_score'];
  407. $this->open_buy_send_score = $open_buy_send_score;
  408. $item = array();
  409. $item['begin_time'] = time();
  410. $item['community_head_commission'] = $communityhead_commission;
  411. $item['end_time'] = time() + 86400;
  412. $delivery_type_express = $config_data['delivery_type_express'];
  413. if( empty($delivery_type_express) )
  414. {
  415. $delivery_type_express = 2;
  416. }
  417. $this->delivery_type_express = $delivery_type_express;
  418. $is_open_fullreduction = $config_data['is_open_fullreduction'];
  419. $this->is_open_fullreduction = $is_open_fullreduction;
  420. $community_head_level = M('lionfish_comshop_community_head_level')->order('id asc')->select();
  421. $head_commission_levelname = $config_data['head_commission_levelname'];
  422. $default_comunity_money = $config_data['default_comunity_money'];
  423. $list_default = array(
  424. array('id' => '0','level'=>0,'levelname' => empty($head_commission_levelname) ? '默认等级' : $head_commission_levelname, 'commission' => $default_comunity_money, )
  425. );
  426. $community_head_level = array_merge($list_default, $community_head_level);
  427. if( !empty($community_head_level) )
  428. {
  429. foreach( $community_head_level as $head_level)
  430. {
  431. $item['head_level'.$head_level['id']] = $head_level['commission'];
  432. }
  433. }
  434. $this->item = $item;
  435. $this->community_head_level = $community_head_level;
  436. $community_money_type = $config_data['community_money_type'];
  437. $this->community_money_type = $community_money_type;
  438. $mb_level = M('lionfish_comshop_member_level')->count();
  439. $this->mb_level = $mb_level;
  440. $is_open_only_express = $config_data['is_open_only_express'];
  441. $this->is_open_only_express = $is_open_only_express;
  442. $is_open_goods_relative_goods = $config_data['is_open_goods_relative_goods'];
  443. $this->is_open_goods_relative_goods = $is_open_goods_relative_goods;
  444. //供应商权限begin
  445. $is_index = true;
  446. $is_top = true;
  447. $is_updown = true;
  448. $is_fullreduce = true;
  449. $is_vir_count = true;
  450. $is_newbuy = true;
  451. $is_goodsspike = true;
  452. //供应商权限end
  453. $this->is_index = $is_index;
  454. $this->is_top = $is_top;
  455. $this->is_updown = $is_updown;
  456. $this->is_fullreduce = $is_fullreduce;
  457. $this->is_vir_count = $is_vir_count;
  458. $this->is_newbuy = $is_newbuy;
  459. $this->is_goodsspike = $is_goodsspike;
  460. $pintuan_model_buy = isset($config_data['pintuan_model_buy']) ? intval( $config_data['pintuan_model_buy'] ) : 0;
  461. $this->pintuan_model_buy = $pintuan_model_buy;
  462. $this->display();
  463. }
  464. public function order()
  465. {
  466. $_GPC = I("request.");
  467. $starttime = isset($_GPC['time']['start']) ? strtotime($_GPC['time']['start']) : strtotime(date('Y-m-d'.' 00:00:00'));
  468. $endtime = isset($_GPC['time']['end']) ? strtotime($_GPC['time']['end']) : strtotime(date('Y-m-d'.' 23:59:59'));
  469. $order_status_arr = D('Seller/Order')->get_order_status_name();
  470. $need_data = D('Seller/Order')->load_order_list(0,0,0,1);
  471. $cur_controller = 'points/order';
  472. $total = $need_data['total'];
  473. $total_money = $need_data['total_money'];
  474. $list = $need_data['list'];
  475. $pager = $need_data['pager'];
  476. $all_count = $need_data['all_count'];
  477. $count_status_1 = $need_data['count_status_1'];
  478. $count_status_3 = $need_data['count_status_3'];
  479. $count_status_4 = $need_data['count_status_4'];
  480. $count_status_5 = $need_data['count_status_5'];
  481. $count_status_7 = $need_data['count_status_7'];
  482. $count_status_11 = $need_data['count_status_11'];
  483. $count_status_14 = $need_data['count_status_14'];
  484. $open_feier_print = D('Home/Front')->get_config_by_name('open_feier_print');
  485. if( empty($open_feier_print) )
  486. {
  487. $open_feier_print = 0;
  488. }
  489. $is_can_look_headinfo = true;
  490. $is_can_nowrfund_order = true;
  491. $this->starttime = $starttime;
  492. $this->endtime = $endtime;
  493. $this->cur_controller = $cur_controller;
  494. $this->total = $total;
  495. $this->total_money = $total_money;
  496. $this->list = $list;
  497. $this->pager = $pager;
  498. $this->all_count = $all_count;
  499. $this->count_status_1 = $count_status_1;
  500. $this->count_status_3 = $count_status_3;
  501. $this->count_status_4 = $count_status_4;
  502. $this->count_status_5 = $count_status_5;
  503. $this->count_status_7 = $count_status_7;
  504. $this->count_status_11 = $count_status_11;
  505. $this->count_status_14 = $count_status_14;
  506. $supply_can_look_headinfo = D('Home/Front')->get_config_by_name('supply_can_look_headinfo');
  507. $supply_can_nowrfund_order = D('Home/Front')->get_config_by_name('supply_can_nowrfund_order');
  508. $this->open_feier_print = $open_feier_print;
  509. $this->supply_can_look_headinfo = $supply_can_look_headinfo;
  510. $this->supply_can_nowrfund_order = $supply_can_nowrfund_order;
  511. $this->_GPC = $_GPC;
  512. $this->cur_controller = $cur_controller;
  513. $this->display();
  514. }
  515. }
  516. ?>