Kaynağa Gözat

Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

From-wh 2 yıl önce
ebeveyn
işleme
d8bb8bf192

+ 12 - 13
crmeb/app/adminapi/controller/v1/user/User.php

@@ -123,20 +123,19 @@ class User extends AuthController
         if ($data['card_id']) {
             if (!check_card($data['card_id'])) return app('json')->fail(400315);
         }
-        if ($data['pwd']) {
-            if (!$data['true_pwd']) {
-                return app('json')->fail(400263);
-            }
-            if ($data['pwd'] != $data['true_pwd']) {
-                return app('json')->fail(400264);
-            }
-            if (strlen($data['pwd']) < 6 || strlen($data['pwd']) > 32) {
-                return app('json')->fail(400762);
-            }
-            $data['pwd'] = md5($data['pwd']);
-        } else {
-            unset($data['pwd']);
+        if (!$data['pwd']) {
+            return app('json')->fail(400256);
+        }
+        if (!$data['true_pwd']) {
+            return app('json')->fail(400263);
+        }
+        if ($data['pwd'] != $data['true_pwd']) {
+            return app('json')->fail(400264);
+        }
+        if (strlen($data['pwd']) < 6 || strlen($data['pwd']) > 32) {
+            return app('json')->fail(400762);
         }
+        $data['pwd'] = md5($data['pwd']);
         unset($data['true_pwd']);
         $data['avatar'] = sys_config('h5_avatar');
         $data['adminId'] = $this->adminId;

+ 41 - 41
crmeb/app/services/order/StoreOrderServices.php

@@ -1431,24 +1431,24 @@ HTML;
         $yesterday_sales = $this->dao->todaySales('yesterday');
         //日同比
         $sales_today_ratio = $this->growth($today_sales, $yesterday_sales);
-        //周销售额
-        //本周
-        $this_week_sales = $this->dao->thisWeekSales('week');
-        //上周
-        $last_week_sales = $this->dao->thisWeekSales('last week');
-        //周同比
-        $sales_week_ratio = $this->growth($this_week_sales, $last_week_sales);
+//        //周销售额
+//        //本周
+//        $this_week_sales = $this->dao->thisWeekSales('week');
+//        //上周
+//        $last_week_sales = $this->dao->thisWeekSales('last week');
+//        //周同比
+//        $sales_week_ratio = $this->growth($this_week_sales, $last_week_sales);
         //总销售额
         $total_sales = $this->dao->totalSales('month');
         $sales = [
             'today' => $today_sales,
             'yesterday' => $yesterday_sales,
             'today_ratio' => $sales_today_ratio,
-            'week' => $this_week_sales,
-            'last_week' => $last_week_sales,
-            'week_ratio' => $sales_week_ratio,
+//            'week' => $this_week_sales,
+//            'last_week' => $last_week_sales,
+//            'week_ratio' => $sales_week_ratio,
             'total' => $total_sales . '元',
-            'date' => '日'
+            'date' => '日'
         ];
         //TODO:用户访问量
         //今日访问量
@@ -1457,23 +1457,23 @@ HTML;
         $yesterday_visits = $productLogServices->count(['time' => 'yesterday', 'type' => 'visit']);
         //日同比
         $visits_today_ratio = $this->growth($today_visits, $yesterday_visits);
-        //本周访问量
-        $this_week_visits = $productLogServices->count(['time' => 'week', 'type' => 'visit']);
-        //上周访问量
-        $last_week_visits = $productLogServices->count(['time' => 'last week', 'type' => 'visit']);
-        //周同比
-        $visits_week_ratio = $this->growth($this_week_visits, $last_week_visits);
+//        //本周访问量
+//        $this_week_visits = $productLogServices->count(['time' => 'week', 'type' => 'visit']);
+//        //上周访问量
+//        $last_week_visits = $productLogServices->count(['time' => 'last week', 'type' => 'visit']);
+//        //周同比
+//        $visits_week_ratio = $this->growth($this_week_visits, $last_week_visits);
         //总访问量
         $total_visits = $productLogServices->count(['time' => 'month', 'type' => 'visit']);
         $visits = [
             'today' => $today_visits,
             'yesterday' => $yesterday_visits,
             'today_ratio' => $visits_today_ratio,
-            'week' => $this_week_visits,
-            'last_week' => $last_week_visits,
-            'week_ratio' => $visits_week_ratio,
+//            'week' => $this_week_visits,
+//            'last_week' => $last_week_visits,
+//            'week_ratio' => $visits_week_ratio,
             'total' => $total_visits . 'Pv',
-            'date' => '日'
+            'date' => '日'
         ];
         //TODO 订单量
         //今日订单量
@@ -1482,23 +1482,23 @@ HTML;
         $yesterday_order = $this->dao->todayOrderVisit('yesterday', 1);
         //订单日同比
         $order_today_ratio = $this->growth($today_order, $yesterday_order);
-        //本周订单量
-        $this_week_order = $this->dao->todayOrderVisit('week', 2);
-        //上周订单量
-        $last_week_order = $this->dao->todayOrderVisit('last week', 2);
-        //订单周同比
-        $order_week_ratio = $this->growth($this_week_order, $last_week_order);
+//        //本周订单量
+//        $this_week_order = $this->dao->todayOrderVisit('week', 2);
+//        //上周订单量
+//        $last_week_order = $this->dao->todayOrderVisit('last week', 2);
+//        //订单周同比
+//        $order_week_ratio = $this->growth($this_week_order, $last_week_order);
         //总订单量
         $total_order = $this->dao->count(['time' => 'month', 'paid' => 1, 'refund_status' => 0, 'pid' => 0]);
         $order = [
             'today' => $today_order,
             'yesterday' => $yesterday_order,
             'today_ratio' => $order_today_ratio,
-            'week' => $this_week_order,
-            'last_week' => $last_week_order,
-            'week_ratio' => $order_week_ratio,
+//            'week' => $this_week_order,
+//            'last_week' => $last_week_order,
+//            'week_ratio' => $order_week_ratio,
             'total' => $total_order . '单',
-            'date' => '日'
+            'date' => '日'
         ];
         //TODO 用户
         //今日新增用户
@@ -1507,23 +1507,23 @@ HTML;
         $yesterday_user = $uSercice->todayAddVisits('yesterday', 1);
         //新增用户日同比
         $user_today_ratio = $this->growth($today_user, $yesterday_user);
-        //本周新增用户
-        $this_week_user = $uSercice->todayAddVisits('week', 2);
-        //上周新增用户
-        $last_week_user = $uSercice->todayAddVisits('last week', 2);
-        //新增用户周同比
-        $user_week_ratio = $this->growth($this_week_user, $last_week_user);
+//        //本周新增用户
+//        $this_week_user = $uSercice->todayAddVisits('week', 2);
+//        //上周新增用户
+//        $last_week_user = $uSercice->todayAddVisits('last week', 2);
+//        //新增用户周同比
+//        $user_week_ratio = $this->growth($this_week_user, $last_week_user);
         //所有用户
         $total_user = $uSercice->count(['time' => 'month']);
         $user = [
             'today' => $today_user,
             'yesterday' => $yesterday_user,
             'today_ratio' => $user_today_ratio,
-            'week' => $this_week_user,
-            'last_week' => $last_week_user,
-            'week_ratio' => $user_week_ratio,
+//            'week' => $this_week_user,
+//            'last_week' => $last_week_user,
+//            'week_ratio' => $user_week_ratio,
             'total' => $total_user . '人',
-            'date' => '日'
+            'date' => '日'
         ];
         $info = array_values(compact('sales', 'visits', 'order', 'user'));
         $info[0]['title'] = '销售额';

+ 25 - 21
template/admin/src/pages/agent/agentManage.vue

@@ -81,11 +81,11 @@
               </a>
               <DropdownMenu slot="list">
                 <DropdownItem name="1">推广订单</DropdownItem>
-                <DropdownItem name="2">推广方式</DropdownItem>
-                <!--                                <DropdownItem name="3">修改上级推广人</DropdownItem>-->
-                <!--                                <DropdownItem name="4">清除上级推广人</DropdownItem>-->
-                <!--                                <DropdownItem name="5">取消推广资格</DropdownItem>-->
-                <DropdownItem name="5">赠送分销等级</DropdownItem>
+                <DropdownItem name="2">推广二维码</DropdownItem>
+                <DropdownItem name="3">修改上级推广人</DropdownItem>
+                <DropdownItem name="4">清除上级推广人</DropdownItem>
+                <DropdownItem name="5">取消推广资格</DropdownItem>
+                <DropdownItem name="6">修改分销等级</DropdownItem>
               </DropdownMenu>
             </Dropdown>
           </template>
@@ -104,7 +104,7 @@
     </Card>
     <!-- 推广人列表-->
     <promoters-list ref="promotersLists"></promoters-list>
-    <!-- 推广方式-->
+    <!-- 推广二维码-->
     <Modal v-model="modals" scrollable footer-hide closable title="推广二维码" :mask-closable="false" width="600">
       <div class="acea-row row-around">
         <div class="acea-row row-column-around row-between-wrapper">
@@ -367,21 +367,25 @@ export default {
     changeMenu(row, name, index) {
       switch (name) {
         case '1':
-          this.promoters(row, 'order');
+          this.promoters(row, 'order');//推广人订单
           break;
         case '2':
-          this.spreadQR(row);
+          this.spreadQR(row);//推广方式二维码
           break;
         case '3':
-          this.editS(row);
+          this.editS(row);//修改上级推广人
           break;
-        case '4':
-          this.del(row, '解除【 ' + row.nickname + ' 】的上级推广人', index);
-        case '5':
+        case '4'://清除上级推广人
+          this.del_parent(row, '清除【 ' + row.nickname + ' 】的上级推广人', index);
+          break;
+        case '5'://取消推广资格
+          this.del_agent(row, '取消【 ' + row.nickname + ' 】的推广资格', index);
+          break;
+        case '6'://修改推广等级
           this.$modalForm(membershipDataAddApi({ uid: row.uid }, '/agent/get_level_form')).then(() => this.getList());
           break;
         default:
-          this.del_open(row, '解除【 ' + row.nickname + ' 】的推广资格', index);
+
           break;
       }
     },
@@ -397,16 +401,16 @@ export default {
       this.formInline.spread_uid = e.uid;
       this.formInline.image = e.image;
     },
-    // 删除
-    del(row, tit, num) {
-      let delfromData = {
-        title: tit,
+    // 清除上级关系
+    del_parent(rows, titile, num) {
+      let delfromDatap = {
+        title: titile,
         num: num,
-        url: `agent/stair/delete_spread/${row.uid}`,
+        url: `agent/stair/delete_spread/${rows.uid}`,
         method: 'PUT',
         ids: '',
       };
-      this.$modalSure(delfromData)
+      this.$modalSure(delfromDatap)
         .then((res) => {
           this.$Message.success(res.msg);
           this.getList();
@@ -415,8 +419,8 @@ export default {
           this.$Message.error(res.msg);
         });
     },
-    // 删除
-    del_open(row, tit, num) {
+    // 取消自己推广资格
+    del_agent(row, tit, num) {
       let delfromData = {
         title: tit,
         num: num,

+ 8 - 6
template/admin/src/pages/index/components/baseInfo.vue

@@ -8,9 +8,10 @@
         <Tag slot="extra" color="green">{{ item.date }}</Tag>
         <div>
           <!--<Numeral :value="item.yesterday" style=""/>-->
-          <div class="number">{{ item.yesterday }}</div>
+          <div class="number">{{ item.today }}</div>
           <div class="ivu-pt-8" style="height: 42px">
-            <span style="display: inline-block" class="ivu-mr">
+            <span>昨日 {{ item.yesterday }}</span>
+            <span class="ivu-mr">
               <!--日同比 <Trend :flag="Number(item.today_ratio)>=0?'up':'down'">{{Number(item.today_ratio)}}%</Trend>-->
               日环比 {{ Number(item.today_ratio) }}%
               <Icon
@@ -19,15 +20,15 @@
                 :class="Number(item.today_ratio) >= 0 ? ' ' : 'on'"
               />
             </span>
-            <span style="display: inline-block">
-              <!--周同比 <Trend :flag="Number(item.week_ratio)>=0?'up':'down'">{{Number(item.week_ratio)}}%</Trend>-->
+            <!-- <span style="display: inline-block">
+              周同比 <Trend :flag="Number(item.week_ratio)>=0?'up':'down'">{{Number(item.week_ratio)}}%</Trend>
               周环比 {{ Number(item.week_ratio) }}%
               <Icon
                 :type="Number(item.week_ratio) >= 0 ? 'md-arrow-dropup' : 'md-arrow-dropdown'"
                 class="iconColor"
                 :class="Number(item.week_ratio) >= 0 ? ' ' : 'on'"
               />
-            </span>
+            </span> -->
           </div>
           <Divider style="margin: 8px 0" />
           <div>
@@ -95,7 +96,8 @@ export default {
 }
 
 .ivu-mr {
-  margin-right: 16px !important;
+  display: inline-block;
+  margin-left: 16px !important;
 }
 
 .ivu-text-right {

+ 1 - 1
template/admin/src/pages/marketing/storeBargain/index.vue

@@ -194,7 +194,7 @@ export default {
           title: '操作',
           slot: 'action',
           fixed: 'right',
-          minWidth: 130,
+          minWidth: 160,
         },
       ],
       tableList: [],

+ 2 - 2
template/admin/src/pages/user/list/handle/userEdit.vue

@@ -40,7 +40,7 @@
           class="form-sty"
           type="password"
           v-model="formItem.pwd"
-          placeholder="请输入登录密码"
+          placeholder="请输入登录密码(修改用户可不填写,不填写不修改原密码)"
           style="width: 80%"
         ></Input>
       </FormItem>
@@ -49,7 +49,7 @@
           class="form-sty"
           type="password"
           v-model="formItem.true_pwd"
-          placeholder="请输入确认密码"
+          placeholder="请输入确认密码(修改用户可不填写,不填写不修改原密码)"
           style="width: 80%"
         ></Input>
       </FormItem>