ปรับส่งไปออกคำสั่ง วินัย
This commit is contained in:
parent
605608ff04
commit
d714562571
9 changed files with 30 additions and 9 deletions
|
|
@ -276,7 +276,7 @@ function getListChannel() {
|
||||||
|
|
||||||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||||
function changeFormData() {
|
function changeFormData() {
|
||||||
isSave.value = props.data != null ?? true;
|
isSave.value = props.data != null ? true : false;
|
||||||
if (organization.value) {
|
if (organization.value) {
|
||||||
formData.organizationId = organization.value.id;
|
formData.organizationId = organization.value.id;
|
||||||
formData.organization = organization.value.name;
|
formData.organization = organization.value.name;
|
||||||
|
|
@ -339,7 +339,7 @@ function filterOptionFnAgency(val: string, update: Function) {
|
||||||
watch(props.data, async () => {
|
watch(props.data, async () => {
|
||||||
if (props.data !== null) {
|
if (props.data !== null) {
|
||||||
if (countNum.value === 1) {
|
if (countNum.value === 1) {
|
||||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
isReadonly.value = props.data.status != "NEW" ? true : false;
|
||||||
isSave.value = false;
|
isSave.value = false;
|
||||||
|
|
||||||
fileList.value = props.data.disciplineComplaintDocs;
|
fileList.value = props.data.disciplineComplaintDocs;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
|
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||||
|
|
@ -608,7 +608,7 @@ function filterOptionFnCauseText(val: string, update: Function) {
|
||||||
watch(props.data, async () => {
|
watch(props.data, async () => {
|
||||||
if (props.data !== null) {
|
if (props.data !== null) {
|
||||||
if (countNum.value === 1) {
|
if (countNum.value === 1) {
|
||||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
isReadonly.value = props.data.status != "NEW" ? true : false;
|
||||||
isSave.value = false;
|
isSave.value = false;
|
||||||
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,16 @@ const idPath = ref<string>(route.params.id as string);
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
const rows = ref<DataPerson[]>([]);
|
const rows = ref<DataPerson[]>([]);
|
||||||
const selected = ref<ResponseData[]>([]);
|
const selected = ref<ResponseData[]>([]);
|
||||||
|
const dataMapToSend = computed(() => {
|
||||||
|
return selected.value.map((i: any) => ({
|
||||||
|
id: i.id,
|
||||||
|
profileId: i.personId,
|
||||||
|
prefix: i.prefix,
|
||||||
|
firstName: i.firstName,
|
||||||
|
lastName: i.lastName,
|
||||||
|
citizenId: i.idcard,
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -305,6 +315,6 @@ watch(
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="commandType"
|
:command-type-code="commandType"
|
||||||
:persons="selected"
|
:persons="selected ? dataMapToSend :[]"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/Complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,16 @@ const modalCommand = ref<boolean>(false); // ตัวแปร popup สร้
|
||||||
|
|
||||||
const rows = ref<dataType[]>([]);
|
const rows = ref<dataType[]>([]);
|
||||||
const selected = ref<dataType[]>([]);
|
const selected = ref<dataType[]>([]);
|
||||||
|
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,
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
const commandType = ref<string>(""); //ตัวแปรเก็บคำสั่งที่เลือก
|
const commandType = ref<string>(""); //ตัวแปรเก็บคำสั่งที่เลือก
|
||||||
const commandOp = ref<ListCommand[]>([]);
|
const commandOp = ref<ListCommand[]>([]);
|
||||||
|
|
@ -283,6 +293,6 @@ watch(
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="commandType"
|
:command-type-code="commandType"
|
||||||
:persons="selected"
|
:persons="selected ? dataMapToSend:[]"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,6 @@ function openModalOrder() {
|
||||||
r.organization
|
r.organization
|
||||||
);
|
);
|
||||||
rows2.value = dataMap;
|
rows2.value = dataMap;
|
||||||
console.log("🚀 ~ openModalOrder ~ rows2.value:", rows2.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูลหน้าหลัก */
|
/** ดึงข้อมูลหน้าหลัก */
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ const { dialogConfirm, dialogMessageNotify } = mixin;
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
id: i.id,
|
id: i.id,
|
||||||
|
profileId: i.personId,
|
||||||
prefix: i.prefix,
|
prefix: i.prefix,
|
||||||
firstName: i.firstName,
|
firstName: i.firstName,
|
||||||
lastName: i.lastName,
|
lastName: i.lastName,
|
||||||
|
|
@ -120,7 +121,6 @@ watch(
|
||||||
<q-card style="width: 820px; max-width: 80vw">
|
<q-card style="width: 820px; max-width: 80vw">
|
||||||
<DialogHeader :tittle="props.title" :close="onClickClose" />
|
<DialogHeader :tittle="props.title" :close="onClickClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section class="q-pt-none q-mt-md">
|
<q-card-section class="q-pt-none q-mt-md">
|
||||||
<div class="col-12 row q-pb-sm items-center">
|
<div class="col-12 row q-pb-sm items-center">
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
interface listData {
|
interface listData {
|
||||||
id: string;
|
id: string;
|
||||||
|
profileId?: string;
|
||||||
citizenId: string;
|
citizenId: string;
|
||||||
prefix: string;
|
prefix: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ export const useDisciplineSuspendStore = defineStore(
|
||||||
async function getData(data: listData[]) {
|
async function getData(data: listData[]) {
|
||||||
const dataList: dataType[] = data.map((item: listData) => ({
|
const dataList: dataType[] = data.map((item: listData) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
profileId: item.profileId,
|
||||||
citizenId: item.citizenId,
|
citizenId: item.citizenId,
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue