Commit bd23779c authored by wxl's avatar wxl

添加申请采购退货时间

parent c3b68f3b
...@@ -103,6 +103,25 @@ class SearchOrderReturnForm extends Form ...@@ -103,6 +103,25 @@ class SearchOrderReturnForm 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()
...@@ -167,5 +186,23 @@ class SearchOrderReturnForm extends Form ...@@ -167,5 +186,23 @@ class SearchOrderReturnForm extends Form
'name' => 'return_state', 'name' => 'return_state',
'required' => false 'required' => false
]); ]);
$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
...@@ -47,6 +47,8 @@ class OrderReturnRepository extends EntityRepository ...@@ -47,6 +47,8 @@ class OrderReturnRepository extends EntityRepository
if(isset($search['supplier_phone']) && !empty($search['supplier_phone'])) $queryBuilder->andWhere($queryBuilder->expr()->like('p.supplierPhone', "'%".$search['supplier_phone']."%'")); if(isset($search['supplier_phone']) && !empty($search['supplier_phone'])) $queryBuilder->andWhere($queryBuilder->expr()->like('p.supplierPhone', "'%".$search['supplier_phone']."%'"));
if(isset($search['supplier_id']) && $search['supplier_id'] > 0) $queryBuilder->andWhere($queryBuilder->expr()->eq('p.supplierId', $search['supplier_id'])); if(isset($search['supplier_id']) && $search['supplier_id'] > 0) $queryBuilder->andWhere($queryBuilder->expr()->eq('p.supplierId', $search['supplier_id']));
if(isset($search['return_state']) && !empty($search['return_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.returnState', $search['return_state'])); if(isset($search['return_state']) && !empty($search['return_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.returnState', $search['return_state']));
if(isset($search['start_time']) && !empty($search['start_time'])) $queryBuilder->andWhere($queryBuilder->expr()->gte('o.createTime', ':startTime'))->setParameter('startTime', strtotime($search['start_time']));
if(isset($search['end_time']) && !empty($search['end_time'])) $queryBuilder->andWhere($queryBuilder->expr()->lte('o.createTime', ':endTime'))->setParameter('endTime', strtotime($search['end_time']));
return $queryBuilder; return $queryBuilder;
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,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="15%"><?php echo $this->translate('操作'); ?></th> <th width="15%"><?php echo $this->translate('操作'); ?></th>
</tr> </tr>
<?php <?php
...@@ -65,6 +66,16 @@ ...@@ -65,6 +66,16 @@
<?php echo $this->formElement($sForm->get('return_state')); ?> <?php echo $this->formElement($sForm->get('return_state')); ?>
<?php echo $this->formElementErrors($sForm->get('return_state'), ['class'=>'error-message']);?> <?php echo $this->formElementErrors($sForm->get('return_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()))) { ?>
...@@ -83,6 +94,7 @@ ...@@ -83,6 +94,7 @@
<td><?php echo $this->escapeHtml($order->getOnePOrder()->getSupplierPhone()); ?></td> <td><?php echo $this->escapeHtml($order->getOnePOrder()->getSupplierPhone()); ?></td>
<td><?php echo $this->erpCurrencyFormat($order->getPOrderReturnAmount());?></td> <td><?php echo $this->erpCurrencyFormat($order->getPOrderReturnAmount());?></td>
<td><?php echo $this->PurchaseHelper()->orderReturnState($order->getReturnState(), 2); ?></td> <td><?php echo $this->PurchaseHelper()->orderReturnState($order->getReturnState(), 2); ?></td>
<td><?php echo date("Y-m-d H:i", $order->getReturnTime()); ?></td>
<td> <td>
<a href="<?php echo $this->url('order-return', <a href="<?php echo $this->url('order-return',
['action'=>'view', 'id'=>$order->getOrderReturnId()]); ?>" class="btn btn-xs btn-info"><i class="fa fa-info-circle"></i> <?php echo $this->translate('查看'); ?></a> ['action'=>'view', 'id'=>$order->getOrderReturnId()]); ?>" class="btn btn-xs btn-info"><i class="fa fa-info-circle"></i> <?php echo $this->translate('查看'); ?></a>
......
...@@ -63,7 +63,12 @@ ...@@ -63,7 +63,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->returnInfo->getreturnTime());?>
</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->returnInfo->getPOrderReturnInfo());?> <b><?php echo $this->translate('备注'); ?></b><?php echo $this->escapeHtml($this->returnInfo->getPOrderReturnInfo());?>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment