Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
f58b93b0
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f58b93b0
编写于
7月 29, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单优化
上级
9f9dcfb3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
43 addition
and
18 deletion
+43
-18
application/admin/form/Order.php
application/admin/form/Order.php
+37
-5
application/admin/view/default/order/module/goods.html
application/admin/view/default/order/module/goods.html
+1
-1
application/index/form/Order.php
application/index/form/Order.php
+2
-5
application/index/view/default/order/detail.html
application/index/view/default/order/detail.html
+2
-6
application/index/view/default/order/module/goods.html
application/index/view/default/order/module/goods.html
+1
-1
未找到文件。
application/admin/form/Order.php
浏览文件 @
f58b93b0
...
...
@@ -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
))
...
...
application/admin/view/default/order/module/goods.html
浏览文件 @
f58b93b0
...
...
@@ -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"
/>
...
...
application/index/form/Order.php
浏览文件 @
f58b93b0
...
...
@@ -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
))
...
...
application/index/view/default/order/detail.html
浏览文件 @
f58b93b0
...
...
@@ -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>
...
...
application/index/view/default/order/module/goods.html
浏览文件 @
f58b93b0
...
...
@@ -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"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录