|
@@ -1091,6 +1091,7 @@ class Sell
|
|
|
public function updatePs($order, $status = 1, $service_id = -1, $order_num = '')
|
|
|
{
|
|
|
$where['order_id'] = $order['id'];
|
|
|
+ $where['clear'] = true;
|
|
|
$data = Dever::db('shop/sell_order_ps')->find($where);
|
|
|
|
|
|
$service = array();
|
|
@@ -1100,14 +1101,11 @@ class Sell
|
|
|
if ($order_num) {
|
|
|
$service['order_num'] = $order_num;
|
|
|
}
|
|
|
- if ($service) {
|
|
|
- $service = Dever::array_encode($service);
|
|
|
- }
|
|
|
-
|
|
|
if (!$data) {
|
|
|
$insert = $where;
|
|
|
if ($service) {
|
|
|
$insert['service'][] = $service;
|
|
|
+ $insert['service'] = Dever::array_encode($insert['service']);
|
|
|
}
|
|
|
$insert['status'] = $status;
|
|
|
if ($status == 2) {
|
|
@@ -1129,6 +1127,8 @@ class Sell
|
|
|
$data['service'] = Dever::array_decode($data['service']);
|
|
|
$update['service'] = $data['service'];
|
|
|
$update['service'][] = $service;
|
|
|
+
|
|
|
+ $insert['service'] = Dever::array_encode($update['service']);
|
|
|
}
|
|
|
Dever::db('shop/sell_order_ps')->update($update);
|
|
|
}
|
|
@@ -1523,7 +1523,7 @@ class Sell
|
|
|
$sku = '无';
|
|
|
}
|
|
|
|
|
|
- if ($info['shop_type'] == 2) {
|
|
|
+ if ($info['shop_type'] == 2 && $info['status'] > 1) {
|
|
|
$tui = Dever::url('buy_order_tui?shop_id='.$v['shop_id'].'&order_goods_id=' . $v['id'] . '&order_id=' . $info['id'] . '&cash=' . $v['price'], 'shop');
|
|
|
|
|
|
$status = '<a href="javascript:;" onclick="fastEdit($(this), \''.$tui.'\', \'退款\', \'\', 1)" class="layui-btn">退款</a>';
|