<template>
	<el-table :data="paymentDetailsList" :border="showBorder" @selection-change="handleSelectionChange">
		<!-- <el-table-column type="selection" width="55" align="center" />
		<el-table-column label="设备金额" align="center" prop="id" /> -->
		<el-table-column label="订单号" align="center" prop="orderNumer" v-if="showOrderNumer"/>
		<el-table-column label="设备" align="center" prop="configId" v-if="showConfigId" />
		<el-table-column label="月份" align="center" prop="year">
			<template #default="scope">
				<span class="">{{scope.row.year}}个月</span>
			</template>
		</el-table-column>
		<el-table-column label="设备金额" align="center" prop="configMoney">
			<template #default="scope">
				<span class="text-price">{{scope.row.configMoney}}</span>
			</template>
		</el-table-column>
		</el-table>
</template>

<script setup>
	const emit = defineEmits();
	
	const props = defineProps({
		paymentDetailsList: Array,
		showConfigId:Boolean,
		showBorder:Boolean,
		showOrderNumer:Boolean,
		
	});

	const ids = ref([]);

	// 多选框选中数据
	function handleSelectionChange(selection) {
		ids.value = selection.map(item => item.id);
		emit("handleSelectionChange", ids.value);
	}
</script>

<style>
</style>
