fixing to store check hide salary
This commit is contained in:
parent
e03dd72937
commit
cf2756d23c
3 changed files with 29 additions and 43 deletions
|
|
@ -467,6 +467,6 @@ onMounted(async () => {
|
|||
:command-edit-recive="commandReciveId"
|
||||
:get-data="getPersonList"
|
||||
:select-person-data="selectPersonData"
|
||||
:issue="formCommandList.issue"
|
||||
:type="formCommandList.commandTypeName"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -5,17 +5,22 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, dialogConfirm, messageError, success } =
|
||||
useCounterMixin();
|
||||
const store = useCommandMainStore();
|
||||
|
||||
const props = defineProps({
|
||||
getData: Function,
|
||||
selectPersonData: Object,
|
||||
issue: String,
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const titleName = defineModel<string>("titleName", { required: true });
|
||||
|
|
@ -99,22 +104,11 @@ watch(
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
v-model="formData.amount"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
|
||||
<div
|
||||
v-if="store.isShowSalary(type)"
|
||||
class="col-xs-6 col-sm-6 col-md-6"
|
||||
>
|
||||
<q-input
|
||||
v-if="
|
||||
issue !==
|
||||
'คำสั่งแต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ' &&
|
||||
issue !== 'คำสั่งยกเลิกการลาออก'
|
||||
"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
|
|
@ -128,13 +122,11 @@ watch(
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div
|
||||
v-if="store.isShowSalary(type)"
|
||||
class="col-xs-6 col-sm-6 col-md-6"
|
||||
>
|
||||
<q-input
|
||||
v-if="
|
||||
issue !==
|
||||
'คำสั่งแต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ' &&
|
||||
issue !== 'คำสั่งยกเลิกการลาออก'
|
||||
"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
|
|
@ -145,22 +137,13 @@ watch(
|
|||
reverse-fill-mask
|
||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||
/>
|
||||
<!-- <CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
v-model="formData.positionSalaryAmount"
|
||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div
|
||||
v-if="store.isShowSalary(type)"
|
||||
class="col-xs-6 col-sm-6 col-md-6"
|
||||
>
|
||||
<q-input
|
||||
v-if="
|
||||
issue !==
|
||||
'คำสั่งแต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ' &&
|
||||
issue !== 'คำสั่งยกเลิกการลาออก'
|
||||
"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
|
|
@ -171,13 +154,6 @@ watch(
|
|||
reverse-fill-mask
|
||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||
/>
|
||||
<!-- <CurruncyInput
|
||||
:edit="true"
|
||||
:dense="true"
|
||||
v-model="formData.monthSalaryAmount"
|
||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||
hide-bottom-space
|
||||
/> -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-12">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -7,6 +7,15 @@ import config from "@/app.config";
|
|||
export const useCommandMainStore = defineStore("commandMainStore", () => {
|
||||
const commandTypes = ref<ListCommand[]>([]);
|
||||
|
||||
const isShowSalary = (type: String) => {
|
||||
return (
|
||||
(type !==
|
||||
"คำสั่งแต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ" &&
|
||||
type !== "คำสั่งยกเลิกการลาออก") ??
|
||||
false
|
||||
);
|
||||
};
|
||||
|
||||
async function getCommandTypes() {
|
||||
if (commandTypes.value.length === 0) {
|
||||
await http
|
||||
|
|
@ -31,5 +40,6 @@ export const useCommandMainStore = defineStore("commandMainStore", () => {
|
|||
commandTypes,
|
||||
getCommandTypes,
|
||||
getCommandTypeById,
|
||||
isShowSalary,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue