Merge pull request '커뮤니티 정산 - 합계 추가' (#23) from test into main
Reviewed-on: #23
This commit is contained in:
		| @@ -43,8 +43,6 @@ | ||||
|             조회 | ||||
|           </v-btn> | ||||
|         </v-col> | ||||
|  | ||||
|  | ||||
|         <v-spacer /> | ||||
|       </v-row> | ||||
|       <v-row> | ||||
| @@ -57,6 +55,20 @@ | ||||
|             class="elevation-1" | ||||
|             hide-default-footer | ||||
|           > | ||||
|             <template slot="body.prepend"> | ||||
|               <tr> | ||||
|                 <td colspan="4"> | ||||
|                   합계 | ||||
|                 </td> | ||||
|                 <td>{{ sumField('totalCan').toLocaleString() }} 캔</td> | ||||
|                 <td>{{ sumField('totalKrw').toLocaleString() }} 원</td> | ||||
|                 <td>{{ sumField('paymentFee').toLocaleString() }} 원</td> | ||||
|                 <td>{{ sumField('settlementAmount').toLocaleString() }} 원</td> | ||||
|                 <td>{{ sumField('tax').toLocaleString() }} 원</td> | ||||
|                 <td>{{ sumField('depositAmount').toLocaleString() }} 원</td> | ||||
|               </tr> | ||||
|             </template> | ||||
|  | ||||
|             <template v-slot:item.title="{ item }"> | ||||
|               {{ item.title }}... | ||||
|             </template> | ||||
| @@ -211,6 +223,10 @@ export default { | ||||
|       this.$dialog.notify.error(message) | ||||
|     }, | ||||
|  | ||||
|     sumField(key) { | ||||
|       return this.items.reduce((a, b) => a + (b[key] || 0), 0) | ||||
|     }, | ||||
|  | ||||
|     async next() { | ||||
|       await this.getCalculateCommunityPost() | ||||
|     }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user