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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
51 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
...
...
@@ -74,6 +74,8 @@
function
orderListCommon
(
url
,
type
)
{
// type-订单类型
var
order_type
=
$
(
'#order_type'
).
data
(
'default'
),
order_contain
=
$
(
'input[name=order_contain]'
).
val
(),
order_sn
=
$
(
'input[name=order_sn]'
).
val
(),
goods_name
=
$
(
'input[name=goods_name]'
).
val
(),
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
time_end
=
$
(
'input[name="time_end"]'
).
val
(),
// order_type_a = $('#order_type_a').data('default'),
...
...
@@ -96,24 +98,24 @@
if
(
url
==
'/export'
)
{
if
(
type
==
1
)
{
// 联营
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
order_sn
&&
!
goods_name
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
)
{
if
(
!
order_contain
&&
!
order_sn
&&
!
goods_name
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
erp_order_id
&&
!
is_new
&&
!
is_new_order
&&
!
order_payment_mode
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
}
else
{
// 自营
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
business_type
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
order_sn
&&
!
goods_name
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
business_type
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
business_type
)
{
if
(
!
order_contain
&&
!
order_sn
&&
!
goods_name
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
business_type
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
...
...
@@ -129,6 +131,14 @@
listUrl
+=
'&order_contain='
+
specialStr
(
order_contain
);
}
if
(
order_sn
)
{
listUrl
+=
'&order_sn='
+
order_sn
;
}
if
(
goods_name
)
{
listUrl
+=
'&goods_name='
+
specialStr
(
goods_name
);
}
if
(
time_start
){
time_start
=
Date
.
parse
(
time_start
)
/
1000
;
...
...
@@ -506,31 +516,68 @@
}
var
content
=
'<div class="form-group">'
+
'<label>
常见原因
:</label>'
+
'<label>
附加费选项
:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户没需求">客户没需求</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="审核太久">审核太久</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单信息填错">订单信息填错</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="需用优惠券">需用优惠券</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="产地税">产地税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="关税">关税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="3C商检">3C商检</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="运费">运费</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>
数据不准
:</label>'
+
'<label>
信息错误需重新下单选项
:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存不准">库存不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="单价不准">单价不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="批次不准">批次不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="起订量不准">起订量不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改客户基本信息">更改客户基本信息</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改料号/数量/单价">更改料号/数量/单价</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改支付方式">更改支付方式</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改交易方式">更改交易方式</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改使用优惠券">更改使用优惠券</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>不
接受附加费
:</label>'
+
'<label>不
满足选项
:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="有关税">有关税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="产地税">产地税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="商检费">商检费</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="采购运费">采购运费</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="交期问题">交期问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="批次问题">批次问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="包装问题">包装问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="代购渠道不出货">代购渠道不出货</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格无法满足">价格无法满足</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>报关问题选项:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="无法归类">无法归类</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="禁运物料">禁运物料</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="无法操作报关物料">无法操作报关物料</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>代购渠道问题选项:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="货已出">货已出</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存不够">库存不够</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="采购漏下单">采购漏下单</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="供应商漏发货">供应商漏发货</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="渠道涨价">渠道涨价</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>客户问题选项:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户找到更优货源">客户找到更优货源</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户需求变动">客户需求变动</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户测试">客户测试</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改相关信息(支付方式,优惠券)">更改相关信息(支付方式,优惠券)</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>非代购渠道选项:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格上涨">价格上涨</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存变动">库存变动</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单审核过久">订单审核过久</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'
+
'</div>'
+
...
...
@@ -540,7 +587,7 @@
'</div>'
;
layer
.
open
({
area
:
[
'
65
0px'
],
area
:
[
'
80
0px'
],
title
:
title
,
content
:
content
,
btn
:[
'确认'
,
'取消'
],
...
...
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