Ver código fonte

fix: 提现记录(审核调整)

wuguojie 5 meses atrás
pai
commit
45350c50c7
1 arquivos alterados com 24 adições e 6 exclusões
  1. 24 6
      src/views/record/index.vue

+ 24 - 6
src/views/record/index.vue

@@ -167,7 +167,7 @@
                           <span>{{ auditForm.dPrice }}</span>
                       </el-form-item>
                       <el-form-item prop="percent" label="税率:">
-                          <el-input v-model="auditForm.percent" @change="taxChange" />
+                          <el-input-number v-model="auditForm.percent" size="small" @change="taxChange" ></el-input-number>
                       </el-form-item>
                       <el-form-item label="应扣税费:">
                           <span>{{ auditForm.taxation }}</span>
@@ -234,7 +234,7 @@
                   <el-table-column prop="dPrice" label="提现金额"></el-table-column>
                   <el-table-column prop="percentShow" label="税率"></el-table-column>
                   <el-table-column prop="rPrice" label="代扣税额"></el-table-column>
-                  <el-table-column prop="WPrice" label="提现到账金额"></el-table-column>
+                  <el-table-column prop="wprice" label="提现到账金额"></el-table-column>
                   <el-table-column prop="openingBank" label="开户行"></el-table-column>
                   <el-table-column prop="bankAccount" label="银行账户"></el-table-column>
                   <el-table-column prop="cPhone" label="手机号"></el-table-column>
@@ -411,7 +411,12 @@ export default {
 
         // 审核通过表单
         auditOpen: false,
-        auditForm: {},
+        auditForm: {
+            dPrice: 0,
+            percent: 0,
+            taxation: 0,
+            receive: 0
+        },
         auditRules: {
             percent: [
                 { required: true, message: '请输入税率', trigger: 'blur' }
@@ -424,6 +429,16 @@ export default {
   created() {
     this.getList();
   },
+    // computed: {
+    //   getNum1() {
+    //       let num1 = this.auditForm.dPrice * value * 0.01
+    //       return this.formatDecimal(num1)
+    //   },
+    //   getNum() {
+    //       let num = ((this.auditForm.dPrice * 100).toFixed(2) - (this.auditForm.taxation * 100).toFixed(2)) * 0.01
+    //       return this.formatDecimal(num)
+    //   }
+    // },
   methods: {
       // 审核通过税率填写
       // 审核通过
@@ -449,11 +464,11 @@ export default {
       },
       taxChange(e) {
           let value = Number(e)
-          console.log(123123123, e, value)
           if(value > 0) {
-              this.$set(this.auditForm, 'taxation', this.auditForm.dPrice * value * 0.01)
+              let num1 = this.auditForm.dPrice * value * 0.01
+              this.$set(this.auditForm, 'taxation', this.formatDecimal(num1))
               let num = ((this.auditForm.dPrice * 100).toFixed(2) - (this.auditForm.taxation * 100).toFixed(2)) * 0.01
-              this.$set(this.auditForm, 'receive', this.formatDecimal(num, 4))
+              this.$set(this.auditForm, 'receive', this.formatDecimal(num, 2))
           }
       },
       formatDecimal(num, decimal = 2) {
@@ -522,6 +537,9 @@ export default {
     auditIn(e) {
           this.auditOpen = true
         this.auditForm = e
+        this.auditForm.percent = 0
+        this.auditForm.taxation = 0
+        this.auditForm.receive = 0
       // var ids = {
       //   cId: e.cId,
       //   nStatus: 1,