|
|
@@ -198,7 +198,7 @@
|
|
|
import templateTable from "@/components/TemplateTable/index.vue";
|
|
|
import { mapState } from "vuex";
|
|
|
import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
|
|
|
-
|
|
|
+import { Decimal } from 'decimal.js'
|
|
|
export default {
|
|
|
name: "InvoicingUnsettled",
|
|
|
components: { templateTable, yearMonthYay },
|
|
|
@@ -512,8 +512,14 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
total() {
|
|
|
- var amount = this.form.insuranceHandlingList.reduce((sum, item) => sum + parseFloat(item.settlementAmount ), 0);
|
|
|
- return Object.is(Number(amount), NaN)?0:amount;
|
|
|
+ var sum =0;
|
|
|
+ if(this.form.insuranceHandlingList.length>0){
|
|
|
+ this.form.insuranceHandlingList.forEach(item => {
|
|
|
+ sum = new Decimal(sum).plus((item.settlementAmount==''||item.settlementAmount==null)?new Decimal(0): new Decimal(item.settlementAmount)).toString();
|
|
|
+ });
|
|
|
+ return Object.is(Number(sum), NaN)?0:sum;
|
|
|
+ }
|
|
|
+ return sum;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|