Commit 0cde0777 authored by wxl's avatar wxl

添加发货时间

parent 723a473e
...@@ -93,7 +93,7 @@ class WarehouseOrder extends BaseEntity ...@@ -93,7 +93,7 @@ class WarehouseOrder extends BaseEntity
*/ */
private $adminId; private $adminId;
/** /**
* 采购时间 * 时间
* @ORM\Column(name="create_time", type="integer", length=10) * @ORM\Column(name="create_time", type="integer", length=10)
*/ */
private $createTime; private $createTime;
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
<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="10%"><?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
...@@ -76,6 +77,7 @@ ...@@ -76,6 +77,7 @@
<?php echo $this->formElementErrors($sForm->get('start_time'), ['class'=>'error-message']); ?> <?php echo $this->formElementErrors($sForm->get('start_time'), ['class'=>'error-message']); ?>
<?php echo $this->formElementErrors($sForm->get('end_time'), ['class'=>'error-message']); ?> <?php echo $this->formElementErrors($sForm->get('end_time'), ['class'=>'error-message']); ?>
</td> </td>
<td></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()))) { ?>
...@@ -95,6 +97,7 @@ ...@@ -95,6 +97,7 @@
<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><?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> <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>
......
...@@ -119,7 +119,7 @@ class SalesOrder extends BaseEntity ...@@ -119,7 +119,7 @@ class SalesOrder extends BaseEntity
private $adminId; private $adminId;
/** /**
* 采购时间 * 时间
* @ORM\Column(name="create_time", type="integer", length=10) * @ORM\Column(name="create_time", type="integer", length=10)
*/ */
private $createTime; private $createTime;
......
...@@ -57,6 +57,11 @@ class SalesSendOrder ...@@ -57,6 +57,11 @@ class SalesSendOrder
*/ */
private $adminId; private $adminId;
/**
* 时间
* @ORM\Column(name="create_time", type="integer", length=10)
*/
private $createTime;
/** /**
* 一对一,销售订单 * 一对一,销售订单
* @ORM\OneToOne(targetEntity="Sales\Entity\SalesOrder") * @ORM\OneToOne(targetEntity="Sales\Entity\SalesOrder")
...@@ -160,4 +165,20 @@ class SalesSendOrder ...@@ -160,4 +165,20 @@ class SalesSendOrder
$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
...@@ -112,6 +112,25 @@ class SearchSendOrderForm extends Form ...@@ -112,6 +112,25 @@ class SearchSendOrderForm 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()
...@@ -198,5 +217,22 @@ class SearchSendOrderForm extends Form ...@@ -198,5 +217,22 @@ class SearchSendOrderForm 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
...@@ -49,6 +49,9 @@ class SalesSendOrderRepository extends EntityRepository ...@@ -49,6 +49,9 @@ class SalesSendOrderRepository extends EntityRepository
if(isset($search['receivables_code']) && !empty($search['receivables_code'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.receivablesCode', ':code'))->setParameter('code', $search['receivables_code']); if(isset($search['receivables_code']) && !empty($search['receivables_code'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.receivablesCode', ':code'))->setParameter('code', $search['receivables_code']);
if(isset($search['sales_order_state']) && is_numeric($search['sales_order_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.salesOrderState', $search['sales_order_state'])); if(isset($search['sales_order_state']) && is_numeric($search['sales_order_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('o.salesOrderState', $search['sales_order_state']));
if(isset($search['return_state']) && is_numeric($search['return_state'])) $queryBuilder->andWhere($queryBuilder->expr()->eq('s.returnState', $search['return_state'])); if(isset($search['return_state']) && is_numeric($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.createTime', ':startTime'))->setParameter('startTime', strtotime($search['start_time']));
if(isset($search['end_time']) && !empty($search['end_time'])) $queryBuilder->andWhere($queryBuilder->expr()->lte('s.createTime', ':endTime'))->setParameter('endTime', strtotime($search['end_time']));
return $queryBuilder; return $queryBuilder;
} }
......
...@@ -47,6 +47,7 @@ class SalesSendOrderManager ...@@ -47,6 +47,7 @@ class SalesSendOrderManager
$sendOrder->setReturnState(0); $sendOrder->setReturnState(0);
$sendOrder->setAdminId($adminId); $sendOrder->setAdminId($adminId);
$sendOrder->setOneSalesOrder($salesOrder); $sendOrder->setOneSalesOrder($salesOrder);
$sendOrder->setCreateTime(time());
$this->entityManager->persist($sendOrder); $this->entityManager->persist($sendOrder);
$this->entityManager->flush(); $this->entityManager->flush();
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<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="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
...@@ -76,6 +77,16 @@ ...@@ -76,6 +77,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 <?php
...@@ -98,6 +109,7 @@ ...@@ -98,6 +109,7 @@
<td><?php echo $this->erpCurrencyFormat($order->getOneSalesOrder()->getSalesOrderAmount());?></td> <td><?php echo $this->erpCurrencyFormat($order->getOneSalesOrder()->getSalesOrderAmount());?></td>
<td><?php echo $this->salesHelper()->salesOrderState($order->getOneSalesOrder()->getSalesOrderState(), 2); ?></td> <td><?php echo $this->salesHelper()->salesOrderState($order->getOneSalesOrder()->getSalesOrderState(), 2); ?></td>
<td><?php echo ($order->getReturnState() == 1 ? '<b class="text-danger">'.$this->translate('有').'</b>' : $this->translate('无')); ?></td> <td><?php echo ($order->getReturnState() == 1 ? '<b class="text-danger">'.$this->translate('有').'</b>' : $this->translate('无')); ?></td>
<td><?php echo date("Y-m-d H:i", $order->getCreateTime()); ?></td>
<td> <td>
<a href="<?php echo $this->url('sales-send-order', <a href="<?php echo $this->url('sales-send-order',
['action'=>'view', 'id'=>$order->getSendOrderId()]); ?>" ['action'=>'view', 'id'=>$order->getSendOrderId()]); ?>"
......
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