Просмотр исходного кода

退货金额保留两位小数

yusheng 9 месяцев назад
Родитель
Сommit
7d330e90a3

+ 9 - 6
src/BIZComponents/inventoryTableDetails.vue

@@ -47,7 +47,7 @@
         </el-form-item>
       </template>
       <template v-slot:customerExpectDeliveryDeadline="scope">
-        <div v-if="scope.row.arrivalWay == 1||!scope.row.arrivalWay">
+        <div v-if="scope.row.arrivalWay == 1 || !scope.row.arrivalWay">
           {{ scope.row.customerExpectDeliveryDeadline }}
         </div>
         <div v-if="scope.row.arrivalWay == 2">
@@ -82,7 +82,7 @@
       <template v-slot:toolbar>
         <div class="headbox">
           <div class="pricebox">
-            <span class="amount">总计:{{ allPrice }}元</span>
+            <span class="amount" v-if="isAllPrice">总计:{{ allPrice }}元</span>
             <span class="amount" v-if="isDiscountTotalPrice"
               >优惠后总金额:{{ form.discountTotalPrice }}元</span
             >
@@ -157,6 +157,11 @@
         type: Boolean,
         default: false
       },
+      //
+      isAllPrice: {
+        type: Boolean,
+        default: true
+      },
       maxHeight: {
         default: 350
       },
@@ -498,16 +503,14 @@
             prop: 'modelKey',
             label: '机型',
             showOverflowTooltip: true,
-            align: 'center',
-
+            align: 'center'
           },
           {
             minWidth: 120,
             prop: 'colorKey',
             showOverflowTooltip: true,
             label: '颜色',
-            align: 'center',
-
+            align: 'center'
           },
           {
             width: 120,

+ 1 - 1
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -423,7 +423,7 @@
             this.$refs.inventoryTableref.totalAmount;
         }
 
-        return allcountAmount;
+        return parseFloat(allcountAmount).toFixed(2);
       }
     },
 

+ 1 - 0
src/views/saleManage/saleOrder/returnGoods/components/detailDialog.vue

@@ -152,6 +152,7 @@
         v-show="['20', '40'].includes(form.type)"
         ref="inventoryTabledetailRef"
         :isSinglePrice="false"
+        :isAllPrice="false"
         :isOrderNo="true"
         cacheKeyUrl="eos-saleManage-returnGoods-redressProductListDetail"
       ></inventoryTabledetail>

+ 4 - 4
src/views/saleManage/saleOrder/returnGoods/components/inventoryTable.vue

@@ -592,7 +592,7 @@
           );
           num += this.form.datasource[index].totalPrice;
         });
-        return num;
+        return parseFloat(num).toFixed(2);
       }
     },
     mounted() {
@@ -734,10 +734,10 @@
               return sum + Number(item.discountTotalPrice);
             }, 0)
             .toFixed(2);
-          this.$emit('update:payAmount', this.payAmount);
-          this.$store.commit('returnGoods/setAllcountAmount', sum);
+          // this.$emit('update:payAmount', this.payAmount);
+          // this.$store.commit('returnGoods/setAllcountAmount', sum);
         } else {
-          this.$store.commit('returnGoods/setAllcountAmount', 0);
+          // this.$store.commit('returnGoods/setAllcountAmount', 0);
         }
       },
       orderNoChange(row, item) {