<template>
    <div style="padding-left: 5%; margin-top: 20px;">
        <el-table :data="kingdeeFiledDetailData" border>
            <el-table-column label="金蝶字段" prop="kingdeeField" />
            <el-table-column label="是否是点编码" prop="isSpotNumber" />
            <el-table-column label="是否是点名称" prop="isSpotName" />
            <el-table-column label="是否是明细" prop="isDetailField" />
            <el-table-column label="第三方字段" prop="thirdPartyField" />
            <el-table-column label="操作" width="135">
                <template #default="scope">
                    <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                    <el-button size="small" type="danger" @click="handleDelete(scope.row.id)">删除
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>


</template>

<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus';



const kingdeeFiledDetailData = ref()

const handleEdit = (index: any, row: any) => { }
const handleDelete = (id: number) => {
    ElMessageBox.confirm(
        '确定删除该配置?',
        '配置',
        {
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }
    )
        .then(() => {
            ElMessage({
                type: 'success',
                message: '删除成功',
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消',
            })
        })
}

</script>