zerp 4 年之前
父节点
当前提交
89f05df115

+ 3 - 3
config/index.js

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

+ 3 - 0
src/api/product.js

@@ -75,3 +75,6 @@ export function MaintDel(parms) {
   })
 }
 
+
+
+

+ 289 - 16
src/views/channel/account.vue

@@ -2,18 +2,209 @@
   <div class="app-container">
       <div class="filter-container" style="margin: 10px 0 10px 0">
         <span class="textSpan">供应商名称:</span>
-        <el-select v-model="body.relationId" filterable  clearable  placeholder="请选择">
+        <el-select v-model="body.supplierName" filterable  clearable  placeholder="请选择">
         <el-option
           v-for="item in userList"
           :key="item.relationId"
           :label="item.supplierName"
-          :value="item.relationId">   
+          :value="item.supplierName">   
         </el-option>
       </el-select>
         <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
       </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="供应商名称" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope" @click="handleLook(scope.row)">
+           <!-- <el-button type="text" @click="handleLook(scope.row)">{{ scope.row.supplierName }}</el-button> -->
+           <span>{{ scope.row.supplierName }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="可用余额" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.balance }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="累计充值" width="110" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.rechargeAmount  }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="累计消费" width="110" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.consumeAmount }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="创建时间" width="170" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+           <i class="el-icon-time"></i>
+          <span>{{ scope.row.createTime }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="是否有效" width="90" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+            <el-tag v-if="scope.row.isValid==0" type="danger" size="warning">无效</el-tag>
+            <el-tag v-if="scope.row.isValid==1" size="small">有效</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="限速" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.ratio }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" fixed="right" min-width="100" align="center">
+        <template slot-scope="scope">
+          <el-button size="small" class="classitem" type="primary" plain icon="el-icon-plus" @click="handleritemAdd(scope.row)">明细</el-button>        
+        </template>
+      </el-table-column>
+
+    </el-table>
+     <!-- 明细 -->
+      <el-dialog title="供应商明细" :visible.sync="detailVisible" fullscreen center>
+        <el-form ref="detail" :model="detail" :rules="rules2" label-width="80px" size="small" label-position="right">
+          <el-card  shadow="never" >
+            <div slot="header" class="clearfix">
+              <span class="topClass">账户信息</span>
+            </div>
+            <div>
+              <div class="flex_supplier">
+                  <div class="flex_width">
+                    <span class="flex_Name">供应商名称:</span>
+                    <span class="flex_Number">{{detail.supplierName}}</span>
+                  </div>
+                  <div>
+                    <span class="flex_Name">可用余额:</span>
+                    <span class="flex_Number">{{detail.balance}}</span>
+                  </div>
+              </div>
+              <div class="flex_supplier">
+                  <div class="flex_width">
+                    <span class="flex_Name"> 累计充值:</span>
+                    <span class="flex_Number">{{detail.rechargeAmount }}</span>
+                  </div>
+                  <div>
+                    <span class="flex_Name">累计消费:</span>
+                    <span class="flex_Number">{{detail.consumeAmount}}</span>
+                  </div>
+              </div>
+            </div> 
+          </el-card> 
+             <el-card  shadow="never" >
+            <div slot="header" class="clearfix">
+              <span class="topClass">账户交易流水</span>
+            </div>
+            <div>
+              <div class="AddButton">
+              <el-button type="primary" plain icon="el-icon-plus" @click="handlerAdd(detail)">加款</el-button>
+              <!-- <el-button type="danger" plain icon="el-icon-bank-card" @click="handlerAdd">信用额度调整</el-button> -->
+              </div>
+              <div>
+                   <el-table  :data="detailTableData" 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="供应商" width="120" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.supplierName }}</el-button>
+                              </template>
+                            </el-table-column>
+                        <el-table-column label="加款金额" width="110" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.amount / 10000 }}</span>
+                              </template>
+                            </el-table-column>
+                            <el-table-column label="出款账户" width="110"  align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.paymentAccount }}</span>
+                              </template>
+                            </el-table-column>
+                              <el-table-column label="开户行"  width="170" 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="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.payer }}</span>
+                              </template>
+                            </el-table-column>
+                            <el-table-column label="凭证" width="120"  align="center">
+                              <template slot-scope="scope">
+                                <el-image 
+                                  style="width: 100px; height: 80px"
+                                  :src="scope.row.certificate" 
+                                  :preview-src-list="new Array(scope.row.certificate)">
+                                </el-image>
+                              </template>
+                            </el-table-column>
+                        
+                            
+                            <el-table-column label="加款时间" width="190" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.time }}</span>
+                              </template>
+                            </el-table-column>
+                          
+
+                            <el-table-column label="操作" fixed="right" width="200" align="center">
+                              <template slot-scope="scope">
+                                <!-- <el-button size="small" type="primary" plain icon="el-icon-plus" @click="handlerAdd(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-edit" type="danger" v-if="scope.row.undo == 0" plain @click="handleRevocation(scope.row)">撤销</el-button>
+                              </template>
+                            </el-table-column>
+                    </el-table>
+                    <div class="pagination">
+                      <el-pagination
+                        current-page.sync="info.current"
+                        :current-page="info.current"
+                        :page-sizes="[10, 20, 30, 50]"
+                        :page-size="info.size"
+                        layout="total, sizes, prev, pager, next, jumper"
+                        background
+                        :total="detailTotal"
+                        @size-change="detailHandleSizeChange"
+                        @current-change="detailHandleCurrentChange"
+                      />
+                    </div>
+              </div>
+            </div> 
+          </el-card> 
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="detailVisible = false">取 消</el-button>
+          <el-button type="primary" @click="detailVisible = false">确 定</el-button>
+        </div>
+      </el-dialog>
+
+      <!-- <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>
@@ -98,12 +289,12 @@
                   <el-button size="small" icon="el-icon-edit" type="danger" v-if="scope.row.undo == 0" plain @click="handleRevocation(scope.row)">撤销</el-button>
                 </template>
               </el-table-column>
-      </el-table>
+      </el-table> -->
         <!-- 新增加款 -->
       <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="relationId" :label-width="formLabelWidth"  >
-                <el-select v-model="dataForm.relationId" :disabled="!operation" filterable  @change="onclick(dataForm.relationId)" clearable  placeholder="请选择客户" style="width:100%">
+                <el-select v-model="dataForm.relationId" :disabled="true" filterable  @change="onclick(dataForm.relationId)" clearable  placeholder="请选择客户" style="width:100%">
                   <el-option
                     v-for="item in userList"
                     :key="item.relationId"
@@ -245,6 +436,7 @@
 
 <script>
 import api from '@/api/userList'
+import code from '@/api/channel.js'
 import { supplierPaymentList,channelList,supplierPaymentAdd,supplierPaymentAnnul,supplierPaymentEdit,bankcardList } from '@/api/channelAdd'
 export default {
   data() {
@@ -254,7 +446,7 @@ export default {
        body:{
           size:10,
           current:1,
-          relationId:""
+          // relationId:""
       },
        total:0,
       dataForm:{
@@ -282,7 +474,16 @@ export default {
         urlList:[],
         card:[],
         cardNo:"",
-        dataFormVisible:false
+        dataFormVisible:false,
+        detailVisible:false,
+        detail:{},
+        detailTableData:[],
+        info:{
+          size:10,
+          current:1,
+          relationId:""
+        },
+        detailTotal:0,
     }
   },
   created(){
@@ -341,11 +542,16 @@ export default {
     //表格数据
     reLoad(){
       this.loading = true
-      supplierPaymentList(this.body).then((res) => {
+       code.Search(this.body).then((res) => {
         this.loading =false
         this.tableData = res.data.data.records
         this.total = res.data.data.total
       })
+      // supplierPaymentList(this.body).then((res) => {
+      //   this.loading =false
+      //   this.tableData = res.data.data.records
+      //   this.total = res.data.data.total
+      // })
     },
     //查看
     hookLook(row){
@@ -354,17 +560,40 @@ export default {
       this.dataForm = code
       this.dataFormVisible = true
     },
+    //明细分页
+    handlerLook(row){
+      let info = this.info
+      let body={
+          size:info.size,
+          current:info.current,
+          relationId:row
+        }
+      supplierPaymentList(body).then((res) => {
+        this.detailTableData = res.data.data.records
+        this.detailTotal = res.data.data.total
+      })
+    },
+     //明细
+    handleritemAdd(row){
+       this.detailVisible = true,
+       this.detail = JSON.parse(JSON.stringify(row))
+       this.handlerLook(row.supplierId)
+       console.log(row)
+    },
     //新增
     handlerAdd(row){
       this.operation = true // true:新增, false:编辑
             this.dialogFormVisible = true // 控制弹出框
             let list = JSON.parse(JSON.stringify(row))
-            this.bankcardURL(list.relationId)
+            this.bankcardURL(list.supplierId)
             console.log(list)
-            this.dataForm = list
+            list.relationId=list.supplierId.toString()
+            // this.dataForm = list
+            // this.dataForm.relationId = list.supplierId
             this.dataForm.amount = ""       //加款钱
             this.dataForm.certificate = ""  //凭证
             this.dataForm.paymentAccount = ""  //出款账户
+            this.dataForm = list
             // this.dataForm = {}
             this.imgurl = ""
             this.fileList=[]   //图片
@@ -401,8 +630,10 @@ export default {
     },
     //撤销
     handleRevocation(row){
-            row.undo = 1
-            row.type = "supplier"
+       let code = JSON.parse(JSON.stringify(row))
+
+            code.undo = 1
+            code.type = "supplier"
             let that = this
             that.$confirm('是否撤销该数据', '提示', {
                 confirmButtonText: '确定',
@@ -410,13 +641,13 @@ export default {
                 type: 'warning'
             })
             .then(() => {
-                supplierPaymentAnnul(row).then((res)=>{
+                supplierPaymentAnnul(code).then((res)=>{
                      if (res.status === 200) {
                         that.$message({
                             type: 'success',
                             message: '撤销成功'
                         })
-                        that.reLoad()
+                        this.handlerLook(this.detail.supplierId)
                      } else {
                         that.$message({
                             type: 'error',
@@ -442,7 +673,7 @@ export default {
                           message: '操作成功'
                         })
                         this.dialogFormVisible = false
-                        this.reLoad()
+                        this.handlerLook(this.detail.supplierId)
                       } else {
                         this.$message({
                           type: 'error',
@@ -460,7 +691,7 @@ export default {
                           message: '操作成功'
                         })
                         this.dialogFormVisible = false
-                        this.reLoad()
+                        this.handlerLook(this.detail.supplierId)
                       } else {
                         this.$message({
                           type: 'error',
@@ -516,7 +747,16 @@ export default {
     handleCurrentChange(val) {
       this.body.current = val
       this.reLoad()
-    }
+    },
+    detailHandleSizeChange(val) {
+      this.info.size = val
+      this.handlerLook(this.detail.supplierId)
+    },
+    //换页
+    detailHandleCurrentChange(val) {
+      this.info.current = val
+      this.handlerLook(this.detail.supplierId)
+    },
   },
 
 }
@@ -526,4 +766,37 @@ export default {
 .el-upload-list__item {
   transition: none !important;
 }
+.flex_supplier{
+  width: 90%;
+  margin: 0px auto 30px;
+  display: flex;
+  flex-direction: row;
+  /* justify-content:space-evenly; */
+}
+.flex_width{
+  width: 50%;
+  margin-left: 160px;
+}
+.flex_Name{
+   font-size: 15px;
+     font-weight: 600;
+     color:rgb(87, 86, 86)
+}
+.flex_Number{
+  font-weight: 600;
+    margin-right: 20px;
+    font-weight: 500px;
+    font-size: 20px;
+    color:salmon
+}
+.AddButton{
+  display: flex;
+  justify-content:flex-end;
+  margin-right: 50px;
+  margin-bottom: 20px;
+}
+.el-card {
+    border: 0px solid #e6ebf5;
+    margin-top: 10px;
+    }
 </style>

+ 23 - 10
src/views/channel/channelGroup.vue

@@ -69,7 +69,7 @@
       <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
  
             <el-form-item label="通道组名称"  :label-width="formLabelWidth"  style="width:420px;margin:15px auto;paddingBottom:30px">
-              <el-input v-model="dataForm.groupName" :disabled="true" placeholder="请输入通道组名称" />
+              <el-input v-model="dataForm.groupName" :disabled="!operation" placeholder="请输入通道组名称" />
             </el-form-item>
             <!-- 添加产品 -->
        <el-card  shadow="hover" v-if="!operation">
@@ -96,8 +96,8 @@
           <el-table-column label="策略" width="130" align="center">
             <template slot-scope="scope" >
               <!-- <el-input v-model="scope.row.policy" @keyup.enter.native="addGroup"></el-input> -->
-              <div class="code"  v-if="selectref" @click="onpolicy(scope.row)"></div>
-              <el-select size="small"  v-model="scope.row.policy" v-if="selectref" @click.native="onpolicy(scope.row)"  @keyup.enter.native="addGroup"  placeholder="请选择运营商" style="width: 100%" >
+              <div class="code"  v-if="selectref && scope.row.distributeGroupId != null" @click="onpolicy(scope.row)"></div>
+              <el-select size="small"  v-model="scope.row.policy"  @click.native="inpolicy(scope.row)"  @change="clicktrue" @keyup.enter.native="addGroup"  placeholder="请选择" style="width: 100%" >
                   <el-option
                   v-for="item in distribute"
                   :key="item.policy"
@@ -105,21 +105,21 @@
                   :value="item.policy"
                   />
                 </el-select>
-              <el-select size="small"  v-model="scope.row.policy" v-else @click.native="inpolicy(scope.row)"  @keyup.enter.native="addGroup"  placeholder="请选择运营商" style="width: 100%" >
+              <!-- <el-select size="small"  v-model="scope.row.policy" v-else @click.native="inpolicy(scope.row)"  @keyup.enter.native="addGroup"  placeholder="请选择运营商" style="width: 100%" >
                   <el-option
                   v-for="item in distribute"
                   :key="item.policy"
                   :label="item.desc"
                   :value="item.policy"
                   />
-                </el-select>
+                </el-select> -->
               <!-- <span >{{ scope.row.policy }}</span>   -->
             </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.operator"  :disabled="scope.row.distributeGroupId != null" @keyup.enter.native="addGroup"  placeholder="请选择运营商" style="width: 90%" >
+              <el-select size="small" v-model="scope.row.operator" @change="operatorClick(scope.row)"  :disabled="scope.row.distributeGroupId != null" @keyup.enter.native="addGroup"  placeholder="请选择运营商" style="width: 90%" >
                   <el-option
                   v-for="item in dataOperator"
                   :key="item.id"
@@ -370,7 +370,8 @@ export default {
 
         //选择策略
         onpolicy(row){
-          this.selectref = false
+          this.selectref = true
+          console.log(row.distributeGroupId)
           if(row.distributeGroupId){
              this.$confirm('此操作将修改策略, 是否继续?', '提示', {
                 confirmButtonText: '确定',
@@ -380,23 +381,32 @@ export default {
                 type: 'warning'
               }).then(() => {
                  this.selectref = false
+                 console.log("确定")
               }).catch(() => {
                 this.selectref = true
               });
+          console.log(11)
           }else{
-            this.selectref = true
+            this.selectref = false
+          console.log(22)
           }
         },
+        clicktrue(){
+          this.selectref = true
+        },
         inpolicy(row){
-          this.selectref = false
+          this.selectref = true
           if(row.distributeGroupId){
           this.selectref = true
+          console.log(1)
           }else{
-            this.selectref = true
+            this.selectref = false
+            console.log(2)
           }
         },
         //添加分发组
         addGroup(row){
+            this.selectref = true
           this.group =true
           this.groupVisible = true
           if(this.dataForm.distributeGroups == null){
@@ -462,6 +472,9 @@ export default {
             //   })
             //   .catch(_ => {});
           },
+          operatorClick(row){
+            row.channels = []
+          },
           //添加分发组通道
           onAddChannel(){
             let object = {

+ 692 - 0
src/views/orderList/index1.vue

@@ -0,0 +1,692 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container" style="margin: 10px 0 10px 0">
+        <div class="flex">
+            <div class="w_input">
+                <span class="textSpan"> 订单号:</span>
+                 <el-input
+                        v-model="body.orderId"
+                        style="width:65%;"
+                        placeholder="请输入订单号"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input">
+                <span class="textSpan">客户订单号:</span>
+                 <el-input
+                        v-model="body.extorderId"
+                        style="width: 65%;"
+                        placeholder="请输入客户订单号"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input stylephone">
+                <div class="textSpan marginphone">通道订单号:</div>
+                    <el-input
+                        v-model="body.gwSeqNo"
+                        style="width: 67%;"
+                        placeholder="请输入通道订单号"
+                        size="small"
+                        clearable
+                    />
+            </div>
+        </div>
+        <div class="flex">
+            <div class="w_date">
+                <span class="textSpan">回调时间:</span>
+                <el-date-picker
+                v-model="callbackTimeEnd"
+                size="small"
+                type="datetimerange"
+                range-separator="至"
+                style="width:78%"
+                 @change="oncheckTimeStart"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                :default-time='["00:00:00","23:59:59"]'
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                >
+                </el-date-picker>
+
+            </div>
+            <div class="w_date">
+                <span class="textSpan">发送时间:</span>
+                <el-date-picker
+                v-model="applyDateStart"
+                size="small"
+                type="datetimerange"
+                style="width:80%"
+                range-separator="至"
+                 @change="oncustom"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                :default-time='["00:00:00","23:59:59"]'
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                >
+                </el-date-picker>
+
+            </div>
+            
+        </div>
+          <div class="flex">
+            <div class="w_input">
+                <span class="textSpan">通道名称:</span>
+                 <el-input
+                        v-model="body.channelName"
+                        style="width:65%;"
+                        placeholder="请输入通道名称"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input">
+                <span class="textSpan"> 订单状态:</span>
+                <el-select size="small" v-model="body.status" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
+                <el-option
+                v-for="item in status"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                />
+            </el-select>
+            </div>
+             <div class="w_input">
+                <span class="textSpan">  运营商:</span>
+                <el-select size="small" v-model="body.phoneOperator" clearable placeholder="请选择运营商" style="width: 65%" @change="changeoperator">
+                <el-option
+                v-for="item in mobileOperator"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                />
+            </el-select>
+            </div>
+        </div>
+         <div class="flex">
+            <div class="w_input">
+              <!-- <el-col :span="5"> -->
+                <span class="textSpan">  面额:</span>
+              <!-- </el-col> -->
+                
+                 <!-- <el-input
+                        v-model="flowAmount"
+                        @change="changeflow"
+                        style="width:65%;"
+                        placeholder="请输入面额"
+                        size="small"
+                        clearable
+                    /> -->
+                    <!-- <el-col :span="6"> -->
+                      <el-input
+                        v-model="flowAmount"
+                        @clear="changeflow(flowAmount)"
+                        style="width:26%"
+                        placeholder="请输入面额"
+                        size="small"
+                        clearable
+                    />
+                    <span> - </span>
+                      <el-input
+                        v-model="flowAmount1"
+                         @clear="changeflow1(flowAmount)"
+                        style="width:26%"
+                        placeholder="请输入面额"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input">
+                <span class="textSpan"> 客户名称:</span>
+                 <el-input
+                        v-model="body.customerName"
+                        style="width: 65%;"
+                        placeholder="请输入客户名称"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input">
+                <span class="textSpan">  归属地:</span>
+                 <el-input
+                        v-model="body.phoneHome"
+                        style="width: 65%;"
+                        placeholder="请选择归属地"
+                        size="small"
+                        clearable
+                    />
+            </div>
+        </div>
+        <div class="flex">
+          <div class="w_input">
+                <span class="textSpan">回调状态:</span>
+                <el-select size="small" v-model="body.callbackStatus" clearable placeholder="请选择订单状态" style="width: 65%" @change="changeScope">
+                <el-option
+                v-for="item in dealFlag"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                />
+            </el-select>
+            </div>
+             <div class="w_input stylephone">
+                <div class="textSpan marginphone">  手机号:</div>
+                    <el-input
+                      type="textarea"
+                      v-model="body.phoneNo"
+                      :autosize="{ minRows: 1.1, maxRows: 5}"
+                      class="phone"
+                      size="small"
+                      placeholder="请输入手机号"
+                      clearable
+                      >
+                    </el-input>
+                     <el-col :span="1" class="icon-list__tips">
+                    <el-tooltip placement="top" effect="light" style="padding: 10px; 0 0 0">
+                      <div slot="content">
+                        <p>手机号格式:</p>
+                        <p>多个手机号搜索以英文逗号隔开,其中不能有空格!!!</p>
+                        </div>
+                      <i class="el-icon-warning" />
+                    </el-tooltip>
+                     </el-col>
+            </div>
+            
+        </div>
+          <div class="flexend">
+            <el-button class="black-item" size="small" type="black_button" icon="el-icon-warning-outline"   @click="handleResetBlack">黑名单
+            </el-button>
+            <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" size="small" icon="el-icon-delete" type="danger" plain @click="handleReset">置失败
+            </el-button>
+            <el-button class="filter-item" size="small" type="warning" icon="el-icon-check" plain @click="handleReset">置成功
+            </el-button>
+            <el-button class="filter-item" size="small" type="success" icon="el-icon-check" plain @click="handleReset">补单
+            </el-button>
+            
+             <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" 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%" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="40"/>
+
+      <el-table-column label="订单号" width="120" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.orderId }}</span>
+        </template>
+      </el-table-column>
+
+        <!-- <el-table-column
+          label="appID"
+          width="100"
+          align="center"
+          prop="createTime"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <span>{{ scope.row.appId }}</span>
+          </template>
+        </el-table-column> -->
+      <el-table-column
+        label="客户名称"
+        width="100"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.customerName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="面额"
+        width="70"
+        align="center"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.flowAmount / 10000 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+      label="产品ID"
+        width="100"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+         <template slot-scope="scope">
+           <span>{{scope.row.packageId}}</span>
+         </template>
+      </el-table-column>
+
+       <el-table-column label="手机号码" width="110" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.phoneNo }}</span>
+        </template>
+      </el-table-column>
+
+       <el-table-column
+        label="运营商"
+        width="70"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+       >
+        <template slot-scope="scope">
+          <!-- <span>{{ scope.row.phoneOperator }}</span> -->
+          <el-tag v-if="scope.row.phoneOperator === 3" size="small">电信</el-tag>
+            <el-tag v-if="scope.row.phoneOperator === 1" size="small">移动</el-tag>
+            <el-tag v-if="scope.row.phoneOperator === 2" size="small">联通</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="归属地"
+        width="100"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.phoneHome }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="发送时间" width="170" align="center" show-overflow-tooltip> 
+         <template slot-scope="scope">
+            <i class="el-icon-time"></i>
+           <span>{{ scope.row.applyDate}}</span>
+         </template>
+      </el-table-column>
+      <el-table-column label="回调时间" width="170" align="center" show-overflow-tooltip>
+         <template slot-scope="scope">
+            <i v-if="scope.row.callbackTime" class="el-icon-time"></i>
+           <span>{{ scope.row.callbackTime}}</span>
+         </template>
+      </el-table-column>
+        <el-table-column
+          label="订单状态"
+          width="90"
+          align="center"
+          prop="createTime"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.status === 2" size="small">充值中</el-tag>
+            <el-tag v-if="scope.row.status === 1" size="small">待充值</el-tag>
+            <!-- <el-tag v-if="scope.row.status === 3" size="small">重发</el-tag> -->
+            <el-tag v-if="scope.row.status === 4" size="small" >充值失败</el-tag>
+            <!-- <el-tag v-if="scope.row.status === 5" size="small">回调</el-tag> -->
+            <el-tag v-if="scope.row.status === 6" size="small">充值成功</el-tag>
+          </template> 
+        </el-table-column>
+
+        <el-table-column
+        label="用时"
+        width="90"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.usedTime }}</span>
+        </template>
+      </el-table-column>
+           <el-table-column
+        label="回调状态"
+        width="90"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <!-- <span>{{ scope.row.dealFlag }}</span> -->
+          <el-tag v-if="scope.row.callbackStatus === 6" size="small">成功</el-tag>
+          <el-tag v-if="scope.row.callbackStatus === 4" size="small">失败</el-tag>
+        </template> 
+      </el-table-column>
+       
+      <el-table-column
+        label="通道名称"
+        width="90"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row.channelName }}</span>
+        </template>
+         </el-table-column>
+      <el-table-column label="客户订单号" width="120" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.extorderId }}</span>
+        </template>
+      </el-table-column>   
+      <el-table-column label="通道订单号" width="120" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.gwSeqNo }}</span>
+        </template>
+      </el-table-column>   
+
+      <el-table-column label="通道错误代码" width="120" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.gwErrorCode }}</span>
+        </template>
+      </el-table-column>   
+      <el-table-column label="通道错误原因" width="120" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.gwStatus }}</span>
+        </template>
+      </el-table-column>   
+        
+    </el-table>
+
+     <!--分页-->
+    <div class="pagination">
+          <el-pagination
+          current-page.sync="body.page"
+          @size-change="handleSizeChange"
+          :current-page="body.page"
+          @current-change="handleCurrentChange"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="body.size"
+          layout="total, sizes, prev, pager, next, jumper"
+          background
+          :total="total">
+        </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@/api/blackList.js'
+import { ordersearch,setOrderStatus } from '@/api/orderList'
+export default {
+  data() {
+    return {
+      Name: '',
+      // phone:true,    //控制批量手机号
+      tableData:[],
+     applyDateStart:"",  //发送时间
+     callbackTimeEnd:"",  //回调时间
+     flowAmount:"",   //面额乘以10000
+     flowAmount1:"",   //面额乘以10000
+     body:{
+          Id:"",
+          gwSeqNo:"",
+          orderId:"",
+          extorderId:"",
+          phoneNo:"",
+          applyDateStart:"",
+          applyDateEnd:"",
+          customerName:"",
+          channelIdDesc:"",
+          phoneHome:"",
+          status:"",
+          phoneOperator:"",
+          flowAmount:"",
+          callbackTimeStart:"",
+          callbackTimeEnd:"",
+          callbackStatus:"",
+          mobileHome:"",
+          page:1,
+          size:10,
+      },
+      total:0,   //总数据
+      loading:false,
+      status:[
+        // 1-待充值 2-充值中  3-重发  4-失败  6-成功
+        { id: 1, name: '待充值' },
+        { id: 2, name: '充值中' },
+        { id: 3, name: '重发' },
+        { id: 4, name: '失败' },
+        { id: 6, name: '成功' },
+      ],
+      mobileOperator:[
+          {id:1,name:"移动"},
+          {id:2,name:"联通"},
+          {id:3,name:"电信"},
+      ],
+      dealFlag:[
+        {id:"6",name:"成功"},        
+        {id:"4",name:"失败"},
+      ],
+      ArryList:[],
+    }
+  },
+  created(){
+      let nowDate = new Date()
+  let date = {
+    year: nowDate.getFullYear(),
+    month: nowDate.getMonth() + 1,
+    date: nowDate.getDate()
+  }
+  let systemTime = date.year + '-' + date.month + '-' + date.date
+  // this.body.applyDateStart = "2021-05-14 + " 00:00:00"
+  this.applyDateStart = [systemTime + " 00:00:00",systemTime + " 23:59:59"]
+  this.body.applyDateStart = systemTime + " 00:00:00"
+  this.body.applyDateEnd = systemTime + " 23:59:59"
+  // this.body.applyDateEnd = systemTime + " 23:59:59"
+  // this.
+  this.getTenantList()
+  },
+  methods: {
+    //获取数据
+    getTenantList(){
+      this.loading=true
+        ordersearch(this.body).then(res=>{
+          this.loading=false
+          // this.tableData=res.data.data.records
+          // limitedDate :发送时间
+          // lastModifyDate :回调
+          // usedTime   :用时
+          let tableData=res.data.data.records
+          let arry=tableData.map((res)=>{
+             if(res.callbackTime != null && res.callbackTime != ""){
+                let limitedDate = res.applyDate
+                let lastModifyDate =res.callbackTime
+                 //发送时间 减去  回调时间
+                 let date = new Date(limitedDate)
+                 let time= date.valueOf()
+                 let modify =new Date(lastModifyDate)
+                 let last = modify.valueOf()
+                 let  used = last - time
+                res.usedTime = used / 1000
+                console.log(limitedDate)
+                console.log(lastModifyDate)
+                console.log(used)
+             }
+             return res
+          })
+          this.tableData=arry
+          // console.log(arry)
+          this.total=res.data.data.total
+          // console.log(res.data.data.records)
+        })
+    },
+    //多选
+    handleSelectionChange(row){
+      this.ArryList = row
+    },
+    //搜索手机号
+    onphon(){
+      console.log(this.phone)
+    },
+      //清除面额
+      changeflow(flow){
+        this.flowAmount = ""
+
+      },
+      //清除面额
+      changeflow1(flow){
+        this.flowAmount1 = ""
+
+      },
+      //搜索发送时间
+     oncustom(){
+          let applyDateStart = this.applyDateStart;
+          this.body.applyDateStart = applyDateStart[0]
+          this.body.applyDateEnd = applyDateStart[1]
+          // console.log(applyDateStart)
+          // console.log(this.body.applyDateStart)
+      },
+      //搜索回调时间
+      oncheckTimeStart(){
+        // checkTimeStart:"",
+        //   checkTimeEnd:"",
+        let callbackTimeStart =this.callbackTimeEnd
+        this.body.callbackTimeStart= callbackTimeStart[0]
+          this.body.callbackTimeEnd	=callbackTimeStart[1]
+      },
+      //搜索状态
+      changeScope(){
+          console.log(this.body.status)
+      },
+      //运营商
+      changeoperator(){
+          console.log(this.body.mobileOperator)
+      },
+      //搜索
+      handleSearch(){
+        this.body.page = 1
+        if(this.applyDateStart == null){ //发送时间为空时清空 body 里的发送时间
+          this.body.applyDateEnd = ""
+          this.body.applyDateStart = ""
+        }
+        if(this.callbackTimeEnd == null){ //回调时间
+          this.body.callbackTimeStart = ""
+          this.body.callbackTimeEnd = ""
+        }
+        //面额前后为空判断
+        let flowAmount=this.flowAmount * 10000;
+        let flowAmount1=this.flowAmount1 * 10000;
+        if(this.flowAmount1 != "" && this.flowAmount != ""){   //面额
+          this.body.flowAmount = flowAmount  + "-" + flowAmount1 
+        }
+       if(this.flowAmount == "" && this.flowAmount1 == ""){
+          this.body.flowAmount = ""
+          // console.log(this.body.flowAmount)
+        }
+        else if(this.flowAmount == ""){   //面额
+          this.body.flowAmount = 0 + "-" + flowAmount1 
+        }
+        else if(this.flowAmount1 == ""){
+          this.body.flowAmount = flowAmount + "-" + 10000000
+        }
+        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(){
+
+      },
+      //分页
+      handleSizeChange:function(val){
+        this.body.size=val
+        this.getTenantList()
+      },
+       // 换页
+    handleCurrentChange: function(val) {
+      this.body.page = val
+      this.getTenantList()
+    },
+  },
+}
+</script>
+
+<style scoped>
+ .textSpan{
+   position: relative;
+   top: 0;
+     font-size: 14px;
+     font-weight: 600;
+     color:rgb(87, 86, 86)
+ }
+ .stylephone{
+    display: flex;   
+ }
+ .marginphone{
+   padding-top: 9px;
+ }
+ .flex{
+     width: 100%;
+     display: flex;
+     flex-direction: row;
+     margin-bottom: 10px;
+     /* flex-wrap: wrap; */
+     /* justify-content: space-evenly; */
+ }
+ .w_date{
+     width: 66%;
+ }
+ .w_input{
+     width:33.33%;
+ }
+ .flexend{
+   display: flex;
+   justify-content: flex-end;
+   padding-top:20px;
+   padding-right: 40px;
+ }
+ .phone{
+   width:66.5% !important ;
+   z-index: 100;
+ }
+ /* .classitem{
+   background: salmon;
+ } */
+ .black-item{
+    background: #19191b25;
+    color: rgba(22, 22, 22, 0.651);
+    border: 1px solid #2d2d361e;
+ }
+ .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>

+ 131 - 85
src/views/product/setting.vue

@@ -10,7 +10,7 @@
             v-model="body.operator"
             clearable
             placeholder="请选择运营商"
-            style="width: 65%"
+            style="width: 60%"
             @change="changeoperator"
           >
             <el-option
@@ -22,10 +22,10 @@
           </el-select>
         </div>
         <div class="w_input">
-          <span class="textSpan"> 面额:</span>
+          <span class="textSpan">面额:</span>
           <el-input
             v-model="body.facePrice"
-            style="width: 65%;"
+            style="width: 60%;"
             placeholder="请输入面额"
             size="small"
             clearable
@@ -33,13 +33,13 @@
           />
         </div>
         <div class="w_input">
-          <span class="textSpan"> 维护状态:</span>
+          <span class="textSpan">     维护状态:</span>
           <el-select
             size="small"
             v-model="body.status"
             clearable
             placeholder="请选择维护状态"
-            style="width: 65%"
+            style="width: 60%"
             @change="changeScope"
           >
             <el-option
@@ -53,13 +53,13 @@
       </div>
       <div class="flex">
         <div class="w_input">
-          <span class="textSpan"> 地区:</span>
+          <span class="textSpan"> 地区:</span>
           <el-select
             size="small"
             v-model="body.province"
             clearable
             placeholder="请选择产品地区"
-            style="width: 65%"
+            style="width: 60%"
             @change="changeProvince"
           >
             <el-option
@@ -70,27 +70,39 @@
             />
           </el-select>
         </div>
-        <div class="w_input">
-          <span class="textSpan">开始时间:</span>
+        <div class="w_date">
+          <span class="textSpan">时间:</span>
           <el-date-picker
-            v-model="body.startTime"
-            type="datetime"
+            v-model="body.callbackTime"
+            size="small"
+            type="datetimerange"
+            range-separator="至"
+            style="width:83%"
+            @change="oncheckTimeStart"
             value-format="yyyy-MM-dd HH:mm:ss"
-            placeholder="选择开始时间"
-            style="width: 65%"
+            :default-time="['00:00:00', '23:59:59']"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            clearable
           >
           </el-date-picker>
         </div>
-        <div class="w_input">
-          <span class="textSpan">结束时间:</span>
-          <el-date-picker
-            v-model="body.endTime"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            type="datetime"
-            placeholder="选择结束时间"
-            style="width: 65%"
+         <div class="w_input">
+          <span class="textSpan"> 维护范围:</span>
+          <el-select
+            size="small"
+            v-model="body.rechargeType"
+            clearable
+            placeholder="请选择维护范围"
+            style="width: 60%"
           >
-          </el-date-picker>
+            <el-option
+              v-for="item in rechargeStatus"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            />
+          </el-select>
         </div>
       </div>
       <!-- 按钮----查找  重置  新增  -->
@@ -154,8 +166,8 @@
           <template slot-scope="scope">
             <!-- <el-tag>{{ scope.row.operator }}</el-tag> -->
             <el-tag v-if="scope.row.operator == 3" size="small">电信</el-tag>
-          <el-tag v-if="scope.row.operator == 1" size="small">移动</el-tag>
-           <el-tag v-if="scope.row.operator == 2" size="small">联通</el-tag> 
+            <el-tag v-if="scope.row.operator == 1" size="small">移动</el-tag>
+            <el-tag v-if="scope.row.operator == 2" size="small">联通</el-tag>
           </template>
         </el-table-column>
 
@@ -191,10 +203,14 @@
             <span>{{ scope.row.endTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="充值方式 " align="center" show-overflow-tooltip>
+        <el-table-column label="维护范围 " align="center" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-tag v-if="scope.row.status === 0" size="small">快充</el-tag>
-            <el-tag v-if="scope.row.status === 1" size="small">慢充</el-tag>
+            <el-tag v-if="scope.row.rechargeType === 1" size="small"
+              >快充</el-tag
+            >
+            <el-tag v-if="scope.row.rechargeType === 2" size="small"
+              >慢充</el-tag
+            >
           </template>
         </el-table-column>
         <el-table-column label="维护状态" align="center" show-overflow-tooltip>
@@ -283,7 +299,7 @@
         </el-pagination>
       </div>
       <!-- 添加或修改对话框 -->
-                   
+
       <el-dialog
         :title="operation ? '新增' : '编辑'"
         :visible.sync="dialogFormVisible"
@@ -298,23 +314,31 @@
           size="small"
           label-position="right"
         >
-          <el-form-item label="开始时间" :label-width="formLabelWidth" prop="startTime">
+          <el-form-item
+            label="开始时间"
+            :label-width="formLabelWidth"
+            prop="startTime"
+          >
             <el-date-picker
               v-model="dataForm.startTime"
               value-format="yyyy-MM-dd HH:mm:ss"
               type="datetime"
               style="width: 90%;"
-              placeholder="选择开始时间"  
+              placeholder="选择开始时间"
             >
             </el-date-picker>
           </el-form-item>
-              <el-form-item label="结束时间" :label-width="formLabelWidth " prop="endTime">
+          <el-form-item
+            label="结束时间"
+            :label-width="formLabelWidth"
+            prop="endTime"
+          >
             <el-date-picker
               v-model="dataForm.endTime"
               value-format="yyyy-MM-dd HH:mm:ss"
               type="datetime"
               style="width: 90%;"
-              placeholder="选择结束时间" 
+              placeholder="选择结束时间"
             >
             </el-date-picker>
           </el-form-item>
@@ -330,7 +354,7 @@
               clearable
               placeholder="请选择所属地区"
               style="width: 90%"
-              :disabled="operation==false"
+              :disabled="operation == false"
             >
               <el-option
                 v-for="item in provinceList"
@@ -341,7 +365,7 @@
             </el-select>
           </el-form-item>
 
-            <el-form-item
+          <el-form-item
             label="运营商"
             :label-width="formLabelWidth"
             prop="operator"
@@ -351,7 +375,7 @@
               v-model="dataForm.operator"
               placeholder="请选择运营商"
               style="width: 90%"
-              :disabled="operation==false"
+              :disabled="operation == false"
             >
               <el-option
                 v-for="item in mobileOperator"
@@ -371,28 +395,28 @@
               v-model.trim="dataForm.facePrice"
               style="width: 90%;"
               placeholder="请输入面额"
-              :disabled="operation==false"
+              :disabled="operation == false"
             />
           </el-form-item>
-          
+
           <el-form-item
-            label="充值方式"
+            label="维护范围"
             :label-width="formLabelWidth"
-            prop="czMethod"
+            prop="rechargeType"
           >
             <el-select
               size="small"
-              v-model="dataForm.czMethod"
-              placeholder="请选择充值方式"
+              v-model="dataForm.rechargeType"
+              placeholder="请选择维护范围"
               style="width:90%"
-              :disabled="operation==false"
+              :disabled="operation == false"
             >
               <el-option
-              v-for="item in method"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            />
+                v-for="item in rechargeStatus"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
           </el-form-item>
           <el-form-item
@@ -407,14 +431,13 @@
               style="width:90%"
             >
               <el-option
-              v-for="item in status"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            />
+                v-for="item in status"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
           </el-form-item>
-
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -426,13 +449,7 @@
 </template>
 
 <script>
-import {
-  MaintSearch,
-  province,
-  MaintAdd,
-  ProductEdit,
-  MaintDel
-} from "@/api/product";
+import { MaintSearch, province, MaintAdd, MaintDel } from "@/api/product";
 export default {
   data() {
     return {
@@ -440,37 +457,54 @@ export default {
       body: {
         facePrice: "", //面额
         operator: "", //运营商
+        callbackTime: "", //时间范围
         startTime: "", //开始维护时间
         endTime: "", //结束维护时间
         province: "", //地区
         status: "", //维护状态
+        rechargeType:"",//维护范围
         current: 1, //当前页码
         size: 10, //每页记录条数
         orderType: "" //维护类型
       },
+      // callbackTime: "", //时间范围
       //表格里的数据
-      callbackTime: "", //时间范围
       provinceList: [], //地区
       status: [{ id: 0, name: "未维护" }, { id: 1, name: "已维护" }],
+      rechargeStatus: [{ id: 1, name: "快充" }, { id: 2, name: "慢充" }], //充值方式
       //运营商
       mobileOperator: [
-        { id: 1, name: "移动" },
-        { id: 3, name: "电信" },
-        { id: 2, name: "联通" }
+        { id: "1", name: "移动" },
+        { id: "3", name: "电信" },
+        { id: "2", name: "联通" }
       ],
       tableData: [], //后台请求回的数据
       operation: false, // true:新增, false:编辑
       dialogFormVisible: false, // 控制弹出框
       formLabelWidth: "120px", //新增宽度
       rules2: {
-        orderType: [{ required: true, message: "请选择维护类型", trigger: "blur" }],
-        operator: [{ required: true, message: "请选择运营商", trigger: "blur" }],
-        province: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
+        orderType: [
+          { required: true, message: "请选择维护类型", trigger: "blur" }
+        ],
+        operator: [
+          { required: true, message: "请选择运营商", trigger: "blur" }
+        ],
+        province: [
+          { required: true, message: "请选择所属地区", trigger: "blur" }
+        ],
         facePrice: [{ required: true, message: "请输入面额", trigger: "blur" }],
-        status: [{ required: true, message: "请输入维护状态", trigger: "blur" }],
-        startTime: [{ required: true, message: "请输入开始时间", trigger: "blur" }],
-        endTime: [{ required: true, message: "请输入结束时间", trigger: "blur" }],
-        // czMethod: [{ required: true, message: "请选择充值方式", trigger: "blur" }]    //充值方式
+        status: [
+          { required: true, message: "请输入维护状态", trigger: "blur" }
+        ],
+        startTime: [
+          { required: true, message: "请输入开始时间", trigger: "blur" }
+        ],
+        endTime: [
+          { required: true, message: "请输入结束时间", trigger: "blur" }
+        ],
+        rechargeType: [
+          { required: true, message: "请选择维护范围", trigger: "blur" }
+        ] //充值方式
       },
       relues: {},
       //新增   编辑里的数据
@@ -478,10 +512,10 @@ export default {
         facePrice: "",
         province: "",
         operator: "",
-        // orderType: "",
-        startTime: "",//开始维护时间
-        endTime: "",//结束维护时间
-        status:""
+        rechargeType: "",
+        startTime: "", //开始维护时间
+        endTime: "", //结束维护时间
+        status: ""
       },
       total: 0,
       loading: false
@@ -499,6 +533,7 @@ export default {
       params.append("facePrice", this.body.facePrice);
       params.append("operator", this.body.operator);
       params.append("orderType", this.body.orderType);
+      params.append("rechargeType", this.body.rechargeType);
       params.append("province", this.body.province);
       params.append("status", this.body.status);
       params.append("startTime", this.body.startTime);
@@ -529,6 +564,11 @@ export default {
     //搜索
     handleSearch() {
       this.body.current = 1;
+      if (this.body.callbackTime == null) {
+        //发送时间为空时清空 body 里的发送时间
+        this.body.startTime = "";
+        this.body.endTime = "";
+      }
       this.getTenantList();
     },
     //重置
@@ -541,10 +581,10 @@ export default {
         facePrice: "",
         province: "",
         operator: "",
-        // orderType: "",
-        startTime:"",
-        endTime:"",
-        status:""
+        rechargeType: "",
+        startTime: "",
+        endTime: "",
+        status: ""
       };
       if (this.$refs["dataForm"]) {
         this.$refs["dataForm"].resetFields();
@@ -561,7 +601,6 @@ export default {
       if (this.$refs["dataForm"]) {
         this.$refs["dataForm"].resetFields();
       }
-
     },
     //新增或修改API
     submitForm() {
@@ -584,8 +623,7 @@ export default {
                 });
               }
             });
-          } 
-          else {
+          } else {
             console.log(this.dataForm);
             //   // 添加
             MaintAdd(this.dataForm).then(response => {
@@ -632,7 +670,8 @@ export default {
           let info = {
             facePrice: row.facePrice,
             province: row.province,
-            operator: row.operator
+            operator: row.operator,
+            rechargeType: row.rechargeType
           };
           console.log(info, "info");
           MaintDel(info).then(res => {
@@ -658,6 +697,14 @@ export default {
           // });
         });
     },
+    //时间范围
+    oncheckTimeStart() {
+      if (this.body.callbackTime !== null) {
+        this.body.startTime = this.body.callbackTime[0];
+        console.log(this.body.callbackTime);
+        this.body.endTime = this.body.callbackTime[1];
+      }
+    },
     //订单状态
     changeScope() {
       console.log(this.body.status);
@@ -675,7 +722,6 @@ export default {
       console.log(this.body.province);
     },
 
-
     //分页
     handleSizeChange: function(val) {
       this.body.size = val;
@@ -692,7 +738,7 @@ export default {
 
 <style scoped>
 .flex {
-  width: 90%;
+  width: 95%;
   display: flex;
   flex-direction: row;
   margin-bottom: 10px;

+ 30 - 7
src/views/userList/access.vue

@@ -166,16 +166,10 @@
                 </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-           <el-form-item label="Ip白名单" :label-width="formLabelWidth"  >
-            <el-input v-model="dataForm.ipAddress" />
-            </el-form-item>
-          </el-col>
-         
 
         </el-row>
 
-        <el-row :gutter="20" v-for="element in dataForm.ipWhiteListList" :key="element.id" > 
+        <el-row :gutter="20" v-for="(element,index) in dataForm.ipWhiteListList" :key="element.id" > 
             <el-col :span="12">
                 <el-form-item label="Ip地址" :label-width="formLabelWidth">
                     <el-input  v-model="element.ipAddr"></el-input>                     
@@ -188,6 +182,9 @@
                 <el-input  type="textarea" :autosize="{ minRows: 2, maxRows: 5}" v-model="element.des" />
                 </el-form-item>
             </el-col>  
+            <el-col :span="2">
+              <el-button type="danger" plain icon="el-icon-delete" circle  @click="priceDelete(element,index,$event)"></el-button>
+            </el-col>  
             <el-col :span="1" class="icon-list__tips">
             <el-tooltip placement="top" effect="light" style="padding: 10px; 0 0 0">
             <div slot="content">
@@ -325,6 +322,32 @@ export default {
                 });          
             });
         },
+              //删除分发组
+          priceDelete(row,index,e){
+            // row.splice(index,1)
+            console.log(index)
+              this.$confirm('是否删除该IP', '提示', {
+                      confirmButtonText: '确定',
+                      cancelButtonText: '取消',
+                      type: 'warning'
+                    }).then(()=>{       
+                this.dataForm.ipWhiteListList.splice(index,1)
+                            this.$message({
+                                type: 'success',
+                                message: '删除成功'
+                              })
+                    }).catch(() => {
+                    this.$message({
+                      type: 'info',
+                      message: '已取消'
+                    });          
+              }); 
+              let target=e.target;
+            if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
+              target = e.target.parentNode;
+            }
+            target.blur(); 
+          },
         ModifyEdit(row){
             console.log(row)
             this.channelGroupId = row.channelId

+ 389 - 96
src/views/userList/account.vue

@@ -2,18 +2,216 @@
   <div class="app-container">
       <div class="filter-container" style="margin: 10px 0 10px 0">
         <span class="textSpan">客户名称:</span>
-        <el-select v-model="body.relationId" filterable  clearable  placeholder="请选择">
+        <el-select v-model="body.customerName" filterable  clearable  placeholder="请选择">
         <el-option
           v-for="item in userList"
           :key="item.relationId"
           :label="item.customerName"
-          :value="item.relationId">   
+          :value="item.customerName">   
         </el-option>
       </el-select>
         <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
       </div>
       <!-- 列表 -->
-      <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+       <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+
+      <el-table-column label="序号" width="60" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+
+      <el-table-column label="客户名称" width="150" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.customerName }}</span>
+          <!-- <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.customerName }}</el-button> -->
+        </template>
+      </el-table-column>
+
+
+      <el-table-column label="状态" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status === 1" >正常</el-tag>
+          <el-tag v-if="scope.row.status === 2" type="warning">暂停</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="客户简称" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span type="text" >{{ scope.row.shorterName }}</span>
+          <!-- <el-button type="text" @click="productLook(scope.row)">{{ scope.row.shorterName }}</el-button> -->
+        </template>
+      </el-table-column>
+
+      <el-table-column label="帐号余额" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.balance }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="授信额度" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.creditAmount }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="当前费用" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.currentAmount }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="创建时间" width="150" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.createTime }}</span>
+        </template>
+      </el-table-column>
+
+
+      <el-table-column label="操作" fixed="right" width="131" align="center">
+        <template slot-scope="scope">
+          <el-button size="small" class="classitem" type="primary" plain icon="el-icon-plus" @click="handleritemAdd(scope.row)">明细</el-button>        
+          <!-- <el-button size="small" class="classitem" type="primary" plain icon="el-icon-plus" @click="handlerAdd(scope.row)">明细</el-button>         -->
+        </template>
+      </el-table-column>
+
+    </el-table>
+
+       <el-dialog title="客户明细" :visible.sync="detailVisible" fullscreen center>
+        <el-form ref="detail" :model="detail" :rules="rules2" label-width="80px" size="small" label-position="right">
+          <el-card  shadow="never" >
+            <div slot="header" class="clearfix">
+              <span class="topClass">账户信息</span>
+            </div>
+            <div>
+              <div class="flex_supplier">
+                  <div class="flex_width">
+                    <span class="flex_Name">客户名称:</span>
+                    <span class="flex_Number">{{detail.customerName}}</span>
+                  </div>
+                  <div>
+                    <span class="flex_Name">账户余额:</span>
+                    <span class="flex_Number">{{detail.balance}}</span>
+                  </div>
+              </div>
+              <div class="flex_supplier">
+                  <div class="flex_width">
+                    <span class="flex_Name">授信额度:</span>
+                    <span class="flex_Number">{{detail.creditAmount}}</span>
+                  </div>
+                  <div>
+                    <span class="flex_Name">当前费用:</span>
+                    <span class="flex_Number">{{detail.currentAmount}}</span>
+                  </div>
+              </div>
+            </div> 
+          </el-card> 
+             <el-card  shadow="never" >
+            <div slot="header" class="clearfix">
+              <span class="topClass">账户交易流水</span>
+            </div>
+            <div>
+              <div class="AddButton">
+              <el-button type="primary" plain icon="el-icon-plus" @click="handlerAdd(detail)">加款</el-button>
+              <!-- <el-button type="danger" plain icon="el-icon-bank-card" @click="handlerAdd">信用额度调整</el-button> -->
+              </div>
+              <div>
+                   <el-table  :data="detailTableData" 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="客户" width="120" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <!-- <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.customerName }}</el-button> -->
+                                <span>{{scope.row.customerName}}</span>
+                              </template>
+                            </el-table-column>
+                        <el-table-column label="加款金额" width="110" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.amount / 10000 }}</span>
+                              </template>
+                            </el-table-column>
+                          
+                              <el-table-column label="出款账户" width="110"  align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.paymentAccount }}</span>
+                              </template>
+                            </el-table-column>
+                              <el-table-column label="开户行"  width="170" 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="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.payer }}</span>
+                              </template>
+                            </el-table-column>
+                            <el-table-column label="凭证" width="120"  align="center">
+                              <template slot-scope="scope">
+                                <el-image 
+                                  style="width: 100px; height: 80px"
+                                  :src="scope.row.certificate" 
+                                  :preview-src-list="new Array(scope.row.certificate)">
+                                </el-image>
+                              </template>
+                            </el-table-column>
+                        
+                            
+                            <el-table-column label="加款时间" width="190" align="center" show-overflow-tooltip>
+                              <template slot-scope="scope">
+                                <span>{{ scope.row.time }}</span>
+                              </template>
+                            </el-table-column>
+                          
+
+                            <el-table-column label="操作" fixed="right" min-width="200" align="center">
+                              <template slot-scope="scope">
+                                <!-- <el-button size="small" class="classitem" type="primary" plain icon="el-icon-plus" @click="handlerAdd(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-edit" type="danger" v-if="scope.row.undo == 0" plain @click="handleRevocation(scope.row)">撤销</el-button>
+                              </template>
+                            </el-table-column>
+                    </el-table>
+                    <div class="pagination">
+                      <el-pagination
+                        current-page.sync="info.current"
+                        :current-page="info.current"
+                        :page-sizes="[10, 20, 30, 50]"
+                        :page-size="info.size"
+                        layout="total, sizes, prev, pager, next, jumper"
+                        background
+                        :total="detailTotal"
+                        @size-change="detailHandleSizeChange"
+                        @current-change="detailHandleCurrentChange"
+                      />
+                    </div>
+              </div>
+            </div> 
+          </el-card> 
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="detailVisible = false">取 消</el-button>
+          <el-button type="primary" @click="detailVisible = false">确 定</el-button>
+        </div>
+      </el-dialog>
+
+
+      <!-- <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>
@@ -98,90 +296,94 @@
                   <el-button size="small" icon="el-icon-edit" type="danger" v-if="scope.row.undo == 0" plain @click="handleRevocation(scope.row)">撤销</el-button>
                 </template>
               </el-table-column>
-      </el-table>
+      </el-table> -->
+      
         <!-- 新增加款 -->
-      <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="relationId" :label-width="formLabelWidth"  >
-                <el-select v-model="dataForm.relationId" :disabled="!operation" filterable @change="onclick(dataForm.relationId)"  clearable  placeholder="请选择客户" style="width:100%">
-                  <el-option
-                    v-for="item in userList"
-                    :key="item.relationId"
-                    :label="item.customerName"
-                    :value="item.relationId">
-                  </el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="银行卡" prop="cardNo"  :label-width="formLabelWidth"  >
-                 <el-select v-model="dataForm.cardNo" filterable :disabled="!operation" clearable  placeholder="请选择银行卡" value-key="id" @change="changeSel" style="width:100%">
-                  <el-option
-                    v-for="item in card"
-                    :key="item.id"
-                    :label="item.cardNo"
-                    :value="item">
-                  </el-option>
-                </el-select>
-              </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" :disabled="!operation" placeholder="请输入加款金额" />
-              </el-form-item>
-               <el-form-item label="出款账户" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.paymentAccount" :disabled="!operation" 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 :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="relationId" :label-width="formLabelWidth"  >
+                  <el-select v-model="dataForm.relationId" :disabled="true" filterable @change="onclick(dataForm.relationId)"  clearable  placeholder="请选择客户" style="width:100%">
+                    <el-option
+                      v-for="item in userList"
+                      :key="item.relationId"
+                      :label="item.customerName"
+                      :value="item.relationId">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="银行卡" prop="cardNo"  :label-width="formLabelWidth"  >
+                  <el-select v-model="dataForm.cardNo" filterable :disabled="!operation" clearable  placeholder="请选择银行卡" value-key="id" @change="changeSel" style="width:100%">
+                    <el-option
+                      v-for="item in card"
+                      :key="item.id"
+                      :label="item.cardNo"
+                      :value="item">
+                    </el-option>
+                  </el-select>
+                </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" :disabled="!operation" placeholder="请输入加款金额" />
+                </el-form-item>
+                <el-form-item label="出款账户" :label-width="formLabelWidth"  >
+                  <el-input v-model="dataForm.paymentAccount" :disabled="!operation" 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" width="75%" :modal="false">
+                  <img width="100%" :src="dialogImageUrl" >
+                  </el-dialog>
+                  </el-form-item> 
                 
-                <el-dialog :visible.sync="dialogDspaly" width="75%" :modal="false">
-                <img width="100%" :src="dialogImageUrl" >
-                </el-dialog>
-                </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>
+                  <!-- <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>
+
+
+
         <!-- 详情 -->
       <el-dialog title="详情" :visible.sync="dataFormVisible" width="55%" center>
         <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
@@ -253,7 +455,7 @@ export default {
        body:{
           size:10,
           current:1,
-          customerId:""
+          // customerId:""
       },
        total:0,
       dataForm:{
@@ -281,7 +483,16 @@ export default {
         urlList:[],
         card:[],
         cardNo:"",
-        dataFormVisible:false
+        dataFormVisible:false,
+        detailVisible:false,
+        detail:{},
+        detailTableData:[],
+        info:{
+          size:10,
+          current:1,
+          // relationId:""
+        },
+        detailTotal:0,
     }
   },
   created(){
@@ -338,11 +549,16 @@ export default {
     //表格数据
     reLoad(){
       this.loading = true
-      api.account.Search(this.body).then((res) => {
+       api.index.Search(this.body).then((res) => {
         this.loading =false
         this.tableData = res.data.data.records
         this.total = res.data.data.total
       })
+      // api.account.Search(this.body).then((res) => {
+      //   this.loading =false
+      //   this.tableData = res.data.data.records
+      //   this.total = res.data.data.total
+      // })
     },
     //查看
     hookLook(row){
@@ -351,17 +567,54 @@ export default {
       this.dataForm = code
       this.dataFormVisible = true
     },
+    //明细分页
+    handlerLook(row){
+      let info = this.info
+      let body={
+          size:info.size,
+          current:info.current,
+          relationId:row
+        }
+       api.account.Search(body).then((res) => {
+        this.detailTableData = res.data.data.records
+        this.detailTotal = res.data.data.total
+      })
+    },
+    //明细
+    handleritemAdd(row){
+       this.detailVisible = true,
+       this.detail = JSON.parse(JSON.stringify(row))
+       this.handlerLook(this.detail.customerId)
+       console.log(row)
+    },
+     //新增
+    handleradd(row){
+      this.operation = true // true:新增, false:编辑
+            this.dialogFormVisible = true // 控制弹出框
+            let list = JSON.parse(JSON.stringify(row))
+            console.log(list)
+            this.dataForm = list
+            // this.dataForm = {}
+            this.imgurl = ""
+            this.fileList=[]   //图片
+            this.card = []    //银行卡
+            this.cardNo = ""
+            if(this.$refs['dataForm']){
+                 this.$refs['dataForm'].resetFields();
+            }
+    },
     //新增
     handlerAdd(row){
       this.operation = true // true:新增, false:编辑
             this.dialogFormVisible = true // 控制弹出框
             let list = JSON.parse(JSON.stringify(row))
-            this.bankcardURL(list.relationId)
+            this.bankcardURL(list.customerId)
             console.log(list)
-            this.dataForm = list
+            list.relationId=list.customerId.toString()
             this.dataForm.amount = ""       //加款钱
             this.dataForm.certificate = ""  //凭证
             this.dataForm.paymentAccount = ""  //出款账户
+            this.dataForm = list
             this.imgurl = ""
             this.fileList=[]   //图片
             this.cardNo = ""
@@ -412,7 +665,7 @@ export default {
                             type: 'success',
                             message: '撤销成功'
                         })
-                        that.reLoad()
+                      this.handlerLook(this.detail.customerId)
                      } else {
                         that.$message({
                             type: 'error',
@@ -438,7 +691,7 @@ export default {
                           message: '操作成功'
                         })
                         this.dialogFormVisible = false
-                        this.reLoad()
+                        this.handlerLook(this.detail.customerId)
                       } else {
                         this.$message({
                           type: 'error',
@@ -449,8 +702,6 @@ export default {
                   } else {
                     console.log(this.dataForm)
                   //   // 添加
-                
-
                     api.account.paymentAdd(dataForm).then(response => {
                       if (response.status === 200) {
                         this.$message({
@@ -458,7 +709,7 @@ export default {
                           message: '操作成功'
                         })
                         this.dialogFormVisible = false
-                        this.reLoad()
+                        this.handlerLook(this.detail.customerId)
                       } else {
                         this.$message({
                           type: 'error',
@@ -514,7 +765,16 @@ export default {
     handleCurrentChange(val) {
       this.body.current = val
       this.reLoad()
-    }
+    },
+     detailHandleSizeChange(val) {
+      this.info.size = val
+      this.handlerLook(this.detail.customerId)
+    },
+    //换页
+    detailHandleCurrentChange(val) {
+      this.info.current = val
+      this.handlerLook(this.detail.customerId)
+    },
   },
 
 }
@@ -524,4 +784,37 @@ export default {
 .el-upload-list__item {
   transition: none !important;
 }
+.flex_supplier{
+  width: 90%;
+  margin: 0px auto 30px;
+  display: flex;
+  flex-direction: row;
+  /* justify-content:space-evenly; */
+}
+.flex_width{
+  width: 50%;
+  margin-left: 160px;
+}
+.flex_Name{
+   font-size: 15px;
+     font-weight: 600;
+     color:rgb(87, 86, 86)
+}
+.flex_Number{
+  font-weight: 600;
+    margin-right: 20px;
+    font-weight: 500px;
+    font-size: 20px;
+    color:salmon
+}
+.AddButton{
+  display: flex;
+  justify-content:flex-end;
+  margin-right: 50px;
+  margin-bottom: 20px;
+}
+.el-card {
+    border: 0px solid #e6ebf5;
+    margin-top: 10px;
+    }
 </style>