This commit is contained in:
@@ -68,272 +68,158 @@
|
||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||
>
|
||||
|
||||
-------------------------------------------------------------
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborName')"
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceStartDate')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
<gz-date-time-picker
|
||||
:label="$ay.t('WorkOrderItemLaborServiceStartDate')"
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].name
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.serviceStartDate
|
||||
"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborName')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].name`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`
|
||||
"
|
||||
data-cy="serviceStartDate"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].name`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].name`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`
|
||||
)
|
||||
"
|
||||
></v-text-field>
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborTotalCost')"
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceStopDate')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].totalCost
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborTotalCost')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].totalCost`
|
||||
"
|
||||
data-cy="laborTotalCost"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].totalCost`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].totalCost`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].totalCost`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].totalCost`)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborChargeAmount')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
<gz-date-time-picker
|
||||
:label="$ay.t('WorkOrderItemLaborServiceStopDate')"
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.chargeAmount
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborChargeAmount')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeAmount`
|
||||
"
|
||||
data-cy="laborChargeAmount"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeAmount`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeAmount`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeAmount`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].chargeAmount`)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborChargeToCustomer')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-checkbox
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.chargeToCustomer
|
||||
.serviceStopDate
|
||||
"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborChargeToCustomer')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeToCustomer`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
||||
"
|
||||
data-cy="chargeToCustomer"
|
||||
data-cy="serviceStopDate"
|
||||
:rules="[
|
||||
form().datePrecedence(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
||||
)
|
||||
]"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeToCustomer`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
||||
)
|
||||
"
|
||||
@change="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].chargeToCustomer`)
|
||||
@input="
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
||||
)
|
||||
"
|
||||
></v-checkbox>
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborTaxPaid')"
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceRateQuantity')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
<gz-decimal
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].taxPaid
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.serviceRateQuantity
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborTaxPaid')"
|
||||
:label="$ay.t('WorkOrderItemLaborServiceRateQuantity')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxPaid`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateQuantity`
|
||||
"
|
||||
data-cy="laborTaxPaid"
|
||||
data-cy="laborServiceRateQuantity"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxPaid`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateQuantity`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxPaid`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateQuantity`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxPaid`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateQuantity`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].taxPaid`)
|
||||
].serviceRateQuantity`)
|
||||
"
|
||||
></gz-currency>
|
||||
></gz-decimal>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborChargeTaxCodeID')"
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceRateID')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-pick-list
|
||||
:aya-type="$ay.ayt().TaxCode"
|
||||
:aya-type="$ay.ayt().ServiceRate"
|
||||
:show-edit-icon="true"
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.chargeTaxCodeId
|
||||
.serviceRateId
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborChargeTaxCodeID')"
|
||||
:label="$ay.t('WorkOrderItemLaborServiceRateID')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeTaxCodeId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateId`
|
||||
"
|
||||
data-cy="laborChargeTaxCode"
|
||||
data-cy="labors.serviceRateId"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeTaxCodeId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateId`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].chargeTaxCodeId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateId`
|
||||
)
|
||||
"
|
||||
@update:name="taxCodeChange"
|
||||
@update:name="rateChange"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborReimburseUser')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-checkbox
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.reimburseUser
|
||||
"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborReimburseUser')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].reimburseUser`
|
||||
"
|
||||
data-cy="laborReimburseUser"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].reimburseUser`
|
||||
)
|
||||
"
|
||||
@change="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].reimburseUser`)
|
||||
"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborUserID')"
|
||||
cols="12"
|
||||
@@ -354,7 +240,7 @@
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].userId`
|
||||
"
|
||||
data-cy="laborUser"
|
||||
data-cy="labors.userid"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
@@ -371,34 +257,241 @@
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborDescription')"
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborNoChargeQuantity')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-decimal
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.noChargeQuantity
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborNoChargeQuantity')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].noChargeQuantity`
|
||||
"
|
||||
data-cy="laborNoChargeQuantity"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].noChargeQuantity`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].noChargeQuantity`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].noChargeQuantity`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].noChargeQuantity`)
|
||||
"
|
||||
></gz-decimal>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborTaxRateSaleID')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-pick-list
|
||||
:aya-type="$ay.ayt().TaxCode"
|
||||
:show-edit-icon="true"
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.taxCodeSaleId
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborTaxRateSaleID')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxCodeSaleId`
|
||||
"
|
||||
data-cy="laborTaxCodeSaleId"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxCodeSaleId`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxCodeSaleId`
|
||||
)
|
||||
"
|
||||
@update:name="taxCodeChange"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborManualDiscountPct')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-percent
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.manualDiscountPct
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborManualDiscountPct')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
||||
"
|
||||
data-cy="laborManualDiscountPct"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].manualDiscountPct`)
|
||||
"
|
||||
></gz-percent>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborBasePrice')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].basePrice
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborBasePrice')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].basePrice`
|
||||
"
|
||||
data-cy="laborbasePrice"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].basePrice`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].basePrice`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].basePrice`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].basePrice`)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborPrice')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].price
|
||||
"
|
||||
:readonly="formState.readOnly || isDeleted"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborPrice')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||
"
|
||||
data-cy="laborprice"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
form().decimalValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||
),
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].price`)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceDetails')"
|
||||
cols="12"
|
||||
>
|
||||
<v-textarea
|
||||
v-model="
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex].description
|
||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
||||
.serviceDetails
|
||||
"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemLaborDescription')"
|
||||
:label="$ay.t('WorkOrderItemLaborServiceDetails')"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].description`
|
||||
].serviceDetails`
|
||||
)
|
||||
"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].description`
|
||||
].serviceDetails`
|
||||
"
|
||||
data-cy="laborDescription"
|
||||
data-cy="laborserviceDetails"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||
${activeItemIndex}
|
||||
].description`)
|
||||
].serviceDetails`)
|
||||
"
|
||||
auto-grow
|
||||
></v-textarea>
|
||||
@@ -510,10 +603,15 @@ export default {
|
||||
this.activeItemIndex
|
||||
].userViz = newName;
|
||||
},
|
||||
rateChange(newName) {
|
||||
this.value.items[this.activeWoItemIndex].labors[
|
||||
this.activeItemIndex
|
||||
].serviceRateViz = newName;
|
||||
},
|
||||
taxCodeChange(newName) {
|
||||
this.value.items[this.activeWoItemIndex].labors[
|
||||
this.activeItemIndex
|
||||
].chargeTaxCodeViz = newName;
|
||||
].taxCodeSaleViz = newName;
|
||||
},
|
||||
newItem() {
|
||||
let newIndex = this.value.items[this.activeWoItemIndex].labors.length;
|
||||
|
||||
Reference in New Issue
Block a user