| | |
| | | const area = parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | let areaSum = 0 |
| | | switch (titleUploadData.value.calculateType){ |
| | | |
| | | case 2:{ |
| | | areaSum = parseFloat((row.width * row.height * row.quantity/1000000).toFixed(2)) |
| | | break |
| | | } |
| | | default :{ |
| | | areaSum = parseFloat((area * row.quantity).toFixed(2)) |
| | | areaSum = parseFloat((row.computeArea * row.quantity).toFixed(2)) |
| | | break |
| | | } |
| | | } |
| | |
| | | |
| | | //行单元格修改修改触发此事件 |
| | | const editClosedEvent = ({ row, column }) => { |
| | | if(titleUploadData.value.orderReview===2){ |
| | | return |
| | | } |
| | | //判断修改相应的数值修改面积与金额 |
| | | if (['width', 'height', 'quantity', 'price'].includes(column.property)) { |
| | | row.area = area(row) |
| | | row.grossArea = countArea(row) |
| | | if(![ 'quantity', 'price'].includes(column.property)){ |
| | | row.computeArea = row.area |
| | | row.computeGrossArea = row.grossArea |
| | | } |
| | | |
| | | row.computeArea = row.area |
| | | row.computeGrossArea = row.grossArea |
| | | if(titleUploadData.value.calculateType===3){ |
| | | row.grossAmount=parseFloat((row.price * row.quantity).toFixed(2)) |
| | | }else{ |
| | |
| | | |
| | | }else if(column.property === 'computeArea'){ |
| | | if(titleUploadData.value.calculateType!==3){ |
| | | row.computeGrossArea = row.computeArea * row.quantity |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | } |
| | | |
| | |
| | | |
| | | if( !isNaN(item.computeArea*1) && item.computeArea != null ){ |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.computeGrossArea = item.computeArea*item.quantity |
| | | item.grossAmount=parseFloat((item.price * item.quantity).toFixed(2)) |
| | | }else{ |
| | | item.grossArea = countArea(item) |