แก้ไขการแสดงผลเงินเดือนของออกคำสั่ง
This commit is contained in:
parent
d478de515b
commit
c8b24028a1
1 changed files with 12 additions and 16 deletions
|
|
@ -41,9 +41,9 @@ const {
|
|||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const modalData = ref<any>({
|
||||
salaryAmount: 0,
|
||||
positionSalaryAmount: 0,
|
||||
monthSalaryAmount: 0,
|
||||
salaryAmount: null,
|
||||
positionSalaryAmount: null,
|
||||
monthSalaryAmount: null,
|
||||
});
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const myFormAdd = ref<QForm | null>(null);
|
||||
|
|
@ -129,11 +129,9 @@ const getData = async (id: string) => {
|
|||
selectStatus: r.selectStatus !== null ? r.selectStatus : false,
|
||||
sequence: r.sequence !== null ? r.sequence : 0,
|
||||
refRecordId: r.refRecordId,
|
||||
salaryAmount: r.salaryAmount !== 0 ? r.salaryAmount : null,
|
||||
positionSalaryAmount:
|
||||
r.positionSalaryAmount !== 0 ? r.positionSalaryAmount : null,
|
||||
monthSalaryAmount:
|
||||
r.monthSalaryAmount !== 0 ? r.monthSalaryAmount : null,
|
||||
salaryAmount: r.salaryAmount,
|
||||
positionSalaryAmount: r.positionSalaryAmount,
|
||||
monthSalaryAmount: r.monthSalaryAmount,
|
||||
});
|
||||
});
|
||||
// console.log("list", list);
|
||||
|
|
@ -275,11 +273,9 @@ const fetchSalary = async (personalId: string) => {
|
|||
console.log(res);
|
||||
const data = res.data.result;
|
||||
modalData.value = {
|
||||
salaryAmount: data.salaryAmount !== 0 ? data.salaryAmount : null,
|
||||
positionSalaryAmount:
|
||||
data.positionSalaryAmount !== 0 ? data.positionSalaryAmount : null,
|
||||
monthSalaryAmount:
|
||||
data.monthSalaryAmount !== 0 ? data.monthSalaryAmount : null,
|
||||
salaryAmount: data.salaryAmount === 0 && data.positionSalaryAmount === 0 && data.monthSalaryAmount===0 ? null : data.salaryAmount,
|
||||
positionSalaryAmount: data.salaryAmount === 0 && data.positionSalaryAmount === 0 && data.monthSalaryAmount===0 ? null : data.positionSalaryAmount,
|
||||
monthSalaryAmount: data.salaryAmount === 0 && data.positionSalaryAmount === 0 && data.monthSalaryAmount===0 ? null : data.monthSalaryAmount,
|
||||
};
|
||||
// console.log("data", modalData.value);
|
||||
})
|
||||
|
|
@ -409,7 +405,7 @@ const addlist = async (data: Object) => {
|
|||
const save = async () => {
|
||||
// console.log("save===>", rows.value);
|
||||
// console.log(statuscode.value);
|
||||
const check = rows.value.find((x: any) => x.salaryAmount == null);
|
||||
const check = rows.value.find((x: any) => x.salaryAmount == 0);
|
||||
if (
|
||||
(selected.value.length > 0 && !check) ||
|
||||
(statuscode.value === true && selected.value.length > 0)
|
||||
|
|
@ -547,7 +543,7 @@ const getClass = (val: boolean) => {
|
|||
</q-td>
|
||||
<q-td auto-width v-if="statuscode !== true">
|
||||
<q-btn
|
||||
v-if="props.row.salaryAmount === null"
|
||||
v-if="props.row.salaryAmount === 0"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
|
|
@ -628,7 +624,7 @@ const getClass = (val: boolean) => {
|
|||
:dense="true"
|
||||
v-model="modalData.salaryAmount"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue