From 92721fca42900f607fb213c494656cb9a27c250e Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 30 Mar 2023 12:16:11 +0800 Subject: [PATCH 01/50] =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=95=86=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=B7=BB=E5=8A=A0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adminapi/controller/v1/agent/AgentManage.php | 2 +- .../app/adminapi/controller/v1/agent/Division.php | 9 +++++++-- crmeb/app/dao/BaseDao.php | 4 +++- crmeb/app/dao/user/UserDao.php | 1 + crmeb/app/services/agent/DivisionServices.php | 10 ++++++++-- crmeb/app/services/user/UserServices.php | 1 + template/admin/src/pages/division/agent/index.vue | 10 +++++----- template/admin/src/pages/division/list/index.vue | 15 +++++---------- 8 files changed, 31 insertions(+), 21 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/agent/AgentManage.php b/crmeb/app/adminapi/controller/v1/agent/AgentManage.php index 7decf21f9..0383da60e 100644 --- a/crmeb/app/adminapi/controller/v1/agent/AgentManage.php +++ b/crmeb/app/adminapi/controller/v1/agent/AgentManage.php @@ -60,7 +60,7 @@ class AgentManage extends AuthController public function get_badge() { $where = $this->request->getMore([ - ['data', ''], + ['data', '', '', 'time'], ['nickname', ''], ]); return app('json')->success(['res' => $this->services->getSpreadBadge($where)]); diff --git a/crmeb/app/adminapi/controller/v1/agent/Division.php b/crmeb/app/adminapi/controller/v1/agent/Division.php index cbdc965ca..50cf1baa5 100644 --- a/crmeb/app/adminapi/controller/v1/agent/Division.php +++ b/crmeb/app/adminapi/controller/v1/agent/Division.php @@ -121,19 +121,24 @@ class Division extends AuthController * 保存代理商 * @param UserServices $userServices * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function divisionAgentSave(UserServices $userServices) { $data = $this->request->postMore([ + ['division_id', 0], ['uid', 0], ['division_percent', 0], ['division_end_time', ''], ['division_status', 1], ['edit', 0], ]); - $userInfo = $userServices->get((int)$data['uid']); + $userInfo = $userServices->count(['uid' => (int)$data['uid']]); if (!$userInfo) throw new AdminException(100100); - $data['division_id'] = $this->adminInfo['division_id']; + $divisionUserInfo = $userServices->count(['uid' => (int)$data['division_id'], 'is_division' => 1, 'division_id' => $data['division_id']]); + if (!$divisionUserInfo) throw new AdminException(100100); $this->services->divisionAgentSave($data); return app('json')->success(100000); } diff --git a/crmeb/app/dao/BaseDao.php b/crmeb/app/dao/BaseDao.php index d1e69ece7..8563bd493 100644 --- a/crmeb/app/dao/BaseDao.php +++ b/crmeb/app/dao/BaseDao.php @@ -304,13 +304,14 @@ abstract class BaseDao $with = []; $otherWhere = []; $responses = new \ReflectionClass($this->setModel()); + foreach ($where as $key => $value) { $method = 'search' . Str::studly($key) . 'Attr'; if ($responses->hasMethod($method)) { $with[] = $key; } else { if ($key != 'timeKey') { - $otherWhere[] = $value; + $otherWhere[] = is_array($value) ? $value : [$key, '=', $value]; } } } @@ -320,6 +321,7 @@ abstract class BaseDao /** * 根据搜索器获取搜索内容 * @param $where + * @param $search * @return BaseModel * @throws \ReflectionException * @author 吴汐 diff --git a/crmeb/app/dao/user/UserDao.php b/crmeb/app/dao/user/UserDao.php index 715374a5c..3c5a74a39 100644 --- a/crmeb/app/dao/user/UserDao.php +++ b/crmeb/app/dao/user/UserDao.php @@ -176,6 +176,7 @@ class UserDao extends BaseDao * 获取推广员ids * @param array $where * @return array + * @throws \ReflectionException */ public function getAgentUserIds(array $where) { diff --git a/crmeb/app/services/agent/DivisionServices.php b/crmeb/app/services/agent/DivisionServices.php index cfdb5a65a..ddcfab914 100644 --- a/crmeb/app/services/agent/DivisionServices.php +++ b/crmeb/app/services/agent/DivisionServices.php @@ -222,9 +222,11 @@ class DivisionServices extends BaseServices if ($uid && !$userInfo) throw new AdminException(400214); $field = []; if ($uid) { + $field[] = Form::number('division_id', '事业部UID', $userInfo['division_id'] ?? '')->disabled(true)->style(['width' => '173px']); $field[] = Form::number('uid', '用户UID', $userInfo['uid'] ?? '')->disabled(true)->style(['width' => '173px']); $field[] = Form::hidden('edit', 1); } else { + $field[] = Form::number('division_id', '事业部UID')->style(['width' => '173px']); $field[] = Form::number('uid', '用户UID')->style(['width' => '173px']); $field[] = Form::hidden('edit', 0); } @@ -238,20 +240,24 @@ class DivisionServices extends BaseServices * 保存代理商 * @param $data * @return bool + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function divisionAgentSave($data) { /** @var UserServices $userServices */ $userServices = app()->make(UserServices::class); $uid = $data['uid']; - $userInfo = $userServices->getUserInfo($uid, 'is_division,division_id,agent_id'); $agentData = [ + 'division_id' => $data['division_id'], 'division_status' => $data['division_status'], 'division_percent' => $data['division_percent'], 'division_change_time' => time(), 'division_end_time' => strtotime($data['division_end_time']), + 'division_type' => 2, ]; - $division_info = $userServices->getUserInfo($userInfo['division_id'], 'division_end_time,division_percent'); + $division_info = $userServices->getUserInfo($data['division_id'], 'division_end_time,division_percent'); if ($division_info) { if ($agentData['division_percent'] > $division_info['division_percent']) throw new AdminException(400448); if ($agentData['division_end_time'] > $division_info['division_end_time']) throw new AdminException(400449); diff --git a/crmeb/app/services/user/UserServices.php b/crmeb/app/services/user/UserServices.php index 408b5e9f9..dd15649fd 100644 --- a/crmeb/app/services/user/UserServices.php +++ b/crmeb/app/services/user/UserServices.php @@ -237,6 +237,7 @@ class UserServices extends BaseServices * 获取分销员ids * @param array $where * @return array + * @throws \ReflectionException */ public function getAgentUserIds(array $where) { diff --git a/template/admin/src/pages/division/agent/index.vue b/template/admin/src/pages/division/agent/index.vue index 556e2403b..7c0ad66b1 100644 --- a/template/admin/src/pages/division/agent/index.vue +++ b/template/admin/src/pages/division/agent/index.vue @@ -27,6 +27,11 @@ + + + + + Date: Thu, 30 Mar 2023 12:22:22 +0800 Subject: [PATCH 02/50] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/order/StoreOrderController.php | 59 ++++--------------- 1 file changed, 11 insertions(+), 48 deletions(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 40643831f..a0d5db7c8 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -94,6 +94,10 @@ class StoreOrderController * @param Request $request * @param ShippingTemplatesServices $services * @return mixed + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function confirm(Request $request, ShippingTemplatesServices $services) { @@ -297,23 +301,6 @@ class StoreOrderController } } - /** - * TODO 支付宝单独支付 弃用 - * @param OrderPayServices $payServices - * @param OtherOrderServices $services - * @param string $key - * @param string $quitUrl - * @return mixed - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - */ -// public function aliPay(OrderPayServices $payServices, OtherOrderServices $services, string $key, string $quitUrl) -// { -// $payInfo = $this->services->aliPayOrder($payServices, $services, $key, $quitUrl); -// return app('json')->success(['pay_content' => $payInfo]); -// } - /** * 订单列表 * @param Request $request @@ -467,8 +454,14 @@ class StoreOrderController /** * 订单 查看物流 * @param Request $request + * @param StoreOrderCartInfoServices $services + * @param ExpressServices $expressServices * @param $uni + * @param string $type * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '') { @@ -535,6 +528,7 @@ class StoreOrderController * @param Request $request * @param StoreOrderCartInfoServices $cartInfoServices * @param StoreProductReplyServices $replyServices + * @return \think\Response|void * @throws \Psr\SimpleCache\InvalidArgumentException */ public function comment(Request $request, StoreOrderCartInfoServices $cartInfoServices, StoreProductReplyServices $replyServices) @@ -728,37 +722,6 @@ class StoreOrderController return app('json')->fail(100028); } - /** - * 订单申请退款审核 - * @param Request $request - * @param StoreOrderRefundServices $services - */ - public function refund_verify(Request $request, StoreOrderRefundServices $services) - { -// $data = $request->postMore([ -// ['text', ''], -// ['refund_reason_wap_img', ''], -// ['refund_reason_wap_explain', ''], -// ['uni', ''], -// ['refund_type', 1], -// ['cart_id', 0], -// ['refund_num', 0] -// ]); -// $uni = $data['uni']; -// unset($data['uni']); -// if ($data['refund_reason_wap_img'] != '') { -// $data['refund_reason_wap_img'] = explode(',', $data['refund_reason_wap_img']); -// } else { -// $data['refund_reason_wap_img'] = []; -// } -// if (!$uni || $data['text'] == '' || $data['refund_num'] <= 0) return app('json')->fail('参数错误!'); -// $res = $services->orderApplyRefund($this->services->getUserOrderDetail($uni, (int)$request->uid()), $data['text'], $data['refund_reason_wap_explain'], $data['refund_reason_wap_img'], $data['refund_type'], $data['cart_id'], $data['refund_num']); -// if ($res) -// return app('json')->success('提交申请成功'); -// else -// return app('json')->fail('提交失败'); - } - /** * 用户退货提交快递单号 * @param Request $request From 9b20b377490200e4bae78144ec5f915e3269ecf4 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 30 Mar 2023 17:46:36 +0800 Subject: [PATCH 03/50] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/export/ExportExcel.php | 3 ++- .../adminapi/controller/v1/user/UserLabel.php | 8 ++++++- crmeb/app/dao/user/UserWechatUserDao.php | 4 ++++ template/admin/src/pages/user/list/index.vue | 24 +++++++++++-------- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/export/ExportExcel.php b/crmeb/app/adminapi/controller/v1/export/ExportExcel.php index 0fc03b224..3dd393675 100644 --- a/crmeb/app/adminapi/controller/v1/export/ExportExcel.php +++ b/crmeb/app/adminapi/controller/v1/export/ExportExcel.php @@ -72,7 +72,8 @@ class ExportExcel extends AuthController ['label_id', ''], ['now_money', 'normal'], ['field_key', ''], - ['isMember', ''] + ['isMember', ''], + ['ids', []] ]); return app('json')->success($this->service->exportUserList($where)); } diff --git a/crmeb/app/adminapi/controller/v1/user/UserLabel.php b/crmeb/app/adminapi/controller/v1/user/UserLabel.php index 034fc7736..f61f4077f 100644 --- a/crmeb/app/adminapi/controller/v1/user/UserLabel.php +++ b/crmeb/app/adminapi/controller/v1/user/UserLabel.php @@ -37,7 +37,11 @@ class UserLabel extends AuthController /** * 标签列表 + * @param int $label_cate * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function index($label_cate = 0) { @@ -60,8 +64,10 @@ class UserLabel extends AuthController /** * 保存标签表单数据 - * @param int $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function save() { diff --git a/crmeb/app/dao/user/UserWechatUserDao.php b/crmeb/app/dao/user/UserWechatUserDao.php index 20cddac5b..914c86641 100644 --- a/crmeb/app/dao/user/UserWechatUserDao.php +++ b/crmeb/app/dao/user/UserWechatUserDao.php @@ -244,6 +244,10 @@ class UserWechatUserDao extends BaseDao if (isset($where['is_del'])) { $model->where($userAlias . 'is_del', $where['is_del']); } + + if (isset($where['ids']) && count($where['ids'])) { + $model->whereIn($userAlias . 'uid', $where['ids']); + } return $field ? $model->field($field) : $model; } diff --git a/template/admin/src/pages/user/list/index.vue b/template/admin/src/pages/user/list/index.vue index 961cf1be1..5d0aac0f2 100644 --- a/template/admin/src/pages/user/list/index.vue +++ b/template/admin/src/pages/user/list/index.vue @@ -1043,6 +1043,9 @@ export default { }); this.userFrom.label_id = activeIds.join(','); } + if (this.ids.length) { + this.userFrom.ids = this.ids; + } this.userFrom.user_type = this.userFrom.user_type || ''; this.userFrom.status = this.userFrom.status || ''; this.userFrom.sex = this.userFrom.sex || ''; @@ -1353,14 +1356,15 @@ img { color: #808695; } } -.demo-drawer-footer{ - width: 100%; - position: absolute; - bottom: 0; - left: 0; - border-top: 1px solid #e8e8e8; - padding: 10px 16px; - text-align: right; - background: #fff; - } + +.demo-drawer-footer { + width: 100%; + position: absolute; + bottom: 0; + left: 0; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + background: #fff; +} From 08e41ae0a875f1c8e8a26b8454eba0549f683eed Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 30 Mar 2023 17:46:50 +0800 Subject: [PATCH 04/50] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=87=91=E9=A2=9D=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/goods/goods_comment_con/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/uni-app/pages/goods/goods_comment_con/index.vue b/template/uni-app/pages/goods/goods_comment_con/index.vue index b9f5cf1b0..b05d64d74 100644 --- a/template/uni-app/pages/goods/goods_comment_con/index.vue +++ b/template/uni-app/pages/goods/goods_comment_con/index.vue @@ -9,7 +9,7 @@ {{productInfo.store_name}} - {{$t(`¥`)}}{{productInfo.price}} + {{$t(`¥`)}}{{productInfo.attrInfo.price}} x{{cart_num}} From 2b85e04a5860dcb88f5e34a6b878ea623a24eeaa Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 30 Mar 2023 18:27:25 +0800 Subject: [PATCH 05/50] =?UTF-8?q?improve;=20=E4=B8=BB=E9=A2=98=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/i18n/lang/en.js | 1 + template/admin/src/i18n/lang/zh-cn.js | 13 +- template/admin/src/i18n/lang/zh-tw.js | 1 + template/admin/src/layout/component/aside.vue | 7 +- .../src/layout/component/columnsAside.vue | 9 +- template/admin/src/layout/logo/index.vue | 8 +- .../src/layout/navBars/breadcrumb/setings.vue | 355 +++++++++++------- .../src/layout/navBars/breadcrumb/theme.js | 125 ++++++ .../src/layout/navBars/tagsView/tagsView.vue | 13 +- .../admin/src/store/module/themeConfig.js | 218 +++++------ template/admin/src/theme/app.scss | 4 +- template/admin/src/theme/variables.scss | 5 +- 12 files changed, 499 insertions(+), 260 deletions(-) create mode 100644 template/admin/src/layout/navBars/breadcrumb/theme.js diff --git a/template/admin/src/i18n/lang/en.js b/template/admin/src/i18n/lang/en.js index 6103d04f4..dec325de5 100644 --- a/template/admin/src/i18n/lang/en.js +++ b/template/admin/src/i18n/lang/en.js @@ -133,6 +133,7 @@ export default { fourWartermarkText: 'Watermark copy', fiveTitle: 'Other settings', fiveTagsStyle: 'Tagsview style', + themeStyle: 'Theme', fiveAnimation: 'page animation', fiveColumnsAsideStyle: 'Column style', fiveColumnsAsideLayout: 'Column layout', diff --git a/template/admin/src/i18n/lang/zh-cn.js b/template/admin/src/i18n/lang/zh-cn.js index 4e6bdc004..41b0e64eb 100644 --- a/template/admin/src/i18n/lang/zh-cn.js +++ b/template/admin/src/i18n/lang/zh-cn.js @@ -121,18 +121,19 @@ export default { threeLockScreenTime: '自动锁屏(s/秒)', fourTitle: '界面显示', fourIsShowLogo: '侧边栏 Logo', - fourIsBreadcrumb: '开启 面包屑', - fourIsBreadcrumbIcon: '开启 面包屑图标', - fourIsTagsview: '开启 历史菜单', - fourIsTagsviewIcon: '开启 历史菜单 图标', - fourIsFooter: '开启 Footer', + fourIsBreadcrumb: '面包屑', + fourIsBreadcrumbIcon: '面包屑图标', + fourIsTagsview: '历史菜单', + fourIsTagsviewIcon: '历史菜单 图标', + fourIsFooter: 'Footer', fourIsGrayscale: '灰色模式', fourIsInvert: '色弱模式', fourIsDark: '深色模式', fourIsWartermark: '开启水印', fourWartermarkText: '水印文案', fiveTitle: '其它设置', - fiveTagsStyle: 'Tagsview 风格', + fiveTagsStyle: '标签风格', + themeStyle: '主题', fiveAnimation: '主页面切换动画', fiveColumnsAsideStyle: '分栏高亮风格', fiveColumnsAsideLayout: '分栏布局风格', diff --git a/template/admin/src/i18n/lang/zh-tw.js b/template/admin/src/i18n/lang/zh-tw.js index 36f92ba32..0df26fb99 100644 --- a/template/admin/src/i18n/lang/zh-tw.js +++ b/template/admin/src/i18n/lang/zh-tw.js @@ -133,6 +133,7 @@ export default { fourWartermarkText: '浮水印文案', fiveTitle: '其它設定', fiveTagsStyle: 'Tagsview 風格', + themeStyle: '主題', fiveAnimation: '主頁面切換動畫', fiveColumnsAsideStyle: '分欄高亮風格', fiveColumnsAsideLayout: '分欄佈局風格', diff --git a/template/admin/src/layout/component/aside.vue b/template/admin/src/layout/component/aside.vue index 0254fe721..90e30534a 100644 --- a/template/admin/src/layout/component/aside.vue +++ b/template/admin/src/layout/component/aside.vue @@ -1,6 +1,7 @@