Commit 2666c9ec by 朱继来

fix conflicts

parent 7792f27d
...@@ -347,6 +347,7 @@ Class OrderController extends Controller ...@@ -347,6 +347,7 @@ Class OrderController extends Controller
$info['user_count'] = $response['data']['user_count']; $info['user_count'] = $response['data']['user_count'];
$info['paid_user_count'] = $response['data']['paid_user_count']; $info['paid_user_count'] = $response['data']['paid_user_count'];
$info['paid_order_count'] = $response['data']['paid_order_count']; $info['paid_order_count'] = $response['data']['paid_order_count'];
$info['noreason_count'] = $response['data']['noreason_count'];
$info['page'] = $show; $info['page'] = $show;
return $info; return $info;
...@@ -933,6 +934,8 @@ Class OrderController extends Controller ...@@ -933,6 +934,8 @@ Class OrderController extends Controller
"pf" => 1, "pf" => 1,
"k1" => $check['k1'], "k1" => $check['k1'],
"k2" => $check['k2'], "k2" => $check['k2'],
"is_newClient" => $request->input('is_newClient', ''),
"client_source" => $request->input('client_source') == 1 ? $request->input('input-other-source') : $request->input('client_source'),
]; ];
$temp = json_decode(curlApi($url, $resData, "POST"), true); $temp = json_decode(curlApi($url, $resData, "POST"), true);
...@@ -1069,6 +1072,30 @@ Class OrderController extends Controller ...@@ -1069,6 +1072,30 @@ Class OrderController extends Controller
return redirect('/change/'.$id); return redirect('/change/'.$id);
} }
// 填写订单取消原因
public function ajaxInputCancelReason(Request $request)
{
if ($request->isMethod('post')) {
$order_id = $request->input('order_id');
$cancel_reason = $request->input('cancel_reason');
$update = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->update(['cancel_reason' => $cancel_reason]);
if (!$update) return ['errcode' => -1, 'errmsg' => '填写订单取消原因失败'];
// 操作记录
$log['order_id'] = $order_id;
$log['operator_id'] = $request->user->userId;
$log['operator_type'] = 2;
$log['event'] = '填写订单取消原因:'.$cancel_reason;
$log['ip'] = get_client_ip();
$log['create_time'] = time();
DB::connection('order')->table('lie_order_action_log')->insert($log);
return ['errcode' => 0, 'errmsg' => '填写订单取消原因成功'];
}
}
// 申请再次调价 // 申请再次调价
public function applyAdjust(Request $request, $id) public function applyAdjust(Request $request, $id)
{ {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
.tabs-box .check-table td .multi-reason label { .tabs-box .check-table td .multi-reason label {
margin-right: 10px; margin-right: 10px;
} }
.tabs-box .check-table td .other-reason #input-reason { .tabs-box .check-table td .other-reason #input-reason, #input-other-source {
width: 99%; width: 99%;
height: 100px; height: 100px;
resize: none; resize: none;
......
...@@ -230,6 +230,72 @@ ...@@ -230,6 +230,72 @@
}) })
}) })
// 填写订单取消原因
$('.input-cancel-reason').click(function(){
var self = $(this);
var order_id = self.data('oid');
var content = '<div class="form-group">'+
'<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="平台信任度问题">平台信任度问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="商品质量不放心">商品质量不放心</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格问题">价格问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="货期问题">货期问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="配套服务问题">配套服务问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'+
'</div>'+
'<div class="input-other-reason">'+
'<textarea class="form-control" name="input-other-reason" placeholder="请填写其他原因"></textarea>'+
'</div>'+
'</div>';
layer.open({
area: ['650px', '220px'],
title: '填写订单取消原因',
content: content,
btn:['确认', '取消'],
btn1:function(){
var cancel_reason = $('input[name=cancel_reason]:checked').val();
var other_reason = $('textarea[name=input-other-reason]').val();
if (cancel_reason == null) {
layer.tips('请选择取消原因', $('.input-radio'));
return false;
} else if (cancel_reason == 1) {
if (other_reason == '') {
layer.tips('请填写其他原因', $('.input-other-reason'));
return false;
} else {
cancel_reason = other_reason;
}
}
$.ajax({
url:'/ajaxInputCancelReason',
data: {order_id : order_id, cancel_reason:cancel_reason},
type:'post',
dataType: 'json',
success:function(resp){
if(resp.errcode == 0){
self.remove();
layer.msg(resp.errmsg);
layer.close();
} else {
layer.alert(resp.errmsg);
}
},
error:function(){
layer.alert('网络异常');
}
});
},
btn2:function(index){
layer.close(index);
}
})
})
// 切换类型时,清空输入框内容 // 切换类型时,清空输入框内容
$('.dropdown-menu>li').click(function(){ $('.dropdown-menu>li').click(function(){
var val = $(this).data('val'); // 当前值 var val = $(this).data('val'); // 当前值
...@@ -991,6 +1057,15 @@ ...@@ -991,6 +1057,15 @@
// // } // // }
// }) // })
// 用户来源
$('input[name="is_newClient"]').parent().on('click', function(){
if($(this).find('input').val() == 1){
$('.client_source_row').show();
} else {
$('.client_source_row').hide();
}
});
// 订单审核---通过or不通过 // 订单审核---通过or不通过
$('input[name="order_status"]').parent().on('click', function(){ $('input[name="order_status"]').parent().on('click', function(){
if($(this).find('input').val() == 2){ if($(this).find('input').val() == 2){
...@@ -1051,12 +1126,33 @@ ...@@ -1051,12 +1126,33 @@
// 提交表单 // 提交表单
$('.checkOrder').click(function(){ $('.checkOrder').click(function(){
var is_newClient = $('input[name=is_newClient]:checked').val();
var client_source = $('input[name=client_source]:checked').val();
var order_status = $('input[name=order_status]:checked').val(); var order_status = $('input[name=order_status]:checked').val();
var pay_type = $('input[name=order_pay_type]:checked').val(); // 订单类型 var pay_type = $('input[name=order_pay_type]:checked').val(); // 订单类型
var reason = $('input[name=reason]:checked').val(); var reason = $('input[name=reason]:checked').val();
var payTime = $('.payTime').val(); var payTime = $('.payTime').val();
var payTimeOther = $('.payTimeOther').val(); var payTimeOther = $('.payTimeOther').val();
// 用户来源
if (is_newClient == null) {
layer.msg('请选择用户来源!');
return false;
}
if (is_newClient == 1) {
if (client_source == null) {
layer.msg('请选择用户来源渠道!');
return false;
} else if (client_source == 1) {
if ($('#input-other-source').val() == '') {
layer.msg('请填写其他来源!');
return false;
}
}
}
// 审核不通过
if (order_status == -1) { if (order_status == -1) {
if (reason == null) { if (reason == null) {
layer.msg('请选择不通过原因!'); layer.msg('请选择不通过原因!');
......
...@@ -13,10 +13,40 @@ ...@@ -13,10 +13,40 @@
<input type="hidden" name="check_failed" value=""> <input type="hidden" name="check_failed" value="">
<input type="hidden" name="check_failed_info" value=""> <input type="hidden" name="check_failed_info" value="">
<input type="hidden" name="change_pay_type" value=""> <input type="hidden" name="change_pay_type" value="">
<!-- 用户来源 -->
<p>用户来源</p>
<table class="table table-bordered table-hover check-table">
<tr>
<td class="check-table-title" width="20%">是否为新用户:</td>
<td class="check-select">
<label><input class="is_newClient" type="radio" name="is_newClient" value="1"></label>
<label><input class="is_newClient" type="radio" name="is_newClient" value="0"></label>
</td>
</tr>
<tr class="client_source_row" style="display: none;">
<td class="check-table-title">用户来源:</td>
<td>
<div class="multi-reason">
<label><input type="radio" name="client_source" value="QQ群">QQ群</label>
<label><input type="radio" name="client_source" value="微信群">微信群</label>
<label><input type="radio" name="client_source" value="微信公众号">微信公众号</label>
<label><input type="radio" name="client_source" value="朋友介绍">朋友介绍</label>
<label><input type="radio" name="client_source" value="线下广告">线下广告</label>
<label><input type="radio" name="client_source" value="地推">地推</label>
<label><input type="radio" name="client_source" value="1">其他</label>
</div>
<div class="client-input-other">
<textarea name="input-other-source" id="input-other-source" placeholder="请填写其他来源"></textarea>
</div>
</td>
</tr>
</table>
<!-- 审核 --> <!-- 审核 -->
<p>审核</p> <p>审核</p>
<table class="table table-bordered table-hover check-table" style="min-height:150px;"> <table class="table table-bordered table-hover check-table">
<tr> <tr>
<td class="check-table-title" width="20%">付款类型:</td> <td class="check-table-title" width="20%">付款类型:</td>
<td class="check-select"> <td class="check-select">
...@@ -39,13 +69,12 @@ ...@@ -39,13 +69,12 @@
<label><input type="radio" name="reason" value="无现货">无现货</label> <label><input type="radio" name="reason" value="无现货">无现货</label>
<label><input type="radio" name="reason" value="客户不接受附加费">客户不接受附加费</label> <label><input type="radio" name="reason" value="客户不接受附加费">客户不接受附加费</label>
<label><input type="radio" name="reason" value="客户下错单">客户下错单</label> <label><input type="radio" name="reason" value="客户下错单">客户下错单</label>
<label><input type="radio" name="reason" value="1">其他</label>
</div> </div>
<div class="other-reason"> <div class="other-reason">
<label><input type="radio" name="reason" value="1">其他</label>
<textarea name="reason" id="input-reason" placeholder="请填写其他原因"></textarea> <textarea name="reason" id="input-reason" placeholder="请填写其他原因"></textarea>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -289,11 +318,13 @@ ...@@ -289,11 +318,13 @@
<th>优惠金额:</th> <th>优惠金额:</th>
<td>{{$order_price_info['discount_amount']}}</td> <td>{{$order_price_info['discount_amount']}}</td>
</tr> </tr>
@if ($order_temp_info['order_pay_type'] == 2)
<tr> <tr>
<th>定金:</th> <th>定金:</th>
<td>{{$order_temp_info['deposit_amount']}}</td> <td>{{$order_temp_info['deposit_amount']}}</td>
</tr> </tr>
@endif
<tr> <tr>
<th>订单总额:</th> <th>订单总额:</th>
......
...@@ -425,7 +425,6 @@ ...@@ -425,7 +425,6 @@
</tfoot> </tfoot>
</table> </table>
</div> </div>
...@@ -476,6 +475,30 @@ ...@@ -476,6 +475,30 @@
</div> </div>
</div> </div>
@if ((!empty($order_temp_info) && $order_temp_info['status'] == 2) || $order_info['status'] == -1)
<div class="tabs-box">
<table class="table table-bordered table-hover">
@if (!empty($order_temp_info) && $order_temp_info['status'] == 2)
<tr>
<td width="10%">是否为新用户:</td>
<td width="40%">{{ $order_temp_info['is_newclient'] == 1 ? '是' : '否' }}</td>
@if ($order_temp_info['is_newclient'] == 1)
<td width="10%">用户来源:</td>
<td>{{ $order_temp_info['client_source'] }}</td>
@endif
</tr>
@endif
@if ($order_info['status'] == -1)
<tr>
<td width="10%">订单取消原因:</td>
<td colspan="3">{{ $order_info['cancel_reason'] }}</td>
</tr>
@endif
</table>
</div>
@endif
@if (!$isPage) @if (!$isPage)
@if ($action_name == 'sendSales') @if ($action_name == 'sendSales')
......
...@@ -290,7 +290,11 @@ ...@@ -290,7 +290,11 @@
?> ?>
@if (in_array('download_contract', $userPerms)) @if (in_array('download_contract', $userPerms))
<a class="btn btn-info download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a> <a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@endif
@if ($v['status'] == -1 && !$v['cancel_reason'])
<a class="btn btn-danger input-cancel-reason" href="javascript:;" data-oid="{{$v['order_id']}}">填写取消原因</a>
@endif @endif
</div> </div>
</td> </td>
...@@ -394,12 +398,16 @@ ...@@ -394,12 +398,16 @@
付款用户数为{{$paid_user_count}}人, 付款用户数为{{$paid_user_count}}人,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}}, 应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}}, 实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}} ${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}},
@if ($noreason_count)
<span class="error">共有{{$noreason_count}}单已取消订单未填写取消原因</span>
@endif
</span> </span>
@endif @endif
<?php echo $page; ?> <?php echo $page; ?>
</div> </div>
<div class="hide" id="sale-container"> <div class="hide" id="sale-container">
<div class="sales"> <div class="sales">
<table class="table"> <table class="table">
......
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