props type
This commit is contained in:
parent
e66a5f8258
commit
30befa38c2
6 changed files with 44 additions and 15 deletions
|
|
@ -21,6 +21,7 @@ const { messageError, findOrgName } = useCounterMixin();
|
|||
/** propsDataProfile*/
|
||||
const props = defineProps({
|
||||
data: { type: Object, required: true },
|
||||
type: { type: String, default: "" },
|
||||
});
|
||||
|
||||
const profile = reactive<FormProfile>({
|
||||
|
|
@ -110,7 +111,7 @@ watch(
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12 q-pl-md">
|
||||
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
||||
<div class="col-12 text-top">{{ props.type == 'employee' ? 'ตำแหน่ง':'ตำแหน่งในสายงาน'}}</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{ profile.position }}
|
||||
</div>
|
||||
|
|
@ -118,7 +119,7 @@ watch(
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="col-12 text-top">ประเภทตำแหน่ง</div>
|
||||
<div class="col-12 text-top">{{ props.type == 'employee' ? 'กลุ่มงาน':'ประเภทตำแหน่ง'}}</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{ profile.positionLevel }}
|
||||
</div>
|
||||
|
|
@ -140,6 +141,7 @@ watch(
|
|||
:modal="modalPersonal"
|
||||
:id="profile.id"
|
||||
@update:modal="updatemodalPersonal"
|
||||
:type="props.type"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const {
|
|||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const title = defineModel<string>("title", { required: true });
|
||||
|
||||
const type = defineModel<any>("type", { required: true });
|
||||
const posType = defineModel<any>("posType", { required: true });
|
||||
const posLevel = defineModel<any>("posLevel", { required: true });
|
||||
const position = defineModel<any>("position", { required: true });
|
||||
|
|
@ -214,7 +214,7 @@ function close() {
|
|||
filter.value = "";
|
||||
isAll.value = false;
|
||||
isBlank.value = false;
|
||||
|
||||
type.value = null;
|
||||
nodes.value = [];
|
||||
expanded.value = [];
|
||||
nodeLevel.value = 0;
|
||||
|
|
@ -232,7 +232,7 @@ async function getDataTable(id: string, level: number = 0) {
|
|||
posType: position.value ? position.value : "",
|
||||
isAll: isAll.value,
|
||||
isBlank: isBlank.value,
|
||||
typeCommand: null,
|
||||
typeCommand: type.value,
|
||||
};
|
||||
|
||||
await http
|
||||
|
|
@ -481,6 +481,7 @@ function onSubmit() {
|
|||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||
reportingDate: datePos.value,
|
||||
posmasterId: dataPosMaster.id,
|
||||
typeCommand: type.value,
|
||||
};
|
||||
props.onSubmit?.(body);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
requier: true,
|
||||
},
|
||||
type: { type: String, default: "" },
|
||||
});
|
||||
|
||||
/** emit*/
|
||||
|
|
@ -394,7 +395,7 @@ async function fetchProfile(id: string) {
|
|||
label="ระดับ"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6">
|
||||
<div class="col-xs-6 col-md-6" v-if="props.type !== 'employee'">
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
|
|
@ -402,7 +403,7 @@ async function fetchProfile(id: string) {
|
|||
label="ตำแหน่งทางการบริหาร"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6">
|
||||
<div class="col-xs-6 col-md-6" v-if="props.type !== 'employee'">
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
|
|
|
|||
|
|
@ -181,7 +181,11 @@ onMounted(async () => {
|
|||
/>
|
||||
รายละเอียดการปรับระดับชั้นงานลูกจ้าง {{ title.fullname }}
|
||||
</div>
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
<CardProfile
|
||||
:data="dataProfile as DataProfile"
|
||||
:type="'employee'"
|
||||
/>
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ watchEffect(() => {
|
|||
<div class="row justify-between">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-select
|
||||
<!-- <q-select
|
||||
outlined
|
||||
dense
|
||||
:model-value="type"
|
||||
|
|
@ -169,7 +169,7 @@ watchEffect(() => {
|
|||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
/> -->
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import config from "@/app.config";
|
|||
|
||||
import DialogOrgSelectEmployee from "@/components/Dialogs/DialogOrgSelectEmployee.vue";
|
||||
|
||||
const typeModal = ref<string>("");
|
||||
const posType = ref<string>("");
|
||||
const posLevel = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
|
|
@ -437,7 +438,7 @@ const clickClose = () => {
|
|||
const popup = () => {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
fecthTypeOption();
|
||||
// fecthTypeOption();
|
||||
};
|
||||
|
||||
const checkSave = () => {
|
||||
|
|
@ -487,9 +488,9 @@ const savePosition = async () => {
|
|||
|
||||
|
||||
|
||||
function openModalTree(data:any){
|
||||
function openModalTree(data:any,type:string){
|
||||
modalTree.value = true
|
||||
|
||||
typeModal.value = type;
|
||||
personalId.value = data.id;
|
||||
dataRows.value = data;
|
||||
posType.value = data.posTypeId;
|
||||
|
|
@ -513,6 +514,7 @@ function onSave(data: any) {
|
|||
posLevelName: data.posLevelName,
|
||||
reportingDate: data.reportingDate,
|
||||
posmasterId: data.posmasterId,
|
||||
typeCommand: data.typeCommand,
|
||||
};
|
||||
|
||||
showLoader();
|
||||
|
|
@ -709,7 +711,7 @@ function onSave(data: any) {
|
|||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row)"
|
||||
@click="openModalTree(props.row,'SLIP')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
|
|
@ -722,7 +724,25 @@ function onSave(data: any) {
|
|||
name="mdi-bookmark-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>หน่วยงานที่รับการปรับระดับชั้นงาน</q-item-section>
|
||||
<q-item-section>เลือกหน่วยงานที่รับปรับระดับชั้นงาน</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row,'MOVE')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
name="mdi-bookmark-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>เลือกหน่วยงานที่รับย้าย</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
|
|
@ -850,6 +870,7 @@ function onSave(data: any) {
|
|||
<DialogOrgSelectEmployee
|
||||
:title="`เลือกหน่วยงานที่รับการปรับระดับชั้นงาน`"
|
||||
v-model:modal="modalTree"
|
||||
v-model:type="typeModal"
|
||||
:posType="posType"
|
||||
:posLevel="posLevel"
|
||||
:position="position"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue