Commit e6c56b19 by 朱继来

调整调价信息

parent 84b5420f
...@@ -786,15 +786,15 @@ Class OrderController extends Controller ...@@ -786,15 +786,15 @@ Class OrderController extends Controller
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$order_id = $request->input('order_id'); $order_id = $request->input('order_id');
$order = DB::connection('order') // 调价失败临时表状态更改
->table('lie_order') $order_temp = DB::connection('order')->table('lie_order_temp_info')->where(['order_id' => $order_id])->update(['status' => -1]);
->where(['order_id' => $order_id])
->update(['order_temp_info' => '']);
if (!$order) { if (!$order_temp) {
return array('errcode'=>-1, 'errmsg'=>'驳回失败'); return array('errcode'=>-1, 'errmsg'=>'驳回失败');
} }
return array('errcode'=>0,'errmsg'=>'驳回成功'); return array('errcode'=>0,'errmsg'=>'驳回成功');
} }
} }
...@@ -873,6 +873,9 @@ Class OrderController extends Controller ...@@ -873,6 +873,9 @@ Class OrderController extends Controller
->update($data); ->update($data);
if ($update) { if ($update) {
// 调价失败临时表状态更改
DB::connection('order')->table('lie_order_temp_info')->where(['order_id' => $id])->update(['status' => 0]);
return redirect('/change/'.$id); return redirect('/change/'.$id);
} else { } else {
return redirect('/prompt')->with(['message'=>"调价操作更新数据失败!",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]); return redirect('/prompt')->with(['message'=>"调价操作更新数据失败!",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]);
...@@ -1317,6 +1320,7 @@ Class OrderController extends Controller ...@@ -1317,6 +1320,7 @@ Class OrderController extends Controller
'order_invoice_shipping_info' => $temp['data']['order_invoice_shipping_info'], 'order_invoice_shipping_info' => $temp['data']['order_invoice_shipping_info'],
'order_pay_log' => $temp['data']['order_pay_log'], 'order_pay_log' => $temp['data']['order_pay_log'],
'order_price_info' => $temp['data']['order_price_info'], 'order_price_info' => $temp['data']['order_price_info'],
'order_temp_info' => $temp['data']['order_temp_info'],
]; ];
$response = array_merge($response, $info); $response = array_merge($response, $info);
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</tr> </tr>
</table> </table>
@if ($order_info['status'] == 1 && $order_info['order_temp_info']) @if ($order_info['status'] == 1 && $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>
...@@ -212,17 +212,17 @@ ...@@ -212,17 +212,17 @@
</div> </div>
</div> </div>
@if ($order_info['status'] == 1 && $order_info['order_temp_info']) @if ($order_info['status'] == 1 && $order_temp_info['status'] == 1)
<div class="tabs-box adjusted_order" style="display: none;"> <div class="tabs-box adjusted_order" style="display: none;">
<div class="order-change-main"> <div class="order-change-main">
<form id="adjustedOrderForm" class="form-horizontal"> <form id="adjustedOrderForm" class="form-horizontal">
<input type="hidden" name="order_id" value="{{$order_info['order_id']}}"> <input type="hidden" name="order_id" value="{{$order_info['order_id']}}">
<input type="hidden" name="sale_id" value="{{$order_info['sale_id']}}"> <input type="hidden" name="sale_id" value="{{$order_info['sale_id']}}">
<input type="hidden" name="extra_fee" value="{{$order_info['order_temp_info']['extra_fee']}}"> <input type="hidden" name="extra_fee" value="{{$order_temp_info['extra_fee']}}">
<input type="hidden" name="goods_amount" value="{{$order_info['order_temp_info']['goods_amount']}}"> <input type="hidden" name="goods_amount" value="{{$order_temp_info['goods_amount']}}">
<input type="hidden" name="deposit_amount" value="{{$order_info['order_temp_info']['deposit_amount']}}"> <input type="hidden" name="deposit_amount" value="{{$order_temp_info['deposit_amount']}}">
<input type="hidden" name="order_pay_type" value="{{$order_info['order_temp_info']['order_pay_type']}}"> <input type="hidden" name="order_pay_type" value="{{$order_temp_info['order_pay_type']}}">
<input type="hidden" name="pay_time_limit" value="{{$order_info['order_temp_info']['pay_time_limit']}}"> <input type="hidden" name="pay_time_limit" value="{{$order_temp_info['pay_time_limit']}}">
<input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}"> <input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<table class="table table-bordered table-hover"> <table class="table table-bordered table-hover">
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
</thead> </thead>
<tbody> <tbody>
@foreach ($order_info['order_temp_info']['change_info'] as $k => $v) @foreach ($order_temp_info['change_info'] as $k => $v)
<tr> <tr>
<td> <td>
<input type="hidden" name="change_info[{{$k}}][goods_name]" value="{{$v['goods_name']}}"> <input type="hidden" name="change_info[{{$k}}][goods_name]" value="{{$v['goods_name']}}">
...@@ -257,12 +257,12 @@ ...@@ -257,12 +257,12 @@
<table class="table table-bordered table-hover"> <table class="table table-bordered table-hover">
<tr> <tr>
<th>商品总额:</th> <th>商品总额:</th>
<td>{{$order_info['order_temp_info']['goods_amount']}}</td> <td>{{$order_temp_info['goods_amount']}}</td>
</tr> </tr>
<tr> <tr>
<th>附加费:</th> <th>附加费:</th>
<td>{{$order_info['order_temp_info']['extra_fee']}}</td> <td>{{$order_temp_info['extra_fee']}}</td>
</tr> </tr>
<tr> <tr>
...@@ -272,12 +272,12 @@ ...@@ -272,12 +272,12 @@
<tr> <tr>
<th>订单总额:</th> <th>订单总额:</th>
<td>{{$order_info['order_temp_info']['goods_amount'] + $order_info['order_temp_info']['extra_fee'] + $order_price_info['discount_amount']}}</td> <td>{{$order_temp_info['goods_amount'] + $order_temp_info['extra_fee'] + $order_price_info['discount_amount']}}</td>
</tr> </tr>
<tr> <tr>
<th>付款时间:</th> <th>付款时间:</th>
<td>{{$order_info['order_temp_info']['pay_time_limit'].'天'}}</td> <td>{{$order_temp_info['pay_time_limit'].'天'}}</td>
</tr> </tr>
</table> </table>
</form> </form>
......
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