Commit 3b41c2e9 by 朱继来

预售temp

parent 2488beb5
......@@ -383,6 +383,7 @@ Class OrderController extends Controller
$map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', '');
$map['sale_type'] = $request->input('sale_type', '');
$map['shipping_name'] = $request->input('shipping_name', '');
$map['order_send'] = $request->input('order_send', '');
$map['test_order'] = $request->input('test_order', '');
......@@ -967,21 +968,21 @@ Class OrderController extends Controller
// 详情页
public function templateData(Request $request, $id, $view_id)
{
$data = $this->orderDetail($request, $id);
$info = $this->orderDetail($request, $id);
if ($data['order_info']['order_goods_type'] == 2 && in_array($data['order_info']['order_type'], [1, 3])) { // 平台自营订单
if ($info['order_info']['order_goods_type'] == 2 && in_array($info['order_info']['order_type'], [1, 3])) { // 平台自营订单
if ($request->input('tags') != 'self') {
return redirect('self_order'); // URL重定向
} else {
$this->selfOtherData($data, $id);
$this->selfOtherData($info, $id);
}
}
return view($view_id, $data);
return view($view_id, $info);
}
// 详情页自营其他数据
public function selfOtherData(&$data, $order_id)
public function selfOtherData(&$info, $order_id)
{
$shipping = DB::connection('order')->table('lie_shipping')->select('shipping_id', 'shipping_name')->get();
......@@ -990,14 +991,12 @@ Class OrderController extends Controller
$shippingInfo[$v->shipping_id] = $v->shipping_name;
}
$data['shippings'] = $shippingInfo;
$info['shippings'] = $shippingInfo;
}
$extend = DB::connection('order')->table('lie_order_extend')->where(['order_id' => $order_id, 'order_type' => 3])->first();
$extend = DB::connection('order')->table('lie_order_extend')->where(['order_id' => $order_id, 'order_type' => 3])->first(); // 自营线下订单
$data['extend'] = $extend ? $extend : '';
return $data;
$info['extend'] = $extend ? $extend : '';
}
// 外部引用
......@@ -1011,6 +1010,14 @@ Class OrderController extends Controller
{
$info = $this->orderDetail($request, $id);
if ($info['order_info']['order_goods_type'] == 2 && in_array($info['order_info']['order_type'], [1, 3])) { // 平台自营订单
if ($request->input('tags') != 'self') {
return redirect('self_order'); // URL重定向
} else {
$this->selfOtherData($info, $id);
}
}
// 账期订单跳转到详情页
if ($info['order_info']['status'] == 4) {
return redirect('/details/'.$id);
......
......@@ -10,7 +10,7 @@
],
'自营订单' => [
'订单列表' => ['self_order_check', 'self_order_export', 'self_order_cancel', 'self_order_express', 'self_order_invoice_express', 'self_order_update_address', 'self_order_update_invoice', 'self_check_test_order', 'self_order_download_contract', 'self_check_pay'],
'订单列表' => ['self_order_check', 'self_order_export', 'self_order_cancel', 'self_order_express', 'self_order_invoice_express', 'self_order_update_address', 'self_order_update_invoice', 'self_check_test_order', 'self_order_download_contract', 'self_check_pay', 'self_check_order'],
'快递配置' => ['self_order_express_set_check'],
......
......@@ -10,7 +10,7 @@ return [
'search'=> 'http://' . env('LOGIN_DOMAIN', '') . '/api/search',
],
'domain' => 'liexin.com',
'domain' => 'liexin.net',
// 订单系统
'order_url' => 'http://order.liexin.net',
......
......@@ -12,6 +12,7 @@
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
sale_type = $('#sale_type').data('default'),
order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
......@@ -44,6 +45,10 @@
listUrl += '&order_status=' + order_status;
}
if (sale_type) {
listUrl += '&sale_type=' + sale_type;
}
if (order_send) {
listUrl += '&order_send=' + order_send;
}
......@@ -76,7 +81,7 @@
listUrl += '&test_order=' + 1;
}
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && (is_new === '') && !test_order.is(':checked')) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && (is_new === '') && !test_order.is(':checked')) {
listUrl = '/self_order';
}
......@@ -90,6 +95,7 @@
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
sale_type = $('#sale_type').data('default'),
order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
......@@ -99,12 +105,12 @@
test_order = $('input[name=test_order]');
if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !test_order.is(':checked')) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
} else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
......@@ -124,7 +130,7 @@
test_order = '';
}
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&order_invoice_status='+order_invoice_status+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&order_goods_type='+2;
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&sale_type='+sale_type+'&order_invoice_status='+order_invoice_status+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&order_goods_type='+2;
})
// 选择查看测试订单
......
......@@ -49,7 +49,10 @@
<td class="check-select">
<label><input class="order_all_pay" type="radio" name="order_pay_type" value="1">全额付款</label>
<label><input class="order_advance_pay" type="radio" name="order_pay_type" value="2">预付首款</label>
<!-- 销售类型为现卖时展示 -->
@if ($order_info['sale_type'] == 1)
<label><input class="order_account_period" type="radio" name="order_pay_type" value="3">账期</label>
@endif
</td>
</tr>
<tr>
......@@ -86,6 +89,11 @@
<th>型号</th>
<th>调整数量</th>
<th>调整单价</th>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<th>交期时间/天</th>
<th>锁定库存</th>
@endif
</thead>
<tbody>
......@@ -104,6 +112,15 @@
<td>
<input class="price only_number" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" value="{{$v['goods_price']}}">
</td>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<td>
<input type="text" class="num" value="">
</td>
<td>
</td>
@endif
</tr>
@endforeach
</tbody>
......@@ -111,7 +128,8 @@
<?php $extend_fee_items = json_decode($order_temp_info['extend_fee_items'], true); ?>
@if ($extend_fee_items)
<!-- 供应商附加费存在且销售类型为现卖,则展示下面 -->
@if ($extend_fee_items && $order_info['sale_type'] == 1)
<hr/>
<p>附加费设置</p>
<table class="table table-bordered table-hover extend-fee-table">
......@@ -163,6 +181,8 @@
<td><p class="text-danger">{{$currency}}<span class="goods_total">{{$order_price_info['goods_price']}}</span></p></td>
</tr>
<!-- 销售类型为现卖时展示 -->
@if ($order_info['sale_type'] == 1)
<tr>
<th width="20%">附加费金额</th>
<td>
......@@ -171,6 +191,7 @@
</td>
<!-- <td><input type="text" name="extra_fee" autocomplete="off" value="{{$order_price_info['ext_price']}}" class="only_number"></td> -->
</tr>
@endif
<!-- <tr>
<th>说明</th>
......
......@@ -579,7 +579,7 @@
<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']])}}" class="btn btn-default">人工审单</a>
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}">人工审单</a>
@endif
@if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms))
......@@ -610,11 +610,16 @@
<div class="tabs-box">
<!-- 判断状态和权限 -->
@if ($order_info['status'] == 1 && in_array('add_offline_audit', $userPerms))
<a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}" class="btn btn-default">审单</a>
<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>
@endif
@if (in_array($order_info['status'], [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']}}" class="btn btn-default">取消订单</a>
<a class="btn btn-default self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a>
@endif
@if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms))
......@@ -622,12 +627,12 @@
@endif
@if ($order_info['status'] == 4 && in_array('self_order_express', $userPerms))
<a class="btn btn-default self_express" href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default">填写快递单</a>
<a class="btn btn-default self_express" href="javascript:;" data-id="{{$order_info['order_id']}}">填写快递单</a>
@endif
<!-- 订单状态大于4,且处于开票状态,且存在权限 -->
@if ($order_info['status'] >= 4 && $order_invoice_info['inv_type'] > 1 && in_array('self_order_invoice_express', $userPerms))
<a class="btn btn-default self_invoice_express" data-id="{{$order_info['order_id']}}" href="javascript:;" class="btn btn-default">填写发票快递</a>
<a class="btn btn-default self_invoice_express" data-id="{{$order_info['order_id']}}" href="javascript:;">填写发票快递</a>
@endif
</div>
......
......@@ -48,6 +48,18 @@
</dd>
</dl>
<dl>
<dt>销售类型:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['sale_type']}}" id="sale_type" name="sale_type">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">现卖</li>
<li data-val="2">预售</li>
</ul>
</div>
</dd>
</dl>
<dl>
<dt>客服:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['order_send']}}" id="order_send" name="order_send" >
......@@ -166,6 +178,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>
<th class="pl30">发货状态</th>
......@@ -206,6 +219,7 @@
}
?>
</td>
<td>{{$v['sale_type'] == 1 ? '现卖' : '预售'}}</td>
<td class="show-list"><?php print_r(App\Http\Controllers\getPayName($v['order_id'])); ?></td>
......
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