zerp vor 4 Jahren
Ursprung
Commit
b60c8025cf

+ 6 - 4
config/index.js

@@ -9,9 +9,11 @@ module.exports = {
     proxyTable: {
       '/pre': {
         // target: 'http://app.bluefire.top:7999',//后端接口地址
-        target: 'http://192.168.2.61:8081',//后端接口地址
+        // target: 'http://192.168.2.130:8081',//后端接口地址
+        // target: 'http://192.168.2.61:8081',//后端接口地址
         // target: 'http://192.168.2.114:8081',//后端接口地址
-        // target: 'http://127.0.0.1:8081',//后端接口地址
+        // target: 'http://47.106.133.48:8081/',//后端接口地址
+        target: 'http://127.0.0.1:8081',//后端接口地址
         changeOrigin: true,  //是否跨域
         pathRewrite: {
           '^/pre': '/',//重写,
@@ -20,8 +22,8 @@ module.exports = {
     },
 
     // 本地开发使用
-    host: '0.0.0.0',
-    port: 9527,
+    host: '192.168.2.14',
+    port: 61,
     autoOpenBrowser: true,
     errorOverlay: true,
     notifyOnErrors: false,

+ 30 - 0
src/App.vue

@@ -28,4 +28,34 @@ export default {
     color:rgb(97, 174, 247)
   }
   
+
+  /* //滚动条 */
+::-webkit-scrollbar {
+  width: 9px; 
+  height: 10px;
+ 
+}
+
+::-webkit-scrollbar-thumb {
+  /* background-color: #0f5ef080; */
+  background: linear-gradient(to left,#32e4c663,#0c6ceb71);
+  border-radius: 5px;
+  box-shadow: 0 2px 12px 0 rgba(204, 201, 201, 0.1)
+}
+  
+  /* .el-button--black_button.is-plain {
+    background: #2d2d3663;
+    color: rgb(95, 92, 95);
+    border: 1px solid #2d2d3663;
+    }
+    .el-button--black_button.is-plain:hover{
+    background: #07070a;
+    color: rgb(255, 255, 255);
+    border: 1px solid #010102c2;
+    }
+    .el-button--black_button.is-plain:active{
+    background: #07070a;
+    color: rgb(255, 255, 255);
+    border: 1px solid #010102c2;
+    } */
 </style>

+ 28 - 0
src/api/blackList.js

@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+export default {
+  //列表
+  Search: function(operator) {
+    return request({
+      url: '/blackPhoneNo/search',
+      method: 'POST',
+      data: operator
+    })
+  },
+  //删除
+  del: function(operator) {
+    return request({
+      url: '/blackPhoneNo/del',
+      method: 'POST',
+      data: operator
+    })
+  },
+  //添加
+  add: function(operator) {
+    return request({
+      url: '/blackPhoneNo/add',
+      method: 'POST',
+      data: operator
+    })
+  },
+}

+ 29 - 4
src/api/channel.js

@@ -29,8 +29,19 @@ export default {
   //删除
   supplierDelete: function(id){
     return request({
-      url: '/supplier/bankcard/' + id,
+      // url: '/supplier/bankcard/' + supplierDelete + "/" + id,
+      url: '/bankcard/delete/' + id,
       method: 'delete',
+      // data:data
+    })
+  },
+  //删除
+  onsupplierDelete: function(supplierId){
+    return request({
+      // url: '/supplier/bankcard/' + supplierDelete + "/" + id,
+      url: '/supplier/delete/' + supplierId,
+      method: 'delete',
+      // data:data
     })
   },
 
@@ -78,18 +89,32 @@ export default {
   //通道删除
   channelDelete(ChannelId){
     return request({
-      url:"/channel/delete",
+      url:"/channel/delete/" + ChannelId ,
       method:"delete",
-      data:{ChannelId:ChannelId}
   })
   },
 
+  //通道关联供应商
+  supplierInfo(){
+    return request({
+      url:"/channel/supplierInfo",
+      method:"get"
+    })
+  },
+
   //添加通道产品
   productAdd(operator){
     return request({
       url:"/channel/product/list/" + operator,
       method:"post"
     })
-  }
+  },
+  //添加通道产品
+  productDelete(channelProductId){
+    return request({
+      url:"/channelProduct/delete/" + channelProductId,
+      method:"delete"
+    })
+  },
 
 }

+ 40 - 0
src/api/channelGroup.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+export default {
+  //列表
+  channelGroupList: function(operator) {
+    return request({
+      url: '/channelGroup/list',
+      method: 'POST',
+      data: operator
+    })
+  },
+
+  //删除
+  channelGroupIdDelete: function(channelGroupId){
+    return request({
+      // url: '/supplier/bankcard/' + supplierDelete + "/" + id,
+      url: '/channelGroup/delete/' + channelGroupId,
+      method: 'delete',
+      // data:data
+    })
+  },
+
+  //添加
+  channelGroupAdd:function(data) {
+      return request({
+          url:"/channelGroup/add",
+          method: "post",
+          data:data
+      })
+  },
+  //添加
+  channelGroupUpdate:function(data) {
+      return request({
+          url:"/channelGroup/update",
+          method: "put",
+          data:data
+      })
+  },
+
+}

+ 71 - 14
src/api/userList.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { Upload } from 'element-ui'
 
 export default {
   index:{
@@ -22,7 +23,47 @@ export default {
         method:'put',
         data: operator
       })
-    }
+    },
+    //产品详情
+    paroductDetails(param){
+      return request({
+        url:"/customer/product/info",
+        method:"get",
+        params:param
+      })
+    } ,
+    //用户获取所有产品
+    userProduct(customerId){
+      return request({
+        url:"/product/all/" + customerId,
+        method:"get"
+      })
+    },
+    //添加产品
+    AddCustomer(param){
+      return request({
+        url:"/customer/product/add",
+        method:"post",
+        data:param
+      })
+    },
+    //删除产品
+    delectCustomer(customerProductId){
+      return request({
+        url:"/customer/product/" + customerProductId,
+        method:"DELETE",
+      })
+    },
+      //删除银行卡
+  supplierDelete: function(id){
+    return request({
+      // url: '/supplier/bankcard/' + supplierDelete + "/" + id,
+      url: '/bankcard/delete/' + id,
+      method: 'delete',
+      // data:data
+    })
+  },
+
   },
 
   access:{
@@ -39,26 +80,42 @@ export default {
         method:'PUT',
         data: operator
       })
+    },
+    //关联通道组
+    channelGroup(data){
+      return request({
+        url:"/channelGroup/allChannelGroup",
+        method:"get",
+        data:data
+      })
     }
   },
 
   account:{
+    //列表
     Search(operator){
       return request({
-        url:'/customer/app/info',
-        method:'GET',
-        params: operator
+        url:'/payment/info',
+        method:'post',
+        data: operator
       })
-    }
-  },
- 
-  product:{
-    Search(id){
+    },
+   //获取所有客户
+   userList(data){
+     return request({
+       url:"/customer/" + data,
+       method:"get",
+       data:data
+     })
+   } ,
+   //上传凭证
+   Upload(data){
       return request({
-        url:"/customer/product/info",
-        data:"GET",
-        params:{customerId:id,type:1}
+        url:"/picture/upload",
+        method:"post",
+        data:data
       })
-    }
+   }
   }
-}
+ 
+}

+ 1 - 1
src/icons/svg/财务 人民币 支付.svg

@@ -1 +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="1622789889542" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13084" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300"><defs><style type="text/css"></style></defs><path d="M480 64C215.04 64 0 279.04 0 544 0 808.96 215.04 1024 480 1024S960 808.96 960 544C960 279.04 744.96 64 480 64zM480 960C250.24 960 64 773.76 64 544 64 314.24 250.24 128 480 128 709.76 128 896 314.24 896 544 896 773.76 709.76 960 480 960zM696.96 307.2c12.16-12.16 12.16-32 0-44.16-12.16-12.16-32-12.16-44.16 0L479.36 436.48 307.84 264.96c-12.16-12.16-31.36-12.16-42.88 0-12.16 12.16-12.16 31.36 0 42.88L448 490.88 448 512 288 512C270.08 512 256 526.08 256 544 256 561.92 270.08 576 288 576L448 576l0 128L288 704C270.08 704 256 718.08 256 736 256 753.92 270.08 768 288 768L448 768l0 96C448 881.92 462.08 896 480 896 497.92 896 512 881.92 512 864L512 768l160 0c17.92 0 32-14.08 32-32 0-17.92-14.08-32-32-32L512 704 512 576l160 0C689.92 576 704 561.92 704 544 704 526.08 689.92 512 672 512L512 512 512 492.16 696.96 307.2z" p-id="13085"></path></svg>
+<?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="1623208991834" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4035" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="600"><defs><style type="text/css"></style></defs><path d="M192 960H96c-17.67 0-32-14.33-32-32V480c0-17.67 14.33-32 32-32h96c17.67 0 32 14.33 32 32v448c0 17.67-14.33 32-32 32z m-64-64h32V512h-32v384zM437.33 960h-96c-17.67 0-32-14.33-32-32V608c0-17.67 14.33-32 32-32h96c17.67 0 32 14.33 32 32v320c0 17.67-14.32 32-32 32z m-64-64h32V640h-32v256zM682.67 960h-96c-17.67 0-32-14.33-32-32V608c0-17.67 14.33-32 32-32h96c17.67 0 32 14.33 32 32v320c0 17.67-14.33 32-32 32z m-64-64h32V640h-32v256zM928 960h-96c-17.67 0-32-14.33-32-32V480c0-17.67 14.33-32 32-32h96c17.67 0 32 14.33 32 32v448c0 17.67-14.33 32-32 32z m-64-64h32V512h-32v384zM512 512c-59.83 0-116.08-23.3-158.39-65.61C311.3 404.08 288 347.83 288 288s23.3-116.08 65.61-158.39C395.92 87.3 452.17 64 512 64s116.08 23.3 158.39 65.61C712.7 171.92 736 228.17 736 288s-23.3 116.08-65.61 158.39C628.08 488.7 571.83 512 512 512z m0-384c-88.22 0-160 71.78-160 160s71.78 160 160 160 160-71.78 160-160-71.78-160-160-160z" p-id="4036"></path><path d="M489.83 375.89v-36.33h-43.36c-9.38 0-14.06-4.28-14.06-12.89 0.77-7.03 5.46-11.32 14.06-12.89h43.36v-19.92h-43.36c-9.38 0-14.06-4.28-14.06-12.89 0.77-7.03 5.46-11.32 14.06-12.89h24.61l-37.5-52.73c-3.92-3.11-5.47-7.42-4.69-12.89 0.77-13.28 8.2-20.69 22.27-22.27 7.03 0.79 12.89 3.92 17.58 9.38l43.36 62.11 43.36-62.11c3.9-5.46 9.76-8.59 17.58-9.38 13.28 1.57 20.69 8.99 22.27 22.27 0 5.47-1.57 9.78-4.69 12.89l-37.5 52.73h24.61c7.8 1.57 12.49 5.86 14.06 12.89-0.79 8.61-5.47 12.89-14.06 12.89h-43.36v19.92h43.36c7.8 1.57 12.49 5.86 14.06 12.89-0.79 8.61-5.47 12.89-14.06 12.89h-43.36v36.33c-0.79 13.29-8.2 19.92-22.27 19.92-14.85 0-22.27-6.63-22.27-19.92z" p-id="4037"></path></svg>

+ 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="1622778583073" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4455" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M410.2 641H63.5V65.1h896.4v407.1l64.1 68.4V1.5H0v702.3h397.7l12.5-62.8z m0 0" fill="#ffffff" p-id="4456"></path><path d="M180.4 248.7c0 65.5 53.1 118.6 118.6 118.6s118.6-53.1 118.6-118.6S364.5 130.1 299 130.1s-118.6 53.1-118.6 118.6z m0 0M467.4 577.2H127.5v-73c0-57.9 47-104.9 104.9-104.9h130c57.9 0 104.9 47 104.9 104.9v73zM522 200.8h339.8v47.9H522v-47.9z m0 117.3h339.8V366H522v-47.9z m499.4 378.3c0-1.8-1.5-3.3-3.3-3.3l-89.1-3.7c-4.4-16.4-11.1-31.9-19.4-46.2l59.9-66c1.3-1.4 1.3-3.4 0-4.7l-31.8-33-31.7-29.6c-1.4-1.3-3.4-1.3-4.7 0l-65.1 60.9c-14.4-8.1-29.8-14.4-46.1-18.6l-4.9-89.1c0-1.8-1.5-3.3-3.4-3.3l-45.7-0.6-43.3 1.7c-1.8 0-3.3 1.5-3.3 3.4l-2.5 89.2c-14.6 4.2-28.6 10.1-41.6 17.4l-65.3-60.8c-1.3-1.4-3.4-1.4-4.7 0l-33.3 31.4-30.3 31.5c-1.4 1.3-1.4 3.4 0 4.7l60.1 65.9c-8.2 14.3-14.7 29.7-19.2 45.8l-89.1 3.7c-1.8 0-3.3 1.5-3.3 3.3l-1.1 45.7 1.1 43.5c0 1.8 1.5 3.3 3.3 3.3l89.1 3.6c4.4 16.4 11.1 31.9 19.4 46.2l-60 66c-1.3 1.4-1.3 3.4 0 4.7l30.1 31.3 33.4 31.2c1.4 1.3 3.4 1.3 4.7 0l65.1-60.9c14.4 8.1 29.9 14.4 46.2 18.6l4.8 89.1c0 1.8 1.5 3.3 3.4 3.3l43.5 0.6 45.7-1.7c1.8 0 3.3-1.5 3.3-3.4l2.5-89.1c14.7-4.2 28.6-10.2 41.6-17.4l65.2 60.8c1.3 1.4 3.4 1.4 4.7 0l31.7-29.6 31.7-33c1.4-1.3 1.4-3.4 0-4.7l-60.1-65.9c8.2-14.3 14.7-29.7 19.2-46l89.1-3.6c1.8 0 3.3-1.5 3.3-3.3l1.1-43.5-0.9-45.8zM740.8 843.6c-56.7 0-102.6-46-102.6-102.6 0-56.7 46-102.6 102.6-102.6 56.7 0 102.6 46 102.6 102.6 0.1 56.6-45.9 102.6-102.6 102.6z m0 0" fill="#ffffff" p-id="4457"></path></svg>

+ 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="1623208481843" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2859" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="600"><defs><style type="text/css"></style></defs><path d="M853.333333 682.666667a128 128 0 0 0-73.813333 23.893333l-104.533333-61.866667A159.573333 159.573333 0 0 0 682.666667 597.333333a170.666667 170.666667 0 0 0-128-164.693333V333.653333a128 128 0 1 0-85.333334 0v98.986667A170.666667 170.666667 0 0 0 341.333333 597.333333c0.170667 16.085333 2.730667 32.042667 7.68 47.36l-104.533333 61.866667A128 128 0 0 0 170.666667 682.666667a128 128 0 1 0 128 128 128 128 0 0 0-5.12-34.133334l98.133333-58.453333a170.666667 170.666667 0 0 0 240.64 0l98.133333 58.453333A128 128 0 1 0 853.333333 682.666667zM170.666667 853.333333a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z m341.333333-682.666666a42.666667 42.666667 0 1 1 0 85.333333 42.666667 42.666667 0 0 1 0-85.333333z m0 512a85.333333 85.333333 0 1 1 0-170.666667 85.333333 85.333333 0 0 1 0 170.666667z m341.333333 170.666666a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z" p-id="2860"></path></svg>

+ 215 - 25
src/views/channel/channel.vue

@@ -4,18 +4,17 @@
           <div class="w_input">
             <span  class="textSpan">通道名称:</span>
             <el-input v-model="body.channelName" style="width:200px" placeholder="通道名称" size="small" clearable />
+            <el-button class="filter-item"  icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
+            <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="dataFormAdd">新增</el-button>
           </div>
           <!-- <div class="w_input">
             <span  class="textSpan">  通道ID:</span>
             <el-input v-model="body.channelId" style="width:200px" placeholder="通道ID" size="small" clearable />
           </div> -->
-          
-      </div>
-      <div class="flexend">
-        <el-button class="filter-item"  icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
-        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="dataFormAdd">新增</el-button>
       </div>
 
+
+
       <!-- 表格数据 -->
       <el-table v-loading="loading" :data="tableData" border style="width: 100%">
 
@@ -58,11 +57,10 @@
               </template>
           </el-table-column>
 
-          <el-table-column label="操作" fixed="right" min-width="200" align="center">
+          <el-table-column label="操作" fixed="right" width="280" align="center">
               <template slot-scope="scope">
-
-                <!-- <el-button v-if="scope.row.isValid==0" size="small" icon="el-icon-circle-check" type="success"  @click="ModifyState(scope.row)">有效</el-button>
-                <el-button v-if="scope.row.isValid==1" size="small" icon="el-icon-circle-close" type="info"  @click="ModifyState(scope.row)">无效</el-button> -->
+                <el-button style="margin:5px" v-if="scope.row.isValid === 1" size="small" icon="el-icon-close" plain type="info" @click="ModifyStatus(scope.row,0)">无效</el-button>
+                <el-button style="margin:5px" v-if="scope.row.isValid === 0" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">有效</el-button>
                 <el-button size="small" icon="el-icon-edit" type="warning" plain  @click="handleEdit(scope.row)">编辑</el-button>
                 <el-button size="small" icon="el-icon-delete" type="danger" plain @click="ModifyDelete(scope.row,$event)">删除</el-button>
               </template>
@@ -90,7 +88,7 @@
         <el-row :gutter="20">
           <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
             <el-form-item label="通道名称" prop="channelName" :label-width="formLabelWidth"  >
-              <el-input v-model="dataForm.channelName" placeholder="请输入供应商ID" />
+              <el-input v-model="dataForm.channelName" placeholder="请输入通道名称" />
             </el-form-item>
           </el-col>
           
@@ -121,7 +119,16 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-              
+                 <el-form-item label="供应商" prop="supplierId" :label-width="formLabelWidth">
+                <el-select size="small" :disabled="!operation"  value-key="relationId" filterable v-model="dataForm.supplierId" clearable placeholder="请选择供应商" style="width: 100%" >
+                    <el-option
+                    v-for="item in listSupplier"
+                    :key="item.supplierId"
+                    :label="item.supplierName"
+                    :value="item.supplierId"
+                    />
+                </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"  >
@@ -173,7 +180,7 @@
           <el-table-column label="面额"  width="100" align="center" show-overflow-tooltip>
             <template slot-scope="scope" >
               <!-- <el-input  v-model="scope.row.price"></el-input> -->
-              <span >{{ scope.row.standardPrice }}</span>  
+              <span >{{ scope.row.facePrice }}</span>  
             </template>
           </el-table-column>
           <el-table-column label="结算价格"  align="center" show-overflow-tooltip>
@@ -183,6 +190,14 @@
             </template>
           </el-table-column>
 
+          <el-table-column label="折扣"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <div v-if="scope.row.discount" >{{ parseFloat(scope.row.discount * 100).toFixed(4)}}  %</div>  
+              <div v-else>{{ parseFloat(scope.row.price / scope.row.facePrice * 100).toFixed(4)}}  %</div>  
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+            </template>
+          </el-table-column>
+
           <el-table-column label="是否有效"  align="center" show-overflow-tooltip >
             <template slot-scope="scope" >
                <el-select size="small" v-model="scope.row.isValid"  placeholder="请选择是否有效" style="width: 90%" >
@@ -250,9 +265,9 @@
                 label: 'productName'
                 }"
                 :format="{
-                    noChecked: '${total}',
-                    hasChecked: '${checked}/${total}'
-                    }"
+                  noChecked: '${total}',
+                  hasChecked: '${checked}/${total}'
+                }"
                     :titles="['话费','话费']"
                 :data="data">
             </el-transfer>
@@ -265,7 +280,120 @@
 
      <!-- 查看 -->
     <el-dialog title="详情" :visible.sync="dialogFormLook" width="85%" center>
+          <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+        <el-row :gutter="20">
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+            <el-form-item label="通道名称" prop="channelName" :label-width="formLabelWidth"  >
+              <el-input v-model="dataForm.channelName" disabled placeholder="请输入供应商ID" />
+            </el-form-item>
+          </el-col>
+          
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+              <el-form-item label="运营商" prop="operator" :label-width="formLabelWidth">
+                <el-select size="small"  disabled v-model="dataForm.operator" clearable placeholder="请选择运营商" style="width: 100%" >
+                    <el-option
+                    v-for="item in mobileOperator"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                    />
+                </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" prop="isValid" >
+                  <el-select size="small" disabled v-model="dataForm.isValid"  placeholder="请选择是否有效" style="width: 100%" >
+                  <el-option
+                  v-for="item in status"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                  />
+                  </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-form-item label="供应商" prop="supplierId" :label-width="formLabelWidth">
+                <el-select size="small" disabled value-key="relationId" filterable v-model="dataForm.supplierId" clearable placeholder="请选择供应商" style="width: 100%" >
+                    <el-option
+                    v-for="item in listSupplier"
+                    :key="item.supplierId"
+                    :label="item.supplierName"
+                    :value="item.supplierId"
+                    />
+                </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.discount" disabled placeholder="请输入折扣" @change="clicklong(dataForm.discount)" />
+              </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.remark" disabled placeholder="请输入备注" />
+              </el-form-item>
+          </el-col>
+        </el-row>
+      
+      <!-- 添加产品 -->
+       <el-card  shadow="hover" v-if="!operation">
+        <div slot="header" class="clearfix">
+          <span class="topClass">通道产品信息</span>
+        </div>
+        <div>
+          <!-- 添加 -->
+          <el-table  ref="multipleTable" :data="dataForm.channelProductInfos"  @selection-change="handleSelectionChange">
+             <el-table-column
+                type="selection"
+                width="55">
+              </el-table-column>
+
+          <el-table-column label="产品Id" align="center" width="100"  show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <span>{{ scope.row.packageId }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="通道产品名称" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <span >{{ scope.row.productName }}</span>  
+            </template>
+          </el-table-column>
+
+          <el-table-column label="面额"  width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <span >{{ scope.row.facePrice }}</span>  
+            </template>
+          </el-table-column>
+          <el-table-column label="结算价格"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <span >{{ scope.row.price }}</span>  
+            </template>
+          </el-table-column>
+
+          <el-table-column label="折扣"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <div v-if="scope.row.disCount" >{{ ((scope.row.disCount ) * 100).toFixed(2)}}  </div>   -->
+              <div  >{{ parseFloat(scope.row.price / scope.row.facePrice * 100).toFixed(4)}}  %</div>  
+              <!-- <div  >{{ parseFloat(scope.row.discount * 100).toFixed(4)}}  %</div>   -->
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+            </template>
+          </el-table-column>
 
+          <el-table-column label="是否有效"  align="center" show-overflow-tooltip >
+            <template slot-scope="scope" >
+              <span v-if=" scope.row.isValid == 0">无效</span>
+              <span v-if=" scope.row.isValid == 1">有效</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        </div>
+       </el-card>
+ 
+      </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormLook = false">取 消</el-button>
         <el-button type="primary" @click="dialogFormLook = false">确 定</el-button>
@@ -307,8 +435,9 @@ export default {
                 {id:3,name:"联通"},
                 {id:2,name:"电信"},
             ],
+            listSupplier:[],
             rules2:{
-              supplierName: [{ required: true, message: '请输入供应商名称', trigger: 'blur' }], 
+              supplierId: [{ required: true, message: '请选择供应商名称', trigger: 'blur' }], 
               channelName: [{ required: true, message: '请输入通道名称', trigger: 'blur' }], 
               isValid: [{ required: true, message: '请选择是否有效', trigger: 'blur' }],
               operator: [{ required: true, message: '请选择运营商', trigger: 'blur' }],
@@ -326,8 +455,14 @@ export default {
     },
     created(){
         this.reLoad()
+        this.onsupplier()
     },
     methods: {
+      onsupplier(){
+        api.supplierInfo().then((res)=>{
+          this.listSupplier =res.data.data
+        })
+      },
         // 重载数据
         reLoad(){
             this.loading = true
@@ -352,7 +487,9 @@ export default {
             this.operation = true // true:新增, false:编辑
             this.dialogFormVisible = true // 控制弹出框
             this.dataForm = {}
-            this.$refs['dataForm'].resetFields();
+            if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
         },
         //编辑弹框
         handleEdit(row){
@@ -361,7 +498,9 @@ export default {
            this.dataForm = JSON.parse(JSON.stringify(row)) 
            this.batch == []
            this.morePricing = ""
-           this.$refs['dataForm'].resetFields();
+           if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
         },
         //文本框折扣编辑
         clicklong(row){
@@ -369,7 +508,7 @@ export default {
           let info = []
           let arry= code.forEach((res)=>{
             //结算价格 * 折扣(%) * 0.01
-                res.price=(res.standardPrice * row * 0.01).toFixed(4)
+                res.price=(res.facePrice * row * 0.01).toFixed(4)
                   info.push(res)
               })
           this.dataForm.channelProductInfos = info    
@@ -391,7 +530,7 @@ export default {
             let data = this.dataForm.channelProductInfos
             let arry= code.forEach((res)=>{
               //结算价格 * 折扣(%) * 0.01
-               res.price=(res.standardPrice * morePricing * 0.01).toFixed(4)
+               res.price=(res.facePrice * morePricing * 0.01).toFixed(4)
                     // info.push(res)
                     return res
               //  let iscode =  data.forEach(item=>{
@@ -421,7 +560,7 @@ export default {
             })
             .then(() => {
                 api.channelDelete(row.channelId).then((res)=>{
-                     if (response.data.status === 200) {
+                     if (res.status === 200) {
                         that.$message({
                             type: 'success',
                             message: '删除成功'
@@ -430,7 +569,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: response.data.msg
+                            message: res.msg
                         })
                      }
                 })
@@ -454,7 +593,17 @@ export default {
                 target = e.target.parentNode;
           }
           target.blur();
-          this.dataForm.channelProductInfos.splice(index,1)
+          if(row.channelProductId){
+            api.productDelete(row.channelProductId).then((res)=>{
+              this.dataForm.channelProductInfos.splice(index,1)
+              this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+            })
+          }else{
+            this.dataForm.channelProductInfos.splice(index,1)
+          }
           console.log(this.dataForm.channelProductInfos)
         },
         //新增和修改API
@@ -472,6 +621,7 @@ export default {
                             return res
                           }
                         })
+                        console.log(dataForm)
                       // 编辑
                       api.update(dataForm).then(response => {
                         if (response.status === 200) {
@@ -525,7 +675,10 @@ export default {
         //新增产品
         addprice(row){
           if(this.dataForm.operator == null || this.dataForm.operator == ""){
-            console.log("weikong")
+            this.$message({
+                type: 'error',
+                message: "无产品"
+              })
           }else{
             api.productAdd(row).then(res=>{
               let dataForm=this.dataForm.channelProductInfos
@@ -546,6 +699,7 @@ export default {
         },
         //确认产品
         clickeAddprice(){
+           let channelId=this.dataForm.channelId
            let value = this.value;
            let data =this.data;
            let code= value.map(item1=>{
@@ -553,8 +707,9 @@ export default {
               console.log(item1)
                   if(item1 == item2.productId){
                     let form = {
+                      channelId:channelId,
                        price : item2.productPrice,
-                       standardPrice : item2.productPrice,
+                       facePrice : item2.productPrice,
                        productName:item2.productName,
                        packageId:item2.packageId,
                        isValid:1,
@@ -568,6 +723,41 @@ export default {
             this.dialogVisible = false
             this.value = []
         },
+        //是否有效
+         ModifyStatus(row,i){
+          this.$confirm('是否修改 '+row.channelName+' 的状态', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(()=>{
+            let code = JSON.parse(JSON.stringify(row))
+            code.isValid = i   // 2:暂停   1:有效
+            let info = {
+              isValid:code.isValid,
+              channelId:code.channelId
+            }
+            api.update(info).then(response => {
+            if (response.status == "200") {
+              this.$message({
+                type: 'success',
+                message: '操作成功'
+              })
+              this.reLoad()
+            } else {
+              this.$message({
+                type: 'error',
+                message: response.data.msg
+              })
+            }
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消'
+            });          
+          });
+          
+    },
         // 搜索
         Search(){
             this.body.current = 1

+ 252 - 0
src/views/channel/channelGroup.vue

@@ -0,0 +1,252 @@
+<template>
+    <div class="app-container">
+        <!-- 搜索向 -->
+      <div class="flex">
+          <div class="w_input">
+            <span  class="textSpan">通道组名称:</span>
+            <el-input v-model="body.groupName" style="width:200px" placeholder="通道名称" size="small" clearable />
+            <el-button class="filter-item"  icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
+            <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="dataFormAdd">新增</el-button>
+          </div>
+      </div>
+
+
+        <!-- 表格数据 -->
+      <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+          <el-table-column label="序号" width="60" align="center">
+                <template slot-scope="scope">
+                <span>{{ scope.$index + 1 }}</span>
+                </template>
+            </el-table-column>
+
+          <el-table-column label="通道组名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.groupName }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="创建者" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span type="text" >{{ scope.row.creator }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="创建时间" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.createTime }}</span>
+              </template>
+          </el-table-column>
+
+
+          <el-table-column label="操作" fixed="right" width="200" align="center">
+              <template slot-scope="scope">
+
+                <!-- <el-button v-if="scope.row.isValid==0" size="small" icon="el-icon-circle-check" type="success"  @click="ModifyState(scope.row)">有效</el-button>
+                <el-button v-if="scope.row.isValid==1" size="small" icon="el-icon-circle-close" type="info"  @click="ModifyState(scope.row)">无效</el-button> -->
+                <el-button size="small" icon="el-icon-edit" type="warning" plain  @click="handleEdit(scope.row)">编辑</el-button>
+                <el-button size="small" icon="el-icon-delete" type="danger" plain @click="ModifyDelete(scope.row,$event)">删除</el-button>
+              </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>
+
+     <!-- 新增与修改 -->
+    <el-dialog :title="operation?'通道组新增':'通道组编辑'" :visible.sync="dialogFormVisible" width="85%" center>
+      <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+ 
+            <el-form-item label="通道组名称" prop="groupName" :label-width="formLabelWidth"  style="width:420px;margin:15px auto">
+              <el-input v-model="dataForm.groupName" placeholder="请输入通道组名称" />
+            </el-form-item>
+
+ 
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    
+    </div>
+</template>
+
+<script>
+import api from '@/api/channelGroup.js'
+export default {
+    data(){
+        return{  
+            loading:false,   //表格数据加载
+            tableData:[],       //表格数据
+            body:{
+                size:10,
+                current:1,
+                groupName:""   //名称搜索
+            },
+            total:0,
+            dataForm:{},
+            rules2:{},
+            operation:false,
+            dialogFormVisible:false,
+            formLabelWidth:"120px"
+        }
+    },
+    created(){
+        this.reLoad()
+    },
+    methods:{
+         // 重载数据
+        reLoad(){
+            this.loading = true
+            api.channelGroupList(this.body).then((res) => {
+                this.loading = false
+                let list = res.data.data.records
+                // console.log(data)
+                this.tableData = list
+                this.total = res.data.data.total
+            })
+        },
+        //搜索数据
+        Search(){
+            this.body.current = 1
+            this.reLoad()
+        },
+        //新增和修改API
+        submitForm(){
+         
+          this.$refs['dataForm'].validate((valid) => {
+                  if (valid) {
+                    if (!this.operation) {
+                        let dataForm = this.dataForm
+                      // 编辑
+                      api.channelGroupUpdate(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
+                          })
+                        }
+                      })
+                    } else {
+                      console.log(this.dataForm)
+                    //   // 添加
+                      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
+                          })
+                        }
+                      })
+                    }
+                  }
+                })
+        },
+        //新增弹框
+        dataFormAdd(){
+            this.operation = true // true:新增, false:编辑
+            this.dialogFormVisible = true // 控制弹出框
+            this.dataForm = {}
+            if(this.$refs['dataForm']){
+                 this.$refs['dataForm'].resetFields();
+            }
+           
+        },
+        //编辑弹框
+        handleEdit(row){
+           this.operation = false // true:新增, false:编辑
+           this.dialogFormVisible = true // 控制弹出框 
+           this.dataForm = JSON.parse(JSON.stringify(row)) 
+           if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
+        },
+          //删除API
+        ModifyDelete(row,e){
+            const that = this
+            let target=e.target;
+            if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
+                  target = e.target.parentNode;
+            }
+            target.blur();
+            that.$confirm('此操作将删除通道:' + row.groupName, '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+            .then(() => {
+                api.channelGroupIdDelete(row.channelGroupId).then((res)=>{
+                     if (res.status === 200) {
+                        that.$message({
+                            type: 'success',
+                            message: '删除成功'
+                        })
+                        that.reLoad()
+                     } else {
+                        that.$message({
+                            type: 'error',
+                            message: res.msg
+                        })
+                     }
+                })
+            })    
+        },
+        ///分页
+        handleSizeChange: function(val) {
+            this.body.size = val
+            this.reLoad()
+        },
+        handleCurrentChange: function(val) {
+            this.body.current = val
+            console.log(val)
+            this.reLoad()
+        }
+    }
+}
+</script>
+
+<style scoped>
+    .flex{
+     width: 90%;
+     display: flex;
+     flex-direction: row;
+     margin-bottom: 10px;
+     /* flex-wrap: wrap; */
+     justify-content: flex-start;
+    }
+    .flexend{
+    display: flex;
+    justify-content: flex-end;
+    /* padding-right: 2rem; */
+    width: 100%;
+    /* margin: 0 auto; */
+    padding-bottom: 20px;
+    }
+
+</style>

+ 40 - 19
src/views/channel/index.vue

@@ -242,6 +242,7 @@
               <span >{{ scope.row.creator }}</span>
             </template>
           </el-table-column>
+
           <el-table-column label="创建时间" align="center" show-overflow-tooltip >
             <template slot-scope="scope" >
               <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
@@ -496,7 +497,7 @@
           <!-- 添加银行卡 -->
           <el-table :data="dataForm.bankCards" >
 
-          <el-table-column label="银行卡" align="center" show-overflow-tooltip >
+          <el-table-column label="银行卡" width="200" align="center" show-overflow-tooltip >
             <template slot-scope="scope" >
               <!-- <el-input v-model="scope.row.cardNo"></el-input> -->
               <span >{{ scope.row.cardNo }}</span>
@@ -509,6 +510,12 @@
               <span >{{ scope.row.bankDeposit }}</span>
             </template>
           </el-table-column>
+          <el-table-column label="全称" width="150" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <!-- <el-input v-model="scope.row.bankDeposit"></el-input> -->
+              <span >{{ scope.row.account }}</span>
+            </template>
+          </el-table-column>
 
           <el-table-column label="账户类型" width="150" align="center" show-overflow-tooltip>
             <template slot-scope="scope" >
@@ -532,7 +539,7 @@
               <span >{{ scope.row.creator }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="创建时间" width="150" align="center" show-overflow-tooltip>
+          <el-table-column label="创建时间" width="170" align="center" show-overflow-tooltip>
             <template slot-scope="scope" >
               <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
                <i class="el-icon-time"></i>
@@ -686,7 +693,9 @@ export default {
         managePassword:"",         //后台密码
         // bankCards:[]
       }
-      this.$refs['dataForm'].resetFields();
+      if(this.$refs['dataForm']){
+          this.$refs['dataForm'].resetFields();
+      }
     },
     //加款对话框
     amountAdd:function(row){
@@ -740,7 +749,7 @@ export default {
             cardNo:"",       //银行卡
             bankDeposit:"",   //开户行
             account:1,     //账户名称    
-            supplierId:row.supplierId,
+            relationId:row.relationId,
             distinguish:""
           }
         ]
@@ -752,7 +761,9 @@ export default {
       }
       let newObj=JSON.parse(JSON.stringify(row))
       this.dataForm = newObj
-      this.$refs['dataForm'].resetFields();
+          if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
      
       // this.dataForm = Object.assign({}, row)
       // this.dataForm.jobId = row.jobId
@@ -830,12 +841,12 @@ export default {
         })
     },
     //添加银行卡
-    addprice(supplierId){
+    addprice(relationId){
       this.dataForm.bankCards.push({
           cardNo:"",       //银行卡
           bankDeposit:"",   //开户行
           account:'',       //供应商账户
-          supplierId:supplierId,
+          relationId:relationId,
           distinguish:1
           // creator:""       //创建者
       })
@@ -844,19 +855,32 @@ export default {
 
     //删除银行卡
     priceDelete(row,index,e){
+        let relationId=this.dataForm.relationId
         this.$confirm('此操作将删除:' + row.account, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       })
         .then(() => {
-          api.supplierDelete(row.id).then((res)=>{
-            this.dataForm.bankCards.splice(index,1)
-            this.$message({
-                type: 'success',
-                message: '删除成功'
-              })
-          })
+          
+          if(row.id){
+            let info = {
+              id:row.id
+            }
+            api.supplierDelete(row.id).then((res)=>{
+              this.dataForm.bankCards.splice(index,1)
+              this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+            })
+          }else{
+              this.dataForm.bankCards.splice(index,1)
+              this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+          }
         })
       let target=e.target;
       if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
@@ -885,12 +909,9 @@ export default {
         type: 'warning'
       })
         .then(() => {
-           let info={
-            isDelete : 1,
-            supplierId:row.supplierId,
-          }
+
           // row .isDelete = 1
-          api.channelDelete(info).then(response => {
+          api.onsupplierDelete(row.supplierId).then(response => {
             if (response.status === 200) {
               this.$message({
                 type: 'success',

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

@@ -114,7 +114,7 @@
 
       </div>
       <div class="flexend">
-        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-star-off" @click="handleReset">导出
+        <el-button class="classitem"  type="primary" plain icon="el-icon-star-off" @click="handleReset">导出
         </el-button>
         <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>
       </div>

+ 240 - 0
src/views/orderList/blackList.vue

@@ -0,0 +1,240 @@
+<template>
+     <div class="app-container ">
+       <div class="margin_top">
+        <!-- 搜索向 -->
+      <div class="flex">
+          <div class="w_input">
+            <span  class="textSpan">手机号:</span>
+            <el-input v-model="body.phoneNo" style="width:200px" placeholder="请输入手机号" size="small" clearable />
+            <el-button class="filter-item"  icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
+            <el-button class="classitem" style="marginRight:30px" type="primary" plain icon="el-icon-plus" @click="dataFormAdd">新增</el-button>
+           <el-button  icon="el-icon-delete" type="danger" plain @click="ModifyDelete">删除</el-button>
+          </div>
+      </div>
+      <div >
+      </div>
+        <!-- 表格数据 -->
+      <el-table v-loading="loading" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
+           <el-table-column
+            type="selection"
+            align="center"
+            width="55">
+            </el-table-column>
+
+          <el-table-column label="手机号" align="center" width="300" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.phoneNo }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="备注" align="center"  show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span type="text" >{{ scope.row.note }}</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>
+     <!-- 新增与修改 -->
+    <el-dialog :title="operation?'新增黑名单':'编辑黑名单'" :visible.sync="dialogFormVisible" width="55%" center>
+      <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+ 
+            <el-form-item label="手机号" prop="phoneNo" :label-width="formLabelWidth"  style="width:420px;margin:15px auto">
+              <el-input v-model="dataForm.phoneNo" placeholder="请输入通道组名称" />
+            </el-form-item>
+            <el-form-item label="备注" prop="groupName" :label-width="formLabelWidth"  style="width:420px;margin:15px auto">
+              <el-input  type="textarea" :autosize="{ minRows: 2, maxRows: 4}" v-model="dataForm.note" placeholder="请输入备注" />
+            </el-form-item>
+
+ 
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    </div>
+</template>
+
+<script>
+import api from '@/api/blackList.js'
+export default {
+    data(){
+        return{
+            loading:false,   //表格数据加载
+            tableData:[],       //表格数据
+            body:{
+                size:10,
+                current:1,
+                phoneNo:""   //名称搜索
+            },
+             total:0,
+            dataForm:{},
+            rules2:{
+                  phoneNo: [{ required: true, message: '请输入手机', trigger: 'blur' } ],
+            },
+            phone:[],
+            operation:false,
+            dialogFormVisible:false,
+            formLabelWidth:"120px"
+        }
+    },
+ created(){
+        this.reLoad()
+    },
+    methods:{
+         // 重载数据
+        reLoad(){
+            this.loading = true
+            api.Search(this.body).then((res) => {
+                this.loading = false
+                console.log(res)
+                let list = res.data.data.records
+                // console.log(data)
+                this.tableData = list
+                this.total = res.data.data.total
+            })
+        },
+        //搜索数据
+        Search(){
+            this.body.current = 1
+            this.reLoad()
+        },
+        //新增和修改API
+        submitForm(){
+         
+          this.$refs['dataForm'].validate((valid) => {
+                  if (valid) {
+                    if (!this.operation) {
+
+                    } else {
+                      console.log(this.dataForm)
+                    //   // 添加
+                    let dataForm = this.dataForm
+                    let list = []
+                    list.push(dataForm)
+                      api.add(list).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
+                          })
+                        }
+                      })
+                    }
+                  }
+                })
+        },
+        //新增弹框
+        dataFormAdd(){
+            this.operation = true // true:新增, false:编辑
+            this.dialogFormVisible = true // 控制弹出框
+            this.dataForm = {}
+            if(this.$refs['dataForm']){
+                 this.$refs['dataForm'].resetFields();
+            }
+           
+        },
+        //编辑弹框
+        handleEdit(row){
+           this.operation = false // true:新增, false:编辑
+           this.dialogFormVisible = true // 控制弹出框 
+           this.dataForm = JSON.parse(JSON.stringify(row)) 
+           if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
+        },
+          //删除API
+        ModifyDelete(){
+            const that = this
+            that.$confirm('此操作将删除该手机号', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+            .then(() => {
+                api.del(this.phone).then((res)=>{
+                     if (res.status === 200) {
+                        that.$message({
+                            type: 'success',
+                            message: '删除成功'
+                        })
+                        that.reLoad()
+                     } else {
+                        that.$message({
+                            type: 'error',
+                            message: res.msg
+                        })
+                     }
+                })
+            })    
+        },
+        //多选
+        handleSelectionChange(row){
+            let arryList = []
+            row.map(res=>{
+                let phoneNo = res.phoneNo
+                arryList.push(phoneNo)
+            })
+            this.phone = arryList
+        },
+        ///分页
+        handleSizeChange: function(val) {
+            this.body.size = val
+            this.reLoad()
+        },
+        handleCurrentChange: function(val) {
+            this.body.current = val
+            console.log(val)
+            this.reLoad()
+        }
+    }
+}
+</script>
+
+<style scoped>
+    .flex{
+     width: 90%;
+     display: flex;
+     flex-direction: row;
+     margin-bottom: 10px;
+     /* flex-wrap: wrap; */
+     justify-content: flex-start;
+     /* margin: 20px auto; */
+    }
+    .flexend{
+    display: flex;
+    justify-content: flex-end;
+    /* padding-right: 2rem; */
+    width: 100%;
+    /* margin: 0 auto; */
+    padding-bottom: 20px;
+    }
+
+    
+
+
+</style>

+ 6 - 7
src/views/orderList/finance.vue

@@ -205,7 +205,6 @@
        
         <el-button
           class="classitem"
-          style="marginright: 50px"
           type="primary"
           plain
           icon="el-icon-star-off"
@@ -321,7 +320,7 @@
 
       <el-table-column label="回调时间" width="160" align="center">
         <template slot-scope="scope">
-          <span>{{ scope.row.lastModifyDate }}</span>
+          <span>{{ scope.row.callbackTime }}</span>
         </template>
       </el-table-column>
 
@@ -486,14 +485,14 @@ export default {
       api.finance.Search(this.body).then((res) => {
         this.loading = false
         // this.tableData=res.data.data.records
-        // limitedDate :发送时间
-        // lastModifyDate :回调
+        // applyDate :发送时间
+        // callbackTime :回调
         // usedTime   :用时
         const tableData = res.data.data.records
         const arry = tableData.map((res) => {
-          if (res.lastModifyDate != null && res.lastModifyDate != '') {
-            const limitedDate = res.limitedDate
-            const lastModifyDate = res.lastModifyDate
+          if (res.callbackTime != null && res.callbackTime != '') {
+            const limitedDate = res.applyDate
+            const lastModifyDate = res.callbackTime
             // 发送时间 减去  回调时间
             const date = new Date(limitedDate)
             const time = date.valueOf()

+ 72 - 14
src/views/orderList/index.vue

@@ -186,24 +186,26 @@
             </div>
         </div>
           <div class="flexend">
-            <el-button class="filter-item" type="info" icon="el-icon-edit"  plain @click="handleReset">置重发
+            <el-button class="black-item" size="small" type="black_button" icon="el-icon-warning-outline"   @click="handleResetBlack">黑名单
             </el-button>
-            <el-button class="filter-item" type="warning" icon="el-icon-message" plain @click="handleReset">置回调
+            <el-button class="filter-item" size="small" type="info" icon="el-icon-edit"  plain @click="handleReset">置重发
+            </el-button>
+            <el-button class="filter-item" size="small" type="warning" icon="el-icon-message" plain @click="handleReset">置回调
             </el-button>
            
-            <el-button class="filter-item" icon="el-icon-delete" type="danger" plain @click="handleReset">置失败
+            <el-button class="filter-item" size="small" icon="el-icon-delete" type="danger" plain @click="handleReset">置失败
             </el-button>
-            <el-button class="filter-item" type="warning" icon="el-icon-check" plain @click="handleReset">置成功
+            <el-button class="filter-item" size="small" type="warning" icon="el-icon-check" plain @click="handleReset">置成功
             </el-button>
-            <el-button class="filter-item" type="success" icon="el-icon-check" plain @click="handleReset">补单
+            <el-button class="filter-item" size="small" type="success" icon="el-icon-check" plain @click="handleReset">补单
             </el-button>
             
-             <el-button class="classitem" style="marginRight:50px"  type="primary" plain  icon="el-icon-star-off"  @click="handleReset">导出
+             <el-button class="classitem" size="small" style="marginRight:50px"  type="primary" plain  icon="el-icon-star-off"  @click="handleReset">导出
             </el-button>
-            <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>
+            <el-button class="filter-item" size="small" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>
           </div>
     </div>
-    <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+    <el-table v-loading="loading" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="40"/>
 
       <el-table-column label="订单号" width="120" align="center" show-overflow-tooltip>
@@ -296,8 +298,8 @@
       </el-table-column>
       <el-table-column label="回调时间" width="170" align="center" show-overflow-tooltip>
          <template slot-scope="scope">
-            <i v-if="scope.row.lastModifyDate" class="el-icon-time"></i>
-           <span>{{ scope.row.lastModifyDate }}</span>
+            <i v-if="scope.row.callbackTime" class="el-icon-time"></i>
+           <span>{{ scope.row.callbackTime}}</span>
          </template>
       </el-table-column>
         <el-table-column
@@ -395,6 +397,7 @@
 </template>
 
 <script>
+import api from '@/api/blackList.js'
 import { ordersearch } from '@/api/orderList'
 export default {
   data() {
@@ -445,7 +448,8 @@ export default {
       dealFlag:[
         {id:"6",name:"成功"},        
         {id:"4",name:"失败"},
-      ]
+      ],
+      ArryList:[],
     }
   },
   created(){
@@ -476,9 +480,9 @@ export default {
           // usedTime   :用时
           let tableData=res.data.data.records
           let arry=tableData.map((res)=>{
-             if(res.lastModifyDate != null && res.lastModifyDate != ""){
-                let limitedDate = res.limitedDate
-                let lastModifyDate =res.lastModifyDate
+             if(res.callbackTime != null && res.callbackTime != ""){
+                let limitedDate = res.applyDate
+                let lastModifyDate =res.callbackTime
                  //发送时间 减去  回调时间
                  let date = new Date(limitedDate)
                  let time= date.valueOf()
@@ -486,6 +490,9 @@ export default {
                  let last = modify.valueOf()
                  let  used = last - time
                 res.usedTime = used / 1000
+                console.log(limitedDate)
+                console.log(lastModifyDate)
+                console.log(used)
              }
              return res
           })
@@ -495,6 +502,10 @@ export default {
           // console.log(res.data.data.records)
         })
     },
+    //多选
+    handleSelectionChange(row){
+      this.ArryList = row
+    },
     //搜索手机号
     onphon(){
       console.log(this.phone)
@@ -563,6 +574,38 @@ export default {
         this.currentPage="1"
         this.getTenantList()
       },
+      //黑名单
+      handleResetBlack(){
+        let arry = this.ArryList
+        let arryList = []
+            arry.map(res=>{
+                let phoneNo = {phoneNo:res.phoneNo,note:"黑名单"}
+                arryList.push(phoneNo)
+            })
+             console.log(arryList)
+             let that = this
+            that.$confirm('此操作将该手机号拉入黑名单', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+            .then(() => {
+                api.add(arryList).then((res)=>{
+                     if (res.status === 200) {
+                        that.$message({
+                            type: 'success',
+                            message: '成功拉入黑名单'
+                        })
+                        that.getTenantList()
+                     } else {
+                        that.$message({
+                            type: 'error',
+                            message: res.msg
+                        })
+                     }
+                })
+            })    
+      },
       //
       handleReset(){
 
@@ -622,4 +665,19 @@ export default {
  /* .classitem{
    background: salmon;
  } */
+ .black-item{
+    background: #19191b25;
+    color: rgba(22, 22, 22, 0.651);
+    border: 1px solid #2d2d3663;
+ }
+ .black-item:hover{
+    background: #2d2d36d0;
+    color: rgb(255, 255, 255);
+    border: 1px solid #2d2d3663;
+ }
+ .black-item:focus{
+    background: #2d2d36d0;
+    color: rgb(255, 251, 255);
+    border: 1px solid #2d2d3663;
+ }
 </style>

+ 10 - 6
src/views/product/index.vue

@@ -50,7 +50,7 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="产品名称"  align="center" show-overflow-tooltip>
+        <el-table-column label="产品名称" width="180"  align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <span>{{ scope.row.productName }}</span>
           </template>
@@ -62,7 +62,7 @@
           </template>
         </el-table-column> -->
 
-        <el-table-column label="产品编码"  align="center" show-overflow-tooltip>
+        <el-table-column label="产品编码" width="120" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <span>{{ scope.row.packageId }}</span>
           </template>
@@ -89,13 +89,13 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="创建时间" width="130" align="center" show-overflow-tooltip>
+        <el-table-column label="创建时间" width="170" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <span>{{ scope.row.createTime }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column label="操作" fixed="right" min-width="100" align="center">
+        <el-table-column label="操作" fixed="right" width="190" align="center">
             <template slot-scope="scope">
               <!--<el-button @click="handRest(scope.row)" type="warning" size="small">重置密码</el-button>-->
               <el-button size="small" icon="el-icon-edit" type="warning" plain @click="handleEdit(scope.row)">编辑</el-button>
@@ -280,7 +280,9 @@ export default {
         operator:"",
         productId:""
       }
-      this.$refs['dataForm'].resetFields();
+      if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
     },
     //编辑
     handleEdit: function(row) {
@@ -291,7 +293,9 @@ export default {
       this.operation = false 
       let newObj=JSON.parse(JSON.stringify(row))
       this.dataForm = newObj
-     this.$refs['dataForm'].resetFields();
+     if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
       // this.dataForm = Object.assign({}, row)
       // this.dataForm.jobId = row.jobId
     },

+ 179 - 11
src/views/userList/access.vue

@@ -20,6 +20,11 @@
                   <span>{{ scope.row.appId }}</span>
               </template>
           </el-table-column>
+          <el-table-column label="应用Key" width="150" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.appKey }}</span>
+              </template>
+          </el-table-column>
 
           <el-table-column label="app名称" align="center" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -56,7 +61,7 @@
 
           <el-table-column label="通道组名称" width="110" align="center" show-overflow-tooltip>
               <template slot-scope="scope">
-                  <span>{{ scope.row.channelId }}</span>
+                  <span>{{ scope.row.groupName }}</span>
               </template>
           </el-table-column>
 
@@ -66,16 +71,104 @@
               </template>
           </el-table-column>
 
-          <el-table-column label="操作" fixed="right" min-width="180" align="center">
+          <el-table-column label="操作" fixed="right" width="190" align="center">
             <template slot-scope="scope">
-                <el-button v-if="scope.row.status === 1" size="small" icon="el-icon-close"  type="danger" @click="ModifyStatus(scope.row,0)">关闭</el-button>
-                <el-button v-if="scope.row.status === 0" size="small" icon="el-icon-check"  @click="ModifyStatus(scope.row,1)">开启</el-button>
-                <el-button size="small" icon="el-icon-edit" type="warning" @click="ModifyEdit(scope.row)">编辑</el-button>
+                <el-button v-if="scope.row.status === 1" size="small" icon="el-icon-close" plain type="danger" @click="ModifyStatus(scope.row,0)">无效</el-button>
+                <el-button v-if="scope.row.status === 0" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">有效</el-button>
+                <el-button size="small" icon="el-icon-edit" type="warning" plain @click="ModifyEdit(scope.row)">编辑</el-button>
             </template>
           </el-table-column>
 
       </el-table>
 
+       <!-- 新增与修改 -->
+    <el-dialog :title="operation?'新增App':'编辑App'" :visible.sync="dialogFormVisible" width="85%" center>
+      <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+        <el-row :gutter="20">
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+            <el-form-item label="应用AD" prop="appId"  :label-width="formLabelWidth"  >
+            <el-input v-model="dataForm.appId"  />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+            <el-form-item label="应用Key" prop="appKey"  :label-width="formLabelWidth"  >
+            <el-input v-model="dataForm.appKey"  />
+            </el-form-item>
+          </el-col>
+          
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+               <el-form-item label="状态" prop="status" :label-width="formLabelWidth"  >
+                       <el-select size="small" style="width:100%" v-model="dataForm.status">
+                        <el-option
+                        v-for="item in status"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id"
+                        />
+                        </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-form-item label="App名称" prop="appName" :label-width="formLabelWidth"  >
+            <el-input v-model="dataForm.appName"  />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+               <el-form-item label="客户名称"  prop="customerName" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.customerName" disabled />
+                </el-form-item>
+          </el-col>
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+             <el-form-item label="重发次数" prop="totalCount" :label-width="formLabelWidth"  >
+            <el-input v-model="dataForm.totalCount" />
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+      
+        <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.time" />
+            </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-select size="small"  value-key="relationId" filterable v-model="channelGroupId" clearable placeholder="请选择供应商" style="width: 100%" >
+                    <el-option
+                    v-for="item in channelGroupData"
+                    :key="item.channelGroupId"
+                    :label="item.groupName"
+                    :value="item.channelGroupId"
+                    />
+                </el-select>
+            </el-form-item>
+          </el-col>
+            <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+            <el-form-item label="网关回调URL" prop="callbackUrl" :label-width="formLabelWidth"  >
+            <el-input v-model="dataForm.callbackUrl" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+            <el-col :span="12">
+                <el-form-item label="Ip地址" :label-width="formLabelWidth">
+                    <el-input   type="textarea" :autosize="{ minRows: 2, maxRows: 5}" v-model="dataForm.ipAddress"></el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+      
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
       <!-- 分页 -->
     <div class="pagination">
       <el-pagination
@@ -102,13 +195,40 @@ export default {
             body:{
                 size:10,
                 current:1
-            }
+            },
+           operation: false, // true:新增, false:编辑
+           dialogFormVisible: false,
+           dataForm:{},
+           total:0,
+           rules2:{
+                appId: [{ required: true, message: '请输入AppId', trigger: 'blur' }], 
+                appName: [{ required: true, message: '请输入App名称', trigger: 'blur' }], 
+                status: [{ required: true, message: '请选择状态', trigger: 'blur' }], 
+                totalCount: [{ required: true, message: '请输入重发次数', trigger: 'blur' }], 
+           },
+           formLabelWidth:"120px",
+           channelGroupData:[],
+           status:[{
+               id:1,
+               name:"有效"
+           },{
+               id:0,
+               name:"无效"
+           }],
+           channelGroupId:""
         }
     },
     created() {
         this.loadData()
+        this.channelData()
     },
     methods: {
+        //关联通道组数据
+        channelData(){
+            api.access.channelGroup().then((res)=>{
+                this.channelGroupData = res.data.data
+            })
+        },
         loadData(){
             this.loading = true
             api.access.Search(this.body).then((res) => {
@@ -127,15 +247,16 @@ export default {
                 cancelButtonText: '取消',
                 type: 'warning'
             }).then(()=>{
-                row.status = i 
-                api.access.update(row).then(response => {
-                if (response.status === 200) {
+                let code = JSON.parse(JSON.stringify(row))
+                code.status = i 
+                api.access.update(code).then(response => {
+                if (response.status == 200) {
                 this.$message({
                     type: 'success',
                     message: '操作成功'
                 })
                 this.dialogFormVisible = false
-                this.getTenantList()
+                this.loadData()
                 } else {
                 this.$message({
                     type: 'error',
@@ -151,7 +272,54 @@ export default {
             });
         },
         ModifyEdit(row){
-
+            console.log(row)
+            this.channelGroupId = row.channelId
+            this.dataForm = JSON.parse(JSON.stringify(row))
+            this.dialogFormVisible = true
+        },
+        //修改api
+        submitForm(){
+            this.$refs['dataForm'].validate((valid) => {
+                    if (valid) {
+                        if (!this.operation) {
+                        this.dataForm.channelId = this.channelGroupId
+                        // 编辑
+                        api.access.update(this.dataForm).then(response => {
+                            if (response.status === 200) {
+                            this.$message({
+                                type: 'success',
+                                message: '操作成功'
+                            })
+                            this.dialogFormVisible = false
+                            this.loadData()
+                            } else {
+                            this.$message({
+                                type: 'error',
+                                message: response.data.msg
+                            })
+                            }
+                        })
+                        } else {
+                        console.log(this.dataForm)
+                        //   // 添加
+                        // api.index.userAdd(this.dataForm).then(response => {
+                        //     if (response.status === 200) {
+                        //     this.$message({
+                        //         type: 'success',
+                        //         message: '操作成功'
+                        //     })
+                        //     this.dialogFormVisible = false
+                        //     this.getTenantList()
+                        //     } else {
+                        //     this.$message({
+                        //         type: 'error',
+                        //         message: response.data.msg
+                        //     })
+                        //     }
+                        // })
+                        }
+                         }
+                    })
         },
         handleSizeChange(val) {
             this.body.size = val

+ 257 - 65
src/views/userList/account.vue

@@ -2,57 +2,140 @@
   <div class="app-container">
       <div class="filter-container" style="margin: 10px 0 10px 0">
         <span class="textSpan">客户名称:</span>
-        <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
+        <el-select v-model="body.customerId" filterable  clearable  placeholder="请选择">
+        <el-option
+          v-for="item in userList"
+          :key="item.customerId"
+          :label="item.customerName"
+          :value="item.customerId">
+        </el-option>
+      </el-select>
         <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
-        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="handlerAdd">新增</el-button>
+        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="handlerAdd">加款</el-button>
       </div>
+      <!-- 列表 -->
       <el-table v-loading="loading" :data="tableData" border style="width: 100%">
-        <!-- 字段信息:客户名称、、账号余额、授信额度、可用额度、操作 -->
-        <el-table-column label="客户名称" width="200" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span>{{ scope.row.customerName }}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="账号余额" width="200" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
-        </el-table-column>
-        
-        <el-table-column label="授信额度" width="200" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="可用额度" width="200" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="操作" width="200" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
-        </el-table-column>
+              <el-table-column label="银行卡" width="190"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope"> 
+                  <span>{{ scope.row.cardNo }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="开户行"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.bankDeposit }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="账户"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.account }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="客户" width="120" align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.customerName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="加款人"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.payer }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="凭证"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.certificate }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="加款金额" align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.amount }}</span>
+                </template>
+              </el-table-column>
+              
+              <el-table-column label="加款时间"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.time }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="出款账户"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.paymentAccount }}</span>
+                </template>
+              </el-table-column>
 
+              <el-table-column label="操作" fixed="right" width="200" align="center">
+                <template slot-scope="scope">
+                  <el-button size="small" icon="el-icon-edit" type="warning" plain @click="handleEdit(scope.row)">修改</el-button>
+                  <el-button size="small" icon="el-icon-edit" type="danger" plain @click="handleEdit(scope.row)">撤销</el-button>
+                </template>
+              </el-table-column>
       </el-table>
+        <!-- 新增加款 -->
+      <el-dialog :title="operation?'新增加款':'编辑加款'" :visible.sync="dialogFormVisible" width="55%" center>
+        <el-form ref="AddNewData" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+              <el-form-item label="银行卡" prop="cardNo" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.cardNo" placeholder="请输入银行卡" />
+              </el-form-item>
+                <el-form-item label="供应商账户" prop="bankDeposit" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.bankDeposit" placeholder="请输入供应商账户" />
+              </el-form-item>
+                <el-form-item label="加款金额" prop="amount" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.amount" placeholder="请输入加款金额" />
+              </el-form-item>
+                <!-- <el-form-item label="凭证" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.certificate" placeholder="请输入凭证" />
+              </el-form-item> -->
+              <el-form-item label="凭证" prop="imgUrl" :label-width="formLabelWidth">
+                    <el-upload
+                ref = "upload"
+                action="#"
+                list-type="picture-card"
+             
+                :on-change="handleDownload"
+                :file-list="fileList"
+                :limit="1"
+                :auto-upload="false">
+                    <i slot="default" class="el-icon-plus"></i>
+                    <div slot="file" slot-scope="{file}">
+                    <img
+                        class="el-upload-list__item-thumbnail"
+                        :src="file.url" alt=""
+                    >
+                    <!-- //图片三个按钮事件 -->
+                    <span class="el-upload-list__item-actions">
+                        <span
+                        class="el-upload-list__item-preview"
+                        @click="handlePictureCardPreview(file)"
+                        >
+                        <i class="el-icon-zoom-in"></i>
+                        </span>
+                        <span
+                            class="el-upload-list__item-delete"
+                            @click="handleRemove(file)"
+                            >
+                            <i class="el-icon-delete"></i>
+                         </span>
+                     
+                    </span>
+                    </div>
+                </el-upload>
+                
+                <el-dialog :visible.sync="dialogDspaly" :modal="false">
+                <img width="100%" :src="dialogImageUrl" >
+                </el-dialog>
+                </el-form-item> 
+                <el-form-item label="出款账户" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.paymentAccount" placeholder="请输入出款账户" />
+              </el-form-item>
+                <el-form-item label="备注" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.distinguish" placeholder="请输入备注" />
+              </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="dialogFormVisible = false">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+        </div>
+      </el-dialog>
 
-      <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>
 
@@ -63,14 +146,46 @@ export default {
     return {
       loading:false,
       tableData:[],
-      body:{
-        current:1,
-        size:10
-      }
+       body:{
+          size:10,
+          current:1,
+          distinguish:2,
+          customerId:""
+      },
+       total:0,
+      dataForm:{},
+      rules2:{
+            phoneNo: [{ required: true, message: '请输入手机', trigger: 'blur' } ],
+      },
+      userList:[],
+      operation:false,
+      dialogFormVisible:false,
+      formLabelWidth:"120px",
+      dialogImageUrl:"",   //图片地址
+      dialogDspaly:false,
+      // options1: [],
+        // value:[],
+        imgurl:"",
+        // packet:[],
+        // redenvelopesVOS:[],
+        fileList:[],
+        url:"",
+        urlList:[]
+
     }
   },
+  created(){
+    this.user()
+    this.reLoad()
+  },
   methods: {
-    // 更具 this.body 重载数据
+    user(){
+      let user = "{customerName}"
+      api.account.userList(user).then((res) => {
+        this.loading =false
+        this.userList = res.data.data
+      })
+    },
     reLoad(){
       this.loading = true
       api.account.Search(this.body).then((res) => {
@@ -79,28 +194,105 @@ export default {
         this.total = res.data.data.total
       })
     },
-
-    // s搜索call
     Search(){
       this.body.current = 1
       this.reLoad()
     },
-
-    // 新增call
+    //新增
     handlerAdd(){
-
+      this.operation = true // true:新增, false:编辑
+            this.dialogFormVisible = true // 控制弹出框
+            this.dataForm = {}
+            if(this.$refs['dataForm']){
+                 this.$refs['dataForm'].resetFields();
+            }
     },
+    //新增和修改API
+        submitForm(){
+         
+          this.$refs['dataForm'].validate((valid) => {
+                  if (valid) {
+                    if (!this.operation) {
 
-    // 页码
-    handleSizeChange(val) {
-      this.body.size = val
-      this.reLoad()
-    },
-    // 换页
-    handleCurrentChange(val) {
-      this.body.current = val
-      this.reLoad()
-    }
+                    } else {
+                      console.log(this.dataForm)
+                    //   // 添加
+                    let dataForm = this.dataForm
+                    let list = []
+                    list.push(dataForm)
+                      api.add(list).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
+                          })
+                        }
+                      })
+                    }
+                  }
+                })
+        },
+     //清除图片
+     handleRemove(file) {
+        this.$refs.upload.clearFiles()
+      },
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        console.log(file)
+        this.dialogDspaly = true;
+      },
+      handleDownload(event, file, fileList) {
+        console.log(event)
+        console.log(file)
+        console.log(fileList)
+        const params = new FormData()
+        params.append('file', event.raw)
+        api.account.Upload(params).then((res)=>{
+          if(res.data.status == 200){
+                let image=res.data.image_url
+                this.dataForm.certificate=image
+                console.log(res)
+            }else{
+                this.$notify.error({
+                title: '错误',
+                message: res.msg
+                });
+            } 
+        })
+      //   axios({
+      //   method: 'post',
+      //   url: `http://47.108.168.172:6888/up_photo`,
+      //   // headers:{
+      //   //     "Content-Type": "multipart/form-data"
+      //   // },
+      //   data:params
+      // },)
+      //   .then(response => {
+      //       if(response.data.status == 200){
+      //           let image=response.data.image_url
+      //           this.dataForm.imgUrl=image
+      //       }else{
+      //           this.$notify.error({
+      //           title: '错误',
+      //           message: response.msg
+      //           });
+      //       } 
+      //   })
+      //   .catch(error => {
+      //     this.$notify.error({
+      //     title: '错误',
+      //     message: response.msg
+      //   });
+      //   });
+
+      },   
   },
 
 }

+ 719 - 20
src/views/userList/index.vue

@@ -18,15 +18,11 @@
 
       <el-table-column label="客户名称" width="150" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
-          <span>{{ scope.row.customerName }}</span>
+          <!-- <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">
-          <span>{{ scope.row.shorterName }}</span>
-        </template>
-      </el-table-column>
 
       <el-table-column label="状态" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
@@ -35,6 +31,11 @@
         </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">
@@ -75,10 +76,10 @@
             <el-dropdown-menu slot="dropdown" >
               <el-dropdown-item >
                       <el-button style="margin:5px" v-if="scope.row.status === 1" size="small" icon="el-icon-close" plain type="info" @click="ModifyStatus(scope.row,2)">暂停</el-button>
-                       <el-button style="margin:5px" v-if="scope.row.status === 2" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">有效</el-button>
+                       <el-button style="margin:5px" v-if="scope.row.status === 2" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">正常</el-button>
               </el-dropdown-item>
               <el-dropdown-item>
-                  <el-button style="margin:5px" size="small" icon="el-icon-edit" type="primary" plain  @click="product(scope.row)">产品</el-button>
+                  <el-button style="margin:5px" size="small" icon="el-icon-edit" type="primary" plain v-if="scope.row.status  == 2 " @click="AddProduct(scope.row)">产品</el-button>
               </el-dropdown-item>
               <el-dropdown-item>
           <el-button style="margin:5px" size="small" icon="el-icon-edit" type="warning" plain @click="ModifyEdit(scope.row)">编辑</el-button>
@@ -191,7 +192,7 @@
                   </el-row>
                     <el-row :gutter="20">
                     <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-                      <el-form-item label="是否有效" :label-width="formLabelWidth"  >
+                      <!-- <el-form-item label="是否有效" :label-width="formLabelWidth"  >
                        <el-select size="small"  v-model="dataForm.status">
                         <el-option
                         v-for="item in status"
@@ -200,12 +201,64 @@
                         :value="item.id"
                         />
                         </el-select>
-                      </el-form-item>
+                      </el-form-item> -->
                     </el-col>
                   </el-row>
       
                 </div>
               </el-card>  
+               <el-card  shadow="hover" v-if="!operation">
+                  <div slot="header" class="clearfix">
+                    <span class="topClass">客户银行账户信息</span>
+                    <el-button style="float: right;" type="primary" plain @click="addCards(dataForm.supplierId)">添加银行卡</el-button>
+                  </div>
+                  <div>
+                    <!-- 添加银行卡 -->
+                    <el-table :data="dataForm.bankCards" >
+
+                    <el-table-column label="银行卡"  align="center"  show-overflow-tooltip>
+                      <template slot-scope="scope" >
+                        <el-input v-model="scope.row.cardNo"></el-input>
+                        <!-- <span v-else>{{ scope.row.cardNo }}</span> -->
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="开户行" width="140" align="center" show-overflow-tooltip>
+                      <template slot-scope="scope">
+                        <el-input v-model="scope.row.bankDeposit"></el-input>
+                        <!-- <span v-else>{{ scope.row.bankDeposit }}</span> -->
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="全称" width="170" align="center" show-overflow-tooltip>
+                      <template slot-scope="scope">
+                        <el-input v-model="scope.row.account"></el-input>
+                        <!-- <span v-else>{{ scope.row.bankDeposit }}</span> -->
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="创建者" width="150" align="center" show-overflow-tooltip >
+                      <template slot-scope="scope" >
+                        <!-- <el-input v-model="scope.row.creator"></el-input> -->
+                        <span >{{ scope.row.creator }}</span>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="创建时间" align="center" show-overflow-tooltip >
+                      <template slot-scope="scope" >
+                        <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
+                        <i class="el-icon-time"></i>
+                        <span >{{ scope.row.createTime }}</span>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="操作"  width="165" min-width="150" align="center">
+                        <template slot-scope="scope">
+                          <el-button type="danger" icon="el-icon-delete" @click="CardsDelete(scope.row,scope.$index,$event)">删除</el-button>
+                        </template>
+                      </el-table-column>
+                  </el-table>
+                  </div>
+                </el-card>
           </el-form>
           <div slot="footer" class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -213,14 +266,385 @@
           </div>
         </el-dialog>
 
+<!-- 查看对话框 -->
+        <el-dialog title="查看客户" width="85%" :visible.sync="dialogFormLook" center>
+          <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+               <!-- 客户基本信息 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">客户基本信息</span>
+                </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.customerName" disabled />
+                      </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 disabled v-model="dataForm.creditAmount"  />
+                        </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.balance" disabled  />
+                        </el-form-item>
+                      
+                    </el-col>
+                  </el-row>
+                    <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.shorterName" disabled  />
+                        </el-form-item>
+                    </el-col>
+                    </el-row>
+                </div>
+              </el-card>  
+              <!-- 客户服务联系人信息 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">客户服务联系人信息</span>
+                </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.linkmanName" disabled />
+                      </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.linkmanMobile" disabled />
+                        </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.linkmanEmail" disabled />
+                        </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <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.address" disabled />
+                      </el-form-item>
+                    </el-col> 
+                  </el-row>
+                </div>
+              </el-card>  
+              <!-- 其他 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">其他</span>
+                </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" disabled />
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                        <el-form-item label="合作伙伴ID" :label-width="formLabelWidth"  >
+                          <el-input v-model="dataForm.partnerId" disabled  />
+                        </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"  /> -->
+                          <el-select size="small" disabled v-model="dataForm.priceCheck">
+                            <el-option
+                            v-for="item in priceCheck"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id"
+                            />
+                          </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-form-item label="是否有效" :label-width="formLabelWidth"  >
+                       <el-select size="small" disabled v-model="dataForm.status">
+                        <el-option
+                        v-for="item in status"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id"
+                        />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+      
+                </div>
+              </el-card>  
+               <el-card  shadow="hover" >
+                  <div slot="header" class="clearfix">
+                    <span class="topClass">客户银行账户信息</span>
+                    <!-- <el-button style="float: right;" type="primary" plain @click="addCards(dataForm.supplierId)">添加银行卡</el-button> -->
+                  </div>
+                  <div>
+                    <!-- 添加银行卡 -->
+                    <el-table :data="dataForm.bankCards" >
+
+                    <el-table-column label="银行卡"  align="center"  show-overflow-tooltip>
+                      <template slot-scope="scope" >
+                        <!-- <el-input v-model="scope.row.cardNo"></el-input> -->
+                        <span >{{ scope.row.cardNo }}</span>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="开户行" width="140" align="center" show-overflow-tooltip>
+                      <template slot-scope="scope">
+                        <!-- <el-input v-model="scope.row.bankDeposit"></el-input> -->
+                        <span >{{ scope.row.bankDeposit }}</span>
+                      </template>
+                    </el-table-column>
+                    
+                    <el-table-column label="全称" width="170" align="center" show-overflow-tooltip>
+                      <template slot-scope="scope">
+                        <!-- <el-input v-model="scope.row.account"></el-input> -->
+                        <span >{{ scope.row.account }}</span>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="创建者" width="150" align="center" show-overflow-tooltip >
+                      <template slot-scope="scope" >
+                        <!-- <el-input v-model="scope.row.creator"></el-input> -->
+                        <span >{{ scope.row.creator }}</span>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column label="创建时间" align="center" show-overflow-tooltip >
+                      <template slot-scope="scope" >
+                        <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
+                        <i class="el-icon-time"></i>
+                        <span >{{ scope.row.createTime }}</span>
+                      </template>
+                    </el-table-column>
+
+
+                  </el-table>
+                  </div>
+                </el-card>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="dialogFormLook = false">取 消</el-button>
+            <el-button type="primary" @click="dialogFormLook = false">确 定</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 查看产品 -->
+        <el-dialog :title="productData.customerName+' 产品'" width="85%" :visible.sync="LookProduct" center>
+          <!-- 添加 -->
+          <el-table  ref="multipleTable" :data="channelProductInfos" >
+  
+
+          <el-table-column label="产品Id" align="center" width="100"  show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input v-model="scope.row.packageId"></el-input> -->
+              <span>{{ scope.row.packageId }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="客户产品名称" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input  v-model="scope.row.channelProductName"></el-input> -->
+              <span >{{ scope.row.productName }}</span>  
+            </template>
+          </el-table-column>
+
+          <el-table-column label="面额"  width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+              <span >{{ scope.row.facePrice  }}</span>  
+            </template>
+          </el-table-column>
+          <el-table-column label="结算价格"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+              <span >{{ scope.row.price }}</span>  
+            </template>
+          </el-table-column>
+          <el-table-column label="折扣"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <div v-if="scope.row.disCount" >{{ ((scope.row.disCount ) * 100).toFixed(2)}}  </div>   -->
+              <div v-if="scope.row.disCount" >{{ parseFloat(scope.row.disCount * 100).toFixed(4)}}  %</div>  
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+            </template>
+          </el-table-column>
+
+          <el-table-column label="是否有效"  align="center" show-overflow-tooltip >
+            <template slot-scope="scope" >
+              <span v-if="scope.row.isEffective == 0">无效</span>
+              <span v-if="scope.row.isEffective == 1">有效</span>
+            </template>
+          </el-table-column>
+          </el-table>
+            <div slot="footer" class="dialog-footer">
+            <el-button @click="LookProduct = false">取 消</el-button>
+            <el-button type="primary" @click="LookProduct = false">确 定</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 添加产品 -->
         <el-dialog :title="productData.customerName+' 产品'" width="85%" :visible.sync="productShow" center>
-          test
+      <el-form ref="infoForm" style="marginBottom:20px" :model="infoForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+        <el-row :gutter="20">
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+            <el-form-item label="客户名称" prop="channelName" :label-width="formLabelWidth"  >
+              <el-input v-model="productData.customerName" disabled placeholder="请输入产品" />
+              <!-- <span class="textSpan">{{productData.customerName}}</span> -->
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+           <el-form-item label="折扣(%)" prop="discount" :label-width="formLabelWidth"  >
+                <el-input  v-model="infoForm.discount" placeholder="请输入折扣" @change="clicklong(infoForm.discount)" />
+              </el-form-item>
+          </el-col>
+        </el-row>  
+      </el-form>
+             <!-- 添加产品 -->
+       <el-card  shadow="hover" >
+        <div slot="header" class="clearfix">
+          <span class="topClass">客户产品信息</span>
+          <el-button style="float: right;" type="primary" plain @click="addprice(productData.customerId)">添加客户产品</el-button>
+          <el-button style="marginRight:20px;float: right;" type="success" plain @click="editpricing">结算价格批量定价</el-button>
+        </div>
+        <div>
+          <!-- 添加 -->
+          <el-table  ref="multipleTable" :data="channelProductInfos"  @selection-change="handleSelectionChange">
+             <el-table-column
+                type="selection"
+                width="55">
+              </el-table-column>
+
+          <el-table-column label="产品Id" align="center" width="100"  show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input v-model="scope.row.packageId"></el-input> -->
+              <span>{{ scope.row.packageId }}</span>
+            </template>
+          </el-table-column>
+<!-- 
+          <el-table-column label="通道产品ID" width="150" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.channelProductId"></el-input>
+            </template>
+          </el-table-column> -->
+
+          <el-table-column label="客户产品名称" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input  v-model="scope.row.channelProductName"></el-input> -->
+              <span >{{ scope.row.productName }}</span>  
+            </template>
+          </el-table-column>
+
+          <el-table-column label="面额"  width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+              <span >{{ scope.row.facePrice  }}</span>  
+            </template>
+          </el-table-column>
+          <el-table-column label="结算价格"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <el-input  v-model="scope.row.price"></el-input>
+              <!-- <span >{{ scope.row.account }}</span>   -->
+            </template>
+          </el-table-column>
+          <el-table-column label="折扣"  align="center" show-overflow-tooltip>
+            <template slot-scope="scope" >
+              <!-- <div v-if="scope.row.disCount" >{{ ((scope.row.disCount ) * 100).toFixed(2)}}  </div>   -->
+              <div v-if="scope.row.disCount" >{{ parseFloat(scope.row.disCount * 100).toFixed(4)}}  %</div>  
+              <div v-else >{{ parseFloat(scope.row.price / scope.row.facePrice * 100).toFixed(4)}}  %</div>  
+              <!-- <el-input  v-model="scope.row.price"></el-input> -->
+            </template>
+          </el-table-column>
+
+          <el-table-column label="是否有效"  align="center" show-overflow-tooltip >
+            <template slot-scope="scope" >
+               <el-select size="small" v-model="scope.row.isEffective"  placeholder="请选择是否有效" style="width: 90%" >
+                  <el-option
+                  v-for="item in isEffective"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                  />
+                  </el-select>
+              <!-- <span >{{ scope.row.aaa }}</span> -->
+            </template>
+          </el-table-column>
+
+          <el-table-column label="操作"  width="165" min-width="150" align="center">
+              <template slot-scope="scope">
+                <el-button type="danger" plain icon="el-icon-delete" @click="priceDelete(scope.row,scope.$index,$event)">删除</el-button>
+              </template>
+            </el-table-column>
+        </el-table>
+        </div>
+       </el-card>
           <div slot="footer" class="dialog-footer">
             <el-button @click="productShow = false">取 消</el-button>
             <el-button type="primary" @click="productSubmit">确 定</el-button>
           </div>
         </el-dialog>
 
+            <!-- 结算价格批量定价 -->
+    <el-dialog
+    title="结算价格批量定价"
+    :visible.sync="pricingVisible"
+    width="40%"
+    modal
+    :close-on-click-modal="false"
+    center
+    >
+      <div style="text-align:center;">
+        <el-input v-model="morePricing" @keyup.enter.native="pricingClike" style="width:200px"></el-input>
+        <span>
+          %
+        </span>
+      </div>
+    <span slot="footer" class="dialog-footer">
+        <!-- <el-button @click="">取 消</el-button> -->
+        <el-button type="primary" @click="pricingClike">确 定</el-button>
+    </span>
+    </el-dialog>
+
+    <!-- 产品选择 -->
+    <el-dialog
+    title="添加产品"
+    :visible.sync="dialogVisible"
+    width="58%"
+    >
+         <div class="edit_dev">
+
+            <el-transfer
+                v-model="value"
+                filterable
+                :props="{
+                key: 'productId',
+                label: 'productName'
+                }"
+                :format="{
+                  noChecked: '${total}',
+                  hasChecked: '${checked}/${total}'
+                }"
+                    :titles="['话费','话费']"
+                :data="data">
+            </el-transfer>
+         </div>
+    <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="clickeAddprice">确 定</el-button>
+    </span>
+    </el-dialog>
+
     <!-- 分页 -->
     <div class="pagination">
       <el-pagination
@@ -249,9 +673,13 @@ export default {
         size: 10,
         current: 1
       },
+      isEffective:[
+        {id:0,name:"无效"},
+        {id:1,name:"有效"}
+      ],
       status:[
-        {id:1,name:"正常"},
-        {id:2,name:"暂停"}
+        {id:2,name:"正常"},
+        {id:1,name:"暂停"}
       ],
       priceCheck:[
         {id:0,name:"关闭"},
@@ -259,21 +687,34 @@ export default {
       ],
       operation: false, // true:新增, false:编辑
       dialogFormVisible: false, // 控制弹出框
+      pricingVisible:false,     //批量折扣弹框
+      dialogFormLook:false,     //查看弹框
+      LookProduct:false,      //查看产品
+      dialogVisible:false,
       formLabelWidth: '120px',   //新增宽度
       dataForm:{
           userId:4,
+      },
+      infoForm:{
+        
       },
       productShow:false,
       productData:{}, // 产品查看时的基本数据的数据
       rules2:{
         shorterName: [{ required: true, message: '请输入客户简称', trigger: 'blur' }],
         customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
+        discount: [{ required: true, message: '请输入折扣', trigger: 'blur' }],
       },
       loading:false,
       total: 1,
       tableData: [
  
-      ]
+      ],
+      morePricing:"",
+      data:[],       
+      value:[],
+      batch:[],          //批量所选的数据
+      channelProductInfos:[]  //添加产品列表
     }
   },
   created() {
@@ -292,7 +733,15 @@ export default {
     ModifyEdit(row) {
       this.operation = false
       this.dialogFormVisible = true
-      this.dataForm = row
+      if(row.bankCards == undefined){    
+      //修改弹框时如果银行卡字段为undefined的时候赋值为空
+         row.bankCards = []
+      }
+      let newObj=JSON.parse(JSON.stringify(row))
+      this.dataForm = newObj
+       if(this.$refs['dataForm']){
+            this.$refs['dataForm'].resetFields();
+        }
     },
     ModifyDelete(row) {
       this.$confirm('此操作将删除客户:' + row.customerName, '提示', {
@@ -331,14 +780,260 @@ export default {
         this.total = res.data.data.total
       })
     },
-
-    product(row){
+    //获取产品信息
+    AddProduct(row){
       this.productShow = true
       this.productData = row
+      let info={
+        customerId:row.customerId,
+        type: 1,     // 1:话费   
+      }
+      api.index.paroductDetails(info).then((res)=>{
+        let list = res.data.data
+        list.map((res)=>{
+                    res.price = (res.price / 10000).toFixed(4)
+                    res.facePrice = res.facePrice / 10000
+                  return res
+                })
+        this.channelProductInfos = list
+      })
+      this.infoForm={
+        discount:"100"
+      }
     },
+     //查看弹框
+        hookLook(row){
+             console.log(row)
+            this.dialogFormLook = true
+            this.dataForm={
+
+            }
+            let newObj=JSON.parse(JSON.stringify(row))
+            this.dataForm = newObj
+        },
+     //查看产品
+     productLook(row){
+      this.productData = row
+      let info={
+        customerId:row.customerId,
+        type: 1,     // 1:话费   
+      }
+      api.index.paroductDetails(info).then((res)=>{
+        let list = res.data.data
+        list.map((res)=>{
+                    res.price = (res.price / 10000).toFixed(4)
+                    res.facePrice = res.facePrice / 10000
+                  return res
+                })
+        this.channelProductInfos = list
+      })
+        this.LookProduct = true
+     },  
+    //多选
+        handleSelectionChange(rows){
+          this.batch = rows
+        },
+     //结算价格批量定价
+        editpricing(){
+          console.log(this.batch)
+          if(this.batch.length == 0){
+              this.$message({
+                type: 'error',
+                message: "请至少选择一项"
+              })
+          }else{
+             this.pricingVisible = true
+          }
+        },
+          //折扣批量
+        pricingClike(){
+          // console.log(this.batch)
+          let morePricing = this.morePricing
+          let code = this.batch
+          if(!morePricing){
+            this.$message({
+                type: 'error',
+                message: "请输入结算价格批量定价"
+              })
+          }else{
+            let info = []
+            let data = this.channelProductInfos
+            let arry= code.forEach((res)=>{
+              //结算价格 * 折扣(%) * 0.01
+               res.price=(res.facePrice * morePricing * 0.01).toFixed(4)
+                    return res
+            })
+             this.pricingVisible = false
+             
+            }
+            this.$refs.multipleTable.clearSelection();
+        },
+        //新增产品
+        addprice(row){
+            api.index.userProduct(row).then(res=>{
+              let dataForm=this.channelProductInfos
+              let code = res.data.data
+              if(dataForm.length == 0){
+                this.data=code
+              }else{
+                // 去重产品            
+                  var set=dataForm.map(item=>item.productName)
+                  var resArr=code.filter(item=>!set.includes(item.productName))
+                  this.data=resArr
+                  console.log(resArr)
+              }
+              // console.log(code)
+              this.dialogVisible = true
+            })
+        },
+        //确认产品
+        clickeAddprice(){
+           let customerId=this.productData.customerId
+           let value = this.value;
+           let data =this.data;
+           let code= value.map(item1=>{
+            let arry=  data.map(item2=>{
+  
+                  if(item1 == item2.productId){
+                    let form = {
+                      customerId:customerId,
+                       price : item2.productPrice,
+                       facePrice : item2.productPrice,
+                       productName:item2.productName,
+                       packageId:item2.packageId,
+                       isEffective:1,
+                       type:1,
+                    }
+                    console.log(form)
+                    //  console.log(form)
+                      this.channelProductInfos.push(form)
+                  }
+                  //  return info
+              })
+            })
+            this.dialogVisible = false
+            this.value = []
+        },
+        //添加银行卡
+        addCards(relationId){
+          this.dataForm.bankCards.push({
+          cardNo:"",       //银行卡
+          bankDeposit:"",   //开户行
+          account:'',       //供应商账户
+          relationId:relationId,
+          distinguish:2
+          // creator:""       //创建者
+         })
+        },
+        //删除银行卡
+        CardsDelete(row,index,e){
+            let relationId=this.dataForm.relationId
+              this.$confirm('此操作将删除:' + row.account, '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            })
+              .then(() => {  
+                if(row.id){
+                  let info = {
+                    id:row.id
+                  }
+                  api.index.supplierDelete(row.id).then((res)=>{
+                    this.dataForm.bankCards.splice(index,1)
+                    this.$message({
+                        type: 'success',
+                        message: '删除成功'
+                      })
+                  })
+                }else{
+                    this.dataForm.bankCards.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();  
+        },
+    //文本框折扣编辑
+    clicklong(row){
+      let code = this.channelProductInfos
+      let info = []
+      let arry= code.forEach((res)=>{
+        //结算价格 * 折扣(%) * 0.01
+            res.price=(res.facePrice * row * 0.01).toFixed(4)
+              info.push(res)
+          })
+      this.channelProductInfos = info    
+          console.log(info)
+        // console.log(number)
+    },
+    //API
     productSubmit(){
-      productShow = false
+        this.$refs['infoForm'].validate((valid) => {
+          if (valid) {
+            let channelProductInfos = this.channelProductInfos
+            // let row=channelProductInfos.map((res)=>{
+            //                     if(res.price > 10000){
+            //                       return res
+            //                     }else{
+            //                       res.price = res.price * 10000
+            //                       res.facePrice = res.facePrice * 10000
+            //                       return res
+            //                     }
+            //                   })
+            api.index.AddCustomer(channelProductInfos).then((res)=>{
+              if (res.status == 200) {
+                        this.$message({
+                          type: 'success',
+                          message: '操作成功'
+                        })
+                        this.productShow = false
+                      } else {
+                        this.$message({
+                          type: 'error',
+                          message: res.data.msg
+                        })
+                      }
+            })
+          }
+        })
     },
+     //产品删除
+        priceDelete(row,index,e){
+        this.$confirm('此操作将删除:' + row.productName, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          
+          if(row.customerProductId){
+            api.index.delectCustomer(row.customerProductId).then((res)=>{
+             this.channelProductInfos.splice(index,1)
+              this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+            })
+          }else{
+              this.channelProductInfos.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();
+        },
     //新增或修改API
     submitForm(){
         this.$refs['dataForm'].validate((valid) => {
@@ -392,7 +1087,7 @@ export default {
         let code = JSON.parse(JSON.stringify(row))
         code.status = i   // 2:暂停   1:有效
         api.index.update(code).then(response => {
-        if (response.data.status === 200) {
+        if (response.status === 200) {
           this.$message({
             type: 'success',
             message: '操作成功'
@@ -409,7 +1104,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: '已取消'
         });          
       });
       
@@ -437,4 +1132,8 @@ export default {
     .el-card {
       border: 0px solid #fff;
     }
+
+.edit_dev >>> .el-transfer-panel {
+     width:250px;
+   }
 </style>

+ 341 - 0
src/views/userList/indexCp.vue

@@ -0,0 +1,341 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container" style="margin: 10px 0 10px 0">
+      <span class="textSpan">客户名称:</span>
+      <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
+      <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="reLoad">搜索</el-button>
+      <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="NewUser">新增</el-button>
+    </div>
+
+    <!-- 表格 -->
+    <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+
+      <el-table-column label="客户名称" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.customerName }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="客户简称" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.shorterName }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="状态" align="center">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status === 1" size="small">有效</el-tag>
+          <el-tag v-if="scope.row.status === 2" size="small">无效</el-tag>
+          <el-tag v-if="scope.row.status === 3" size="small">暂停</el-tag>
+        </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="Logo图片组ID" width="200" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.logoGroupId }}</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="200" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.createTime }}</span>
+        </template>
+      </el-table-column>
+
+
+      <el-table-column label="操作" fixed="right" min-width="200" align="center">
+        <template slot-scope="scope">
+          <el-button size="small" icon="el-icon-edit" type="warning" @click="ModifyEdit(scope.row)">编辑</el-button>
+          <el-button size="small" icon="el-icon-delete" type="danger" @click="ModifyDelete(scope.row,$event)">删除</el-button>
+        </template>
+      </el-table-column>
+
+    </el-table>
+
+<!-- 添加或修改对话框 -->
+        <el-dialog :title="operation?'新增客户':'编辑客户'" width="85%" :visible.sync="dialogFormVisible" center>
+          <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+               <!-- 客户基本信息 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">客户基本信息</span>
+                </div>
+                <div>
+                    <el-row :gutter="20">
+                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                      <el-form-item label="客户名称" prop="customerName" :label-width="formLabelWidth"  >
+                        <el-input v-model="dataForm.customerName" />
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                        <el-form-item label="客户ID" :label-width="formLabelWidth"  >
+                          <el-input v-model="dataForm.customerId"  />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                        <el-form-item label="客户简称" prop="shorterName" :label-width="formLabelWidth">
+                          <el-input v-model="dataForm.shorterName"  />
+                        </el-form-item>
+                    </el-col>
+                  </el-row>
+                </div>
+              </el-card>  
+              <!-- 客户服务联系人信息 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">客户服务联系人信息</span>
+                </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.linkmanName" />
+                      </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.linkmanMobile"  />
+                        </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.linkmanEmail"  />
+                        </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <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.address" />
+                      </el-form-item>
+                    </el-col> 
+                  </el-row>
+                </div>
+              </el-card>  
+              <!-- 其他 -->
+              <el-card shadow="never"  >
+                <!-- <el-card  shadow="hover" > -->
+                <div slot="header" class="clearfix">
+                  <span class="topClass">其他</span>
+                </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="合作伙伴ID" :label-width="formLabelWidth"  >
+                          <el-input v-model="dataForm.partnerId"  />
+                        </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"  />
+                        </el-form-item>
+                    </el-col>
+                  </el-row>
+                    <el-row :gutter="20">
+                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                      <el-form-item label="是否有效" :label-width="formLabelWidth"  >
+                       <el-select size="small"  v-model="dataForm.status">
+                        <el-option
+                        v-for="item in status"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id"
+                        />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+      
+                </div>
+              </el-card>  
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="dialogFormVisible = false">取 消</el-button>
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+          </div>
+        </el-dialog>
+
+    <!-- 分页 -->
+    <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 {
+      body: {
+        customerName:"",
+        size: 10,
+        current: 1
+      },
+      status:[{
+        id:1,
+        name:"有效"
+      },{
+        id:2,
+        name:"无效"
+      },{
+        id:3,
+        name:"暂停"
+      }],
+      operation: false, // true:新增, false:编辑
+      dialogFormVisible: false, // 控制弹出框
+      formLabelWidth: '120px',   //新增宽度
+      dataForm:{
+          userId:4,
+      },
+      rules2:{
+        shorterName: [{ required: true, message: '请输入客户简称', trigger: 'blur' }],
+        customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
+      },
+      loading:false,
+      total: 1,
+      tableData: [
+ 
+      ]
+    }
+  },
+  created() {
+    this.getTenantList()
+  },
+  methods: {
+    //新增弹框
+    NewUser() {
+      this.operation = true
+      this.dialogFormVisible = true
+      this.dataForm = {
+          userId:4,
+      }
+    },
+    //编辑弹框
+    ModifyEdit(row) {
+      this.operation = false
+      this.dialogFormVisible = true
+      this.dataForm = row
+    },
+    ModifyDelete(row,e) {
+       let target=e.target;
+      if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
+            target = e.target.parentNode;
+      }
+     target.blur();
+      console.log('ModifyDelete')
+    },
+    //数据
+    getTenantList(){
+      this.loading = true
+      api.Search(this.body).then((res) => {
+        this.loading =false
+        this.tableData = res.data.data.records
+        this.total = res.data.data.total
+      })
+    },
+    //新增或修改API
+    submitForm(){
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            if (!this.operation) {
+              console.log(this.dataForm)
+              // 编辑
+              // api.channelEdit(this.dataForm).then(response => {
+              //   if (response.status === 200) {
+              //     this.$message({
+              //       type: 'success',
+              //       message: '操作成功'
+              //     })
+              //     this.dialogFormVisible = false
+              //     this.getTenantList()
+              //   } else {
+              //     this.$message({
+              //       type: 'error',
+              //       message: response.data.msg
+              //     })
+              //   }
+              // })
+            } else {
+              console.log(this.dataForm)
+            //   // 添加
+              api.userAdd(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
+                  })
+                }
+              })
+            }
+          }
+        })
+    },
+    //搜索
+    reLoad() {
+      this.body.current = 1
+      this.getTenantList()
+    },
+    //页码
+    handleSizeChange(val) {
+      this.body.size = val
+      this.getTenantList()
+    },
+    //换页
+    handleCurrentChange(val) {
+      this.body.current = val
+      this.getTenantList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+    .el-card {
+      border: 0px solid #fff;
+    }
+</style>