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
95927ba7
authored
Nov 18, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
售后添加列
parent
fab6ddfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
app/Model/OrderServiceModel.php
public/js/web/orderServiceList.js
app/Model/OrderServiceModel.php
View file @
95927ba7
...
...
@@ -43,23 +43,11 @@ class OrderServiceModel extends Model
$perm
=
new
PermController
;
$role
=
$perm
->
getUserRole
(
$request
);
// 用户角色
$field
=
[
's.id'
,
's.service_sn'
,
's.order_id'
,
's.order_sn'
,
's.user_id'
,
's.service_type'
,
's.service_status'
,
's.refund_status'
,
's.return_status'
,
's.apply_id'
,
's.apply_name'
,
's.auditor_id'
,
's.auditor_name'
,
's.create_time'
,
's.auditor_time'
];
$field
=
[
's.id'
,
's.service_sn'
,
's.order_id'
,
's.order_sn'
,
's.user_id'
,
's.service_type'
,
's.service_status'
,
's.refund_status'
,
's.return_status'
,
's.apply_id'
,
's.apply_name'
,
's.auditor_id'
,
's.auditor_name'
,
's.create_time'
,
's.auditor_time'
,
'o.order_pay_type'
];
$list
=
$this
->
from
(
'lie_order_service as s'
);
if
(
$map
[
'is_account_order'
]
!==
''
)
{
$list
=
$list
->
join
(
'lie_order as o'
,
's.order_id'
,
'='
,
'o.order_id'
)
->
where
(
function
(
$query
)
use
(
$map
)
{
if
(
$map
[
'is_account_order'
]
==
1
)
{
$query
->
where
(
'o.order_pay_type'
,
3
);
}
else
{
$query
->
where
(
'o.order_pay_type'
,
'<>'
,
3
);
}
});
}
$list
=
$list
->
where
(
function
(
$query
)
use
(
$map
,
$request
,
$role
,
$perm
)
{
$list
=
$this
->
from
(
'lie_order_service as s'
)
->
join
(
'lie_order as o'
,
's.order_id'
,
'='
,
'o.order_id'
)
->
where
(
function
(
$query
)
use
(
$map
,
$request
,
$role
,
$perm
)
{
// 售后单号
if
(
$map
[
'service_sn'
])
{
$query
->
where
(
's.service_sn'
,
'='
,
$map
[
'service_sn'
]);
...
...
@@ -101,6 +89,12 @@ class OrderServiceModel extends Model
$query
->
where
(
's.create_time'
,
'<='
,
$map
[
'end_time'
]);
}
if
(
$map
[
'is_account_order'
]
==
1
)
{
$query
->
where
(
'o.order_pay_type'
,
3
);
}
else
if
(
$map
[
'is_account_order'
]
==
-
1
)
{
$query
->
where
(
'o.order_pay_type'
,
'<>'
,
3
);
}
switch
(
$role
)
{
case
2
:
// 查看下级
$sub_sale_ids
=
$perm
->
getSubSaleId
(
$request
->
user
->
userId
);
...
...
@@ -160,6 +154,8 @@ class OrderServiceModel extends Model
$v
[
'items'
]
=
$service_items
;
$v
[
'service_amount'
]
=
number_format
(
$goods_amount
,
2
,
'.'
,
''
);
$v
[
'is_account_order'
]
=
$v
[
'order_pay_type'
]
==
3
?
'是'
:
'否'
;
}
return
$data
;
...
...
public/js/web/orderServiceList.js
View file @
95927ba7
...
...
@@ -27,6 +27,7 @@ layui.use(['form', 'table', 'laydate'], function(){
,{
field
:
'apply_name'
,
title
:
'申请人'
,
width
:
120
}
,{
field
:
'auditor_name'
,
title
:
'审核人'
,
width
:
120
}
,{
field
:
'service_amount'
,
title
:
'售后金额'
,
width
:
120
}
,{
field
:
'is_account_order'
,
title
:
'账期订单'
,
width
:
120
}
,{
field
:
'service_status_val'
,
title
:
'售后状态'
,
templet
:
'#status'
,
width
:
120
}
,{
field
:
'refund_status_val'
,
title
:
'退款状态'
,
width
:
120
}
,{
field
:
'return_status_val'
,
title
:
'退货状态'
,
width
:
120
}
...
...
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