zerp 4 tahun lalu
induk
melakukan
d86a4e0ee5

+ 4 - 4
config/index.js

@@ -10,8 +10,8 @@ module.exports = {
       '/pre': {
         // target: 'http://app.bluefire.top:7999',//后端接口地址
         // target: 'http://192.168.2.130:8081',//后端接口地址
-        // target: 'http://192.168.2.61:8081',//后端接口地址
-        target: 'http://192.168.101.12',//后端接口地址
+        target: 'http://192.168.3.54:8081',//后端接口地址
+        // target: 'http://192.168.3.130:8081',//后端接口地址
         // target: 'http://47.106.133.48:8081/',//后端接口地址
         // target: 'http://139.155.226.217:8088/pre',//后端接口地址
         // target: 'http://127.0.0.1:8081',//后端接口地址
@@ -23,8 +23,8 @@ module.exports = {
     },
 
     // 本地开发使用
-    host: '192.168.43.121',
-    port: 61,
+    host: '192.168.3.38',
+    port: 54,
     autoOpenBrowser: true,
     errorOverlay: true,
     notifyOnErrors: false,

+ 4 - 4
src/App.vue

@@ -43,10 +43,10 @@ export default {
   box-shadow: 0 2px 12px 0 rgba(204, 201, 201, 0.1)
 }
 /* 穿梭左右按钮 */
- .el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus{
+ /* .el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus{
      /* border-radius: 50%!important;      */
      /* width: 55px;     
-     height: 55px;   */
+     height: 55px;   
      background: rgba(14, 91, 235, 0.041)!important;
      border:1px solid rgb(199, 200, 207)!important;
    }
@@ -55,9 +55,9 @@ export default {
      height: 55px; 
      border-radius: 50%!important;      
 
-   }
+   } */
    .el-transfer__button i, .el-transfer__button span{
-     color:rgb(199, 200, 207);
+     color:#ffff;
      /* font-size: 16px!important;  */
      font-weight:900;
    }

+ 12 - 0
src/api/optLog.js

@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+
+export default {
+  //列表
+  Search: function(data) {
+    return request({
+      url: '/logInfo/list',
+      method: 'POST',
+      data: data
+    })
+  },
+}

+ 7 - 0
src/api/userList.js

@@ -84,6 +84,13 @@ export default {
       // data:data
     })
   },
+  userDel:function(data){
+    return request({
+      url:"/partner/user/del",
+      method: "post",
+      data:data
+    })
+  }
 
   },
 

+ 31 - 0
src/api/virtualNum.js

@@ -0,0 +1,31 @@
+import request from '@/utils/request'
+
+//虚拟号段
+//列表
+export function VirtualList(data) {
+    return request({
+      url: '/virtualNum/list',
+      method: 'post',
+      data: data
+    })
+  }
+  
+//新增
+export function VirtualAdd(data) {
+    return request({
+      url: '/virtualNum/add',
+      method: 'post',
+      data: data
+    })
+  }
+  
+  
+  //删除
+  export function VirtualDel(parms) {
+    return request({
+      url: '/virtualNum/delete',
+      method: 'delete',
+      data:parms
+    })
+  }
+  

+ 1 - 0
src/icons/svg/电话号码.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1625468352300" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5430" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="600"><defs><style type="text/css"></style></defs><path d="M732.096 896c-105.696 0-319.968-109.088-422.784-212.32-102.784-103.264-211.392-318.496-211.392-424.64C97.92 259.04 178.912 128 231.776 128s211.392 159.232 158.528 212.352c-52.864 53.056-105.696 53.056-105.696 106.144s52.832 106.144 105.696 159.232c52.832 53.088 105.696 106.144 158.528 106.144 52.864 0 52.864-53.056 105.696-106.144 52.832-53.088 211.392 106.144 211.392 159.232 0 53.088-133.824 131.04-133.824 131.04z" fill="" p-id="5431"></path></svg>

+ 6 - 1
src/views/channel/account.vue

@@ -200,7 +200,7 @@
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="detailVisible = false">取 消</el-button>
-          <el-button type="primary" @click="detailVisible = false">确 定</el-button>
+          <el-button type="primary" @click="onVisible">确 定</el-button>
         </div>
       </el-dialog>
 
@@ -554,6 +554,11 @@ export default {
       //   this.total = res.data.data.total
       // })
     },
+    //明细刷新数据
+    onVisible(){
+      this.reLoad()
+      this.detailVisible = false
+    },
     //查看
     hookLook(row){
       let code = JSON.parse(JSON.stringify(row)) 

+ 21 - 20
src/views/channel/channelGroup.vue

@@ -184,7 +184,6 @@
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
         <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
-        <!-- <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button> -->
       </div>
     </el-dialog>
 
@@ -589,8 +588,7 @@ export default {
                               this.dialogFormVisible = false
                               this.reLoad()
                             } else {
-                            this.buttonLoading = false
-                              this.$message({
+                               this.$message({
                                 type: 'error',
                                 message: response.data.msg
                               })
@@ -600,24 +598,27 @@ export default {
                       })
                     } else {
                     //   // 添加
-                         this.buttonLoading = true
-                      api.channelGroupAdd(this.dataForm).then(response => {
+                       this.buttonLoading = true
+                         api.channelGroupAdd(this.dataForm).then(response => {
+                              if (response.status === 200) {
+                                this.$message({
+                                  type: 'success',
+                                  message: '操作成功'
+                                })
+                                this.dialogFormVisible = false
+                                this.reLoad()
+                              } else {
+                                this.$message({
+                                  type: 'error',
+                                  message: response.data.msg
+                                })
+                              }
+                            })
+                          .finally(() => 
+                          setTimeout(()=>{
                             this.buttonLoading = false
-                        if (response.status === 200) {
-                          this.$message({
-                            type: 'success',
-                            message: '操作成功'
-                          })
-                          this.dialogFormVisible = false
-                          this.reLoad()
-                        } else {
-                          this.$message({
-                            type: 'error',
-                            message: response.data.msg
-                          })
-                        }
-                      })
-                    .finally(() => this.buttonLoading = false)
+                          },1600)
+                          )
                     }
                   }
                 })

+ 168 - 0
src/views/log/cp.vue

@@ -0,0 +1,168 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container" style="margin: 10px 0 10px 0">
+      <!-- 时间范围筛选 -->
+        <div class="w_date">
+          <span class="textSpan">时间范围:</span>
+          <el-date-picker
+            v-model="callbackTimeEnd"
+            size="small"
+            type="datetimerange"
+            range-separator="至"
+            style="width:40%"
+            @change="oncheckTimeStart"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            
+          >
+          </el-date-picker>
+          <el-button type="primary" plain @click="getData()">查询</el-button>
+      </div>
+
+    </div>
+
+    <!-- 表格 -->
+    <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+      <el-table-column
+        label="序号"
+        width="60"
+        align="center"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="操作人"
+        width="150"
+        align="center"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <!-- <span>{{ scope.row.customerName }}</span> -->
+          <el-button type="text" @click="hookLook(scope.row)">{{
+            scope.row.customerName
+          }}</el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="类型" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status === 1">正常</el-tag>
+          <el-tag v-if="scope.row.status === 2" type="warning">暂停</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="描述" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <el-button type="text" @click="productLook(scope.row)">{{
+            scope.row.shorterName
+          }}</el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.balance }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.creditAmount }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="当前费用" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.currentAmount }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="创建时间"
+        width="150"
+        align="center"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.createTime }}</span>
+        </template>
+      </el-table-column>
+
+    </el-table>
+    <!-- 分页 -->
+    <div class="pagination">
+      <el-pagination
+        current-page.sync="body.current"
+        :current-page="body.current"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="body.size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import api from "@/api/userList";
+export default {
+  data(){
+        return{
+          callbackTimeEnd:'',
+          loading:false,
+          tableData:[],
+          total:"",
+          total:100,
+          body:{
+            
+          }
+        }
+    },
+  methods: {
+    //获取数据
+    getData(){
+      this.loading=true;
+      api.index.Search(this.body).then(res=>{
+      this.loading=false;
+            console.log(res)
+            this.tableData=res.data.data.records;
+            this.total=res.data.data.total;
+      })
+    },
+   
+    //页码
+    handleSizeChange(val) {
+      this.body.size = val;
+      this.getTenantList();
+    },
+    //换页
+    handleCurrentChange(val) {
+      this.body.current = val;
+      this.getTenantList();
+    },
+    
+        oncheckTimeStart(){},
+        
+    
+  }
+};
+</script>
+
+<style scoped>
+.el-card {
+  border: 0px solid #fff;
+}
+
+.edit_dev >>> .el-transfer-panel {
+  width: 250px;
+}
+</style>

+ 119 - 70
src/views/log/index.vue

@@ -1,26 +1,58 @@
 <template>
   <div class="app-container">
     <div class="filter-container" style="margin: 10px 0 10px 0">
-      <!-- 时间范围筛选 -->
+      <div class="flex">
+        
+        <div class="w_input">
+          <span class="textSpan">      操作人:</span>
+          <el-input
+            v-model="body.optUser"
+            clearable
+            style="width:65%"
+            placeholder="请输入操作人名"
+            size="small"
+          >
+          </el-input>
+        </div>
+        <div class="w_input">
+          <span class="textSpan">日志类型:</span>
+          <el-select v-model="body.type" placeholder="请选择日志类型" size="small" style="width:65%" clearable>
+            <el-option
+              v-for="item in status"
+              :key="item.id"
+              :label="item.name"
+              :value="item.name"
+            >
+            </el-option>
+          </el-select>
+         
+        </div>
+      </div>
+     
+      <div class="flex">
+ <!-- 时间范围筛选 -->
         <div class="w_date">
           <span class="textSpan">时间范围:</span>
           <el-date-picker
-            v-model="callbackTimeEnd"
+            v-model="callbackTime"
             size="small"
             type="datetimerange"
             range-separator="至"
-            style="width:40%"
+            style="width:80%"
             @change="oncheckTimeStart"
             value-format="yyyy-MM-dd HH:mm:ss"
             :default-time="['00:00:00', '23:59:59']"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
-            
           >
           </el-date-picker>
-          <el-button type="primary" plain @click="getData()">查询</el-button>
-      </div>
-
+        </div>
+        <el-button type="primary" plain @click="handleSearch" icon="el-icon-search"
+          >查询</el-button
+        >
+         </div>
+   
+      
     </div>
 
     <!-- 表格 -->
@@ -37,64 +69,42 @@
       </el-table-column>
 
       <el-table-column
-        label="操作人"
-        width="150"
+        label="创建时间"
+        width="180"
         align="center"
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-          <!-- <span>{{ scope.row.customerName }}</span> -->
-          <el-button type="text" @click="hookLook(scope.row)">{{
-            scope.row.customerName
-          }}</el-button>
+          <span>{{ scope.row.createTime }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="类型" align="center" show-overflow-tooltip>
+      <el-table-column label="操作人" align="center" show-overflow-tooltip width="120">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.status === 1">正常</el-tag>
-          <el-tag v-if="scope.row.status === 2" type="warning">暂停</el-tag>
+          <span>{{ scope.row.optUser }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="描述" align="center" show-overflow-tooltip>
+      <el-table-column label="操作信息" align="center" show-overflow-tooltip width="180">
         <template slot-scope="scope">
-          <el-button type="text" @click="productLook(scope.row)">{{
-            scope.row.shorterName
-          }}</el-button>
+          <span>{{ scope.row.optInfo}}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="操作" align="center" show-overflow-tooltip>
+       <el-table-column label="接口描述" align="center" show-overflow-tooltip width="180">
         <template slot-scope="scope">
-          <span>{{ scope.row.balance }}</span>
+          <span>{{ scope.row.interfaceDesc }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="操作" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">
-          <span>{{ scope.row.creditAmount }}</span>
-        </template>
-      </el-table-column>
 
-      <el-table-column label="当前费用" align="center" show-overflow-tooltip>
+      <el-table-column label="日志类型" align="center" show-overflow-tooltip clearable>
         <template slot-scope="scope">
-          <span>{{ scope.row.currentAmount }}</span>
+          <span>{{ scope.row.type }}</span>
         </template>
       </el-table-column>
-
-      <el-table-column
-        label="创建时间"
-        width="150"
-        align="center"
-        show-overflow-tooltip
-      >
-        <template slot-scope="scope">
-          <span>{{ scope.row.createTime }}</span>
-        </template>
-      </el-table-column>
-
     </el-table>
+
     <!-- 分页 -->
     <div class="pagination">
       <el-pagination
@@ -113,51 +123,90 @@
 </template>
 
 <script>
-import api from "@/api/userList";
+import api from "@/api/optLog.js";
 export default {
-  data(){
-        return{
-          callbackTimeEnd:'',
-          loading:false,
-          tableData:[],
-          total:"",
-          total:100,
-          body:{
-            
-          }
-        }
-    },
+  data() {
+    return {
+      callbackTime: "",
+      loading: false,
+      tableData: [],
+      total: 30,
+      body: {
+        current: 1, //当前页
+        size: 10, //每页条数
+        optUser: "", //操作人
+        
+        optInfo:"",//操作接口
+        type:"",
+        startTime:"",
+        endTime:"",
+      },
+     status:[
+       {id:1,name:"订单"},
+       {id:2,name:"产品"},
+       {id:3,name:"供应商"},
+       {id:4,name:"客户"},
+     ],
+    };
+  },
+  created(){
+    this.getData();
+  },
   methods: {
+    handleSearch(){
+      // console.log(this.body.optInfo)
+      if(this.callbackTime==null){
+        //发送时间为空时清空 body 里的发送时间
+        this.callbackTime=""
+        this.body.startTime="";
+        this.body.endTime="";
+      }
+      this.getData();
+    },
     //获取数据
-    getData(){
-      this.loading=true;
-      api.index.Search(this.body).then(res=>{
-      this.loading=false;
-            console.log(res)
-            this.tableData=res.data.data.records;
-            this.total=res.data.data.total;
-      })
+    getData() {
+      this.loading = true;
+      api.Search(this.body).then(res => {
+        console.log(res,"rrr");
+        this.tableData = res.data.data.records;
+        this.total = res.data.data.total;
+        this.loading=false;
+      });
     },
-   
+
     //页码
     handleSizeChange(val) {
       this.body.size = val;
-      this.getTenantList();
+      this.getData();
     },
     //换页
     handleCurrentChange(val) {
       this.body.current = val;
-      this.getTenantList();
+      this.getData();
     },
-    
-        oncheckTimeStart(){},
-        
-    
+     oncheckTimeStart() {
+      if(this.callbackTime!==null){
+        console.log(this.callbackTime);
+        this.body.startTime=this.callbackTime[0];
+        this.body.endTime=this.callbackTime[1];
+      }     
+    }
   }
 };
 </script>
 
 <style scoped>
+.w_date {
+  width:50%;
+}
+.flex {
+  display: flex;
+  flex-direction: row;
+  margin-bottom: 10px;
+}
+.w_input {
+  width: 38%;
+}
 .el-card {
   border: 0px solid #fff;
 }
@@ -165,4 +214,4 @@ export default {
 .edit_dev >>> .el-transfer-panel {
   width: 250px;
 }
-</style>
+</style>

+ 2 - 2
src/views/orderList/Distribute.vue

@@ -38,7 +38,7 @@
       <div class="flex">
         <div class="w_input">
           <span class="textSpan"> 订单状态:</span>
-          <el-select v-model="body.status" size="small" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
+          <el-select v-model="body.sendStatus" size="small" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
             <el-option
               v-for="item in status"
               :key="item.id"
@@ -153,7 +153,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="客户名称" width="180" align="center" show-overflow-tooltip>
+      <el-table-column label="客户名称" width="150" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.customerName }}</span>
         </template>

+ 1 - 1
src/views/orderList/finance.vue

@@ -456,7 +456,7 @@ export default {
         // 1-待充值 2-充值中  3-重发  4-失败  6-成功
         { id: 1, name: '待充值' },
         { id: 2, name: '充值中' },
-        { id: 3, name: '重发' },
+        // { id: 3, name: '重发' },
         { id: 4, name: '失败' },
         { id: 6, name: '成功' },
       ],

+ 2 - 2
src/views/orderList/index.vue

@@ -506,7 +506,7 @@
         @size-change="handleSizeChange"
         :current-page="body.page"
         @current-change="handleCurrentChange"
-        :page-sizes="[10, 20, 30, 50]"
+        :page-sizes="[10, 20, 30, 50,100,200,500]"
         :page-size="body.size"
         layout="total, sizes, prev, pager, next, jumper"
         background
@@ -557,7 +557,7 @@ export default {
         // 1-待充值 2-充值中  3-重发  4-失败  6-成功
         { id: 1, name: "待充值" },
         { id: 2, name: "充值中" },
-        { id: 3, name: "重发" },
+        // { id: 3, name: "重发" },
         { id: 4, name: "失败" },
         { id: 6, name: "成功" }
       ],

+ 300 - 0
src/views/orderList/virtualNum.vue

@@ -0,0 +1,300 @@
+<template>
+  <div class="app-container ">
+    <div class="margin_top">
+      <div class="flex">
+        <div class="w_input">
+          <span class="textSpan">虚拟号段:</span>
+          <el-input
+            placeholder="请输入虚拟号段"
+            style="width:200px"
+            v-model="body.virtualNum"
+            clearable
+          ></el-input>
+          <el-button
+            class="filter-item"
+            icon="el-icon-search"
+            type="primary"
+            plain
+            @click="handleSearch"
+            >搜索</el-button
+          >
+          <el-button
+            class="classitem"
+            icon="el-icon-plus"
+            type="warning"
+            plain
+            @click="handleAdd"
+            >新增</el-button
+          >
+          <el-button
+            icon="el-icon-delete"
+            type="danger"
+            plain
+            @click="handleDelete"
+            >删除</el-button
+          >
+        </div>
+      </div>
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%"
+        v-loading="loading"
+        tooltip-effect="dark"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column
+          type="selection"
+          width="55"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="date"
+          label="虚拟号段"
+          width="250"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <span>{{ scope.row.virtualNum }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="name" label="号段说明" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.note }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页 -->
+    <!--分页-->
+    <div class="flexend">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="body.current"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="body.size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        background
+      >
+      </el-pagination>
+    </div>
+    <!-- 添加  弹框 -->
+    <el-dialog
+      title="新增"
+      :visible.sync="dialogFormVisible"
+      center
+      width="55%"
+    >
+      <el-form
+        ref="dataForm"
+        :model="dataForm"
+        :rules="rule"
+        label-position="right"
+        label-width="80px"
+      >
+        <el-form-item
+          label="虚拟号段"
+          :label-width="formLabelWidth"
+          size="small"
+          prop="virtualNum"
+          style="width:380px;margin:15px auto"
+        >
+          <el-input
+            v-model="dataForm.virtualNum"
+            autocomplete="off"
+            placeholder="请输入虚拟号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          label="号段说明"
+          :label-width="formLabelWidth"
+          size="small"
+          style="width:380px;margin:15px auto"
+        >
+          <el-input
+            v-model="dataForm.note"
+            autocomplete="off"
+            type="textarea"
+            placeholder="请输入号段说明"
+            :autosize="{ minRows: 2, maxRows: 4 }"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm"   :disabled="disabled" 
+          >确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { VirtualList, VirtualAdd, VirtualDel } from "@/api/virtualNum.js";
+
+export default {
+  data() {
+    return {
+      loading: false,
+      dialogFormVisible: false, //控制是否打开面板
+      formLabelWidth: "120px",
+      body: {
+        virtualNum: "", //虚拟号段
+        current: 1, //当前页
+        size: 10 //每页数量
+      },
+      tableData: [],
+      dataForm: {
+        virtualNum: "",
+        note: ""
+      },
+      phone: [],
+      rule: {
+        virtualNum: [
+          { required: true, message: "请输入虚拟号段", trigger: "blur" }
+        ]
+      },
+      total: 10, //总数
+      disabled: false,
+      row: ""
+    };
+  },
+  created() {
+    this.getNum();
+  },
+  methods: {
+    //新增按钮
+    addVirtual() {
+      this.dialogFormVisible = true;
+    },
+
+    //列表
+    getNum() {
+      this.loading = true;
+      VirtualList(this.body).then(res => {
+        this.loading = false;
+        console.log(res.data, "00");
+        this.tableData = res.data.data.records;
+        this.body.size = res.data.data.size;
+        this.body.current = res.data.data.current;
+        this.total = res.data.data.total;
+      });
+    },
+    //搜索按钮
+    handleSearch() {
+      this.body.current=1;
+      this.getNum();
+    },
+    //新增按钮
+    handleAdd() {
+      this.dataform = "";
+      this.disabled = false;
+      this.dialogFormVisible = true;
+      if (this.$refs["dataForm"]) {
+        this.$refs["dataForm"].resetFields();
+      }
+    },
+    //新增
+    submitForm() {
+      this.$refs["dataForm"].validate(valid => {
+        if (valid) {
+          this.disabled = true;
+          VirtualAdd(this.dataForm).then(res => {
+            console.log(res, "//");
+            if (res.data.status == 200) {
+              this.$message({
+                type: "success",
+                message: "操作成功"
+              });
+              this.dialogFormVisible = false;
+              this.getNum();
+            } else {
+              this.message({
+                type: "error",
+                message: res.data.message
+              });
+            }
+          })
+          .finally(() => this.disabled = false)
+          console.log(this.dataForm, "/");
+        }
+      });
+    },
+    //删除按钮
+    //删除API
+    handleDelete() {
+      const that = this;
+      if (this.phone.length > 0) {
+        that
+          .$confirm("此操作将删除该手机号", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            VirtualDel(this.phone).then(res => {
+              if (res.status === 200) {
+                that.$message({
+                  type: "success",
+                  message: "删除成功"
+                });
+                this.getNum();
+              } else {
+                that.$message({
+                  type: "error",
+                  message: res.data.message
+                });
+              }
+            });
+          });
+      } else {
+        that.$message({
+          type: "error",
+          message: "请至少选择一项"
+        });
+      }
+    },
+
+    //分页
+    handleSizeChange: function(val) {
+      this.body.size = val;
+      this.getNum();
+    },
+
+    handleCurrentChange: function(val) {
+      this.body.current = val;
+      this.getNum();
+      console.log(val);
+    },
+    //多选
+    handleSelectionChange(row) {
+      console.log(row);
+      let arryList = [];
+      row.map(res => {
+        let phoneNo = res.virtualNum;
+        arryList.push(phoneNo);
+      });
+      this.phone = arryList;
+      console.log(this.phone, "this.phone");
+    }
+  }
+};
+</script>
+
+<style scoped>
+.flex {
+  display: flex;
+  flex-direction: row;
+  width: 90%;
+  margin-bottom: 20px;
+  justify-content: flex-start;
+}
+.flexend {
+  display: flex;
+  justify-content: flex-end;
+  margin-top: 20px;
+  width: 100%;
+}
+
+</style>

+ 6 - 1
src/views/userList/account.vue

@@ -225,7 +225,7 @@
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="detailVisible = false">取 消</el-button>
-          <el-button type="primary" @click="detailVisible = false">确 定</el-button>
+          <el-button type="primary" @click="onVisible">确 定</el-button>
         </div>
       </el-dialog>
 
@@ -599,6 +599,11 @@ export default {
       //   this.total = res.data.data.total
       // })
     },
+    //明细刷新数据
+    onVisible(){
+      this.reLoad()
+      this.detailVisible = false
+    },
     //查看
     hookLook(row){
       let code = JSON.parse(JSON.stringify(row)) 

+ 103 - 24
src/views/userList/index.vue

@@ -175,24 +175,7 @@
                 </div>
                 <div>
                     <el-row :gutter="20">
-                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-                      <el-form-item label="代理商提成比例" :label-width="formLabelWidth"  >
-                        <el-input v-model="dataForm.partnerCommission" />
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-                        <el-form-item label="合作伙伴" :label-width="formLabelWidth"  >
-                          <!-- <el-input v-model="dataForm.partnerId"  /> -->
-                          <el-select v-model="dataForm.partnerId" size="small" >
-                            <el-option
-                              v-for="item in onuserList"
-                              :key="item.partnerId"
-                              :label="item.partnerName"
-                              :value="item.partnerId"
-                            />
-                          </el-select>
-                        </el-form-item>
-                    </el-col>
+                    
                     <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                         <el-form-item label="价格校验" :label-width="formLabelWidth">
                           <!-- <el-input v-model="dataForm.priceCheck"  /> -->
@@ -206,11 +189,41 @@
                           </el-select>
                         </el-form-item>
                     </el-col>
-                  </el-row>
-                    <el-row :gutter="20">
-                       <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                  </el-row> 
+                   
+                    <el-row :gutter="20"  v-for="(element,index) in dataForm.partnerUsers" :key="element.id">
+                      <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                        <el-form-item label="代理商" :label-width="formLabelWidth"  >
+                          <el-select v-model="element.partnerName" @keyup.enter.native="addGroup(dataForm)" value-key="partnerId" @change="cooperativePartner($event,index)" size="small" >
+                            <el-option
+                              v-for="item in onuserList"
+                              :key="item.partnerId"
+                              :label="item.partnerName"
+                              :value="item"
+                            />
+                          </el-select>
+                        </el-form-item>
+                    </el-col>
+                     <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                      <el-form-item label="代理商提成比例" :label-width="formLabelWidth"  >
+                        <el-input v-model="element.partnerCommission" @keyup.enter.native="addGroup(dataForm)" />
+                      </el-form-item>
+                    </el-col>
+                 
+                    <el-col :span="2">
+              <el-button type="danger" plain icon="el-icon-delete" circle  @click="cooperativePartnerDelete(element,index,$event)"></el-button>
+            </el-col>  
+            <el-col :span="1" class="icon-list__tips">
+            <el-tooltip placement="top" effect="light" style="padding: 10px; 0 0 0">
+            <div slot="content">
+                <p>代理商提成比例:</p>
+                <p>其中不能有为空的操作!!!</p>
+                </div>
+            <i class="el-icon-warning" />
+            </el-tooltip>
+            </el-col>
+                       <!-- <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                         <el-form-item label="登录用户" :label-width="formLabelWidth"  >
-                          <!-- <el-input v-model="dataForm.partnerId"  /> -->
                           <el-select v-model="dataForm.userId" size="small" >
                             <el-option
                               v-for="item in onList"
@@ -220,9 +233,13 @@
                             />
                           </el-select>
                         </el-form-item>
-                    </el-col>
+                    </el-col> -->
+                  </el-row>
+                  <el-row :gutter="20" > 
+                      <div style="width:100%" >
+                            <el-button class="addGroupButton" type="primary" round plain @click="addGroup(dataForm)">添加合作伙伴</el-button>
+                      </div>
                   </el-row>
-      
                 </div>
               </el-card>  
                <el-card  shadow="hover" v-if="!operation">
@@ -823,12 +840,69 @@ export default {
         this.onuserList = res.data.data
       })
     },
+    //选择合作伙伴
+    cooperativePartner(value,index,){
+      this.dataForm.partnerUsers[index].partnerName = value.partnerName
+      this.dataForm.partnerUsers[index].userId = value.partnerId
+      // console.log(this.dataForm.partnerUsers)
+      // console.log(value)
+    },
+    //删除合作伙伴
+    cooperativePartnerDelete(row,index,e){
+            // row.splice(index,1)
+            console.log(index)
+            if(row.partnerName && row.partnerCommission){
+               this.$confirm('是否删除该合作伙伴', '提示', {
+                      confirmButtonText: '确定',
+                      cancelButtonText: '取消',
+                      type: 'warning'
+                    }).then(()=>{       
+                  api.index.userDel(row).then((res)=>{
+                    this.dataForm.partnerUsers.splice(index,1)
+                            this.$message({
+                                type: 'success',
+                                message: '删除成功'
+                              })
+                    }).catch(() => {
+                    this.$message({
+                      type: 'info',
+                      message: '已取消'
+                    });   
+                  })
+                        
+              }); 
+            }else{
+                    this.dataForm.partnerUsers.splice(index,1)
+                    this.$message({
+                                type: 'success',
+                                message: '删除成功'
+                              })
+
+            }
+             
+              let target=e.target;
+            if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
+              target = e.target.parentNode;
+            }
+            target.blur();
+    },
+    //添加合作伙伴
+        addGroup(row){
+            let ipWhiteListList = {
+               customerId:row.customerId,
+                partnerCommission:"",
+                userId:"",
+                partnerName:""
+            }
+            this.dataForm.partnerUsers.push(ipWhiteListList)
+        },
     //新增弹框
     NewUser() {
       this.operation = true
       this.dialogFormVisible = true
       this.dataForm = {
           userId:4,
+          partnerUsers:[]
       }
     },
     //编辑弹框
@@ -1262,4 +1336,9 @@ export default {
 .edit_dev >>> .el-transfer-panel {
      width:250px;
    }
+   .addGroupButton{
+         width: 80%;
+      margin: 0px 10px 10px 90px;
+      text-align: center;
+    }
 </style>