ปรับส่งไปออกคำสั่ง วินัย
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() {
|
||||
isSave.value = props.data != null ?? true;
|
||||
isSave.value = props.data != null ? true : false;
|
||||
if (organization.value) {
|
||||
formData.organizationId = organization.value.id;
|
||||
formData.organization = organization.value.name;
|
||||
|
|
@ -339,7 +339,7 @@ function filterOptionFnAgency(val: string, update: Function) {
|
|||
watch(props.data, async () => {
|
||||
if (props.data !== null) {
|
||||
if (countNum.value === 1) {
|
||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||
isReadonly.value = props.data.status != "NEW" ? true : false;
|
||||
isSave.value = false;
|
||||
|
||||
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 { 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 CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||
|
|
@ -608,7 +608,7 @@ function filterOptionFnCauseText(val: string, update: Function) {
|
|||
watch(props.data, async () => {
|
||||
if (props.data !== null) {
|
||||
if (countNum.value === 1) {
|
||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||
isReadonly.value = props.data.status != "NEW" ? true : false;
|
||||
isSave.value = false;
|
||||
|
||||
isUpdate.value = true;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,16 @@ const idPath = ref<string>(route.params.id as string);
|
|||
const type = ref<string>("");
|
||||
const rows = ref<DataPerson[]>([]);
|
||||
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 props = defineProps({
|
||||
|
|
@ -305,6 +315,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="selected ? dataMapToSend :[]"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
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 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 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 commandOp = ref<ListCommand[]>([]);
|
||||
|
|
@ -283,6 +293,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="selected ? dataMapToSend:[]"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ function openModalOrder() {
|
|||
r.organization
|
||||
);
|
||||
rows2.value = dataMap;
|
||||
console.log("🚀 ~ openModalOrder ~ rows2.value:", rows2.value);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลหน้าหลัก */
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ const { dialogConfirm, dialogMessageNotify } = mixin;
|
|||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.personId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
|
|
@ -120,7 +121,6 @@ watch(
|
|||
<q-card style="width: 820px; max-width: 80vw">
|
||||
<DialogHeader :tittle="props.title" :close="onClickClose" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="q-pt-none q-mt-md">
|
||||
<div class="col-12 row q-pb-sm items-center">
|
||||
<q-space />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
interface listData {
|
||||
id: string;
|
||||
profileId?: string;
|
||||
citizenId: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export const useDisciplineSuspendStore = defineStore(
|
|||
async function getData(data: listData[]) {
|
||||
const dataList: dataType[] = data.map((item: listData) => ({
|
||||
id: item.id,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
prefix: item.prefix,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue