This commit is contained in:
2021-07-26 22:35:59 +00:00
parent 41303e7726
commit 123582f93c
3 changed files with 300 additions and 60 deletions

View File

@@ -11,7 +11,7 @@
<v-text-field
v-model="value.serial"
:readonly="formState.readOnly"
:label="$ay.t('WorkOrderSerialNumber')"
:label="$ay.t('QuoteSerialNumber')"
ref="serial"
data-cy="serial"
:rules="[
@@ -40,7 +40,33 @@
<v-col
v-if="
form().showMe(this, 'WorkOrderStatus') &&
form().showMe(this, 'QuotePreparedByID') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:aya-type="$ay.ayt().User"
:show-edit-icon="!value.userIsRestrictedType"
v-model="value.preparedById"
:readonly="formState.readOnly || value.userIsTechRestricted"
:label="$ay.t('QuotePreparedByID')"
ref="preparedById"
data-cy="preparedById"
:error-messages="form().serverErrors(this, 'preparedById')"
@input="fieldValueChanged('preparedById')"
></gz-pick-list>
</v-col>
<v-col
v-if="
form().showMe(this, 'QuoteStatus') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
@@ -79,7 +105,27 @@
data-cy="woAddress"
/>
</v-col>
<v-col
v-if="
form().showMe(this, 'QuoteIntroduction') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
>
<v-textarea
v-model="value.introduction"
:readonly="formState.readOnly || value.userIsTechRestricted"
:label="$ay.t('QuoteIntroduction')"
:error-messages="form().serverErrors(this, 'introduction')"
ref="introduction"
data-cy="introduction"
@input="fieldValueChanged('introduction')"
auto-grow
></v-textarea>
</v-col>
<v-col
v-if="
form().showMe(this, 'WorkOrderSummary') &&
@@ -104,7 +150,7 @@
<v-col
v-if="
form().showMe(this, 'WorkOrderCloseByDate') &&
form().showMe(this, 'QuoteQuoteRequestDate') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
@@ -116,13 +162,85 @@
xl="3"
>
<gz-date-time-picker
:label="$ay.t('WorkOrderCloseByDate')"
v-model="value.completeByDate"
:label="$ay.t('QuoteQuoteRequestDate')"
v-model="value.requested"
:readonly="formState.readOnly || value.userIsTechRestricted"
ref="completeByDate"
data-cy="completeByDate"
:error-messages="form().serverErrors(this, 'completeByDate')"
@input="fieldValueChanged('completeByDate')"
ref="requested"
data-cy="requested"
:error-messages="form().serverErrors(this, 'requested')"
@input="fieldValueChanged('requested')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="
form().showMe(this, 'QuoteValidUntilDate') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('QuoteValidUntilDate')"
v-model="value.validUntil"
:readonly="formState.readOnly || value.userIsTechRestricted"
ref="validUntil"
data-cy="validUntil"
:error-messages="form().serverErrors(this, 'validUntil')"
@input="fieldValueChanged('validUntil')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="
form().showMe(this, 'QuoteDateSubmitted') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('QuoteDateSubmitted')"
v-model="value.submitted"
:readonly="formState.readOnly || value.userIsTechRestricted"
ref="submitted"
data-cy="submitted"
:error-messages="form().serverErrors(this, 'submitted')"
@input="fieldValueChanged('submitted')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="
form().showMe(this, 'QuoteDateApproved') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('QuoteDateApproved')"
v-model="value.approved"
:readonly="formState.readOnly || value.userIsTechRestricted"
ref="approved"
data-cy="approved"
:error-messages="form().serverErrors(this, 'approved')"
@input="fieldValueChanged('approved')"
></gz-date-time-picker>
</v-col>
@@ -178,54 +296,6 @@
></gz-pick-list>
</v-col>
<v-col
v-if="
form().showMe(this, 'WorkOrderInvoiceNumber') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-text-field
v-model="value.invoiceNumber"
:readonly="formState.readOnly || value.userIsTechRestricted"
:label="$ay.t('WorkOrderInvoiceNumber')"
ref="invoiceNumber"
data-cy="invoiceNumber"
:error-messages="form().serverErrors(this, 'invoiceNumber')"
@input="fieldValueChanged('invoiceNumber')"
></v-text-field>
</v-col>
<v-col
v-if="
form().showMe(this, 'WorkOrderServiceDate') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('WorkOrderServiceDate')"
v-model="value.serviceDate"
:readonly="formState.readOnly || value.userIsTechRestricted"
ref="serviceDate"
data-cy="serviceDate"
:error-messages="form().serverErrors(this, 'serviceDate')"
@input="fieldValueChanged('serviceDate')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="form().showMe(this, 'WorkOrderCustomerContactName')"
cols="12"
@@ -321,6 +391,56 @@
></v-checkbox>
</v-col>
<v-col
v-if="
form().showMe(this, 'CopyWiki') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="value.copyWiki"
:readonly="formState.readOnly || value.userIsTechRestricted"
:label="$ay.t('CopyWiki')"
ref="copyWiki"
data-cy="copyWiki"
:error-messages="form().serverErrors(this, 'copyWiki')"
@change="fieldValueChanged('copyWiki')"
></v-checkbox>
</v-col>
<v-col
v-if="
form().showMe(this, 'CopyAttachments') &&
!(
value.userIsSubContractorFull ||
value.userIsSubContractorRestricted
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="value.copyAttachments"
:readonly="formState.readOnly || value.userIsTechRestricted"
:label="$ay.t('CopyAttachments')"
ref="copyAttachments"
data-cy="copyAttachments"
:error-messages="form().serverErrors(this, 'copyAttachments')"
@change="fieldValueChanged('copyAttachments')"
></v-checkbox>
</v-col>
<v-col
v-if="
form().showMe(this, 'Tags') &&
@@ -455,6 +575,15 @@ export default {
};
/*
l.Add(new FormField { TKey = "QuotePreparedByID", FieldKey = "QuotePreparedByID" });
l.Add(new FormField { TKey = "QuoteIntroduction", FieldKey = "QuoteIntroduction" });
l.Add(new FormField { TKey = "QuoteQuoteRequestDate", FieldKey = "QuoteQuoteRequestDate" });
l.Add(new FormField { TKey = "QuoteValidUntilDate", FieldKey = "QuoteValidUntilDate" });
l.Add(new FormField { TKey = "QuoteDateSubmitted", FieldKey = "QuoteDateSubmitted" });
l.Add(new FormField { TKey = "QuoteDateApproved", FieldKey = "QuoteDateApproved" });
l.Add(new FormField { TKey = "CopyWiki", FieldKey = "CopyWiki" });
l.Add(new FormField { TKey = "CopyAttachments", FieldKey = "CopyAttachments" });
Example workorder
{
id: 10,