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
c3b68f3b
Commit
c3b68f3b
authored
Apr 20, 2023
by
wxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加采购入库时间
parent
a01e110b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
1 deletion
+77
-1
module/Purchase/src/Entity/WarehouseOrder.php
module/Purchase/src/Entity/WarehouseOrder.php
+20
-0
module/Purchase/src/Form/SearchWarehouseOrderForm.php
module/Purchase/src/Form/SearchWarehouseOrderForm.php
+36
-0
module/Purchase/src/Repository/WarehouseOrderRepository.php
module/Purchase/src/Repository/WarehouseOrderRepository.php
+2
-0
module/Purchase/src/Service/WarehouseOrderManager.php
module/Purchase/src/Service/WarehouseOrderManager.php
+1
-0
module/Purchase/view/purchase/warehouse-order/index.phtml
module/Purchase/view/purchase/warehouse-order/index.phtml
+12
-0
module/Purchase/view/purchase/warehouse-order/view.phtml
module/Purchase/view/purchase/warehouse-order/view.phtml
+6
-1
No files found.
module/Purchase/src/Entity/WarehouseOrder.php
View file @
c3b68f3b
...
@@ -92,6 +92,12 @@ class WarehouseOrder extends BaseEntity
...
@@ -92,6 +92,12 @@ class WarehouseOrder extends BaseEntity
* @ORM\Column(name="admin_id", type="integer", length=11)
* @ORM\Column(name="admin_id", type="integer", length=11)
*/
*/
private
$adminId
;
private
$adminId
;
/**
* 采购时间
* @ORM\Column(name="create_time", type="integer", length=10)
*/
private
$createTime
;
/**
/**
* @var
* @var
...
@@ -314,5 +320,19 @@ class WarehouseOrder extends BaseEntity
...
@@ -314,5 +320,19 @@ class WarehouseOrder extends BaseEntity
{
{
$this
->
adminId
=
$adminId
;
$this
->
adminId
=
$adminId
;
}
}
/**
* @return mixed
*/
public
function
getCreateTime
()
{
return
$this
->
createTime
;
}
/**
* @param mixed $createTime
*/
public
function
setCreateTime
(
$createTime
)
{
$this
->
createTime
=
$createTime
;
}
}
}
\ No newline at end of file
module/Purchase/src/Form/SearchWarehouseOrderForm.php
View file @
c3b68f3b
...
@@ -112,6 +112,25 @@ class SearchWarehouseOrderForm extends Form
...
@@ -112,6 +112,25 @@ class SearchWarehouseOrderForm extends Form
'class'
=>
'form-control input-sm'
'class'
=>
'form-control input-sm'
]
]
]);
]);
$this
->
add
([
'type'
=>
'text'
,
'name'
=>
'start_time'
,
'attributes'
=>
[
'id'
=>
'start_time'
,
'class'
=>
'form-control input-sm'
,
'placeholder'
=>
$this
->
translator
->
translate
(
'起始时间'
)
]
]);
$this
->
add
([
'type'
=>
'text'
,
'name'
=>
'end_time'
,
'attributes'
=>
[
'id'
=>
'end_time'
,
'class'
=>
'form-control input-sm'
,
'placeholder'
=>
$this
->
translator
->
translate
(
'结束时间'
)
]
]);
}
}
public
function
addInputFilter
()
public
function
addInputFilter
()
...
@@ -187,5 +206,22 @@ class SearchWarehouseOrderForm extends Form
...
@@ -187,5 +206,22 @@ class SearchWarehouseOrderForm extends Form
[
'name'
=>
'ToInt'
]
[
'name'
=>
'ToInt'
]
]
]
]);
]);
$inputFilter
->
add
([
'name'
=>
'start_time'
,
'required'
=>
false
,
'filters'
=>
[
[
'name'
=>
'StringTrim'
],
[
'name'
=>
'StripTags'
]
]
]);
$inputFilter
->
add
([
'name'
=>
'end_time'
,
'required'
=>
false
,
'filters'
=>
[
[
'name'
=>
'StringTrim'
],
[
'name'
=>
'StripTags'
]
]
]);
}
}
}
}
\ No newline at end of file
module/Purchase/src/Repository/WarehouseOrderRepository.php
View file @
c3b68f3b
...
@@ -48,6 +48,8 @@ class WarehouseOrderRepository extends EntityRepository
...
@@ -48,6 +48,8 @@ class WarehouseOrderRepository extends EntityRepository
if
(
isset
(
$search
[
'supplier_id'
])
&&
$search
[
'supplier_id'
]
>
0
)
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.supplierId'
,
$search
[
'supplier_id'
]));
if
(
isset
(
$search
[
'supplier_id'
])
&&
$search
[
'supplier_id'
]
>
0
)
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.supplierId'
,
$search
[
'supplier_id'
]));
if
(
isset
(
$search
[
'payment_code'
])
&&
!
empty
(
$search
[
'payment_code'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.paymentCode'
,
':code'
))
->
setParameter
(
'code'
,
$search
[
'payment_code'
]);
if
(
isset
(
$search
[
'payment_code'
])
&&
!
empty
(
$search
[
'payment_code'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.paymentCode'
,
':code'
))
->
setParameter
(
'code'
,
$search
[
'payment_code'
]);
if
(
isset
(
$search
[
'p_order_state'
])
&&
!
empty
(
$search
[
'p_order_state'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.pOrderState'
,
$search
[
'p_order_state'
]));
if
(
isset
(
$search
[
'p_order_state'
])
&&
!
empty
(
$search
[
'p_order_state'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'o.pOrderState'
,
$search
[
'p_order_state'
]));
if
(
isset
(
$search
[
'start_time'
])
&&
!
empty
(
$search
[
'start_time'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
gte
(
'w.createTime'
,
':startTime'
))
->
setParameter
(
'startTime'
,
strtotime
(
$search
[
'start_time'
]));
if
(
isset
(
$search
[
'end_time'
])
&&
!
empty
(
$search
[
'end_time'
]))
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
lte
(
'w.createTime'
,
':endTime'
))
->
setParameter
(
'endTime'
,
strtotime
(
$search
[
'end_time'
]));
return
$queryBuilder
;
return
$queryBuilder
;
}
}
...
...
module/Purchase/src/Service/WarehouseOrderManager.php
View file @
c3b68f3b
...
@@ -57,6 +57,7 @@ class WarehouseOrderManager
...
@@ -57,6 +57,7 @@ class WarehouseOrderManager
$warehouseOrder
->
setAdminId
(
$adminId
);
$warehouseOrder
->
setAdminId
(
$adminId
);
$warehouseOrder
->
setOneOrder
(
$order
);
$warehouseOrder
->
setOneOrder
(
$order
);
$warehouseOrder
->
setOneWarehouse
(
$warehouseInfo
);
$warehouseOrder
->
setOneWarehouse
(
$warehouseInfo
);
$warehouseOrder
->
setCreateTime
(
time
());
$this
->
entityManager
->
persist
(
$warehouseOrder
);
$this
->
entityManager
->
persist
(
$warehouseOrder
);
$this
->
entityManager
->
flush
();
$this
->
entityManager
->
flush
();
...
...
module/Purchase/view/purchase/warehouse-order/index.phtml
View file @
c3b68f3b
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'付款方式'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'付款方式'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'采购金额'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'采购金额'
);
?>
</th>
<th
width=
"6%"
>
<?php
echo
$this
->
translate
(
'状态'
);
?>
</th>
<th
width=
"6%"
>
<?php
echo
$this
->
translate
(
'状态'
);
?>
</th>
<th
width=
"10%"
>
<?php
echo
$this
->
translate
(
'时间'
);
?>
</th>
<th
width=
"12%"
>
<?php
echo
$this
->
translate
(
'操作'
);
?>
</th>
<th
width=
"12%"
>
<?php
echo
$this
->
translate
(
'操作'
);
?>
</th>
</tr>
</tr>
<?php
<?php
...
@@ -70,6 +71,16 @@
...
@@ -70,6 +71,16 @@
<?php
echo
$this
->
formElement
(
$sForm
->
get
(
'p_order_state'
));
?>
<?php
echo
$this
->
formElement
(
$sForm
->
get
(
'p_order_state'
));
?>
<?php
echo
$this
->
formElementErrors
(
$sForm
->
get
(
'p_order_state'
),
[
'class'
=>
'error-message'
]);
?>
<?php
echo
$this
->
formElementErrors
(
$sForm
->
get
(
'p_order_state'
),
[
'class'
=>
'error-message'
]);
?>
</td>
</td>
<td>
<p>
<?php
echo
$this
->
formElement
(
$sForm
->
get
(
'start_time'
));
?>
</p>
<div>
<?php
echo
$this
->
formElement
(
$sForm
->
get
(
'end_time'
));
?>
</div>
<?php
echo
$this
->
formElementErrors
(
$sForm
->
get
(
'start_time'
),
[
'class'
=>
'error-message'
]);
?>
<?php
echo
$this
->
formElementErrors
(
$sForm
->
get
(
'end_time'
),
[
'class'
=>
'error-message'
]);
?>
</td>
<td>
<td>
<button
type=
"submit"
class=
"btn btn-info btn-sm"
><i
class=
"fa fa-search"
></i></button>
<button
type=
"submit"
class=
"btn btn-info btn-sm"
><i
class=
"fa fa-search"
></i></button>
<?php
if
(
!
empty
(
array_filter
(
$sForm
->
getData
())))
{
?>
<?php
if
(
!
empty
(
array_filter
(
$sForm
->
getData
())))
{
?>
...
@@ -89,6 +100,7 @@
...
@@ -89,6 +100,7 @@
<td>
<?php
echo
$this
->
PurchaseHelper
()
->
orderPayment
(
$order
->
getWarehouseOrderPaymentCode
());
?>
</td>
<td>
<?php
echo
$this
->
PurchaseHelper
()
->
orderPayment
(
$order
->
getWarehouseOrderPaymentCode
());
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$order
->
getWarehouseOrderAmount
());
?>
</td>
<td>
<?php
echo
$this
->
erpCurrencyFormat
(
$order
->
getWarehouseOrderAmount
());
?>
</td>
<td>
<?php
echo
$this
->
PurchaseHelper
()
->
orderState
(
$order
->
getWarehouseOrderState
(),
2
);
?>
</td>
<td>
<?php
echo
$this
->
PurchaseHelper
()
->
orderState
(
$order
->
getWarehouseOrderState
(),
2
);
?>
</td>
<td>
<?php
echo
date
(
"Y-m-d H:i"
,
$order
->
getCreateTime
());
?>
</td>
<td>
<td>
<a
href=
"
<?php
echo
$this
->
url
(
'warehouse-order'
,
<a
href=
"
<?php
echo
$this
->
url
(
'warehouse-order'
,
[
'action'
=>
'view'
,
'id'
=>
$order
->
getWarehouseOrderId
()]);
?>
"
[
'action'
=>
'view'
,
'id'
=>
$order
->
getWarehouseOrderId
()]);
?>
"
...
...
module/Purchase/view/purchase/warehouse-order/view.phtml
View file @
c3b68f3b
...
@@ -91,7 +91,12 @@
...
@@ -91,7 +91,12 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 form-group"
>
<div
class=
"col-xs-4 form-group"
>
<div
class=
"col-sm-12"
>
<b>
<?php
echo
$this
->
translate
(
'采购入库时间'
);
?>
:
</b>
<?php
echo
date
(
"Y-m-d H:i:s"
,
$this
->
orderInfo
->
getCreateTime
());
?>
</div>
</div>
<div
class=
"col-xs-8 form-group"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<b>
<?php
echo
$this
->
translate
(
'备注'
);
?>
:
</b>
<?php
echo
$this
->
escapeHtml
(
$this
->
orderInfo
->
getPOrderInfo
());
?>
<b>
<?php
echo
$this
->
translate
(
'备注'
);
?>
:
</b>
<?php
echo
$this
->
escapeHtml
(
$this
->
orderInfo
->
getPOrderInfo
());
?>
</div>
</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