no message
This commit is contained in:
parent
a6574f567a
commit
f37259c3b1
5 changed files with 55 additions and 5 deletions
|
|
@ -185,6 +185,8 @@ async function getData() {
|
|||
data.result = dataList.result;
|
||||
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||
data.activeId = dataList.activeId;
|
||||
|
||||
mainStore.fetchDataRowsSend(dataList.persons)
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -217,7 +219,7 @@ async function onSubmit(data: any) {
|
|||
|
||||
/** ยืนยัน มีมูลส่งไปสืบสวน */
|
||||
function sentInvestigate() {
|
||||
if (mainStore.rowsAdd.length > 0) {
|
||||
if (mainStore.rowsSend.length > 0) {
|
||||
modalPopup.value = true;
|
||||
} else {
|
||||
dialogConfirm(
|
||||
|
|
@ -378,7 +380,7 @@ onMounted(() => {
|
|||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
@return-person="sendPersonToNext"
|
||||
:rows="mainStore.rowsAdd"
|
||||
:rows="mainStore.rowsSend"
|
||||
:columns="columns"
|
||||
:visibleColumns="visibleColumns"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const visibleColumns = ref<string[]>([
|
|||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
align: "center",
|
||||
label: "ลำดับ",
|
||||
sortable: false,
|
||||
field: "no",
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@ function getData() {
|
|||
data.isAncestorDNA = dataList.isAncestorDNA;
|
||||
data.investigationExtendHistory =
|
||||
dataList.investigationExtendHistory ?? [];
|
||||
|
||||
mainStore.fetchDataRowsSend(dataList.persons);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -398,7 +400,7 @@ watch(
|
|||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งไปสอบสวน"
|
||||
:rows="mainStore.rowsAdd.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
||||
:rows="mainStore.rowsSend.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
"DisciplineInvestigateFact",
|
||||
() => {
|
||||
const tabMenu = ref<string>("investigatefacts");
|
||||
const rows = ref<InvestigatefactsDataRowType[]>();
|
||||
const rows = ref<InvestigatefactsDataRowType[]>([]);
|
||||
const respondentTypeOps = ref<DataOption[]>(
|
||||
mainStore.complainantoptionsMain
|
||||
);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
const rowsAdd = ref<ArrayPersonAdd[]>([]);
|
||||
const rowsSend = ref<ArrayPersonAdd[]>([]);
|
||||
const rowsCheck = ref<ArrayPersonAdd[]>([]);
|
||||
/** หัวตารางผู้ถูกร้องเรียน */
|
||||
const columnsRespondent = ref<QTableProps["columns"]>([
|
||||
|
|
@ -330,6 +331,49 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
rowsAdd.value = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
||||
* @param data ข้อมูลรายการบุคคล
|
||||
*/
|
||||
function fetchDataRowsSend(data: ArrayPersonAdd[]) {
|
||||
const dataList: any = data.map((item: any) => ({
|
||||
id: item.id,
|
||||
idcard: item.idcard,
|
||||
name: item.name,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === null ? "" : item.salary,
|
||||
personId: item.personId,
|
||||
posNo: item.posNo === null ? "-" : item.posNo,
|
||||
organization: item.organization,
|
||||
root: item.root,
|
||||
rootId: item.rootId,
|
||||
rootShortName: item.rootShortName,
|
||||
child1: item.child1,
|
||||
child1Id: item.child1Id,
|
||||
child1ShortName: item.child1ShortName,
|
||||
child2: item.child2,
|
||||
child2Id: item.child2Id,
|
||||
child2ShortName: item.child2ShortName,
|
||||
child3: item.child3,
|
||||
child3Id: item.child3Id,
|
||||
child3ShortName: item.child3ShortName,
|
||||
child4: item.child4,
|
||||
child4Id: item.child4Id,
|
||||
child4ShortName: item.child4ShortName,
|
||||
posMasterNo: item.posMasterNo,
|
||||
posTypeId: item.posTypeId,
|
||||
posTypeName: item.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevelName,
|
||||
isSend: item.isSend,
|
||||
}));
|
||||
rowsSend.value = dataList;
|
||||
}
|
||||
|
||||
return {
|
||||
complainantoptionsMain,
|
||||
convertFault,
|
||||
|
|
@ -348,5 +392,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
convertStatusResult,
|
||||
rowsCheck,
|
||||
causeTextOptions,
|
||||
rowsSend,
|
||||
fetchDataRowsSend
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue