no message
This commit is contained in:
parent
c23af7ec9b
commit
3375421ef5
4 changed files with 171 additions and 15 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue