no message

This commit is contained in:
setthawutttty 2024-02-21 11:28:54 +07:00
parent c23af7ec9b
commit 3375421ef5
4 changed files with 171 additions and 15 deletions

View file

@ -37,6 +37,7 @@ const props = defineProps({
shortName: { type: String, required: true },
});
const isEdit = ref<boolean>(false)
const modalAdd = ref<boolean>(false);
const reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
const isReadonly = ref<boolean>(false); //
@ -82,6 +83,12 @@ const listMenu = ref<ListMenu[]>([
type: "copy",
color: "blue-6",
},
{
label: "แก้ไข",
icon: "mdi-pencil",
type: "edit",
color: "edit",
},
{
label: "ลบ",
icon: "delete",
@ -486,6 +493,16 @@ function copyDetiail(data: RowDetailPositions) {
modalAdd.value = true;
dataCopy.value = data;
}
/**
* แกไขขอม
* @param data อมลตำแหน
*/
function editDetiail(data: RowDetailPositions) {
isEdit.value = true;
modalAdd.value = true;
dataCopy.value = data;
console.log(isEdit.value)
}
/**
* งค css ออกไปตามเงอนไข
@ -908,7 +925,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
@click="
item.type === 'copy'
? copyDetiail(props.row)
: deletePos(props.row.id)
: item.type === 'edit' ? editDetiail(props.row) : deletePos(props.row.id)
"
>
<q-item-section avatar>
@ -946,6 +963,8 @@ async function emitSearch(keyword: string, typeSelect: string) {
v-model:modalAdd="modalAdd"
:emitSearch="emitSearch"
:data="dataCopy"
v-model:is-edit="isEdit"
:get-data="searchInput"
/>
</template>