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

feat: 销售订单-发货确认单发货数量和确认数量不一致状态异常,合计计算精度丢失,

liujt 9 месяцев назад
Родитель
Сommit
d590cec2e1

+ 17 - 3
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -763,7 +763,7 @@
               item['modelKey'] = val.modelKey;
               item['colorKey'] = val.colorKey;
 
-              item.totalPrice = item.singlePrice * item.measureQuantity;
+              item.totalPrice = (item.singlePrice * item.measureQuantity).toFixed(2);
             }
           });
         });
@@ -868,11 +868,25 @@
           this.$set(this.form.productList[index], 'totalCount', 0);
         }
         if (row.totalCount && row.singlePrice) {
-          console.log(row.totalCount * row.singlePrice);
+          // console.log(row.totalCount * row.singlePrice);
           this.$set(
             this.form.productList[index],
             'totalPrice',
-            row.totalCount * row.singlePrice
+            (row.totalCount * row.singlePrice).toFixed(2)
+          );
+        }
+        // console.log(row.totalCount, row.saleCount);
+        if(+row.totalCount === +row.saleCount) {
+          this.$set(
+            this.form.productList[index],
+            'isException',
+            0
+          );
+        } else {
+          this.$set(
+            this.form.productList[index],
+            'isException',
+            1
           );
         }
       },