fix: properties doc check & form/move item workflow step
This commit is contained in:
parent
5d5621882e
commit
ba64702287
4 changed files with 49 additions and 7 deletions
|
|
@ -863,7 +863,9 @@
|
||||||
"label": "Recording By",
|
"label": "Recording By",
|
||||||
"value": "recordBy",
|
"value": "recordBy",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
},
|
||||||
|
{ "label": "Document Check", "value": "documentCheck", "type": "string" },
|
||||||
|
{ "label": "Form", "value": "designForm", "type": "string" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"workPropertiesField": [
|
"workPropertiesField": [
|
||||||
|
|
@ -1936,7 +1938,9 @@
|
||||||
"label": "ลงชื่อผู้บันทึกข้อมูล",
|
"label": "ลงชื่อผู้บันทึกข้อมูล",
|
||||||
"value": "recordBy",
|
"value": "recordBy",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
},
|
||||||
|
{ "label": "ตรวจสอบเอกสาร", "value": "documentCheck", "type": "string" },
|
||||||
|
{ "label": "ออกแบบฟอร์ม", "value": "designForm", "type": "string" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"workPropertiesField": [
|
"workPropertiesField": [
|
||||||
|
|
|
||||||
|
|
@ -446,6 +446,7 @@ watch(
|
||||||
>
|
>
|
||||||
<NoData useField />
|
<NoData useField />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="tempStep[stepIndex].attributes?.properties?.length > 0"
|
v-if="tempStep[stepIndex].attributes?.properties?.length > 0"
|
||||||
class="q-py-sm"
|
class="q-py-sm"
|
||||||
|
|
@ -470,7 +471,12 @@ watch(
|
||||||
:disable="propIndex === 0"
|
:disable="propIndex === 0"
|
||||||
:size="$q.screen.xs ? 'xs' : ''"
|
:size="$q.screen.xs ? 'xs' : ''"
|
||||||
style="color: hsl(var(--text-mute-2))"
|
style="color: hsl(var(--text-mute-2))"
|
||||||
@click="moveItemUp(tempStep, propIndex)"
|
@click="
|
||||||
|
moveItemUp(
|
||||||
|
tempStep[stepIndex].attributes.properties,
|
||||||
|
propIndex,
|
||||||
|
)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
id="btn-move-down-product"
|
id="btn-move-down-product"
|
||||||
|
|
@ -479,9 +485,17 @@ watch(
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
:size="$q.screen.xs ? 'xs' : ''"
|
:size="$q.screen.xs ? 'xs' : ''"
|
||||||
:disable="propIndex === tempStep?.length - 1"
|
:disable="
|
||||||
|
propIndex ===
|
||||||
|
tempStep[stepIndex].attributes.properties?.length - 1
|
||||||
|
"
|
||||||
style="color: hsl(var(--text-mute-2))"
|
style="color: hsl(var(--text-mute-2))"
|
||||||
@click="moveItemDown(tempStep, propIndex)"
|
@click="
|
||||||
|
moveItemDown(
|
||||||
|
tempStep[stepIndex].attributes.properties,
|
||||||
|
propIndex,
|
||||||
|
)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-avatar
|
<q-avatar
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ function assignToForm() {
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
dense
|
dense
|
||||||
v-model="isExpand"
|
v-model="isExpand"
|
||||||
class="overflow-hidden bordered q-my-sm full-width"
|
class="overflow-hidden bordered full-width"
|
||||||
switch-toggle-side
|
switch-toggle-side
|
||||||
style="border-radius: var(--radius-2)"
|
style="border-radius: var(--radius-2)"
|
||||||
expand-icon="mdi-chevron-down-circle"
|
expand-icon="mdi-chevron-down-circle"
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,12 @@ import {
|
||||||
EmployeePassportPayload,
|
EmployeePassportPayload,
|
||||||
EmployeeVisaPayload,
|
EmployeeVisaPayload,
|
||||||
} from 'stores/employee/types';
|
} from 'stores/employee/types';
|
||||||
|
import {
|
||||||
|
PropDate,
|
||||||
|
PropNumber,
|
||||||
|
PropOptions,
|
||||||
|
PropString,
|
||||||
|
} from 'src/stores/product-service/types';
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
|
|
||||||
|
|
@ -483,8 +489,18 @@ async function triggerViewFile(opt: {
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template v-slot="{ product }">
|
<template v-slot="{ product }">
|
||||||
<section class="column surface-1 q-pa-sm bordered-t">
|
<section
|
||||||
|
class="column surface-1 q-px-sm bordered-t q-pb-sm q-gutter-y-sm"
|
||||||
|
>
|
||||||
<DocumentExpansion
|
<DocumentExpansion
|
||||||
|
v-if="
|
||||||
|
value.productService.work?.attributes?.workflowStep[
|
||||||
|
pageState.currentStep - 1
|
||||||
|
].attributes?.properties.some(
|
||||||
|
(v: PropString | PropNumber | PropDate | PropOptions) =>
|
||||||
|
v.fieldName === 'documentCheck',
|
||||||
|
)
|
||||||
|
"
|
||||||
ref="refDocumentExpansion"
|
ref="refDocumentExpansion"
|
||||||
:attributes="value.attributes"
|
:attributes="value.attributes"
|
||||||
@change-status="
|
@change-status="
|
||||||
|
|
@ -534,6 +550,14 @@ async function triggerViewFile(opt: {
|
||||||
:listDocument="product?.document"
|
:listDocument="product?.document"
|
||||||
/>
|
/>
|
||||||
<FormExpansion
|
<FormExpansion
|
||||||
|
v-if="
|
||||||
|
value.productService.work?.attributes?.workflowStep[
|
||||||
|
pageState.currentStep - 1
|
||||||
|
].attributes?.properties.some(
|
||||||
|
(v: PropString | PropNumber | PropDate | PropOptions) =>
|
||||||
|
v.fieldName === 'designForm',
|
||||||
|
)
|
||||||
|
"
|
||||||
:step="{
|
:step="{
|
||||||
step: pageState.currentStep,
|
step: pageState.currentStep,
|
||||||
requestWorkId: value.id || '',
|
requestWorkId: value.id || '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue