เพิ่มส่งเเนวตั้ง เเนวนอน
This commit is contained in:
parent
b39dbd1ba2
commit
0c473e14c3
10 changed files with 121 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
import { ref, watch, type PropType, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -35,6 +35,17 @@ const emit = defineEmits([
|
|||
|
||||
const rows = ref<PersonData[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
||||
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
|
|
@ -377,6 +388,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
import { ref, watch, type PropType, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -49,6 +49,17 @@ const emit = defineEmits([
|
|||
*/
|
||||
const rows = ref<PersonData[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
||||
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
|
|
@ -406,6 +417,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch,computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -177,6 +177,17 @@ const visibleColumns2 = ref<string[]>([
|
|||
"status",
|
||||
]);
|
||||
const selected = ref<officerType[]>([]); //รายการที่เลือก
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const modalCommand = ref<boolean>(false);
|
||||
|
||||
/** ยืนยันการส่งไปออกคำสั่ง*/
|
||||
|
|
@ -333,6 +344,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-15'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
import { ref, watch, type PropType, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||
|
|
@ -42,6 +42,17 @@ const emit = defineEmits([
|
|||
//Table
|
||||
const rows = ref<listMain[]>([]); //ราชชื่อส่งไปออกคำสั่ง
|
||||
const selected = ref<listMain[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
"fullname",
|
||||
|
|
@ -325,6 +336,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { ref, watchEffect,computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -16,6 +16,17 @@ const transferStore = useTransferDataStore();
|
|||
const { statusText } = transferStore;
|
||||
const $q = useQuasar();
|
||||
const selected = ref<ResponseRow[]>([]);
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
|
||||
|
|
@ -310,6 +321,6 @@ watchEffect(() => {
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-14'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,17 @@ const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
|||
|
||||
//table
|
||||
const selected = ref<officerType[]>([]);
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -292,6 +303,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-16'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch,computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -27,6 +27,18 @@ const props = defineProps({
|
|||
const modalCommand = ref<boolean>(false); //เปิด-ปิด modal สร้างคำสั่ง
|
||||
//Table
|
||||
const selected = ref<ResponseData[]>([]); //รายชื่อที่เลือก
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
|
||||
const filter = ref<string>(""); //คำค้นหา
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -188,7 +200,6 @@ watch(
|
|||
</q-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:columns="columns2"
|
||||
:rows="rows"
|
||||
|
|
@ -255,6 +266,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
command-type-code="C-PM-13"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,17 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
|||
const $q = useQuasar();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const selected = ref<ResponseItems[]>([]);
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -263,6 +274,6 @@ watchEffect(() => {
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-18'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { ref, watchEffect,computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -17,6 +17,18 @@ const $q = useQuasar();
|
|||
const stroe = useRetirementDataStore();
|
||||
const { statusText } = stroe;
|
||||
const selected = ref<ResponseItems[]>([]);
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
remarkHorizontal: i.remarkHorizontal,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
|
||||
|
|
@ -269,6 +281,6 @@ watchEffect(() => {
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -165,7 +165,10 @@ function createCommand(isRedirect: boolean) {
|
|||
lastName: e.lastName,
|
||||
citizenId: e.citizenId,
|
||||
profileId: e.profileId,
|
||||
remarkVertical: e.remarkVertical,
|
||||
...(e.remarkHorizontal ? { remarkHorizontal: e.remarkHorizontal } : {}),
|
||||
}));
|
||||
|
||||
const body = {
|
||||
commandYear: commandYear.value,
|
||||
commandNo: commandNo.value,
|
||||
|
|
@ -268,7 +271,7 @@ async function fetchCommandType() {
|
|||
(v: ListCommand) => v.code == props.commandTypeCode
|
||||
);
|
||||
commandType.value = commandOp.value[0].id;
|
||||
console.log("🚀 ~ fetchCommandType ~ commandType.value:", commandType.value)
|
||||
console.log("🚀 ~ fetchCommandType ~ commandType.value:", commandType.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue