fix: new service & work properties
This commit is contained in:
parent
82560b6abd
commit
d67e6e13dd
7 changed files with 312 additions and 189 deletions
|
|
@ -18,6 +18,7 @@ import FormServiceWork from 'src/components/04_product-service/FormServiceWork.v
|
|||
import ServiceProperties from 'src/components/04_product-service/ServiceProperties.vue';
|
||||
import WorkNameManagement from 'src/components/04_product-service/WorkNameManagement.vue';
|
||||
import useOptionStore from 'src/stores/options';
|
||||
import FormServiceProperties from 'src/components/04_product-service/FormServiceProperties.vue';
|
||||
|
||||
import { Status } from 'src/stores/types';
|
||||
import NoData from 'components/NoData.vue';
|
||||
|
|
@ -1789,6 +1790,7 @@ watch(currentStatus, async () => {
|
|||
<!-- add service -->
|
||||
<FormDialog
|
||||
no-address
|
||||
no-app-box
|
||||
height="95vh"
|
||||
:title="$t('addService')"
|
||||
v-model:modal="dialogService"
|
||||
|
|
@ -1816,25 +1818,42 @@ watch(currentStatus, async () => {
|
|||
/>
|
||||
</template>
|
||||
|
||||
<template #information>
|
||||
<BasicInformation
|
||||
v-if="currentServiceTab === 'serviceInformation'"
|
||||
dense
|
||||
service
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
v-model:service-code="formDataProductService.code"
|
||||
v-model:service-description="formDataProductService.detail"
|
||||
v-model:service-name-th="formDataProductService.name"
|
||||
@input-file="inputFile.click()"
|
||||
/>
|
||||
<div v-if="currentServiceTab === 'serviceInformation'" class="col-10">
|
||||
<div class="surface-1 rounded bordered q-pa-lg full-width row">
|
||||
<BasicInformation
|
||||
dense
|
||||
service
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
v-model:service-code="formDataProductService.code"
|
||||
v-model:service-description="formDataProductService.detail"
|
||||
v-model:service-name-th="formDataProductService.name"
|
||||
@input-file="inputFile.click()"
|
||||
/>
|
||||
</div>
|
||||
<div class="surface-1 rounded bordered q-mt-md q-pa-lg row">
|
||||
<FormServiceProperties
|
||||
v-model:service-attributes="formDataProductService.attributes"
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentServiceTab === 'workInformation'"
|
||||
class="surface-1 rounded bordered col-10 q-pa-lg"
|
||||
>
|
||||
<FormServiceWork
|
||||
v-model:work-items="workItems"
|
||||
v-if="currentServiceTab === 'workInformation'"
|
||||
dense
|
||||
@addProduct="
|
||||
async (index) => {
|
||||
|
|
@ -1856,7 +1875,7 @@ watch(currentStatus, async () => {
|
|||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</FormDialog>
|
||||
|
||||
<!-- service properties -->
|
||||
|
|
@ -1914,6 +1933,7 @@ watch(currentStatus, async () => {
|
|||
<!-- edit service -->
|
||||
<FormDialog
|
||||
no-address
|
||||
no-app-box
|
||||
:edit="!(formDataProductService.status === 'INACTIVE')"
|
||||
height="95vh"
|
||||
:isEdit="infoServiceEdit"
|
||||
|
|
@ -1956,24 +1976,43 @@ watch(currentStatus, async () => {
|
|||
/>
|
||||
</template>
|
||||
|
||||
<template #information>
|
||||
<BasicInformation
|
||||
:readonly="!infoServiceEdit"
|
||||
v-if="currentServiceTab === 'serviceInformation'"
|
||||
dense
|
||||
service
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
v-model:service-attributes="formDataProductService.attributes"
|
||||
v-model:service-code="formDataProductService.code"
|
||||
v-model:service-description="formDataProductService.detail"
|
||||
v-model:service-name-th="formDataProductService.name"
|
||||
@input-file="inputFile.click()"
|
||||
/>
|
||||
<div v-if="currentServiceTab === 'serviceInformation'" class="col-10">
|
||||
<div class="surface-1 rounded bordered q-pa-lg full-width row">
|
||||
<BasicInformation
|
||||
:readonly="!infoServiceEdit"
|
||||
v-if="currentServiceTab === 'serviceInformation'"
|
||||
dense
|
||||
service
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
v-model:service-code="formDataProductService.code"
|
||||
v-model:service-description="formDataProductService.detail"
|
||||
v-model:service-name-th="formDataProductService.name"
|
||||
@input-file="inputFile.click()"
|
||||
/>
|
||||
</div>
|
||||
<div class="surface-1 rounded bordered q-mt-md q-pa-lg row">
|
||||
<FormServiceProperties
|
||||
:readonly="!infoServiceEdit"
|
||||
v-model:service-attributes="formDataProductService.attributes"
|
||||
@service-properties="
|
||||
() => {
|
||||
tempValueProperties = formDataProductService.attributes;
|
||||
openPropertiesDialog('service');
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="currentServiceTab === 'workInformation'"
|
||||
class="surface-1 rounded bordered col-10 q-pa-lg"
|
||||
>
|
||||
<FormServiceWork
|
||||
:readonly="!infoServiceEdit"
|
||||
v-model:work-items="workItems"
|
||||
|
|
@ -1995,7 +2034,7 @@ watch(currentStatus, async () => {
|
|||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</FormDialog>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue