Merge branch 'develop' into devTee
This commit is contained in:
commit
90382ae3bb
8 changed files with 55 additions and 38 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,10 @@ function saveOrder() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
|
await emit("returnPerson", selected.value, type.value);
|
||||||
emit("returnPerson", selected.value);
|
|
||||||
props.closeModal?.();
|
props.closeModal?.();
|
||||||
|
type.value = "";
|
||||||
|
selected.value = [];
|
||||||
},
|
},
|
||||||
`ยืนยันการส่งไปออกคำสั่ง`,
|
`ยืนยันการส่งไปออกคำสั่ง`,
|
||||||
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
|
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
|
||||||
|
|
@ -135,7 +136,7 @@ function Reset() {
|
||||||
emit("update:filterKeyword2", "");
|
emit("update:filterKeyword2", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fecthTypeOption(){
|
async function fecthTypeOption() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
|
|
@ -151,7 +152,7 @@ async function fecthTypeOption(){
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthTypeOption();
|
fecthTypeOption();
|
||||||
|
|
@ -243,8 +244,7 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>
|
<q-th auto-width> </q-th>
|
||||||
</q-th>
|
|
||||||
<q-th
|
<q-th
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader, success } = mixin;
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
|
|
||||||
|
|
@ -129,12 +129,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
const openModal = () => (modal.value = true);
|
const openModal = () => (modal.value = true);
|
||||||
const closeModal = () => (modal.value = false);
|
const closeModal = () => (modal.value = false);
|
||||||
|
|
||||||
function resetFilter(){
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
getList()
|
getList();
|
||||||
};
|
}
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
@ -194,15 +194,16 @@ async function getList() {
|
||||||
* ยืนยัน ส่งไปออกคำสั่ง
|
* ยืนยัน ส่งไปออกคำสั่ง
|
||||||
* @param data ข้อมูลรายบุคคล
|
* @param data ข้อมูลรายบุคคล
|
||||||
*/
|
*/
|
||||||
function onSubmit(data: dataType[]) {
|
function onSubmit(data: dataType[], type: string) {
|
||||||
console.log(data);
|
|
||||||
const dataMapId = data.map((item: dataType) => item.id);
|
const dataMapId = data.map((item: dataType) => item.id);
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.suspendReport(), {
|
.post(`${config.API.suspendReport()}/${type}`, {
|
||||||
id: dataMapId,
|
id: dataMapId,
|
||||||
})
|
})
|
||||||
.then((res) => {})
|
.then((res) => {
|
||||||
|
success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
|
|
@ -262,26 +263,26 @@ onMounted(() => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="filterKeyword !== ''"
|
v-if="filterKeyword !== ''"
|
||||||
name="clear"
|
name="clear"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="dataStore.visibleColumns"
|
v-model="dataStore.visibleColumns"
|
||||||
|
|
|
||||||
|
|
@ -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 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue