Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
42a00f24
ShopXO
项目概览
飞鱼0526
/
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,发现更多精彩内容 >>
提交
42a00f24
编写于
6月 08, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单列表优化
上级
2e8825e8
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
247 addition
and
182 deletion
+247
-182
application/admin/controller/Goods.php
application/admin/controller/Goods.php
+2
-2
application/admin/controller/Order.php
application/admin/controller/Order.php
+31
-63
application/admin/form/Goods.php
application/admin/form/Goods.php
+21
-13
application/admin/form/Order.php
application/admin/form/Order.php
+138
-50
application/admin/view/default/order/detail.html
application/admin/view/default/order/detail.html
+6
-6
application/admin/view/default/order/module/express.html
application/admin/view/default/order/module/express.html
+0
-5
application/admin/view/default/order/module/info.html
application/admin/view/default/order/module/info.html
+30
-19
application/admin/view/default/order/module/take.html
application/admin/view/default/order/module/take.html
+1
-1
application/lang/zh-cn.php
application/lang/zh-cn.php
+1
-1
application/module/FormHandleModule.php
application/module/FormHandleModule.php
+16
-13
application/service/OrderService.php
application/service/OrderService.php
+1
-1
public/static/admin/default/css/order.css
public/static/admin/default/css/order.css
+0
-8
未找到文件。
application/admin/controller/Goods.php
浏览文件 @
42a00f24
...
...
@@ -98,12 +98,12 @@ class Goods extends Common
];
// 获取列表
$data_params
=
array
(
$data_params
=
[
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
$where
,
'is_category'
=>
1
,
)
;
]
;
$ret
=
GoodsService
::
GoodsList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
];
$this
->
assign
(
'data'
,
$data
);
...
...
application/admin/controller/Order.php
浏览文件 @
42a00f24
...
...
@@ -51,52 +51,28 @@ class Order extends Common
*/
public
function
Index
()
{
// 参数
$params
=
input
();
$params
[
'user_type'
]
=
'admin'
;
// 分页
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
// 条件
$where
=
OrderService
::
OrderListWhere
(
$params
);
// 获取总数
$total
=
OrderService
::
OrderTotal
(
$where
);
// 总数
$total
=
OrderService
::
OrderTotal
(
$this
->
form_where
);
// 分页
$page_params
=
array
(
'number'
=>
$
number
,
'number'
=>
$
this
->
page_size
,
'total'
=>
$total
,
'where'
=>
$
params
,
'page'
=>
isset
(
$params
[
'page'
])
?
intval
(
$params
[
'page'
])
:
1
,
'where'
=>
$
this
->
data_request
,
'page'
=>
$this
->
page
,
'url'
=>
MyUrl
(
'admin/order/index'
),
);
$page
=
new
\
base\Page
(
$page_params
);
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
// 获取列表
$data_params
=
array
(
'm'
=>
$page
->
GetPageStarNumber
(),
'n'
=>
$
number
,
'where'
=>
$where
,
'n'
=>
$
this
->
page_size
,
'where'
=>
$
this
->
form_
where
,
'is_public'
=>
0
,
'user_type'
=>
'admin'
,
);
$data
=
OrderService
::
OrderList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
// 状态
$this
->
assign
(
'common_order_admin_status'
,
lang
(
'common_order_admin_status'
));
// 支付状态
$this
->
assign
(
'common_order_pay_status'
,
lang
(
'common_order_pay_status'
));
// 订单模式
$this
->
assign
(
'common_site_type_list'
,
lang
(
'common_site_type_list'
));
// 快递公司
$this
->
assign
(
'express_list'
,
ExpressService
::
ExpressList
());
$ret
=
OrderService
::
OrderList
(
$data_params
);
// 发起支付 - 支付方式
$pay_where
=
[
...
...
@@ -104,17 +80,10 @@ class Order extends Common
];
$this
->
assign
(
'buy_payment_list'
,
PaymentService
::
BuyPaymentList
(
$pay_where
));
// 支付方式
$this
->
assign
(
'payment_list'
,
PaymentService
::
PaymentList
());
// 评价状态
$this
->
assign
(
'common_comments_status_list'
,
lang
(
'common_comments_status_list'
));
// 平台
$this
->
assign
(
'common_platform_type'
,
lang
(
'common_platform_type'
));
// 参数
$this
->
assign
(
'params'
,
$params
);
$this
->
assign
(
'params'
,
$this
->
data_request
);
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
$this
->
assign
(
'data_list'
,
$ret
[
'data'
]);
return
$this
->
fetch
();
}
...
...
@@ -127,27 +96,26 @@ class Order extends Common
*/
public
function
Detail
()
{
// 参数
$params
=
input
();
$params
[
'user_type'
]
=
'admin'
;
// 条件
$where
=
OrderService
::
OrderListWhere
(
$params
);
// 获取列表
$data_params
=
array
(
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
$where
,
'is_public'
=>
0
,
'user_type'
=>
'admin'
,
);
$ret
=
OrderService
::
OrderList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
];
$this
->
assign
(
'data'
,
$data
);
// 参数
$this
->
assign
(
'params'
,
$params
);
if
(
!
empty
(
$this
->
data_request
[
'id'
]))
{
// 条件
$where
=
[
[
'is_delete_time'
,
'='
,
0
],
[
'id'
,
'='
,
intval
(
$this
->
data_request
[
'id'
])],
];
// 获取列表
$data_params
=
[
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
$where
,
'is_public'
=>
0
,
'user_type'
=>
'admin'
,
];
$ret
=
OrderService
::
OrderList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
];
$this
->
assign
(
'data'
,
$data
);
}
return
$this
->
fetch
();
}
...
...
application/admin/form/Goods.php
浏览文件 @
42a00f24
...
...
@@ -16,7 +16,7 @@ use app\service\RegionService;
use
app\service\BrandService
;
/**
* 商品动态表
单
* 商品动态表
格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -164,12 +164,12 @@ class Goods
'view_type'
=>
'field'
,
'view_key'
=>
'category_text'
,
'search_config'
=>
[
'form_type'
=>
'module'
,
'template'
=>
'lib/module/goods_category'
,
'form_name'
=>
'id'
,
'where_type'
=>
'in'
,
'where_
custom'
=>
'WhereValueGoodsCategory'
,
'data'
=>
GoodsService
::
GoodsCategoryAll
(),
'form_type'
=>
'module'
,
'template'
=>
'lib/module/goods_category'
,
'form_name'
=>
'id'
,
'where_type'
=>
'in'
,
'where_
handle_custom'
=>
'WhereValueGoodsCategory'
,
'data'
=>
GoodsService
::
GoodsCategoryAll
(),
],
],
[
...
...
@@ -206,7 +206,14 @@ class Goods
'view_key'
=>
'add_time'
,
'search_config'
=>
[
'form_type'
=>
'datetime'
,
'form_name'
=>
'add_time'
,
],
],
[
'label'
=>
'更新时间'
,
'view_type'
=>
'field'
,
'view_key'
=>
'upd_time'
,
'search_config'
=>
[
'form_type'
=>
'datetime'
,
],
],
[
...
...
@@ -227,7 +234,7 @@ class Goods
* @version 1.0.0
* @date 2020-06-03
* @desc description
* @param [
string] $name [字段名称
]
* @param [
array] $value [条件值
]
* @param [array] $params [输入参数]
*/
public
function
WhereValueGoodsCategory
(
$value
,
$params
=
[])
...
...
@@ -241,14 +248,15 @@ class Goods
}
// 获取分类下的所有分类 id
$c
ategory_
ids
=
GoodsService
::
GoodsCategoryItemsIds
(
$value
,
1
);
$cids
=
GoodsService
::
GoodsCategoryItemsIds
(
$value
,
1
);
// 获取商品 id
$
goods_ids
=
Db
::
name
(
'GoodsCategoryJoin'
)
->
where
([
'category_id'
=>
$category_
ids
])
->
column
(
'goods_id'
);
$
ids
=
Db
::
name
(
'GoodsCategoryJoin'
)
->
where
([
'category_id'
=>
$c
ids
])
->
column
(
'goods_id'
);
// 避免空条件造成无效的错觉
return
empty
(
$
goods_ids
)
?
[
0
]
:
$goods_
ids
;
return
empty
(
$
ids
)
?
[
0
]
:
$
ids
;
}
return
$value
;
}
}
\ No newline at end of file
}
?>
\ No newline at end of file
application/admin/form/Order.php
浏览文件 @
42a00f24
...
...
@@ -11,17 +11,15 @@
namespace
app\admin\form
;
use
think\Db
;
use
app\service\GoodsService
;
use
app\service\RegionService
;
use
app\service\BrandService
;
use
app\service\PaymentService
;
use
app\service\ExpressService
;
/**
* 订单动态表
单
* 订单动态表
格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-0
5-16
* @date 2020-0
6-08
* @desc description
*/
class
Order
...
...
@@ -36,7 +34,7 @@ class Order
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-0
5-16
* @date 2020-0
6-08
* @desc description
* @param [array] $params [输入参数]
*/
...
...
@@ -78,11 +76,12 @@ class Order
'view_key'
=>
'order/module/info'
,
'grid_size'
=>
'lg'
,
'search_config'
=>
[
'form_type'
=>
'input'
,
'form_name'
=>
'id'
,
'where_type'
=>
'in'
,
'placeholder'
=>
'请输入商品名称/型号'
,
'where_custom'
=>
'WhereValueBaseInfo'
,
'form_type'
=>
'input'
,
'form_name'
=>
'id'
,
'where_type'
=>
'like'
,
'where_type_custom'
=>
'in'
,
'where_handle_custom'
=>
'WhereValueBaseInfo'
,
'placeholder'
=>
'请输入商品名称/型号'
,
],
],
[
...
...
@@ -91,11 +90,12 @@ class Order
'view_key'
=>
'order/module/user'
,
'grid_size'
=>
'sm'
,
'search_config'
=>
[
'form_type'
=>
'input'
,
'form_name'
=>
'user_id'
,
'where_type'
=>
'in'
,
'placeholder'
=>
'请输入用户名/昵称/手机/邮箱'
,
'where_custom'
=>
'WhereValueUserInfo'
,
'form_type'
=>
'input'
,
'form_name'
=>
'user_id'
,
'where_type'
=>
'like'
,
'where_type_custom'
=>
'in'
,
'where_handle_custom'
=>
'WhereValueUserInfo'
,
'placeholder'
=>
'请输入用户名/昵称/手机/邮箱'
,
],
],
[
...
...
@@ -104,24 +104,24 @@ class Order
'view_key'
=>
'order/module/address'
,
'grid_size'
=>
'sm'
,
'search_config'
=>
[
'form_type'
=>
'input'
,
'form_name'
=>
'user_
id'
,
'where_type'
=>
'in
'
,
'
placeholder'
=>
'请输入收件姓名/电话/地址
'
,
'where_
custom'
=>
'WhereValueAddressInfo'
,
'form_type'
=>
'input'
,
'form_name'
=>
'
id'
,
'where_type'
=>
'like
'
,
'
where_type_custom'
=>
'in
'
,
'where_
handle_custom'
=>
'WhereValueAddressInfo'
,
],
],
[
'label'
=>
'取货信息'
,
'view_type'
=>
'module'
,
'view_key'
=>
'order/module/take'
,
'width'
=>
12
0
,
'width'
=>
12
5
,
'search_config'
=>
[
'form_type'
=>
'input'
,
'form_name'
=>
'id'
,
'where_type'
=>
'=
'
,
'
placeholder'
=>
'请输入取货码
'
,
'where_
custom'
=>
'WhereValueAddress
Info'
,
'form_type'
=>
'input'
,
'form_name'
=>
'id'
,
'where_type'
=>
'like
'
,
'
where_type_custom'
=>
'in
'
,
'where_
handle_custom'
=>
'WhereValueTake
Info'
,
],
],
[
...
...
@@ -164,7 +164,7 @@ class Order
'form_name'
=>
'order_model'
,
'where_type'
=>
'in'
,
'data'
=>
lang
(
'common_site_type_list'
),
'data_key'
=>
'
id
'
,
'data_key'
=>
'
value
'
,
'data_name'
=>
'name'
,
'is_multiple'
=>
1
,
],
...
...
@@ -179,7 +179,7 @@ class Order
'form_name'
=>
'client_type'
,
'where_type'
=>
'in'
,
'data'
=>
lang
(
'common_platform_type'
),
'data_key'
=>
'
id
'
,
'data_key'
=>
'
value
'
,
'data_name'
=>
'name'
,
'is_multiple'
=>
1
,
],
...
...
@@ -272,15 +272,26 @@ class Order
],
],
[
'label'
=>
'快递信息'
,
'view_type'
=>
'module'
,
'view_key'
=>
'order/module/express'
,
'grid_size'
=>
'sm'
,
'label'
=>
'快递公司'
,
'view_type'
=>
'field'
,
'view_key'
=>
'express_name'
,
'search_config'
=>
[
'form_type'
=>
'select'
,
'form_name'
=>
'express_id'
,
'data'
=>
ExpressService
::
ExpressList
(),
'where_type'
=>
'in'
,
'data_key'
=>
'id'
,
'data_name'
=>
'name'
,
'is_multiple'
=>
1
,
],
],
[
'label'
=>
'快递单号'
,
'view_type'
=>
'field'
,
'view_key'
=>
'express_number'
,
'search_config'
=>
[
'form_type'
=>
'input'
,
'form_name'
=>
'express_number'
,
'where_type'
=>
'like'
,
'placeholder'
=>
'请输入快递单号'
,
],
],
[
...
...
@@ -289,6 +300,22 @@ class Order
'view_key'
=>
'order/module/aftersale'
,
'grid_size'
=>
'sm'
,
],
[
'label'
=>
'创建时间'
,
'view_type'
=>
'field'
,
'view_key'
=>
'add_time'
,
'search_config'
=>
[
'form_type'
=>
'datetime'
,
],
],
[
'label'
=>
'更新时间'
,
'view_type'
=>
'field'
,
'view_key'
=>
'upd_time'
,
'search_config'
=>
[
'form_type'
=>
'datetime'
,
],
],
[
'label'
=>
'操作'
,
'view_type'
=>
'operate'
,
...
...
@@ -301,34 +328,95 @@ class Order
}
/**
* 商品分类条件处理
* 取货码条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-08
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public
function
WhereValueTakeInfo
(
$value
,
$params
=
[])
{
if
(
!
empty
(
$value
))
{
// 获取订单 id
$ids
=
Db
::
name
(
'OrderExtractionCode'
)
->
where
(
'code'
,
'='
,
$value
)
->
column
(
'order_id'
);
// 避免空条件造成无效的错觉
return
empty
(
$ids
)
?
[
0
]
:
$ids
;
}
return
$value
;
}
/**
* 收件地址条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-08
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public
function
WhereValueAddressInfo
(
$value
,
$params
=
[])
{
if
(
!
empty
(
$value
))
{
// 获取订单 id
$ids
=
Db
::
name
(
'OrderAddress'
)
->
where
(
'name|tel|address'
,
'like'
,
'%'
.
$value
.
'%'
)
->
column
(
'order_id'
);
// 避免空条件造成无效的错觉
return
empty
(
$ids
)
?
[
0
]
:
$ids
;
}
return
$value
;
}
/**
* 用户信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-0
3
* @date 2020-06-0
8
* @desc description
* @param [string] $
name [字段名称
]
* @param [string] $
value [条件值
]
* @param [array] $params [输入参数]
*/
public
function
WhereValue
GoodsCategory
(
$value
,
$params
=
[])
public
function
WhereValue
UserInfo
(
$value
,
$params
=
[])
{
if
(
!
empty
(
$value
))
{
// 是否为数组
if
(
!
is_array
(
$value
))
{
$value
=
[
$value
];
}
// 获取用户 id
$ids
=
Db
::
name
(
'User'
)
->
where
(
'username|nickname|mobile|email'
,
'like'
,
'%'
.
$value
.
'%'
)
->
column
(
'id'
);
// 获取分类下的所有分类 id
$category_ids
=
GoodsService
::
GoodsCategoryItemsIds
(
$value
,
1
);
// 避免空条件造成无效的错觉
return
empty
(
$ids
)
?
[
0
]
:
$ids
;
}
return
$value
;
}
// 获取商品 id
$goods_ids
=
Db
::
name
(
'GoodsCategoryJoin'
)
->
where
([
'category_id'
=>
$category_ids
])
->
column
(
'goods_id'
);
/**
* 基础信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-08
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public
function
WhereValueBaseInfo
(
$value
,
$params
=
[])
{
if
(
!
empty
(
$value
))
{
// 获取订单详情搜索的订单 id
$ids
=
Db
::
name
(
'OrderDetail'
)
->
where
(
'title|model'
,
'like'
,
'%'
.
$value
.
'%'
)
->
column
(
'order_id'
);
// 避免空条件造成无效的错觉
return
empty
(
$
goods_ids
)
?
[
0
]
:
$goods_
ids
;
return
empty
(
$
ids
)
?
[
0
]
:
$
ids
;
}
return
$value
;
}
}
\ No newline at end of file
}
?>
\ No newline at end of file
application/admin/view/default/order/detail.html
浏览文件 @
42a00f24
...
...
@@ -31,10 +31,10 @@
<dt>
基础信息
</dt>
<dd>
{{foreach $data.items as $vs}}
<div
class=
"
goods-item
"
>
<div
class=
"base"
>
<div
class=
"
am-nbfc am-padding-vertical-xs
"
>
<div
class=
"base
am-nbfc
"
>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$vs['goods_id']])}}"
target=
"_blank"
title=
"{{$vs.title}}"
>
<img
src=
"{{$vs['images']}}"
class=
"am-img-thumbnail am-radius
goods-images
"
/>
<img
src=
"{{$vs['images']}}"
class=
"am-img-thumbnail am-radius
am-margin-right-xs am-fl"
width=
"60"
height=
"60
"
/>
</a>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$vs['goods_id']])}}"
target=
"_blank"
title=
"{{$vs.title}}"
{{
if
!
empty
($
vs
['
title_color
'])}}
style=
"color:{{$vs.title_color}};"
{{/
if
}}
class=
"am-nowrap-initial"
>
{{$vs.title}}
</a>
</div>
...
...
@@ -59,10 +59,10 @@
编码:{{$vs.spec_coding}}
</span>
{{/if}}
<span
class=
"am-fr"
>
{{$vs.price}}x{{$vs.buy_number}}
</span>
{{if $vs['returned_quantity'] gt 0 or $vs['refund_price'] gt 0}}
<span
class=
"am-text-danger am-fr am-margin-
left-sm
"
>
已退 {{$vs.returned_quantity}} / {{$vs.refund_price}}
</span>
<span
class=
"am-text-danger am-fr am-margin-
right-lg
"
>
已退 {{$vs.returned_quantity}} / {{$vs.refund_price}}
</span>
{{/if}}
<span
class=
"am-fr"
>
{{$vs.price}}x{{$vs.buy_number}}
</span>
</div>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
</div>
...
...
@@ -115,7 +115,7 @@
</p>
{{if !empty($data['extraction_data']['images'])}}
<p
class=
"am-margin-top-xs"
>
<img
class=
"am-img-thumbnail"
src=
"{{$data.extraction_data.images}}"
alt=
"取货码"
/>
<img
class=
"am-img-thumbnail"
src=
"{{$data.extraction_data.images}}"
alt=
"取货码"
width=
"150"
height=
"150"
/>
</p>
{{/if}}
{{else /}}
...
...
application/admin/view/default/order/module/express.html
已删除
100644 → 0
浏览文件 @
2e8825e8
<!-- 快递信息 -->
{{if !empty($module_data) and !empty($module_data['express_name'])}}
<p>
快递:{{$module_data.express_name}}
</p>
<p>
单号:{{$module_data.express_number}}
</p>
{{/if}}
\ No newline at end of file
application/admin/view/default/order/module/info.html
浏览文件 @
42a00f24
<!-- 订单基础信息 -->
{{if !empty($module_data) and !empty($module_data['items'])}}
{{foreach $module_data.items as $item}}
<div
class=
"am-nbfc am-padding-vertical-xs"
>
<div
class=
"base am-nbfc"
>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$item['goods_id']])}}"
target=
"_blank"
title=
"{{$item.title}}"
>
<img
src=
"{{$item['images']}}"
class=
"am-img-thumbnail am-radius am-margin-right-xs am-fl"
width=
"60"
height=
"60"
/>
</a>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$item['goods_id']])}}"
target=
"_blank"
title=
"{{$item.title}}"
{{
if
!
empty
($
item
['
title_color
'])}}
style=
"color:{{$item.title_color}};"
{{/
if
}}
class=
"am-nowrap-initial"
>
{{$item.title}}
</a>
</div>
<div
class=
"other am-nbfc"
>
<span
class=
"am-fl am-text-xs am-nowrap-initial"
>
{{if !empty($item.spec_text)}}
{{$item.spec_text}}
{{foreach $module_data.items as $key=>$item}}
{{if $key eq 0}}
<div
class=
"am-nbfc am-padding-vertical-xs"
>
<div
class=
"base am-nbfc"
>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$item['goods_id']])}}"
target=
"_blank"
title=
"{{$item.title}}"
>
<img
src=
"{{$item['images']}}"
class=
"am-img-thumbnail am-radius am-margin-right-xs am-fl"
width=
"60"
height=
"60"
/>
</a>
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$item['goods_id']])}}"
target=
"_blank"
title=
"{{$item.title}}"
{{
if
!
empty
($
item
['
title_color
'])}}
style=
"color:{{$item.title_color}};"
{{/
if
}}
class=
"am-nowrap-initial"
>
{{$item.title}}
</a>
</div>
<div
class=
"other am-nbfc"
>
<span
class=
"am-fl am-text-xs am-nowrap-initial"
>
{{if !empty($item.spec_text)}}
{{$item.spec_text}}
{{/if}}
</span>
<span
class=
"am-fr"
>
{{$item.price}}x{{$item.buy_number}}
</span>
{{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}}
<span
class=
"am-text-danger am-fr am-margin-right-lg"
>
已退 {{$item.returned_quantity}} / {{$item.refund_price}}
</span>
{{/if}}
</span>
<span
class=
"am-fr"
>
{{$item.price}}x{{$item.buy_number}}
</span>
{{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}}
<span
class=
"am-text-danger am-fr am-margin-right-lg"
>
已退 {{$item.returned_quantity}} / {{$item.refund_price}}
</span>
{{/if}}
</div>
</div>
</div>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
{{/if}}
{{php}}break;{{/php}}
{{/foreach}}
<div
class=
"am-margin-top-sm"
>
{{$module_data.describe}}
</div>
{{if count($module_data.items) gt 1}}
<div
class=
"am-text-center"
>
<button
type=
"button"
class=
"am-btn am-btn-link am-btn-xs am-radius submit-popup"
data-url=
"{{:MyUrl('admin/order/detail', ['id'=>$module_data['id']])}}"
>
<i
class=
"am-icon-caret-down"
></i>
<span>
查看更多
</span>
</button>
</div>
{{/if}}
{{/if}}
\ No newline at end of file
application/admin/view/default/order/module/take.html
浏览文件 @
42a00f24
...
...
@@ -3,7 +3,7 @@
<p>
<span>
取货码:
</span>
{{if empty($module_data['extraction_data']['code'])}}
<span
class=
"am-text-danger"
>
取货码不存在、请联系管理员
</span>
<span
class=
"am-text-danger"
>
无
</span>
{{else /}}
<span
class=
"am-badge am-badge-success am-radius"
>
{{$module_data.extraction_data.code}}
</span>
{{/if}}
...
...
application/lang/zh-cn.php
浏览文件 @
42a00f24
...
...
@@ -102,7 +102,7 @@ return array(
'common_order_admin_status'
=>
array
(
0
=>
array
(
'id'
=>
0
,
'name'
=>
'待确认'
,
'checked'
=>
true
),
1
=>
array
(
'id'
=>
1
,
'name'
=>
'已确认/待支付'
),
2
=>
array
(
'id'
=>
2
,
'name'
=>
'
已支付/
待发货/待取货'
),
2
=>
array
(
'id'
=>
2
,
'name'
=>
'待发货/待取货'
),
3
=>
array
(
'id'
=>
3
,
'name'
=>
'已发货/待收货'
),
4
=>
array
(
'id'
=>
4
,
'name'
=>
'已完成'
),
5
=>
array
(
'id'
=>
5
,
'name'
=>
'已取消'
),
...
...
application/module/FormHandleModule.php
浏览文件 @
42a00f24
...
...
@@ -248,8 +248,11 @@ class FormHandleModule
$name
=
$v
[
'search_config'
][
'form_name'
];
// 条件类型
$type
=
isset
(
$v
[
'search_config'
][
'where_type'
])
?
$v
[
'search_config'
][
'where_type'
]
:
$v
[
'search_config'
][
'form_type'
];
// 是否自定义条件类型
$type_custom
=
isset
(
$v
[
'search_config'
][
'where_type_custom'
])
?
$v
[
'search_config'
][
'where_type_custom'
]
:
$type
;
// 是否自定义条件处理方法
$custom
=
isset
(
$v
[
'search_config'
][
'where_custom'
])
?
$v
[
'search_config'
][
'where_custom'
]
:
''
;
$handle_custom
=
isset
(
$v
[
'search_config'
][
'where_handle_custom'
])
?
$v
[
'search_config'
][
'where_handle_custom'
]
:
''
;
// 根据条件类型处理
switch
(
$type
)
{
...
...
@@ -267,16 +270,16 @@ class FormHandleModule
$this
->
where_params
[
$form_key
]
=
$value
;
// 条件值处理
$value
=
$this
->
WhereValueHandle
(
$value
,
$custom
);
$value
=
$this
->
WhereValueHandle
(
$value
,
$
handle_
custom
);
// 是否 like 条件
if
(
$type
==
'like'
)
if
(
$type
==
'like'
&&
is_string
(
$value
)
)
{
$value
=
'%'
.
$value
.
'%'
;
}
// 条件
$this
->
where
[]
=
[
$name
,
$type
,
$value
];
$this
->
where
[]
=
[
$name
,
$type
_custom
,
$value
];
}
break
;
...
...
@@ -293,7 +296,7 @@ class FormHandleModule
$this
->
where_params
[
$form_key
]
=
$value
;
// 条件
$this
->
where
[]
=
[
$name
,
$type
,
$this
->
WhereValueHandle
(
$value
,
$
custom
)];
$this
->
where
[]
=
[
$name
,
$type
_custom
,
$this
->
WhereValueHandle
(
$value
,
$handle_
custom
)];
}
break
;
...
...
@@ -308,7 +311,7 @@ class FormHandleModule
$this
->
where_params
[
$key_min
]
=
$value
;
// 条件
$this
->
where
[]
=
[
$name
,
'>='
,
$this
->
WhereValueHandle
(
$value
,
$custom
,
[
'is_min'
=>
1
])];
$this
->
where
[]
=
[
$name
,
'>='
,
$this
->
WhereValueHandle
(
$value
,
$
handle_
custom
,
[
'is_min'
=>
1
])];
}
if
(
array_key_exists
(
$key_max
,
$this
->
out_params
)
&&
$this
->
out_params
[
$key_max
]
!==
null
&&
$this
->
out_params
[
$key_max
]
!==
''
)
{
...
...
@@ -317,7 +320,7 @@ class FormHandleModule
$this
->
where_params
[
$key_max
]
=
$value
;
// 条件
$this
->
where
[]
=
[
$name
,
'<='
,
$this
->
WhereValueHandle
(
$value
,
$custom
,
[
'is_end'
=>
1
])];
$this
->
where
[]
=
[
$name
,
'<='
,
$this
->
WhereValueHandle
(
$value
,
$
handle_
custom
,
[
'is_end'
=>
1
])];
}
break
;
...
...
@@ -333,7 +336,7 @@ class FormHandleModule
$this
->
where_params
[
$key_start
]
=
$value
;
// 条件
$this
->
where
[]
=
[
$name
,
'>='
,
$this
->
WhereValueHandle
(
strtotime
(
$value
),
$custom
,
[
'is_start'
=>
1
])];
$this
->
where
[]
=
[
$name
,
'>='
,
$this
->
WhereValueHandle
(
strtotime
(
$value
),
$
handle_
custom
,
[
'is_start'
=>
1
])];
}
if
(
array_key_exists
(
$key_end
,
$this
->
out_params
)
&&
$this
->
out_params
[
$key_end
]
!==
null
&&
$this
->
out_params
[
$key_end
]
!==
''
)
{
...
...
@@ -342,7 +345,7 @@ class FormHandleModule
$this
->
where_params
[
$key_end
]
=
$value
;
// 条件
$this
->
where
[]
=
[
$name
,
'<='
,
$this
->
WhereValueHandle
(
strtotime
(
$value
),
$custom
,
[
'is_end'
=>
1
])];
$this
->
where
[]
=
[
$name
,
'<='
,
$this
->
WhereValueHandle
(
strtotime
(
$value
),
$
handle_
custom
,
[
'is_end'
=>
1
])];
}
break
;
...
...
@@ -434,15 +437,15 @@ class FormHandleModule
* @date 2020-06-04
* @desc description
* @param [mixed] $value [条件值]
* @param [
mixed] $custom
[自定义处理方法名称]
* @param [
string] $action
[自定义处理方法名称]
* @param [array] $params [输入参数]
*/
function
WhereValueHandle
(
$value
,
$
custom
=
''
,
$params
=
[])
function
WhereValueHandle
(
$value
,
$
action
=
''
,
$params
=
[])
{
// 模块是否自定义方法处理条件
if
(
!
empty
(
$
custom
)
&&
method_exists
(
$this
->
module_obj
,
$custom
))
if
(
!
empty
(
$
action
)
&&
method_exists
(
$this
->
module_obj
,
$action
))
{
return
$this
->
module_obj
->
$
custom
(
$value
,
$params
);
return
$this
->
module_obj
->
$
action
(
$value
,
$params
);
}
// 默认直接返回值
...
...
application/service/OrderService.php
浏览文件 @
42a00f24
...
...
@@ -853,7 +853,7 @@ class OrderService
$v
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
// 更新时间
$v
[
'upd_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_time'
]);
$v
[
'upd_time'
]
=
empty
(
$v
[
'upd_time'
])
?
null
:
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_time'
]);
// 确认时间
$v
[
'confirm_time'
]
=
empty
(
$v
[
'confirm_time'
])
?
null
:
date
(
'Y-m-d H:i:s'
,
$v
[
'confirm_time'
]);
...
...
public/static/admin/default/css/order.css
浏览文件 @
42a00f24
/**
* 商品列表
*/
.goods-images
{
width
:
60px
;
height
:
60px
;
float
:
left
;
margin-right
:
5px
;
}
.goods-item
,
.goods-item
.base
,
.goods-item
.other
{
overflow
:
hidden
;
}
/**
* 业务弹窗
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录