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
065302d1
authored
Dec 10, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
详情页添加操作按钮
parent
d4eb98dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
34 deletions
app/Http/Controllers/WebController.php
public/js/web/orderServiceDetails.js
resources/views/web/orderServiceDetails.blade.php
app/Http/Controllers/WebController.php
View file @
065302d1
...
...
@@ -416,11 +416,11 @@ class WebController extends Controller
$order_service
->
erp_sn
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_service
->
order_id
)
->
value
(
'erp_sn'
);
$data
[
'order_service'
]
=
$order_service
;
$data
[
'order_service_log'
]
=
$OrderServiceLogModel
->
where
(
'service_id'
,
$service_id
)
->
get
();
$data
[
'order_service_log'
]
=
$OrderServiceLogModel
->
where
(
'service_id'
,
$service_id
)
->
orderBy
(
'id'
,
'desc'
)
->
get
();
// 获取收款信息
$PayLogModel
=
new
PayLogModel
;
$data
[
'pay_log'
]
=
$PayLogModel
->
where
(
'order_id'
,
$order_service
->
order_id
)
->
get
();
$data
[
'pay_log'
]
=
$PayLogModel
->
where
(
'order_id'
,
$order_service
->
order_id
)
->
orderBy
(
'pay_log_id'
,
'desc'
)
->
get
();
return
view
(
'web'
,
$data
);
}
...
...
public/js/web/orderServiceDetails.js
View file @
065302d1
...
...
@@ -29,32 +29,17 @@ layui.use(['form', 'table', 'element'], function(){
,
limit
:
10
,
limits
:
[
10
,
20
,
50
,]
});
// tool操作
table
.
on
(
'tool(list)'
,
function
(
obj
){
//注:tool是工具条事件名,test是table原始容器的属性lay-filter="对应的值"
var
data
=
obj
.
data
;
//获得当前行数据
var
layEvent
=
obj
.
event
;
//获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
var
tr
=
obj
.
tr
;
//获得当前行 tr 的DOM对象
var
title
=
''
;
var
content
=
''
;
var
url
=
'/api/ApiOrderServiceAction'
;
var
datax
=
[];
if
(
layEvent
===
'submit'
){
// 提交
title
=
'提交申请'
;
content
=
'确定提交该申请吗?'
;
datax
=
{
id
:
data
.
id
,
service_status
:
2
};
}
else
if
(
layEvent
===
'audit'
){
// 审核
title
=
'审核申请'
;
content
=
'确定审核该申请吗?'
;
$
(
'.act_submit'
).
click
(
function
()
{
var
id
=
$
(
this
).
data
(
'id'
);
var
service_status
=
$
(
this
).
data
(
'type'
);
var
title
=
''
;
var
content
=
''
;
datax
=
{
id
:
data
.
id
,
service_status
:
3
};
}
else
if
(
layEvent
===
'cancel'
){
// 取消
title
=
'取消申请'
;
content
=
'确定取消该申请吗?'
;
datax
=
{
id
:
data
.
id
,
service_status
:
-
1
};
switch
(
service_status
)
{
case
-
1
:
title
=
'取消申请'
;
content
=
'确定取消申请吗?'
;
break
;
case
2
:
title
=
'提交申请'
;
content
=
'确定提交申请吗?'
;
break
;
case
3
:
title
=
'审核申请'
;
content
=
'确定审核通过申请吗?'
;
break
;
}
layer
.
open
({
...
...
@@ -63,16 +48,15 @@ layui.use(['form', 'table', 'element'], function(){
btn
:
[
'确认'
,
'取消'
],
yes
:
function
(
index
)
{
$
.
ajax
({
url
:
url
,
url
:
'/api/ApiOrderServiceAction'
,
type
:
'post'
,
data
:
datax
,
data
:
{
id
:
id
,
service_status
:
service_status
}
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
console
.
log
(
resp
)
if
(
resp
.
errcode
==
0
)
{
layer
.
msg
(
resp
.
errmsg
);
renderTable
();
// 重新加载table
$
(
'.search'
).
trigger
(
"click"
);
// 触发搜索按钮
window
.
location
.
reload
();
return
false
;
}
...
...
@@ -92,7 +76,7 @@ layui.use(['form', 'table', 'element'], function(){
layer
.
close
(
index
);
}
})
})
;
})
});
\ No newline at end of file
resources/views/web/orderServiceDetails.blade.php
View file @
065302d1
...
...
@@ -88,10 +88,15 @@
</div>
</div>
@if (
$order_service->
status == 1)
@if (
$order_service->service_
status == 1)
<div
class=
"layui-btn-container"
style=
"text-align: center; margin: 20px 0;"
>
<button
lay-submit
lay-filter=
"save"
class=
"layui-btn layui-btn-normal save"
data-type=
"1"
>
保存
</button>
<button
lay-submit
lay-filter=
"save"
class=
"layui-btn layui-btn-info submit_audit"
data-type=
"2"
>
提交审核
</button>
<a
class=
"layui-btn layui-btn-normal act_submit"
data-id=
"{{ $order_service->id }}"
data-type=
"2"
>
提交
</a>
<a
class=
"layui-btn layui-btn-danger act_submit"
data-id=
"{{ $order_service->id }}"
data-type=
"-1"
>
取消
</a>
</div>
@elseif ($order_service->service_status == 2)
<div
class=
"layui-btn-container"
style=
"text-align: center; margin: 20px 0;"
>
<a
class=
"layui-btn layui-btn-normal act_submit"
data-id=
"{{ $order_service->id }}"
data-type=
"3"
>
审核
</a>
<a
class=
"layui-btn layui-btn-danger act_submit"
data-id=
"{{ $order_service->id }}"
data-type=
"-1"
>
取消
</a>
</div>
@endif
...
...
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