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
ae500a44
authored
Dec 18, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单详情添加售后数量、单价等
parent
b23c3125
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
app/Http/Controllers/OrderController.php
resources/views/detail/detail_items_info.php
app/Http/Controllers/OrderController.php
View file @
ae500a44
...
...
@@ -337,18 +337,18 @@ function getOrderPurPrice($xls_sn)
return
$data
;
}
// 获取
已提交售后单数量
function
getOrderServiceNum
(
$order_id
,
$goods_id
)
// 获取
售后单信息
function
getOrderServiceNum
(
$order_id
,
$goods_id
,
$status
=
1
,
$field
=
'adjust_number'
)
{
$OrderServiceModel
=
new
OrderServiceModel
;
$OrderServiceItemsModel
=
new
OrderServiceItemsModel
;
return
$OrderServiceModel
->
from
(
'lie_order_service as s'
)
->
leftJoin
(
'lie_order_service_items as i'
,
's.id'
,
'='
,
'i.service_id'
)
->
where
(
's.service_status'
,
'>'
,
1
)
->
where
(
's.service_status'
,
'>'
,
$status
)
->
where
(
'i.order_id'
,
$order_id
)
->
where
(
'i.goods_id'
,
$goods_id
)
->
sum
(
'i.
adjust_number'
);
->
sum
(
'i.
'
.
$field
);
}
...
...
resources/views/detail/detail_items_info.php
View file @
ae500a44
...
...
@@ -64,6 +64,11 @@
<th>
商品备注
</th>
<th>
合同备注
</th>
<?php
if
(
$order_info
[
'order_goods_type'
]
==
1
)
{
?>
<th>
售后数量
</th>
<th>
剩余数量
</th>
<th>
售后单价
</th>
<?php
}
?>
<th>
状态
</th>
</tr>
</thead>
...
...
@@ -142,6 +147,14 @@
<td>
<?=
!
empty
(
$v
[
'remarks'
])
?
$v
[
'remarks'
]
:
''
?>
</td>
<td>
<?=
!
empty
(
$v
[
'contract_remark'
])
?
$v
[
'contract_remark'
]
:
''
?>
</td>
<?php
if
(
$order_info
[
'order_goods_type'
]
==
1
)
{
$service_number
=
App\Http\Controllers\getOrderServiceNum
(
$v
[
'order_id'
],
$v
[
'goods_id'
],
2
);
$service_price
=
App\Http\Controllers\getOrderServiceNum
(
$v
[
'order_id'
],
$v
[
'goods_id'
],
2
,
'adjust_price'
);
echo
'<td>'
.
$service_number
.
'</td><td>'
.
(
$v
[
'goods_number'
]
-
$service_number
)
.
'</td><td>'
.
$service_price
.
'</td>'
;
}
?>
<td>
<?=
$v
[
'status'
]
==
1
?
'正常'
:
'<i class="error">已关闭</i>'
?>
</td>
</tr>
<?php
}
?>
...
...
@@ -323,6 +336,15 @@
</td>
</tr>
<?php
}
?>
<?php
if
(
$order_info
[
'order_goods_type'
]
==
1
&&
isset
(
$service_number
)
&&
isset
(
$service_price
))
{
?>
<tr>
<td>
售后金额:
</td>
<td>
<span
class=
"amount"
style=
"color:red;font-size:20px"
>
<?=
'- '
.
number_format
(
$service_number
*
$service_price
,
2
)
?>
</span>
</td>
</tr>
<?php
}
?>
</table>
</div>
...
...
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