Commit af471ec5 by 朱继来

调整记录

parent 6936fc36
......@@ -159,6 +159,8 @@ class OrderServiceModel extends Model
}
if ($data['service_status'] == 3) { // 审核通过
$service_type = $request->input('service_type', 1);
$data['auditor_id'] = $request->user->userId;
$data['auditor_name'] = $request->user->name;
$data['auditor_time'] = time();
......@@ -171,12 +173,16 @@ class OrderServiceModel extends Model
$post['operator_id'] = $request->user->userId;
$url = Config('website.api_domain').'refund/apply';
dd(curlApi($url, $post, 'POST'));
$res = json_decode(curlApi($url, $post, 'POST'), true);
if (!$res || $res['err_code'] != 0) return [-2, '审核通过生成退款单失败,原因:'.$res['err_msg']];
if (!$res || $res['err_code'] != 0) return [-2, '审核通过失败,原因:'.$res['err_msg']];
$event .= ',生成退款单,退款单号:'.$res['data'];
if ( $service_type == 1) {
$event .= ',生成退款单,退款单号:'.$res['data'];
} else {
$event .= ',生成退货单,退货单号:'.$res['data'];
}
}
$this->where('id', $id)->update($data);
......
......@@ -73,7 +73,7 @@ layui.use(['form', 'table', 'laydate'], function(){
title = '审核申请';
content = '确定审核该申请吗?';
datax = {id: data.id, service_status: 3};
datax = {id: data.id, service_status: 3, service_type: data.service_type};
} else if (layEvent === 'cancel'){ // 取消
title = '取消申请';
content = '确定取消该申请吗?';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment