| | |
| | | import downLoadFile from "@/hook/downLoadFile" |
| | | import footSum from "@/hook/footSum" |
| | | import {useI18n} from "vue-i18n" |
| | | import {multiply} from '@/utils/decimal' |
| | | import {multiply,multiplyAuto,divideAuto} from '@/utils/decimal' |
| | | const { t } = useI18n() |
| | | |
| | | let dialogTableVisible = ref(false) |
| | |
| | | } |
| | | |
| | | const area = (row) => { |
| | | return parseFloat((row.width * row.height/1000000).toFixed(company.decValue)) |
| | | return parseFloat(divideAuto(row.width * row.height,1000000,company.decValue)) |
| | | } |
| | | const countArea = (row) => { |
| | | const area = parseFloat((row.width * row.height/1000000).toFixed(company.decValue)) |
| | | const area = parseFloat(divideAuto(row.width * row.height,1000000,company.decValue)) |
| | | let areaSum = 0 |
| | | // 获取保留面积, |
| | | const decValue = company.decValue |
| | | switch (titleUploadData.value.calculateType){ |
| | | case 2:{ |
| | | areaSum = parseFloat((row.width * row.height * row.quantity/1000000).toFixed(decValue)) |
| | | areaSum = parseFloat(divideAuto(row.width * row.height* row.quantity,1000000,company.decValue)) |
| | | break |
| | | } |
| | | default :{ |
| | | areaSum = parseFloat((area * row.quantity).toFixed(decValue)) |
| | | areaSum = parseFloat(multiplyAuto(area ,row.quantity,company.decValue)) |
| | | break |
| | | } |
| | | } |
| | |
| | | const decValue = company.decValue |
| | | |
| | | if(titleUploadData.value.calculateType===1){ |
| | | item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toFixed(decValue)) |
| | | item.computeGrossArea = parseFloat(multiplyAuto(item.computeArea,item.quantity,decValue)) |
| | | }else if(titleUploadData.value.calculateType===2){ |
| | | item.computeGrossArea = item.grossArea |
| | | } |
| | |
| | | if( !isNaN(item.computeArea*1) && item.computeArea != null && trueArea < errorArea.value){ |
| | | |
| | | item.computeArea = errorArea.value |
| | | item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toFixed(2)) |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | item.computeGrossArea = parseFloat(multiply(item.computeArea,item.quantity)) |
| | | item.grossAmount=parseFloat(multiply(item.price , item.computeGrossArea)) |
| | | } |
| | | }) |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | |
| | | |
| | | if( !isNaN(item.computeArea*1) && item.computeArea != null ){ |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=parseFloat((item.price * item.quantity).toFixed(2)) |
| | | item.grossAmount=parseFloat(multiply(item.price , item.quantity)) |
| | | }else{ |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | item.grossAmount=parseFloat(multiply(item.price , item.computeGrossArea)) |
| | | } |
| | | } |
| | | }) |