Sfoglia il codice sorgente

djliubi反向操作

liuhj 2 mesi fa
parent
commit
32b7ee2ae1
1 ha cambiato i file con 13 aggiunte e 4 eliminazioni
  1. 13 4
      src/components/OP/OpDecreasePayments.vue

+ 13 - 4
src/components/OP/OpDecreasePayments.vue

@@ -112,7 +112,7 @@
                     </div>
                     </div>
                     <div style="width: 394px;">
                     <div style="width: 394px;">
                         <el-form-item label="付款百分比:" prop="paymentPercent" label-width="160px">
                         <el-form-item label="付款百分比:" prop="paymentPercent" label-width="160px">
-                            <el-input-number style="width:100%" :precision="0" @blur="Sumups"  placeholder="付款百分比"
+                            <el-input-number style="width:100%" :precision="4" @blur="Sumups"  placeholder="付款百分比"
                                 v-model="DecreasePaymentsData.paymentPercent" :controls='false'>
                                 v-model="DecreasePaymentsData.paymentPercent" :controls='false'>
                             </el-input-number>
                             </el-input-number>
                             <!-- <el-input placeholder="付款百分比" suffix-icon="%" v-model="DecreasePaymentsData.paymentPercent">
                             <!-- <el-input placeholder="付款百分比" suffix-icon="%" v-model="DecreasePaymentsData.paymentPercent">
@@ -200,7 +200,7 @@
                     </div>
                     </div>
                     <div style="width: 394px;">
                     <div style="width: 394px;">
                         <el-form-item label="实际付款金额:" label-width="160px">
                         <el-form-item label="实际付款金额:" label-width="160px">
-                            <el-input-number disabled style="width:56%" :precision="2" placeholder="实际付款金额"
+                            <el-input-number @blur="PaymentPercentage" :disabled="DecreasePaymentsData.feeTotal === 0 ||DecreasePaymentsData.paymentType=='全款'?true:false" style="width:56%" :precision="2" placeholder="实际付款金额"
                                 v-model="DecreasePaymentsData.actualPaymentAmount" :controls='false'>
                                 v-model="DecreasePaymentsData.actualPaymentAmount" :controls='false'>
                             </el-input-number>
                             </el-input-number>
                             <el-select disabled v-model="DecreasePaymentsData.currency" style="width: 40%;">
                             <el-select disabled v-model="DecreasePaymentsData.currency" style="width: 40%;">
@@ -980,7 +980,7 @@ export default {
             for (let g = 0; g < suppliesarr.length; g++) {
             for (let g = 0; g < suppliesarr.length; g++) {
                 this.DecreasePaymentsData.price += suppliesarr[g].price;
                 this.DecreasePaymentsData.price += suppliesarr[g].price;
                 this.DecreasePaymentsData.priceName += suppliesarr[g].value + '、'
                 this.DecreasePaymentsData.priceName += suppliesarr[g].value + '、'
-                this.DecreasePaymentsData.remark += suppliesarr[g].value + '   ' + suppliesarr[g].price + ' CNY 、'
+                // this.DecreasePaymentsData.remark += suppliesarr[g].value + '   ' + suppliesarr[g].price + ' CNY 、'
             }
             }
             this.DecreasePaymentsData.priceName = this.DecreasePaymentsData.priceName.substring(0, this.DecreasePaymentsData.priceName.length - 1);
             this.DecreasePaymentsData.priceName = this.DecreasePaymentsData.priceName.substring(0, this.DecreasePaymentsData.priceName.length - 1);
             this.DecreasePaymentsData.currency = 836;
             this.DecreasePaymentsData.currency = 836;
@@ -1001,7 +1001,7 @@ export default {
             this.DecreasePaymentsData.price = val.price;
             this.DecreasePaymentsData.price = val.price;
             this.DecreasePaymentsData.currency = 836;
             this.DecreasePaymentsData.currency = 836;
             this.DecreasePaymentsData.quantity = 1;
             this.DecreasePaymentsData.quantity = 1;
-            this.DecreasePaymentsData.remark = val.value + '   ' + val.price + ' CNY'
+            // this.DecreasePaymentsData.remark = val.value + '   ' + val.price + ' CNY'
             if (val.paymentType) {
             if (val.paymentType) {
                 this.DecreasePaymentsData.paymentType = val.paymentType;
                 this.DecreasePaymentsData.paymentType = val.paymentType;
                 this.DecreasePaymentsData.paymentPercent = val.paymentPercent;
                 this.DecreasePaymentsData.paymentPercent = val.paymentPercent;
@@ -1036,6 +1036,15 @@ export default {
                 }
                 }
             })
             })
         },
         },
+        //计算付款百分比
+        PaymentPercentage(){
+            if(this.DecreasePaymentsData.feeTotal!=null&&this.DecreasePaymentsData.feeTotal!=0){
+                this.DecreasePaymentsData.paymentPercent = new Decimal(this.DecreasePaymentsData.actualPaymentAmount/new Decimal(this.DecreasePaymentsData.feeTotal)).mul(100);
+            }else{
+                this.DecreasePaymentsData.paymentPercent=0;
+            }
+        },
+
         WorldGamesData() {
         WorldGamesData() {
             var url = "/api/Groups/WorldGamesData"
             var url = "/api/Groups/WorldGamesData"
             var that = this
             var that = this