Commit b124f0f5 by 朱继来

Merge branch 'zjl_adjust_20180507' into development

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