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
96f361ca
authored
Jan 19, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整退款方式及账期相关
parent
ec599234
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
43 deletions
app/Http/Controllers/OrderController.php
config/order_service.php
public/js/order_service.js
public/js/web/orderServiceList.js
resources/views/common/order_service.blade.php
resources/views/detail/content.blade.php
resources/views/detail/order_service.blade.php
app/Http/Controllers/OrderController.php
View file @
96f361ca
...
@@ -1548,7 +1548,7 @@ Class OrderController extends Controller
...
@@ -1548,7 +1548,7 @@ Class OrderController extends Controller
$data
[
'operator_name'
]
=
$request
->
user
->
name
;
$data
[
'operator_name'
]
=
$request
->
user
->
name
;
$update_url
=
Config
(
'website.api_domain'
)
.
'service/apply'
;
$update_url
=
Config
(
'website.api_domain'
)
.
'service/apply'
;
// dd(curlApi($update_url, $data, 'POST'));
$update
=
json_decode
(
curlApi
(
$update_url
,
$data
,
'POST'
),
true
);
$update
=
json_decode
(
curlApi
(
$update_url
,
$data
,
'POST'
),
true
);
if
(
$update
[
'err_code'
]
!=
0
)
return
array
(
'errcode'
=>-
1
,
'errmsg'
=>
'操作失败'
);
if
(
$update
[
'err_code'
]
!=
0
)
return
array
(
'errcode'
=>-
1
,
'errmsg'
=>
'操作失败'
);
...
...
config/order_service.php
View file @
96f361ca
...
@@ -16,7 +16,7 @@ return [
...
@@ -16,7 +16,7 @@ return [
// 退款方式
// 退款方式
'refund_type'
=>
[
'refund_type'
=>
[
1
=>
'原路返回'
,
//
1 => '原路返回',
2
=>
'支付宝'
,
2
=>
'支付宝'
,
3
=>
'银行'
,
3
=>
'银行'
,
],
],
...
...
public/js/order_service.js
View file @
96f361ca
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
index
:
function
()
{
index
:
function
()
{
// 售后申请
// 售后申请
$
(
'.order_service'
).
click
(
function
()
{
$
(
'.order_service'
).
click
(
function
()
{
var
order_id
=
$
(
this
).
data
(
'id'
);
var
order_id
=
$
(
this
).
data
(
'id'
);
var
order_pay_type
=
$
(
this
).
data
(
'pay_type'
);
// 账期支付隐藏退款方式
// 弹出提示
// 弹出提示
layer
.
open
({
layer
.
open
({
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
return
false
;
return
false
;
}
}
if
(
!
refund_type
)
{
if
(
!
refund_type
&&
order_pay_type
!=
3
)
{
layer
.
tips
(
'请选择退款方式'
,
$
(
'.refund_type'
));
layer
.
tips
(
'请选择退款方式'
,
$
(
'.refund_type'
));
return
false
;
return
false
;
}
}
...
@@ -138,45 +139,49 @@
...
@@ -138,45 +139,49 @@
var
datax
=
$
(
'.orderServiceForm'
).
serialize
()
+
'&order_id='
+
order_id
;
var
datax
=
$
(
'.orderServiceForm'
).
serialize
()
+
'&order_id='
+
order_id
;
$
.
ajax
({
order_service
(
datax
);
url
:
'/ajax/orderServiceCheck'
,
type
:
'post'
,
/** 注释如下内容,暂时不需要校验原路返回 2021-1-19 */
data
:
datax
,
dataType
:
'json'
,
// $.ajax({
success
:
function
(
resp
)
{
// url : '/ajax/orderServiceCheck',
var
data
=
resp
.
data
;
// type: 'post',
// data: datax,
if
(
refund_type
==
1
&&
!
data
)
{
// 退款方式为原路返回,且系统不满足原路返回
// dataType: 'json',
layer
.
msg
(
'不满足原路返回条件,请更改退款方式'
);
// success: function (resp) {
return
false
;
// var data = resp.data;
}
// if (refund_type == 1 && !data) { // 退款方式为原路返回,且系统不满足原路返回
if
(
refund_type
!=
1
&&
data
)
{
// 退款方式非原路返回,且系统满足原路返回
// layer.msg('不满足原路返回条件,请更改退款方式');
layer
.
confirm
(
'此售后单满足系统自动原路返回,是否需要原路返回?'
,
{
// return false;
title
:
'导出数据'
// }
,
btn
:
[
'需要'
,
'否,我要手工写单'
]
},
function
(){
// 确定
// if (refund_type != 1 && data) { // 退款方式非原路返回,且系统满足原路返回
layer
.
closeAll
(
'dialog'
);
// 确定时关闭弹框
// layer.confirm('此售后单满足系统自动原路返回,是否需要原路返回?', {
// title: '导出数据'
// ,btn: ['需要', '否,我要手工写单']
// }, function(){ // 确定
// layer.closeAll('dialog'); // 确定时关闭弹框
datax
=
datax
+
'&refund_type=1'
;
// 退款方式更新为原路返回
//
datax = datax + '&refund_type=1'; // 退款方式更新为原路返回
order_service
(
datax
);
//
order_service(datax);
},
function
()
{
// 取消
//
}, function() { // 取消
layer
.
closeAll
(
'dialog'
);
// 确定时关闭弹框
//
layer.closeAll('dialog'); // 确定时关闭弹框
order_service
(
datax
);
//
order_service(datax);
});
//
});
return
false
;
//
return false;
}
//
}
order_service
(
datax
);
// 以上条件不满足时调用
//
order_service(datax); // 以上条件不满足时调用
},
//
},
error
:
function
(
res
)
{
//
error: function (res) {
console
.
log
(
res
);
//
console.log(res);
}
//
}
})
//
})
},
},
btn2
:
function
(
index
,
layero
){
btn2
:
function
(
index
,
layero
){
layer
.
close
(
index
);
layer
.
close
(
index
);
...
...
public/js/web/orderServiceList.js
View file @
96f361ca
...
@@ -93,7 +93,13 @@ layui.use(['form', 'table', 'laydate'], function(){
...
@@ -93,7 +93,13 @@ layui.use(['form', 'table', 'laydate'], function(){
// 填充内容
// 填充内容
$
(
'.service_type'
).
val
(
data
.
service_type
);
$
(
'.service_type'
).
val
(
data
.
service_type
);
$
(
'.refund_type'
).
val
(
data
.
refund_type
);
if
(
data
.
refund_type
==
0
)
{
$
(
'.refund_type_section'
).
hide
();
}
else
{
$
(
'.refund_type_section'
).
show
();
$
(
'.refund_type'
).
val
(
data
.
refund_type
);
}
if
(
data
.
refund_type
==
2
)
{
// 支付宝
if
(
data
.
refund_type
==
2
)
{
// 支付宝
$
(
'.alipay-info'
).
show
();
$
(
'.alipay-info'
).
show
();
...
@@ -196,7 +202,7 @@ layui.use(['form', 'table', 'laydate'], function(){
...
@@ -196,7 +202,7 @@ layui.use(['form', 'table', 'laydate'], function(){
return
false
;
return
false
;
}
}
if
(
!
refund_type
)
{
if
(
!
refund_type
&&
data
.
refund_type
!=
0
)
{
layer
.
tips
(
'请选择退款方式'
,
$
(
'.refund_type'
));
layer
.
tips
(
'请选择退款方式'
,
$
(
'.refund_type'
));
return
false
;
return
false
;
}
}
...
...
resources/views/common/order_service.blade.php
View file @
96f361ca
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group
refund_type_section
"
>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
退款方式:
</label>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
退款方式:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<select
class=
"form-control refund_type"
name=
"refund_type"
>
<select
class=
"form-control refund_type"
name=
"refund_type"
>
...
...
resources/views/detail/content.blade.php
View file @
96f361ca
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
@if (!isset($_REQUEST['tags'])
&&
$action_name != 'changeOrder'
&&
$action_name != 'sendSales')
@if (!isset($_REQUEST['tags'])
&&
$action_name != 'changeOrder'
&&
$action_name != 'sendSales')
<p
style=
"padding-left: 5px;"
>
操作
</p>
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2
, 3, 4
])
&&
in_array('cancel_order', $userPerms))
@if (in_array($order_info['status'], [1, 2])
&&
in_array('cancel_order', $userPerms))
<!-- <a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-danger">取消订单</a> -->
<!-- <a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-danger">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-uid=
"{{$order_info['user_id']}}"
data-type=
"2"
>
取消订单
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-uid=
"{{$order_info['user_id']}}"
data-type=
"2"
>
取消订单
</a>
@endif
@endif
...
@@ -212,7 +212,7 @@
...
@@ -212,7 +212,7 @@
<!-- 售后申请 -->
<!-- 售后申请 -->
@if ($order_info['status'] > 2
&&
$order_info['status']
<
10
)
@if ($order_info['status'] > 2
&&
$order_info['status']
<
10
)
<
a
class=
"btn btn-info order_service"
data-id=
"{{$order_info['order_id']}}"
>
售后申请
</a>
<
a
class=
"btn btn-info order_service"
data-id=
"{{$order_info['order_id']}}"
data-pay_type=
"{{$order_info['order_pay_type']}}"
>
售后申请
</a>
@endif
@endif
<!-- 已发货之后的状态 -->
<!-- 已发货之后的状态 -->
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
@elseif (isset($_REQUEST['tags'])
&&
$_REQUEST['tags'] == 'self'
&&
$action_name != 'changeOrder')
@elseif (isset($_REQUEST['tags'])
&&
$_REQUEST['tags'] == 'self'
&&
$action_name != 'changeOrder')
<p
style=
"padding-left: 5px;"
>
操作
</p>
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2
, 3, 4
])
&&
in_array('self_order_cancel', $userPerms))
@if (in_array($order_info['status'], [1, 2])
&&
in_array('self_order_cancel', $userPerms))
<!-- <a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a> -->
<!-- <a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-uid=
"{{$order_info['user_id']}}"
data-type=
"2"
>
取消订单
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-uid=
"{{$order_info['user_id']}}"
data-type=
"2"
>
取消订单
</a>
@endif
@endif
...
...
resources/views/detail/order_service.blade.php
View file @
96f361ca
...
@@ -51,6 +51,8 @@
...
@@ -51,6 +51,8 @@
</div>
</div>
</div>
</div>
<!-- 账期支付隐藏退款方式 -->
@if ($order_info['order_pay_type'] != 3)
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
退款方式:
</label>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
退款方式:
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
...
@@ -64,6 +66,7 @@
...
@@ -64,6 +66,7 @@
</select>
</select>
</div>
</div>
</div>
</div>
@endif
<div
class=
"form-group alipay-info"
>
<div
class=
"form-group alipay-info"
>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
客户/公司:
</label>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
客户/公司:
</label>
...
...
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