Commit eb70972b by 朱继来

1. 添加预付款金额展示;

2. ERP订单添加来源筛选;
parent cd3b5a11
......@@ -244,10 +244,12 @@ Class OrderController extends Controller
$map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', '');
$map['order_send'] = $request->input('order_send', '');
$map['order_source'] = $request->input('order_source', '');
}
/* 查看ERP订单 */
$map['online_order'] = 2;
// $map['online_order'] = 2;
$map['offline_order'] = [2, 3]; // 2-ERP, 3-JD
// 获取所有的业务员 (包括经理和交易员)
$perm = new PermController;
......
......@@ -206,6 +206,7 @@
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'),
order_source = $('#order_source').data('default'),
listUrl = '/erp_order';
listUrl += '?order_type=' + order_type;
......@@ -234,6 +235,10 @@
listUrl += '&order_send=' + order_send;
}
if (order_source) {
listUrl += '&order_source=' + order_source;
}
location.href = listUrl;
})
},
......@@ -619,13 +624,19 @@
var order_id = $('input[name=order_id]').val();
if (tags) {
var url = '/details/'+order_id+'?tags='+tags;
} else {
var url = '/details/'+order_id;
}
$('form').on('submit', function(){
$(this).ajaxSubmit({
data: {order_id: order_id},
dataType:'json',
success:function(resp){
if(resp.errcode == 0){
location.href = '/details/'+order_id;
location.href = url;
} else {
layer.alert(resp.errmsg || '网络异常')
}
......@@ -651,13 +662,19 @@
}
})
if (tags) {
var url = '/details/'+order_id+'?tags='+tags;
} else {
var url = '/details/'+order_id;
}
$('form').on('submit', function(){
$(this).ajaxSubmit({
data: {order_id: order_id},
dataType:'json',
success:function(resp){
if(resp.errcode == 0){
location.href = '/details/'+order_id;
location.href = url;
} else {
layer.alert(resp.errmsg || '网络异常')
}
......
<div class="page-content order-details">
<ul class="nav nav-tabs">
<li><a href="{{URL('list')}}">订单列表</a></li>
<li><a href="{{URL('details', ['order_id'=>$detail['order_id']])}}">订单详情</a></li>
@if (isset($_REQUEST['tags']))
<li><a href="{{URL('erp_order')}}">ERP订单</a></li>
<li><a href="/details/{{$detail['order_id']}}?tags={{$_REQUEST['tags']}}">订单详情</a></li>
@else
<li><a href="{{URL('list')}}">平台订单</a></li>
<li><a href="{{URL('details', ['order_id'=>$detail['order_id']])}}">订单详情</a></li>
@endif
<li class="active"><a href="javascript:;">订单发票信息</a></li>
</ul>
<?php
......@@ -81,6 +87,8 @@
</div>
<script>
var tags = "{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}";
$.lie.order.details();
var inv_type = '{{$detail['inv_type']}}';
......
<div class="page-content order-details">
<ul class="nav nav-tabs">
<li><a href="{{URL('list')}}">订单列表</a></li>
<li><a href="{{URL('details', ['order_id'=>$detail['order_id']])}}">订单详情</a></li>
@if (isset($_REQUEST['tags']))
<li><a href="{{URL('erp_order')}}">ERP订单</a></li>
<li><a href="/details/{{$detail['order_id']}}?tags={{$_REQUEST['tags']}}">订单详情</a></li>
@else
<li><a href="{{URL('list')}}">平台订单</a></li>
<li><a href="{{URL('details', ['order_id'=>$detail['order_id']])}}">订单详情</a></li>
@endif
<li class="active"><a href="javascript:;">订单收货信息</a></li>
</ul>
<?php
......@@ -45,5 +51,7 @@
</div>
<script>
var tags = "{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}";
$.lie.order.details();
</script>
\ No newline at end of file
<div class="page-content order-details">
<ul class="nav nav-tabs">
<li><a href="{{URL('list')}}">订单列表</a></li>
@if (isset($_REQUEST['tags']))
<li><a href="{{URL('erp_order')}}">ERP订单</a></li>
@else
<li><a href="{{URL('list')}}">平台订单</a></li>
@endif
<li class="active"><a href="javascript:;">订单详情</a></li>
</ul>
<?php
......@@ -59,7 +63,11 @@
{{$order_address_info['province_val']}}&nbsp;&nbsp;{{$order_address_info['city_val']}}&nbsp;&nbsp;{{$order_address_info['district_val']}}&nbsp;&nbsp;{{$order_address_info['address']}}
<!-- 订单状态小于5 且 更新地址权限存在 显示按钮 -->
@if (in_array($order_info['status'], array(1, 2, 3, 4)) && in_array('update_address', $userPerms))
<a href="{{URL('changeShipping', ['order_id'=>$order_info['order_id']])}}" class="btn btn-success btn-sm">更改收货地址</a>
@if (isset($_REQUEST['tags']))
<a href="/changeShipping/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm">更改收货地址</a>
@else
<a href="/changeShipping/{{$order_info['order_id']}}" class="btn btn-success btn-sm">更改收货地址</a>
@endif
@endif
</td>
</tr>
......@@ -73,9 +81,32 @@
<div class="order-right">
<table class="table order-express">
<?php
$currency = $order_info['currency'] == 2 ? '$' : '¥';
?>
@if ($order_info['order_pay_type'] == 2)
<tr>
<td colspan="2">
<p>
<b style="font-weight:bolder !important;">预付款:</b>
{{$currency.$order_info['advance_amount']}}
</p>
</td>
<td colspan="3">
<p>
<b style="font-weight:bolder !important;">尾款:</b>
{{$currency.number_format($order_info['order_amount'] - $order_info['advance_amount'], 2, '.', '')}}
</p>
</td>
</tr>
@endif
<tr>
<td>
<p>交易状态:
<p>
<b style="font-weight:bolder !important;">交易状态:</b>
<?php
switch ($order_info['status']) {
case -2: echo "审核未通过";break;
......@@ -93,7 +124,7 @@
</td>
<td>
<p>
对账状态:
<b style="font-weight:bolder !important;">对账状态:</b>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['order_id'] != '') {
......@@ -114,7 +145,8 @@
</p>
</td>
<td>
<p>配送状态:
<p>
<b style="font-weight:bolder !important;">配送状态:</b>
<?php
switch ($order_shipping_info['status']) {
case 1: echo '已配送'; break;
......@@ -130,71 +162,68 @@
<tr>
<td>
<p>
<b style="font-weight:bolder !important;">支付方式:
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_name'] != '') {
echo $order_pay_log[1]['pay_name'];
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
<b style="font-weight:bolder !important;">支付方式:</b>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_name'] != '') {
echo $order_pay_log[1]['pay_name'];
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
?>
</b>
}
?>
</p>
</td>
<td>
<p>
<b style="font-weight:bolder !important;">支付类型:
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != '') {
echo '全款';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_type'] != '') {
echo '尾款';
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != '') {
echo '预付款';
} else {
echo '--';
}
<b style="font-weight:bolder !important;">支付类型:</b>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != '') {
echo '全款';
} else {
echo '--';
}
?>
</b>
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_type'] != '') {
echo '尾款';
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != '') {
echo '预付款';
} else {
echo '--';
}
}
?>
</p>
</td>
<td>
<p>
<b style="font-weight:bolder !important;">支付状态:
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['is_paid'] != '') {
echo $order_pay_log[1]['is_paid'] == 1 ? '已支付' : '未支付';
} else if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
<b style="font-weight:bolder !important;">支付状态:</b>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
?>
</b>
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['is_paid'] != '') {
echo $order_pay_log[1]['is_paid'] == 1 ? '已支付' : '未支付';
} else if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
}
?>
</p>
</td>
<td>&nbsp;</td>
......@@ -207,7 +236,11 @@
发票信息
<!-- 发票状态小于2(已发货)且更改权限存在 显示按钮 -->
@if (in_array($order_info['status'], array(1, 2, 3, 4, 7, 8)) && $order_invoice_info['invoice_status'] < 2 && in_array('update_invoice', $userPerms))
<a href="{{URL('changeInvoice', ['order_id'=>$order_info['order_id']])}}" class="btn btn-success btn-sm">更改</a>
@if (isset($_REQUEST['tags']))
<a href="/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm">更改发票</a>
@else
<a href="/changeInvoice/{{$order_info['order_id']}}" class="btn btn-success btn-sm">更改发票</a>
@endif
@endif
</th>
</tr>
......@@ -286,9 +319,6 @@
</tr>
</thead>
<tbody>
<?php
$currency = $order_info['currency'] == 2 ? '$' : '¥';
?>
@foreach ($order_items_info as $v)
<tr>
<td>{{$v['goods_name']}}</td>
......@@ -409,42 +439,45 @@
<include file="recovery"/>
</if>
<!-- 人工审单时去掉操作按钮 -->
@if ($action_name != 'changeOrder')
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断操作权限 -->
@if (($role == 1 || $role ==2) && $order_info['status'] == 1 && in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">人工审单</a>
@endif
<!-- <a href="{:U('account', 'order_id='.$order_info['order_id'])}" class="btn btn-default">账期设置</a> -->
@if (($role == 1 || $role ==2) && in_array($order_info['status'], array(1, 2)) && in_array('check_order', $userPerms))
<!-- <a href="{{URL('check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单</a> -->
@endif
<!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']))
<!-- 人工审单时去掉操作按钮 -->
@if ($action_name != 'changeOrder')
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断操作权限 -->
@if (($role == 1 || $role ==2) && $order_info['status'] == 1 && in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">人工审单</a>
@endif
<!-- <a href="{:U('account', 'order_id='.$order_info['order_id'])}" class="btn btn-default">账期设置</a> -->
@if (($role == 1 || $role ==2) && in_array($order_info['status'], array(1, 2)) && in_array('check_order', $userPerms))
<!-- <a href="{{URL('check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单</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>
@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>
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if ($order_info['status'] >= 2 && in_array('check_account', $userPerms))
@if ($order_info['status'] == 3 && (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != ''))
<a href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default last-check">对账</a>
@else
<a href="{{URL('checkPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">对账</a>
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if ($order_info['status'] >= 2 && in_array('check_account', $userPerms))
@if ($order_info['status'] == 3 && (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != ''))
<a href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default last-check">对账</a>
@else
<a href="{{URL('checkPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">对账</a>
@endif
@endif
@endif
@if (in_array($order_info['status'], array(4, 7, 8, 10)) && in_array('order_send', $userPerms))
<!-- <a href="{{URL('send', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">订单发货</a> -->
@endif
@if ($order_info['status'] == 10 && in_array('send_invoice', $userPerms))
<a href="{{URL('invShipping', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">寄送发票</a>
@if (in_array($order_info['status'], array(4, 7, 8, 10)) && in_array('order_send', $userPerms))
<!-- <a href="{{URL('send', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">订单发货</a> -->
@endif
@if ($order_info['status'] == 10 && in_array('send_invoice', $userPerms))
<a href="{{URL('invShipping', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">寄送发票</a>
@endif
<!-- <a href="{:U('cancel', 'order_id='.$order_info['order_id'])}" class="btn btn-default">退货退款</a>
<a href="{:U('recovery', 'order_id='.$order_info['order_id'])}" class="btn btn-default">平账设置</a> -->
</div>
@endif
<!-- <a href="{:U('cancel', 'order_id='.$order_info['order_id'])}" class="btn btn-default">退货退款</a>
<a href="{:U('recovery', 'order_id='.$order_info['order_id'])}" class="btn btn-default">平账设置</a> -->
</div>
@endif
<!-- 二期处理 -->
<!-- <p>操作记录</p>
......
<div class="wrapper wrapper-content">
<div class="page-content">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">ERP订单列表</a></li>
<li class="active"><a href="javascript:;">ERP订单</a></li>
</ul>
<div class="tabs-box">
......@@ -47,7 +47,18 @@
</div>
</dd>
</dl>
<dl>
<dt>订单来源:</dt>
<dd>
<div class="droplist" data-default="{{$condition['order_source']}}" id="order_source" name="order_source">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="2">ERP</li>
<li data-val="3">京东</li>
</ul>
</div>
</dd>
</dl>
<dl>
<dt>推送业务员:</dt>
<dd>
......@@ -83,6 +94,7 @@
<th class="pl30">推送业务员</th>
<th class="pl30">发货状态</th>
<th class="pl30">配送方式</th>
<th class="pl30">订单来源</th>
<th class="pl30">下单时间</th>
<th class="pl30">操作</th>
</tr>
......@@ -98,11 +110,11 @@
<tr>
<td class="show-list">{{$v['mobile'] ? $v['mobile'] : $v['email']}}</td>
<td class="show-list">
@if ($v['currency'] == '1')
{{'¥'.$v['order_amount']}}
@else
{{'$ '.$v['order_amount']}}
@endif
<?php
$currencySign = $v['currency'] == 1 ? '¥' : '$';
echo $currencySign.$v['order_amount'];
?>
</td>
<td class="show-list">
<?php
......@@ -173,10 +185,17 @@
自提
@endif
</td>
<td>
@if ($v['order_type'] == 2)
ERP
@else
京东
@endif
</td>
<td class="show-list">{{date('Y-m-d H:i:s', $v['create_time'])}}</td>
<td>
<div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a>
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=erp">详情</a>
</div>
</td>
</tr>
......@@ -190,7 +209,15 @@
<td class="table-list-content">{{$v['order_sn']}}</td>
<td class="table-list-title">公司名称</td>
<td class="table-list-content">{{$v['com_name']}}</td>
</tr>
</tr>
@if ($v['order_pay_type'] == 2)
<tr>
<td class="table-list-title">预付款</td>
<td class="table-list-content">{{$currencySign.$v['advance_amount']}}</td>
<td class="table-list-title">尾款</td>
<td class="table-list-content">{{$currencySign.number_format($v['order_amount'] - $v['advance_amount'], 2, '.', '')}}</td>
</tr>
@endif
<tr>
<td class="table-list-title">支付时间</td>
<td class="table-list-content">
......
<div class="wrapper wrapper-content">
<div class="page-content">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单列表</a></li>
<li class="active"><a href="javascript:;">平台订单</a></li>
</ul>
<div class="tabs-box">
......@@ -179,11 +179,11 @@
<tr>
<td class="show-list">{{$v['mobile'] ? $v['mobile'] : $v['email']}}</td>
<td class="show-list">
@if ($v['currency'] == '1')
{{'¥'.$v['order_amount']}}
@else
{{'$ '.$v['order_amount']}}
@endif
<?php
$currencySign = $v['currency'] == 1 ? '¥' : '$';
echo $currencySign.$v['order_amount'];
?>
</td>
<td class="show-list">
<?php
......@@ -279,6 +279,14 @@
<p class="show-title" title="{{$v['com_name']}}">{{$v['com_name']}}</p>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
<tr>
<td class="table-list-title">预付款</td>
<td class="table-list-content">{{$currencySign.$v['advance_amount']}}</td>
<td class="table-list-title">尾款</td>
<td class="table-list-content">{{$currencySign.number_format($v['order_amount'] - $v['advance_amount'], 2, '.', '')}}</td>
</tr>
@endif
<tr>
<td class="table-list-title">支付时间</td>
<td class="table-list-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