Commit 3833cbdf authored by wxl's avatar wxl

退货订单

parent 0cde0777
......@@ -113,6 +113,25 @@ class SearchSalesOrderReturnForm extends Form
'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()
......@@ -187,6 +206,23 @@ class SearchSalesOrderReturnForm extends Form
'name' => 'return_state',
'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
......@@ -48,6 +48,8 @@ class SalesOrderReturnRepository extends EntityRepository
if(isset($search['customer_phone']) && !empty($search['customer_phone'])) $queryBuilder->andWhere($queryBuilder->expr()->like('o.customerPhone', "'%".$search['customer_phone']."%'"));
if(isset($search['customer_id']) && $search['customer_id'] > 0) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.customerId', $search['customer_id']));
if(isset($search['return_state']) && !empty($search['return_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('s.returnState', $search['return_state']));
if(isset($search['start_time']) && !empty($search['start_time'])) $queryBuilder->andWhere($queryBuilder->expr()->gte('s.returnTime', ':startTime'))->setParameter('startTime', strtotime($search['start_time']));
if(isset($search['end_time']) && !empty($search['end_time'])) $queryBuilder->andWhere($queryBuilder->expr()->lte('s.returnTime', ':endTime'))->setParameter('endTime', strtotime($search['end_time']));
return $queryBuilder;
}
......
......@@ -27,6 +27,8 @@
<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="10%"><?php echo $this->translate('申请退货时间'); ?></th>
<th width="10%"><?php echo $this->translate('完成退货时间'); ?></th>
<th width="18%"><?php echo $this->translate('操作'); ?></th>
</tr>
<?php
......@@ -70,6 +72,17 @@
<?php echo $this->formElement($sForm->get('return_state')); ?>
<?php echo $this->formElementErrors($sForm->get('return_state'), ['class'=>'error-message']);?>
</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>
<td>
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-search"></i></button>
<?php if(!empty(array_filter($sForm->getData()))) { ?>
......@@ -89,6 +102,8 @@
<td><?php echo $this->escapeHtml($order->getOneSalesOrder()->getCustomerPhone()); ?></td>
<td><?php echo $this->erpCurrencyFormat($order->getSalesOrderReturnAmount());?></td>
<td><?php echo $this->salesHelper()->salesOrderReturnState($order->getReturnState(), 2); ?></td>
<td><?php echo date("Y-m-d H:i", $order->getReturnTime()); ?></td>
<td><?php echo $order->getReturnFinishTime()?date("Y-m-d H:i", $order->getReturnFinishTime()):''; ?></td>
<td>
<a href="<?php echo $this->url('sales-order-return',
['action'=>'view', 'id'=>$order->getSalesOrderReturnId()]); ?>" class="btn btn-xs btn-info"><i class="fa fa-info-circle"></i> <?php echo $this->translate('查看'); ?></a>
......
......@@ -75,7 +75,12 @@
<b><?php echo $this->translate('客户座机'); ?></b><?php echo $this->escapeHtml($this->returnInfo->getOneSalesOrder()->getCustomerTelephone());?>
</div>
</div>
<div class="col-xs-8 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-4 form-group">
<div class="col-sm-12">
<b><?php echo $this->translate('收货地址'); ?></b><?php echo $this->escapeHtml($this->returnInfo->getOneSalesOrder()->getCustomerAddress());?>
</div>
......
......@@ -74,7 +74,7 @@
</div>
<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());?>
<b><?php echo $this->translate('订单时间'); ?></b><?php echo date("Y-m-d H:i:s", $this->orderInfo->getCreateTime());?>
</div>
</div>
</div>
......
......@@ -81,6 +81,13 @@
</div>
</div>
<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->sendOrderInfo->getCreateTime());?>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-8 form-group">
<div class="col-sm-12">
<b><?php echo $this->translate('备注'); ?></b><?php echo $this->escapeHtml($this->sendOrderInfo->getOneSalesOrder()->getSalesOrderInfo());?>
</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