แก้ไข ui เพิ่ม funciton// รอบการปฏิบัติงาน

This commit is contained in:
AnandaTon 2023-12-20 15:48:07 +07:00
parent c7e7abe441
commit 624f9cbd47
3 changed files with 212 additions and 1 deletions

View file

@ -68,6 +68,13 @@ const formData = reactive<FormData>({
isActive: false,
});
/**FunctionCheckbox แก้ไขสถานะ */
function checkDefault() {
if (formData.isDefault === true) {
formData.isActive = true;
}
}
/** Function validateForm*/
function validateForm() {
const hasError = [];
@ -356,7 +363,11 @@ watch(
<div class="row items-center q-my-sm justify-between">
<p class="q-ma-none">เวลา Default</p>
<label class="toggle-control">
<input type="checkbox" v-model="formData.isDefault" />
<input
type="checkbox"
v-model="formData.isDefault"
@change="checkDefault()"
/>
<span class="control"></span>
</label>
</div>

View file

@ -21,6 +21,8 @@ const dataStore = useChangeRoundDataStore();
const $q = useQuasar();
const modal = ref<boolean>(false);
const dateWork = ref<any>();
const modalFix = ref<boolean>(false);
const editCheck = ref<string>("");
const DataRow = ref<any>();
const formData = reactive<dataPost>({
@ -45,9 +47,14 @@ function Openmodal(check: string, detail: any) {
}
}
function OpenmodalFix(detail: any) {
modalFix.value = true;
}
/** Function closePopup */
function closeDialog() {
modal.value = false;
modalFix.value = false;
}
/** Function ค้นหาข้อมูล */
@ -180,6 +187,15 @@ function searchData() {
<q-item-label>ประวการเปลยนรอบ</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@click="OpenmodalFix(props.row)"
>
<q-item-section>
<q-item-label>แกไขปฏนวนทำงาน</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
@ -198,6 +214,52 @@ function searchData() {
:personId="DataRow == null ? '' : DataRow.profileId"
@update:change-page="dataStore.changePage"
/>
<q-dialog v-model="modalFix" persistent>
<q-card style="min-width: 800px"
><q-toolbar>
<q-toolbar-title class="text-subtitle1 text-bold">
{{ "แก้ไขปฏิทินวันทำงาน" }}
</q-toolbar-title>
<q-btn
icon="close"
unelevated
round
dense
@click="closeDialog"
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
<q-separator color="grey-4" />
<q-form @submit="closeDialog" class="q-gutter-md">
<div class="q-pa-md">
<q-radio
name="dateWork"
v-model="dateWork"
val="line"
label="ทำงาน 5 วัน"
/>
<q-radio
name="dateWork"
v-model="dateWork"
val="rectangle"
label="ทำงาน 6 วัน"
/>
</div>
<q-separator color="grey-4" />
<div class="q-pa-xs">
<div class="row justify-end q-mr-sm q-py-sm">
<q-btn
id="onSubmit"
type="submit"
unelevated
label="บันทึก"
class="q-px-md items-center"
color="secondary"
/>
</div>
</div>
</q-form> </q-card
></q-dialog>
</template>
<style scoped lang="scss">
.q-table tbody td:before.no-background {