瀏覽代碼

用户电话号码非必填, 代理商权限添加

zhangyujun 2 年之前
父節點
當前提交
d0d640ed60
共有 3 個文件被更改,包括 30 次插入22 次删除
  1. 2 2
      src/layout/components/Navbar.vue
  2. 6 2
      src/views/system/user/index.vue
  3. 22 18
      src/views/vip/code/index.vue

+ 2 - 2
src/layout/components/Navbar.vue

@@ -8,13 +8,13 @@
       <template v-if="device!=='mobile'">
         <search id="header-search" class="right-menu-item" />
         
-        <el-tooltip content="源码地址" effect="dark" placement="bottom">
+        <!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
           <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
         </el-tooltip>
 
         <el-tooltip content="文档地址" effect="dark" placement="bottom">
           <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
-        </el-tooltip>
+        </el-tooltip> -->
 
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
 

+ 6 - 2
src/views/system/user/index.vue

@@ -545,7 +545,10 @@ export default {
       // 角色选项
       roleOptions: [],
       // 表单参数
-      form: {},
+      form: {
+        agentType:"1"
+       
+      },
       defaultProps: {
         children: "children",
         label: "label",
@@ -596,7 +599,7 @@ export default {
           },
         ],
         phonenumber: [
-          { required: true, message: "手机号码不能为空", trigger: "blur" },
+        
           {
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
             message: "请输入正确的手机号码",
@@ -683,6 +686,7 @@ export default {
     // 表单重置
     reset() {
       this.form = {
+        agentType:'1',
         userId: undefined,
         deptId: undefined,
         userName: undefined,

+ 22 - 18
src/views/vip/code/index.vue

@@ -69,7 +69,11 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="代理商" prop="activationUserId">
+      <el-form-item
+        v-hasPermi="['vip:code:agent_search']"
+        label="代理商"
+        prop="activationUserId"
+      >
         <el-select
           v-model="queryParams.agentId"
           placeholder="请输入代理商昵称"
@@ -88,7 +92,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item>
+      <el-form-item v-hasPermi="['vip:code:agent_search']">
         <el-button
           type="cyan"
           icon="el-icon-search"
@@ -133,7 +137,7 @@
         width="200px"
       >
         <template slot-scope="scope">
-          <span style="margin-right:5px">{{ scope.row.vipCode }}</span>
+          <span style="margin-right: 5px">{{ scope.row.vipCode }}</span>
           <el-button type="primary" round @click="copyFun(scope.row.vipCode)"
             >复制</el-button
           >
@@ -193,7 +197,7 @@
       append-to-body
     >
       <div class="jihuoma">
-        激活码: <span style="color:red">{{ jihuoma }} </span>
+        激活码: <span style="color: red">{{ jihuoma }} </span>
         <el-button type="primary" round @click="copyFun(jihuoma)"
           >复制激活码</el-button
         >
@@ -213,18 +217,18 @@ export default {
       keyOptions: [
         {
           value: "0",
-          label: "未激活"
+          label: "未激活",
         },
         {
           value: "1",
-          label: "已激活"
+          label: "已激活",
         },
         {
           value: "2",
-          label: "已作废"
-        }
+          label: "已作废",
+        },
       ],
-      keyOptionsFormatter: row => {
+      keyOptionsFormatter: (row) => {
         return this.keyOptions[row.status].label;
       },
       jihuoma: null,
@@ -255,12 +259,12 @@ export default {
         activationTime: null,
         activationUserId: null,
         startTime: null,
-        endTime: null
+        endTime: null,
       },
       // 表单参数
       form: {},
       // 表单校验
-      rules: {}
+      rules: {},
     };
   },
   created() {
@@ -270,7 +274,7 @@ export default {
     /** 代理商列表模糊搜索 */
     async remoteMethod(agentName) {
       const res = await getAgentList({
-        agentName: agentName
+        agentName: agentName,
       });
       this.agentNameOptions = res.data;
     },
@@ -295,7 +299,7 @@ export default {
     /** 查询激活码列表 */
     getList() {
       this.loading = true;
-      listCode(this.queryParams).then(response => {
+      listCode(this.queryParams).then((response) => {
         this.codeList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -315,7 +319,7 @@ export default {
         updateTime: null,
         status: 0,
         activationTime: null,
-        activationUserId: null
+        activationUserId: null,
       };
       this.resetForm("form");
     },
@@ -343,17 +347,17 @@ export default {
       this.$confirm("是否确认作废激活码: " + row.vipCode, "警告", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
-        .then(function() {
+        .then(function () {
           return updateCode({ id: row.id, status: 2 });
         })
         .then(() => {
           this.getList();
           this.msgSuccess("作废成功");
         });
-    }
-  }
+    },
+  },
 };
 </script>