ทะเบียน
This commit is contained in:
parent
6acdb4722e
commit
619f36212a
11 changed files with 257 additions and 74 deletions
|
|
@ -388,9 +388,10 @@
|
|||
:options="{
|
||||
currency: 'THB',
|
||||
}"
|
||||
:rules="[(val: string) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
/>
|
||||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกเงินเดือน'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4 col-md-4">
|
||||
<CurrencyInput
|
||||
|
|
@ -400,6 +401,7 @@
|
|||
currency: 'THB',
|
||||
}"
|
||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินประจำตำแหน่ง'}`]"
|
||||
/>
|
||||
<!-- <q-input
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -436,6 +438,7 @@
|
|||
currency: 'THB',
|
||||
}"
|
||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินค่าตอบแทนรายเดือน'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
|
|
@ -628,15 +631,22 @@ const store = useProfileDataStore();
|
|||
const { profileData, changeProfileColumns } = store;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const date = ref<Date>(new Date());
|
||||
const amount = ref<number>(0);
|
||||
const amount = ref<number | null>(0);
|
||||
// const salary = ref<number | null>(null);
|
||||
const positionSalaryAmount = ref<number>(0);
|
||||
const mouthSalaryAmount = ref<number>(0);
|
||||
const positionSalaryAmount = ref<number | null>(0);
|
||||
const mouthSalaryAmount = ref<number | null>(0);
|
||||
const ocId = ref<string>();
|
||||
const positionId = ref<string>();
|
||||
const positionLineId = ref<string>();
|
||||
|
|
@ -1567,7 +1577,6 @@ const fetchData = async () => {
|
|||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObject) => {
|
||||
|
|
@ -1587,7 +1596,7 @@ const fetchData = async () => {
|
|||
posNo: e.posNo,
|
||||
posNoId:
|
||||
e.posNoId !== "00000000-0000-0000-0000-000000000000"
|
||||
? e.posNo
|
||||
? e.posNoId
|
||||
: "",
|
||||
positionLine: e.positionLine,
|
||||
positionLineId: e.positionLineId,
|
||||
|
|
@ -1807,12 +1816,34 @@ const templateDetail = async () => {
|
|||
* กดบันทึกใน dialog
|
||||
*/
|
||||
const clickSave = async () => {
|
||||
if (amount.value == 0) {
|
||||
amount.value = null;
|
||||
} else if (positionSalaryAmount.value == 0) {
|
||||
positionSalaryAmount.value = null;
|
||||
} else if (mouthSalaryAmount.value == 0) {
|
||||
mouthSalaryAmount.value = null;
|
||||
}
|
||||
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (modalEdit.value) {
|
||||
await editData();
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await editData();
|
||||
},
|
||||
"ยืนยันการแก้ไขข้อมูล",
|
||||
"ต้องการยืนยันการแก้ไขข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
} else {
|
||||
await saveData();
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await saveData();
|
||||
},
|
||||
"ยืนยันการเพิ่มข้อมูล",
|
||||
"ต้องการยืนยันการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1987,9 +2018,9 @@ const addData = () => {
|
|||
edit.value = true;
|
||||
date.value = new Date();
|
||||
date.value = new Date();
|
||||
amount.value = null;
|
||||
positionSalaryAmount.value = null;
|
||||
mouthSalaryAmount.value = null;
|
||||
amount.value = 0;
|
||||
positionSalaryAmount.value = 0;
|
||||
mouthSalaryAmount.value = 0;
|
||||
ocId.value = "";
|
||||
positionId.value = "";
|
||||
posNoId.value = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue