diff --git a/application/admin/controller/Admin.php b/application/admin/controller/Admin.php index bed8d9b55..f40a253b7 100755 --- a/application/admin/controller/Admin.php +++ b/application/admin/controller/Admin.php @@ -78,6 +78,35 @@ class Admin extends Common return $this->fetch(); } + /** + * 详情 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-08-05T08:21:54+0800 + */ + public function Detail() + { + if(!empty($this->data_request['id'])) + { + // 条件 + $where = [ + ['id', '=', intval($this->data_request['id'])], + ]; + + // 获取列表 + $data_params = [ + 'm' => 0, + 'n' => 1, + 'where' => $where, + ]; + $ret = AdminService::AdminList($data_params); + $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; + $this->assign('data', $data); + } + return $this->fetch(); + } + /** * [SaveInfo 管理员添加/编辑页面] * @author Devil diff --git a/application/admin/controller/Goods.php b/application/admin/controller/Goods.php index d2953a814..40385afaf 100755 --- a/application/admin/controller/Goods.php +++ b/application/admin/controller/Goods.php @@ -108,9 +108,6 @@ class Goods extends Common $ret = GoodsService::GoodsList($data_params); $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; $this->assign('data', $data); - - // 是否上下架 - $this->assign('common_is_shelves_list', lang('common_is_shelves_list')); } return $this->fetch(); } @@ -232,13 +229,13 @@ class Goods extends Common } /** - * [StatusShelves 上下架状态更新] + * 状态更新 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-01-12T22:23:06+0800 */ - public function StatusShelves() + public function StatusUpdate() { // 是否ajax if(!IS_AJAX) @@ -249,29 +246,6 @@ class Goods extends Common // 开始操作 $params = $this->data_post; $params['admin'] = $this->admin; - $params['field'] = 'is_shelves'; - return GoodsService::GoodsStatusUpdate($params); - } - - /** - * [StatusHomeRecommended 是否首页推荐状态更新] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2017-01-12T22:23:06+0800 - */ - public function StatusHomeRecommended() - { - // 是否ajax - if(!IS_AJAX) - { - return $this->error('非法访问'); - } - - // 开始操作 - $params = $this->data_post; - $params['admin'] = $this->admin; - $params['field'] = 'is_home_recommended'; return GoodsService::GoodsStatusUpdate($params); } } diff --git a/application/admin/form/Admin.php b/application/admin/form/Admin.php index 98206564c..30754c388 100644 --- a/application/admin/form/Admin.php +++ b/application/admin/form/Admin.php @@ -40,7 +40,6 @@ class Admin // 基础配置 'base' => [ 'key_field' => 'id', - 'status_field' => 'status', 'is_search' => 1, 'search_url' => MyUrl('admin/admin/index'), 'is_delete' => 1, @@ -55,10 +54,9 @@ class Admin 'checked_text' => '反选', 'not_checked_text' => '全选', 'align' => 'center', + 'not_show_data' => [1], + 'not_show_key' => 'id', 'width' => 80, - 'is_not_show' => 1, - 'not_data' => [1], - 'not_key' => 'id', ], [ 'label' => '管理员', diff --git a/application/admin/form/Goods.php b/application/admin/form/Goods.php index efeccda5e..254eba081 100644 --- a/application/admin/form/Goods.php +++ b/application/admin/form/Goods.php @@ -51,6 +51,7 @@ class Goods 'is_delete' => 1, 'delete_url' => MyUrl('admin/goods/delete'), 'delete_key' => 'ids', + 'detail_title' => '基础信息', ], // 表单配置 'form' => [ @@ -69,7 +70,6 @@ class Goods 'width' => 105, 'search_config' => [ 'form_type' => 'input', - 'form_name' => 'id', 'where_type' => '=', ], ], @@ -106,7 +106,7 @@ class Goods ], ], [ - 'label' => '库存数量', + 'label' => '库存总量', 'view_type' => 'field', 'view_key' => ['inventory', 'inventory_unit'], 'view_key_join' => ' ', @@ -119,7 +119,7 @@ class Goods 'label' => '上下架', 'view_type' => 'status', 'view_key' => 'is_shelves', - 'post_url' => MyUrl('admin/goods/statusshelves'), + 'post_url' => MyUrl('admin/goods/statusupdate'), 'is_form_su' => 1, 'align' => 'center', 'search_config' => [ @@ -135,7 +135,22 @@ class Goods 'label' => '首页推荐', 'view_type' => 'status', 'view_key' => 'is_home_recommended', - 'post_url' => MyUrl('admin/goods/statushomerecommended'), + 'post_url' => MyUrl('admin/goods/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_text_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '扣减库存', + 'view_type' => 'status', + 'view_key' => 'is_deduction_inventory', + 'post_url' => MyUrl('admin/goods/statusupdate'), 'align' => 'center', 'search_config' => [ 'form_type' => 'select', @@ -152,7 +167,6 @@ class Goods 'view_key' => 'model', 'search_config' => [ 'form_type' => 'input', - 'form_name' => 'model', 'where_type' => 'like', ], ], @@ -197,6 +211,30 @@ class Goods 'is_multiple' => 1, ], ], + [ + 'label' => '单次最低起购数量', + 'view_type' => 'field', + 'view_key' => 'buy_min_number', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '单次最大购买数量', + 'view_type' => 'field', + 'view_key' => 'buy_max_number', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '访问次数', + 'view_type' => 'field', + 'view_key' => 'access_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], [ 'label' => '创建时间', 'view_type' => 'field', diff --git a/application/admin/form/Order.php b/application/admin/form/Order.php index b4f1c40c5..e8510f2d0 100644 --- a/application/admin/form/Order.php +++ b/application/admin/form/Order.php @@ -46,6 +46,7 @@ class Order 'key_field' => 'id', 'is_search' => 1, 'search_url' => MyUrl('admin/order/index'), + 'detail_title' => '基础信息', ], // 表单配置 'form' => [ @@ -74,6 +75,7 @@ class Order 'view_type' => 'module', 'view_key' => 'order/module/info', 'grid_size' => 'lg', + 'is_detail' => 0, 'search_config' => [ 'form_type' => 'input', 'form_name' => 'id', @@ -102,6 +104,7 @@ class Order 'view_type' => 'module', 'view_key' => 'order/module/address', 'grid_size' => 'sm', + 'is_detail' => 0, 'search_config' => [ 'form_type' => 'input', 'form_name' => 'id', @@ -115,6 +118,7 @@ class Order 'view_type' => 'module', 'view_key' => 'order/module/take', 'width' => 125, + 'is_detail' => 0, 'search_config' => [ 'form_type' => 'input', 'form_name' => 'id', @@ -227,6 +231,14 @@ class Order 'form_type' => 'section', ], ], + [ + 'label' => '购买总数', + 'view_type' => 'field', + 'view_key' => 'buy_number_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], [ 'label' => '增加金额(元)', 'view_type' => 'field', @@ -259,6 +271,16 @@ class Order 'is_multiple' => 1, ], ], + [ + 'label' => '用户备注', + 'view_type' => 'field', + 'view_key' => 'user_note', + 'width' => 120, + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'like', + ], + ], [ 'label' => '扩展信息', 'view_type' => 'module', @@ -299,6 +321,54 @@ class Order 'view_key' => 'order/module/aftersale', 'grid_size' => 'sm', ], + [ + 'label' => '确认时间', + 'view_type' => 'field', + 'view_key' => 'confirm_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '支付时间', + 'view_type' => 'field', + 'view_key' => 'pay_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '发货时间', + 'view_type' => 'field', + 'view_key' => 'delivery_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '完成时间', + 'view_type' => 'field', + 'view_key' => 'collect_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '取消时间', + 'view_type' => 'field', + 'view_key' => 'cancel_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '关闭时间', + 'view_type' => 'field', + 'view_key' => 'close_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], [ 'label' => '创建时间', 'view_type' => 'field', diff --git a/application/admin/view/default/admin/detail.html b/application/admin/view/default/admin/detail.html new file mode 100644 index 000000000..06eeee457 --- /dev/null +++ b/application/admin/view/default/admin/detail.html @@ -0,0 +1,2 @@ + +{{extend name="public/module/detail" /}} \ No newline at end of file diff --git a/application/admin/view/default/admin/module/operate.html b/application/admin/view/default/admin/module/operate.html index a46fd5e10..257d0b1b1 100644 --- a/application/admin/view/default/admin/module/operate.html +++ b/application/admin/view/default/admin/module/operate.html @@ -1,15 +1,18 @@ -{{if $module_data['id'] eq 1}} - 不可操作 -{{else /}} + + +{{if $module_data['id'] neq 1 or $module_data['id'] eq $admin['id']}} 编辑 - {{if $module_data['id'] neq $admin['id']}} - - {{/if}} +{{/if}} +{{if $module_data['id'] neq 1 and $module_data['id'] neq $admin['id']}} + {{/if}} \ No newline at end of file diff --git a/application/admin/view/default/goods/detail.html b/application/admin/view/default/goods/detail.html index 017b1656e..0ee3171ad 100644 --- a/application/admin/view/default/goods/detail.html +++ b/application/admin/view/default/goods/detail.html @@ -1,94 +1,53 @@ - + {{extend name="public/module/detail" /}} - -{{if !empty($data)}} - {{block name="detail_data"}} -
-
标题名称
-
-
- - - - {{$data.title}} + +{{block name="detail_data"}} + + {__block__} + + +
+
电脑端详情
+
+
+ {{$data.content_web|raw}} +
+
+
+ + +
+
虚拟商品展示数据
+
+ {{if !empty($data['fictitious_goods_value'])}} +
+ {{$data.fictitious_goods_value|raw}}
-
+ {{else /}} +
没有相关数据
+ {{/if}} + + -
商品简述
-
{{$data.simple_desc}}
+ +
+
SEO信息
+
+ {{if !empty($data)}} +
+
SEO标题
+
{{$data.seo_title}}
-
销售价格(元)
-
- {{$data.price}} - {{if !empty($data['original_price']) and $data['original_price'] gt 0}} -
原价 {{$data.original_price}} - {{/if}} -
+
SEO关键字
+
{{$data.seo_keywords}}
-
上下架
-
{{$common_is_shelves_list[$data['is_shelves']]['name']}}
- -
库存数量
-
{{$data.inventory}} {{$data.inventory_unit}}
- -
最低起购数量
-
{{$data.buy_min_number}} {{$data.inventory_unit}}
- -
单次最大购买数量
-
- {{if $data['buy_max_number'] eq 0}} - 不限 - {{else /}} - {{$data.buy_max_number}} {{$data.inventory_unit}} - {{/if}} -
- -
商品型号
-
{{$data.model}}
- -
品牌
-
{{$data.brand_name}}
- -
生产地
-
{{$data.place_origin_name}}
- -
商品分类
-
{{$data.category_text}}
- -
购买赠送积分
-
{{$data.give_integral}}
- -
扣减库存
-
{{:lang('common_is_text_list')[$data['is_deduction_inventory']]['name']}}
- -
访问次数
-
{{$data.access_count}}
- -
电脑端详情
-
-
{{$data.content_web|raw}}
-
- -
虚拟商品展示数据
-
-
{{$data.fictitious_goods_value|raw}}
-
- -
SEO标题
-
{{$data.seo_title}}
- -
SEO关键字
-
{{$data.seo_keywords}}
- -
SEO描述
-
{{$data.seo_desc}}
- -
创建时间
-
{{$data.add_time}}
- -
更新时间
-
{{$data.upd_time}}
-
- {{/block}} -{{/if}} \ No newline at end of file +
SEO描述
+
{{$data.seo_desc}}
+
+ {{else /}} +
没有相关数据
+ {{/if}} + + +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/goods/save_info.html b/application/admin/view/default/goods/save_info.html index ea3c25640..fd2a51ea8 100755 --- a/application/admin/view/default/goods/save_info.html +++ b/application/admin/view/default/goods/save_info.html @@ -129,10 +129,6 @@ -
- - -
diff --git a/application/admin/view/default/goodscomments/detail.html b/application/admin/view/default/goodscomments/detail.html index 5327537b1..06eeee457 100644 --- a/application/admin/view/default/goodscomments/detail.html +++ b/application/admin/view/default/goodscomments/detail.html @@ -1,91 +1,2 @@ - -{{extend name="public/module/detail" /}} - - -{{if !empty($data)}} - {{block name="detail_data"}} -
-
商品信息
-
- {{if !empty($data['goods'])}} - -

{{$price_symbol}}{{$data.goods.price}}

- {{else /}} - 商品信息异常 - {{/if}} -
- - -
用户信息
- - -
业务类型
-
{{$data.business_type_text}}
- -
评论内容
-
-
{{$data.content|raw}}
-
- -
评论图片
-
- {{if !empty($data['images'])}} - {{foreach $data.images as $img}} - - - - {{/foreach}} - {{/if}} -
- -
评分
-
- {{$data.rating_text}} -
- -
是否匿名
-
{{$data.is_anonymous_text}}
- -
是否显示
-
{{if empty($data['is_show_text'])}}未填写{{else /}}{{$data.is_show_text}}{{/if}}
- -
是否回复
-
{{$data.is_reply_text}}
- -
回复内容
-
- {{if $data['is_reply'] eq 1 and !empty($data['reply'])}} -
{{$data.reply|raw}}
- {{else /}} - 未回复 - {{/if}} -
- -
回复时间
-
{{$data.reply_time_time}}
- -
更新时间
-
{{$data.upd_time_time}}
- -
创建时间
-
{{$data.add_time_time}}
-
- {{/block}} -{{/if}} \ No newline at end of file + +{{extend name="public/module/detail" /}} \ No newline at end of file diff --git a/application/admin/view/default/order/detail.html b/application/admin/view/default/order/detail.html index 093647237..5997afacb 100644 --- a/application/admin/view/default/order/detail.html +++ b/application/admin/view/default/order/detail.html @@ -1,132 +1,88 @@ - + {{extend name="public/module/detail" /}} - -{{if !empty($data)}} - {{block name="detail_data"}} -
-
订单号
-
- {{if empty($data['order_no'])}}未填写{{else /}}{{$data.order_no}}{{/if}} -
+ +{{block name="detail_data"}} + + {__block__} -
订单模式
-
- {{if empty($data['order_model_name'])}} - 未知 - {{else /}} - {{$data.order_model_name}} - {{/if}} -
- -
客户端类型
-
- {{if empty($data['client_type_name'])}} - 未知 - {{else /}} - {{$data.client_type_name}} - {{/if}} -
- -
基础信息
-
- {{foreach $data.items as $vs}} -
- -
- {{if !empty($vs['model'])}} - - 型号:{{$vs.model}} - - {{/if}} - {{if !empty($vs['spec_text'])}} - - 规格:{{$vs.spec_text}} - - {{/if}} - {{if !empty($vs['spec_weight']) and $vs['spec_weight'] gt 0}} - - 重量:{{$vs.spec_weight}} - - {{/if}} - {{if !empty($vs['spec_coding'])}} - - 编码:{{$vs.spec_coding}} - - {{/if}} - {{$vs.price}}x{{$vs.buy_number}} - {{if $vs['returned_quantity'] gt 0 or $vs['refund_price'] gt 0}} - 已退 {{$vs.returned_quantity}} / {{$vs.refund_price}} - {{/if}} -
-
-
- {{/foreach}} -
{{$data.describe}}
-
- -
用户信息
- - - {{if in_array($data['order_model'], [0,2])}} -
地址信息
-
- {{if !empty($data['address_data'])}} - {{$data.address_data.name}}
- {{$data.address_data.tel}}
- {{$data.address_data.province_name}} - {{$data.address_data.city_name}} - {{$data.address_data.county_name}} - {{$data.address_data.address}} - {{else /}} - 无信息 - {{/if}} -
+ +
+
订单商品
+
+ {{if !empty($data['items'])}} + {{:ModuleInclude('order/module/info', $data, ['form_request_type'=>'detail'])}} + {{else /}} +
没有相关数据
{{/if}} +
+
- {{if $data['order_model'] eq 2}} -
取货信息
-
- {{if !empty($data['extraction_data'])}} + + {{if $data['order_model'] eq 0}} +
+
收货地址
+
+ {{if !empty($data['address_data'])}} +

+ 收件人: + {{$data.address_data.name}} +

+

+ 收件电话: + {{$data.address_data.tel}} +

+

+ 详细地址: + {{$data.address_data.province_name}} + {{$data.address_data.city_name}} + {{$data.address_data.county_name}} + {{$data.address_data.address}} +

+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+ {{/if}} + + + {{if $data['order_model'] eq 2}} +
+
取货信息
+
+ {{if !empty($data['address_data'])}} + +

- 取货码: - {{if empty($data['extraction_data']['code'])}} - 取货码不存在、请联系管理员 - {{else /}} - {{$data.extraction_data.code}} - {{/if}} + 联系信息: + {{$data.address_data.name}} + / + {{$data.address_data.tel}}

- {{if !empty($data['extraction_data']['images'])}} -

- 取货码 -

- {{/if}} - {{else /}} - 无信息 - {{/if}} -
- {{/if}} +

+ 详细地址: + {{$data.address_data.province_name}} + {{$data.address_data.city_name}} + {{$data.address_data.county_name}} + {{$data.address_data.address}} +

+
+ + {{:ModuleInclude('order/module/take', $data)}} + {{else /}} +
没有相关数据
+ {{/if}} + + + {{/if}} - {{if $data['order_model'] eq 3}} -
密钥信息
-
+ + {{if $data['order_model'] eq 3}} +
+
密钥信息
+
+ {{if !empty($data['items'])}}
    {{foreach $data.items as $goods}}
  • @@ -143,100 +99,10 @@
  • {{/foreach}}
-
- {{/if}} - -
快递信息
-
{{if empty($data['express_name'])}}未填写{{else /}}{{$data.express_name}}
{{$data.express_number}}{{/if}}
- -
支付状态
-
{{if empty($data['pay_status_name'])}}未填写{{else /}}{{$data.pay_status_name}}{{/if}}
- -
订单状态
-
{{if empty($data['status_name'])}}未设置{{else /}}{{$data.status_name}}{{/if}}
- -
支付方式
-
{{if empty($data['payment_name'])}}未填写{{else /}}{{$data.payment_name}}{{/if}}
- -
用户备注
-
{{if empty($data['user_note'])}}未填写{{else /}}{{$data.user_note}}{{/if}}
- -
订单金额(元)
-
- {{if empty($data['price'])}} - 未填写 {{else /}} - 金额:{{$data.price}}
- 增加:{{$data.increase_price}}
- 优惠:{{$data.preferential_price}}
- 总价:{{$data.total_price}}
- 支付:{{$data.pay_price}}
- 退款:{{if $data['refund_price'] gt 0}}{{$data.refund_price}}{{else /}}{{$data.refund_price}}{{/if}} +
没有相关数据
{{/if}} -
- -
扩展数据
-
- {{if empty($data['extension_data'])}} - - {{else /}} - {{foreach $data.extension_data as $extk=>$ext}} - {{if $extk gt 0}}
{{/if}} - {{$ext.name}} [{{$ext.tips}}] - {{/foreach}} - {{/if}} -
- -
最新售后
-
- {{if empty($data['aftersale_first'])}} - - {{else /}} - 状态:{{$data.aftersale_first.status_text}}
- 类型:{{$data.aftersale_first.type_text}}
- 金额:{{$data.aftersale_first.price}}
- 数量:{{$data.aftersale_first.number}}
- 原因:{{$data.aftersale_first.reason}} - {{/if}} -
- -
购买总数
-
{{if empty($data['buy_number_count'])}}未知{{else /}}{{$data.buy_number_count}}{{/if}}
- -
退货总数
-
{{if empty($data['returned_quantity'])}}未退货{{else /}}{{$data.returned_quantity}}{{/if}}
- -
退款金额
-
{{if empty($data['refund_price']) or $data['refund_price'] elt 0.00}}未退款{{else /}}{{$data.refund_price}}{{/if}}
- - {{if $data['order_model'] eq 2}} -
自提取货码
-
{{if empty($data['extraction_code'])}}未填写{{else /}}{{$data.extraction_code}}{{/if}}
- {{/if}} - -
确认时间
-
{{if empty($data['confirm_time'])}}未填写{{else /}}{{$data.confirm_time}}{{/if}}
- -
支付时间
-
{{if empty($data['pay_time'])}}未填写{{else /}}{{$data.pay_time}}{{/if}}
- -
发货时间
-
{{if empty($data['delivery_time'])}}未填写{{else /}}{{$data.delivery_time}}{{/if}}
- -
完成时间
-
{{if empty($data['collect_time'])}}未填写{{else /}}{{$data.collect_time}}{{/if}}
- -
取消时间
-
{{if empty($data['cancel_time'])}}未填写{{else /}}{{$data.cancel_time}}{{/if}}
- -
关闭时间
-
{{if empty($data['close_time'])}}未填写{{else /}}{{$data.close_time}}{{/if}}
- -
创建时间
-
{{$data.add_time}}
- -
更新时间
-
{{$data.upd_time}}
- - {{/block}} -{{/if}} \ No newline at end of file + + + {{/if}} +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/order/module/info.html b/application/admin/view/default/order/module/info.html index acfb77a64..6effa017d 100644 --- a/application/admin/view/default/order/module/info.html +++ b/application/admin/view/default/order/module/info.html @@ -1,37 +1,41 @@ {{if !empty($module_data) and !empty($module_data['items'])}} {{foreach $module_data.items as $key=>$item}} - {{if $key eq 0}} -
-
- - - - {{$item.title}} -
-
- - {{if !empty($item.spec_text)}} - {{$item.spec_text}} - {{/if}} - - {{$item.price}}x{{$item.buy_number}} - {{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}} - 已退 {{$item.returned_quantity}} / {{$item.refund_price}} - {{/if}} -
+
+ -
+
+ + {{if !empty($item.spec_text)}} + {{$item.spec_text}} + {{/if}} + + {{$item.price}}x{{$item.buy_number}} + {{if $item['returned_quantity'] gt 0 or $item['refund_price'] gt 0}} + 已退 {{$item.returned_quantity}} / {{$item.refund_price}} + {{/if}} +
+
+
+ {{if $key eq 0}} + {{if !isset($module_params['form_request_type']) or $module_params['form_request_type'] neq 'detail'}} + {{php}}break;{{/php}} + {{/if}} {{/if}} - {{php}}break;{{/php}} {{/foreach}}
{{$module_data.describe}}
{{if count($module_data.items) gt 1}} -
- -
+ {{if !isset($module_params['form_request_type']) or $module_params['form_request_type'] neq 'detail'}} +
+ +
+ {{/if}} {{/if}} {{/if}} \ No newline at end of file diff --git a/application/admin/view/default/orderaftersale/detail.html b/application/admin/view/default/orderaftersale/detail.html index fa7dab486..06eeee457 100644 --- a/application/admin/view/default/orderaftersale/detail.html +++ b/application/admin/view/default/orderaftersale/detail.html @@ -1,110 +1,2 @@ - -{{extend name="public/module/detail" /}} - - -{{if !empty($data)}} - {{block name="detail_data"}} -
-
商品信息
-
-
- - - -
- {{$data.order_data.items.title}} - {{if !empty($data.order_data.items.spec)}} -
    - {{foreach $data.order_data.items.spec as $spec}} -
  • {{$spec.type}}:{{$spec.value}}
  • - {{/foreach}} -
- {{/if}} -
-
-
- {{if $data.order_data.items.original_price gt 0}} - {{$price_symbol}}{{$data.order_data.items.original_price}} - {{/if}} - {{$price_symbol}}{{$data.order_data.items.price}} x {{$data.order_data.items.buy_number}} -
-
- -
用户信息
- - -
申请信息
-
- 类型:{{$data.type_text}}
- 原因:{{$data.reason}}
- 数量:{{$data.number}}
- 金额:{{$price_symbol}}{{$data.price}}
- 说明:{{$data.msg}}
- 时间:{{$data.apply_time_time}} -
- -
凭证
-
- {{if !empty($data['images'])}} - {{foreach $data.images as $img}} - - - - {{/foreach}} - {{/if}} -
- -
状态
-
-

{{$data.status_text}}

- {{if $data['status'] eq 3 and !empty($data['refundment_text'])}} - {{$data.refundment_text}} - {{/if}} -
-
拒绝原因
-
{{$data.refuse_reason}}
- -
快递信息
-
- {{if $data['type'] eq 1 and in_array($data['status'], [2,3])}} - 快递:{{$data.express_name}}
- 单号:{{$data.express_number}}
- 时间:{{$data.delivery_time_time}} - {{/if}} -
- -
申请时间
-
{{$data.apply_time_time}}
- -
确认时间
-
{{$data.confirm_time_time}}
- -
退货时间
-
{{$data.delivery_time_time}}
- -
审核时间
-
{{$data.audit_time_time}}
- -
取消时间
-
{{$data.cancel_time_time}}
- -
创建时间
-
{{$data.add_time_time}}
- -
更新时间
-
{{$data.upd_time_time}}
-
- {{/block}} -{{/if}} \ No newline at end of file + +{{extend name="public/module/detail" /}} \ No newline at end of file diff --git a/application/admin/view/default/public/module/detail.html b/application/admin/view/default/public/module/detail.html index 0dc968013..319488683 100644 --- a/application/admin/view/default/public/module/detail.html +++ b/application/admin/view/default/public/module/detail.html @@ -42,8 +42,75 @@ } {{/php}} + {{if !empty($data)}} - {{block name="detail_data"}}{{/block}} + {{block name="detail_data"}} + {{if !empty($form_table) and !empty($form_table['form']) and is_array($form_table['form'])}} + {{if !empty($form_table['base']) and !empty($form_table['base']['detail_title'])}} +
+
{{$form_table.base.detail_title}}
+
+ {{/if}} +
+ {{foreach $form_table.form as $t}} + {{if isset($t['label']) and isset($t['view_type']) and in_array($t['view_type'], ['field', 'module', 'status']) and (!isset($t['is_detail']) or $t['is_detail'] eq 1)}} +
{{$t.label}}
+
+ {{switch $t.view_type}} + {{case field}} + + {{if is_array($t['view_key'])}} + {{foreach $t['view_key'] as $fk=>$fv}} + {{if isset($data[$fv])}} + {{$data[$fv]}} + + {{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}} + {{$t.view_key_join|raw}} + {{/if}} + {{/if}} + {{/foreach}} + {{else /}} + + {{if isset($data[$t['view_key']])}} + + {{if !empty($t['view_data']) and is_array($t['view_data']) and isset($t['view_data'][$data[$t['view_key']]])}} + {{$t['view_data'][$data[$t['view_key']]]}} + + + {{else /}} + {{$data[$t['view_key']]|raw}} + {{/if}} + {{/if}} + {{/if}} + {{/case}} + {{case module}} + + {{:ModuleInclude($t['view_key'], $data, ['form_request_type'=>'detail'])}} + {{/case}} + {{case status}} + + {{if !empty($t['key_field']) and !empty($t['post_url'])}} + + {{/if}} + {{/case}} + {{/switch}} +
+ {{/if}} + {{/foreach}} +
+ {{if !empty($form_table['base']) and !empty($form_table['base']['detail_title'])}} +
+
+ {{/if}} + {{/if}} + {{/block}} {{else /}} {{block name="detail_not_data"}}
没有相关数据
diff --git a/application/admin/view/default/public/module/form.html b/application/admin/view/default/public/module/form.html index ed1866f72..9e513ff3b 100644 --- a/application/admin/view/default/public/module/form.html +++ b/application/admin/view/default/public/module/form.html @@ -100,39 +100,12 @@ {{foreach $form_table['form'] as $t}} - - - - - - {{switch $t.view_type}} - {{case checkbox}} - - {{/case}} - {{default /}} - {{if isset($t['label'])}}{{$t.label}}{{/if}} - {{/switch}} - - {{/foreach}} - - - - {{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1}} - - {{foreach $form_table['form'] as $k=>$t}} - - {{if !empty($t['search_config']) and !empty($t['search_config']['form_type']) and !empty($t['search_config']['form_name'])}} - {{switch $t.search_config.form_type}} - {{case input}} - - - {{/case}} - {{case select}} - - + {{/case}} + {{case select}} + + + {{/case}} + {{case section}} + +
+ + - + +
+ {{/case}} + {{case datetime}} +
+ + - + +
+ {{/case}} + {{case date}} +
+ + - + +
+ {{/case}} + {{case module}} + + {{if !empty($t['search_config']['template'])}} + {{if isset($t['search_config']['data'])}} + {{:ModuleInclude($t['search_config']['template'], ['data'=>$t['search_config']['data'], 'form_name_key'=>$t['form_key'], 'params'=>isset($form_params) ? $form_params : []])}} + {{else /}} + {{:ModuleInclude($t['search_config']['template'], ['data'=>[], 'form_name_key'=>$t['form_key'], 'params'=>isset($form_params) ? $form_params : []])}} + {{/if}} {{/if}} - - {{/case}} - {{case section}} - -
- - - - -
- {{/case}} - {{case datetime}} -
- - - - -
- {{/case}} - {{case date}} -
- - - - -
- {{/case}} - {{case module}} - - {{if !empty($t['search_config']['template'])}} - {{if isset($t['search_config']['data'])}} - {{:ModuleInclude($t['search_config']['template'], ['data'=>$t['search_config']['data'], 'form_name_key'=>$t['form_key'], 'params'=>isset($form_params) ? $form_params : []])}} - {{else /}} - {{:ModuleInclude($t['search_config']['template'], ['data'=>[], 'form_name_key'=>$t['form_key'], 'params'=>isset($form_params) ? $form_params : []])}} - {{/if}} - {{/if}} - {{/case}} - {{/switch}} - {{/if}} - + {{/case}} + {{/switch}} + {{/if}} + + {{/if}} {{/foreach}} {{/if}} @@ -224,121 +228,126 @@ {{/if}} > {{foreach $form_table['form'] as $t}} - - - - - - - {{if isset($data_list[$i]) and !empty($t['view_type']) and !empty($t['view_key'])}} - - {{switch $t.view_type}} - {{case field}} - - {{if is_array($t['view_key'])}} - {{foreach $t['view_key'] as $fk=>$fv}} - {{if isset($data_list[$i][$fv])}} - {{$data_list[$i][$fv]}} - - {{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}} - {{$t.view_key_join|raw}} + {{if !isset($t['is_list']) or $t['is_list'] eq 1}} + + + + + + + {{if isset($data_list[$i]) and !empty($t['view_type']) and !empty($t['view_key'])}} + + {{switch $t.view_type}} + {{case field}} + + {{if is_array($t['view_key'])}} + {{foreach $t['view_key'] as $fk=>$fv}} + {{if isset($data_list[$i][$fv])}} + {{$data_list[$i][$fv]}} + + {{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}} + {{$t.view_key_join|raw}} + {{/if}} + {{/if}} + {{/foreach}} + {{else /}} + + {{if isset($data_list[$i][$t['view_key']])}} + + {{if !empty($t['view_data']) and is_array($t['view_data']) and isset($t['view_data'][$data_list[$i][$t['view_key']]])}} + {{$t['view_data'][$data_list[$i][$t['view_key']]]}} + + + {{else /}} + {{$data_list[$i][$t['view_key']]|raw}} {{/if}} {{/if}} - {{/foreach}} - {{else /}} - - {{if isset($data_list[$i][$t['view_key']])}} - - {{if !empty($t['view_data']) and is_array($t['view_data']) and isset($t['view_data'][$data_list[$i][$t['view_key']]])}} - {{$t['view_data'][$data_list[$i][$t['view_key']]]}} - - - {{else /}} - {{$data_list[$i][$t['view_key']]|raw}} - {{/if}} {{/if}} - {{/if}} - {{/case}} - {{case module}} - - {{:ModuleInclude($t['view_key'], $data_list[$i], isset($params) ? $params : [])}} - {{/case}} - {{case status}} - - {{if !empty($t['key_field']) and !empty($t['post_url'])}} - - {{/if}} - {{/case}} - {{case operate}} - - - {{:ModuleInclude($t['view_key'], $data_list[$i])}} + {{/case}} + {{case module}} + + {{:ModuleInclude($t['view_key'], $data_list[$i], isset($params) ? $params : [])}} + {{/case}} + {{case status}} + + {{if !empty($t['key_field']) and !empty($t['post_url'])}} + + {{/if}} + {{/case}} + {{case operate}} + + + {{:ModuleInclude($t['view_key'], $data_list[$i])}} - - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- {{$hook_name_form_list_operate}} -
- {{/if}} - {{php}} - $hook_data = Hook::listen($hook_name_form_list_operate, [ - 'hook_name' => $hook_name_form_list_operate, - 'is_backend' => true, - 'id' => isset($data_list[$i][$form_table['base']['key_field']]) ? $data_list[$i][$form_table['base']['key_field']] : 0, - 'data' => $data_list[$i], - ]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} +
+ {{$hook_name_form_list_operate}} +
+ {{/if}} + {{php}} + $hook_data = Hook::listen($hook_name_form_list_operate, [ + 'hook_name' => $hook_name_form_list_operate, + 'is_backend' => true, + 'id' => isset($data_list[$i][$form_table['base']['key_field']]) ? $data_list[$i][$form_table['base']['key_field']] : 0, + 'data' => $data_list[$i], + ]); + if(!empty($hook_data) && is_array($hook_data)) { - if(is_string($hook) || is_int($hook)) + foreach($hook_data as $hook) { - echo htmlspecialchars_decode($hook); + if(is_string($hook) || is_int($hook)) + { + echo htmlspecialchars_decode($hook); + } } } - } - {{/php}} - {{/case}} - {{case checkbox}} - {{if isset($data_list[$i][$form_table['base']['key_field']])}} -
- -
- {{/if}} - {{/case}} - {{case radio}} - {{if isset($data_list[$i][$form_table['base']['key_field']])}} -
- -
- {{/if}} - {{/case}} - {{/switch}} - {{/if}} - + {{/php}} + {{/case}} + {{case checkbox}} + {{if isset($data_list[$i][$form_table['base']['key_field']])}} + + {{if empty($t['not_show_data']) or empty($t['not_show_key']) or !in_array($data_list[$i][$form_table['base']['key_field']], $t['not_show_data'])}} +
+ +
+ {{/if}} + {{/if}} + {{/case}} + {{case radio}} + {{if isset($data_list[$i][$form_table['base']['key_field']])}} +
+ +
+ {{/if}} + {{/case}} + {{/switch}} + {{/if}} + + {{/if}} {{/foreach}} {{/for}} diff --git a/application/admin/view/default/user/detail.html b/application/admin/view/default/user/detail.html index 4b7e98222..06eeee457 100644 --- a/application/admin/view/default/user/detail.html +++ b/application/admin/view/default/user/detail.html @@ -1,84 +1,2 @@ - -{{extend name="public/module/detail" /}} - - -{{if !empty($data)}} - {{block name="detail_data"}} -
-
用户头像
-
- {{if !empty($data['avatar'])}} - - {{else /}} - 暂无图片 - {{/if}} -
- -
用户名
-
{{if empty($data['username'])}}未填写{{else /}}{{$data.username}}{{/if}}
- -
昵称
-
{{if empty($data['nickname'])}}未填写{{else /}}{{$data.nickname}}{{/if}}
- -
手机号码
-
{{if empty($data['mobile'])}}未填写{{else /}}{{$data.mobile}}{{/if}}
- -
电子邮箱
-
{{if empty($data['email'])}}未填写{{else /}}{{$data.email}}{{/if}}
- -
状态
-
{{if empty($data['status_text'])}}未知{{else /}}{{$data.status_text}}{{/if}}
- -
支付宝openid
-
{{if empty($data['alipay_openid'])}}未知{{else /}}{{$data.alipay_openid}}{{/if}}
- -
百度openid
-
{{if empty($data['baidu_openid'])}}未知{{else /}}{{$data.baidu_openid}}{{/if}}
- -
头条openid
-
{{if empty($data['toutiao_openid'])}}未知{{else /}}{{$data.toutiao_openid}}{{/if}}
- -
QQopenid
-
{{if empty($data['qq_openid'])}}未知{{else /}}{{$data.qq_openid}}{{/if}}
- -
QQunionid
-
{{if empty($data['qq_unionid'])}}未知{{else /}}{{$data.qq_unionid}}{{/if}}
- -
微信openid
-
{{if empty($data['weixin_openid'])}}未知{{else /}}{{$data.weixin_openid}}{{/if}}
- -
微信unionid
-
{{if empty($data['weixin_unionid'])}}未知{{else /}}{{$data.weixin_unionid}}{{/if}}
- -
微信webopenid
-
{{if empty($data['weixin_web_openid'])}}未知{{else /}}{{$data.weixin_web_openid}}{{/if}}
- -
性别
-
{{if empty($data['gender_text'])}}未设置{{else /}}{{$data.gender_text}}{{/if}}
- -
生日
-
{{if empty($data['birthday_text'])}}未填写{{else /}}{{$data.birthday_text}}{{/if}}
- -
所在省
-
{{if empty($data['province'])}}未填写{{else /}}{{$data.province}}{{/if}}
- -
所在市
-
{{if empty($data['city'])}}未填写{{else /}}{{$data.city}}{{/if}}
- -
详细地址
-
{{if empty($data['address'])}}未填写{{else /}}{{$data.address}}{{/if}}
- -
积分
-
{{if empty($data['integral'])}}未填写{{else /}}{{$data.integral}}{{/if}}
- -
邀请用户ID
-
{{$data.referrer}}
- -
注册时间
-
{{$data.add_time}}
- -
更新时间
-
{{$data.upd_time}}
-
- {{/block}} -{{/if}} \ No newline at end of file + +{{extend name="public/module/detail" /}} \ No newline at end of file diff --git a/application/common.php b/application/common.php index d56a7b10f..fa656b568 100755 --- a/application/common.php +++ b/application/common.php @@ -92,9 +92,10 @@ function FormModulePath($params = []) * @date 2020-05-25 * @desc description * @param [string] $template [视图路径] - * @param [mixed] $params [参数数据] + * @param [mixed] $data [参数数据] + * @param [mixed] $params [额外参数] */ -function ModuleInclude($template, $params = []) +function ModuleInclude($template, $data = [], $params = []) { // 应用控制器 $module = '\app\module\ViewIncludeModule'; @@ -111,7 +112,7 @@ function ModuleInclude($template, $params = []) return '模块视图方法未定义['.$module.'->'.$action.'()]'; } - return $obj->Run($template, $params); + return $obj->Run($template, $data, $params); } /** diff --git a/application/module/FormHandleModule.php b/application/module/FormHandleModule.php index 29b81fb24..abdf07e95 100644 --- a/application/module/FormHandleModule.php +++ b/application/module/FormHandleModule.php @@ -161,6 +161,22 @@ class FormHandleModule $v['view_key'] = 'form_radio_value'; } } + + // 复选+单选 + if(in_array($v['view_type'], ['checkbox', 'radio'])) + { + // 是否部分不显示控件 + // 数据处理成为数组 + if(isset($v['not_show_data']) && !is_array($v['not_show_data'])) + { + $v['not_show_data'] = explode(',', $v['not_show_data']); + } + // 数据 key 字段默认主键 id [base->key_field] + if(!empty($v['not_show_data']) && empty($v['not_show_key'])) + { + $v['not_show_key'] = $this->form_data['base']['key_field']; + } + } break; } } diff --git a/application/module/ViewIncludeModule.php b/application/module/ViewIncludeModule.php index b64133ec3..1be42f5f8 100644 --- a/application/module/ViewIncludeModule.php +++ b/application/module/ViewIncludeModule.php @@ -45,11 +45,13 @@ class ViewIncludeModule extends Controller * @desc description * @param [string] $template [模板地址] * @param [mixed] $data [请求数据] + * @param [mixed] $params [额外参数] * @return [string] [模板内容] */ - public function Run($template, $data = []) + public function Run($template, $data = [], $params = []) { $this->assign('module_data', $data); + $this->assign('module_params', $params); return $this->fetch($template); } } diff --git a/application/service/CrontabService.php b/application/service/CrontabService.php index 55f9383d9..d4d367ec5 100644 --- a/application/service/CrontabService.php +++ b/application/service/CrontabService.php @@ -120,25 +120,20 @@ class CrontabService Db::startTrans(); if(Db::name('Order')->where(['id'=>$v['id'], 'status'=>3])->update($upd_data)) { - // 订单商品积分赠送 - $ret = IntegralService::OrderGoodsIntegralGiving(['order_id'=>$v['id']]); + // 订单商品销量增加 + $ret = OrderService::GoodsSalesCountInc(['order_id'=>$v['id']]); if($ret['code'] == 0) { - // 订单商品销量增加 - $ret = OrderService::GoodsSalesCountInc(['order_id'=>$v['id']]); - if($ret['code'] == 0) - { - // 用户消息 - MessageService::MessageAdd($v['user_id'], '订单收货', '订单自动收货成功', 1, $v['id']); + // 用户消息 + MessageService::MessageAdd($v['user_id'], '订单收货', '订单自动收货成功', 1, $v['id']); - // 订单状态日志 - OrderService::OrderHistoryAdd($v['id'], $upd_data['status'], $v['status'], '自动收货', 0, '系统'); + // 订单状态日志 + OrderService::OrderHistoryAdd($v['id'], $upd_data['status'], $v['status'], '自动收货', 0, '系统'); - // 提交事务 - Db::commit(); - $sucs++; - continue; - } + // 提交事务 + Db::commit(); + $sucs++; + continue; } } // 事务回滚 diff --git a/application/service/GoodsService.php b/application/service/GoodsService.php index 0ce3d0354..8f77b6ef6 100755 --- a/application/service/GoodsService.php +++ b/application/service/GoodsService.php @@ -1164,7 +1164,6 @@ class GoodsService 'model' => $params['model'], 'place_origin' => isset($params['place_origin']) ? intval($params['place_origin']) : 0, 'inventory_unit' => $params['inventory_unit'], - 'give_integral' => intval($params['give_integral']), 'buy_min_number' => max(1, isset($params['buy_min_number']) ? intval($params['buy_min_number']) : 1), 'buy_max_number' => isset($params['buy_max_number']) ? intval($params['buy_max_number']) : 0, 'is_deduction_inventory' => isset($params['is_deduction_inventory']) ? intval($params['is_deduction_inventory']) : 0, diff --git a/application/service/IntegralService.php b/application/service/IntegralService.php index 66ba00eca..176b32a13 100755 --- a/application/service/IntegralService.php +++ b/application/service/IntegralService.php @@ -166,7 +166,7 @@ class IntegralService } /** - * 订单商品积分赠送 + * 订单商品积分赠送(已丢弃) * @author Devil * @blog http://gong.gg/ * @version 1.0.0 diff --git a/application/service/OrderService.php b/application/service/OrderService.php index df7516917..e3c9ae23a 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -1446,15 +1446,6 @@ class OrderService ]; if(Db::name('Order')->where($where)->update($upd_data)) { - // 订单商品积分赠送 - $ret = IntegralService::OrderGoodsIntegralGiving(['order_id'=>$order['id']]); - if($ret['code'] != 0) - { - // 事务回滚 - Db::rollback(); - return DataReturn($ret['msg'], -10); - } - // 订单商品销量增加 $ret = self::GoodsSalesCountInc(['order_id'=>$order['id']]); if($ret['code'] != 0) diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index a3821438f..ea899d638 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -11,7 +11,8 @@ ul { list-style: none; } /* 公共dl样式 */ .dl-content dt { float: left; padding-left: 5px; overflow: hidden; clear: left; width: 120px; } -.dl-content dd { border-bottom: 1px solid #efefef; padding-left: 120px; } +.dl-content dd { padding-left: 120px; } +.dl-content dd:not(:last-child) { border-bottom: 1px solid #efefef; } .dl-content dt, .dl-content dd { font-weight: normal !important; text-align: left; margin-top: 0px; line-height: 20px; min-height: 40px; padding-top: 10px; padding-bottom: 10px; } /** @@ -60,6 +61,35 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view, .content-app-ite #common-prompt.prompt-top { top: 0; } #common-prompt.prompt-bottom { bottom: 0; } +/** + * 弹窗iframe + */ +.popup-iframe-not-title { + padding: 25px; + background: transparent; +} +.popup-iframe-not-title .am-popup-inner { + padding-top: 0; + background: #fff; +} +.popup-iframe-not-title .am-popup-inner .am-close { + position: absolute; + right: 10px; + top: 10px; + -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + opacity: 1; + background: #767676; + color: #fff; + border: 3px solid #f4f4f4; + width: 32px; + height: 32px; +} +.popup-iframe-not-title .am-popup-inner .am-close:hover { + background: #2f8ded; +} + /** * iframe */ diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index e15f27c1b..1ee01a497 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -795,15 +795,25 @@ function ModalLoad(url, title, tag, class_tag) $('#'+tag).remove(); } - var html = '