Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dsyerp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
dsyerp
Commits
746a0133
Commit
746a0133
authored
Apr 20, 2023
by
wxl
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
e0bf7af1
34e52da6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
218 additions
and
5 deletions
+218
-5
module/Store/config/permission.php
module/Store/config/permission.php
+3
-2
module/Store/src/Controller/GoodsController.php
module/Store/src/Controller/GoodsController.php
+60
-1
module/Store/view/store/goods/exwarehousegoods.phtml
module/Store/view/store/goods/exwarehousegoods.phtml
+77
-0
module/Store/view/store/goods/index.phtml
module/Store/view/store/goods/index.phtml
+7
-2
module/Store/view/store/goods/otherwarehousegoods.phtml
module/Store/view/store/goods/otherwarehousegoods.phtml
+71
-0
No files found.
module/Store/config/permission.php
View file @
746a0133
...
@@ -38,7 +38,7 @@ return [
...
@@ -38,7 +38,7 @@ return [
],
],
GoodsController
::
class
=>
[
GoodsController
::
class
=>
[
'name'
=>
'商品'
,
'name'
=>
'商品'
,
'action'
=>
[
'index'
,
'add'
,
'importGoods'
,
'edit'
,
'delete'
,
'priceTrend'
,
'goodsWarehouse'
],
'action'
=>
[
'index'
,
'add'
,
'importGoods'
,
'edit'
,
'delete'
,
'priceTrend'
,
'goodsWarehouse'
,
'otherWarehouseGoods'
],
'actionNames'
=>
[
'actionNames'
=>
[
'index'
=>
'商品列表'
,
'index'
=>
'商品列表'
,
'add'
=>
'添加商品'
,
'add'
=>
'添加商品'
,
...
@@ -46,7 +46,8 @@ return [
...
@@ -46,7 +46,8 @@ return [
'edit'
=>
'编辑商品'
,
'edit'
=>
'编辑商品'
,
'delete'
=>
'删除商品'
,
'delete'
=>
'删除商品'
,
'priceTrend'
=>
'价格趋势'
,
'priceTrend'
=>
'价格趋势'
,
'goodsWarehouse'
=>
'入库分布'
'goodsWarehouse'
=>
'入库分布'
,
'otherWarehouseGoods'
=>
'入库记录'
]
]
],
],
BrandController
::
class
=>
[
BrandController
::
class
=>
[
...
...
module/Store/src/Controller/GoodsController.php
View file @
746a0133
...
@@ -20,6 +20,10 @@ use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
...
@@ -20,6 +20,10 @@ use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use
Purchase\Entity\OrderGoods
;
use
Purchase\Entity\OrderGoods
;
use
Purchase\Entity\PurchaseGoodsPriceLog
;
use
Purchase\Entity\PurchaseGoodsPriceLog
;
use
Sales\Entity\SalesOrderGoods
;
use
Sales\Entity\SalesOrderGoods
;
use
Stock\Entity\ExWarehouseOrder
;
use
Stock\Entity\ExWarehouseOrderGoods
;
use
Stock\Entity\OtherWarehouseOrder
;
use
Stock\Entity\OtherWarehouseOrderGoods
;
use
Store\Entity\Goods
;
use
Store\Entity\Goods
;
use
Store\Entity\GoodsCategory
;
use
Store\Entity\GoodsCategory
;
use
Store\Entity\GoodsCustom
;
use
Store\Entity\GoodsCustom
;
...
@@ -478,6 +482,62 @@ class GoodsController extends AbstractActionController
...
@@ -478,6 +482,62 @@ class GoodsController extends AbstractActionController
return
$view
->
setVariables
([
'goodsList'
=>
$goodsList
,
'searchGoodsName'
=>
$searchGoodsName
]);
return
$view
->
setVariables
([
'goodsList'
=>
$goodsList
,
'searchGoodsName'
=>
$searchGoodsName
]);
}
}
/*
* 单个商品在仓库中的入库记录
* @return array|\Laminas\Http\Response
*/
public
function
otherWarehouseGoodsAction
()
{
$goodsId
=
(
int
)
$this
->
params
()
->
fromRoute
(
'id'
,
-
1
);
$goodsInfo
=
$this
->
entityManager
->
getRepository
(
Goods
::
class
)
->
findOneByGoodsId
(
$goodsId
);
if
(
$goodsInfo
==
null
)
{
$this
->
flashMessenger
()
->
addWarningMessage
(
$this
->
translator
->
translate
(
'该商品不存在!'
));
return
$this
->
redirect
()
->
toRoute
(
'goods'
);
}
$orderGoods
=
$this
->
entityManager
->
getRepository
(
OtherWarehouseOrderGoods
::
class
)
->
findBy
([
'goodsId'
=>
$goodsId
]);
if
(
$orderGoods
==
null
)
{
$this
->
flashMessenger
()
->
addWarningMessage
(
$this
->
translator
->
translate
(
'该入库单不存在!'
));
return
$this
->
redirect
()
->
toRoute
(
'goods'
);
}
if
(
!
empty
(
$orderGoods
))
{
foreach
(
$orderGoods
as
$key
=>
$value
)
{
$otherWarehouseOrderInfo
=
$this
->
entityManager
->
getRepository
(
OtherWarehouseOrder
::
class
)
->
findOneBy
([
'otherWarehouseOrderId'
=>
$value
->
getOtherWarehouseOrderId
()]);
$value
->
otherAddTime
=
$otherWarehouseOrderInfo
->
getOtherAddTime
();
$value
->
WarehouseOrderSn
=
$otherWarehouseOrderInfo
->
getWarehouseOrderSn
();
$value
->
WarehouseName
=
$otherWarehouseOrderInfo
->
getOneWarehouse
()
->
getWarehouseName
();
}
}
return
[
'goodsInfo'
=>
$goodsInfo
,
'otherWarehouseOrder'
=>
$otherWarehouseOrderInfo
,
'orderGoods'
=>
$orderGoods
];
}
/**
* 单个商品在仓库中的出库记录
* @return array|\Laminas\Http\Response
*/
public
function
exWarehouseGoodsAction
()
{
$goodsId
=
(
int
)
$this
->
params
()
->
fromRoute
(
'id'
,
-
1
);
$goodsInfo
=
$this
->
entityManager
->
getRepository
(
Goods
::
class
)
->
findOneByGoodsId
(
$goodsId
);
if
(
$goodsInfo
==
null
)
{
$this
->
flashMessenger
()
->
addWarningMessage
(
$this
->
translator
->
translate
(
'该商品不存在!'
));
return
$this
->
redirect
()
->
toRoute
(
'goods'
);
}
$orderGoods
=
$this
->
entityManager
->
getRepository
(
ExWarehouseOrderGoods
::
class
)
->
findBy
([
'goodsId'
=>
$goodsId
]);
if
(
$orderGoods
==
null
)
{
$this
->
flashMessenger
()
->
addWarningMessage
(
$this
->
translator
->
translate
(
'该出库单不存在!'
));
return
$this
->
redirect
()
->
toRoute
(
'goods'
);
}
if
(
!
empty
(
$orderGoods
))
{
foreach
(
$orderGoods
as
$key
=>
$value
)
{
$exWarehouseOrderInfo
=
$this
->
entityManager
->
getRepository
(
ExWarehouseOrder
::
class
)
->
findOneBy
([
'exWarehouseOrderId'
=>
$value
->
getExWarehouseOrderId
()]);
$value
->
exAddTime
=
$exWarehouseOrderInfo
->
getExAddTime
();
$value
->
ExWarehouseOrderSn
=
$exWarehouseOrderInfo
->
getExWarehouseOrderSn
();
$value
->
WarehouseName
=
$exWarehouseOrderInfo
->
getOneWarehouse
()
->
getWarehouseName
();
}
}
return
[
'goodsInfo'
=>
$goodsInfo
,
'exWarehouseOrder'
=>
$exWarehouseOrderInfo
,
'orderGoods'
=>
$orderGoods
];
}
/**
/**
* 批量导出商品
* 批量导出商品
...
@@ -514,5 +574,4 @@ class GoodsController extends AbstractActionController
...
@@ -514,5 +574,4 @@ class GoodsController extends AbstractActionController
exit
;
exit
;
return
;
return
;
}
}
}
}
\ No newline at end of file
module/Store/view/store/goods/exwarehousegoods.phtml
0 → 100644
View file @
746a0133
<div
class=
"content-wrapper"
>
<section
class=
"content-header"
>
<?php
echo
$this
->
partial
(
'layout/breadcrumb'
);
?>
<h1
class=
"pull-right"
>
<a
href=
"
<?php
echo
$this
->
url
(
'stock-ex'
);
?>
"
class=
"btn btn-default btn-sm"
><i
class=
"fa fa-arrow-left"
></i>
<?php
echo
$this
->
translate
(
'返回其他出库单列表'
);
?>
</a>
<button
type=
"button"
onclick=
"toPrint();"
class=
"btn btn-primary btn-sm"
><i
class=
"fa fa-print"
aria-hidden=
"true"
></i>
<?php
echo
$this
->
translate
(
'点击打印'
);
?>
</button>
<?php
echo
$this
->
HelpUrl
(
'otherEx'
);
?>
</h1>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
id=
"to-print-info"
>
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
<?php
echo
$this
->
translate
(
'其他出库单'
);
?>
</h3>
</div>
<div
class=
"box-body"
>
<div
class=
"row"
>
<div
class=
"box-header"
>
<h4
class=
"box-title"
>
<?php
echo
$this
->
translate
(
'出库商品'
);
?>
</h4>
</div>
<div
class=
"box-body table-responsive no-padding"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th
width=
"15%"
>
<?php
echo
$this
->
translate
(
'商品编号'
);
?>
</th>
<th
width=
"20%"
>
<?php
echo
$this
->
translate
(
'商品名称'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'商品规格'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'单位'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'出库单价'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'出库数量'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'出库单号'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'仓库'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'出库时间'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'出库总价'
);
?>
</th>
</tr>
</thead>
<?php
foreach
(
$this
->
orderGoods
as
$goodsValue
)
{
?>
<tr>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsNumber
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsName
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsSpec
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsUnit
());
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$goodsValue
->
getWarehouseGoodsPrice
());
?>
</td>
<td>
<?php
echo
$goodsValue
->
getWarehouseGoodsExNum
();
?>
</td>
<td>
<?php
echo
$goodsValue
->
ExWarehouseOrderSn
;
?>
</td>
<td>
<?php
echo
$goodsValue
->
WarehouseName
;
?>
</td>
<td>
<?php
echo
date
(
"Y-m-d H:i:s"
,
$goodsValue
->
exAddTime
);
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$goodsValue
->
getWarehouseGoodsAmount
());
?>
</td>
</tr>
<?php
}
?>
<tfoot>
<tr>
<td
colspan=
"8"
></td>
<td
colspan=
"2"
class=
"text-right"
><b>
<?php
echo
$this
->
translate
(
'金额合计'
);
?>
:
</b><span
id=
"order-amount"
>
<?php
echo
(
isset
(
$this
->
exWarehouseOrder
)
?
$this
->
erpCurrencyFormat
(
$this
->
exWarehouseOrder
->
getExWarehouseOrderAmount
())
:
0
);
?>
</span></td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
module/Store/view/store/goods/index.phtml
View file @
746a0133
...
@@ -145,8 +145,13 @@
...
@@ -145,8 +145,13 @@
</a>
</a>
<a
href=
"
<?php
echo
$this
->
url
(
'goods'
,
<a
href=
"
<?php
echo
$this
->
url
(
'goods'
,
[
'action'
=>
''
,
'id'
=>
$goods
->
getGoodsId
()]);
?>
"
[
'action'
=>
'otherwarehousegoods'
,
'id'
=>
$goods
->
getGoodsId
()]);
?>
"
class=
"btn btn-xs btn-success"
><i
class=
"fa fa-pencil"
></i>
<?php
echo
$this
->
translate
(
'查看出入库'
);
?>
class=
"btn btn-xs btn-success"
>
<?php
echo
$this
->
translate
(
'入库'
);
?>
</a>
<a
href=
"
<?php
echo
$this
->
url
(
'goods'
,
[
'action'
=>
'exwarehousegoods'
,
'id'
=>
$goods
->
getGoodsId
()]);
?>
"
class=
"btn btn-xs btn-success"
>
<?php
echo
$this
->
translate
(
'出库'
);
?>
</a>
</a>
</td>
</td>
</tr>
</tr>
...
...
module/Store/view/store/goods/otherwarehousegoods.phtml
0 → 100644
View file @
746a0133
<div
class=
"content-wrapper"
>
<section
class=
"content-header"
>
<?php
echo
$this
->
partial
(
'layout/breadcrumb'
);
?>
<h1
class=
"pull-right"
>
<a
href=
"
<?php
echo
$this
->
url
(
'erp-stock'
);
?>
"
class=
"btn btn-default btn-sm"
><i
class=
"fa fa-arrow-left"
></i>
<?php
echo
$this
->
translate
(
'返回其他入库单列表'
);
?>
</a>
<button
type=
"button"
onclick=
"toPrint();"
class=
"btn btn-primary btn-sm"
><i
class=
"fa fa-print"
aria-hidden=
"true"
></i>
<?php
echo
$this
->
translate
(
'点击打印'
);
?>
</button>
<?php
echo
$this
->
HelpUrl
(
'otherImport'
);
?>
</h1>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
id=
"to-print-info"
>
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
<?php
echo
$this
->
translate
(
'入库单'
);
?>
</h3>
</div>
<div
class=
"box-body"
>
<div
class=
"box-header"
>
<h4
class=
"box-title"
>
<?php
echo
$this
->
translate
(
'入库商品'
);
?>
</h4>
</div>
<div
class=
"box-body table-responsive no-padding"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th
width=
"15%"
>
<?php
echo
$this
->
translate
(
'商品编号'
);
?>
</th>
<th
width=
"20%"
>
<?php
echo
$this
->
translate
(
'商品名称'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'商品规格'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'单位'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'入库单价'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'入库数量'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'入库单号'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'仓库'
);
?>
</th>
<th>
<?php
echo
$this
->
translate
(
'入库时间'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'入库总价'
);
?>
</th>
</tr>
</thead>
<?php
foreach
(
$this
->
orderGoods
as
$goodsValue
)
{
?>
<tr>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsNumber
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsName
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsSpec
());
?>
</td>
<td>
<?php
echo
$this
->
escapeHtml
(
$goodsValue
->
getGoodsUnit
());
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$goodsValue
->
getWarehouseGoodsPrice
());
?>
</td>
<td>
<?php
echo
$goodsValue
->
getWarehouseGoodsBuyNum
();
?>
</td>
<td>
<?php
echo
$goodsValue
->
WarehouseOrderSn
;
?>
</td>
<td>
<?php
echo
$goodsValue
->
WarehouseName
;
?>
</td>
<td>
<?php
echo
date
(
"Y-m-d H:i:s"
,
$goodsValue
->
otherAddTime
);
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$goodsValue
->
getWarehouseGoodsAmount
());
?>
</td>
</tr>
<?php
}
?>
<tfoot>
<tr>
<td
colspan=
"8"
></td>
<td
colspan=
"2"
class=
"text-right"
><b>
<?php
echo
$this
->
translate
(
'金额合计'
);
?>
:
</b><span
id=
"order-amount"
>
<?php
echo
(
isset
(
$this
->
otherWarehouseOrder
)
?
$this
->
erpCurrencyFormat
(
$this
->
otherWarehouseOrder
->
getWarehouseOrderAmount
())
:
0
);
?>
</span></td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
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