fix bug ออกคำสั่งวินัย

This commit is contained in:
Warunee Tamkoo 2024-01-08 16:36:37 +07:00
parent 5b65b16f38
commit a8075effaf
6 changed files with 20 additions and 4 deletions

View file

@ -37,7 +37,13 @@ const nextStep = async () => {
await http
.put(config.API.nextStep(orderId.value))
.then(() => {
router.push(`/order/detail/${orderId.value}?step=${step.value + 1}`);
if (route.name == "disciplineOrderDatail") {
router.push(
`/discipline-order/detail/${orderId.value}?step=${step.value + 1}`
);
} else {
router.push(`/order/detail/${orderId.value}?step=${step.value + 1}`);
}
})
.catch((e) => {
console.log(e);
@ -50,7 +56,13 @@ const previousStep = async () => {
await http
.put(config.API.prevStep(orderId.value))
.then(() => {
router.push(`/order/detail/${orderId.value}?step=${step.value - 1}`);
if (route.name == "disciplineOrderDatail") {
router.push(
`/discipline-order/detail/${orderId.value}?step=${step.value - 1}`
);
} else {
router.push(`/order/detail/${orderId.value}?step=${step.value - 1}`);
}
})
.catch((e) => {
console.log(e);
@ -88,7 +100,11 @@ onMounted(() => {
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1), destroyLocalStorage()"
@click="
route.name == 'disciplineOrderDatail'
? router.push(`/discipline-order`)
: router.push(`/order`)
"
/>
ออกคำส
</div>

View file

@ -240,7 +240,7 @@ onMounted(() => {
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="redirectToPage(props.row.orderId, props.row.OrderStatus)"
@click="redirectToPage(props.row.orderId, props.row.orderStatusName)"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}