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
e54aa5b2
authored
Dec 14, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整售后
parent
036e0ae6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
2 deletions
app/Http/Controllers/WebController.php
app/Model/OrderServiceItemsModel.php
public/js/order_service.js
resources/views/web/orderServiceList.blade.php
app/Http/Controllers/WebController.php
View file @
e54aa5b2
...
...
@@ -388,6 +388,7 @@ class WebController extends Controller
$perm
=
new
PermController
;
$data
[
'sale_list'
]
=
$perm
->
getUserByDepartmentId
(
Config
(
'perm_args.sales_department_id'
));
// 获取所有的销售
$data
[
'role'
]
=
$perm
->
getUserRole
(
$request
);
return
view
(
'web'
,
$data
);
}
...
...
app/Model/OrderServiceItemsModel.php
View file @
e54aa5b2
...
...
@@ -31,7 +31,7 @@ class OrderServiceItemsModel extends Model
foreach
(
$data
as
&
$v
)
{
$v
[
'amount'
]
=
number_format
(
$v
[
'adjust_number'
]
*
$v
[
'adjust_price'
],
2
);
$v
[
'refund_amount'
]
=
number_format
(
$v
[
'goods_number'
]
*
$v
[
'
goods
_price'
],
2
);
$v
[
'refund_amount'
]
=
number_format
(
$v
[
'goods_number'
]
*
$v
[
'
single_pre
_price'
],
2
);
}
return
$data
;
...
...
public/js/order_service.js
View file @
e54aa5b2
...
...
@@ -106,7 +106,9 @@
return
false
;
}
var
goods_number
=
parseInt
(
$
(
this
).
parents
(
'tr'
).
find
(
'.origin-goods-number'
).
html
());
// 订单数量
var
goods_price
=
parseFloat
(
$
(
this
).
parents
(
'tr'
).
find
(
'.origin-goods-price'
).
html
());
// 原订单单价
var
goods_number
=
parseInt
(
$
(
this
).
parents
(
'tr'
).
find
(
'.origin-goods-number'
).
html
());
// 原订单数量
var
origin_amount
=
goods_price
*
goods_number
;
// 商品可退金额
if
(
val
>
goods_number
)
{
layer
.
msg
(
'不能超过订单数量'
);
...
...
@@ -114,6 +116,15 @@
return
false
;
}
var
adjust_price
=
$
(
this
).
parents
(
'tr'
).
find
(
'.adjust_price'
).
val
();
var
adjust_amount
=
adjust_price
*
val
;
if
(
adjust_amount
>
origin_amount
)
{
layer
.
msg
(
'不能超过该条商品可退金额'
);
$
(
this
).
val
(
''
);
return
false
;
}
})
// 单价输入校验
...
...
@@ -154,6 +165,20 @@
$
(
this
).
val
(
''
);
return
false
;
}
var
goods_price
=
parseFloat
(
$
(
this
).
parents
(
'tr'
).
find
(
'.origin-goods-price'
).
html
());
// 原订单单价
var
goods_number
=
parseInt
(
$
(
this
).
parents
(
'tr'
).
find
(
'.origin-goods-number'
).
html
());
// 原订单数量
var
origin_amount
=
goods_price
*
goods_number
;
// 商品可退金额
var
adjust_number
=
$
(
this
).
parents
(
'tr'
).
find
(
'.adjust_number'
).
val
();
var
adjust_amount
=
adjust_number
*
val
;
if
(
adjust_amount
>
origin_amount
)
{
layer
.
msg
(
'不能超过该条商品可退金额'
);
$
(
this
).
val
(
''
);
return
false
;
}
})
...
...
resources/views/web/orderServiceList.blade.php
View file @
e54aa5b2
...
...
@@ -124,8 +124,10 @@
<
a
class
=
"btn btn-xs btn-outline btn-success"
lay
-
event
=
"submit"
>
提交
<
/a
>
<
a
class
=
"btn btn-xs btn-outline btn-danger"
lay
-
event
=
"cancel"
>
取消
<
/a
>
@{{
#
}
else
if
(
d
.
service_status
==
2
)
{
}}
<?php
if
(
in_array
(
$role
,
[
1
,
2
]))
{
?>
<
a
class
=
"btn btn-xs btn-outline btn-success"
lay
-
event
=
"audit"
>
审核
<
/a
>
<
a
class
=
"btn btn-xs btn-outline btn-danger"
lay
-
event
=
"cancel"
>
取消
<
/a
>
<?php
}
?>
@{{
#
}
else
if
(
d
.
service_status
==
3
&&
d
.
refund_status
!=
3
)
{
}}
<
a
class
=
"btn btn-xs btn-outline btn-success"
lay
-
event
=
"confirm"
>
确认退款
<
/a
>
@{{
#
}
}}
...
...
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