Commit 86914074 by 朱继来

Merge branch 'zjl_iteration_20181127'

parents bbd9d3e2 508e5e76
...@@ -850,7 +850,7 @@ Class OrderController extends Controller ...@@ -850,7 +850,7 @@ Class OrderController extends Controller
$info = $this->orderDetail($request, $id); $info = $this->orderDetail($request, $id);
//总共允许2次调价(以点击审核按钮次数来统计) //总共允许2次调价(以点击审核按钮次数来统计)
if ($info['order_info']['adjust_count'] >= 2) { if ($info['order_info']['order_goods_type'] != 1 && $info['order_info']['adjust_count'] >= 2) {
errorLog(Error::E_FORBIDDEN, '该订单无法再进行调价操作'); errorLog(Error::E_FORBIDDEN, '该订单无法再进行调价操作');
return redirect('/prompt')->with(['message'=>"该订单无法再进行调价操作",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]); return redirect('/prompt')->with(['message'=>"该订单无法再进行调价操作",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]);
} }
...@@ -1401,13 +1401,13 @@ Class OrderController extends Controller ...@@ -1401,13 +1401,13 @@ Class OrderController extends Controller
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$order_id = $request->input('order_id', ''); $order_id = $request->input('order_id', '');
$serial_number = $request->input('serial_number', ''); // $serial_number = $request->input('serial_number', '');
$operator_id = $request->user->userId; $operator_id = $request->user->userId;
$url = Config('website.api_domain').'order/selfcheckpay'; $url = Config('website.api_domain').'order/selfcheckpay';
$data['order_id'] = $order_id; $data['order_id'] = $order_id;
$data['serial_number'] = $serial_number; // $data['serial_number'] = $serial_number;
$data['operator_id'] = $operator_id; $data['operator_id'] = $operator_id;
$data['k1'] = time(); $data['k1'] = time();
...@@ -1424,6 +1424,11 @@ Class OrderController extends Controller ...@@ -1424,6 +1424,11 @@ Class OrderController extends Controller
} }
$info = $this->orderDetail($request, $id); $info = $this->orderDetail($request, $id);
if (!$request->input('tags') && $request->input('tags') != 'self') { // 自营订单页面
return redirect('/self_order');
}
$this->pageHeader($request, $info, '自营对账', ["title" => '自营对账', "href" => '#']); $this->pageHeader($request, $info, '自营对账', ["title" => '自营对账', "href" => '#']);
$this->selfOtherData($info, $id); $this->selfOtherData($info, $id);
......
...@@ -632,16 +632,16 @@ ...@@ -632,16 +632,16 @@
// 点击物流展开 // 点击物流展开
$('.click-down').click(function() { $('.click-down').click(function() {
$('.other-infos').show(); $(this).parents('tbody').find('.other-infos').show();
$(this).hide(); $(this).hide();
$('.click-up').show(); $(this).parents('tbody').find('.click-up').show();
}) })
// 点击物流收起 // 点击物流收起
$('.click-up').click(function() { $('.click-up').click(function() {
$('.other-infos').hide(); $(this).parents('tbody').find('.other-infos').hide();
$(this).hide(); $(this).hide();
$('.click-down').show(); $(this).parents('tbody').find('.click-down').show();
}) })
}, },
...@@ -1272,11 +1272,12 @@ ...@@ -1272,11 +1272,12 @@
var payTimeOther = $('.payTimeOther').val(); var payTimeOther = $('.payTimeOther').val();
var sale_id = $('input[name=sale_id]').val(); var sale_id = $('input[name=sale_id]').val();
var order_goods_type = $('input[name=order_goods_type]').val(); var order_goods_type = $('input[name=order_goods_type]').val();
var order_id = $('input[name=order_id]').val();
// 联营订单需要先指派业务员 // 联营订单需要先指派业务员
if (order_goods_type == 1 && sale_id == 0) { if (order_goods_type == 1 && sale_id == 0) {
layer.alert('请先将订单推送给业务员', function(){ layer.alert('请先将订单推送给业务员', function(){
location.href = '/sendSales/'+$('input[name=order_id]').val(); location.href = '/sendSales/'+order_id;
}); });
return false; return false;
} }
...@@ -1366,7 +1367,7 @@ ...@@ -1366,7 +1367,7 @@
} }
} }
if (!is_manager) { if (!is_manager && order_goods_type != 1) { // 非管理员或经理权限和非联营订单需要判断商品价格是否低于80%以下
// 设置默认值false // 设置默认值false
$('input[name=check_failed]').val(0); $('input[name=check_failed]').val(0);
$('input[name=change_pay_type]').val(0); $('input[name=change_pay_type]').val(0);
...@@ -1401,8 +1402,10 @@ ...@@ -1401,8 +1402,10 @@
if (order_goods_type == 1) { if (order_goods_type == 1) {
var extra_fee = $('input[name=extra_fee]').val() ? currencySign+'0' : currencySign+$('input[name=extra_fee]').val(); var extra_fee = $('input[name=extra_fee]').val() ? currencySign+'0' : currencySign+$('input[name=extra_fee]').val();
var content = '<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'+goods_amount+'</p><p>附加费金额:'+extra_fee+'</p><p>订单总金额:<span class="error">'+order_amount+'</span></p></div></div>'; var content = '<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'+goods_amount+'</p><p>附加费金额:'+extra_fee+'</p><p>订单总金额:<span class="error">'+order_amount+'</span></p></div></div>';
var url = '/details/'+order_id;
} else { } else {
var content = '<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'+goods_amount+'</p><p>订单总金额:<span class="error">'+order_amount+'</span></p></div></div>'; var content = '<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'+goods_amount+'</p><p>订单总金额:<span class="error">'+order_amount+'</span></p></div></div>';
var url = '/details/'+order_id+'?tags=self';
} }
// 弹出提示 // 弹出提示
...@@ -1423,7 +1426,8 @@ ...@@ -1423,7 +1426,8 @@
if(resp.errcode === 0){ if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功'); layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){ setTimeout(function(){
location.reload(); // location.reload();
location.href = url;
}, 1000); }, 1000);
} else { } else {
layer.alert(resp.errmsg || '网络异常', function(){ layer.alert(resp.errmsg || '网络异常', function(){
...@@ -1443,13 +1447,11 @@ ...@@ -1443,13 +1447,11 @@
// 弹出已调价的订单信息 // 弹出已调价的订单信息
$('.checkAdjusted').click(function(){ $('.checkAdjusted').click(function(){
var adjusted_info = $('.adjusted_order').html(); var adjusted_info = $('.adjusted_order').html();
var layer_btn; var order_id = $('input[name=order_id]').val();
var order_goods_type = $('input[name=order_goods_type]').val();
if (is_manager) { var layer_btn = is_manager ? ['通过', '驳回'] : [];
layer_btn = ['驳回', '通过']; var url = order_goods_type == 1 ? '/details/'+order_id : '/details/'+order_id+'?tags=self';
} else {
layer_btn = [];
}
// 弹出提示 // 弹出提示
layer.open({ layer.open({
...@@ -1459,15 +1461,15 @@ ...@@ -1459,15 +1461,15 @@
btn: layer_btn, btn: layer_btn,
yes: function(index, layero){ yes: function(index, layero){
$.ajax({ $.ajax({
url : '/ajaxRejected', url : '/ajaxSaveChange',
type: 'post', type: 'post',
data: $('#adjustedOrderForm').serialize()+'&order_status=1', data: $('#adjustedOrderForm').serialize()+'&order_status=2',
dataType: 'json', dataType: 'json',
success: function (resp) { success: function (resp) {
if(resp.errcode === 0){ if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功'); layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){ setTimeout(function(){
location.reload(); location.href = url;
}, 1000); }, 1000);
} else { } else {
layer.alert(resp.errmsg || '网络异常'); layer.alert(resp.errmsg || '网络异常');
...@@ -1481,15 +1483,16 @@ ...@@ -1481,15 +1483,16 @@
}, },
btn2: function(index, layero){ btn2: function(index, layero){
$.ajax({ $.ajax({
url : '/ajaxSaveChange', url : '/ajaxRejected',
type: 'post', type: 'post',
data: $('#adjustedOrderForm').serialize()+'&order_status=2', data: $('#adjustedOrderForm').serialize()+'&order_status=1',
dataType: 'json', dataType: 'json',
success: function (resp) { success: function (resp) {
if(resp.errcode === 0){ if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功'); layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){ setTimeout(function(){
location.reload(); // location.reload();
location.href = url;
}, 1000); }, 1000);
} else { } else {
layer.alert(resp.errmsg || '网络异常'); layer.alert(resp.errmsg || '网络异常');
...@@ -1686,12 +1689,12 @@ ...@@ -1686,12 +1689,12 @@
// 自营对账 // 自营对账
$('.self-sure-pay').click(function(){ $('.self-sure-pay').click(function(){
var order_id = $('#order_id').val(); var order_id = $('#order_id').val();
var serial_number = $('input[name="serial_number"]').val(); // var serial_number = $('input[name="serial_number"]').val();
if (serial_number.length == 0) { // if (serial_number.length == 0) {
layer.alert('请输入流水号'); // layer.alert('请输入流水号');
return false; // return false;
} // }
layer.open({ layer.open({
title: '收款确认', title: '收款确认',
...@@ -1700,7 +1703,8 @@ ...@@ -1700,7 +1703,8 @@
btn1:function(){ btn1:function(){
$.ajax({ $.ajax({
url:'/self_check_pay/'+order_id, url:'/self_check_pay/'+order_id,
data: {order_id : order_id, serial_number : serial_number}, // data: {order_id : order_id, serial_number : serial_number},
data: {order_id : order_id},
type:'post', type:'post',
dataType: 'json', dataType: 'json',
success:function(resp){ success:function(resp){
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
order_source_ptag = $('input[name="order_source_ptag"]').val(), order_source_ptag = $('input[name="order_source_ptag"]').val(),
test_order = $('input[name=test_order]'), test_order = $('input[name=test_order]'),
is_new = $('#is_new').data('default'), is_new = $('#is_new').data('default'),
is_new_order = $('#is_new_order').data('default'), // is_new_order = $('#is_new_order').data('default'),
listUrl = '/self_order'; listUrl = '/self_order';
listUrl += '?order_type=' + order_type; listUrl += '?order_type=' + order_type;
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
listUrl += '&is_new=' + is_new; listUrl += '&is_new=' + is_new;
} }
if (is_new_order !== '') { // if (is_new_order !== '') {
listUrl += '&is_new_order=' + is_new_order; // listUrl += '&is_new_order=' + is_new_order;
} // }
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1; listUrl += '&test_order=' + 1;
...@@ -108,16 +108,16 @@ ...@@ -108,16 +108,16 @@
order_source_adtag = $('input[name="order_source_adtag"]').val(), order_source_adtag = $('input[name="order_source_adtag"]').val(),
order_source_ptag = $('input[name="order_source_ptag"]').val(), order_source_ptag = $('input[name="order_source_ptag"]').val(),
is_new = $('#is_new').data('default'), is_new = $('#is_new').data('default'),
is_new_order = $('#is_new_order').data('default'), // is_new_order = $('#is_new_order').data('default'),
test_order = $('input[name=test_order]'); test_order = $('input[name=test_order]');
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !is_new_order && !test_order.is(':checked')) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !is_new_order) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
test_order = ''; test_order = '';
} }
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&sale_type='+sale_type+'&order_invoice_status='+order_invoice_status+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&is_new='+is_new+'&is_new_order='+is_new_order+'&order_goods_type='+2; location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&sale_type='+sale_type+'&order_invoice_status='+order_invoice_status+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&is_new='+is_new+'&order_goods_type='+2;
}) })
// 选择查看测试订单 // 选择查看测试订单
......
<p style="padding-left: 5px;">人工审单</p> <p style="padding-left: 5px;">人工审单</p>
<div class="tabs-box"> <div class="tabs-box">
<div class="order-change-main"> <div class="order-change-main">
@if ($order_info['status'] == 1) @if (($order_info['order_goods_type'] == 1 && $order_info['status'] == 1) || ($order_info['order_goods_type'] != 1 &&in_array($order_info['status'], [1, 2]) && $order_info['adjust_count'] < 2))
<form id="checkOrderForm" class="form-horizontal table-responsive"> <form id="checkOrderForm" class="form-horizontal table-responsive">
<input type="hidden" name="order_sn" value="{{$order_info['order_sn']}}"> <input type="hidden" name="order_sn" value="{{$order_info['order_sn']}}">
<input type="hidden" name="user_id" value="{{$order_info['user_id']}}"> <input type="hidden" name="user_id" value="{{$order_info['user_id']}}">
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
</table> </table>
</div> </div>
@if ($order_info['status'] == 1 && $order_temp_info['status'] == 1) @if ($order_info['order_goods_type'] != 1 && in_array($order_info['status'], [1, 2]) && $order_temp_info['status'] == 1)
<a class="btn btn-primary checkAdjusted">查看调价信息</a> <a class="btn btn-primary checkAdjusted">查看调价信息</a>
@else @else
<a class="btn btn-primary checkOrder">提交</a> <a class="btn btn-primary checkOrder">提交</a>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
</form> </form>
@endif @endif
@if ($order_info['status'] == 2) @if (($order_info['order_goods_type'] == 1 && $order_info['status'] == 2) || ($order_info['order_goods_type'] != 1 && $order_info['adjust_count'] == 2))
<div class="checked_section"> <div class="checked_section">
<div class="checked_left"> <div class="checked_left">
<p>交易状态:&nbsp;审核通过,请联系客户及时付款! <p>交易状态:&nbsp;审核通过,请联系客户及时付款!
...@@ -296,8 +296,10 @@ ...@@ -296,8 +296,10 @@
} }
?> ?>
@if ($order_info['adjust_count'] < 2) @if ($order_info['order_goods_type'] == 2 && $order_info['adjust_count'] < 2)
<a class="btn btn-default" href="{{$adjustPriceUrl}}">再次调价</a><span class="warn-tip">每笔订单仅有一次“再次调价”机会</span> <a class="btn btn-default" href="{{$adjustPriceUrl}}">再次调价</a><span class="warn-tip">每笔订单仅有一次“再次调价”机会</span>
@elseif ($order_info['order_goods_type'] == 1)
<a class="btn btn-default" href="{{$adjustPriceUrl}}">再次调价</a>
@endif @endif
</div> </div>
...@@ -346,7 +348,8 @@ ...@@ -346,7 +348,8 @@
</div> </div>
</div> </div>
@if ($order_info['status'] == 1 && $order_temp_info['status'] == 1) <!-- 自营订单客服调价低于80% 显示经理审核 -->
@if ($order_info['order_goods_type'] != 1 && in_array($order_info['status'], [1, 2]) && $order_temp_info['status'] == 1)
<script> <script>
$('#checkOrderForm').find('input').attr('disabled', true); $('#checkOrderForm').find('input').attr('disabled', true);
$('#checkOrderForm').find('select').attr('disabled', true); $('#checkOrderForm').find('select').attr('disabled', true);
......
...@@ -576,12 +576,12 @@ ...@@ -576,12 +576,12 @@
<p style="padding-left: 5px;">操作</p> <p style="padding-left: 5px;">操作</p>
<div class="tabs-box"> <div class="tabs-box">
<!-- 判断操作权限 --> <!-- 判断操作权限 -->
@if ($order_info['status'] == 1 && in_array('check_order', $userPerms)) @if (in_array($order_info['status'], [1, 2]) && in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}">人工审单</a> <a class="btn btn-info" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}">人工审单</a>
@endif @endif
@if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms)) @if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms))
<a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">取消订单</a> <a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-danger">取消订单</a>
@endif @endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 --> <!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
...@@ -611,13 +611,13 @@ ...@@ -611,13 +611,13 @@
<a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a> <a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a>
@endif @endif
<!-- 预售订单审单 --> <!-- 订单审单 -->
@if ($order_info['status'] == 1 && $order_info['sale_type'] == 2 && in_array('self_check_order', $userPerms)) @if (in_array($order_info['status'], [1, 2]) && in_array('self_check_order', $userPerms))
<a class="btn btn-success" href="/change/{{$order_info['order_id']}}?tags=self">人工审单</a> <a class="btn btn-info" href="/change/{{$order_info['order_id']}}?tags=self">人工审单</a>
@endif @endif
@if (in_array($order_info['status'], [1, 2, 3, 4]) && !$extend && in_array('self_order_cancel', $userPerms)) @if (in_array($order_info['status'], [1, 2, 3, 4]) && !$extend && in_array('self_order_cancel', $userPerms))
<a class="btn btn-default self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a> <a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a>
@endif @endif
@if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms)) @if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms))
......
<p style="margin-left: 5px;">对账操作</p> <p style="margin-left: 5px;">对账操作</p>
<div class="tabs-box"> <div class="tabs-box">
<!-- 判断订单类型 1.全款,2.预付款 --> <!-- 判断订单类型 1.全款,2.预付款 -->
<?php @if ($order_info['status'] == 4)
if ($order_info['status'] == 4) { <p>订单对账正常</p>
echo '<p>订单对账正常</p> <p class="error">订单总金额:{{ $order_info['order_amount'] }}</p>
<p class="error">订单总金额:'.$order_info['order_amount'].'</p> <!-- <p>流水号:{{ $order_pay_log[0]['serial_number'] }}</p> -->
<p>流水号:'.$order_pay_log[0]['serial_number'].'</p>'; @else
} else { <p class="error">订单总金额:{{ $order_info['order_amount'] }}</p>
$serial_number = isset($order_pay_log[0]['serial_number']) ? $order_pay_log[0]['serial_number'] : ''; <!-- <p> 流水号:
<input style="width: 200px;" type="text" name="serial_number" value="{{ isset($order_pay_log[0]['serial_number']) ? $order_pay_log[0]['serial_number'] : '' }}">
echo '<p class="error">订单总金额:'.$order_info['order_amount'].'</p>
<p> 流水号:
<input style="width: 200px;" type="text" name="serial_number" value="'.$serial_number.'">
<span style="color:orange;">请录入流水号,流水号为英文、数字</span> <span style="color:orange;">请录入流水号,流水号为英文、数字</span>
</p> </p> -->
<p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>'; <p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>
} @endif
?>
</div> </div>
<div class="hide" id="sure-pay"> <div class="hide" id="sure-pay">
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</div> </div>
</dd> </dd>
</dl> </dl>
<dl> <!-- <dl>
<dt>新订单:</dt> <dt>新订单:</dt>
<dd style="width: 115px;"> <dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['is_new_order']}}" id="is_new_order" name="is_new_order"> <div class="droplist" data-default="{{$condition['is_new_order']}}" id="is_new_order" name="is_new_order">
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</ul> </ul>
</div> </div>
</dd> </dd>
</dl> </dl> -->
@if (in_array('self_check_test_order', $userPerms)) @if (in_array('self_check_test_order', $userPerms))
<dl> <dl>
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a> <a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2, 3]) && $v['sale_type'] == 2) @if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2, 3]))
<a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a> <a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a>
@endif @endif
......
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