แก้ใหม่ วันที่เริ่มต้น
This commit is contained in:
parent
0dc0640d2c
commit
d15a24c80e
2 changed files with 25 additions and 11 deletions
|
|
@ -8,6 +8,7 @@ import config from "@/app.config";
|
|||
import type {
|
||||
DataOption,
|
||||
ObjectSalaryRef,
|
||||
FormData
|
||||
} from "@/modules/13_salary/interface/index/Main";
|
||||
import type {
|
||||
SalaryPosType,
|
||||
|
|
@ -46,14 +47,14 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const salaryId = ref<string>("");
|
||||
const formData = reactive({
|
||||
const formData = reactive<FormData>({
|
||||
salaryType: "", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posTypeId: "", //*ประเภทของตำแหน่ง
|
||||
posLevelId: "", //*ระดับของตำแหน่ง
|
||||
isActive: false, //*สถานะการใช้งาน
|
||||
date: new Date(), //ให้ไว้ ณ วันที่
|
||||
startDate: new Date(), //วันที่มีผลบังคับใช้
|
||||
endDate: new Date(), //วันที่สิ้นสุดบังคับใช้
|
||||
date: null, //ให้ไว้ ณ วันที่
|
||||
startDate: null, //วันที่มีผลบังคับใช้
|
||||
endDate: null, //วันที่สิ้นสุดบังคับใช้
|
||||
details: "", //คำอธิบาย
|
||||
isSpecial: false,
|
||||
});
|
||||
|
|
@ -168,7 +169,11 @@ watch(
|
|||
if (salaryPosTypeOption.value.length === 0) {
|
||||
await fetchPosType();
|
||||
}
|
||||
|
||||
if (props.typeAction === "add") {
|
||||
formData.date = new Date()
|
||||
formData.startDate = new Date()
|
||||
formData.endDate = new Date()
|
||||
}
|
||||
if (props.typeAction === "edit") {
|
||||
await showLoader();
|
||||
if (props.data) {
|
||||
|
|
@ -237,9 +242,6 @@ function createSalary() {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** function checkEndDate*/
|
||||
function checkEndDate() {
|
||||
if (formData.endDate !== null && formData.startDate !== null) {
|
||||
|
|
@ -286,10 +288,10 @@ async function downloadFile(url: string, type: string, fileName: string) {
|
|||
<Header :tittle="title" :close="closeDialog" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="scroll" style="max-height: 70vh;">
|
||||
<q-card-section class="scroll" style="max-height: 70vh">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-md-12">
|
||||
<div class="row col-12 q-col-gutter-sm ">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<q-select
|
||||
ref="salaryTypeRef"
|
||||
|
|
|
|||
|
|
@ -45,11 +45,23 @@ interface ObjectSalaryRateRef {
|
|||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface FormData{
|
||||
salaryType:string
|
||||
posTypeId:string
|
||||
posLevelId:string
|
||||
isActive:boolean
|
||||
date:Date |null
|
||||
startDate:Date |null
|
||||
endDate:Date |null
|
||||
details:string
|
||||
isSpecial:boolean
|
||||
}
|
||||
export type {
|
||||
DataOption,
|
||||
NewPagination,
|
||||
ItemsMenu,
|
||||
ObjectSalaryRef,
|
||||
ObjectSalaryRateRef,
|
||||
DataOptionShort
|
||||
DataOptionShort,
|
||||
FormData,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue