浏览代码

油卡 手机卡充值添加通道质量

dujingxian 4 年之前
父节点
当前提交
e7df71a780
共有 3 个文件被更改,包括 48 次插入2 次删除
  1. 20 1
      src/pages/subPages/mobileCard.vue
  2. 20 1
      src/pages/subPages/oilCard.vue
  3. 8 0
      src/utils/constants.js

+ 20 - 1
src/pages/subPages/mobileCard.vue

@@ -26,6 +26,15 @@
             size="small">{{item}}</el-button>
             size="small">{{item}}</el-button>
             <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择充值金额</span>
             <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择充值金额</span>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="通道质量:">
+          <el-button
+            :type="item.value === qualityBtn ? 'success' : 'info'"
+            v-for="item in qualityCon"
+            :key="item.value"
+            @click="hQucharge(item)"
+            size="small">{{item.label}}</el-button>
+            <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择通道质量</span>
+        </el-form-item>
         <el-form-item label="手机号:">
         <el-form-item label="手机号:">
             <el-input
             <el-input
               type="textarea"
               type="textarea"
@@ -121,6 +130,7 @@
 <script>
 <script>
 // getRechargeAmount-充值金额 OilCardRecharge-油卡充值
 // getRechargeAmount-充值金额 OilCardRecharge-油卡充值
 import { getRechargeAmount, OilCardRecharge } from '@/api'
 import { getRechargeAmount, OilCardRecharge } from '@/api'
+import { qualityCon } from '@/utils/constants'
 export default {
 export default {
   name: 'mobileCard',
   name: 'mobileCard',
   data() {
   data() {
@@ -158,7 +168,11 @@ export default {
       loadingSeeCard: false,
       loadingSeeCard: false,
       disabled: false,
       disabled: false,
       disabledRecharge: false,
       disabledRecharge: false,
-      btnLoading: false
+      btnLoading: false,
+      // 通道质量
+      qualityCon,
+      // 通道按钮
+      qualityBtn: 1
     }
     }
   },
   },
   created() {
   created() {
@@ -312,6 +326,7 @@ export default {
         let param = new URLSearchParams()
         let param = new URLSearchParams()
         param.append('cardno', this.splitStr)
         param.append('cardno', this.splitStr)
         param.append('amount', this.curMoney)
         param.append('amount', this.curMoney)
+        param.append('quality', this.qualityBtn)
         // const res = await OilCardRecharge({
         // const res = await OilCardRecharge({
         //   cardno: this.splitStr,
         //   cardno: this.splitStr,
         //   amount: this.curMoney
         //   amount: this.curMoney
@@ -334,6 +349,10 @@ export default {
         this.loading = false
         this.loading = false
       }
       }
     },
     },
+     // 选择通道质量
+    hQucharge(item) {
+      this.qualityBtn = item.value
+    }
   }
   }
 }
 }
 </script>
 </script>

+ 20 - 1
src/pages/subPages/oilCard.vue

@@ -22,6 +22,15 @@
             size="small">{{item}}</el-button>
             size="small">{{item}}</el-button>
             <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择充值金额</span>
             <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择充值金额</span>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="通道质量:">
+          <el-button
+            :type="item.value === qualityBtn ? 'success' : 'info'"
+            v-for="item in oilQuCon"
+            :key="item.value"
+            @click="hQucharge(item)"
+            size="small">{{item.label}}</el-button>
+            <span style="margin-left: 20px;font-size: 13px;color: #909399;">请选择通道质量</span>
+        </el-form-item>
         <el-form-item label="卡号:">
         <el-form-item label="卡号:">
             <el-input
             <el-input
               type="textarea"
               type="textarea"
@@ -110,6 +119,7 @@
 <script>
 <script>
 // getRechargeAmount-充值金额 OilCardRecharge-油卡充值
 // getRechargeAmount-充值金额 OilCardRecharge-油卡充值
 import { getRechargeAmount, OilCardRecharge } from '@/api'
 import { getRechargeAmount, OilCardRecharge } from '@/api'
+import { oilQuCon } from '@/utils/constants'
 export default {
 export default {
   name: 'oilCard',
   name: 'oilCard',
   data() {
   data() {
@@ -147,7 +157,11 @@ export default {
       // 失败数
       // 失败数
       error_no: 0,
       error_no: 0,
       disabled: false,
       disabled: false,
-      disabledRecharge: false
+      disabledRecharge: false,
+      // 通道质量
+      oilQuCon,
+      // 通道按钮
+      qualityBtn: 1
     }
     }
   },
   },
   created() {
   created() {
@@ -314,6 +328,7 @@ export default {
         let param = new URLSearchParams()
         let param = new URLSearchParams()
         param.append('cardno', this.splitStr)
         param.append('cardno', this.splitStr)
         param.append('amount', this.curMoney)
         param.append('amount', this.curMoney)
+        param.append('quality', this.qualityBtn)
         // const res = await OilCardRecharge({
         // const res = await OilCardRecharge({
         //   cardno: this.splitStr,
         //   cardno: this.splitStr,
         //   amount: this.curMoney
         //   amount: this.curMoney
@@ -355,6 +370,10 @@ export default {
             // }
             // }
         }
         }
     },
     },
+    // 选择通道质量
+    hQucharge(item) {
+      this.qualityBtn = item.value
+    }
   }
   }
 }
 }
 </script>
 </script>

+ 8 - 0
src/utils/constants.js

@@ -58,6 +58,14 @@ export const qualityCon = [
   {value: 2, label: '快充'},
   {value: 2, label: '快充'},
   {value: 3, label: '卡密'},
   {value: 3, label: '卡密'},
   {value: 4, label: '三方'},
   {value: 4, label: '三方'},
+  {value: 5, label: '慢充2小时'},
+  {value: 6, label: '慢充6小时'},
+  {value: 7, label: '慢充24小时'},
+]
+
+// 油卡充值通道质量
+export const oilQuCon = [
+  {value: 1, label: '普充'},
   {value: 5, label: '慢充'}
   {value: 5, label: '慢充'}
 ]
 ]