step2 ถ้าไม่ได้กรอก เงิน บันทึกส่ง 0
This commit is contained in:
parent
50a4a8d182
commit
101158d6a1
3 changed files with 19 additions and 12 deletions
|
|
@ -80,7 +80,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
align: "center",
|
||||
label: "สถานะราชกิจจานุเบกษา",
|
||||
sortable: true,
|
||||
field: "institution",
|
||||
field: "statusRoyal",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
|
|
@ -110,8 +110,11 @@ const fetchData = async () => {
|
|||
period_end: e.period_end == null ? null : date2Thai(new Date(e.period_end)),
|
||||
period_isActive: e.period_isActive,
|
||||
period_doc: e.period_doc,
|
||||
period_status: e.period_status.result
|
||||
})
|
||||
|
||||
);
|
||||
console.log(rows.value)
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -122,7 +125,7 @@ const fetchData = async () => {
|
|||
};
|
||||
|
||||
const clickEdit = (col: any) => {
|
||||
router.push(`/insignia/round-add/${col.id}`);
|
||||
router.push(`/insignia/round-add/${col.period_id}`);
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
|
|
@ -301,7 +304,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-td key="period_end" :props="props" @click="clickEdit(props.row)">
|
||||
{{ props.row.period_end }}
|
||||
</q-td>
|
||||
<q-td key="status" :props="props" @click="clickEdit(props.row)">
|
||||
<q-td key="period_isActive" :props="props" @click="clickEdit(props.row)">
|
||||
<q-icon
|
||||
v-if="props.row.period_isActive == true"
|
||||
name="mdi-close"
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ interface FormProprsalsRound2 {
|
|||
period_end: any;
|
||||
period_isActive: boolean;
|
||||
period_doc: any;
|
||||
period_status:any
|
||||
}
|
||||
export type { FormProprsalsRound, FormProprsalsRound2 };
|
||||
|
|
|
|||
|
|
@ -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