本文整理汇总了PHP中orderState函数的典型用法代码示例。如果您正苦于以下问题:PHP orderState函数的具体用法?PHP orderState怎么用?PHP orderState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了orderState函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: queryOrder
private function queryOrder($out_trade_no, $inStatus = '')
{
if (isset($out_trade_no) && $out_trade_no != "") {
$input = new WxPayOrderQuery();
$input->SetOut_trade_no($out_trade_no);
$info = WxPayApi::orderQuery($input);
if ($inStatus == 'code') {
return $info['trade_state'];
}
$status = orderState($info['trade_state']);
}
return $status;
}
示例2: complain_showOp
public function complain_showOp()
{
$complain_id = intval($_GET['complain_id']);
//获取投诉详细信息
$complain_info = $this->get_complain_info($complain_id);
//获取订单详细信息
$model_order = Model('order');
$order_info = $model_order->getOrderInfo(array('order_id' => $complain_info['order_id']));
if ($order_info['store_id'] != $_SESSION['store_id']) {
showMessage(Language::get('para_error'), '', 'html', 'error');
}
$order_info['order_state_text'] = orderState($order_info);
//获取投诉的商品列表
$model_complain_goods = Model('complain_goods');
$param = array();
$param['complain_id'] = $complain_id;
$complain_goods_list = $model_complain_goods->getComplainGoods($param);
$page_name = '';
switch (intval($complain_info['complain_state'])) {
case self::STATE_NEW:
$page_name = 'complain.info';
break;
case self::STATE_APPEAL:
$page_name = 'complain.appeal';
break;
case self::STATE_TALK:
$page_name = 'complain.talk';
break;
case self::STATE_HANDLE:
$page_name = 'complain.talk';
break;
case self::STATE_FINISH:
$page_name = 'complain.info';
break;
default:
showMessage(Language::get('para_error'), '', 'html', 'error');
}
Tpl::output('order_info', $order_info);
Tpl::output('complain_info', $complain_info);
Tpl::output('complain_goods_list', $complain_goods_list);
Tpl::output('left_show', 'order_view');
Tpl::showpage($page_name);
}
示例3: createExcel
/**
* 生成excel
*
* @param array $data
*/
private function createExcel($data = array())
{
Language::read('export');
import('libraries.excel');
$excel_obj = new Excel();
$excel_data = array();
//设置样式
$excel_obj->setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
//header
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_no'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_store'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_buyer'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_xtimd'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_count'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_yfei'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_paytype'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_state'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_storeid'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_buyerid'));
$excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_bemail'));
//data
foreach ((array) $data as $k => $v) {
$tmp = array();
$tmp[] = array('data' => 'NC' . $v['order_sn']);
$tmp[] = array('data' => $v['store_name']);
$tmp[] = array('data' => $v['buyer_name']);
$tmp[] = array('data' => date('Y-m-d H:i:s', $v['add_time']));
$tmp[] = array('format' => 'Number', 'data' => ncPriceFormat($v['order_amount']));
$tmp[] = array('format' => 'Number', 'data' => ncPriceFormat($v['shipping_fee']));
$tmp[] = array('data' => orderPaymentName($v['payment_code']));
$tmp[] = array('data' => orderState($v));
$tmp[] = array('data' => $v['store_id']);
$tmp[] = array('data' => $v['buyer_id']);
$tmp[] = array('data' => $v['buyer_email']);
$excel_data[] = $tmp;
}
$excel_data = $excel_obj->charset($excel_data, CHARSET);
$excel_obj->addArray($excel_data);
$excel_obj->addWorksheet($excel_obj->charset(L('exp_od_order'), CHARSET));
$excel_obj->generateXML($excel_obj->charset(L('exp_od_order'), CHARSET) . $_GET['curpage'] . '-' . date('Y-m-d-H', time()));
}
示例4: getOrderList
/**
* 取得订单列表(所有)
* @param unknown $condition
* @param string $pagesize
* @param string $field
* @param string $order
* @param string $limit
* @param unknown $extend 追加返回那些表的信息,如array('order_common','order_goods','store')
* @return Ambigous <multitype:boolean Ambigous <string, mixed> , unknown>
*/
public function getOrderList($condition, $pagesize = '', $field = '*', $order = 'order_id desc', $limit = '', $extend = array(), $master = false)
{
$list = $this->table('order')->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->master($master)->select();
if (empty($list)) {
return array();
}
$order_list = array();
foreach ($list as $order) {
if (isset($order['order_state'])) {
$order['state_desc'] = orderState($order);
}
if (isset($order['payment_code'])) {
$order['payment_name'] = orderPaymentName($order['payment_code']);
}
if (!empty($extend)) {
$order_list[$order['order_id']] = $order;
}
}
if (empty($order_list)) {
$order_list = $list;
}
//追加返回订单扩展表信息
if (in_array('order_common', $extend)) {
$order_common_list = $this->getOrderCommonList(array('order_id' => array('in', array_keys($order_list))));
foreach ($order_common_list as $value) {
$order_list[$value['order_id']]['extend_order_common'] = $value;
$order_list[$value['order_id']]['extend_order_common']['reciver_info'] = @unserialize($value['reciver_info']);
$order_list[$value['order_id']]['extend_order_common']['invoice_info'] = @unserialize($value['invoice_info']);
}
}
//追加返回店铺信息
if (in_array('store', $extend)) {
$store_id_array = array();
foreach ($order_list as $value) {
if (!in_array($value['store_id'], $store_id_array)) {
$store_id_array[] = $value['store_id'];
}
}
$store_list = Model('store')->getStoreList(array('store_id' => array('in', $store_id_array)));
$store_new_list = array();
foreach ($store_list as $store) {
$store_new_list[$store['store_id']] = $store;
}
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_store'] = $store_new_list[$order['store_id']];
}
}
//追加返回买家信息
if (in_array('member', $extend)) {
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_member'] = Model('member')->getMemberInfoByID($order['buyer_id']);
}
}
//追加返回商品信息
if (in_array('order_goods', $extend)) {
//取商品列表
$order_goods_list = $this->getOrderGoodsList(array('order_id' => array('in', array_keys($order_list))));
if (!empty($order_goods_list)) {
foreach ($order_goods_list as $value) {
$order_list[$value['order_id']]['extend_order_goods'][] = $value;
}
} else {
$order_list[$value['order_id']]['extend_order_goods'] = array();
}
}
return $order_list;
}
示例5: search_deliverOp
/**
* 物流跟踪
*/
public function search_deliverOp()
{
Language::read('member_member_index');
$lang = Language::getLangContent();
$order_sn = $_GET['order_sn'];
if (!is_numeric($order_sn)) {
showMessage(Language::get('wrong_argument'), '', 'html', 'error');
}
$model_order = Model('order');
$condition['order_sn'] = $order_sn;
$condition['store_id'] = $_SESSION['store_id'];
$order_info = $model_order->getOrderInfo($condition, array('order_common', 'order_goods'));
if (empty($order_info) || $order_info['shipping_code'] == '') {
showMessage('未找到信息', '', 'html', 'error');
}
$order_info['state_info'] = orderState($order_info);
Tpl::output('order_info', $order_info);
//卖家发货信息
$daddress_info = Model('daddress')->getAddressInfo(array('address_id' => $order_info['extend_order_common']['daddress_id']));
Tpl::output('daddress_info', $daddress_info);
//取得配送公司代码
$express = rkcache('express', true);
Tpl::output('e_code', $express[$order_info['extend_order_common']['shipping_express_id']]['e_code']);
Tpl::output('e_name', $express[$order_info['extend_order_common']['shipping_express_id']]['e_name']);
Tpl::output('e_url', $express[$order_info['extend_order_common']['shipping_express_id']]['e_url']);
Tpl::output('shipping_code', $order_info['shipping_code']);
self::profile_menu('search', 'search');
Tpl::showpage('store_deliver.detail');
}
示例6: get_order_info
private function get_order_info($order_id)
{
if (empty($order_id)) {
showMessage(Language::get('para_error'), '', 'html', 'error');
}
$model_order = Model('order');
$order_info = $model_order->getOrderInfo(array('order_id' => $order_id), array('order_goods'));
if ($order_info['buyer_id'] != $_SESSION['member_id']) {
showMessage(Language::get('para_error'), '', 'html', 'error');
}
$order_info['order_state_text'] = orderState($order_info);
return $order_info;
}
示例7: count
echo count($order_info['extend_order_goods']);
?>
</strong>种商品</span>
<?php
}
?>
</dt>
<dd><span class="order-date">下单时间:<?php
echo date('Y-m-d H:i:s', $order_info['add_time']);
?>
</span><span class="ncm-order-price">订单金额:<em>¥<?php
echo $order_info['order_amount'];
?>
</em></span></dd>
<dd><span class="order-state">订单状态:<?php
echo strip_tags(orderState($order_info));
?>
<?php
if ($order_info['if_deliver']) {
?>
<a href='index.php?act=member_order&op=search_deliver&order_id=<?php
echo $order_info['order_id'];
?>
&order_sn=<?php
echo $order_info['order_sn'];
?>
' target="_blank"><i class="icon-truck"></i>查看物流</a>
<?php
}
?>
</span> </dd>
示例8: orderState
:</strong><?php
echo $output['order_info']['order_sn'];
?>
( 支付单号 <?php
echo $lang['nc_colon'];
?>
<?php
echo $output['order_info']['pay_sn'];
?>
)
</li>
<li><strong><?php
echo $lang['order_state'];
?>
:</strong><?php
echo orderState($output['order_info']);
?>
</li>
<li><strong><?php
echo $lang['order_total_price'];
?>
:</strong><span class="red_common"><?php
echo $lang['currency'] . $output['order_info']['order_amount'];
?>
</span>
<?php
if ($output['order_info']['refund_amount'] > 0) {
?>
(<?php
echo $lang['order_refund'];
?>
示例9: get_order_info
private function get_order_info($order_id)
{
$model_order = Model('order');
$order_info = $model_order->getOrderInfo(array('order_id' => $order_id), array('order_goods'));
if (empty($order_info)) {
showMessage(Language::get('param_error'));
}
$order_info['order_state_text'] = orderState($order_info);
return $order_info;
}
示例10: getOrderList
/**
* 取得订单列表
* @param unknown $condition
* @param string $pagesize
* @param string $field
* @param string $order
* @param string $limit
* @param unknown $extend 追加返回那些表的信息,如array('order_common','order_goods','store')
* @return Ambigous <multitype:boolean Ambigous <string, mixed> , unknown>
*/
public function getOrderList($condition, $pagesize = '', $field = '*', $order = 'order_id desc', $limit = '', $extend = array())
{
$list = $this->table('sell_order')->field($field)->where($condition)->order($order)->select();
if (empty($list)) {
return array();
}
$order_list = array();
foreach ($list as $order) {
$order['state_desc'] = orderState($order);
//$order['payment_name'] = orderPaymentName($order['payment_code']);
if (!empty($extend)) {
$order_list[$order['order_id']] = $order;
}
}
if (empty($order_list)) {
$order_list = $list;
}
$orderArr = $order_list[$order['order_id']];
$order_id = $orderArr['order_id'];
//print_r($order_list);die;
// if (empty($order_list)) $order_list = $list;
//$order_list[$order_id]['buyer_id'] = $_SESSION['member_id'];
//echo $order_list[0]['member_id'].'====<br />';
//print_r($order_list);die;
//追加返回订单扩展表信息
if (in_array('sell_order_common', $extend)) {
$order_common_list = $this->getOrderCommonList(array('order_id' => array('in', array_keys($order_list))));
foreach ($order_common_list as $value) {
$order_list[$value['order_id']]['extend_order_common'] = $value;
$order_list[$value['order_id']]['extend_order_common']['reciver_info'] = @unserialize($value['reciver_info']);
// $order_list[$value['order_id']]['extend_order_common']['invoice_info'] = @unserialize($value['invoice_info']);
}
}
/*
//追加返回店铺信息
if (in_array('store',$extend)) {
$store_id_array = array();
foreach ($order_list as $value) {
if (!in_array($value['store_id'],$store_id_array)) $store_id_array[] = $value['store_id'];
}
$store_list = Model('store')->getStoreList(array('store_id'=>array('in',$store_id_array)));
$store_new_list = array();
foreach ($store_list as $store) {
$store_new_list[$store['store_id']] = $store;
}
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_store'] = $store_new_list[$order['store_id']];
}
}
//追加返回买家信息
if (in_array('member',$extend)) {
$member_id_array = array();
foreach ($order_list as $value) {
if (!in_array($value['buyer_id'],$member_id_array)) $member_id_array[] = $value['buyer_id'];
}
$member_list = Model()->table('member')->where(array('member_id'=>array('in',$member_id_array)))->limit($pagesize)->key('member_id')->select();
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_member'] = $member_list[$order['buyer_id']];
}
}*/
//追加返回该商品官方库存总数信息
if (in_array('goods', $extend)) {
foreach ($order_list as $k => $v) {
$field = 'goods_storage';
//$where = array('goods_id'=>array('in',self::array_column($order_list,'goods_id')));
$where = 'goods_id = ' . $v['goods_id'];
$goods_storage_array = Model('goods')->getGoodsList($where, $field);
$order_list[$v['order_id']]['extend_order_common']['goods_storage'] = $goods_storage_array[0]['goods_storage'];
}
//print_r($order_list[$value['order_id']]); die;
foreach ($goods_storage_array as $value) {
$order_list[$order_id]['extend_order_common']['goods_storage'] = $value['goods_storage'];
// print_r($order_list); die;
}
}
//追加返回分销商库存商品信息
if (in_array('order_goods', $extend)) {
//取商品
$table_order = $GLOBALS['config']['tablepre'] . 'order';
$table_order_goods = $GLOBALS['config']['tablepre'] . 'order_goods';
foreach ($order_list as $v) {
$field = " SUM({$table_order_goods}.goods_num) as goodsnum ";
$wheregoods = " where {$table_order}.order_state='20' and {$table_order}.order_id={$table_order_goods}.order_id and {$table_order_goods}.buyer_id=" . $_SESSION['member_id'] . " and {$table_order_goods}.goods_id={$v['goods_id']}";
$sql = 'SELECT ' . $field . ' FROM ' . $table_order . ',' . $table_order_goods . $wheregoods;
$goods_buyer_storage_array = Model()->query($sql);
$order_list[$v['order_id']]['extend_order_common']['goods_buyer_storage'] = $goods_buyer_storage_array[0]['goodsnum'];
}
//$getGoods_idArr=self::array_column($order_list,'goods_id');
//$where = array('order_goods.goods_id'=>array('in',self::array_column($order_list,'goods_id')),'order_goods.order_state'=>'20');
//.........这里部分代码省略.........
示例11: date
?>
</td>
<td class="nowrap align-center"><?php
echo date('Y-m-d H:i:s', $order['add_time']);
?>
</td>
<td class="align-center"><?php
echo $order['order_amount'];
?>
</td>
<td class="align-center"><?php
echo orderPaymentName($order['payment_code']);
?>
</td>
<td class="align-center"><?php
echo orderState($order);
?>
</td>
<td class="w144 align-center"><a href="index.php?act=order&op=show_order&order_id=<?php
echo $order['order_id'];
?>
"><?php
echo $lang['nc_view'];
?>
</a>
<!-- 取消订单 -->
<?php
if ($order['if_cancel']) {
?>
| <a href="javascript:void(0)" onclick="if(confirm('<?php
示例12: getOrderList
/**
* 取得订单列表
* @param unknown $condition
* @param string $pagesize
* @param string $field
* @param string $order
* @param string $limit
* @param unknown $extend 追加返回那些表的信息,如array('order_common','order_goods','store')
* @return Ambigous <multitype:boolean Ambigous <string, mixed> , unknown>
*/
public function getOrderList($condition, $pagesize = '', $field = '*', $order = 'order_id desc', $limit = '', $extend = array())
{
$list = $this->table('order')->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
if (empty($list)) {
return array();
}
$order_list = array();
foreach ($list as $order) {
$order['state_desc'] = orderState($order);
$order['payment_name'] = orderPaymentName($order['payment_code']);
if (!empty($extend)) {
$order_list[$order['order_id']] = $order;
}
}
if (empty($order_list)) {
$order_list = $list;
}
//追加返回订单扩展表信息
if (in_array('order_common', $extend)) {
$order_common_list = $this->getOrderCommonList(array('order_id' => array('in', array_keys($order_list))));
foreach ($order_common_list as $value) {
$order_list[$value['order_id']]['extend_order_common'] = $value;
$order_list[$value['order_id']]['extend_order_common']['reciver_info'] = @unserialize($value['reciver_info']);
$order_list[$value['order_id']]['extend_order_common']['invoice_info'] = @unserialize($value['invoice_info']);
}
}
//追加返回店铺信息
if (in_array('store', $extend)) {
$store_id_array = array();
foreach ($order_list as $value) {
if (!in_array($value['store_id'], $store_id_array)) {
$store_id_array[] = $value['store_id'];
}
}
$store_list = Model('store')->getStoreList(array('store_id' => array('in', $store_id_array)));
$store_new_list = array();
foreach ($store_list as $store) {
$store_new_list[$store['store_id']] = $store;
}
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_store'] = $store_new_list[$order['store_id']];
}
}
//追加返回买家信息
if (in_array('member', $extend)) {
$member_id_array = array();
foreach ($order_list as $value) {
if (!in_array($value['buyer_id'], $member_id_array)) {
$member_id_array[] = $value['buyer_id'];
}
}
$member_list = Model()->table('member')->where(array('member_id' => array('in', $member_id_array)))->limit($pagesize)->key('member_id')->select();
foreach ($order_list as $order_id => $order) {
$order_list[$order_id]['extend_member'] = $member_list[$order['buyer_id']];
}
}
//追加返回商品信息
if (in_array('order_goods', $extend)) {
//取商品列表
$order_goods_list = $this->getOrderGoodsList(array('order_id' => array('in', array_keys($order_list))));
foreach ($order_goods_list as $value) {
$value['goods_image_url'] = cthumb($value['goods_image'], 240, $value['store_id']);
$order_list[$value['order_id']]['extend_order_goods'][] = $value;
}
}
//追加返回商品goods_serial
if (in_array('goods', $extend)) {
$goods_id_list = $this->getGoodsList(array('goods_id' => array('in', array_keys($order_lis['extend_order_goods']))));
$field = 'goods_serial';
$where = array('goods_id' => array('in', self::array_column($order_list, 'goods_id')));
$goods_storage_array = Model('goods')->getGoodsList($where, $field);
foreach ($goods_storage_array as $value) {
$order_list[$order_id]['extend_order_common']['goods_serial'] = $value['goods_serial'];
}
}
return $order_list;
}
示例13: getself_OrderInfo
/**
* 取单条订单信息
*
* @param unknown_type $condition
* @param array $extend 追加返回那些表的信息,如array('order_common','order_goods','store')
* @return unknown
*/
public function getself_OrderInfo($condition = array(), $extend = array(), $fields = '*', $order = '', $group = '')
{
$model_order = Model('sell_order');
$order_info = $model_order->table('sell_order')->field($fields)->where($condition)->group($group)->order($order)->find();
if (empty($order_info)) {
return array();
}
//print_r($order_info);die;
$order_info['state_desc'] = orderState($order_info);
// $order_info['payment_name'] = orderPaymentName($order_info['payment_code']);
/*
//追加返回订单扩展表信息
if (in_array('order_common',$extend)) {
$order_info['extend_order_common'] = $this->getOrderCommonInfo(array('order_id'=>$order_info['order_id']));
$order_info['extend_order_common']['reciver_info'] = unserialize($order_info['extend_order_common']['reciver_info']);
$order_info['extend_order_common']['invoice_info'] = unserialize($order_info['extend_order_common']['invoice_info']);
}
//追加返回店铺信息
if (in_array('store',$extend)) {
$order_info['extend_store'] = Model('store')->getStoreInfo(array('store_id'=>$order_info['store_id']));
}
//返回买家信息
if (in_array('member',$extend)) {
$order_info['extend_member'] = Model('member')->getMemberInfo(array('member_id'=>$order_info['buyer_id']));
}
*/
//追加返回商品信息
if (in_array('goods', $extend)) {
//取商品列表
$order_goods_list = $this->getOrderGoodsList(array('goods_id' => $order_info['goods_id']));
foreach ($order_goods_list as $value) {
$order_info['extend_order_goods'][] = $value;
}
}
return $order_info;
}