| 
						
						
							
								
							
						
						
					 | 
					@ -33,6 +33,8 @@ class index extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->ajax_json(true, 'succ', $list); | 
					 | 
					 | 
					        $this->ajax_json(true, 'succ', $list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public function order_list() {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public function ajax_get_order_list() { | 
					 | 
					 | 
					    public function ajax_get_order_list() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $shopinfo = $this->get_shopinfo(); | 
					 | 
					 | 
					        $shopinfo = $this->get_shopinfo(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -54,6 +56,19 @@ class index extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods; | 
					 | 
					 | 
					            $goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $GLOBALS['order_status2class'] = array( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_WAIT_DELIVER_GOODS => 'list_status_grey01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_DELIVERED => 'list_status_grey01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_SIGNED_FOR => 'list_status_yellow01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $GLOBALS['refund_status2class'] = array( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_NO_AFTER_SALES => 'list_status_grey01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_ING => 'list_status_red01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_AFTER_SALE_ING => 'list_status_yellow01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_SUCC => 'list_status_green01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $nlist = array(); | 
					 | 
					 | 
					        $nlist = array(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        foreach ($list as $info) { | 
					 | 
					 | 
					        foreach ($list as $info) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -66,9 +81,8 @@ class index extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $ninfo['goods_name'] = $goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['goods_name'].' '.$goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['sku_name']; | 
					 | 
					 | 
					            $ninfo['goods_name'] = $goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['goods_name'].' '.$goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['sku_name']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $ninfo['goods_id'] = $info['goods_id']; | 
					 | 
					 | 
					            $ninfo['goods_id'] = $info['goods_id']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $ninfo['sku_id'] = $info['sku_id']; | 
					 | 
					 | 
					            $ninfo['sku_id'] = $info['sku_id']; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $ninfo['is_wait_deliver_goods'] = $info['order_status']==ORDER_STATUS_WAIT_DELIVER_GOODS ? true : false; | 
					 | 
					 | 
					            $ninfo['order_status_class'] = $GLOBALS['order_status2class'][$info['order_status']]; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $ninfo['is_refund'] = $info['refund_status']==REFUND_STATUS_NO_AFTER_SALES ? false : true; | 
					 | 
					 | 
					            $ninfo['refund_status_class'] = $GLOBALS['refund_status2class'][$info['refund_status']]; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            $ninfo['is_refund_succ'] = $info['refund_status']==REFUND_STATUS_SUCC ? true : false; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $nlist['data'][] = $ninfo; | 
					 | 
					 | 
					            $nlist['data'][] = $ninfo; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -78,44 +92,17 @@ class index extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->ajax_json(true, 'succ', $nlist); | 
					 | 
					 | 
					        $this->ajax_json(true, 'succ', $nlist); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public function order_list() { | 
					 | 
					 | 
					    public function after_sale_list() {} | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        $url = '/index/order_list'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public function ajax_get_after_sale_order_list() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $shopinfo = $this->get_shopinfo(); | 
					 | 
					 | 
					        $shopinfo = $this->get_shopinfo(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        $uid = $shopinfo['uid']; | 
					 | 
					 | 
					        $page = $this->get('page')+0; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        $shop_id = $shopinfo['id']; | 
					 | 
					 | 
					        $pagesize = $this->get('limit')+0; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $order_status = $this->get('order_status')+0; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if ($order_status) $url .= '/order_status/'.$order_status; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $refund_status = $this->get('refund_status')+0; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if ($refund_status) $url .= '/refund_status/'.$refund_status; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $obj = new mOrder(); | 
					 | 
					 | 
					        $obj = new mOrder(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        $count = $obj->getOrdersCount($uid, $shop_id, $order_status, $refund_status); | 
					 | 
					 | 
					        $list = $obj->getOrderList($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING, $page, $pagesize); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					        if (empty($list)) $this->ajax_json(false, 'empty list'); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        // 分页 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $page = new Page(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $page->setTotalnum($count); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $page->setUrl($url.'/page/'); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $curpage = $this->get('page')>0 ? $this->get('page') : 1; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $page->setPage($curpage); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $pagesize = $page->pagesize = 50; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->view['page_list'] = $page->getPageList(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->view['curpage'] = $curpage; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if ($curpage > 1) $this->view['prev_page'] = $page->url . ($curpage - 1); //上一页连接 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if ($curpage < $page->totalpage) $this->view['post_page'] = $page->url . ($curpage + 1); //下一页连接 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //只取出当前页显示 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $list = $obj->getOrderList($uid, $shop_id, $order_status, $refund_status, $curpage, $pagesize); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->view['list'] = $list ? $list : array(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->view['order_status'] = $GLOBALS['order_status']; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $this->view['refund_status'] = $GLOBALS['refund_status']; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (empty($list)) return true; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $goods_ids = array_unique(array_column($list, 'goods_id')); | 
					 | 
					 | 
					        $goods_ids = array_unique(array_column($list, 'goods_id')); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -127,7 +114,42 @@ class index extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        foreach ($goods_list as $goods) { | 
					 | 
					 | 
					        foreach ($goods_list as $goods) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            $goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods; | 
					 | 
					 | 
					            $goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        $this->view['goodsid2skuid2info'] = $goodsid2skuid2info; | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $GLOBALS['order_status2class'] = array( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_WAIT_DELIVER_GOODS => 'list_status_grey01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_DELIVERED => 'list_status_red01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER_STATUS_SIGNED_FOR => 'list_status_yellow01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $GLOBALS['refund_status2class'] = array( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_NO_AFTER_SALES => 'list_status_grey01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_ING => 'list_status_red01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_AFTER_SALE_ING => 'list_status_yellow01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            REFUND_STATUS_SUCC => 'list_status_green01', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $nlist = array(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        foreach ($list as $info) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo = array(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['order_sn'] = $info['order_sn']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['pay_time'] = $info['pay_time']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['pay_amount'] = $info['pay_amount']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['order_status_desc'] = $GLOBALS['order_status'][$info['order_status']]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['refund_status_desc'] = $GLOBALS['refund_status'][$info['refund_status']]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['after_sales_status_desc'] = $GLOBALS['after_sales_status'][$info['after_sales_status']]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['goods_name'] = $goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['goods_name'].' '.$goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['sku_name']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['goods_id'] = $info['goods_id']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['sku_id'] = $info['sku_id']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['order_status_class'] = $GLOBALS['order_status2class'][$info['order_status']]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $ninfo['refund_status_class'] = $GLOBALS['refund_status2class'][$info['refund_status']]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $nlist['data'][] = $ninfo; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $nlist['total'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING)+0; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $this->ajax_json(true, 'succ', $nlist); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public function export_wait_deliver_goods_tids() { | 
					 | 
					 | 
					    public function export_wait_deliver_goods_tids() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |