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
68931965
authored
Jun 10, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
退货单导出
parent
dd356d7b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
168 additions
and
33 deletions
app/Http/Controllers/ReturnController.php
app/Http/routes.php
app/Model/CmsModel.php
app/Model/OrderReturnModel.php
public/js/refund.js
resources/views/returnlist/content.blade.php
app/Http/Controllers/ReturnController.php
View file @
68931965
...
...
@@ -137,18 +137,18 @@ class ReturnController extends Controller
return
$info
;
}
// 联营退
款
导出
// 联营退
货单
导出
public
function
returnExport
(
Request
$request
)
{
$ReturnModel
=
new
OrderReturnModel
();
return
$ReturnModel
->
jointE
xport
(
$request
);
return
$ReturnModel
->
e
xport
(
$request
);
}
// 自营退
款
导出
public
function
returnSelf
Export
(
Request
$request
)
// 自营退
货单
导出
public
function
selfReturn
Export
(
Request
$request
)
{
$ReturnModel
=
new
OrderReturnModel
();
return
$ReturnModel
->
selfE
xport
(
$request
);
return
$ReturnModel
->
e
xport
(
$request
);
}
// 退货详情
...
...
app/Http/routes.php
View file @
68931965
...
...
@@ -128,6 +128,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
get
(
'/self_return_list'
,
'ReturnController@selfReturnList'
);
Route
::
get
(
'/return_details/{id}'
,
'ReturnController@returnDetails'
);
Route
::
post
(
'/ajax/returnCheck'
,
'ReturnController@returnCheck'
);
Route
::
get
(
'/self_return_export'
,
'ReturnController@selfReturnExport'
);
});
// 不需要登陆态
...
...
app/Model/CmsModel.php
0 → 100644
View file @
68931965
<?php
namespace
App\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Request
;
use
Excel
;
use
DB
;
class
CmsModel
extends
Model
{
protected
$table
=
'user_info'
;
protected
$primaryKey
=
'userId'
;
public
$timestamps
=
false
;
// 获取用户名称
public
function
getUserName
(
$userId
)
{
$user
=
$this
->
where
([
'userId'
=>
$userId
])
->
select
(
'name'
)
->
first
();
return
$user
?
$user
->
name
:
''
;
}
}
\ No newline at end of file
app/Model/OrderReturnModel.php
View file @
68931965
This diff is collapsed.
Click to expand it.
public/js/refund.js
View file @
68931965
...
...
@@ -132,31 +132,6 @@
}
})
// // 钱包退款
// $('.wallet-refund').click(function(){
// var order_id = $(this).data('oid');
// var amount = $(this).data('amount');
// $.ajax({
// url : 'ajax/wallet_refund',
// type: 'post',
// data: {order_id: order_id, amount: amount},
// dataType: 'json',
// success: function (resp) {
// if (resp.errcode == 0) {
// window.href =
// return false;
// }
// layer.msg(resp.errmsg);
// },
// error: function (err) {
// console.log(err)
// }
// })
// })
// 自营退款列表取消申请
$
(
'.cancel-refund'
).
click
(
function
()
{
var
rid
=
$
(
this
).
data
(
'rid'
);
...
...
@@ -192,6 +167,140 @@
},
index_new
:
function
(){
$
.
lie
.
droplist
(
$
(
'.droplist'
));
// 特殊字符编码
function
specialCode
(
chr
)
{
switch
(
chr
)
{
case
'!'
:
return
'%21'
;
break
;
case
'"'
:
return
'%22'
;
break
;
case
'#'
:
return
'%23'
;
break
;
case
'$'
:
return
'%24'
;
break
;
case
'%'
:
return
'%25'
;
break
;
case
'&'
:
return
'%26'
;
break
;
case
'\''
:
return
'%27'
;
break
;
case
'('
:
return
'%28'
;
break
;
case
')'
:
return
'%29'
;
break
;
case
'*'
:
return
'%2A'
;
break
;
case
'+'
:
return
'%2B'
;
break
;
case
','
:
return
'%2C'
;
break
;
case
'/'
:
return
'%2F'
;
break
;
case
':'
:
return
'%3A'
;
break
;
case
';'
:
return
'%3B'
;
break
;
case
'<'
:
return
'%3C'
;
break
;
case
'='
:
return
'%3D'
;
break
;
case
'>'
:
return
'%3E'
;
break
;
case
'?'
:
return
'%3F'
;
break
;
case
'@'
:
return
'%40'
;
break
;
case
'['
:
return
'%5B'
;
break
;
case
']'
:
return
'%5D'
;
break
;
case
'\\'
:
return
'%5C'
;
break
;
case
'|'
:
return
'%7C'
;
break
;
default
:
return
''
;
break
;
}
}
// 查找特殊字符
function
specialStr
(
str
)
{
var
reg
=
new
RegExp
(
"[!\"#$%&'()*+,/:;<=>?@\\[\\]\\|]"
);
var
len
=
str
.
length
;
var
rs
=
''
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
var
val
=
str
.
substr
(
i
,
1
);
if
(
reg
.
test
(
val
))
{
rs
=
rs
+
specialCode
(
val
);;
}
else
{
rs
=
rs
+
val
;
}
}
return
rs
;
}
// 搜索、导出条件
function
refundCommon
(
url
)
{
var
order_sn
=
$
(
'input[name="order_sn"]'
).
val
(),
sku_name
=
$
(
'input[name="sku_name"]'
).
val
(),
apply_status
=
$
(
'#apply_status'
).
val
()
?
$
(
'#apply_status'
).
val
()
:
''
,
order_payment_mode
=
$
(
'#order_payment_mode'
).
val
()
?
$
(
'#order_payment_mode'
).
val
()
:
''
,
time_start
=
$
(
'input[name="time_start"]'
).
val
(),
time_end
=
$
(
'input[name="time_end"]'
).
val
(),
order_goods_type
=
$
(
'input[name="order_goods_type"]'
).
val
();
if
(
url
==
'/return_export'
||
url
==
'/self_return_export'
)
{
if
(
!
order_sn
&&
!
sku_name
&&
!
apply_status
&&
!
order_payment_mode
&&
!
time_start
&&
!
time_end
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
if
(
!
order_sn
&&
!
sku_name
&&
!
apply_status
&&
!
order_payment_mode
&&
!
time_start
&&
!
time_end
)
{
location
.
href
=
url
;
}
var
listUrl
=
url
;
listUrl
+=
'?order_sn='
+
order_sn
;
if
(
sku_name
)
{
listUrl
+=
'&sku_name='
+
specialStr
(
sku_name
);
}
if
(
order_payment_mode
)
{
listUrl
+=
'&order_payment_mode='
+
order_payment_mode
;
}
if
(
apply_status
)
{
listUrl
+=
'&apply_status='
+
apply_status
;
}
if
(
time_start
){
time_start
=
Date
.
parse
(
time_start
)
/
1000
;
listUrl
+=
'&time_start='
+
time_start
;
}
if
(
time_end
){
time_end
=
Date
.
parse
(
time_end
)
/
1000
+
(
24
*
60
*
60
-
1
);
listUrl
+=
'&time_end='
+
time_end
;
}
listUrl
+=
'&order_goods_type='
+
order_goods_type
;
location
.
href
=
listUrl
;
}
// 搜索
$
(
'.search_return_order'
).
click
(
function
(){
var
order_goods_type
=
$
(
'input[name="order_goods_type"]'
).
val
();
if
(
order_goods_type
==
1
)
{
refundCommon
(
'/return_list'
);
}
else
{
refundCommon
(
'/self_return_list'
);
}
})
// 导出订单
$
(
'.export_return_order'
).
click
(
function
()
{
var
order_goods_type
=
$
(
'input[name="order_goods_type"]'
).
val
();
if
(
order_goods_type
==
1
)
{
refundCommon
(
'/return_export'
);
}
else
{
refundCommon
(
'/self_return_export'
);
}
})
},
refund
:
function
()
{
// 正整数输入框限制
$
(
'.int_num'
).
off
().
on
(
'keyup'
,
function
(){
...
...
resources/views/returnlist/content.blade.php
View file @
68931965
...
...
@@ -66,8 +66,8 @@
<div
class=
"text-center"
style=
"margin-top: 10px;"
>
<input
type=
"hidden"
name=
"order_goods_type"
value=
"{{$condition['order_goods_type']}}"
>
<div
class=
"search-btn"
>
<button
class=
"nbtn search_re
fund
_order"
>
搜索
</button>
<button
class=
"nbtn
refund_order_export
"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
<button
class=
"nbtn search_re
turn
_order"
>
搜索
</button>
<button
class=
"nbtn
export_return_order
"
style=
"margin-left: 20px; background: #23c6c8 !important;"
>
导出
</button>
</div>
</div>
</div>
...
...
@@ -160,5 +160,5 @@
$
(
'.apply_status'
).
selectpicker
(
'val'
,
apply_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'.order_payment_mode'
).
selectpicker
(
'val'
,
order_payment_mode
.
split
(
','
)).
trigger
(
"change"
);
$
.
lie
.
refund
.
index
();
$
.
lie
.
refund
.
index
_new
();
</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