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"}} -
{{$price_symbol}}{{$data.goods.price}}
- {{else /}} - 商品信息异常 - {{/if}} -+ 收件人: + {{$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 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'])}} -
-
-
+ 详细地址: + {{$data.address_data.province_name}} + {{$data.address_data.city_name}} + {{$data.address_data.county_name}} + {{$data.address_data.address}} +
+{{$data.status_text}}
- {{if $data['status'] eq 3 and !empty($data['refundment_text'])}} - {{$data.refundment_text}} - {{/if}} -