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

View file

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