hebinlong %!s(int64=4) %!d(string=hai) anos
pai
achega
f8595bd0f4

+ 1 - 1
config/index.js

@@ -20,7 +20,7 @@ module.exports = {
     },
 
     // 本地开发使用
-    host: '192.168.2.14',
+    host: '0.0.0.0',
     port: 9527,
     autoOpenBrowser: true,
     errorOverlay: true,

+ 49 - 12
src/api/userList.js

@@ -1,18 +1,55 @@
 import request from '@/utils/request'
 
 export default {
-  Search(operator) {
-    return request({
-      url: '/customer/info',
-      method: 'get',
-      params: operator
-    })
+  index:{
+    Search(operator) {
+      return request({
+        url: '/customer/info',
+        method: 'get',
+        params: operator
+      })
+    },
+    userAdd(operator){
+      return request({
+        url:"/customer/add",
+        method:"post",
+        data: operator
+      })
+    },
+    update(operator){
+      return request({
+        url:'/customer/update',
+        method:'put',
+        data: operator
+      })
+    }
   },
-  userAdd(operator){
-    return request({
-      url:"/customer/add",
-      method:"post",
-      data: operator
-    })
+
+  access:{
+    Search(operator){
+      return request({
+        url:'/customer/app/info',
+        method:'GET',
+        params: operator
+      })
+    },
+    update(operator){
+      return request({
+        url: '/customer/app',
+        method:'PUT',
+        data: operator
+      })
+    }
+  },
+
+  account:{
+    Search(operator){
+      return request({
+        url:'/customer/app/info',
+        method:'GET',
+        params: operator
+      })
+    }
   }
+ 
 }

+ 57 - 55
src/views/orderList/finance.vue

@@ -225,15 +225,15 @@
       <span
         class="money"
       >客户结算总价:</span>
-      <span class="money_span">{{ sumPrice }}</span>
+      <span class="money_span">{{ sumPrice /10000 }}</span>
       <span
         class="money"
       >合作伙伴结算总价:</span>
-      <span class="money_span">{{ sumPartnerPrice }}</span>
+      <span class="money_span">{{ sumPartnerPrice/10000 }}</span>
       <span
         class="money"
       >运营商结算总价:</span>
-      <span class="money_span">{{ sumOperatorPrice }}</span>
+      <span class="money_span">{{ sumOperatorPrice/ 10000 }}</span>
     </div>
 
     <el-table v-loading="loading" :data="tableData" border style="width: 100%">
@@ -241,7 +241,7 @@
 
       <el-table-column
         label="订单号"
-        width="120"
+        width="100"
         align="center"
         show-overflow-tooltip
       >
@@ -250,6 +250,18 @@
         </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"
@@ -263,7 +275,7 @@
 
       <el-table-column label="客户价格" width="80" align="center">
         <template slot-scope="scope">
-          <span>{{ scope.row.price }}</span>
+          <span>{{ scope.row.price / 10000 }}</span>
         </template>
       </el-table-column>
 
@@ -279,6 +291,40 @@
         </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.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="产品ID" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.packageId }}</span>
+        </template>
+      </el-table-column> -->
+
+      <el-table-column label="发送时间" width="160" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.applyDate }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="回调时间" width="160" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.lastModifyDate }}</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         label="运营商"
         width="70"
@@ -312,7 +358,7 @@
         <template slot-scope="scope">
           <span>{{ scope.row.phoneNo }}</span>
         </template>
-      </el-table-column>
+      </el-table-column>      
 
       <el-table-column
         label="通道名称"
@@ -325,18 +371,6 @@
         </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="120"
@@ -353,39 +387,6 @@
         </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.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="产品ID" width="100" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">
-          <span>{{ scope.row.packageId }}</span>
-        </template>
-      </el-table-column> -->
-
-      <el-table-column label="发送时间" width="160" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.limitedDate }}</span>
-        </template>
-      </el-table-column>
-
-      <el-table-column label="回调时间" width="160" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.lastModifyDate }}</span>
-        </template>
-      </el-table-column>
     </el-table>
 
     <!--分页-->
@@ -443,11 +444,12 @@ export default {
     //   sum: 10100,
       loading: false,
       status: [
-        { id: 1, name: '待发' },
-        { id: 2, name: '已发' },
-        { id: 6, name: '成功' },
+        // 1-待充值 2-充值中  3-重发  4-失败  6-成功
+        { id: 1, name: '待充值' },
+        { id: 2, name: '充值中' },
+        { id: 3, name: '重发' },
         { id: 4, name: '失败' },
-        { id: 5, name: '风控' }
+        { id: 6, name: '成功' },
       ],
       mobileOperator: [
           {id:1,name:"移动"},

+ 7 - 5
src/views/orderList/index.vue

@@ -291,7 +291,7 @@
       <el-table-column label="发送时间" width="170" align="center" show-overflow-tooltip> 
          <template slot-scope="scope">
             <i class="el-icon-time"></i>
-           <span>{{ scope.row.limitedDate }}</span>
+           <span>{{ scope.row.applyDate}}</span>
          </template>
       </el-table-column>
       <el-table-column label="回调时间" width="170" align="center" show-overflow-tooltip>
@@ -430,10 +430,12 @@ export default {
       total:0,   //总数据
       loading:false,
       status:[
-        {id:1,name:"待发"},
-        {id:2,name:"充值中"},
-        {id:6,name:"成功"},
-        {id:4,name:"失败"},
+        // 1-待充值 2-充值中  3-重发  4-失败  6-成功
+        { id: 1, name: '待充值' },
+        { id: 2, name: '充值中' },
+        { id: 3, name: '重发' },
+        { id: 4, name: '失败' },
+        { id: 6, name: '成功' },
       ],
       mobileOperator:[
           {id:1,name:"移动"},

+ 172 - 0
src/views/userList/access.vue

@@ -0,0 +1,172 @@
+<template>
+  <div class="app-container">
+      <div class="filter-container" style="margin: 10px 0 10px 0">
+        <span class="textSpan">客户名称:</span>
+        <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
+        <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="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>
+
+          <!-- 字段信息:应用ID、app名称、客户名称、状态、重发次数、备注、通道组名称、操作、网关回调UPL -->
+          <el-table-column label="应用ID" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.appId }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="app名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.appName }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="客户名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.customerName }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="状态" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <!--  0-无效 1-有效  -->
+                <el-tag v-if="scope.row.status==1">有效</el-tag>
+                <!-- <el-tag v-if="scope.row.status==2" type="info">暂停</el-tag> -->
+                <el-tag v-if="scope.row.status==0" type="danger">无效</el-tag>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="重发次数" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.totalCount }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="超时时间" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.time }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="通道组名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.channelId }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="网关回调URL" align="center" width="150" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.callbackUrl }}</span>
+              </template>
+          </el-table-column>
+
+          <el-table-column label="操作" fixed="right" min-width="180" align="center">
+            <template slot-scope="scope">
+                <el-button v-if="scope.row.status === 1" size="small" icon="el-icon-close"  type="danger" @click="ModifyStatus(scope.row,0)">关闭</el-button>
+                <el-button v-if="scope.row.status === 0" size="small" icon="el-icon-check"  @click="ModifyStatus(scope.row,1)">开启</el-button>
+                <el-button size="small" icon="el-icon-edit" type="warning" @click="ModifyEdit(scope.row)">编辑</el-button>
+            </template>
+          </el-table-column>
+
+      </el-table>
+
+      <!-- 分页 -->
+    <div class="pagination">
+      <el-pagination
+        current-page.sync="body.current"
+        :current-page="body.current"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="body.size"
+        layout="total, sizes, prev, pager, next, jumper"
+        background
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import api from '@/api/userList'
+export default {
+    data() {
+        return {
+            tableData:[],
+            body:{
+                size:10,
+                current:1
+            }
+        }
+    },
+    created() {
+        this.loadData()
+    },
+    methods: {
+        loadData(){
+            this.loading = true
+            api.access.Search(this.body).then((res) => {
+                this.loading =false
+                this.tableData = res.data.data.records
+                this.total = res.data.data.total
+            })
+        },
+        Search(){
+            this.body.current = 1
+            this.loadData()
+        },
+        ModifyStatus(row,i){
+            this.$confirm('是否修改 '+row.customerName+' 的状态', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(()=>{
+                row.status = i 
+                api.access.update(row).then(response => {
+                if (response.status === 200) {
+                this.$message({
+                    type: 'success',
+                    message: '操作成功'
+                })
+                this.dialogFormVisible = false
+                this.getTenantList()
+                } else {
+                this.$message({
+                    type: 'error',
+                    message: response.data.msg
+                })
+                }
+                })
+            }).catch(() => {
+                this.$message({
+                type: 'info',
+                message: '已取消删除'
+                });          
+            });
+        },
+        ModifyEdit(row){
+
+        },
+        handleSizeChange(val) {
+            this.body.size = val
+            this.loadData()
+        },
+    //换页
+        handleCurrentChange(val) {
+            this.body.current = val
+            this.loadData()
+        }
+    },
+
+}
+</script>
+
+<style>
+
+</style>

+ 50 - 0
src/views/userList/account.vue

@@ -0,0 +1,50 @@
+<template>
+  <div class="app-container">
+      <div class="filter-container" style="margin: 10px 0 10px 0">
+        <span class="textSpan">客户名称:</span>
+        <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
+        <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
+        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="handlerAdd">新增</el-button>
+      </div>
+      <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+
+      </el-table>
+  </div>
+</template>
+
+<script>
+import api from '@/api/userList'
+export default {
+  data() {
+    return {
+      loading:false,
+      tableData:[],
+      body:{
+        current:1
+      }
+    }
+  },
+  methods: {
+    reLoad(){
+      this.loading = true
+      api.account.Search(this.body).then((res) => {
+        this.loading =false
+        this.tableData = res.data.data.records
+        this.total = res.data.data.total
+      })
+    },
+    Search(){
+      this.body.current = 1
+      this.reLoad()
+    },
+    handlerAdd(){
+
+    }
+  },
+
+}
+</script>
+
+<style>
+
+</style>

+ 107 - 39
src/views/userList/index.vue

@@ -3,13 +3,19 @@
     <div class="filter-container" style="margin: 10px 0 10px 0">
       <span class="textSpan">客户名称:</span>
       <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
-      <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="reLoad">搜索</el-button>
+      <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
       <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="NewUser">新增</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="客户名称" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <span>{{ scope.row.customerName }}</span>
@@ -24,9 +30,8 @@
 
       <el-table-column label="状态" align="center">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.status === 1" size="small">有效</el-tag>
-          <el-tag v-if="scope.row.status === 2" size="small">无效</el-tag>
-          <el-tag v-if="scope.row.status === 3" size="small">暂停</el-tag>
+          <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>
 
@@ -62,8 +67,10 @@
       </el-table-column>
 
 
-      <el-table-column label="操作" fixed="right" min-width="200" align="center">
+      <el-table-column label="操作" fixed="right" min-width="250" align="center">
         <template slot-scope="scope">
+          <el-button v-if="scope.row.status === 1" size="small" icon="el-icon-close" type="warning" @click="ModifyStatus(scope.row,2)">暂停</el-button>
+          <el-button v-if="scope.row.status === 2" size="small" icon="el-icon-check"  @click="ModifyStatus(scope.row,1)">有效</el-button>
           <el-button size="small" icon="el-icon-edit" type="warning" @click="ModifyEdit(scope.row)">编辑</el-button>
           <el-button size="small" icon="el-icon-delete" type="danger" @click="ModifyDelete(scope.row)">删除</el-button>
         </template>
@@ -87,9 +94,9 @@
                         <el-input v-model="dataForm.customerName" />
                       </el-form-item>
                     </el-col>
-                    <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
+                    <el-col v-if="!operation" :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                         <el-form-item label="客户ID" :label-width="formLabelWidth"  >
-                          <el-input v-model="dataForm.customerId"  />
+                          <el-input disabled v-model="dataForm.customerId"  />
                         </el-form-item>
                     </el-col>
                     <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
@@ -153,7 +160,15 @@
                     </el-col>
                     <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
                         <el-form-item label="价格校验" :label-width="formLabelWidth">
-                          <el-input v-model="dataForm.priceCheck"  />
+                          <!-- <el-input v-model="dataForm.priceCheck"  /> -->
+                          <el-select size="small"  v-model="dataForm.priceCheck">
+                            <el-option
+                            v-for="item in priceCheck"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id"
+                            />
+                          </el-select>
                         </el-form-item>
                     </el-col>
                   </el-row>
@@ -209,16 +224,14 @@ export default {
         size: 10,
         current: 1
       },
-      status:[{
-        id:1,
-        name:"有效"
-      },{
-        id:2,
-        name:"无效"
-      },{
-        id:3,
-        name:"暂停"
-      }],
+      status:[
+        {id:1,name:"正常"},
+        {id:2,name:"暂停"}
+      ],
+      priceCheck:[
+        {id:0,name:"关闭"},
+        {id:1,name:"开启"}
+      ],
       operation: false, // true:新增, false:编辑
       dialogFormVisible: false, // 控制弹出框
       formLabelWidth: '120px',   //新增宽度
@@ -254,13 +267,38 @@ export default {
       this.dialogFormVisible = true
       this.dataForm = row
     },
-    ModifyDelete() {
-      console.log('ModifyDelete')
+    ModifyDelete(row) {
+      this.$confirm('此操作将删除客户:' + row.customerName, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        row.isDeleted = 1
+        api.index.update(row).then((resp)=>{
+          if (resp.status === 200) {
+            this.$message({
+              type: 'success',
+              message: '操作成功'
+            })
+            this.getTenantList()
+          } else {
+            this.$message({
+              type: 'error',
+              message: resp.data.msg
+            })
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
     },
     //数据
     getTenantList(){
       this.loading = true
-      api.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
@@ -273,32 +311,32 @@ export default {
             if (!this.operation) {
               console.log(this.dataForm)
               // 编辑
-              // api.channelEdit(this.dataForm).then(response => {
-              //   if (response.status === 200) {
-              //     this.$message({
-              //       type: 'success',
-              //       message: '操作成功'
-              //     })
-              //     this.dialogFormVisible = false
-              //     this.getTenantList()
-              //   } else {
-              //     this.$message({
-              //       type: 'error',
-              //       message: response.data.msg
-              //     })
-              //   }
-              // })
+              api.index.update(this.dataForm).then(response => {
+                if (response.status === 200) {
+                  this.$message({
+                    type: 'success',
+                    message: '操作成功'
+                  })
+                  this.dialogFormVisible = false
+                  this.getTenantList()
+                } else {
+                  this.$message({
+                    type: 'error',
+                    message: response.data.msg
+                  })
+                }
+              })
             } else {
               console.log(this.dataForm)
             //   // 添加
-              api.userAdd(this.dataForm).then(response => {
+              api.index.userAdd(this.dataForm).then(response => {
                 if (response.status === 200) {
                   this.$message({
                     type: 'success',
                     message: '操作成功'
                   })
                   this.dialogFormVisible = false
-                  this.reLoad()
+                  this.getTenantList()
                 } else {
                   this.$message({
                     type: 'error',
@@ -310,8 +348,38 @@ export default {
           }
         })
     },
+    ModifyStatus(row,i){
+      this.$confirm('是否修改 '+row.customerName+' 的状态', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(()=>{
+        row.status = i 
+        api.index.update(row).then(response => {
+        if (response.status === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功'
+          })
+          this.dialogFormVisible = false
+          this.getTenantList()
+        } else {
+          this.$message({
+            type: 'error',
+            message: response.data.msg
+          })
+        }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });          
+      });
+      
+    },
     //搜索
-    reLoad() {
+    Search() {
       this.body.current = 1
       this.getTenantList()
     },

+ 27 - 0
src/views/userList/product.vue

@@ -0,0 +1,27 @@
+<template>
+  <div class="app-container">
+      <div class="filter-container" style="margin: 10px 0 10px 0">
+        <span class="textSpan">客户名称:</span>
+        <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
+        <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="reLoad">搜索</el-button>
+        <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="NewUser">新增</el-button>
+      </div>
+      <!-- 字段信息:客户名称、创建时间、产品状态、操作 -->
+      <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+          <el-table-column label="客户名称" align="center" show-overflow-tooltip>
+              
+          </el-table-column>
+      </el-table>
+
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>