billisme 4 years ago
parent
commit
c9ce25b28d
4 changed files with 52 additions and 15 deletions
  1. 1 1
      src/views/bussiness/order.vue
  2. 14 2
      src/views/guosen/bussiness.vue
  3. 7 0
      src/views/guosen/debit.vue
  4. 30 12
      src/views/wel/index.vue

+ 1 - 1
src/views/bussiness/order.vue

@@ -45,7 +45,7 @@
     methods: {
       handleChange(column) {
         this.type = column
-        if(type.prop==='tab1'){
+        if(this.type.prop==='tab1'){
           this.$nextTick(()=>{
             this.$refs.chongzhi.searchReset();
           })

+ 14 - 2
src/views/guosen/bussiness.vue

@@ -125,6 +125,8 @@
               label: "api文档",
               prop: "apiFilePath",
               slot: true,
+              display: false,
+              hide: true
             },
 
             {
@@ -133,9 +135,11 @@
               labelWidth: 130,
               span: 24,
               hide: true,
+              addDisplay: false,
+              editDisplay: false,
               rules: [{
                 required: false,
-                message: "请输入关联账号的密码",
+                message: "请输入回调地址,比如:http://xxx.xxx.xxx.xxx/xxx",
                 trigger: "blur"
               }]
             },
@@ -199,7 +203,9 @@
         });
       },
       rowUpdate(row, index, done, loading) {
-        row.userPassword = md5(row.userPassword)
+        if(row.userPassword){
+          row.userPassword = md5(row.userPassword)
+        }
         update(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -275,6 +281,12 @@
       },
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
+          let userPasswordProp = this.findObject(this.option.column, "userPassword");
+          if(type == 'edit'){
+            userPasswordProp.rules[0].required = false;
+          }else{
+            userPasswordProp.rules[0].required = true;
+          }
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
           });

+ 7 - 0
src/views/guosen/debit.vue

@@ -227,6 +227,13 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "描述",
+              prop: "failReason",
+              width: 200,
+              addDisplay:false,
+              editDisplay:false,
+            },
             {
               label: "时间",
               prop: "updateTime",

+ 30 - 12
src/views/wel/index.vue

@@ -114,12 +114,16 @@
                   <el-link target="_blank" type="success" :href="bussiness.apiFilePath">Api文档下载(打开需输入密钥)</el-link>
                 </span>
                 <div>
-                  <el-button style="margin-left:50px;" type="primary" class="button" @click="editBussiness">编辑资料</el-button>
+                  <el-button style="margin-left:50px;" type="primary" class="button" @click="editBussiness">商户配置(可设置回调地址)</el-button>
                   <span style="color: white;margin-left: 40px;">服务费率(千分比):{{bussiness.serviceRate}}</span>
+                  <span style="color: white;margin-left: 40px;">每日限额(元):{{bussiness.maxLimit}}</span>
+                </div>
+                <div style="color: white;margin-left: 40px;">
+                  <br/>
+                  <span style="color: white;margin-left: 40px;">商户回调地址:{{bussiness.recallUrl}}</span>
                 </div>
                 <div style="margin-left: 20px;margin-top:30px;">
                   <span style="color: white;">账户余额</span>
-
                 </div>
                 <div style="margin-left: 20px;margin-top:10px;padding-bottom: 20px;">
                   <span>
@@ -130,6 +134,18 @@
                   </span>
                 </div>
 
+                <div style="margin-left: 20px;margin-top:30px;">
+                  <span style="color: white;">在途金额</span>
+                </div>
+                <div style="margin-left: 20px;margin-top:10px;padding-bottom: 20px;">
+                  <span>
+                    <avue-avatar style="margin-bottom: 30px;" src="/img/bg/rmb.png"></avue-avatar>
+                  </span>
+                  <span style="font-size:60px;margin-left:20px;margin-bottom: 20px;color:white;">
+                    {{bussiness.freeze}}
+                  </span>
+                </div>
+
               </div>
             </el-col>
             <el-col span="12" height="400px">
@@ -359,9 +375,10 @@
               labelWidth: 130,
               span: 24,
               hide: true,
+              placeholder: "请输入回调地址,比如:http://xxx.xxx.xxx.xxx/xxx",
               rules: [{
                 required: false,
-                message: "请输入关联账号的密码",
+                message: "请输入回调地址,比如:http://xxx.xxx.xxx.xxx/xxx",
                 trigger: "blur"
               }]
             },
@@ -722,6 +739,7 @@
     },
     methods: {
       submitBussiness() {
+        this.bussiness.userPassword = null;
         update(this.bussiness).then(res => {
           this.$message({
             type: "success",
@@ -732,7 +750,6 @@
 
       },
       convertCurrency(money) {
-        debugger
         //汉字的数字
         var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
         //基本单位
@@ -856,7 +873,6 @@
         this.billrecord.bussinessFee = this.statDatas[1].value
         //易宝订单
         this.yibaoOrder.orderId = this.billrecord.orderId; //商户请求号
-        debugger
         this.yibaoOrder.orderAmount = this.money; //充值金额
         // this.yibaoOrder.payType = "B2B"; //"B2C:个人网银" "B2B:企业网银
         this.yibaoOrder.goodsName = "充值"
@@ -864,9 +880,9 @@
         // this.yibaoOrder.bankCode = "ABC,ICBC,BOC,CMBCHINA,SZPA,CCB"; //银行编码
         this.yibaoOrder.redirectUrl = "https://music.nanyue6688.com/cyzhtest/#/wel/index";
         addBillrecord(this.billrecord).then(res => {
+          console.log(JSON.stringify(res))
           chongzhi(this.yibaoOrder).then(res => {
             location.href = res.data.data.payUrl;
-
             console.log(JSON.stringify(res))
           })
         })
@@ -949,11 +965,7 @@
           method: "post",
           data: this.query
         }).then(res => {
-
           this.drawRealDemandLine(res.data.data.dateList, res.data.data.unClearList, res.data.data.clearedList)
-
-
-
         })
       },
       getData() {
@@ -974,7 +986,11 @@
       },
 
       drawPie() {
-        let todayOutChart = echarts.init(document.getElementById('todayOut'));
+        let $todayOut = document.getElementById('todayOut');
+        if(!$todayOut){
+          return ;
+        }
+        let todayOutChart = echarts.init($todayOut);
         todayOutChart.setOption(this.optionTodayOut);
 
         let histroyOuntChart = echarts.init(document.getElementById('historyOut'));
@@ -989,7 +1005,9 @@
       //柱形图
       drawRealDemandLine(dateList, unclearDataList, clearedDataList) {
         // 基于准备好的dom,初始化echarts实例
-        let myChart = echarts.init(document.getElementById('orderStatistics'))
+        let $orderStatistics = document.getElementById('orderStatistics');
+        if (!$orderStatistics) return;
+        let myChart = echarts.init($orderStatistics)
         // 基于准备好的dom,初始化echarts实例
         // 绘制图表
         myChart.setOption({