ปรับชื่อ defineStore ระบบ วินัย
This commit is contained in:
parent
074fc05412
commit
7c0284a87a
7 changed files with 42 additions and 13 deletions
|
|
@ -118,6 +118,25 @@ const fileUploadDoc = async (files: any) => {
|
|||
});
|
||||
};
|
||||
|
||||
function selectLevel(val: string) {
|
||||
let dayNum = 0;
|
||||
if (val == "0") {
|
||||
dayNum = 45;
|
||||
} else if (val == "1") {
|
||||
dayNum = 30;
|
||||
} else {
|
||||
dayNum = 15;
|
||||
}
|
||||
|
||||
if (dateconsideration.value) {
|
||||
const currentDate = new Date(dateconsideration.value);
|
||||
const newDate = new Date(
|
||||
currentDate.getTime() + dayNum * 24 * 60 * 60 * 1000
|
||||
);
|
||||
datewarn.value = newDate;
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -341,6 +360,7 @@ function onSubmit() {
|
|||
map-options
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกระดับการพิจารณา'}`]"
|
||||
lazy-rules
|
||||
@update:model-value="selectLevel(considerationLevel)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3"></div>
|
||||
|
|
@ -366,10 +386,10 @@ function onSubmit() {
|
|||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="datewarn != null ? date2Thai(datewarn) : null"
|
||||
label="วันที่แจ้งเตือนล่ววงหน้า"
|
||||
label="วันที่แจ้งเตือนล่วงหน้า"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกวันที่แจ้งเตือนล่ววงหน้า'}`,
|
||||
!!val || `${'กรุณาเลือกวันที่แจ้งเตือนล่วงหน้า'}`,
|
||||
]"
|
||||
lazy-rules
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
// importStroe
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, dialogConfirm } = mixin;
|
||||
const $q = useQuasar();
|
||||
|
||||
const props = defineProps({
|
||||
next: {
|
||||
|
|
@ -23,7 +25,14 @@ const dateYear = ref<number>(2023);
|
|||
const date = ref<Date | null>(null);
|
||||
|
||||
function onSubmit() {
|
||||
next();
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
next();
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่"
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -207,12 +216,12 @@ function onSubmit() {
|
|||
</div>
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
unelevated
|
||||
label="next"
|
||||
color="public"
|
||||
color="secondary"
|
||||
icon="mdi-content-save-outline"
|
||||
type="submit"
|
||||
class="q-px-md"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue