From a813d5f178ea79587824691ee94f66af76dd267c Mon Sep 17 00:00:00 2001 From: xxb Date: Mon, 6 Sep 2021 21:00:47 +0800 Subject: [PATCH] liche update for admin receiver order lists can reset condition --- admin/controllers/app/licheb/Member.php | 28 +++-- admin/controllers/auto/Attr.php | 10 +- admin/controllers/biz/store/Store.php | 42 +++++++ admin/views/app/licheb/member/lists.php | 129 ++++++++++++++++++++- admin/views/auto/attr/edit.php | 67 ++++++++++- admin/views/items/goods/lists.php | 17 ++- admin/views/receiver/clues/lists.php | 15 ++- admin/views/receiver/customer/lists.php | 15 ++- admin/views/receiver/order/agent/lists.php | 12 +- admin/views/receiver/order/bill/lists.php | 12 +- admin/views/receiver/order/ckcar/lists.php | 12 +- admin/views/receiver/order/loan/lists.php | 12 +- admin/views/receiver/order/sign/lists.php | 12 +- 13 files changed, 358 insertions(+), 25 deletions(-) diff --git a/admin/controllers/app/licheb/Member.php b/admin/controllers/app/licheb/Member.php index 4b65d8fc..c9fb3e05 100755 --- a/admin/controllers/app/licheb/Member.php +++ b/admin/controllers/app/licheb/Member.php @@ -22,18 +22,25 @@ class Member extends HD_Controller{ //数据列表 public function lists($where = array()) { - $input = $this->input->get(); - $page = $input['page']; - $size = $input['size']; + $params = $this->input->get(); + $page = $params['page']; + $size = $params['size']; !$page && $page = 1; !$size && $size = 20; - if ($input['name']) { - $where['uname like "%' . $input['name'] . '%"'] = null; - $this->data['name'] = $input['name']; + if ($params['name']) { + $where['uname like "%' . $params['name'] . '%"'] = null; + $this->data['name'] = $params['name']; } - if ($input['mobile']) { - $where['mobile'] = $input['mobile']; - $this->data['mobile'] = $input['mobile']; + if ($params['mobile']) { + $where['mobile'] = $params['mobile']; + $this->data['mobile'] = $params['mobile']; + } + if($params['biz_id']){ + $where['biz_id'] = $params['biz_id']; + } else { + $params['city_id'] = ''; + $params['county_id'] = ''; + $params['biz_id'] = ''; } $count = $this->userM->count($where); @@ -53,6 +60,7 @@ class Member extends HD_Controller{ } } $this->data['app_id'] = 2; + $this->data['params'] = $params; $this->data['lists'] = $lists; $this->data['_title'] = '用户列表'; $this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count); @@ -111,6 +119,7 @@ class Member extends HD_Controller{ public function edit() { $id = $this->input->post('id'); + $uname = $this->input->post('uname'); $nickname = $this->input->post('nickname'); $mobile = $this->input->post('mobile'); $group_id = $this->input->post('group_id'); @@ -132,6 +141,7 @@ class Member extends HD_Controller{ $group_id && $upd['group_id'] = $group_id; $biz_id && $upd['biz_id'] = $biz_id; $nickname && $upd['nickname'] = $nickname; + $uname && $upd['uname'] = $uname; $this->userM->update($upd, array('id' => $id)); diff --git a/admin/controllers/auto/Attr.php b/admin/controllers/auto/Attr.php index 45852603..915a7ff8 100644 --- a/admin/controllers/auto/Attr.php +++ b/admin/controllers/auto/Attr.php @@ -90,12 +90,16 @@ class Attr extends HD_Controller{ $info['jsondata'] = json_decode($info['jsondata'],true); $info['jsondata']['img'] && $info['jsondata']['s_img'] = build_qiniu_image_url($info['jsondata']['img']); } - $series = $this->auto_series_model->select([],'','','','id,name'); + $brand_id= ''; + if($info['s_id']){ + $row_sery = $this->auto_series_model->get(array('id' => $info['s_id'])); + $brand_id = $row_sery['brand_id']; + } $type_arr = $this->auto_attr_model->get_type(); !$info['type'] && $info['type'] = 0; - !$info['s_id'] && $info['s_id'] = $series[0]['id']; + $info['brand_id'] = $brand_id; + !$info['s_id'] && $info['s_id'] = ''; !$info['jsondata']['img'] && $info['jsondata']['img'] = ''; - $this->data['series'] = $series; $this->data['type_arr'] = $type_arr; $this->data['info'] = $info; $this->data['_title'] = $id ? '编辑' : '新增'; diff --git a/admin/controllers/biz/store/Store.php b/admin/controllers/biz/store/Store.php index 21c064df..0d722aba 100755 --- a/admin/controllers/biz/store/Store.php +++ b/admin/controllers/biz/store/Store.php @@ -812,6 +812,48 @@ class Store extends HD_Controller{ return $this->show_json(SYS_CODE_SUCCESS, '操作成功'); } + /** + * 获取店铺可选列表 + * @return bool + */ + function json_lists(){ + $province_id = $this->input->post('province_id'); + $city_id = $this->input->post('city_id'); + $county_id = $this->input->post('county_id'); + $status = $this->input->post('status'); + $page = $this->input->post('page'); + $size = $this->input->post('size'); + + $where = array(); + if(strlen($status) > 0){ + $where['status'] = $status; + } else { + $whre['status > -1'] = null; + } + $province_id && $where['province_id'] = $province_id; + $city_id && $where['city_id'] = $city_id; + $county_id && $where['county_id'] = $county_id; + + $total = $this->biz_model->count($where); + + $lists = array(); + if($total){ + $orderby = 'id desc'; + $select = 'id, biz_name'; + $rows = $this->biz_model->select($where, $orderby, $page, $size, $select); + + foreach($rows as $v){ + $lists[] = array( + 'id' => $v['id'], + 'title' => $v['biz_name'], + ); + } + } + + $this->data = array('total' => $total, 'list' => $lists); + return $this->show_json(SYS_CODE_SUCCESS); + } + /** * 获取用户信息(不存在新增,可以修改名称) * @param $mobile diff --git a/admin/views/app/licheb/member/lists.php b/admin/views/app/licheb/member/lists.php index ff1235b1..e64b5eb9 100755 --- a/admin/views/app/licheb/member/lists.php +++ b/admin/views/app/licheb/member/lists.php @@ -14,6 +14,27 @@ +
+ +
+ +
+
+ +
+
+ +
+
@@ -69,8 +90,112 @@