diff --git a/application/admin/controller/ScreenCapacity.php b/application/admin/controller/ScreenCapacity.php new file mode 100755 index 00000000..85f833bc --- /dev/null +++ b/application/admin/controller/ScreenCapacity.php @@ -0,0 +1,88 @@ +request->isAjax()) { + $get = $this->request->get(); + $this->_success('', ScreenCapacityLogic::lists($get)); + } + return $this->fetch(); + } + /** + * 添加容量 + * @return mixed + */ + public function add(){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenCapacity.add'); + if($result === true){ + ScreenCapacityLogic::addScreenCapacity($post); + $this->_success('添加成功!'); + } + $this->_error($result); + } + return $this->fetch(); + } + + /** + * 编辑容量 + * @return mixed + */ + public function edit($id){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenCapacity.edit'); + if($result === true){ + ScreenCapacityLogic::editScreenCapacity($post); + $this->_success('编辑成功!'); + } + $this->_error($result); + } + $category= ScreenCapacityLogic::getScreenCapacity($id); + $this->assign('category',array_values($category)[0]); + return $this->fetch(); + } + + /** + * 删除容量 + * @return mixed + */ + public function del($id) + { + if ($this->request->isAjax()) { + $result = $this->validate(['id' => $id], 'app\admin\validate\ScreenCapacity.del'); + if ($result === true) { + ScreenCapacityLogic::delScreenCapacity($id); + $this->_success('删除成功'); + } + $this->_error($result); + } + } + + + /** + * 修改状态 + */ + public function switchStatus(){ + $post = $this->request->post(); + ScreenCapacityLogic::switchStatus($post); + $this->_success('修改成功'); + } + +} \ No newline at end of file diff --git a/application/admin/controller/ScreenMud.php b/application/admin/controller/ScreenMud.php new file mode 100755 index 00000000..c031f710 --- /dev/null +++ b/application/admin/controller/ScreenMud.php @@ -0,0 +1,88 @@ +request->isAjax()) { + $get = $this->request->get(); + $this->_success('', ScreenMudLogic::lists($get)); + } + return $this->fetch(); + } + /** + * 添加专家分类 + * @return mixed + */ + public function add(){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenMud.add'); + if($result === true){ + ScreenMudLogic::addScreenMud($post); + $this->_success('添加成功!'); + } + $this->_error($result); + } + return $this->fetch(); + } + + /** + * 编辑专家分类 + * @return mixed + */ + public function edit($id){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenMud.edit'); + if($result === true){ + ScreenMudLogic::editScreenMud($post); + $this->_success('编辑成功!'); + } + $this->_error($result); + } + $category= ScreenMudLogic::getScreenMud($id); + $this->assign('category',array_values($category)[0]); + return $this->fetch(); + } + + /** + * 删除专家分类 + * @return mixed + */ + public function del($id) + { + if ($this->request->isAjax()) { + $result = $this->validate(['id' => $id], 'app\admin\validate\ScreenMud.del'); + if ($result === true) { + ScreenMudLogic::delScreenMud($id); + $this->_success('删除成功'); + } + $this->_error($result); + } + } + + + /** + * 修改状态 + */ + public function switchStatus(){ + $post = $this->request->post(); + ScreenMudLogic::switchStatus($post); + $this->_success('修改成功'); + } + +} \ No newline at end of file diff --git a/application/admin/controller/ScreenPrice.php b/application/admin/controller/ScreenPrice.php new file mode 100755 index 00000000..e84f727c --- /dev/null +++ b/application/admin/controller/ScreenPrice.php @@ -0,0 +1,88 @@ +request->isAjax()) { + $get = $this->request->get(); + $this->_success('', ScreenPriceLogic::lists($get)); + } + return $this->fetch(); + } + /** + * 添加价格 + * @return mixed + */ + public function add(){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenPrice.add'); + if($result === true){ + ScreenPriceLogic::addScreenPrice($post); + $this->_success('添加成功!'); + } + $this->_error($result); + } + return $this->fetch(); + } + + /** + * 编辑价格 + * @return mixed + */ + public function edit($id){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenPrice.edit'); + if($result === true){ + ScreenPriceLogic::editScreenPrice($post); + $this->_success('编辑成功!'); + } + $this->_error($result); + } + $category= ScreenPriceLogic::getScreenPrice($id); + $this->assign('category',array_values($category)[0]); + return $this->fetch(); + } + + /** + * 删除价格 + * @return mixed + */ + public function del($id) + { + if ($this->request->isAjax()) { + $result = $this->validate(['id' => $id], 'app\admin\validate\ScreenPrice.del'); + if ($result === true) { + ScreenPriceLogic::delScreenPrice($id); + $this->_success('删除成功'); + } + $this->_error($result); + } + } + + + /** + * 修改状态 + */ + public function switchStatus(){ + $post = $this->request->post(); + ScreenPriceLogic::switchStatus($post); + $this->_success('修改成功'); + } + +} \ No newline at end of file diff --git a/application/admin/controller/ScreenSize.php b/application/admin/controller/ScreenSize.php new file mode 100755 index 00000000..87de3330 --- /dev/null +++ b/application/admin/controller/ScreenSize.php @@ -0,0 +1,88 @@ +request->isAjax()) { + $get = $this->request->get(); + $this->_success('', ScreenSizeLogic::lists($get)); + } + return $this->fetch(); + } + /** + * 添加筛选尺寸 + * @return mixed + */ + public function add(){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenSize.add'); + if($result === true){ + ScreenSizeLogic::addScreenSize($post); + $this->_success('添加成功!'); + } + $this->_error($result); + } + return $this->fetch(); + } + + /** + * 编辑筛选尺寸 + * @return mixed + */ + public function edit($id){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\ScreenSize.edit'); + if($result === true){ + ScreenSizeLogic::editScreenSize($post); + $this->_success('编辑成功!'); + } + $this->_error($result); + } + $category= ScreenSizeLogic::getScreenSize($id); + $this->assign('category',array_values($category)[0]); + return $this->fetch(); + } + + /** + * 删除筛选尺寸 + * @return mixed + */ + public function del($id) + { + if ($this->request->isAjax()) { + $result = $this->validate(['id' => $id], 'app\admin\validate\ScreenSize.del'); + if ($result === true) { + ScreenSizeLogic::delScreenSize($id); + $this->_success('删除成功'); + } + $this->_error($result); + } + } + + + /** + * 修改状态 + */ + public function switchStatus(){ + $post = $this->request->post(); + ScreenSizeLogic::switchStatus($post); + $this->_success('修改成功'); + } + +} \ No newline at end of file diff --git a/application/admin/controller/Supplier.php b/application/admin/controller/Supplier.php index 5a7062aa..62726062 100755 --- a/application/admin/controller/Supplier.php +++ b/application/admin/controller/Supplier.php @@ -7,16 +7,19 @@ // +---------------------------------------------------------------------- namespace app\admin\controller; use app\admin\logic\SupplierLogic; +use app\admin\logic\SupplierCategoryLogic; class Supplier extends AdminBase{ /** *列表 */ public function lists(){ + $supplier_category = SupplierCategoryLogic::getSupplierCategory(); if ($this->request->isAjax()) { $get = $this->request->get(); //获取get请求 - $this->_success('', SupplierLogic::lists($get)); //逻辑层处理渲染数据 + $this->_success('', SupplierLogic::lists($get, $supplier_category)); //逻辑层处理渲染数据 } + $this->assign('category_list', $supplier_category); return $this->fetch(); //渲染 } @@ -34,6 +37,8 @@ class Supplier extends AdminBase{ } $this->_error($result); } + $supplier_category = SupplierCategoryLogic::getSupplierCategory(); + $this->assign('category_list', $supplier_category); return $this->fetch(); //渲染 } @@ -52,6 +57,8 @@ class Supplier extends AdminBase{ $this->_error($result); } $this->assign('info', SupplierLogic::info($id)); //逻辑层处理数据,返回已有信息 + $supplier_category = SupplierCategoryLogic::getSupplierCategory(); + $this->assign('category_list', $supplier_category); return $this->fetch(); //渲染 } diff --git a/application/admin/controller/SupplierCategory.php b/application/admin/controller/SupplierCategory.php new file mode 100755 index 00000000..d13f71bc --- /dev/null +++ b/application/admin/controller/SupplierCategory.php @@ -0,0 +1,88 @@ +request->isAjax()) { + $get = $this->request->get(); + $this->_success('', SupplierCategoryLogic::lists($get)); + } + return $this->fetch(); + } + /** + * 添加专家分类 + * @return mixed + */ + public function add(){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\SupplierCategory.add'); + if($result === true){ + SupplierCategoryLogic::addSupplierCategory($post); + $this->_success('添加成功!'); + } + $this->_error($result); + } + return $this->fetch(); + } + + /** + * 编辑专家分类 + * @return mixed + */ + public function edit($id){ + if ($this->request->isAjax()) { + $post = $this->request->post(); + $post['del'] = 0; + $result = $this->validate($post, 'app\admin\validate\SupplierCategory.edit'); + if($result === true){ + SupplierCategoryLogic::editSupplierCategory($post); + $this->_success('编辑成功!'); + } + $this->_error($result); + } + $category= SupplierCategoryLogic::getSupplierCategory($id); + $this->assign('category',array_values($category)[0]); + return $this->fetch(); + } + + /** + * 删除专家分类 + * @return mixed + */ + public function del($id) + { + if ($this->request->isAjax()) { + $result = $this->validate(['id' => $id], 'app\admin\validate\SupplierCategory.del'); + if ($result === true) { + SupplierCategoryLogic::delSupplierCategory($id); + $this->_success('删除成功'); + } + $this->_error($result); + } + } + + + /** + * 修改状态 + */ + public function switchStatus(){ + $post = $this->request->post(); + SupplierCategoryLogic::switchStatus($post); + $this->_success('修改成功'); + } + +} \ No newline at end of file diff --git a/application/admin/logic/GoodsBrandLogic.php b/application/admin/logic/GoodsBrandLogic.php index c2884966..0eb8546a 100755 --- a/application/admin/logic/GoodsBrandLogic.php +++ b/application/admin/logic/GoodsBrandLogic.php @@ -42,7 +42,6 @@ class GoodsBrandLogic { $data = [ 'name' => $post['name'], - 'initial' => $post['initial'], 'image' => $post['image'], 'sort' => $post['sort'], 'is_show' => $post['is_show'], @@ -69,7 +68,6 @@ class GoodsBrandLogic { $update_data = [ 'name' => $post['name'], - 'initial' => $post['initial'], 'image' => $post['image'], 'sort' => $post['sort'], 'is_show' => $post['is_show'], diff --git a/application/admin/logic/ScreenCapacityLogic.php b/application/admin/logic/ScreenCapacityLogic.php new file mode 100755 index 00000000..94c479ff --- /dev/null +++ b/application/admin/logic/ScreenCapacityLogic.php @@ -0,0 +1,110 @@ +where($where)->count(); + $list = $screen_capacity->where($where)->page($get['page'], $get['limit'])->select(); + + foreach ($list as &$item) { + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if ($item['is_show'] == 1) { + $item['is_show_text'] = '启用'; + } else { + $item['is_show_text'] = '停用'; + } + } + return ['count' => $count, 'lists' => $list]; + } + + /** + * Desc: 添加容量 + * @param $post array + * @return boolean + */ + public static function addScreenCapacity($post) + { + $screen_capacity = new ScreenCapacity(); + $data = [ + 'name' => $post['name'], + 'start_capacity' => $post['start_capacity'], + 'end_capacity' => $post['end_capacity'], + 'is_show' => $post['is_show'], + 'create_time' => time(), + ]; + return $screen_capacity->save($data); + } + + /** + * Desc: 编辑容量 + * @param $post array + * @return boolean + */ + public static function editScreenCapacity($post) + { + $screen_capacity = new ScreenCapacity(); + $data = [ + 'name' => $post['name'], + 'start_capacity' => $post['start_capacity'], + 'end_capacity' => $post['end_capacity'], + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return $screen_capacity->save($data, ['id' => $post['id'], 'del' => 0]); + } + + /** + * Desc: 删除容量 + * @param $id int + * @return boolean + */ + public static function delScreenCapacity($id) + { + $screen_capacity = new ScreenCapacity(); + $data = [ + 'update_time' => time(), + 'del' => 1, + ]; + return $screen_capacity->save($data, ['id' => $id, 'del' => 0]); + } + + /** + * Desc: 获取单条容量 + * @param $id int + * @return boolean + */ + public static function getScreenCapacity($id = 0) + { + $where[] = ['del', '=', 0]; + if ($id) { + $where[] = ['id', '=', $id]; + } + $screen_capacity = new ScreenCapacity(); + return $screen_capacity->where($where)->column('*', 'id'); + } + + public static function switchStatus($post) + { + $data = [ + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return Db::name('screen_capacity')->where(['del' => 0, 'id' => $post['id']])->update($data); + } +} diff --git a/application/admin/logic/ScreenMudLogic.php b/application/admin/logic/ScreenMudLogic.php new file mode 100755 index 00000000..a02d159b --- /dev/null +++ b/application/admin/logic/ScreenMudLogic.php @@ -0,0 +1,106 @@ +where($where)->count(); + $list = $screen_mud->where($where)->page($get['page'], $get['limit'])->select(); + + foreach ($list as &$item) { + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if ($item['is_show'] == 1) { + $item['is_show_text'] = '启用'; + } else { + $item['is_show_text'] = '停用'; + } + } + return ['count' => $count, 'lists' => $list]; + } + + /** + * Desc: 添加泥料 + * @param $post array + * @return boolean + */ + public static function addScreenMud($post) + { + $screen_mud = new ScreenMud(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'create_time' => time(), + ]; + return $screen_mud->save($data); + } + + /** + * Desc: 编辑泥料 + * @param $post array + * @return boolean + */ + public static function editScreenMud($post) + { + $screen_mud = new ScreenMud(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return $screen_mud->save($data, ['id' => $post['id'], 'del' => 0]); + } + + /** + * Desc: 删除泥料 + * @param $id int + * @return boolean + */ + public static function delScreenMud($id) + { + $screen_mud = new ScreenMud(); + $data = [ + 'update_time' => time(), + 'del' => 1, + ]; + return $screen_mud->save($data, ['id' => $id, 'del' => 0]); + } + + /** + * Desc: 获取单条泥料 + * @param $id int + * @return boolean + */ + public static function getScreenMud($id = 0) + { + $where[] = ['del', '=', 0]; + if ($id) { + $where[] = ['id', '=', $id]; + } + $screen_mud = new ScreenMud(); + return $screen_mud->where($where)->column('*', 'id'); + } + + public static function switchStatus($post) + { + $data = [ + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return Db::name('screen_mud')->where(['del' => 0, 'id' => $post['id']])->update($data); + } +} diff --git a/application/admin/logic/ScreenPriceLogic.php b/application/admin/logic/ScreenPriceLogic.php new file mode 100755 index 00000000..67d08b8f --- /dev/null +++ b/application/admin/logic/ScreenPriceLogic.php @@ -0,0 +1,110 @@ +where($where)->count(); + $list = $screen_price->where($where)->page($get['page'], $get['limit'])->select(); + + foreach ($list as &$item) { + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if ($item['is_show'] == 1) { + $item['is_show_text'] = '启用'; + } else { + $item['is_show_text'] = '停用'; + } + } + return ['count' => $count, 'lists' => $list]; + } + + /** + * Desc: 添加专家分类 + * @param $post array 文章分类数据 + * @return boolean + */ + public static function addScreenPrice($post) + { + $screen_price = new ScreenPrice(); + $data = [ + 'name' => $post['name'], + 'start_price' => $post['start_price'], + 'end_price' => $post['end_price'], + 'is_show' => $post['is_show'], + 'create_time' => time(), + ]; + return $screen_price->save($data); + } + + /** + * Desc: 编辑专家分类 + * @param $post array 文章分类数据 + * @return boolean + */ + public static function editScreenPrice($post) + { + $screen_price = new ScreenPrice(); + $data = [ + 'name' => $post['name'], + 'start_price' => $post['start_price'], + 'end_price' => $post['end_price'], + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return $screen_price->save($data, ['id' => $post['id'], 'del' => 0]); + } + + /** + * Desc: 删除专家分类 + * @param $id int 文章分类id + * @return boolean + */ + public static function delScreenPrice($id) + { + $screen_price = new ScreenPrice(); + $data = [ + 'update_time' => time(), + 'del' => 1, + ]; + return $screen_price->save($data, ['id' => $id, 'del' => 0]); + } + + /** + * Desc: 获取单条专家分类 + * @param $id int 文章分类id + * @return boolean + */ + public static function getScreenPrice($id = 0) + { + $where[] = ['del', '=', 0]; + if ($id) { + $where[] = ['id', '=', $id]; + } + $screen_price = new ScreenPrice(); + return $screen_price->where($where)->column('*', 'id'); + } + + public static function switchStatus($post) + { + $data = [ + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return Db::name('screen_price')->where(['del' => 0, 'id' => $post['id']])->update($data); + } +} diff --git a/application/admin/logic/ScreenSizeLogic.php b/application/admin/logic/ScreenSizeLogic.php new file mode 100755 index 00000000..64e2ff3a --- /dev/null +++ b/application/admin/logic/ScreenSizeLogic.php @@ -0,0 +1,106 @@ +where($where)->count(); + $list = $screen_size->where($where)->page($get['page'], $get['limit'])->select(); + + foreach ($list as &$item) { + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if ($item['is_show'] == 1) { + $item['is_show_text'] = '启用'; + } else { + $item['is_show_text'] = '停用'; + } + } + return ['count' => $count, 'lists' => $list]; + } + + /** + * Desc: 添加筛选尺寸 + * @param $post array + * @return boolean + */ + public static function addScreenSize($post) + { + $screen_size = new ScreenSize(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'create_time' => time(), + ]; + return $screen_size->save($data); + } + + /** + * Desc: 编辑筛选尺寸 + * @param $post array + * @return boolean + */ + public static function editScreenSize($post) + { + $screen_size = new ScreenSize(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return $screen_size->save($data, ['id' => $post['id'], 'del' => 0]); + } + + /** + * Desc: 删除筛选尺寸 + * @param $id int + * @return boolean + */ + public static function delScreenSize($id) + { + $screen_size = new ScreenSize(); + $data = [ + 'update_time' => time(), + 'del' => 1, + ]; + return $screen_size->save($data, ['id' => $id, 'del' => 0]); + } + + /** + * Desc: 获取单条筛选尺寸 + * @param $id int + * @return boolean + */ + public static function getScreenSize($id = 0) + { + $where[] = ['del', '=', 0]; + if ($id) { + $where[] = ['id', '=', $id]; + } + $screen_size = new ScreenSize(); + return $screen_size->where($where)->column('*', 'id'); + } + + public static function switchStatus($post) + { + $data = [ + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return Db::name('screen_size')->where(['del' => 0, 'id' => $post['id']])->update($data); + } +} diff --git a/application/admin/logic/SupplierCategoryLogic.php b/application/admin/logic/SupplierCategoryLogic.php new file mode 100755 index 00000000..ef7433a1 --- /dev/null +++ b/application/admin/logic/SupplierCategoryLogic.php @@ -0,0 +1,106 @@ +where($where)->count(); + $list = $supplier_category->where($where)->page($get['page'], $get['limit'])->select(); + + foreach ($list as &$item) { + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if ($item['is_show'] == 1) { + $item['is_show_text'] = '启用'; + } else { + $item['is_show_text'] = '停用'; + } + } + return ['count' => $count, 'lists' => $list]; + } + + /** + * Desc: 添加专家分类 + * @param $post array 文章分类数据 + * @return boolean + */ + public static function addSupplierCategory($post) + { + $supplier_category = new SupplierCategory(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'create_time' => time(), + ]; + return $supplier_category->save($data); + } + + /** + * Desc: 编辑专家分类 + * @param $post array 文章分类数据 + * @return boolean + */ + public static function editSupplierCategory($post) + { + $supplier_category = new SupplierCategory(); + $data = [ + 'name' => $post['name'], + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return $supplier_category->save($data, ['id' => $post['id'], 'del' => 0]); + } + + /** + * Desc: 删除专家分类 + * @param $id int 文章分类id + * @return boolean + */ + public static function delSupplierCategory($id) + { + $supplier_category = new SupplierCategory(); + $data = [ + 'update_time' => time(), + 'del' => 1, + ]; + return $supplier_category->save($data, ['id' => $id, 'del' => 0]); + } + + /** + * Desc: 获取单条专家分类 + * @param $id int 文章分类id + * @return boolean + */ + public static function getSupplierCategory($id = 0) + { + $where[] = ['del', '=', 0]; + if ($id) { + $where[] = ['id', '=', $id]; + } + $supplier_category = new SupplierCategory(); + return $supplier_category->where($where)->column('*', 'id'); + } + + public static function switchStatus($post) + { + $data = [ + 'is_show' => $post['is_show'], + 'update_time' => time(), + ]; + return Db::name('supplier_category')->where(['del' => 0, 'id' => $post['id']])->update($data); + } +} diff --git a/application/admin/logic/SupplierLogic.php b/application/admin/logic/SupplierLogic.php index e608b5b2..db529557 100755 --- a/application/admin/logic/SupplierLogic.php +++ b/application/admin/logic/SupplierLogic.php @@ -7,21 +7,32 @@ // +---------------------------------------------------------------------- namespace app\admin\logic; use think\db; +use app\common\server\UrlServer; class SupplierLogic{ /** * 列表 */ - public static function lists($get){ + public static function lists($get,$category){ $where =[]; if(isset($get['keyword']) && $get['keyword']){ $where[] = ['name','like','%'.$get['keyword'].'%']; + } + if (isset($get['cid']) && $get['cid']) { + $where[] = ['cid', '=', $get['cid']]; } $res = db::name('supplier') ->where('del',0) ->where($where); $count = $res->count(); $lists = $res->page($get['page'],$get['limit'])->select(); + foreach ($lists as &$item) { + $item['avatar'] = UrlServer::getFileUrl($item['avatar']); + $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); + if (isset($category[$item['cid']])) { + $item['cat_name'] = $category[$item['cid']]['name']; + } + } return[ 'count' =>$count, 'lists' =>$lists, @@ -35,10 +46,10 @@ class SupplierLogic{ $data = [ 'name' => $post['name'], - 'contact' => $post['contact'], - 'tel' => $post['tel'], + 'avatar' => $post['avatar'], + 'cid' => $post['cid'], 'remark' => $post['remark'], - 'address' => $post['address'], + 'honor' => $post['honor'], 'create_time' => time(), ]; @@ -53,10 +64,10 @@ class SupplierLogic{ $data = [ 'name' => $post['name'], - 'contact' => $post['contact'], - 'tel' => $post['tel'], + 'avatar' => $post['avatar'], + 'cid' => $post['cid'], 'remark' => $post['remark'], - 'address' => $post['address'], + 'honor' => $post['honor'], 'update_time' => time(), ]; @@ -72,6 +83,7 @@ class SupplierLogic{ $info = db::name('supplier') ->where(['id'=>$id]) ->find(); + $info['avatar'] = UrlServer::getFileUrl($info['avatar']); return $info; } diff --git a/application/admin/model/ScreenCapacity.php b/application/admin/model/ScreenCapacity.php new file mode 100755 index 00000000..6523ec2b --- /dev/null +++ b/application/admin/model/ScreenCapacity.php @@ -0,0 +1,13 @@ + 'require', 'disable' => 'require|in:0,1', - 'uri' => 'uri', + //'uri' => 'uri', 'type' => 'type', 'sort' => 'integer|between:1,1000' ]; protected $message = [ 'name.require' => '菜单名称不能为空', - 'uri.uri' => '地址不存在', + //'uri.require' => '地址不存在', 'sort.integer' => '排序必须为正整数', 'sort.between' => '排序范围必须在1到1000之间', ]; diff --git a/application/admin/validate/GoodsBrand.php b/application/admin/validate/GoodsBrand.php index d979e9c2..878f287c 100755 --- a/application/admin/validate/GoodsBrand.php +++ b/application/admin/validate/GoodsBrand.php @@ -22,14 +22,12 @@ class GoodsBrand extends Validate { protected $rule = [ 'name' => 'require|unique:GoodsBrand,name^del', - 'initial' => 'require', 'sort' => 'integer|egt:0', ]; protected $message = [ - 'name.require' => '品牌名称不能为空', + 'name.require' => '壶类型名称不能为空', 'name.unique' => '该名称已存在', - 'initial.require' => '品牌首字母不能为空', 'sort.integer' => '排序请输入整数', 'sort.egt' => '排序值必须大于0', ]; diff --git a/application/admin/validate/Login.php b/application/admin/validate/Login.php index 1e339253..492dd983 100755 --- a/application/admin/validate/Login.php +++ b/application/admin/validate/Login.php @@ -15,14 +15,14 @@ use think\Validate; class Login extends Validate { protected $rule = [ - 'code' => 'require|captcha', + //'code' => 'require|captcha', 'account' => 'require', 'password' => 'require|password', ]; protected $message = [ - 'code.require' => '验证码不能为空', - 'code.captcha' => '验证码错误', + //'code.require' => '验证码不能为空', + //'code.captcha' => '验证码错误', 'account.require' => '账号不能为空', 'password.require' => '密码不能为空', 'password.password' => '账号密码错误', diff --git a/application/admin/validate/ScreenCapacity.php b/application/admin/validate/ScreenCapacity.php new file mode 100755 index 00000000..87c43b13 --- /dev/null +++ b/application/admin/validate/ScreenCapacity.php @@ -0,0 +1,50 @@ + 'require', + 'name' => 'require|unique:screen_size,name^del', + 'start_capacity'=>'require', + 'end_capacity'=>'require', + 'is_show'=>'require' + ]; + + protected $message = [ + 'id.require' => 'id不可为空', + 'name.require' => '名称不能为空!', + 'name.unique' => '名称已存在', + 'start_capacity.require'=>'开始容量不能空', + 'end_capacity.require'=>'结束容量不能为空', + 'is_show.require'=>'请选择显示状态' + ]; + protected function sceneAdd() + { + $this->only(['name','start_capacity','end_capacity']); + + } + + protected function sceneEdit() + { + $this->only(['id','name']) + ->remove('id'); + } + + public function sceneDel() + { + $this->only(['id']); + } + +} \ No newline at end of file diff --git a/application/admin/validate/ScreenMud.php b/application/admin/validate/ScreenMud.php new file mode 100755 index 00000000..8ce0561a --- /dev/null +++ b/application/admin/validate/ScreenMud.php @@ -0,0 +1,53 @@ + 'require|CheckSupplier', + 'name' => 'require|unique:screen_size,name^del', + 'is_show'=>'require' + ]; + + protected $message = [ + 'id.require' => 'id不可为空', + 'name.require' => '名称不能为空!', + 'name.unique' => '名称已存在', + 'is_show.require'=>'请选择显示状态' + ]; + protected function sceneAdd() + { + $this->only(['name']); + + } + + protected function sceneEdit() + { + $this->only(['id','name']) + ->remove('id', 'CheckSupplier'); + } + + public function sceneDel() + { + $this->only(['id']); + } + + protected function CheckSupplier($value, $rule, $data){ + if(Db::name('goods')->get(['mud_id'=>$value,'del'=>0])){ + return '该分类下有泥料,不可删除'; + } + return true; + } + +} \ No newline at end of file diff --git a/application/admin/validate/ScreenPrice.php b/application/admin/validate/ScreenPrice.php new file mode 100755 index 00000000..cd0660b0 --- /dev/null +++ b/application/admin/validate/ScreenPrice.php @@ -0,0 +1,50 @@ + 'require', + 'name' => 'require|unique:screen_size,name^del', + 'start_price'=>'require', + 'end_price'=>'require', + 'is_show'=>'require' + ]; + + protected $message = [ + 'id.require' => 'id不可为空', + 'name.require' => '名称不能为空!', + 'name.unique' => '名称已存在', + 'start_price.require'=>'开始价格不能空', + 'end_price.require'=>'结束价格不能为空', + 'is_show.require'=>'请选择显示状态' + ]; + protected function sceneAdd() + { + $this->only(['name','start_price','end_price']); + + } + + protected function sceneEdit() + { + $this->only(['id','name']) + ->remove('id'); + } + + public function sceneDel() + { + $this->only(['id']); + } + +} \ No newline at end of file diff --git a/application/admin/validate/ScreenSize.php b/application/admin/validate/ScreenSize.php new file mode 100755 index 00000000..088440ad --- /dev/null +++ b/application/admin/validate/ScreenSize.php @@ -0,0 +1,53 @@ + 'require|CheckSupplier', + 'name' => 'require|unique:screen_size,name^del', + 'is_show'=>'require' + ]; + + protected $message = [ + 'id.require' => 'id不可为空', + 'name.require' => '名称不能为空!', + 'name.unique' => '名称已存在', + 'is_show.require'=>'请选择显示状态' + ]; + protected function sceneAdd() + { + $this->only(['name']); + + } + + protected function sceneEdit() + { + $this->only(['id','name']) + ->remove('id', 'CheckSupplier'); + } + + public function sceneDel() + { + $this->only(['id']); + } + + protected function CheckSupplier($value, $rule, $data){ + if(Db::name('goods')->get(['size_id'=>$value,'del'=>0])){ + return '该分类下有尺寸,不可删除'; + } + return true; + } + +} \ No newline at end of file diff --git a/application/admin/validate/Supplier.php b/application/admin/validate/Supplier.php index 0a3f75ba..ce6afb35 100755 --- a/application/admin/validate/Supplier.php +++ b/application/admin/validate/Supplier.php @@ -11,17 +11,12 @@ use think\Validate; class Supplier extends Validate{ protected $rule = [ 'name' => 'require|unique:supplier,name^del', - 'contact' => 'require', - 'tel' => 'require|mobile', - 'address' => 'require', + 'avatar' => 'require', ]; protected $message = [ - 'name.require' => '供货商名称不能为空', + 'name.require' => '专家名称不能为空', 'name.unique' =>'该名称已存在', - 'contact.require' => '联系人姓名不能为空', - 'tel.require' => '联系电话不能为空', - 'address.require' => '联系地址不能为空', - 'tel.mobile' => '请输入正确的手机格式' + 'avatar.require' => '专家封面不能为空', ]; } \ No newline at end of file diff --git a/application/admin/validate/SupplierCategory.php b/application/admin/validate/SupplierCategory.php new file mode 100755 index 00000000..c2437ad0 --- /dev/null +++ b/application/admin/validate/SupplierCategory.php @@ -0,0 +1,53 @@ + 'require|CheckSupplier', + 'name' => 'require|unique:supplier_category,name^del', + 'is_show'=>'require' + ]; + + protected $message = [ + 'id.require' => 'id不可为空', + 'name.require' => '分类名称不能为空!', + 'name.unique' => '分类名称已存在', + 'is_show.require'=>'请选择显示状态' + ]; + protected function sceneAdd() + { + $this->only(['name']); + + } + + protected function sceneEdit() + { + $this->only(['id','name']) + ->remove('id', 'CheckSupplier'); + } + + public function sceneDel() + { + $this->only(['id']); + } + + protected function CheckSupplier($value, $rule, $data){ + if(Db::name('supplier')->get(['cid'=>$value,'del'=>0])){ + return '该分类下有专家,不可删除'; + } + return true; + } + +} \ No newline at end of file diff --git a/application/admin/view/account/login.html b/application/admin/view/account/login.html index 622ae449..3cfea9ee 100755 --- a/application/admin/view/account/login.html +++ b/application/admin/view/account/login.html @@ -49,7 +49,7 @@ placeholder="请输入密码"/> -
*用户可以根据商品品牌搜索商品。
-*发布商品时可以选择商品对应的品牌。
+*用户可以根据商品壶类型搜索商品。
+*发布商品时可以选择商品对应的壶类型。
*平台维护筛选容量,方便筛选容量整理。
+*平台维护泥料,方便泥料整理。
+*平台维护筛选价格,方便筛选价格整理。
+*平台维护尺寸,方便尺寸整理。
+*发布商品时可以选择供货商,方便货源管理。
+*发布商品时可以选择专家,方便货源管理。
*平台维护专家分类,方便专家分类整理。
+*会员商城下单列表。
+*订单状态有待付款,待发货,待收货,已完成,已关闭。
+*待付款订单取消后则为已关闭。待付款订单支付后则为待发货。待发货订单发货后则为待收货。待收货订单收货后则为已完成。
+*会员购买商品之后可以对购买的商品进行评价。
+*可以对会员的商品评价进行回复,隐藏或删除。
+*商品评价会在商城的商品详情中进行显示。
+昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >
+ +昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >
+昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >
+昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >
+
+ 商品管理
+
+
+ 会员管理
+
+
+ 订单管理
+
+
+ 优惠券
+
+
+ 限时秒杀
+
+
+ 分销管理
+
+
+ 内容管理
+
+
+ 财务
+
+ *拼团列表,查看拼团商品,拼团团长,拼团订单等信息;
+*拼团失败的订单系统自动原路退款,退款失败时,可手动点击退款
+*审核会员的佣金提现申请。
+*佣金提现支持微信、支付宝转账。提现失败会退回全部金额。
+*发布商品时可选统一规格或者多规格,满足商品不同销售属性设置。
+*商品售卖状态分为销售中、仓库中、回收站。
+*库存预警商品为库存不足的销售中、仓库中商品。
+*会员充值订单列表。
+*充值订单状态为待付款,已完成。
+*记录管理后台系统日志,可用于排查事故原因
+*商城支付方式设置,不同应用场景支持的支付方式不同。
+*请前往微信和支付宝平台申请对应的支付端口。
+*微信支付的appid,appsecret从微信功能模块获取
+*会员账户积分变动记录。
+*平台维护帮助分类,方便帮助分类整理。
+*平台维护专家分类,方便专家分类整理。
+*会员根据设定好的等级成长值升级,等级成长值通过日常消费积累。
+*删除会员等级时,会重新调整对应会员的等级,请谨慎操作。
+1.请在linux环境使用crontab命令添加定时任务:*/1 * * * * php think crontab 。
+2.规则如下:
+*(0~59分) *(0~23小时) *(1~31号) *(1-12月) *(0-7星期,0和7都代表星期日)
+*(星号):代表任何时刻都接受的意思。例:0 10 * * * command 日、月、周都是*,就代表着不论何月、何日的星期几的10:00都执行后续命令的意思。
+,(逗号):代表分隔时段的意思。例:要执行的工作是2:00与3:00时,就会是:0 2,3 * * * command时间还是有五列,不过第二列是 2,3 ,代表2与3都适用。
+-(减号): 代表一段时间范围内,例:8点到11点之间的每小时的18分都进行一项工作:18 8-11 * * * command仔细看到第二列变成8-11.代表 8,9,10,11,12 都适用的。
+/n(斜线):那个n代表数字,即是每隔n单位间隔的意思,例:每五分钟进行一次,则:*/5 * * * * 。
+*会员注册时的服务协议,在登录注册页面显示。
+*会员隐私政策协议,在登录注册页面显示。
+*售后保障协议,在退款申请页面显示。
+*设置参与砍价活动的商品。
+*生效的砍价活动商品需要满足两个条件,一是开启活动,二是在活动有效期内。
+*会员注册设置
+*设置商城首页,商品详情页显示足迹气泡。营造活动氛围,增强气氛。
+*注意事项:设置中的足迹气泡开关是整个气泡的总开关,如果这里关了则任何地方都不显示气泡。
+*会员账户余额变动记录。
+*会员账户成长值变动记录。
+*设置好秒杀时间段后,需要选择参与秒杀的商品。
+*秒杀商品的所有规格都要填写秒杀价,如果移除正在秒杀的规格则表示按规格设定的销售价出售。
+*分销会员列表,可查看分销员佣金详情,直推会员,分销订单,以及修改分销会员上级;
+*分销佣金需要订单完成并且超出售后期限后系统自动结算。
+*用户可以根据商品壶类型搜索商品。
+*发布商品时可以选择商品对应的壶类型。
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *管理系统运行过程中产生的缓存。
+*设置快递配送的运费模板。
+*需要开启快递发货的配送方式,运费模板才能生效。
+*平台维护尺寸,方便尺寸整理。
+*平台维护筛选容量,方便筛选容量整理。
+*用户可以根据商品分类搜索商品,请正确创建分类。
+*点击分类名称前符号,显示该商品分类的下级分类。
+*平台管理广告信息,系统默认了部分广告位,允许新建广告位。
+*广告区分不同的终端,移动端商城(含H5、小程序、APP)和PC端商城。
+*广告链接可以选择商城页面,商品页面,自定义链接,用户点击广告后跳转到相应的页面。
+*广告停用之后,商城不展示该广告。
+*设置商城客服联系信息
+*小程序客服在微信小程序后台开通
+*平台维护泥料,方便泥料整理。
+*佣金记录用于查看每笔订单的分销佣金明细;
+*佣金状态分为:待结算,已返佣,已失效。订单结算后才会进行返佣,结算前如果有售后退款,则佣金会失效;
+*专区活动能很方便的聚合需要促销的商品,形成各类专题页。
+*新增专区活动,可设置专区在首页上架显示。
+*活动专区可任意删除,请谨慎操作。
+*平台维护筛选价格,方便筛选价格整理。
+*会员列表,对会员进行编辑,账户调整,等级调整和资料查看等操作。
+*平台维护文章分类,方便文章分类整理。
+*平台发布文章,可在商城新闻资讯栏目查看。
+*设置文章为商城公告后,文章标题会在商城首页的新闻公告轮播显示。
+*发布商品时可以选择专家,方便货源管理。
+*会员提交的售后退款订单列表。
+*订单状态处于待收货,已完成(在售后退款时效内)时,会员可提交售后退款。
+*退货退款售后申请店铺需要确认收货后才能退款。
+*店铺同意退款后处于等待退款状态,由平台会自动进行原路退款操作。
+*用户每天签到一次可获得每天签到奖励,包括积分和成长值。
+*点击新增连续签到奖励可以设置满足连续签到天数时的额外奖励,连续天数规则不能重复。
+*用户签到中断会重新计算连续天数;超过设置的最大连续签到奖励天数后,也会重新计算连续天数,循环发放连续奖励。
+