แก้ประเภทคำสั่งของวินัย และสีปุ่ม
This commit is contained in:
parent
c32340737d
commit
b13f8c0697
2 changed files with 23 additions and 13 deletions
|
|
@ -82,7 +82,6 @@ const Ordersave = async () => {
|
|||
const body = {
|
||||
id,
|
||||
};
|
||||
console.log(body);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.reportresult(type.value as string), body)
|
||||
|
|
@ -123,14 +122,21 @@ const fecthTypeOption = async () => {
|
|||
await http
|
||||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-19" ||
|
||||
e.commandCode === "C-PM-20" ||
|
||||
e.commandCode === "C-PM-27" ||
|
||||
e.commandCode === "C-PM-28" ||
|
||||
e.commandCode === "C-PM-29"
|
||||
);
|
||||
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-19" ||
|
||||
e.commandCode === "C-PM-20" ||
|
||||
e.commandCode === "C-PM-27" ||
|
||||
e.commandCode === "C-PM-28" ||
|
||||
e.commandCode === "C-PM-29"
|
||||
);
|
||||
} else {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-30" || e.commandCode === "C-PM-31"
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -151,10 +157,14 @@ watchEffect(() => {
|
|||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthTypeOption();
|
||||
});
|
||||
watch(
|
||||
() => props.title,
|
||||
() => {
|
||||
fecthTypeOption();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.Modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue