ออกคำสั่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-10 15:03:24 +07:00
parent 45f77014da
commit 7aab234030
6 changed files with 15 additions and 11 deletions

View file

@ -744,7 +744,8 @@ function onSubmitDate() {
function openModalOrder(val: boolean) {
// object #e.draft == "" &&
rowsOrder.value = rows.value.filter(
(e: any) => e.nodeName !== null && e.reportingDate !== null
(e: any) =>
e.nodeName !== null && e.reportingDate !== null && e.statusId !== "REPORT"
);
modalOrder.value = val;
}
@ -808,6 +809,7 @@ onMounted(async () => {
<q-btn
v-if="
props.row.statusId !== 'DONE' &&
props.row.statusId !== 'REPORT' &&
(checkPermission($route)?.attrIsGet ||
checkPermission($route)?.attrIsUpdate)
"

View file

@ -296,7 +296,7 @@ function openModalOrder() {
modal.value = true;
}
function onSave(data: any) {
async function onSave(data: any) {
const dataAppoint = {
node: data.node,
nodeId: data.nodeId,
@ -314,7 +314,7 @@ function onSave(data: any) {
};
showLoader();
http
await http
.put(config.API.receivePosition(personalId.value), dataAppoint)
.then(async () => {
await fecthlistRecevice();

View file

@ -65,8 +65,8 @@ function onConfirmSignature() {
.put(config.API.command + `/sign/${commandId.value}`, {
sign: signaturetype.value === "Live" ? true : false,
})
.then(async (res) => {
fetchData();
.then(async () => {
await fetchData();
})
.catch((err) => {
messageError($q, err);

View file

@ -21,6 +21,9 @@ const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader } = mixin;
const commandId = ref<string>(route.params.id.toString());
const props = defineProps({
formCommandList: { type: Object, required: true },
});
const isAttachment = defineModel<boolean>("isAttachment", { required: true });
@ -90,14 +93,14 @@ async function downloadCover(type: string) {
if (tab.value === "main") {
genReport(
dataCover.value,
"คำสั่ง คำสั่งบรรจุและแต่งตั้ง: สำหรับผู้สอบแข่งขันได้",
`คำสั่ง ${props.formCommandList.issue}`,
type,
"?folder=command"
);
} else {
genReportXLSX(
dataAttachment.value,
"เอกสารแนบท้าย คำสั่งบรรจุและแต่งตั้ง: สำหรับผู้สอบแข่งขันได้",
`เอกสารแนบท้าย ${props.formCommandList.issue}`,
type,
"?folder=command"
);

View file

@ -180,8 +180,9 @@ onMounted(async () => {
<q-card>
<Attached
v-model:is-change-data="isChangeData"
:on-check-change-data="onCheckChangeData"
v-model:is-attachment="formCommandList.isAttachment"
:on-check-change-data="onCheckChangeData"
:form-command-list="formCommandList"
/>
</q-card>
</q-tab-panel>