mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 02:49:03 +08:00
细节优化
This commit is contained in:
parent
2a9d3e681e
commit
d3390f39aa
@ -101,7 +101,7 @@ class OrderAftersaleService
|
||||
[
|
||||
'checked_type' => 'in',
|
||||
'key_name' => 'type',
|
||||
'checked_data' => [0,1],
|
||||
'checked_data' => array_column(MyConst('common_order_aftersale_type_list'), 'value'),
|
||||
'error_msg' => '操作类型有误',
|
||||
],
|
||||
[
|
||||
@ -120,6 +120,7 @@ class OrderAftersaleService
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'msg',
|
||||
'checked_data' => '200',
|
||||
'is_checked' => 1,
|
||||
'error_msg' => '退款说明最多 200 个字符',
|
||||
],
|
||||
[
|
||||
@ -219,8 +220,8 @@ class OrderAftersaleService
|
||||
'user_id' => $params['user']['id'],
|
||||
'number' => ($params['type'] == 0) ? 0 : $number,
|
||||
'price' => $price,
|
||||
'reason' => $params['reason'],
|
||||
'msg' => $params['msg'],
|
||||
'reason' => empty($params['reason']) ? '' : $params['reason'],
|
||||
'msg' => empty($params['msg']) ? '' : $params['msg'],
|
||||
'images' => json_encode($images),
|
||||
'status' => ($params['type'] == 0) ? 2 : 0,
|
||||
'add_time' => time(),
|
||||
@ -260,7 +261,7 @@ class OrderAftersaleService
|
||||
}
|
||||
|
||||
// 返回成功
|
||||
return DataReturn('申请成功', 0);
|
||||
return DataReturn('申请成功', 0, $data_id);
|
||||
}
|
||||
return DataReturn('申请失败', -100);
|
||||
}
|
||||
@ -925,7 +926,7 @@ class OrderAftersaleService
|
||||
// 是否仅退款操作需要退数量操作
|
||||
// 如果是仅退、订单状态为待发货或虚拟订单则退回数量
|
||||
$is_refund_only_number = false;
|
||||
if($aftersale['type'] == 0 && ($order['data']['status'] <= 2 || $order['data']['order_model'] == 3))
|
||||
if($aftersale['type'] == 0 && (!in_array($order['data']['status'], [3,4]) || $order['data']['order_model'] == 3))
|
||||
{
|
||||
$is_refund_only_number = true;
|
||||
$aftersale['number'] = $order['data']['items']['buy_number'];
|
||||
|
@ -699,7 +699,7 @@ class OrderService
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付异步处理
|
||||
* 支付异步
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -734,8 +734,24 @@ class OrderService
|
||||
return $pay_ret;
|
||||
}
|
||||
|
||||
// 支付结果处理
|
||||
return self::NotifyHandle($pay_ret['data'], $payment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付异步处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
* @param [array] $data [支付数据]
|
||||
* @param [array] $payment [支付方式]
|
||||
*/
|
||||
public static function NotifyHandle($data, $payment)
|
||||
{
|
||||
// 支付订单数据
|
||||
$pay_data = self::OrderPayLogValueList($pay_ret['data']['out_trade_no']);
|
||||
$pay_data = self::OrderPayLogValueList($data['out_trade_no']);
|
||||
if($pay_data['code'] == 0)
|
||||
{
|
||||
// 订单支付日志已支付则直接返回
|
||||
@ -750,9 +766,9 @@ class OrderService
|
||||
// 支付金额是否小于订单金额
|
||||
if(MyC('common_is_pay_price_must_max_equal', 0) == 1)
|
||||
{
|
||||
if($pay_ret['data']['pay_price'] < $pay_data['data']['pay_log_data']['total_price'])
|
||||
if($data['pay_price'] < $pay_data['data']['pay_log_data']['total_price'])
|
||||
{
|
||||
return DataReturn('支付金额小于日志订单金额['.$pay_ret['data']['pay_price'].'<'.$pay_data['data']['pay_log_data']['total_price'].']', -1);
|
||||
return DataReturn('支付金额小于日志订单金额['.$data['pay_price'].'<'.$pay_data['data']['pay_log_data']['total_price'].']', -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -762,10 +778,10 @@ class OrderService
|
||||
'payment' => $payment,
|
||||
'pay_log_data' => $pay_data['data']['pay_log_data'],
|
||||
'pay' => [
|
||||
'trade_no' => $pay_ret['data']['trade_no'],
|
||||
'subject' => $pay_ret['data']['subject'],
|
||||
'buyer_user' => $pay_ret['data']['buyer_user'],
|
||||
'pay_price' => $pay_ret['data']['pay_price'],
|
||||
'trade_no' => $data['trade_no'],
|
||||
'subject' => $data['subject'],
|
||||
'buyer_user' => $data['buyer_user'],
|
||||
'pay_price' => $data['pay_price'],
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -48,7 +48,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom:
|
||||
.chosen-container { width: 100% !important; }
|
||||
.am-tagsinput { display: block; padding: 3px 5px; border-radius: 2px; min-height: 30px; }
|
||||
.chosen-choices, .chosen-single { border-radius: 2px; }
|
||||
.chosen-choices li.search-field input[type="text"] { height: 30px !important; }
|
||||
.chosen-choices li.search-field input[type="text"] { height: 29px !important; }
|
||||
.chosen-choices li.search-field input[type="text"]:hover,
|
||||
.am-tagsinput input[type="text"]:hover { box-shadow: 0 0 0 #fff !important; border: 0 !important; }
|
||||
.chosen-choices li.search-field input[type="text"]:focus,
|
||||
@ -60,6 +60,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom:
|
||||
.chosen-container-single .chosen-default { color: #999 !important; }
|
||||
.chosen-disabled .chosen-choices, .chosen-disabled .chosen-single { background-color: #ccc; }
|
||||
.chosen-disabled .search-choice { background: #d6d6d6 !important; }
|
||||
.chosen-container-multi .chosen-choices li.search-choice {margin: 4px 4px 4px 0;}
|
||||
|
||||
/**
|
||||
* 公共提示信息
|
||||
@ -684,6 +685,17 @@ button.colorpicker-submit img {
|
||||
position: absolute;
|
||||
margin: 4px 0px 0px -15px;
|
||||
}
|
||||
.form-table-search td select[multiple],
|
||||
.form-table-search td select[size] {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
max-height: 31px;
|
||||
}
|
||||
.form-table-search td select[multiple],
|
||||
.form-table-search td select[size],
|
||||
.form-table-search td .chosen-container-multi .chosen-choices {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格-复选框/单选框
|
||||
|
Loading…
Reference in New Issue
Block a user