订单优化
parent
9f9dcfb365
commit
f58b93b066
|
|
@ -63,7 +63,7 @@ class Order
|
|||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单ID/订单号/仓库/商品名称/型号',
|
||||
'placeholder' => '请输入订单ID/订单号/商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
|
|
@ -135,6 +135,20 @@ class Order
|
|||
'is_point' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '出货仓库',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'warehouse_name',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'warehouse_id',
|
||||
'where_type' => 'in',
|
||||
'data' => $this->OrderWarehouseList(),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '订单模式',
|
||||
'view_type' => 'field',
|
||||
|
|
@ -374,6 +388,27 @@ class Order
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单仓库列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-07-29
|
||||
* @desc description
|
||||
*/
|
||||
public function OrderWarehouseList()
|
||||
{
|
||||
$data = [];
|
||||
$wids = Db::name('Order')->column('warehouse_id');
|
||||
if(!empty($wids))
|
||||
{
|
||||
$where = ['id'=>$wids];
|
||||
$order_by = 'level desc, id desc';
|
||||
$data = Db::name('Warehouse')->field('id,name')->where($where)->order($order_by)->select();
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取货码条件处理
|
||||
* @author Devil
|
||||
|
|
@ -457,11 +492,8 @@ class Order
|
|||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 仓库
|
||||
$wids = Db::name('Warehouse')->where('name', 'like', '%'.$value.'%')->column('id');
|
||||
|
||||
// 订单ID、订单号
|
||||
$ids = Db::name('Order')->where(['id|order_no'=>$value])->whereOr(['warehouse_id'=>$wids])->column('id');
|
||||
$ids = Db::name('Order')->where(['id|order_no'=>$value])->column('id');
|
||||
|
||||
// 获取订单详情搜索的订单 id
|
||||
if(empty($ids))
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<strong class="am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
<strong class="am-icon-circle-thin am-margin-left-lg"> {{$module_data.id}}</strong>
|
||||
{{if !empty($module_data['warehouse_name'])}}
|
||||
<span class="am-badge am-badge-secondary-plain am-radius am-fr">{{$module_data.warehouse_name}}</span>
|
||||
<span class="am-icon-map-marker am-fr"> {{$module_data.warehouse_name}}</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-top-0" />
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class Order
|
|||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单号/仓库/商品名称/型号',
|
||||
'placeholder' => '请输入订单号/商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
|
|
@ -441,11 +441,8 @@ class Order
|
|||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 仓库
|
||||
$wids = Db::name('Warehouse')->where('name', 'like', '%'.$value.'%')->column('id');
|
||||
|
||||
// 订单号
|
||||
$ids = Db::name('Order')->where(['order_no'=>$value])->whereOr(['warehouse_id'=>$wids])->column('id');
|
||||
$ids = Db::name('Order')->where(['order_no'=>$value])->column('id');
|
||||
|
||||
// 获取订单详情搜索的订单 id
|
||||
if(empty($ids))
|
||||
|
|
|
|||
|
|
@ -96,16 +96,12 @@
|
|||
{{if !empty($data['warehouse_name'])}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">出货仓库:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<span class="am-badge am-badge-secondary-plain am-radius">{{$data.warehouse_name}}</span>
|
||||
</div>
|
||||
<div class="items-detail am-fl">{{$data.warehouse_name}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">订单模式:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<span class="am-badge am-badge-secondary-plain am-radius">{{$data.order_model_name}}</span>
|
||||
</div>
|
||||
<div class="items-detail am-fl">{{$data.order_model_name}}</div>
|
||||
</div>
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">订单编号:</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<p class="am-margin-bottom-sm">
|
||||
<strong class="am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
{{if !empty($module_data['warehouse_name'])}}
|
||||
<span class="am-badge am-badge-secondary-plain am-radius am-fr">{{$module_data.warehouse_name}}</span>
|
||||
<span class="am-icon-map-marker am-fr"> {{$module_data.warehouse_name}}</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-top-0" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue