Bug ทะเบียนประวัติ
This commit is contained in:
parent
10d2614c76
commit
b6ab59e5ee
5 changed files with 46 additions and 20 deletions
|
|
@ -240,20 +240,17 @@ async function uploadfile(subId: string) {
|
||||||
|
|
||||||
//อัพโหลไฟล์
|
//อัพโหลไฟล์
|
||||||
await uploadFile(uploadUrl, fileUpload.value);
|
await uploadFile(uploadUrl, fileUpload.value);
|
||||||
await updateIsUpload();
|
await updateIsUpload(subId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
||||||
async function updateIsUpload() {
|
async function updateIsUpload(subId: string) {
|
||||||
await http
|
await http
|
||||||
.patch(
|
.patch(
|
||||||
config.API.profileNewCertificateByCertificateId(
|
config.API.profileNewCertificateByCertificateId(subId, empType.value),
|
||||||
editId.value,
|
|
||||||
empType.value
|
|
||||||
),
|
|
||||||
{
|
{
|
||||||
isUpload: fileUpload.value ? true : false,
|
isUpload: fileUpload.value ? true : false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -400,21 +400,18 @@ async function uploadfile(id: string) {
|
||||||
|
|
||||||
//อัพโหลไฟล์
|
//อัพโหลไฟล์
|
||||||
await uploadFile(uploadUrl, fileUpload.value);
|
await uploadFile(uploadUrl, fileUpload.value);
|
||||||
await updateIsUpload();
|
await updateIsUpload(id);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
||||||
async function updateIsUpload() {
|
async function updateIsUpload(id: string) {
|
||||||
await http
|
await http
|
||||||
.patch(
|
.patch(config.API.profileNewDisciplineByDisciplineId(id, empType.value), {
|
||||||
config.API.profileNewDisciplineByDisciplineId(id.value, empType.value),
|
isUpload: fileUpload.value ? true : false,
|
||||||
{
|
})
|
||||||
isUpload: fileUpload.value ? true : false,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
fileUpload.value = null;
|
fileUpload.value = null;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -618,7 +618,7 @@ onMounted(async () => {
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="scope.queuedFiles.length > 0"
|
v-if="scope.queuedFiles.length > 0"
|
||||||
icon="clear_all"
|
icon="clear_all"
|
||||||
@click="scope.removeQueuedFiles"
|
@click="scope.removeQueuedFiles, (fileUpload = undefined)"
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
|
|
@ -628,7 +628,7 @@ onMounted(async () => {
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="scope.uploadedFiles.length > 0"
|
v-if="scope.uploadedFiles.length > 0"
|
||||||
icon="done_all"
|
icon="done_all"
|
||||||
@click="scope.removeUploadedFiles"
|
@click="scope.removeUploadedFiles, (fileUpload = undefined)"
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
|
|
@ -663,7 +663,7 @@ onMounted(async () => {
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="scope.isUploading"
|
v-if="scope.isUploading"
|
||||||
icon="clear"
|
icon="clear"
|
||||||
@click="scope.abort"
|
@click="scope.abort, (fileUpload = undefined)"
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
|
|
@ -672,6 +672,36 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:list="scope">
|
||||||
|
<q-list separator>
|
||||||
|
<q-item v-for="file in scope.files" :key="file.__key">
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label class="full-width ellipsis">
|
||||||
|
{{ file.name }}
|
||||||
|
</q-item-label>
|
||||||
|
|
||||||
|
<q-item-label caption>
|
||||||
|
{{ file.__sizeLabel }} / {{ file.__progressLabel }}
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section top side>
|
||||||
|
<q-btn
|
||||||
|
class="gt-xs"
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
icon="delete"
|
||||||
|
@click="
|
||||||
|
scope.removeFile(file), (fileUpload = undefined)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</template>
|
||||||
</q-uploader>
|
</q-uploader>
|
||||||
<div
|
<div
|
||||||
v-if="alertUpload && dialogStatus === 'create'"
|
v-if="alertUpload && dialogStatus === 'create'"
|
||||||
|
|
|
||||||
|
|
@ -679,6 +679,7 @@ function onSubmit() {
|
||||||
...formData,
|
...formData,
|
||||||
commandDateAffect: convertDateToAPI(formData.commandDateAffect),
|
commandDateAffect: convertDateToAPI(formData.commandDateAffect),
|
||||||
commandDateSign: convertDateToAPI(formData.commandDateSign),
|
commandDateSign: convertDateToAPI(formData.commandDateSign),
|
||||||
|
commandName: store.convertCommandCodeName(formData.commandCode),
|
||||||
amount: Number(String(formData.amount)?.replace(/,/g, "")),
|
amount: Number(String(formData.amount)?.replace(/,/g, "")),
|
||||||
amountSpecial: Number(
|
amountSpecial: Number(
|
||||||
String(formData.amountSpecial)?.replace(/,/g, "")
|
String(formData.amountSpecial)?.replace(/,/g, "")
|
||||||
|
|
@ -690,6 +691,7 @@ function onSubmit() {
|
||||||
String(formData.mouthSalaryAmount)?.replace(/,/g, "")
|
String(formData.mouthSalaryAmount)?.replace(/,/g, "")
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
await fetchListSalary();
|
await fetchListSalary();
|
||||||
onClickCloseDialog();
|
onClickCloseDialog();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
|
||||||
|
|
@ -233,16 +233,16 @@ async function uploadfile(id: string) {
|
||||||
|
|
||||||
//อัพโหลไฟล์
|
//อัพโหลไฟล์
|
||||||
await uploadFile(uploadUrl, fileUpload.value);
|
await uploadFile(uploadUrl, fileUpload.value);
|
||||||
await updateIsUpload();
|
await updateIsUpload(id);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
/** ฟังก์ชันอัพเดทสถานะอัพโหลด*/
|
||||||
async function updateIsUpload() {
|
async function updateIsUpload(id: string) {
|
||||||
await http
|
await http
|
||||||
.patch(config.API.profileNewNoPaidById(id.value, empType.value), {
|
.patch(config.API.profileNewNoPaidById(id, empType.value), {
|
||||||
isUpload: fileUpload.value ? true : false,
|
isUpload: fileUpload.value ? true : false,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue