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
399e1d56
authored
Sep 18, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.调整取消弹框;
2.调整订单列表筛选;
parent
e0e60fca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
30 deletions
app/Http/Controllers/OrderController.php
app/Model/OrderModel.php
public/js/order.js
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
399e1d56
...
...
@@ -400,6 +400,8 @@ Class OrderController extends Controller
// 页面参数
$map
[
'order_type'
]
=
$request
->
input
(
'order_type'
,
''
);
$map
[
'order_contain'
]
=
$request
->
input
(
'order_contain'
,
''
);
$map
[
'order_sn'
]
=
$request
->
input
(
'order_sn'
,
''
);
$map
[
'goods_name'
]
=
$request
->
input
(
'goods_name'
,
''
);
$map
[
'time_start'
]
=
$request
->
input
(
'time_start'
,
''
);
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
...
...
@@ -415,7 +417,7 @@ Class OrderController extends Controller
$map
[
'order_source_ptag'
]
=
$request
->
input
(
'order_source_ptag'
,
''
);
$map
[
'erp_order_id'
]
=
$request
->
input
(
'erp_order_id'
,
''
);
$map
[
'order_payment_mode'
]
=
$request
->
input
(
'order_payment_mode'
,
''
);
$map
[
'order_invoice_status'
]
=
$request
->
input
(
'order_invoice_status'
,
''
);
$map
[
'order_invoice_status'
]
=
$request
->
input
(
'order_invoice_status'
,
''
);
$map
[
'is_new'
]
=
$request
->
input
(
'is_new'
,
''
);
$map
[
'is_new_order'
]
=
$request
->
input
(
'is_new_order'
,
''
);
$map
[
'business_type'
]
=
$request
->
input
(
'business_type'
,
''
);
...
...
app/Model/OrderModel.php
View file @
399e1d56
...
...
@@ -29,6 +29,8 @@ class OrderModel extends Model
if
(
$request
->
isMethod
(
'get'
))
{
$map
[
'order_type'
]
=
$request
->
input
(
'order_type'
,
''
);
$map
[
'order_contain'
]
=
$request
->
input
(
'order_contain'
,
''
);
$map
[
'order_sn'
]
=
$request
->
input
(
'order_sn'
,
''
);
$map
[
'goods_name'
]
=
$request
->
input
(
'goods_name'
,
''
);
$map
[
'time_start'
]
=
$request
->
input
(
'time_start'
,
''
);
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
...
...
@@ -80,24 +82,32 @@ class OrderModel extends Model
->
where
(
function
(
$query
)
use
(
$map
)
{
// 查询类型
if
(
!
empty
(
$map
[
'order_contain'
]))
{
if
(
$map
[
'order_type'
]
==
1
)
{
// 会员账号
if
(
$map
[
'order_type'
]
==
3
)
{
// 发票抬头
$query
->
where
(
'i.tax_title'
,
'='
,
$map
[
'order_contain'
]);
}
else
if
(
$map
[
'order_type'
]
==
4
)
{
// 会员ID
$query
->
where
(
'o.user_id'
,
'='
,
$map
[
'order_contain'
]);
}
else
{
// 会员账号
if
(
preg_match
(
'/@/'
,
$map
[
'order_contain'
]))
{
$query
->
where
(
'u.email'
,
'='
,
$map
[
'order_contain'
]);
}
else
{
$query
->
where
(
'u.mobile'
,
'='
,
$map
[
'order_contain'
]);
}
}
else
if
(
$map
[
'order_type'
]
==
2
)
{
// 型号名称
$query
->
where
(
'it.goods_name'
,
'='
,
$map
[
'order_contain'
]);
}
else
if
(
$map
[
'order_type'
]
==
3
)
{
// 发票抬头
$query
->
where
(
'i.tax_title'
,
'='
,
$map
[
'order_contain'
]);
}
else
if
(
$map
[
'order_type'
]
==
4
)
{
$query
->
where
(
'o.user_id'
,
'='
,
$map
[
'order_contain'
]);
}
else
{
// 订单编号
$query
->
where
(
'o.order_sn'
,
'='
,
$map
[
'order_contain'
]);
}
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 订单编号
if
(
!
empty
(
$map
[
'order_sn'
]))
{
$query
->
whereIn
(
'o.order_sn'
,
explode
(
','
,
$map
[
'order_sn'
]));
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 型号
if
(
!
empty
(
$map
[
'goods_name'
]))
{
$query
->
where
(
'it.goods_name'
,
'='
,
$map
[
'goods_name'
]);
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 创建时间
if
(
!
empty
(
$map
[
'time_start'
])
&&
!
empty
(
$map
[
'time_end'
]))
{
$query
->
whereBetween
(
'o.create_time'
,
[
$map
[
'time_start'
],
$map
[
'time_end'
]]);
...
...
public/js/order.js
View file @
399e1d56
This diff is collapsed.
Click to expand it.
resources/views/orderlist/content.blade.php
View file @
399e1d56
...
...
@@ -18,16 +18,26 @@
<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=
"1"
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
<li
class=
"order_type_tab"
data-val=
"2"
>
型号名称
</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>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<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"
/>
...
...
@@ -138,18 +148,6 @@
</dl>
@endif
<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>
...
...
@@ -256,7 +254,18 @@
<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>
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
<?php
$company_name
=
App\Http\Controllers\getCompanyName
(
$v
[
'order_id'
],
$v
[
'user_id'
]);
$mb_strlen
=
mb_strlen
(
$company_name
);
if
(
$mb_strlen
>
8
)
{
echo
mb_substr
(
$company_name
,
0
,
8
)
.
'...'
;
// 截取8个字符
}
else
{
echo
$company_name
;
}
?>
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
...
...
resources/views/selfOrder/content.blade.php
View file @
399e1d56
...
...
@@ -18,10 +18,8 @@
<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=
"1"
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"4"
>
会员ID
</li>
<li
class=
"order_type_tab"
data-val=
"2"
>
型号名称
</li>
<li
class=
"order_type_tab"
data-val=
"3"
>
发票抬头
</li>
</ul>
</div>
...
...
@@ -29,6 +27,18 @@
<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>
型号名称:
</dt>
<dd>
<input
type=
"text"
name=
"goods_name"
value=
"{{$condition['goods_name']}}"
placeholder=
"请输入型号名称"
>
</dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd
style=
"width:auto !important;"
>
<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"
/>
...
...
@@ -245,7 +255,18 @@
</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>
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}"
style=
"width: 200px;"
>
<?php
$company_name
=
App\Http\Controllers\getCompanyName
(
$v
[
'order_id'
],
$v
[
'user_id'
]);
$mb_strlen
=
mb_strlen
(
$company_name
);
if
(
$mb_strlen
>
8
)
{
echo
mb_substr
(
$company_name
,
0
,
8
)
.
'...'
;
// 截取8个字符
}
else
{
echo
$company_name
;
}
?>
</p>
@endif
</td>
<td
class=
"show-list"
>
{{$v['order_sn']}}
</td>
...
...
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