|
@@ -68,7 +68,7 @@ class Buy
|
|
|
array('value' => 4, 'name' => '待收货确认'),
|
|
|
array('value' => 5, 'name' => '已完成'),
|
|
|
array('value' => 6, 'name' => '已完成(有退款)'),
|
|
|
- array('value' => 7, 'name' => '已取消'),
|
|
|
+ array('value' => '7,8,9', 'name' => '已取消'),
|
|
|
);
|
|
|
|
|
|
return $result;
|
|
@@ -150,7 +150,6 @@ class Buy
|
|
|
}
|
|
|
|
|
|
$order_data['shop_id'] = $shop['id'];
|
|
|
- $order_data['uid'] = -1;
|
|
|
$order_data['mobile'] = $shop['mobile'];
|
|
|
$order_data['name'] = $name;
|
|
|
$order_data['num'] = $num;
|
|
@@ -200,7 +199,7 @@ class Buy
|
|
|
|
|
|
$param = array
|
|
|
(
|
|
|
- 'project_id' => 1,
|
|
|
+ 'project_id' => 2,
|
|
|
'channel_id' => 1,
|
|
|
'system_source' => 5,
|
|
|
'uid' => -1,
|
|
@@ -237,7 +236,7 @@ class Buy
|
|
|
|
|
|
$param = array
|
|
|
(
|
|
|
- 'project_id' => 1,
|
|
|
+ 'project_id' => 2,
|
|
|
'channel_id' => 1,
|
|
|
'system_source' => 5,
|
|
|
'uid' => -1,
|
|
@@ -288,7 +287,7 @@ class Buy
|
|
|
$msg = $send['pay_msg'];
|
|
|
|
|
|
$order = Dever::db('shop/buy_order')->one(array('id' => $product_id, 'time' => time()));
|
|
|
- if ($order && $order['pay_status'] == 1) {
|
|
|
+ if ($order && $order['status'] == 1) {
|
|
|
|
|
|
if ($status == 2) {
|
|
|
|
|
@@ -331,7 +330,7 @@ class Buy
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function tui($id, $order_id, $status = 6, $desc = '')
|
|
|
+ public function tui($id, $order_id, $status = 8, $desc = '')
|
|
|
{
|
|
|
if ($status != 8 && $status != 9) {
|
|
|
Dever::alert('当前订单状态不允许退货退款');
|
|
@@ -518,6 +517,7 @@ class Buy
|
|
|
$info = Dever::db('shop/buy_order')->find($order_id);
|
|
|
|
|
|
$goods = Dever::db('shop/buy_order_goods')->select(array('order_id' => $order_id));
|
|
|
+ print_r($goods);die;
|
|
|
|
|
|
$shop = Dever::db('shop/info')->find($info['shop_id']);
|
|
|
|
|
@@ -537,7 +537,6 @@ class Buy
|
|
|
|
|
|
array_multisort($distance, SORT_ASC, SORT_NUMERIC, $store);
|
|
|
|
|
|
-
|
|
|
$shop_factory = Dever::db('shop/factory')->select(array('shop_id' => $shop['id']));
|
|
|
$factory = array();
|
|
|
$distance = array();
|
|
@@ -553,9 +552,6 @@ class Buy
|
|
|
|
|
|
array_multisort($distance, SORT_ASC, SORT_NUMERIC, $factory);
|
|
|
|
|
|
- print_r($store);
|
|
|
- print_r($factory);die;
|
|
|
-
|
|
|
if ($store) {
|
|
|
$num = 0;
|
|
|
foreach ($goods as $k => $v) {
|