step2 ถ้าไม่ได้กรอก เงิน บันทึกส่ง 0
This commit is contained in:
parent
50a4a8d182
commit
101158d6a1
3 changed files with 19 additions and 12 deletions
|
|
@ -41,9 +41,9 @@ const {
|
|||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const modalData = ref<any>({
|
||||
salaryAmount: null,
|
||||
positionSalaryAmount: null,
|
||||
monthSalaryAmount: null,
|
||||
salaryAmount: 0,
|
||||
positionSalaryAmount: 0,
|
||||
monthSalaryAmount: 0,
|
||||
});
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const myFormAdd = ref<QForm | null>(null);
|
||||
|
|
@ -293,14 +293,17 @@ const fetchSalary = async (personalId: string) => {
|
|||
};
|
||||
|
||||
const putSalary = async (salary: any) => {
|
||||
// modalData.value = {
|
||||
// salaryAmount: Number(salary.salaryAmount),
|
||||
// positionSalaryAmount: Number(salary.positionSalaryAmount),
|
||||
// monthSalaryAmount: Number(salary.monthSalaryAmount),
|
||||
// };
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
if (modalData.value.salaryAmount === null) {
|
||||
modalData.value.salaryAmount = 0;
|
||||
}
|
||||
if (modalData.value.positionSalaryAmount === null) {
|
||||
modalData.value.positionSalaryAmount = 0;
|
||||
}
|
||||
if (modalData.value.monthSalaryAmount === null) {
|
||||
modalData.value.monthSalaryAmount = 0;
|
||||
}
|
||||
await http
|
||||
.put(config.API.salaryOrder(personalId.value), modalData.value)
|
||||
.then((res: any) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue