Commit 4147a144 by 朱继来

fix

parents 5312306e 58a9a6f0
...@@ -417,10 +417,12 @@ Class OrderController extends Controller ...@@ -417,10 +417,12 @@ Class OrderController extends Controller
} }
$map['order_goods_type'] = $tid; $map['order_goods_type'] = $tid;
$size = 10;
if ($tid == 1) { if ($tid == 1) {
$map['order_type_filter'] = [1]; $map['order_type_filter'] = [1];
} else if ($tid == 2) { } else if ($tid == 2) {
$size = 20;
$map['order_type_filter'] = [1, 3]; // 1. 网站 2. 京东 $map['order_type_filter'] = [1, 3]; // 1. 网站 2. 京东
} else if ($tid == 3) { } else if ($tid == 3) {
$map['order_goods_type'] = 1; // 联营订单 $map['order_goods_type'] = 1; // 联营订单
...@@ -447,6 +449,7 @@ Class OrderController extends Controller ...@@ -447,6 +449,7 @@ Class OrderController extends Controller
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['p'] = $request->input('p', 1); // 当前页码 $data['p'] = $request->input('p', 1); // 当前页码
$data['size'] = $size; // 当前页条数
$data['map'] = $map; $data['map'] = $map;
$response = json_decode(curlApi($url, $data), true); $response = json_decode(curlApi($url, $data), true);
...@@ -1305,15 +1308,12 @@ Class OrderController extends Controller ...@@ -1305,15 +1308,12 @@ Class OrderController extends Controller
public function selfCheckPay(Request $request, $id) public function selfCheckPay(Request $request, $id)
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$order_id = $request->input('order_id', '');
// $serial_number = $request->input('serial_number', '');
$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'] = $request->input('order_id', '');
// $data['serial_number'] = $serial_number; // $data['serial_number'] = $request->input('serial_number', '');
$data['operator_id'] = $operator_id; $data['operator_id'] = $request->user->userId;
$data['trans_amount'] = $request->input('trans_amount', 0);
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
......
...@@ -136,12 +136,33 @@ class OrderModel extends Model ...@@ -136,12 +136,33 @@ class OrderModel extends Model
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 订单来源 // 订单来源
if (!empty($map['order_source_pf'])) { if (!empty($map['order_source_pf'])) {
if ($map['order_source_pf'] == 1) { $order_source_pf = explode(',', $map['order_source_pf']);
$query->whereRaw("FIND_IN_SET('pf=1', o.order_source)"); $string = '';
} else {
$query->whereRaw("FIND_IN_SET('pf=2', o.order_source)");
foreach ($order_source_pf as $v) {
switch ($v) {
case '1':
case '2':
case '6':
$string .= "FIND_IN_SET('pf=".$v."', o.order_source) OR ";
break;
case '3':
$string .= "oe.order_type != 0 OR ";
break;
case '4':
$string .= "o.order_type = 3 OR ";
break;
}
} }
$query->whereRaw(rtrim($string, ' OR '));
// if ($map['order_source_pf'] == 1) {
// $query->whereRaw("FIND_IN_SET('pf=1', o.order_source)");
// } else {
// $query->whereRaw("FIND_IN_SET('pf=2', o.order_source)");
// }
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
...@@ -177,12 +198,23 @@ class OrderModel extends Model ...@@ -177,12 +198,23 @@ class OrderModel extends Model
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 支付方式 // 支付方式
if (!empty($map['order_payment_mode'])) { if (!empty($map['order_payment_mode'])) {
switch ($map['order_payment_mode']) { $pay_name = explode(',', $map['order_payment_mode']);
case '1': $order_payment_mode = '微信';break; $order_payment_mode = [];
case '2': $order_payment_mode = '支付宝';break;
case '3': $order_payment_mode = '银联';break; foreach ($pay_name as $v) {
switch ($v) {
case '1': $order_payment_mode[] = '微信支付';break;
case '2': $order_payment_mode[] = '支付宝';break;
case '3': $order_payment_mode[] = '银联支付(B2B)';break;
case '4': $order_payment_mode[] = '银联支付(B2C)';break;
case '5': $order_payment_mode[] = '账期支付';break;
case '6': $order_payment_mode[] = '京东支付';break;
case '7': $order_payment_mode[] = '交通银行';break;
case '8': $order_payment_mode[] = '恒生银行';break;
} }
$query->where('p.pay_name', '=', $order_payment_mode); }
$query->whereIn('p.pay_name', $order_payment_mode);
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
......
...@@ -71,4 +71,7 @@ return [ ...@@ -71,4 +71,7 @@ return [
// 财务系统接口地址 (自营发票) // 财务系统接口地址 (自营发票)
'finance-self-invoice-url' => 'http://192.168.1.97/webapi/checkOrderBillStatus', 'finance-self-invoice-url' => 'http://192.168.1.97/webapi/checkOrderBillStatus',
// 支付地址
'pay_url' => 'https://www.liexin.com/v3/pay/online?id=',
]; ];
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
/*表格上面的操作栏*/ /*表格上面的操作栏*/
.search-box > div{line-height:30px; margin:0px;padding-top: 10px;} .search-box > div{line-height:30px; margin:0px;padding-top: 10px;}
.search-box > div dl{margin:0;padding:0 1px; display: inline-block;*float:left; } .search-box > div dl{margin:0;padding:0 1px; display: inline-block;*float:left; width: 400px; }
.search-box > div dl dt,.search-box > div dl dd{float:left; height:30px; line-height:26px; vertical-align:middle; margin:0;padding:0;} .search-box > div dl dt,.search-box > div dl dd{float:left; height:30px; line-height:26px; vertical-align:middle; margin:0;padding:0;}
.search-box > div dl dt{width:80px;text-align:right; font-weight:normal;} .search-box > div dl dt{width:80px;text-align:right; font-weight:normal;}
.search-box > div dl dd{width:170px; } .search-box > div dl dd{width:170px; }
...@@ -315,6 +315,6 @@ input[type="color"], ...@@ -315,6 +315,6 @@ input[type="color"],
width: 150px; width: 150px;
} }
.bs-select-all, .bs-deselect-all{ .bs-select-all{float: left; width: 42% !important;}
width: 100% !important; .bs-deselect-all{float: right; width: 50% !important;}
} .bootstrap-select .btn{padding: 4px 12px;}
\ No newline at end of file \ No newline at end of file
<p style="margin-left: 5px;">对账操作</p> <p style="margin-left: 5px;">对账操作</p>
<div class="tabs-box"> <div class="tabs-box">
<!-- 判断订单类型 1.全款,2.预付款 --> <!-- 判断订单类型 1.全款,2.预付款,3.账期 -->
<?php <?php
switch ($order_info['order_pay_type']) { switch ($order_info['order_pay_type']) {
case 1: case 1:
case 3:
if ($order_info['status'] == 4) { if ($order_info['status'] == 4) {
echo '<p>订单对账正常</p> echo '<p>订单对账正常</p>
<p>流水号:'.$order_pay_log[0]['serial_number'].'</p> <p>流水号:'.$order_pay_log[0]['serial_number'].'</p>
......
...@@ -390,10 +390,14 @@ ...@@ -390,10 +390,14 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr class="caption"> <tr class="caption">
<th>商品名</th>
@if ($order_info['order_goods_type'] == 2) @if ($order_info['order_goods_type'] == 2)
<th>商品ID</th>
<th>商品名</th>
<th>型号</th> <th>型号</th>
@else
<th>商品名</th>
@endif @endif
<th>制造商</th> <th>制造商</th>
@if ($username != 'vpadmin@ichunt.com') @if ($username != 'vpadmin@ichunt.com')
...@@ -420,11 +424,12 @@ ...@@ -420,11 +424,12 @@
@if (!empty($order_items_info)) @if (!empty($order_items_info))
@foreach ($order_items_info as $v) @foreach ($order_items_info as $v)
<tr> <tr>
@if ($order_info['order_goods_type'] == 1) @if ($order_info['order_goods_type'] == 2)
<td><a href="{{Config('website.main_url').'goods_'.$v['goods_id'].'.html?ptag=order'}}" target="_blank">{{$v['goods_name']}}</a></td> <td>{{$v['goods_id']}}</td>
@else
<td><a href="{{Config('website.main_url').'item/'.$v['goods_id'].'.html?ptag=order'}}" target="_blank">{{$v['goods_name']}}</a></td> <td><a href="{{Config('website.main_url').'item/'.$v['goods_id'].'.html?ptag=order'}}" target="_blank">{{$v['goods_name']}}</a></td>
<td>{{ App\Http\Controllers\getGoodsName($v['goods_id']) }}</td> <td>{{ App\Http\Controllers\getGoodsName($v['goods_id']) }}</td>
@else
<td><a href="{{Config('website.main_url').'goods_'.$v['goods_id'].'.html?ptag=order'}}" target="_blank">{{$v['goods_name']}}</a></td>
@endif @endif
<td>{{$v['brand_name']}}</td> <td>{{$v['brand_name']}}</td>
...@@ -505,8 +510,9 @@ ...@@ -505,8 +510,9 @@
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<p>客户付款地址:{{ Config('website.pay_url').$order_info['order_id'] }}</p>
</div> </div>
<?php $client_source = App\Http\Controllers\clientSource($order_info['user_id']); ?> <?php $client_source = App\Http\Controllers\clientSource($order_info['user_id']); ?>
......
<p style="margin-left: 5px;">对账操作</p> <p style="margin-left: 5px;">对账操作</p>
<div class="tabs-box"> <div class="tabs-box">
<!-- 判断订单类型 1.全款,2.预付款 --> <!-- 判断订单状态 4待发货 -->
@if ($order_info['status'] == 4) @if ($order_info['status'] == 4)
<p>订单对账正常</p> <p>订单对账正常</p>
<p class="error">订单总金额:{{ $order_info['order_amount'] }}</p> <p class="error">对账金额:{{ $order_pay_log[0]['pay_amount'] }}</p>
<!-- <p>流水号:{{ $order_pay_log[0]['serial_number'] }}</p> --> @else
<!-- role=9 财务对账 -->
@if ($role == 9)
<p><input type="text" style="width: 200px;" name="trans_amount" value="" placeholder="请输入客户线下转账金额"></p>
<p style="margin-top: 20px;"><a class="btn btn-info self-sure-pay">确认收款</a></p>
@else @else
<p class="error">订单总金额:{{ $order_info['order_amount'] }}</p> <p class="error">订单总金额:{{ $order_info['order_amount'] }}</p>
<!-- <p> 流水号: <p style="margin-top: 20px;"><a class="btn btn-info self-sure-pay">确认收款</a></p>
<input style="width: 200px;" type="text" name="serial_number" value="{{ isset($order_pay_log[0]['serial_number']) ? $order_pay_log[0]['serial_number'] : '' }}"> @endif
<span style="color:orange;">请录入流水号,流水号为英文、数字</span>
</p> -->
<p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>
@endif @endif
</div> </div>
<script>
var role = "{{$role}}"; // 用户角色
var order_amount = "{{$order_info['order_amount']}}"; // 订单总额
</script>
<div class="hide" id="sure-pay"> <div class="hide" id="sure-pay">
<p><label><input type="radio" name="status" value="1" checked> 款项正常</label></p> <p><label><input type="radio" name="status" value="1" checked> 款项正常</label></p>
<p><label><input type="radio" name="status" value="2"> 款项异常</label></p> <p><label><input type="radio" name="status" value="2"> 款项异常</label></p>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="span12"> <div class="span12">
<table style="width:100%"> <table style="width:100%">
<tr> <tr>
<td width="93%"> <td>
<dl> <dl>
<dt>查询类型:</dt> <dt>查询类型:</dt>
<dd style="width:auto !important;"> <dd style="width:auto !important;">
...@@ -36,32 +36,27 @@ ...@@ -36,32 +36,27 @@
</dl> </dl>
<dl> <dl>
<dt>订单状态:</dt> <dt>订单状态:</dt>
<dd style="width: 115px;"> <dd>
<div class="droplist" data-default="{{$condition['order_status']}}" id="order_status" name="order_status"> <select id="order_status" name="order_status" class="form-control order_status selectpicker" title="全部" multiple>
<ul class="dropdown-menu"> <option value="-1">已取消</option>
<li data-val="" class="active">全部</li> <option value="1">待审核</option>
<li data-val="-1">已取消</li> <option value="2">待付款</option>
<li data-val="1">待审核</li> <option value="3">待付尾款</option>
<li data-val="2">待付款</li> <option value="4">待发货</option>
<li data-val="3">待付尾款</li> <option value="7">部分发货</option>
<li data-val="4">待发货</li> <option value="8">待收货</option>
<li data-val="7">部分发货</li> <option value="10">交易成功</option>
<li data-val="8">待收货</li> </select>
<li data-val="10">交易成功</li>
</ul>
</div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>订单来源:</dt> <dt>订单来源:</dt>
<dd style="width: 115px;"> <dd>
<div class="droplist" data-default="{{$condition['order_source']}}" id="order_source" name="order_source"> <select id="order_source" name="order_source" class="form-control order_source selectpicker" title="全部">
<ul class="dropdown-menu"> <option value="">全部</option>
<li data-val="" class="active">全部</li> <option value="2">ERP</option>
<li data-val="2">ERP</li> <option value="3">京东</option>
<li data-val="3">京东</li> </select>
</ul>
</div>
</dd> </dd>
</dl> </dl>
<style> <style>
...@@ -69,7 +64,7 @@ ...@@ -69,7 +64,7 @@
</style> </style>
<dl> <dl>
<dt>推送业务员:</dt> <dt>推送业务员:</dt>
<dd style="width: 115px;"> <dd>
<select id="order_send" name="order_send" class="form-control order_send selectpicker" title="全部" data-live-search="true"> <select id="order_send" name="order_send" class="form-control order_send selectpicker" title="全部" data-live-search="true">
<optgroup label="在职"> <optgroup label="在职">
@foreach ($sale_list as $v) @foreach ($sale_list as $v)
...@@ -98,16 +93,14 @@ ...@@ -98,16 +93,14 @@
</dd> </dd>
</dl> </dl>
</td> </td>
<td width="7%">
<dl>
<dt>
<button type="submit" class="nbtn searchErpOrder">搜索</button>
</dt>
</dl>
</td>
</tr> </tr>
</table> </table>
<div class="text-center">
<div class="search-btn">
<button type="submit" class="nbtn searchErpOrder">搜索</button>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -311,7 +304,22 @@ ...@@ -311,7 +304,22 @@
</div> </div>
<script> <script>
var order_status = "{{$condition['order_status']}}";
var order_source = "{{$condition['order_source_pf']}}";
var order_send = "{{$condition['order_send']}}"; var order_send = "{{$condition['order_send']}}";
$(".order_status").selectpicker({
actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮
countSelectedText:"已选中{0}项",
selectedTextFormat:"count > 5",
selectAllText: '全选',
deselectAllText: '取消全选',
})
$('.order_status').selectpicker('val', order_status.split(',')).trigger("change");
$('#order_send').selectpicker('val', order_send);
$('#order_source').selectpicker('val', order_source);
$('#order_send').selectpicker('val', order_send); $('#order_send').selectpicker('val', order_send);
$.lie.order.index(); $.lie.order.index();
......
<link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-select.min.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet"> <link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet"> <link href="/css/style.css" rel="stylesheet">
<link href="/layer/skin/layer.css" rel="stylesheet"> <link href="/layer/skin/layer.css" rel="stylesheet">
......
<script src="/js/jquery-2.2.1.js"></script> <script src="/js/jquery-2.2.1.js"></script>
<script src="/js/jquery.form.js"></script> <script src="/js/jquery.form.js"></script>
<script src="/js/bootstrap.min.js"></script> <script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-select.min.js"></script>
<script src="/layer/layer.js"></script> <script src="/layer/layer.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script> <script src="/js/inspinia.min.js"></script>
<script src="/js/common.js"></script> <script src="/js/common.js"></script>
<script src="/js/order.js"></script>
<script src="/js/self_order.js"></script> <script src="/js/self_order.js"></script>
<script src="/js/orderamount.js"></script> <script src="/js/orderamount.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script> <script src="/js/plugins/DatePicker/WdatePicker.js"></script>
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