Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9ca54f82
authored
Sep 17, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整列表按钮
parent
7fb57c7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1007 additions
and
999 deletions
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
resources/views/orderlist/content.blade.php
View file @
9ca54f82
<div
class=
"wrapper"
>
@include('layouts.header')
<div
class=
"page-content"
>
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">平台订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"1"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
<table
style=
"width:100%"
>
<tr>
<td>
<dl>
<dt>
查询类型:
</dt>
<dd
style=
"width:auto !important;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_type']}}"
id=
"order_type"
name=
"order_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"order_type_tab active"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
</ul>
</div>
</dd>
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
<input
type=
"text"
name=
"order_sn"
value=
"{{$condition['order_sn']}}"
placeholder=
"请输入订单编号"
>
</dd>
</dl>
<dl>
<dt>
ERP订单号:
</dt>
<dd>
<input
type=
"text"
name=
"erp_sn"
value=
"{{$condition['erp_sn']}}"
placeholder=
"请输入ERP订单号"
>
</dd>
</dl>
<dl>
<dd
style=
"width: 110px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['select_time_type']}}"
id=
"select_time_type"
name=
"select_time_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"select_time_type_tab active"
data-val=
""
>
创建日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"1"
>
审核日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"2"
>
收款日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"3"
>
发货日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"4"
>
订单完成
</li>
</ul>
</div>
</dd>
<!-- <dt>创建日期: </dt> -->
<dd
style=
"width: 120px;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
style=
"width: 140px;"
/>
</dd>
<dd
style=
"width: 120px; margin-left: 20px;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
订单状态:
</dt>
<dd>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control order_status selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_status'))
@foreach (Config('params.order_status') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
付款类型:
</dt>
<dd>
<select
id=
"order_pay_type"
name=
"order_pay_type"
class=
"form-control order_pay_type selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_pay_type'))
@foreach (Config('params.order_pay_type') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
配送方式:
</dt>
<dd>
<select
id=
"shipping_name"
name=
"shipping_name"
class=
"form-control shipping_name selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
快递配送
</option>
<option
value=
"2"
>
自提
</option>
</select>
</dd>
</dl>
<dl>
<dt>
支付方式:
</dt>
<dd>
<select
id=
"order_payment_mode"
name=
"order_payment_mode"
class=
"form-control order_payment_mode selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_paid_name'))
@foreach (Config('params.order_paid_name') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<!-- <dl>
<dt>支付状态:</dt>
<dd>
<div class="droplist" data-default="{$condition['order_pay_status']}" id="order_pay_status" name="order_pay_status" >
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">已支付</li>
<li data-val="2">已付定金</li>
<li data-val="3">未支付</li>
</ul>
</div>
</dd>
</dl> -->
@if ($username != 'vpadmin@ichunt.com')
<dl>
<dt>
订单来源:
</dt>
<dd>
<select
id=
"order_source_pf"
name=
"order_source_pf"
class=
"form-control order_source_pf selectpicker"
title=
"全部"
multiple
>
<option
value=
"1"
>
PC端
</option>
<option
value=
"2"
>
移动端
</option>
<option
value=
"3"
>
后台
</option>
<option
value=
"4"
>
京东
</option>
<option
value=
"5"
>
ERP
</option>
<option
value=
"6"
>
小程序
</option>
<option
value=
"7"
>
开放平台
</option>
</select>
</dd>
</dl>
@endif
<!-- 非'查看自己'权限展示 -->
@if (!in_array($role, [3]))
<dl>
<dt>
推送业务员:
</dt>
<dd>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-size=
"7"
multiple
>
<!-- <option value="">全部</option> -->
<option
value=
"0"
>
无推送
</option>
<optgroup
label=
"在职"
>
@foreach ($sale_list as $v)
@if ($v->status != 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
<optgroup
label=
"离职"
>
@foreach ($sale_list as $v)
@if ($v->status == 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
</select>
</dd>
</dl>
<dl>
<dt>
adtag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_adtag"
value=
"{{$condition['order_source_adtag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
ptag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_ptag"
value=
"{{$condition['order_source_ptag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
@if ($username != 'vpadmin@ichunt.com')
<dl>
<dt>
同步状态:
</dt>
<dd>
<select
id=
"erp_order_id"
name=
"erp_order_id"
class=
"form-control erp_order_id selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
已同步
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
用户标签:
</dt>
<dd>
<select
id=
"is_new"
name=
"is_new"
class=
"form-control is_new selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
用户
</option>
<option
value=
"1"
>
新客户
</option>
<option
value=
"2"
>
老客户
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
新订单:
</dt>
<dd>
<select
id=
"is_new_order"
name=
"is_new_order"
class=
"form-control is_new_order selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms))
<dl>
<dt></dt>
<dd
class=
"test-order"
>
<label><input
type=
"checkbox"
name=
"test_order"
>
所有订单-包括测试
</label>
</dd>
</dl>
@endif
</td>
</tr>
</table>
<div
class=
"text-center"
>
<div
class=
"search-btn"
>
<button
class=
"nbtn searchOrder"
>
搜索
</button>
@if (in_array('export', $userPerms))
<button
class=
"nbtn exportExcel"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
@endif
</div>
</div>
</div>
</div>
</div>
<div
class=
"row-fluid table-responsive"
>
<table
class=
"table table-hover text-nowrap"
>
<thead>
<tr>
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
公司
</th>
<th
class=
"pl30"
>
订单编号
</th>
<th
class=
"pl30"
>
ERP单号
</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>
@if ($username != 'vpadmin@ichunt.com')
<th
class=
"pl30"
>
订单来源
</th>
<!-- <th class="pl30">同步状态</th> -->
<th
class=
"pl30"
>
收货人
</th>
@endif
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
</thead>
@if (empty($list))
<tr>
<td
class=
"text-center"
colspan=
"14"
>
没有查询到相关记录~
</td>
</tr>
@else
<tbody>
@foreach ($list as $v)
<tr
data-oid=
"{{ $v['order_id'] }}"
data-type=
"1"
>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getAccountName
(
$v
[
'user_id'
]));
?>
</td>
<td
class=
"show-list"
>
@if ($v['order_type'] == 1)
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
<?php
$order_extend
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
]);
?>
<td
class=
"show-list"
>
{{ $order_extend ? $order_extend->erp_sn : '' }}
</td>
<td
class=
"show-list"
>
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'status'
])
{
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'status'
]
>=
1
&&
isset
(
$order_extend
->
is_manager_audit
))
{
switch
(
$order_extend
->
is_manager_audit
)
{
case
1
:
echo
'<span class="list-text-checking"><b>未申请</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-success"><b>已审核</b></span>'
;
break
;
default
:
echo
''
;
break
;
}
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
@if ($username != 'vpadmin@ichunt.com')
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
]);
?>
</td>
<!-- <td class="show-list">
<?php
// if (in_array($v['status'], [-1, 1])) {
// echo '不需同步';
// } else {
// echo $v['erp_order_id'] != '' && $v['erp_order_id'] != '-' ? '<span class="list-text-success"><b>已同步</b></span>' : '<span class="list-text-checking"><b>未同步</b></span>';
// }
?>
</td> -->
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderAddress
(
$v
[
'order_id'
]);
?>
</td>
@endif
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
<div
class=
"btn-group btn-group-xs"
style=
"min-width: 200px;"
>
@if (in_array('check_order', $userPerms)
&&
$v['sale_id'])
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit != 3
&&
in_array($v['status'], [1, 2]))
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
@elseif ($v['status'] == 2
&&
$order_extend->is_manager_audit == 3
&&
in_array($role, [1, 2]))
<a
class=
"btn btn-success re-audit"
data-id=
"{{$v['order_id']}}"
>
反审
</a>
@endif
@endif
<!-- 申请主管审核 -->
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit == 1)
<a
class=
"btn btn-info apply-manager-audit"
data-id=
"{{$v['order_id']}}"
>
申请主管审核
</a>
@endif
<!-- 待主管审核 && 主管角色 && 未同步 -->
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit == 2
&&
in_array($role, [1, 2])
&&
empty($order_extend->erp_sn))
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$v['order_id']}}"
>
主管审核
</a>
@endif
@if (!empty($order_extend->erp_sn)
&&
in_array($v['status'], [2, 3, 4]))
@if ($order_extend->is_send_mail)
<a
class=
"btn btn-danger send_mail"
data-id=
"{{ $v['order_id'] }}"
>
再次发送邮件
</a>
@else
<a
class=
"btn btn-warning send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
@endif
@endif
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
详情
</a>
<!-- 管理员和经理或有推送权限显示 -->
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
<a
class=
"btn btn-info"
href=
"{{URL('sendSales', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
推送客服
</a>
@endif
@if ($v['status'] > 1
&&
in_array('download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
<?php
// $extend = App\Http\Controllers\getOrderExtend($v['order_id'], 'upload_contract_url');
// if (!empty($extend->upload_contract_url)) {
// echo '<a class="btn btn-warning" href="'.$extend->upload_contract_url.'" target="_blank">客户合同下载</a>';
// }
?>
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr
class=
"show-other-content"
>
<td
colspan=
"14"
>
<table
class=
"table table-hover table-bordered list-item-table"
>
<thead>
<tr
class=
"caption"
>
<th>
型号
</th>
<th>
制造商
</th>
<th>
购买数量
</th>
<th>
购买时单价
</th>
<th>
均摊后单价
</th>
<th>
小计
</th>
<th>
供应商
</th>
<th>
交期
</th>
<th
colspan=
"5"
>
生产跟踪
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
</tr>
@endforeach
</tbody>
@endif
</table>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"show-list-info"
>
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<?php
echo
$page
;
?>
</div>
</div>
</div>
<script>
var
test_order
=
"{{$condition['test_order']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_payment_mode
=
"{{$condition['order_payment_mode']}}"
;
var
order_source_pf
=
"{{$condition['order_source_pf']}}"
;
var
shipping_name
=
"{{$condition['shipping_name']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
erp_order_id
=
"{{$condition['erp_order_id']}}"
;
var
is_new_order
=
"{{$condition['is_new_order']}}"
;
var
manager
=
"{{$role}}"
;
var
cc_sales
=
eval
(
'{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'
);
// 抄送人集合
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
}
$
(
".order_status, .order_payment_mode, .order_source_pf"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
countSelectedText
:
"已选中{0}项"
,
selectedTextFormat
:
"count > 5"
,
selectAllText
:
'全选'
,
deselectAllText
:
'取消全选'
,
})
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_payment_mode'
).
selectpicker
(
'val'
,
order_payment_mode
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_source_pf'
).
selectpicker
(
'val'
,
order_source_pf
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#shipping_name'
).
selectpicker
(
'val'
,
shipping_name
);
// $('#order_send').selectpicker('val', order_send);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_pay_type'
).
selectpicker
(
'val'
,
order_pay_type
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.is_new'
).
selectpicker
(
'val'
,
is_new
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#erp_order_id'
).
selectpicker
(
'val'
,
erp_order_id
);
$
(
'#is_new_order'
).
selectpicker
(
'val'
,
is_new_order
);
$
.
lie
.
order
.
index
();
$
.
lie
.
track
.
orderTrack
();
$
.
lie
.
cancel
.
cancelorder
();
$
.
lie
.
audit
.
index
();
$
.
lie
.
send_mail
.
index
();
// 展开菜单
$
(
'#side-menu'
).
children
(
'li'
).
eq
(
1
).
addClass
(
'active'
);
$
(
'#side-menu'
).
children
(
'li'
).
eq
(
1
).
children
(
'ul'
).
children
(
'li'
).
eq
(
0
).
addClass
(
'active'
);
<div
class=
"wrapper"
>
@include('layouts.header')
<div
class=
"page-content"
>
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">平台订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"1"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
<table
style=
"width:100%"
>
<tr>
<td>
<dl>
<dt>
查询类型:
</dt>
<dd
style=
"width:auto !important;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_type']}}"
id=
"order_type"
name=
"order_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"order_type_tab active"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
</ul>
</div>
</dd>
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
<input
type=
"text"
name=
"order_sn"
value=
"{{$condition['order_sn']}}"
placeholder=
"请输入订单编号"
>
</dd>
</dl>
<dl>
<dt>
ERP订单号:
</dt>
<dd>
<input
type=
"text"
name=
"erp_sn"
value=
"{{$condition['erp_sn']}}"
placeholder=
"请输入ERP订单号"
>
</dd>
</dl>
<dl>
<dd
style=
"width: 110px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['select_time_type']}}"
id=
"select_time_type"
name=
"select_time_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"select_time_type_tab active"
data-val=
""
>
创建日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"1"
>
审核日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"2"
>
收款日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"3"
>
发货日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"4"
>
订单完成
</li>
</ul>
</div>
</dd>
<!-- <dt>创建日期: </dt> -->
<dd
style=
"width: 120px;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
style=
"width: 140px;"
/>
</dd>
<dd
style=
"width: 120px; margin-left: 20px;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
订单状态:
</dt>
<dd>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control order_status selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_status'))
@foreach (Config('params.order_status') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
付款类型:
</dt>
<dd>
<select
id=
"order_pay_type"
name=
"order_pay_type"
class=
"form-control order_pay_type selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_pay_type'))
@foreach (Config('params.order_pay_type') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
配送方式:
</dt>
<dd>
<select
id=
"shipping_name"
name=
"shipping_name"
class=
"form-control shipping_name selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
快递配送
</option>
<option
value=
"2"
>
自提
</option>
</select>
</dd>
</dl>
<dl>
<dt>
支付方式:
</dt>
<dd>
<select
id=
"order_payment_mode"
name=
"order_payment_mode"
class=
"form-control order_payment_mode selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_paid_name'))
@foreach (Config('params.order_paid_name') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<!-- <dl>
<dt>支付状态:</dt>
<dd>
<div class="droplist" data-default="{$condition['order_pay_status']}" id="order_pay_status" name="order_pay_status" >
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">已支付</li>
<li data-val="2">已付定金</li>
<li data-val="3">未支付</li>
</ul>
</div>
</dd>
</dl> -->
@if ($username != 'vpadmin@ichunt.com')
<dl>
<dt>
订单来源:
</dt>
<dd>
<select
id=
"order_source_pf"
name=
"order_source_pf"
class=
"form-control order_source_pf selectpicker"
title=
"全部"
multiple
>
<option
value=
"1"
>
PC端
</option>
<option
value=
"2"
>
移动端
</option>
<option
value=
"3"
>
后台
</option>
<option
value=
"4"
>
京东
</option>
<option
value=
"5"
>
ERP
</option>
<option
value=
"6"
>
小程序
</option>
<option
value=
"7"
>
开放平台
</option>
</select>
</dd>
</dl>
@endif
<!-- 非'查看自己'权限展示 -->
@if (!in_array($role, [3]))
<dl>
<dt>
推送业务员:
</dt>
<dd>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-size=
"7"
multiple
>
<!-- <option value="">全部</option> -->
<option
value=
"0"
>
无推送
</option>
<optgroup
label=
"在职"
>
@foreach ($sale_list as $v)
@if ($v->status != 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
<optgroup
label=
"离职"
>
@foreach ($sale_list as $v)
@if ($v->status == 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
</select>
</dd>
</dl>
<dl>
<dt>
adtag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_adtag"
value=
"{{$condition['order_source_adtag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
ptag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_ptag"
value=
"{{$condition['order_source_ptag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
@if ($username != 'vpadmin@ichunt.com')
<dl>
<dt>
同步状态:
</dt>
<dd>
<select
id=
"erp_order_id"
name=
"erp_order_id"
class=
"form-control erp_order_id selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
已同步
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
用户标签:
</dt>
<dd>
<select
id=
"is_new"
name=
"is_new"
class=
"form-control is_new selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
用户
</option>
<option
value=
"1"
>
新客户
</option>
<option
value=
"2"
>
老客户
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
新订单:
</dt>
<dd>
<select
id=
"is_new_order"
name=
"is_new_order"
class=
"form-control is_new_order selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms))
<dl>
<dt></dt>
<dd
class=
"test-order"
>
<label><input
type=
"checkbox"
name=
"test_order"
>
所有订单-包括测试
</label>
</dd>
</dl>
@endif
</td>
</tr>
</table>
<div
class=
"text-center"
>
<div
class=
"search-btn"
>
<button
class=
"nbtn searchOrder"
>
搜索
</button>
@if (in_array('export', $userPerms))
<button
class=
"nbtn exportExcel"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
@endif
</div>
</div>
</div>
</div>
</div>
<div
class=
"row-fluid table-responsive"
>
<table
class=
"table table-hover text-nowrap"
>
<thead>
<tr>
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
公司
</th>
<th
class=
"pl30"
>
订单编号
</th>
<th
class=
"pl30"
>
ERP单号
</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>
@if ($username != 'vpadmin@ichunt.com')
<th
class=
"pl30"
>
订单来源
</th>
<!-- <th class="pl30">同步状态</th> -->
<th
class=
"pl30"
>
收货人
</th>
@endif
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
</thead>
@if (empty($list))
<tr>
<td
class=
"text-center"
colspan=
"14"
>
没有查询到相关记录~
</td>
</tr>
@else
<tbody>
@foreach ($list as $v)
<tr
data-oid=
"{{ $v['order_id'] }}"
data-type=
"1"
>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getAccountName
(
$v
[
'user_id'
]));
?>
</td>
<td
class=
"show-list"
>
@if ($v['order_type'] == 1)
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
<?php
$order_extend
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
]);
?>
<td
class=
"show-list"
>
{{ $order_extend ? $order_extend->erp_sn : '' }}
</td>
<td
class=
"show-list"
>
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'status'
])
{
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'status'
]
>=
1
&&
isset
(
$order_extend
->
is_manager_audit
))
{
switch
(
$order_extend
->
is_manager_audit
)
{
case
1
:
echo
'<span class="list-text-checking"><b>未申请</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-success"><b>已审核</b></span>'
;
break
;
default
:
echo
''
;
break
;
}
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
@if ($username != 'vpadmin@ichunt.com')
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
]);
?>
</td>
<!-- <td class="show-list">
<?php
// if (in_array($v['status'], [-1, 1])) {
// echo '不需同步';
// } else {
// echo $v['erp_order_id'] != '' && $v['erp_order_id'] != '-' ? '<span class="list-text-success"><b>已同步</b></span>' : '<span class="list-text-checking"><b>未同步</b></span>';
// }
?>
</td> -->
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderAddress
(
$v
[
'order_id'
]);
?>
</td>
@endif
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
<style>
.list-btn
a
{
margin-top
:
5px
;
margin-left
:
5px
;
}
</style>
<div
class=
"btn-group btn-group-xs list-btn"
style=
"min-width: 240px;"
>
@if (in_array('check_order', $userPerms)
&&
$v['sale_id'])
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit != 3
&&
in_array($v['status'], [1, 2]))
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
@elseif ($v['status'] == 2
&&
$order_extend->is_manager_audit == 3
&&
in_array($role, [1, 2]))
<a
class=
"btn btn-success re-audit"
data-id=
"{{$v['order_id']}}"
>
反审
</a>
@endif
@endif
<!-- 申请主管审核 -->
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit == 1)
<a
class=
"btn btn-info apply-manager-audit"
data-id=
"{{$v['order_id']}}"
>
申请主管审核
</a>
@endif
<!-- 待主管审核 && 主管角色 && 未同步 -->
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit == 2
&&
in_array($role, [1, 2])
&&
empty($order_extend->erp_sn))
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$v['order_id']}}"
>
主管审核
</a>
@endif
@if (!empty($order_extend->erp_sn)
&&
in_array($v['status'], [2, 3, 4]))
@if ($order_extend->is_send_mail)
<a
class=
"btn btn-danger send_mail"
data-id=
"{{ $v['order_id'] }}"
>
再次发送邮件
</a>
@else
<a
class=
"btn btn-warning send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
@endif
@endif
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
详情
</a>
<!-- 管理员和经理或有推送权限显示 -->
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
<a
class=
"btn btn-info"
href=
"{{URL('sendSales', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
推送客服
</a>
@endif
@if ($v['status'] > 1
&&
in_array('download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
<?php
// $extend = App\Http\Controllers\getOrderExtend($v['order_id'], 'upload_contract_url');
// if (!empty($extend->upload_contract_url)) {
// echo '<a class="btn btn-warning" href="'.$extend->upload_contract_url.'" target="_blank">客户合同下载</a>';
// }
?>
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr
class=
"show-other-content"
>
<td
colspan=
"14"
>
<table
class=
"table table-hover table-bordered list-item-table"
>
<thead>
<tr
class=
"caption"
>
<th>
型号
</th>
<th>
制造商
</th>
<th>
购买数量
</th>
<th>
购买时单价
</th>
<th>
均摊后单价
</th>
<th>
小计
</th>
<th>
供应商
</th>
<th>
交期
</th>
<th
colspan=
"5"
>
生产跟踪
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
</tr>
@endforeach
</tbody>
@endif
</table>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"show-list-info"
>
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<?php
echo
$page
;
?>
</div>
</div>
</div>
<script>
var
test_order
=
"{{$condition['test_order']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_payment_mode
=
"{{$condition['order_payment_mode']}}"
;
var
order_source_pf
=
"{{$condition['order_source_pf']}}"
;
var
shipping_name
=
"{{$condition['shipping_name']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
erp_order_id
=
"{{$condition['erp_order_id']}}"
;
var
is_new_order
=
"{{$condition['is_new_order']}}"
;
var
manager
=
"{{$role}}"
;
var
cc_sales
=
eval
(
'{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'
);
// 抄送人集合
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
}
$
(
".order_status, .order_payment_mode, .order_source_pf"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
countSelectedText
:
"已选中{0}项"
,
selectedTextFormat
:
"count > 5"
,
selectAllText
:
'全选'
,
deselectAllText
:
'取消全选'
,
})
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_payment_mode'
).
selectpicker
(
'val'
,
order_payment_mode
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_source_pf'
).
selectpicker
(
'val'
,
order_source_pf
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#shipping_name'
).
selectpicker
(
'val'
,
shipping_name
);
// $('#order_send').selectpicker('val', order_send);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_pay_type'
).
selectpicker
(
'val'
,
order_pay_type
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.is_new'
).
selectpicker
(
'val'
,
is_new
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#erp_order_id'
).
selectpicker
(
'val'
,
erp_order_id
);
$
(
'#is_new_order'
).
selectpicker
(
'val'
,
is_new_order
);
$
.
lie
.
order
.
index
();
$
.
lie
.
track
.
orderTrack
();
$
.
lie
.
cancel
.
cancelorder
();
$
.
lie
.
audit
.
index
();
$
.
lie
.
send_mail
.
index
();
// 展开菜单
$
(
'#side-menu'
).
children
(
'li'
).
eq
(
1
).
addClass
(
'active'
);
$
(
'#side-menu'
).
children
(
'li'
).
eq
(
1
).
children
(
'ul'
).
children
(
'li'
).
eq
(
0
).
addClass
(
'active'
);
</script>
\ No newline at end of file
resources/views/selfOrder/content.blade.php
View file @
9ca54f82
<div
class=
"wrapper"
>
@include('layouts.header')
<div
class=
"page-content"
>
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">自营订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"2"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
<table
style=
"width:100%"
>
<tr>
<td>
<dl>
<dt>
查询类型:
</dt>
<dd
style=
"width:auto !important;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_type']}}"
id=
"order_type"
name=
"order_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"order_type_tab active"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
<li
class=
"order_type_tab"
data-val=
"3"
>
发票抬头
</li>
</ul>
</div>
</dd>
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
<input
type=
"text"
name=
"order_sn"
value=
"{{$condition['order_sn']}}"
placeholder=
"请输入订单编号"
>
</dd>
</dl>
<dl>
<dt>
ERP订单号:
</dt>
<dd>
<input
type=
"text"
name=
"erp_sn"
value=
"{{$condition['erp_sn']}}"
placeholder=
"请输入ERP订单号"
>
</dd>
</dl>
<dl>
<dd
style=
"width: 110px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['select_time_type']}}"
id=
"select_time_type"
name=
"select_time_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"select_time_type_tab active"
data-val=
""
>
创建日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"1"
>
审核日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"2"
>
收款日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"3"
>
发货日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"4"
>
订单完成
</li>
</ul>
</div>
</dd>
<!-- <dt>创建日期: </dt> -->
<dd
style=
"width: 120px;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
style=
"width: 140px;"
/>
</dd>
<dd
style=
"width: 120px; margin-left: 20px;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
订单状态:
</dt>
<dd>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control order_status selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_status'))
@foreach (Config('params.order_status') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
付款类型:
</dt>
<dd>
<select
id=
"order_pay_type"
name=
"order_pay_type"
class=
"form-control order_pay_type selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
全款
</option>
<option
value=
"3"
>
账期
</option>
</select>
</dd>
</dl>
<dl>
<dt>
销售类型:
</dt>
<dd>
<select
id=
"sale_type"
name=
"sale_type"
class=
"form-control sale_type selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
现卖
</option>
<option
value=
"2"
>
预售
</option>
</select>
</dd>
</dl>
<dl>
<dt>
支付方式:
</dt>
<dd>
<select
id=
"order_payment_mode"
name=
"order_payment_mode"
class=
"form-control order_payment_mode selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_paid_name'))
@foreach (Config('params.order_paid_name') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<!-- 京东自营角色不显示订单来源 -->
@if ($role != 6)
<dl>
<dt>
订单来源:
</dt>
<dd>
<select
id=
"order_source_pf"
name=
"order_source_pf"
class=
"form-control order_source_pf selectpicker"
title=
"全部"
multiple
>
<option
value=
"1"
>
PC端
</option>
<option
value=
"2"
>
移动端
</option>
<option
value=
"3"
>
后台
</option>
<option
value=
"4"
>
京东
</option>
<option
value=
"6"
>
小程序
</option>
<option
value=
"7"
>
象牙宝
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
发票类型:
</dt>
<dd>
<select
id=
"order_invoice_status"
name=
"order_invoice_status"
class=
"form-control order_invoice_status selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
未开票
</option>
<option
value=
"2"
>
已开普票
</option>
<option
value=
"3"
>
已开专票
</option>
</select>
</dd>
</dl>
@if (!in_array($role, [7, 15, 17, 19]))
<dl>
<dt>
客服:
</dt>
<dd>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-size=
"7"
multiple
>
<!-- <option value="">全部</option> -->
<option
value=
"0"
>
无推送
</option>
<optgroup
label=
"在职"
>
@foreach ($sale_list as $v)
@if ($v->status != 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
<optgroup
label=
"离职"
>
@foreach ($sale_list as $v)
@if ($v->status == 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
</select>
</dd>
</dl>
<dl>
<dt>
adtag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_adtag"
value=
"{{$condition['order_source_adtag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
ptag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_ptag"
value=
"{{$condition['order_source_ptag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
用户标签:
</dt>
<dd>
<select
id=
"is_new"
name=
"is_new"
class=
"form-control is_new selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
用户
</option>
<option
value=
"1"
>
新客户
</option>
<option
value=
"2"
>
老客户
</option>
</select>
</dd>
</dl>
@endif
<!-- <dl>
<dt>新订单:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['is_new_order']}}" id="is_new_order" name="is_new_order">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">是</li>
<li data-val="0">否</li>
</ul>
</div>
</dd>
</dl> -->
<dl>
<dt>
业务类型:
</dt>
<dd>
<select
id=
"business_type"
name=
"business_type"
class=
"form-control business_type selectpicker"
title=
"全部"
multiple
>
@if (Config('params.business_type'))
@foreach (Config('params.business_type') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
订单类型:
</dt>
<dd>
<select
id=
"order_type_extend"
name=
"order_type_extend"
class=
"form-control order_type_extend selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
普通订单
</option>
<option
value=
"1"
>
团购订单
</option>
</select>
</dd>
</dl>
<dl>
<dt>
团购状态:
</dt>
<dd>
<select
id=
"status_extend"
name=
"status_extend"
class=
"form-control status_extend selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"-16"
>
团购失败
</option>
<option
value=
"10"
>
团购中
</option>
<option
value=
"16"
>
团购完成
</option>
</select>
</dd>
</dl>
@if (in_array('self_check_test_order', $userPerms))
<dl>
<dt></dt>
<dd
class=
"test-order"
>
<label><input
type=
"checkbox"
name=
"test_order"
>
所有订单-包括测试
</label>
</dd>
</dl>
@endif
</td>
</tr>
</table>
<div
class=
"text-center"
>
<div
class=
"search-btn"
>
<button
class=
"nbtn search_self_order"
>
搜索
</button>
@if (in_array('self_order_export', $userPerms))
<button
class=
"nbtn self_export"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
@endif
</div>
</div>
</div>
</div>
</div>
<div
class=
"row-fluid table-responsive"
>
<table
class=
"table table-hover text-nowrap"
>
<thead>
<tr>
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
公司
</th>
<th
class=
"pl30"
>
订单编号
</th>
<th
class=
"pl30"
>
ERP单号
</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>
<th
class=
"pl30"
>
订单来源
</th>
<th
class=
"pl30"
>
发货状态
</th>
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
</thead>
@if (empty($list))
<tr>
<td
class=
"text-center"
colspan=
"13"
>
没有查询到相关记录~
</td>
</tr>
@else
<tbody>
@foreach ($list as $v)
<tr
data-oid=
"{{ $v['order_id'] }}"
data-type=
"2"
>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getAccountName
(
$v
[
'user_id'
]));
?>
@if (isset($credit[$v['user_id']])
&&
$credit[$v['user_id']])
<span>
(账期)
</span>
@endif
</td>
<td
class=
"show-list"
>
@if ($v['order_type'] == 1)
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
<?php
$order_extend
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
]);
?>
<td
class=
"show-list"
>
{{ $order_extend ? $order_extend->erp_sn : '' }}
</td>
<td
class=
"show-list"
>
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'order_type_extend'
]
==
1
&&
$v
[
'status'
]
==
4
)
{
// 团购订单状态
switch
(
$v
[
'status_extend'
])
{
case
-
16
:
echo
'<span class="list-text-cancel"><b>团购失败</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-send"><b>团购中</b></span>'
;
break
;
case
16
:
echo
'<span class="list-text-success"><b>团购成功</b></span>'
;
break
;
}
}
else
{
switch
(
$v
[
'status'
])
{
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
{{$v['sale_type'] == 1 ? '现卖' : '预售'}}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
],
2
);
?>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
$shipping
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
$shippingStatus
=
''
;
$shippingNo
=
''
;
if
(
$shipping
)
{
foreach
(
$shipping
as
$s
)
{
switch
(
$s
->
status
)
{
case
0
:
case
1
:
$shippingStatus
.=
'已配送, '
;
break
;
case
2
:
$shippingStatus
.=
'已签收, '
;
break
;
default
:
$shippingStatus
.=
'未配送, '
;
break
;
}
$shippingNo
.=
$s
->
shipping_no
?
$s
->
shipping_no
.
', '
:
''
;
}
$shippingStatus
=
substr
(
$shippingStatus
,
0
,
-
2
);
}
echo
$shippingStatus
;
?>
</td>
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
<div
class=
"btn-group btn-group-xs"
style=
"width: 240px;"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2])
&&
$v['sale_id'])
<a
class=
"btn btn-success"
href=
"/change/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
人工审单
</a>
@endif
<!-- 管理员和自营客服主管或有推送权限显示 -->
@if ((in_array($role, [1, 10]) || in_array('self_send_salesman', $userPerms)))
<a
class=
"btn btn-info"
href=
"/sendSales/{{ $v['order_id'] }}?tags=self"
target=
"_blank"
>
推送客服
</a>
@endif
@if ($v['status'] > 1
&&
in_array('self_order_download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
@if (in_array($v['status'], [4, 7]))
<a
class=
"btn btn-warning push-wms"
data-sn=
"{{$v['order_sn']}}"
href=
"javascript:;"
>
推送WMS
</a>
@endif
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr
class=
"show-other-content"
>
<td
colspan=
"14"
>
<table
class=
"table table-hover table-bordered list-item-table"
>
<thead>
<tr
class=
"caption"
>
<th>
型号
</th>
<th>
制造商
</th>
<th>
购买数量
</th>
<th>
购买时单价
</th>
<th>
均摊后单价
</th>
<th>
小计
</th>
<th
colspan=
"5"
>
交期
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
</tr>
@endforeach
</tbody>
@endif
</table>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"show-list-info"
>
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<?php
echo
$page
;
?>
</div>
</div>
</div>
<script>
var
test_order
=
"{{$condition['test_order']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
sale_type
=
"{{$condition['sale_type']}}"
;
var
order_payment_mode
=
"{{$condition['order_payment_mode']}}"
;
var
business_type
=
"{{$condition['business_type']}}"
;
var
order_source_pf
=
"{{$condition['order_source_pf']}}"
;
var
order_invoice_status
=
"{{$condition['order_invoice_status']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
order_type_extend
=
"{{$condition['order_type_extend']}}"
;
var
status_extend
=
"{{$condition['status_extend']}}"
;
var
manager
=
"{{$role}}"
;
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
}
$
(
".order_status, .order_payment_mode, .order_source_pf, .business_type"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
countSelectedText
:
"已选中{0}项"
,
selectedTextFormat
:
"count > 5"
,
selectAllText
:
'全选'
,
deselectAllText
:
'取消全选'
,
})
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#sale_type'
).
selectpicker
(
'val'
,
sale_type
);
$
(
'.order_payment_mode'
).
selectpicker
(
'val'
,
order_payment_mode
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_source_pf'
).
selectpicker
(
'val'
,
order_source_pf
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#order_invoice_status'
).
selectpicker
(
'val'
,
order_invoice_status
);
// $('#order_send').selectpicker('val', order_send);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
.
split
(
','
)).
trigger
(
"change"
);
// $('.order_pay_type').selectpicker('val', order_pay_type.split(',')).trigger("change");
$
(
'.order_pay_type'
).
selectpicker
(
'val'
,
order_pay_type
);
$
(
'.is_new'
).
selectpicker
(
'val'
,
is_new
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_type_extend'
).
selectpicker
(
'val'
,
order_type_extend
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.status_extend'
).
selectpicker
(
'val'
,
status_extend
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.business_type'
).
selectpicker
(
'val'
,
business_type
.
split
(
','
)).
trigger
(
"change"
);
$
.
lie
.
order
.
index
();
$
.
lie
.
track
.
orderTrack
();
$
.
lie
.
cancel
.
cancelorder
();
// 推送到WMS
$
(
'.push-wms'
).
click
(
function
()
{
var
order_sn
=
$
(
this
).
data
(
'sn'
);
layer
.
open
({
title
:
'推送WMS'
,
content
:
'确定推送到WMS吗?'
,
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
$
.
ajax
({
url
:
'/api/pushWms'
,
data
:
{
order_sn
:
order_sn
},
dataType
:
"json"
,
success
:
function
(
resp
)
{
layer
.
close
(
index
);
layer
.
msg
(
'成功'
);
}
});
},
btn2
:
function
(
index
)
{
layer
.
close
(
index
)
}
})
})
<div
class=
"wrapper"
>
@include('layouts.header')
<div
class=
"page-content"
>
<!-- <ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">自营订单</a></li>
</ul> -->
<input
type=
"hidden"
name=
"page_type"
id=
"page_type"
value=
"2"
>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
<table
style=
"width:100%"
>
<tr>
<td>
<dl>
<dt>
查询类型:
</dt>
<dd
style=
"width:auto !important;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_type']}}"
id=
"order_type"
name=
"order_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"order_type_tab active"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
<li
class=
"order_type_tab"
data-val=
"3"
>
发票抬头
</li>
</ul>
</div>
</dd>
<dd
class=
"order_contain"
><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
订单编号:
</dt>
<dd>
<input
type=
"text"
name=
"order_sn"
value=
"{{$condition['order_sn']}}"
placeholder=
"请输入订单编号"
>
</dd>
</dl>
<dl>
<dt>
ERP订单号:
</dt>
<dd>
<input
type=
"text"
name=
"erp_sn"
value=
"{{$condition['erp_sn']}}"
placeholder=
"请输入ERP订单号"
>
</dd>
</dl>
<dl>
<dd
style=
"width: 110px;"
>
<div
class=
"droplist"
data-default=
"{{$condition['select_time_type']}}"
id=
"select_time_type"
name=
"select_time_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"select_time_type_tab active"
data-val=
""
>
创建日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"1"
>
审核日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"2"
>
收款日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"3"
>
发货日期
</li>
<li
class=
"select_time_type_tab"
data-val=
"4"
>
订单完成
</li>
</ul>
</div>
</dd>
<!-- <dt>创建日期: </dt> -->
<dd
style=
"width: 120px;"
>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
autocomplete=
"off"
style=
"width: 140px;"
/>
</dd>
<dd
style=
"width: 120px; margin-left: 20px;"
>
<input
type=
"text"
name=
"time_end"
value=
"{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"结束时间"
autocomplete=
"off"
/>
</dd>
</dl>
<dl>
<dt>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
订单状态:
</dt>
<dd>
<select
id=
"order_status"
name=
"order_status"
class=
"form-control order_status selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_status'))
@foreach (Config('params.order_status') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
付款类型:
</dt>
<dd>
<select
id=
"order_pay_type"
name=
"order_pay_type"
class=
"form-control order_pay_type selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
全款
</option>
<option
value=
"3"
>
账期
</option>
</select>
</dd>
</dl>
<dl>
<dt>
销售类型:
</dt>
<dd>
<select
id=
"sale_type"
name=
"sale_type"
class=
"form-control sale_type selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
现卖
</option>
<option
value=
"2"
>
预售
</option>
</select>
</dd>
</dl>
<dl>
<dt>
支付方式:
</dt>
<dd>
<select
id=
"order_payment_mode"
name=
"order_payment_mode"
class=
"form-control order_payment_mode selectpicker"
title=
"全部"
multiple
>
@if (Config('params.order_paid_name'))
@foreach (Config('params.order_paid_name') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<!-- 京东自营角色不显示订单来源 -->
@if ($role != 6)
<dl>
<dt>
订单来源:
</dt>
<dd>
<select
id=
"order_source_pf"
name=
"order_source_pf"
class=
"form-control order_source_pf selectpicker"
title=
"全部"
multiple
>
<option
value=
"1"
>
PC端
</option>
<option
value=
"2"
>
移动端
</option>
<option
value=
"3"
>
后台
</option>
<option
value=
"4"
>
京东
</option>
<option
value=
"6"
>
小程序
</option>
<option
value=
"7"
>
象牙宝
</option>
</select>
</dd>
</dl>
@endif
<dl>
<dt>
发票类型:
</dt>
<dd>
<select
id=
"order_invoice_status"
name=
"order_invoice_status"
class=
"form-control order_invoice_status selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
未开票
</option>
<option
value=
"2"
>
已开普票
</option>
<option
value=
"3"
>
已开专票
</option>
</select>
</dd>
</dl>
@if (!in_array($role, [7, 15, 17, 19]))
<dl>
<dt>
客服:
</dt>
<dd>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
data-size=
"7"
multiple
>
<!-- <option value="">全部</option> -->
<option
value=
"0"
>
无推送
</option>
<optgroup
label=
"在职"
>
@foreach ($sale_list as $v)
@if ($v->status != 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
<optgroup
label=
"离职"
>
@foreach ($sale_list as $v)
@if ($v->status == 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
</select>
</dd>
</dl>
<dl>
<dt>
adtag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_adtag"
value=
"{{$condition['order_source_adtag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
ptag来源:
</dt>
<dd>
<input
type=
"text"
name=
"order_source_ptag"
value=
"{{$condition['order_source_ptag']}}"
placeholder=
"请输入内容"
>
</dd>
</dl>
<dl>
<dt>
用户标签:
</dt>
<dd>
<select
id=
"is_new"
name=
"is_new"
class=
"form-control is_new selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
用户
</option>
<option
value=
"1"
>
新客户
</option>
<option
value=
"2"
>
老客户
</option>
</select>
</dd>
</dl>
@endif
<!-- <dl>
<dt>新订单:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['is_new_order']}}" id="is_new_order" name="is_new_order">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">是</li>
<li data-val="0">否</li>
</ul>
</div>
</dd>
</dl> -->
<dl>
<dt>
业务类型:
</dt>
<dd>
<select
id=
"business_type"
name=
"business_type"
class=
"form-control business_type selectpicker"
title=
"全部"
multiple
>
@if (Config('params.business_type'))
@foreach (Config('params.business_type') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
<dl>
<dt>
订单类型:
</dt>
<dd>
<select
id=
"order_type_extend"
name=
"order_type_extend"
class=
"form-control order_type_extend selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
普通订单
</option>
<option
value=
"1"
>
团购订单
</option>
</select>
</dd>
</dl>
<dl>
<dt>
团购状态:
</dt>
<dd>
<select
id=
"status_extend"
name=
"status_extend"
class=
"form-control status_extend selectpicker"
title=
"全部"
>
<option
value=
""
>
全部
</option>
<option
value=
"-16"
>
团购失败
</option>
<option
value=
"10"
>
团购中
</option>
<option
value=
"16"
>
团购完成
</option>
</select>
</dd>
</dl>
@if (in_array('self_check_test_order', $userPerms))
<dl>
<dt></dt>
<dd
class=
"test-order"
>
<label><input
type=
"checkbox"
name=
"test_order"
>
所有订单-包括测试
</label>
</dd>
</dl>
@endif
</td>
</tr>
</table>
<div
class=
"text-center"
>
<div
class=
"search-btn"
>
<button
class=
"nbtn search_self_order"
>
搜索
</button>
@if (in_array('self_order_export', $userPerms))
<button
class=
"nbtn self_export"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
@endif
</div>
</div>
</div>
</div>
</div>
<div
class=
"row-fluid table-responsive"
>
<table
class=
"table table-hover text-nowrap"
>
<thead>
<tr>
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
公司
</th>
<th
class=
"pl30"
>
订单编号
</th>
<th
class=
"pl30"
>
ERP单号
</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>
<th
class=
"pl30"
>
订单来源
</th>
<th
class=
"pl30"
>
发货状态
</th>
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
</thead>
@if (empty($list))
<tr>
<td
class=
"text-center"
colspan=
"13"
>
没有查询到相关记录~
</td>
</tr>
@else
<tbody>
@foreach ($list as $v)
<tr
data-oid=
"{{ $v['order_id'] }}"
data-type=
"2"
>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getAccountName
(
$v
[
'user_id'
]));
?>
@if (isset($credit[$v['user_id']])
&&
$credit[$v['user_id']])
<span>
(账期)
</span>
@endif
</td>
<td
class=
"show-list"
>
@if ($v['order_type'] == 1)
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
<?php
$order_extend
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
]);
?>
<td
class=
"show-list"
>
{{ $order_extend ? $order_extend->erp_sn : '' }}
</td>
<td
class=
"show-list"
>
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'order_type_extend'
]
==
1
&&
$v
[
'status'
]
==
4
)
{
// 团购订单状态
switch
(
$v
[
'status_extend'
])
{
case
-
16
:
echo
'<span class="list-text-cancel"><b>团购失败</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-send"><b>团购中</b></span>'
;
break
;
case
16
:
echo
'<span class="list-text-success"><b>团购成功</b></span>'
;
break
;
}
}
else
{
switch
(
$v
[
'status'
])
{
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
{{$v['sale_type'] == 1 ? '现卖' : '预售'}}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
],
2
);
?>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
$shipping
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
$shippingStatus
=
''
;
$shippingNo
=
''
;
if
(
$shipping
)
{
foreach
(
$shipping
as
$s
)
{
switch
(
$s
->
status
)
{
case
0
:
case
1
:
$shippingStatus
.=
'已配送, '
;
break
;
case
2
:
$shippingStatus
.=
'已签收, '
;
break
;
default
:
$shippingStatus
.=
'未配送, '
;
break
;
}
$shippingNo
.=
$s
->
shipping_no
?
$s
->
shipping_no
.
', '
:
''
;
}
$shippingStatus
=
substr
(
$shippingStatus
,
0
,
-
2
);
}
echo
$shippingStatus
;
?>
</td>
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
<style>
.list-btn
a
{
margin-top
:
5px
;
margin-left
:
5px
;
}
</style>
<div
class=
"btn-group btn-group-xs list-btn"
style=
"width: 240px;"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2])
&&
$v['sale_id'])
<a
class=
"btn btn-success"
href=
"/change/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
人工审单
</a>
@endif
<!-- 管理员和自营客服主管或有推送权限显示 -->
@if ((in_array($role, [1, 10]) || in_array('self_send_salesman', $userPerms)))
<a
class=
"btn btn-info"
href=
"/sendSales/{{ $v['order_id'] }}?tags=self"
target=
"_blank"
>
推送客服
</a>
@endif
@if ($v['status'] > 1
&&
in_array('self_order_download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
@if (in_array($v['status'], [4, 7]))
<a
class=
"btn btn-warning push-wms"
data-sn=
"{{$v['order_sn']}}"
href=
"javascript:;"
>
推送WMS
</a>
@endif
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr
class=
"show-other-content"
>
<td
colspan=
"14"
>
<table
class=
"table table-hover table-bordered list-item-table"
>
<thead>
<tr
class=
"caption"
>
<th>
型号
</th>
<th>
制造商
</th>
<th>
购买数量
</th>
<th>
购买时单价
</th>
<th>
均摊后单价
</th>
<th>
小计
</th>
<th
colspan=
"5"
>
交期
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
</tr>
@endforeach
</tbody>
@endif
</table>
</div>
<div
class=
"row-fluid pagination"
>
<div
class=
"show-list-info"
>
<span>
共{{$count ? $count : 0}}单
</span>
<span
class=
"show-other-info"
></span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a
class=
"btn btn-xs btn-info order-other-info"
style=
"margin-top: -3px;"
>
查看其它信息
</a>
@endif
</div>
<?php
echo
$page
;
?>
</div>
</div>
</div>
<script>
var
test_order
=
"{{$condition['test_order']}}"
;
var
order_status
=
"{{$condition['order_status']}}"
;
var
sale_type
=
"{{$condition['sale_type']}}"
;
var
order_payment_mode
=
"{{$condition['order_payment_mode']}}"
;
var
business_type
=
"{{$condition['business_type']}}"
;
var
order_source_pf
=
"{{$condition['order_source_pf']}}"
;
var
order_invoice_status
=
"{{$condition['order_invoice_status']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
order_pay_type
=
"{{$condition['order_pay_type']}}"
;
var
is_new
=
"{{$condition['is_new']}}"
;
var
order_type_extend
=
"{{$condition['order_type_extend']}}"
;
var
status_extend
=
"{{$condition['status_extend']}}"
;
var
manager
=
"{{$role}}"
;
if
(
test_order
)
{
$
(
'input[name=test_order]'
).
attr
(
'checked'
,
true
);
}
$
(
".order_status, .order_payment_mode, .order_source_pf, .business_type"
).
selectpicker
({
actionsBox
:
true
,
//在下拉选项添加选中所有和取消选中的按钮
countSelectedText
:
"已选中{0}项"
,
selectedTextFormat
:
"count > 5"
,
selectAllText
:
'全选'
,
deselectAllText
:
'取消全选'
,
})
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#sale_type'
).
selectpicker
(
'val'
,
sale_type
);
$
(
'.order_payment_mode'
).
selectpicker
(
'val'
,
order_payment_mode
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_source_pf'
).
selectpicker
(
'val'
,
order_source_pf
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#order_invoice_status'
).
selectpicker
(
'val'
,
order_invoice_status
);
// $('#order_send').selectpicker('val', order_send);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
.
split
(
','
)).
trigger
(
"change"
);
// $('.order_pay_type').selectpicker('val', order_pay_type.split(',')).trigger("change");
$
(
'.order_pay_type'
).
selectpicker
(
'val'
,
order_pay_type
);
$
(
'.is_new'
).
selectpicker
(
'val'
,
is_new
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_type_extend'
).
selectpicker
(
'val'
,
order_type_extend
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.status_extend'
).
selectpicker
(
'val'
,
status_extend
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.business_type'
).
selectpicker
(
'val'
,
business_type
.
split
(
','
)).
trigger
(
"change"
);
$
.
lie
.
order
.
index
();
$
.
lie
.
track
.
orderTrack
();
$
.
lie
.
cancel
.
cancelorder
();
// 推送到WMS
$
(
'.push-wms'
).
click
(
function
()
{
var
order_sn
=
$
(
this
).
data
(
'sn'
);
layer
.
open
({
title
:
'推送WMS'
,
content
:
'确定推送到WMS吗?'
,
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
$
.
ajax
({
url
:
'/api/pushWms'
,
data
:
{
order_sn
:
order_sn
},
dataType
:
"json"
,
success
:
function
(
resp
)
{
layer
.
close
(
index
);
layer
.
msg
(
'成功'
);
}
});
},
btn2
:
function
(
index
)
{
layer
.
close
(
index
)
}
})
})
</script>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment