zerp 4 lat temu
rodzic
commit
ded3456521

+ 4 - 3
config/index.js

@@ -11,9 +11,10 @@ module.exports = {
         // 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.114:8081',//后端接口地址
+        target: 'http://192.168.101.12',//后端接口地址
         // target: 'http://47.106.133.48:8081/',//后端接口地址
-        target: 'http://127.0.0.1:8081',//后端接口地址
+        // target: 'http://139.155.226.217:8088/pre',//后端接口地址
+        // target: 'http://127.0.0.1:8081',//后端接口地址
         changeOrigin: true,  //是否跨域
         pathRewrite: {
           '^/pre': '/',//重写,
@@ -22,7 +23,7 @@ module.exports = {
     },
 
     // 本地开发使用
-    host: '192.168.2.14',
+    host: '192.168.43.121',
     port: 61,
     autoOpenBrowser: true,
     errorOverlay: true,

+ 15 - 2
src/api/userList.js

@@ -124,10 +124,15 @@ export default {
    //获取所有客户
    userList(data){
      return request({
-       url:"/customer/" + data,
+       url:"customer/customerName",
        method:"get",
-       data:data
+      //  data:data
      })
+    //  return request({
+    //    url:"/customer/" + data,
+    //    method:"get",
+    //    data:data
+    //  })
    } ,
    //上传凭证
    Upload(data){
@@ -168,6 +173,14 @@ export default {
         method:"post",
         data:data
       })
+   },
+   //授信
+   creditAmount(customerId,creditAmount){
+      return request({
+        url:"/customer/credit/" + customerId + "/" + creditAmount,
+        method:"put",
+        // data:data
+      })
    }
   }
  

+ 8 - 5
src/components/Breadcrumb/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-breadcrumb class="app-breadcrumb" separator="/">
+  <el-breadcrumb class="app-breadcrumb" separator-class="el-icon-arrow-right">
     <transition-group name="breadcrumb">
       <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
         <span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">
@@ -33,11 +33,13 @@ export default {
     generateTitle,
     getBreadcrumb() {
       let matched = this.$route.matched.filter(item => item.name)
-
       const first = matched[0]
-      if (first && first.name.trim().toLocaleLowerCase() !== 'Dashboard'.toLocaleLowerCase()) {
-        matched = [{ path: '/dashboard', meta: { title: '主页' }}].concat(matched)
-      }
+      //toLocaleLowerCase()方法用于把字符串转换为小写。
+      //trim() 方法用于删除字符串的头尾空白符,空白符包括:空格、制表符 tab、换行符等其他空白符等
+      // if (first && first.name.trim().toLocaleLowerCase() !== 'Dashboard'.toLocaleLowerCase()) {
+      //   matched = [{ path: '/orderList/index', meta: { title: '订单列表' }}].concat(matched)
+      //   matched = [{ path: '/orderList/Distribute', meta: { title: '分发列表' }}].concat(matched)
+      // }
 
       this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
     },
@@ -53,6 +55,7 @@ export default {
         this.$router.push(redirect)
         return
       }
+      console.log(this.pathCompile(path))
       this.$router.push(this.pathCompile(path))
     }
   }

+ 3 - 3
src/utils/request.js

@@ -50,13 +50,13 @@ service.interceptors.response.use(
           location.reload() // 为了重新实例化vue-router对象 避免bug
         })
       })
-    } else if (code !== "200") {
+    }else if (code !== "200") {
       Notification.error({
         title: response.data.message,
-        duration: 1000
+        duration: 2500
       })
       return Promise.reject('error')
-    } else {
+    }else {
       return response
     }
   },

+ 10 - 5
src/views/channel/account.vue

@@ -104,7 +104,7 @@
           </el-card> 
              <el-card  shadow="never" >
             <div slot="header" class="clearfix">
-              <span class="topClass">账户交易流水</span>
+              <span class="topClass">账户交易记录</span>
             </div>
             <div>
               <div class="AddButton">
@@ -112,7 +112,7 @@
               <!-- <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  :data="detailTableData" stripe style="width: 100%">
                       <el-table-column label="序号" width="60" align="center">
                               <template slot-scope="scope">
                               <span>{{ scope.$index + 1 }}</span>
@@ -370,7 +370,7 @@
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="dialogFormVisible = false">取 消</el-button>
-          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
         </div>
       </el-dialog>
         <!-- 详情 -->
@@ -484,6 +484,7 @@ export default {
           relationId:""
         },
         detailTotal:0,
+        buttonLoading:false
     }
   },
   created(){
@@ -651,7 +652,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: res.msg
+                            message: res.data.message
                         })
                      }
                 })
@@ -666,6 +667,7 @@ export default {
         this.$refs['dataForm'].validate((valid) => {
                 if (valid) {
                   if (!this.operation) {
+                    this.buttonLoading = true
                     supplierPaymentEdit(dataForm).then(response => {
                       if (response.status === 200) {
                         this.$message({
@@ -681,9 +683,11 @@ export default {
                         })
                       }
                     })
+                    .finally(() => this.buttonLoading = false)
                   } else {
                     console.log(this.dataForm)
                   //   // 添加
+                    this.buttonLoading = true
                     supplierPaymentAdd(dataForm).then(response => {
                       if (response.status === 200) {
                         this.$message({
@@ -699,6 +703,7 @@ export default {
                         })
                       }
                     })
+                    .finally(() => this.buttonLoading = false)
                   }
                 }
               })
@@ -726,7 +731,7 @@ export default {
             }else{
                 this.$notify.error({
                 title: '错误',
-                message: res.msg
+                message: res.data.message
                 });
             } 
         })

+ 9 - 4
src/views/channel/channel.vue

@@ -106,7 +106,7 @@
           </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" v-model="dataForm.isValid"  placeholder="请选择是否有效" style="width: 100%" >
+                  <el-select size="small" v-model="dataForm.isValid" :disabled="!operation" placeholder="请选择是否有效" style="width: 100%" >
                   <el-option
                   v-for="item in status"
                   :key="item.id"
@@ -224,7 +224,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitForm" >确 定</el-button>
+        <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -450,7 +450,8 @@ export default {
                 name:"无效"
             }],
             morePricing:"",    //结算价格批量定价
-            batch:[]          //批量所选的数据
+            batch:[],          //批量所选的数据
+            buttonLoading:false
         }
     },
     created(){
@@ -569,7 +570,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: res.msg
+                            message: res.data.message
                         })
                      }
                 })
@@ -625,6 +626,7 @@ export default {
                         })
                         console.log(dataForm)
                       // 编辑
+                    this.buttonLoading = true
                       api.update(dataForm).then(response => {
                         if (response.status === 200) {
                           this.$message({
@@ -640,9 +642,11 @@ export default {
                           })
                         }
                       })
+                    .finally(() => this.buttonLoading = false)
                     } else {
                       console.log(this.dataForm)
                     //   // 添加
+                    this.buttonLoading = true
                       api.axiosAdd(this.dataForm).then(response => {
                         if (response.status === 200) {
                           this.$message({
@@ -658,6 +662,7 @@ export default {
                           })
                         }
                       })
+                    .finally(() => this.buttonLoading = false)
                     }
                   }
                 })

+ 9 - 4
src/views/channel/channelGroup.vue

@@ -183,7 +183,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
         <!-- <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button> -->
       </div>
     </el-dialog>
@@ -566,7 +566,6 @@ export default {
         },
         //新增和修改API
         submitForm(){
-         this.buttonLoading = true
           this.$refs['dataForm'].validate((valid) => {
                   if (valid) {
                     if (!this.operation) {
@@ -579,9 +578,10 @@ export default {
                         // closeOnClickModal:false,
                         type: 'warning'
                       }).then(() => {
+                         this.buttonLoading = true
                           api.channelGroupUpdate(dataForm).then(response => {
                             this.buttonLoading = false
-                            if (response.status === 200) {
+                            if (response.data.status == '200') {
                               this.$message({
                                 type: 'success',
                                 message: '操作成功'
@@ -589,16 +589,20 @@ export default {
                               this.dialogFormVisible = false
                               this.reLoad()
                             } else {
+                            this.buttonLoading = false
                               this.$message({
                                 type: 'error',
                                 message: response.data.msg
                               })
                             }
                           })
+                        .finally(() => this.buttonLoading = false)
                       })
                     } else {
                     //   // 添加
+                         this.buttonLoading = true
                       api.channelGroupAdd(this.dataForm).then(response => {
+                            this.buttonLoading = false
                         if (response.status === 200) {
                           this.$message({
                             type: 'success',
@@ -613,6 +617,7 @@ export default {
                           })
                         }
                       })
+                    .finally(() => this.buttonLoading = false)
                     }
                   }
                 })
@@ -663,7 +668,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: res.msg
+                            message: res.data.message
                         })
                      }
                 })

+ 16 - 11
src/views/channel/index.vue

@@ -13,13 +13,13 @@
           <span>{{ scope.$index + 1 }}</span>
           </template>
       </el-table-column>
-      <el-table-column label="供应商名称" width="100" align="center" show-overflow-tooltip>
+      <el-table-column label="供应商名称"  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>
         </template>
       </el-table-column>
 
-      <el-table-column label="可用余额" width="100" align="center" show-overflow-tooltip>
+      <!-- <el-table-column label="可用余额" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.balance }}</span>
         </template>
@@ -35,29 +35,29 @@
         <template slot-scope="scope">
           <span>{{ scope.row.consumeAmount }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
 
-      <el-table-column label="创建时间" width="170" align="center" show-overflow-tooltip>
+      <el-table-column label="创建时间" 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>
+      <el-table-column label="是否有效"  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>
+      <el-table-column label="限速" 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="300" align="center">
+      <el-table-column label="操作" fixed="right" width="270" align="center">
         <template slot-scope="scope">
           <el-button v-if="scope.row.isValid==0" size="small" icon="el-icon-circle-check" type="success" plain @click="ModifyState(scope.row,1)">有效</el-button>
           <el-button v-if="scope.row.isValid==1" size="small" icon="el-icon-circle-close" type="info" plain @click="ModifyState(scope.row,0)">无效</el-button>
@@ -115,7 +115,7 @@
           </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" v-model="dataForm.isValid"  placeholder="请选择是否有效" style="width: 100%" >
+                  <el-select size="small" v-model="dataForm.isValid" :disabled="!operation" placeholder="请选择是否有效" style="width: 100%" >
                   <el-option
                   v-for="item in status"
                   :key="item.id"
@@ -265,7 +265,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -650,7 +650,8 @@ export default {
       account:[
         {id:1,name:"供应商"},
         // {id:2,name:"客户"}
-      ]
+      ],
+      buttonLoading:false,
     }
   },
   created() {
@@ -678,7 +679,7 @@ export default {
         supplierName:"",           //供应商名称
         mobile:"",                 //供应商电话
         address:"",                //供应商地址
-        isValid:"",                //是否有效
+        isValid:1,                //是否有效
         account:"",                //接入账号
         appKey:"",                 //接入密钥
         ratio:"1:30000",                 //限速	
@@ -805,6 +806,7 @@ export default {
             if (!this.operation) {
               console.log(this.dataForm)
               // 编辑
+                    this.buttonLoading = true
               api.channelEdit(this.dataForm).then(response => {
                 if (response.status === 200) {
                   this.$message({
@@ -820,9 +822,11 @@ export default {
                   })
                 }
               })
+             .finally(() => this.buttonLoading = false)
             } else {
               console.log(this.dataForm)
             //   // 添加
+                    this.buttonLoading = true
               api.channelAdd(this.dataForm).then(response => {
                 if (response.status === 200) {
                   this.$message({
@@ -838,6 +842,7 @@ export default {
                   })
                 }
               })
+                    .finally(() => this.buttonLoading = false)
             }
           }
         })

+ 1 - 0
src/views/log/index.vue

@@ -132,6 +132,7 @@ export default {
     getData(){
       this.loading=true;
       api.index.Search(this.body).then(res=>{
+      this.loading=false;
             console.log(res)
             this.tableData=res.data.data.records;
             this.total=res.data.data.total;

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

@@ -141,19 +141,19 @@
     </div>
     <el-table v-loading="loading" :data="tableData" border style="width: 100%">
 
-      <el-table-column label="订单号" width="120" align="center" show-overflow-tooltip>
+      <el-table-column label="订单号" width="180" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.orderId }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="分发订单号" width="120" align="center" show-overflow-tooltip>
+      <el-table-column label="分发订单号" width="180" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.recId }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="客户名称" width="100" align="center" show-overflow-tooltip>
+      <el-table-column label="客户名称" width="180" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.customerName }}</span>
         </template>

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

@@ -187,7 +187,7 @@ export default {
                        } else {
                           that.$message({
                               type: 'error',
-                              message: res.msg
+                              message: res.data.message
                           })
                        }
                   })

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

@@ -233,6 +233,14 @@
         class="money"
       >运营商结算总价:</span>
       <span class="money_span">{{ sumOperatorPrice/ 10000 }}</span>
+       <span
+        class="money"
+      >总利润:</span>
+      <span class="money_span">{{ sumProfit/ 10000 }}</span>
+       <span
+        class="money"
+      >总面额:</span>
+      <span class="money_span">{{ sumFlowAmount/ 10000 }}</span>
     </div>
 
     <el-table v-loading="loading" :data="tableData" border style="width: 100%">
@@ -240,7 +248,7 @@
 
       <el-table-column
         label="订单号"
-        width="100"
+        width="180"
         align="center"
         show-overflow-tooltip
       >
@@ -251,7 +259,7 @@
 
       <el-table-column
         label="客户名称"
-        width="100"
+        width="180"
         align="center"
         prop="createTime"
         show-overflow-tooltip
@@ -372,7 +380,7 @@
 
       <el-table-column
         label="客户订单号"
-        width="120"
+        width="180"
         align="center"
         show-overflow-tooltip
       >
@@ -380,7 +388,7 @@
           <span>{{ scope.row.extorderId }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="通道订单号" width="120" align="center" show-overflow-tooltip>
+      <el-table-column label="通道订单号" width="180" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.gwSeqNo }}</span>
         </template>
@@ -439,6 +447,8 @@ export default {
       sumOperatorPrice: "",
     sumPartnerPrice: "",
     sumPrice: "",
+    sumFlowAmount:"",
+    sumProfit:"",
       total: 0, // 总数据
     //   sum: 10100,
       loading: false,
@@ -505,8 +515,10 @@ export default {
         })
         this.tableData = arry
         this.sumOperatorPrice = res.data.data.sumOperatorPrice
-        this.sumPartnerPrice = res.data.data .sumPartnerPrice
-        this.sumPrice = res.data.data .sumPrice
+        this.sumPartnerPrice = res.data.data.sumPartnerPrice
+        this.sumPrice = res.data.data.sumPrice
+        this.sumProfit = res.data.data.sumProfit   //总利润
+        this.sumFlowAmount = res.data.data.sumFlowAmount //总面额
         console.log(arry)
         this.total = res.data.data.total
         console.log(res.data.data.records)

+ 251 - 216
src/views/orderList/index.vue

@@ -2,197 +2,207 @@
   <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 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 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
-                />
+          <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">
+        <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"
+              v-for="item in status"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
             />
-        </el-select>
+          </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">
+        <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"
+              v-for="item in mobileOperator"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
             />
-        </el-select>
+          </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 class="w_input">
+          <!-- <el-col :span="5"> -->
+          <span class="textSpan">  面额:</span>
+          <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
+          <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="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
@@ -209,7 +219,7 @@
           type="info"
           icon="el-icon-edit"
           plain
-          @click="handleReseted(7)"
+          @click="handleReseted(9)"
           >置重发
         </el-button>
         <el-button
@@ -218,7 +228,7 @@
           type="warning"
           icon="el-icon-message"
           plain
-          @click="handleReset"
+          @click="handleReseted(10)"
           >置回调
         </el-button>
 
@@ -282,7 +292,7 @@
 
       <el-table-column
         label="订单号"
-        width="120"
+        width="180"
         align="center"
         show-overflow-tooltip
       >
@@ -293,7 +303,7 @@
 
       <el-table-column
         label="客户名称"
-        width="100"
+        width="190"
         align="center"
         prop="createTime"
         show-overflow-tooltip
@@ -400,7 +410,7 @@
           <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 === 4" size="small" style="danger">充值失败</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>
@@ -429,7 +439,7 @@
           <el-tag v-if="scope.row.callbackStatus === 6" size="small"
             >成功</el-tag
           >
-          <el-tag v-if="scope.row.callbackStatus === 4" size="small"
+          <el-tag v-if="scope.row.callbackStatus === 4" size="small" style="danger"
             >失败</el-tag
           >
         </template>
@@ -448,7 +458,7 @@
       </el-table-column>
       <el-table-column
         label="客户订单号"
-        width="120"
+        width="300"
         align="center"
         show-overflow-tooltip
       >
@@ -458,7 +468,7 @@
       </el-table-column>
       <el-table-column
         label="通道订单号"
-        width="120"
+        width="300"
         align="center"
         show-overflow-tooltip
       >
@@ -687,48 +697,56 @@ export default {
 
     //黑名单
     handleResetBlack() {
-      this.$prompt('此操作将该手机号拉入黑名单', '提示', {
-      confirmButtonText: '确定',
-      cancelButtonText: '取消',
-      inputPattern:/^[\s\S]*.*[^\s][\s\S]*$/,
-      inputErrorMessage: '请描述原因'
+      if(this.ArryList.length){
+      this.$prompt("此操作将该手机号拉入黑名单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
+        inputErrorMessage: "请描述原因"
       }).then(({ value }) => {
-          console.log(this.ArryList, "11");
-          let arry = this.ArryList;
-          // console.log(this.ArryList)
-          let arryList = [];
-          arry.map(res => {
-            let phoneNo = { phoneNo: res.phoneNo, note: value };
-            arryList.push(phoneNo);
-          });
-          console.log(arryList, "arrylist");
-          let that = this;  
-          api.add(arryList).then(res => {
-            if (res.status === 200) {
-              that.$message({
-                type: "success",
-                message: "成功拉入黑名单"
-              });
-              that.getTenantList();
-            } else {
-              that.$message({
-                type: "error",
-                message: res.msg
-              });
-            }
-          });
+        console.log(this.ArryList, "11");
+        let arry = this.ArryList;
+        // console.log(this.ArryList)
+        let arryList = [];
+        arry.map(res => {
+          let phoneNo = { phoneNo: res.phoneNo, note: value };
+          arryList.push(phoneNo);
+        });
+        console.log(arryList, "arrylist");
+        let that = this;
+        api.add(arryList).then(res => {
+          if (res.status === 200) {
+            that.$message({
+              type: "success",
+              message: "成功拉入黑名单"
+            });
+            that.getTenantList();
+          } else {
+            that.$message({
+              type: "error",
+              message: res.data.message
+            });
+          }
         });
+      });
+      }else{
+        this.$message({
+          type: "error",
+          message: "请至少选择一项"
+        });
+      }
     },
 
-    //置失败--4  或者  成功--6  重发---7
+    //置失败--4  或者  成功--6  重发---9    回调---10
     handleReseted(i) {
+      if(this.ArryList.length){
       let arry = this.ArryList;
       let that = this;
       //定义一个空数组,存放 置状态的数据
       let arryList = [];
       let status = i;
       arry.map(res => {
-        // console.log(res);
+        console.log(res, "1111");
         let orderId = res.orderId;
         arryList.push(orderId);
       });
@@ -738,35 +756,52 @@ export default {
         msg = "失败";
       } else if (i == 6) {
         msg = "成功";
-      } else if (i == 7) {
+      } else if (i == 9) {
         msg = "重发";
+      } else if (i == 10) {
+        msg = "回调";
       }
       let oderArry = {
         orderIds: arryList,
         status: status
       };
-      that
-        .$confirm(`此操作将该订单置为${msg}状态`, "提示", {
+      that.$confirm(`此操作将该订单置为${msg}状态`, "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         })
         .then(() => {
           setOrderStatus(oderArry).then(res => {
-            if (res.status == 200) {
+            if (res.data.status == "200") {
               that.$message({
                 type: "success",
                 message: `已置为${msg}状态`
               });
               that.getTenantList();
             } else {
-              that.$message({
-                type: "error",
-                message: res.msg
-              });
+              that.$confirm(res.data.message, "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                })
+                .then(() => {
+                   that.getTenantList();
+
+                });
+              // that.$message({
+              //   type: "error",
+              //   message: res.message,
+              // });
             }
+            console.log(res, "222");
           });
         });
+       }else{
+        this.$message({
+          type: "error",
+          message: "请至少选择一项"
+        });
+      }  
     },
     //
     handleReset() {},

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

@@ -609,7 +609,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: res.msg
+                            message: res.data.message
                         })
                      }
                 })

+ 9 - 2
src/views/product/index.vue

@@ -166,7 +166,7 @@
           </el-form>
           <div slot="footer" class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
-            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button type="primary" @click="submitForm" :loading="buttonLoading">确 定</el-button>
           </div>
         </el-dialog>
     </div>
@@ -229,7 +229,8 @@ export default {
       page:1,
       size:10,
       total:0,
-      loading:false
+      loading:false,
+      buttonLoading:false
     }
   },
   created(){
@@ -305,6 +306,8 @@ export default {
           if (valid) {
             if (!this.operation) {
               // 编辑
+                    this.buttonLoading = true
+
               ProductEdit(this.dataForm).then(response => {
                 if (response.data.status == 200) {
                   this.$message({
@@ -320,9 +323,12 @@ export default {
                   })
                 }
               })
+              .finally(() => this.buttonLoading = false)
             } else {
               console.log(this.dataForm)
             //   // 添加
+                    this.buttonLoading = true
+
               ProductAdd(this.dataForm).then(response => {
                 console.log(response)
                 if (response.data.status == "200") {
@@ -340,6 +346,7 @@ export default {
                   // })
                 }
               })
+              .finally(() => this.buttonLoading = false)
             }
           }
         })

+ 40 - 36
src/views/product/setting.vue

@@ -10,7 +10,7 @@
             v-model="body.operator"
             clearable
             placeholder="请选择运营商"
-            style="width: 60%"
+            style="width: 65%"
             @change="changeoperator"
           >
             <el-option
@@ -21,25 +21,25 @@
             />
           </el-select>
         </div>
-        <div class="w_input">
+        <div class="w_input" style="margin-left:30px">
           <span class="textSpan">面额:</span>
           <el-input
             v-model="body.facePrice"
-            style="width: 60%;"
+            style="width: 65%;"
             placeholder="请输入面额"
             size="small"
             clearable
             @change="changePrice"
           />
         </div>
-        <div class="w_input">
-          <span class="textSpan">     维护状态:</span>
+        <div class="w_input" >
+          <span class="textSpan">维护状态:</span>
           <el-select
             size="small"
             v-model="body.status"
             clearable
             placeholder="请选择维护状态"
-            style="width: 60%"
+            style="width: 65%"
             @change="changeScope"
           >
             <el-option
@@ -59,7 +59,7 @@
             v-model="body.province"
             clearable
             placeholder="请选择产品地区"
-            style="width: 60%"
+            style="width: 65%"
             @change="changeProvince"
           >
             <el-option
@@ -70,6 +70,23 @@
             />
           </el-select>
         </div>
+        <div class="w_input" >
+          <span class="textSpan">维护范围:</span>
+          <el-select
+            size="small"
+            v-model="body.rechargeType"
+            clearable
+            placeholder="请选择维护范围"
+            style="width: 65%"
+          >
+            <el-option
+              v-for="item in rechargeStatus"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            />
+          </el-select>
+        </div>
         <div class="w_date">
           <span class="textSpan">时间:</span>
           <el-date-picker
@@ -77,7 +94,7 @@
             size="small"
             type="datetimerange"
             range-separator="至"
-            style="width:83%"
+            style="width:85%"
             @change="oncheckTimeStart"
             value-format="yyyy-MM-dd HH:mm:ss"
             :default-time="['00:00:00', '23:59:59']"
@@ -87,23 +104,7 @@
           >
           </el-date-picker>
         </div>
-         <div class="w_input">
-          <span class="textSpan"> 维护范围:</span>
-          <el-select
-            size="small"
-            v-model="body.rechargeType"
-            clearable
-            placeholder="请选择维护范围"
-            style="width: 60%"
-          >
-            <el-option
-              v-for="item in rechargeStatus"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            />
-          </el-select>
-        </div>
+         
       </div>
       <!-- 按钮----查找  重置  新增  -->
       <div class="flexend">
@@ -165,9 +166,9 @@
         >
           <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 type="warning" v-if="scope.row.operator == 3" size="small">电信</el-tag>
+            <el-tag type="primary" v-if="scope.row.operator == 1" size="small">移动</el-tag>
+            <el-tag type="success" v-if="scope.row.operator == 2" size="small">联通</el-tag>
           </template>
         </el-table-column>
 
@@ -205,24 +206,24 @@
         </el-table-column>
         <el-table-column label="维护范围 " align="center" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-tag v-if="scope.row.rechargeType === 1" size="small"
+            <el-tag type="warning" v-if="scope.row.rechargeType === 1" size="small"
               >快充</el-tag
             >
-            <el-tag v-if="scope.row.rechargeType === 2" size="small"
+            <el-tag type="success" v-if="scope.row.rechargeType === 2" size="small"
               >慢充</el-tag
             >
           </template>
         </el-table-column>
         <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 type="info" v-if="scope.row.status === 0" size="small">未维护</el-tag>
             <el-tag v-if="scope.row.status === 1" size="small">已维护</el-tag>
           </template>
         </el-table-column>
 
         <el-table-column label="维护类型" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-tag v-if="scope.row.orderType === 0" size="small">自动</el-tag>
+            <el-tag type="success" v-if="scope.row.orderType === 0" size="small">自动</el-tag>
             <el-tag v-if="scope.row.orderType === 1" size="small">手动</el-tag>
           </template>
         </el-table-column>
@@ -474,9 +475,9 @@ export default {
       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:编辑
@@ -746,8 +747,11 @@ export default {
   justify-content: flex-start;
 }
 .w_input {
-  width: 33.333%;
+  width: 30%;
 }
+ .w_date{
+     width:40%;
+ }
 .textSpan {
   position: relative;
   top: 0;

+ 59 - 12
src/views/userList/access.vue

@@ -47,6 +47,14 @@
               </template>
           </el-table-column>
 
+          <el-table-column label="维护范围" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <!--  0-无效 1-有效  -->
+                <el-tag v-if="scope.row.rechargeType==1" type="success">快充</el-tag>
+                <el-tag v-if="scope.row.rechargeType==2" type="warning">慢充</el-tag>
+              </template>
+          </el-table-column>
+
           <el-table-column label="重发次数" align="center" show-overflow-tooltip>
               <template slot-scope="scope">
                   <span>{{ scope.row.totalCount }}</span>
@@ -97,7 +105,17 @@
           </el-col>
           
           <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
-               <el-form-item label="状态" prop="status" :label-width="formLabelWidth"  >
+            <el-form-item label="是否二次回调" :label-width="formLabelWidth"  >
+            <el-select size="small"  value-key="relationId" filterable v-model="dataForm.secondCallback" clearable placeholder="请选择" style="width: 100%" >
+                    <el-option
+                    v-for="item in secondCallback"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                    />
+                </el-select>
+            </el-form-item>
+               <!-- <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"
@@ -106,7 +124,7 @@
                         :value="item.id"
                         />
                         </el-select>
-                </el-form-item>
+                </el-form-item> -->
           </el-col>
         </el-row>
         <el-row :gutter="20">
@@ -155,16 +173,29 @@
 
         <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"  value-key="relationId" filterable v-model="dataForm.secondCallback" clearable placeholder="请选择" style="width: 100%" >
-                    <el-option
-                    v-for="item in secondCallback"
-                    :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="rechargeType"
+          >
+            <el-select
+              size="small"
+              v-model="dataForm.rechargeType"
+              placeholder="请选择维护范围"
+              @change="onRechargeType"
+              style="width:90%"
+            >
+              <el-option
+                v-for="item in rechargeStatus"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
+            </el-select>
+          </el-form-item>
           </el-col>
 
         </el-row>
@@ -255,6 +286,7 @@ export default {
                name:"无效"
            }],
            channelGroupId:"",
+           rechargeStatus: [{ id: 1, name: "快充" }, { id: 2, name: "慢充" }], //充值方式
            secondCallback:[
                {id:0,name:"不支持"},
                {id:1,name:"支持"}
@@ -284,6 +316,21 @@ export default {
             this.body.current = 1
             this.loadData()
         },
+        //配置通道组
+        onRechargeType(row){
+             this.$confirm('您以修改维护范围,请前往通道组进行配置', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                showClose:false,
+                closeOnClickModal:false,
+                type: 'warning'
+              }).then(() => {
+                 this.selectref = false
+                 console.log("确定")
+              }).catch(() => {
+                this.selectref = true
+              });
+        },
         //添加ip
         addGroup(){
             let ipWhiteListList = {

+ 112 - 35
src/views/userList/account.vue

@@ -29,7 +29,7 @@
       </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 === 1" >正常</el-tag>
           <el-tag v-if="scope.row.status === 2" type="warning">暂停</el-tag>
@@ -39,27 +39,36 @@
       <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> -->
 
-      <el-table-column label="帐号余额" align="center" show-overflow-tooltip>
+      <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.balance }}</span> -->
+        </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> -->
 
       <el-table-column label="创建时间" width="150" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
@@ -70,7 +79,7 @@
 
       <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="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>
@@ -89,8 +98,8 @@
                     <span class="flex_Name">客户名称:</span>
                     <span class="flex_Number">{{detail.customerName}}</span>
                   </div>
-                  <div>
-                    <span class="flex_Name">账户余额:</span>
+                  <div class="flex_width">
+                    <span class="flex_Name">可用余额:</span>
                     <span class="flex_Number">{{detail.balance}}</span>
                   </div>
               </div>
@@ -99,24 +108,34 @@
                     <span class="flex_Name">授信额度:</span>
                     <span class="flex_Number">{{detail.creditAmount}}</span>
                   </div>
-                  <div>
-                    <span class="flex_Name">当前费用:</span>
+                  <div class="flex_width">
+                    <span class="flex_Name">累计充值:</span>
                     <span class="flex_Number">{{detail.currentAmount}}</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>
+              <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> -->
+              <el-button type="danger" plain icon="el-icon-bank-card" @click="creditAmountAdd">信用额度调整</el-button>
               </div>
               <div>
-                   <el-table  :data="detailTableData" border style="width: 100%">
+                   <el-table  :data="detailTableData" stripe style="width: 100%">
                         <el-table-column label="序号" width="60" align="center">
                               <template slot-scope="scope">
                               <span>{{ scope.$index + 1 }}</span>
@@ -378,10 +397,24 @@
           </el-form>
           <div slot="footer" class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
-            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button type="primary" :loading="buttonLoading" @click="submitForm">确 定</el-button>
           </div>
         </el-dialog>
 
+         <!-- 授信 -->
+        <el-dialog :title="detail.customerName + '的信用额度调整'" :visible.sync="creditAmountVisible" width="55%" center>
+          <el-form ref="AmountForm" :model="AmountForm" :rules="Amount" label-width="80px" size="small" label-position="right">
+                <el-form-item label="信用额度调整" prop="creditAmount" :label-width="formLabelWidth"  >
+                  <el-input v-model="AmountForm.creditAmount"  placeholder="请输入信用额度" />
+                </el-form-item>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="creditAmountVisible = false">取 消</el-button>
+            <el-button type="primary" @click="submitAmount">确 定</el-button>
+          </div>
+        </el-dialog>
+
+
 
 
         <!-- 详情 -->
@@ -467,6 +500,9 @@ export default {
             cardNo: [{ required: true, message: '请选择银行卡', trigger: 'blur' } ],
             amount: [{ required: true, message: '请输入加款', trigger: 'blur' } ],
       },
+      Amount:{
+            creditAmount:[{ required: true, message: '请输入授信额度', trigger: 'blur' }]
+      },
       userList:[],
       operation:false,
       dialogFormVisible:false,
@@ -493,6 +529,9 @@ export default {
           // relationId:""
         },
         detailTotal:0,
+        AmountForm:{},
+        creditAmountVisible:false,
+        buttonLoading:false,
     }
   },
   created(){
@@ -531,7 +570,7 @@ export default {
     //客户名称
     user(){
       let user = "{customerName}"
-      api.account.userList(user).then((res) => {
+      api.account.userList().then((res) => {
         this.loading =false
         let userList = res.data.data
         userList.map((res)=>{
@@ -587,22 +626,55 @@ export default {
        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();
-            }
+    //授信
+    creditAmountAdd(){
+        this.creditAmountVisible = true
+        this.AmountForm = {}
     },
+    //授信额度API 
+    submitAmount(){
+      let that = this
+    this.$refs['AmountForm'].validate((valid) => {
+      if (valid) {
+        that.$confirm('是否确定授信额度', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                })
+                .then(() => {
+          let creditAmount=this.AmountForm.creditAmount   
+          let customerId = this.detail.customerId
+          console.log(creditAmount)
+          console.log(customerId)
+          api.account.creditAmount(customerId,creditAmount).then((res)=>{
+            this.creditAmountVisible = false
+            this.$message({
+              type: 'success',
+              message: '操作成功'
+            })
+            this.detail.creditAmount =creditAmount 
+            this.reLoad()
+          })
+        })
+      }
+    })
+    },
+     //新增
+    // 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:编辑
@@ -669,7 +741,7 @@ export default {
                      } else {
                         that.$message({
                             type: 'error',
-                            message: res.msg
+                            message: res.data.message
                         })
                      }
                 })
@@ -684,6 +756,7 @@ export default {
         this.$refs['dataForm'].validate((valid) => {
                 if (valid) {
                   if (!this.operation) {
+                    this.buttonLoading = true
                     api.account.paymentUpdate(dataForm).then(response => {
                       if (response.status === 200) {
                         this.$message({
@@ -699,9 +772,11 @@ export default {
                         })
                       }
                     })
+                    .finally(() => this.buttonLoading = false)
                   } else {
                     console.log(this.dataForm)
                   //   // 添加
+                    this.buttonLoading = true
                     api.account.paymentAdd(dataForm).then(response => {
                       if (response.status === 200) {
                         this.$message({
@@ -717,6 +792,7 @@ export default {
                         })
                       }
                     })
+                   .finally(() => this.buttonLoading = false)
                   }
                 }
               })
@@ -744,7 +820,7 @@ export default {
             }else{
                 this.$notify.error({
                 title: '错误',
-                message: res.msg
+                message: res.data.message
                 });
             } 
         })
@@ -792,8 +868,9 @@ export default {
   /* justify-content:space-evenly; */
 }
 .flex_width{
-  width: 50%;
-  margin-left: 160px;
+  width: 65%;
+  /* border: 1px solid red; */
+  margin-left: 100px;
 }
 .flex_Name{
    font-size: 15px;

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

@@ -24,7 +24,7 @@
           </template>
         </el-table-column>
 
-      <el-table-column label="客户名称" width="150" align="center" show-overflow-tooltip>
+      <el-table-column label="客户名称"  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>
@@ -46,7 +46,7 @@
         </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">
           <span>{{ scope.row.balance }}</span>
         </template>
@@ -62,9 +62,9 @@
         <template slot-scope="scope">
           <span>{{ scope.row.currentAmount }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
 
-      <el-table-column label="创建时间" width="150" align="center" show-overflow-tooltip>
+      <el-table-column label="创建时间"  align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.createTime }}</span>
         </template>
@@ -280,7 +280,7 @@
           </el-form>
           <div slot="footer" class="dialog-footer">
             <el-button @click="dialogFormVisible = false">取 消</el-button>
-            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button type="primary" :loading="buttonLoading" @click="submitForm">确 定</el-button>
           </div>
         </el-dialog>
 
@@ -300,7 +300,12 @@
                         <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-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-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>
@@ -310,14 +315,10 @@
                           <el-input v-model="dataForm.balance" disabled  />
                         </el-form-item>
                       
-                    </el-col>
+                    </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>  
@@ -657,7 +658,7 @@
        </el-card>
           <div slot="footer" class="dialog-footer">
             <el-button @click="productShow = false">取 消</el-button>
-            <el-button type="primary" @click="productSubmit">确 定</el-button>
+            <el-button type="primary" :loading="buttonLoading" @click="productSubmit">确 定</el-button>
           </div>
         </el-dialog>
 
@@ -783,7 +784,8 @@ export default {
       channelProductInfos:[],  //添加产品列表
       userDataList:[],
       onuserList:[],
-      onList:[]
+      onList:[],
+      buttonLoading:false
     }
   },
   created() {
@@ -796,7 +798,7 @@ export default {
      //客户名称
     user(){
       let user = "{customerName}"
-      api.account.userList(user).then((res) => {
+      api.account.userList().then((res) => {
         this.loading =false
         let userDataList = res.data.data
         // userList.map((res)=>{
@@ -1102,6 +1104,7 @@ export default {
             //                       return res
             //                     }
             //                   })
+             this.buttonLoading = true
             api.index.AddCustomer(channelProductInfos).then((res)=>{
               if (res.status == 200) {
                         this.$message({
@@ -1116,6 +1119,7 @@ export default {
                         })
                       }
             })
+         .finally(() => this.buttonLoading = false)
           }
         })
     },
@@ -1158,6 +1162,7 @@ export default {
             if (!this.operation) {
               console.log(this.dataForm)
               // 编辑
+              this.buttonLoading = true
               api.index.update(this.dataForm).then(response => {
                 if (response.status === 200) {
                   this.$message({
@@ -1173,9 +1178,11 @@ export default {
                   })
                 }
               })
+            .finally(() => this.buttonLoading = false)
             } else {
               console.log(this.dataForm)
             //   // 添加
+              this.buttonLoading = true
               api.index.userAdd(this.dataForm).then(response => {
                 if (response.status === 200) {
                   this.$message({
@@ -1191,6 +1198,8 @@ export default {
                   })
                 }
               })
+              .finally(() => this.buttonLoading = false)
+
             }
           }
         })

+ 1 - 1
src/views/userList/whiteList.vue

@@ -187,7 +187,7 @@ export default {
                        } else {
                           that.$message({
                               type: 'error',
-                              message: res.msg
+                              message: res.data.message
                           })
                        }
                   })