fix:profileId To citizenId
This commit is contained in:
parent
79d1a14ec4
commit
ae4e874f42
11 changed files with 68 additions and 18 deletions
|
|
@ -40,6 +40,9 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const citizenId = defineModel<string>("citizenId", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
|
||||||
const baseColumns = ref<QTableColumn[]>([
|
const baseColumns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
|
|
@ -614,7 +617,7 @@ onMounted(() => {
|
||||||
disable
|
disable
|
||||||
v-model="formData.status"
|
v-model="formData.status"
|
||||||
label="ใช้งาน"
|
label="ใช้งาน"
|
||||||
keep-color="primary"
|
keep-color
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -642,6 +645,7 @@ onMounted(() => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:command-id="commandId"
|
v-model:command-id="commandId"
|
||||||
|
:citizen-id="citizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const citizenId = defineModel<string>("citizenId", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
|
||||||
const baseColumns = ref<QTableColumn[]>([
|
const baseColumns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
|
|
@ -977,6 +980,7 @@ onMounted(() => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:command-id="commandId"
|
v-model:command-id="commandId"
|
||||||
|
:citizen-id="citizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ const profileId = ref<string>(
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const citizenId = defineModel<string>("citizenId", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
|
||||||
const store = useGovernmentPosDataStore();
|
const store = useGovernmentPosDataStore();
|
||||||
const {
|
const {
|
||||||
|
|
@ -1621,6 +1624,7 @@ onMounted(async () => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:commandId="commandId"
|
v-model:commandId="commandId"
|
||||||
|
:citizen-id="citizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,22 @@ const storeRegistry = useRegistryNewDataStore();
|
||||||
<PerformSpecialWork :is-leave="storeRegistry.isLeave" />
|
<PerformSpecialWork :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel v-if="empType != '-employee'" name="5">
|
<q-tab-panel v-if="empType != '-employee'" name="5">
|
||||||
<ActingPos :is-leave="storeRegistry.isLeave" />
|
<ActingPos
|
||||||
|
:is-leave="storeRegistry.isLeave"
|
||||||
|
:citizen-id="storeRegistry.citizenId"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel v-if="empType != '-employee'" name="6">
|
<q-tab-panel v-if="empType != '-employee'" name="6">
|
||||||
<HelpGovernmentDetail :is-leave="storeRegistry.isLeave" />
|
<HelpGovernmentDetail
|
||||||
|
:is-leave="storeRegistry.isLeave"
|
||||||
|
:citizen-id="storeRegistry.citizenId"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="7">
|
<q-tab-panel name="7">
|
||||||
<Postion :is-leave="storeRegistry.isLeave" />
|
<Postion
|
||||||
|
:is-leave="storeRegistry.isLeave"
|
||||||
|
:citizen-id="storeRegistry.citizenId"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ const profileId = ref<string>(
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const citizenId = defineModel<string>("citizenId", {
|
||||||
|
required: true,
|
||||||
|
});
|
||||||
|
|
||||||
const store = useSalaryDataStore();
|
const store = useSalaryDataStore();
|
||||||
const {
|
const {
|
||||||
|
|
@ -1624,6 +1627,7 @@ onMounted(async () => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:commandId="commandId"
|
v-model:commandId="commandId"
|
||||||
|
:citizen-id="citizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,10 @@ const tab = ref<string>("1");
|
||||||
|
|
||||||
<q-tab-panels v-model="tab" animated>
|
<q-tab-panels v-model="tab" animated>
|
||||||
<q-tab-panel name="1">
|
<q-tab-panel name="1">
|
||||||
<PositionSalary :is-leave="storeRegistry.isLeave" />
|
<PositionSalary
|
||||||
|
:is-leave="storeRegistry.isLeave"
|
||||||
|
:citizen-id="storeRegistry.citizenId"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="2">
|
<q-tab-panel name="2">
|
||||||
<NotReceiveSalary :is-leave="storeRegistry.isLeave" />
|
<NotReceiveSalary :is-leave="storeRegistry.isLeave" />
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ const props = defineProps({
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
const command = ref<string>("");
|
const command = ref<string>("");
|
||||||
const commandId = ref<string>("");
|
const commandId = ref<string>("");
|
||||||
|
const commandCitizenId = ref<string>("");
|
||||||
|
|
||||||
let roleAdmin = ref<boolean>(false);
|
let roleAdmin = ref<boolean>(false);
|
||||||
const edit = ref<boolean>(true);
|
const edit = ref<boolean>(true);
|
||||||
|
|
@ -912,9 +913,10 @@ function onSearchAdd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRefCommand(data: any) {
|
function onRefCommand(data: any) {
|
||||||
modalCommand.value = true;
|
|
||||||
command.value = data.refCommandNo;
|
command.value = data.refCommandNo;
|
||||||
commandId.value = data.commandId;
|
commandId.value = data.commandId;
|
||||||
|
commandCitizenId.value = data.citizenId;
|
||||||
|
modalCommand.value = true;
|
||||||
// commandId.value = 'bdf9da91-ba45-497a-a2b7-cc49e2446d97'; //จำลอง
|
// commandId.value = 'bdf9da91-ba45-497a-a2b7-cc49e2446d97'; //จำลอง
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1787,6 +1789,7 @@ onMounted(async () => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:commandId="commandId"
|
v-model:commandId="commandId"
|
||||||
|
v-model:citizen-id="commandCitizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const props = defineProps({
|
||||||
const avatar = ref<string>("");
|
const avatar = ref<string>("");
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
const position = ref<string>("");
|
const position = ref<string>("");
|
||||||
|
const citizenId = ref<string>("");
|
||||||
const isLoading = ref<boolean>(true);
|
const isLoading = ref<boolean>(true);
|
||||||
|
|
||||||
/** function เรียกข้อมูลส่วนตัว*/
|
/** function เรียกข้อมูลส่วนตัว*/
|
||||||
|
|
@ -48,6 +49,7 @@ function fetchInformation() {
|
||||||
|
|
||||||
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
position.value = data.position;
|
position.value = data.position;
|
||||||
|
citizenId.value = data.citizenId;
|
||||||
|
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await fetchProfile(data.id as string, data.avatarName);
|
await fetchProfile(data.id as string, data.avatarName);
|
||||||
|
|
@ -220,6 +222,7 @@ watch(
|
||||||
v-if="type === 'posSalary'"
|
v-if="type === 'posSalary'"
|
||||||
v-model:profileId="profileId"
|
v-model:profileId="profileId"
|
||||||
:employeeClass="employeeClass"
|
:employeeClass="employeeClass"
|
||||||
|
:citizenId="citizenId"
|
||||||
/>
|
/>
|
||||||
<InfoDiscipline
|
<InfoDiscipline
|
||||||
v-if="type === 'discipline'"
|
v-if="type === 'discipline'"
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ const {
|
||||||
/** props*/
|
/** props*/
|
||||||
const profileId = defineModel<string>("profileId", { required: true });
|
const profileId = defineModel<string>("profileId", { required: true });
|
||||||
const employeeClass = defineModel<string>("employeeClass", { required: true });
|
const employeeClass = defineModel<string>("employeeClass", { required: true });
|
||||||
|
const citizenId = defineModel<string>("citizenId", { required: true });
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
const command = ref<string>("");
|
const command = ref<string>("");
|
||||||
|
|
@ -470,6 +471,7 @@ onMounted(() => {
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
v-model:command="command"
|
v-model:command="command"
|
||||||
v-model:commandId="commandId"
|
v-model:commandId="commandId"
|
||||||
|
:citizen-id="citizenId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const command = defineModel<string>("command", { required: true });
|
const command = defineModel<string>("command", { required: true });
|
||||||
const commandId = defineModel<string>("commandId", { required: true });
|
const commandId = defineModel<string>("commandId", { required: true });
|
||||||
|
const citizenId = defineModel<string>("citizenId", { required: true });
|
||||||
const promises = ref<any>([]);
|
const promises = ref<any>([]);
|
||||||
|
|
||||||
const tab = ref<string>("main"); //tab
|
const tab = ref<string>("main"); //tab
|
||||||
|
|
@ -37,6 +38,7 @@ function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
command.value = "";
|
command.value = "";
|
||||||
commandId.value = "";
|
commandId.value = "";
|
||||||
|
citizenId.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -88,13 +90,25 @@ async function downloadCover(type: string) {
|
||||||
*/
|
*/
|
||||||
async function fetchDataCommand(type: string) {
|
async function fetchDataCommand(type: string) {
|
||||||
let newType = type === "cover" ? "คำสั่ง" : "แนบท้าย";
|
let newType = type === "cover" ? "คำสั่ง" : "แนบท้าย";
|
||||||
|
const pathAPI =
|
||||||
|
type === "cover"
|
||||||
|
? config.API.fileByFile(
|
||||||
|
"ระบบออกคำสั่ง",
|
||||||
|
newType,
|
||||||
|
commandId.value,
|
||||||
|
newType
|
||||||
|
)
|
||||||
|
: config.API.subFileByFileName(
|
||||||
|
"ระบบออกคำสั่ง",
|
||||||
|
newType,
|
||||||
|
commandId.value,
|
||||||
|
citizenId.value,
|
||||||
|
newType
|
||||||
|
);
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(pathAPI)
|
||||||
config.API.fileByFile("ระบบออกคำสั่ง", newType, commandId.value, newType)
|
|
||||||
)
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (type === "cover") {
|
if (type === "cover") {
|
||||||
dataCover.value = data;
|
dataCover.value = data;
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ async function uploadFileDoc(
|
||||||
uploadUrl: string,
|
uploadUrl: string,
|
||||||
file: any,
|
file: any,
|
||||||
group: string,
|
group: string,
|
||||||
profileId?: string
|
id?: string
|
||||||
) {
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
|
|
@ -177,7 +177,7 @@ async function uploadFileDoc(
|
||||||
fileUploadOrder.value = null;
|
fileUploadOrder.value = null;
|
||||||
} else {
|
} else {
|
||||||
attachmentList.value.forEach((e) => {
|
attachmentList.value.forEach((e) => {
|
||||||
if (e.id === profileId) {
|
if (e.id === id) {
|
||||||
e.file = null;
|
e.file = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -217,13 +217,13 @@ async function fetchDocOrder(type: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchDocTailer(type: string, profileId: string) {
|
async function fetchDocTailer(type: string, id: string) {
|
||||||
await http
|
await http
|
||||||
.get(config.API.subFile("ระบบออกคำสั่ง", type, commandId.value, profileId))
|
.get(config.API.subFile("ระบบออกคำสั่ง", type, commandId.value, id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data[0];
|
const data = res.data[0];
|
||||||
attachmentList.value.forEach((e) => {
|
attachmentList.value.forEach((e) => {
|
||||||
if (e.id === profileId) {
|
if (e.id === id) {
|
||||||
attachmentFiles.value[e.id] = data;
|
attachmentFiles.value[e.id] = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -245,7 +245,7 @@ function downloadFile(
|
||||||
file: any,
|
file: any,
|
||||||
group: string,
|
group: string,
|
||||||
isView: boolean = false,
|
isView: boolean = false,
|
||||||
profileId: string
|
id: string
|
||||||
) {
|
) {
|
||||||
let type = group === "order" ? "คำสั่ง" : "แนบท้าย";
|
let type = group === "order" ? "คำสั่ง" : "แนบท้าย";
|
||||||
|
|
||||||
|
|
@ -261,7 +261,7 @@ function downloadFile(
|
||||||
"ระบบออกคำสั่ง",
|
"ระบบออกคำสั่ง",
|
||||||
type,
|
type,
|
||||||
commandId.value,
|
commandId.value,
|
||||||
profileId,
|
id,
|
||||||
file.fileName
|
file.fileName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ async function fetchLists() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
attachmentList.value = data.commandRecives.map((item: any) => ({
|
attachmentList.value = data.commandRecives.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.citizenId,
|
||||||
name: item.prefix + item.firstName + " " + item.lastName,
|
name: item.prefix + item.firstName + " " + item.lastName,
|
||||||
file: null,
|
file: null,
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue