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