Commit 72a444e4 by 朱继来

Merge branch 'zjl_iteration_20181127' into development

parents d3411880 418c2db7
......@@ -850,7 +850,7 @@ Class OrderController extends Controller
$info = $this->orderDetail($request, $id);
//总共允许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, '该订单无法再进行调价操作');
return redirect('/prompt')->with(['message'=>"该订单无法再进行调价操作",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]);
}
......@@ -1401,13 +1401,13 @@ Class OrderController extends Controller
{
if ($request->isMethod('post')) {
$order_id = $request->input('order_id', '');
$serial_number = $request->input('serial_number', '');
// $serial_number = $request->input('serial_number', '');
$operator_id = $request->user->userId;
$url = Config('website.api_domain').'order/selfcheckpay';
$data['order_id'] = $order_id;
$data['serial_number'] = $serial_number;
// $data['serial_number'] = $serial_number;
$data['operator_id'] = $operator_id;
$data['k1'] = time();
......@@ -1424,6 +1424,11 @@ Class OrderController extends Controller
}
$info = $this->orderDetail($request, $id);
if (!$request->input('tags') && $request->input('tags') != 'self') { // 自营订单页面
return redirect('/self_order');
}
$this->pageHeader($request, $info, '自营对账', ["title" => '自营对账', "href" => '#']);
$this->selfOtherData($info, $id);
......
......@@ -632,16 +632,16 @@
// 点击物流展开
$('.click-down').click(function() {
$('.other-infos').show();
$(this).parents('tbody').find('.other-infos').show();
$(this).hide();
$('.click-up').show();
$(this).parents('tbody').find('.click-up').show();
})
// 点击物流收起
$('.click-up').click(function() {
$('.other-infos').hide();
$(this).parents('tbody').find('.other-infos').hide();
$(this).hide();
$('.click-down').show();
$(this).parents('tbody').find('.click-down').show();
})
},
......@@ -1272,11 +1272,12 @@
var payTimeOther = $('.payTimeOther').val();
var sale_id = $('input[name=sale_id]').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) {
layer.alert('请先将订单推送给业务员', function(){
location.href = '/sendSales/'+$('input[name=order_id]').val();
location.href = '/sendSales/'+order_id;
});
return false;
}
......@@ -1366,7 +1367,7 @@
}
}
if (!is_manager) {
if (!is_manager && order_goods_type != 1) { // 非管理员或经理权限和非联营订单需要判断商品价格是否低于80%以下
// 设置默认值false
$('input[name=check_failed]').val(0);
$('input[name=change_pay_type]').val(0);
......@@ -1401,8 +1402,10 @@
if (order_goods_type == 1) {
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 url = '/details/'+order_id;
} else {
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 @@
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
// location.reload();
location.href = url;
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常', function(){
......@@ -1686,12 +1690,12 @@
// 自营对账
$('.self-sure-pay').click(function(){
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) {
layer.alert('请输入流水号');
return false;
}
// if (serial_number.length == 0) {
// layer.alert('请输入流水号');
// return false;
// }
layer.open({
title: '收款确认',
......@@ -1700,7 +1704,8 @@
btn1:function(){
$.ajax({
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',
dataType: 'json',
success:function(resp){
......
<p style="padding-left: 5px;">人工审单</p>
<div class="tabs-box">
<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])))
<form id="checkOrderForm" class="form-horizontal table-responsive">
<input type="hidden" name="order_sn" value="{{$order_info['order_sn']}}">
<input type="hidden" name="user_id" value="{{$order_info['user_id']}}">
......@@ -279,7 +279,7 @@
</form>
@endif
@if ($order_info['status'] == 2)
@if ($order_info['order_goods_type'] == 1 && $order_info['status'] == 2)
<div class="checked_section">
<div class="checked_left">
<p>交易状态:&nbsp;审核通过,请联系客户及时付款!
......@@ -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>
@elseif ($order_info['order_goods_type'] == 1)
<a class="btn btn-default" href="{{$adjustPriceUrl}}">再次调价</a>
@endif
</div>
......
......@@ -577,12 +577,12 @@
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断操作权限 -->
@if ($order_info['status'] == 1 && in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}">人工审单</a>
@if (in_array($order_info['status'], [1, 2]) && in_array('check_order', $userPerms))
<a class="btn btn-info" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}">人工审单</a>
@endif
@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
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
......@@ -612,13 +612,13 @@
<a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a>
@endif
<!-- 预售订单审单 -->
@if ($order_info['status'] == 1 && $order_info['sale_type'] == 2 && in_array('self_check_order', $userPerms))
<a class="btn btn-success" href="/change/{{$order_info['order_id']}}?tags=self">人工审单</a>
<!-- 订单审单 -->
@if (in_array($order_info['status'], [1, 2]) && in_array('self_check_order', $userPerms))
<a class="btn btn-info" href="/change/{{$order_info['order_id']}}?tags=self">人工审单</a>
@endif
@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
@if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms))
......
<p style="margin-left: 5px;">对账操作</p>
<div class="tabs-box">
<!-- 判断订单类型 1.全款,2.预付款 -->
<?php
if ($order_info['status'] == 4) {
echo '<p>订单对账正常</p>
<p class="error">订单总金额:'.$order_info['order_amount'].'</p>
<p>流水号:'.$order_pay_log[0]['serial_number'].'</p>';
} else {
$serial_number = 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.'">
@if ($order_info['status'] == 4)
<p>订单对账正常</p>
<p class="error">订单总金额:{{ $order_info['order_amount'] }}</p>
<!-- <p>流水号:{{ $order_pay_log[0]['serial_number'] }}</p> -->
@else
<p class="error">订单总金额:{{ $order_info['order_amount'] }}</p>
<!-- <p> 流水号:
<input style="width: 200px;" type="text" name="serial_number" value="{{ isset($order_pay_log[0]['serial_number']) ? $order_pay_log[0]['serial_number'] : '' }}">
<span style="color:orange;">请录入流水号,流水号为英文、数字</span>
</p>
<p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>';
}
?>
</p> -->
<p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>
@endif
</div>
<div class="hide" id="sure-pay">
......
......@@ -276,7 +276,7 @@
<div class="btn-group btn-group-xs">
<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>
@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