diff --git a/src/views/inm/helpso.vue b/src/views/inm/helpso.vue index 8c7ddb97..9660d897 100644 --- a/src/views/inm/helpso.vue +++ b/src/views/inm/helpso.vue @@ -214,7 +214,7 @@ export default { that.$API.inm.warehouse.batch.req({ page: 0, count__gte: 1, material__type__in: "40" }).then((res) => { res.forEach(item => { let data0 = []; - let total = Number(item.material_.unit_price)*Number(item.count); + let total = Math.round(Number(item.material_.unit_price)*Number(item.count)*100)/100; data0.push(item.update_time); data0.push(item.material_.number); data0.push(item.material_.name); diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index 0e51f43f..a7a7c71b 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -104,15 +104,9 @@ {{scope.row.count}} - - + - @@ -721,13 +715,9 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { } } if(index==7&&this.cate == 'helpso'&&this.project_code=='gx'){ - let sumsss = 0; - data.forEach((item)=>{ - if(item.count&&item.material_.unit_price&&item.material_.unit_price!==null){ - sumsss += Number(item.count)*Number(item.material_.unit_price); - } - }) - sums[index] =sumsss; + // 直接用后端汇总的单据总金额 + const total = this.mioObj ? this.mioObj.total_price : null; + sums[index] = total !== null && total !== undefined ? total : ''; } });