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