This commit is contained in:
Viet An
2026-04-07 10:08:00 +07:00
parent f8bdfc98fc
commit 7402e61906
9 changed files with 673 additions and 436 deletions

View File

@@ -3,13 +3,15 @@
<div class="container is-fluid px-4">
<div>
<p>
Bạn chắc chắn muốn xóa lịch công nợ thời gian: {{ detail.time }} ngày - mẫu: [{{
detail.name?.toUpperCase()
}}] không?
Bạn chắc chắn muốn xóa lịch công nợ thời gian:
{{ detail.time }} ngày - mẫu: [{{ detail.name?.toUpperCase() }}]
không?
</p>
<div class="action mt-3">
<button class="button is-light" @click="handleCancel">Hủy</button>
<button class="button is-primary" @click="handleDeleteCart">Đồng ý</button>
<button class="button is-primary" @click="handleDeleteCart">
Đồng ý
</button>
</div>
</div>
</div>
@@ -19,7 +21,7 @@
<script setup>
const { $snackbar, $deleteapi } = useNuxtApp();
const emit = defineEmits(["close"]);
const emit = defineEmits(['close']);
const props = defineProps({
row: Object,
});
@@ -27,15 +29,15 @@ const props = defineProps({
const detail = JSON.parse(props.row?.detail || null);
const handleDeleteCart = async () => {
const res = await $deleteapi("bizsetting", props.row.id);
const res = await $deleteapi('user', props.row.id);
if (res) {
emit("close");
$snackbar("Xóa lịch công nợ thành công");
emit('close');
$snackbar('Xóa lịch công nợ thành công');
}
};
const handleCancel = () => {
emit("close");
emit('close');
};
</script>