fix: request list => form expansion add individual cost
This commit is contained in:
parent
df3413ad13
commit
f87547d1bc
4 changed files with 22 additions and 10 deletions
|
|
@ -2,10 +2,16 @@
|
|||
const duty = defineModel<boolean>('duty', { required: true });
|
||||
const dutyCost = defineModel<number>('dutyCost', { required: false });
|
||||
|
||||
defineProps<{
|
||||
readonly?: boolean;
|
||||
cost?: boolean;
|
||||
}>();
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
options?: number[];
|
||||
readonly?: boolean;
|
||||
cost?: boolean;
|
||||
}>(),
|
||||
{
|
||||
options: () => [30],
|
||||
},
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="row items-center q-px-md q-py-xs">
|
||||
|
|
@ -24,7 +30,7 @@ defineProps<{
|
|||
class="col"
|
||||
/>
|
||||
<q-select
|
||||
:options="[30]"
|
||||
:options
|
||||
:disable="!duty"
|
||||
:label="$t('duty.cost')"
|
||||
:readonly
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ defineProps<{
|
|||
<q-radio
|
||||
v-model="localEmployee"
|
||||
:val="true"
|
||||
:label="$t('requestList.nonLocalEmployee')"
|
||||
:label="$t('requestList.localEmployee')"
|
||||
:disable="readonly"
|
||||
class="col"
|
||||
/>
|
||||
<q-radio
|
||||
v-model="localEmployee"
|
||||
:val="false"
|
||||
:label="$t('requestList.localEmployee')"
|
||||
:label="$t('requestList.nonLocalEmployee')"
|
||||
:disable="readonly"
|
||||
class="col"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ const defaultForm = {
|
|||
customerDutyCost: 30,
|
||||
companyDuty: false,
|
||||
companyDutyCost: 30,
|
||||
individualDuty: false,
|
||||
localEmployee: true,
|
||||
employeeId: '',
|
||||
individualDuty: false,
|
||||
individualDutyCost: 10,
|
||||
};
|
||||
|
||||
const attributesForm = defineModel<AttributesForm>('attributesForm', {
|
||||
|
|
@ -35,9 +36,10 @@ const attributesForm = defineModel<AttributesForm>('attributesForm', {
|
|||
customerDutyCost: 30,
|
||||
companyDuty: false,
|
||||
companyDutyCost: 30,
|
||||
individualDuty: false,
|
||||
localEmployee: true,
|
||||
employeeId: '',
|
||||
individualDuty: false,
|
||||
individualDutyCost: 10,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -155,9 +157,12 @@ function assignToForm() {
|
|||
{{ $t('duty.text', { subject: $t('general.individual') }) }}
|
||||
</FormGroupHead>
|
||||
<FormDuty
|
||||
:options="[10]"
|
||||
:readonly="!state.isEdit"
|
||||
class="surface-1"
|
||||
v-model:duty="formData.individualDuty"
|
||||
v-model:duty-cost="formData.individualDutyCost"
|
||||
cost
|
||||
/>
|
||||
</section>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -76,9 +76,10 @@ export type AttributesForm = {
|
|||
customerDutyCost?: number;
|
||||
companyDuty: boolean;
|
||||
companyDutyCost?: number;
|
||||
individualDuty: boolean;
|
||||
localEmployee: boolean;
|
||||
employeeId?: string;
|
||||
individualDuty: boolean;
|
||||
individualDutyCost?: number;
|
||||
};
|
||||
|
||||
export type Step = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue