This commit is contained in:
@@ -55,19 +55,6 @@
|
|||||||
:show-select="$vuetify.breakpoint.xs"
|
:show-select="$vuetify.breakpoint.xs"
|
||||||
single-select
|
single-select
|
||||||
>
|
>
|
||||||
<template v-slot:[`item.reimburseUser`]="{ item }">
|
|
||||||
<v-simple-checkbox
|
|
||||||
v-model="item.reimburseUser"
|
|
||||||
disabled
|
|
||||||
></v-simple-checkbox>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:[`item.chargeToCustomer`]="{ item }">
|
|
||||||
<v-simple-checkbox
|
|
||||||
v-model="item.chargeToCustomer"
|
|
||||||
disabled
|
|
||||||
></v-simple-checkbox>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
</v-col>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
@@ -81,6 +68,122 @@
|
|||||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'WorkOrderItemTaskSequence')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<v-text-field
|
||||||
|
v-model="
|
||||||
|
value.items[activeWoItemIndex].tasks[activeItemIndex].sequence
|
||||||
|
"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:disabled="isDeleted"
|
||||||
|
:label="$ay.t('Sequence')"
|
||||||
|
:ref="
|
||||||
|
`Items[${activeWoItemIndex}].tasks[
|
||||||
|
${activeItemIndex}
|
||||||
|
].sequence`
|
||||||
|
"
|
||||||
|
:rules="[
|
||||||
|
form().integerValid(
|
||||||
|
this,
|
||||||
|
`Items[${activeWoItemIndex}].tasks[
|
||||||
|
${activeItemIndex}
|
||||||
|
].sequence`
|
||||||
|
)
|
||||||
|
]"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`Items[${activeWoItemIndex}].tasks[
|
||||||
|
${activeItemIndex}
|
||||||
|
].sequence`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@input="
|
||||||
|
fieldValueChanged(`Items[${activeWoItemIndex}].tasks[
|
||||||
|
${activeItemIndex}
|
||||||
|
].sequence`)
|
||||||
|
"
|
||||||
|
type="number"
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'WorkOrderItemTaskUser')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<gz-pick-list
|
||||||
|
:aya-type="$ay.ayt().User"
|
||||||
|
variant="tech"
|
||||||
|
:show-edit-icon="true"
|
||||||
|
v-model="
|
||||||
|
value.items[activeWoItemIndex].tasks[activeItemIndex]
|
||||||
|
.completedByUserId
|
||||||
|
"
|
||||||
|
:readonly="formState.readOnly || isDeleted"
|
||||||
|
:disabled="isDeleted"
|
||||||
|
:label="$ay.t('WorkOrderItemTaskUser')"
|
||||||
|
:ref="
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedByUserId`
|
||||||
|
"
|
||||||
|
data-cy="expenseUser"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedByUserId`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@input="
|
||||||
|
fieldValueChanged(
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedByUserId`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@update:name="userChange"
|
||||||
|
></gz-pick-list>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'WorkOrderItemTaskCompletedDate')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<gz-date-time-picker
|
||||||
|
:label="$ay.t('WorkOrderItemTaskCompletedDate')"
|
||||||
|
v-model="
|
||||||
|
value.items[activeWoItemIndex].tasks[activeItemIndex]
|
||||||
|
.completedDate
|
||||||
|
"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:disabled="isDeleted"
|
||||||
|
:ref="
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedDate`
|
||||||
|
"
|
||||||
|
data-cy="travelCompletedDate"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedDate`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@input="
|
||||||
|
fieldValueChanged(
|
||||||
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedDate`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
></gz-date-time-picker>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
------------------------#####################--------------------------
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemExpenseName')"
|
v-if="form().showMe(this, 'WorkOrderItemExpenseName')"
|
||||||
cols="12"
|
cols="12"
|
||||||
@@ -342,42 +445,6 @@
|
|||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
|
||||||
v-if="form().showMe(this, 'WorkOrderItemExpenseUserID')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-pick-list
|
|
||||||
:aya-type="$ay.ayt().User"
|
|
||||||
variant="tech"
|
|
||||||
:show-edit-icon="true"
|
|
||||||
v-model="
|
|
||||||
value.items[activeWoItemIndex].tasks[activeItemIndex].userId
|
|
||||||
"
|
|
||||||
:readonly="formState.readOnly || isDeleted"
|
|
||||||
:disabled="isDeleted"
|
|
||||||
:label="$ay.t('WorkOrderItemExpenseUserID')"
|
|
||||||
:ref="
|
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].userId`
|
|
||||||
"
|
|
||||||
data-cy="expenseUser"
|
|
||||||
:error-messages="
|
|
||||||
form().serverErrors(
|
|
||||||
this,
|
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].userId`
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@input="
|
|
||||||
fieldValueChanged(
|
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].userId`
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@update:name="userChange"
|
|
||||||
></gz-pick-list>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemExpenseDescription')"
|
v-if="form().showMe(this, 'WorkOrderItemExpenseDescription')"
|
||||||
cols="12"
|
cols="12"
|
||||||
@@ -575,94 +642,50 @@ export default {
|
|||||||
*/
|
*/
|
||||||
let headers = [];
|
let headers = [];
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseName")) {
|
if (this.form().showMe(this, "WorkOrderItemTaskSequence")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemExpenseName"),
|
text: this.$ay.t("Sequence"),
|
||||||
|
align: "left",
|
||||||
|
value: "sequence"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "WorkOrderItemTaskTaskID")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("WorkOrderItemTaskTaskID"),
|
||||||
align: "start",
|
align: "start",
|
||||||
value: "name"
|
value: "task"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseTotalCost")) {
|
if (this.form().showMe(this, "WorkOrderItemTaskUser")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemExpenseTotalCost"),
|
text: this.$ay.t("WorkOrderItemTaskUser"),
|
||||||
|
align: "start",
|
||||||
|
value: "completedByUserViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.form().showMe(
|
||||||
|
this,
|
||||||
|
"WorkOrderItemTaskWorkOrderItemTaskCompletionType"
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("WorkOrderItemTaskWorkOrderItemTaskCompletionType"),
|
||||||
|
align: "start",
|
||||||
|
value: "statusViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "WorkOrderItemTaskCompletedDate")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("WorkOrderItemTaskCompletedDate"),
|
||||||
align: "right",
|
align: "right",
|
||||||
value: "totalCost"
|
value: "completedDate"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseChargeAmount")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemExpenseChargeAmount"),
|
|
||||||
align: "right",
|
|
||||||
value: "chargeAmount"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseChargeToCustomer")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemExpenseChargeToCustomer"),
|
|
||||||
align: "center",
|
|
||||||
value: "chargeToCustomer"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseTaxPaid")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemExpenseTaxPaid"),
|
|
||||||
align: "right",
|
|
||||||
value: "taxPaid"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseChargeTaxCodeID")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("Tax"),
|
|
||||||
align: "left",
|
|
||||||
value: "chargeTaxCodeViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "ExpenseTaxAViz")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("TaxAAmt"),
|
|
||||||
align: "right",
|
|
||||||
value: "taxAViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "ExpenseTaxBViz")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("TaxBAmt"),
|
|
||||||
align: "right",
|
|
||||||
value: "taxBViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "ExpenseLineTotalViz")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("LineTotal"),
|
|
||||||
align: "right",
|
|
||||||
value: "lineTotalViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseReimburseUser")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemExpenseReimburseUser"),
|
|
||||||
align: "center",
|
|
||||||
value: "reimburseUser"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseUserID")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemExpenseUserID"),
|
|
||||||
align: "left",
|
|
||||||
value: "userViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return headers;
|
return headers;
|
||||||
},
|
},
|
||||||
itemList: function() {
|
itemList: function() {
|
||||||
@@ -670,41 +693,16 @@ export default {
|
|||||||
return {
|
return {
|
||||||
index: i,
|
index: i,
|
||||||
id: x.id,
|
id: x.id,
|
||||||
name: x.name,
|
sequence: x.sequence,
|
||||||
totalCost: window.$gz.locale.currencyLocalized(
|
task: x.task,
|
||||||
x.totalCost,
|
completedByUserViz: x.completedByUserViz,
|
||||||
|
statusViz: x.statusViz,
|
||||||
|
completedDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||||
|
x.completedDate,
|
||||||
|
this.pvm.timeZoneName,
|
||||||
this.pvm.languageName,
|
this.pvm.languageName,
|
||||||
this.pvm.currencyName
|
this.pvm.hour12
|
||||||
),
|
)
|
||||||
chargeAmount: window.$gz.locale.currencyLocalized(
|
|
||||||
x.chargeAmount,
|
|
||||||
this.pvm.languageName,
|
|
||||||
this.pvm.currencyName
|
|
||||||
),
|
|
||||||
chargeToCustomer: x.chargeToCustomer,
|
|
||||||
taxPaid: window.$gz.locale.currencyLocalized(
|
|
||||||
x.taxPaid,
|
|
||||||
this.pvm.languageName,
|
|
||||||
this.pvm.currencyName
|
|
||||||
),
|
|
||||||
chargeTaxCodeViz: x.chargeTaxCodeViz,
|
|
||||||
taxAViz: window.$gz.locale.currencyLocalized(
|
|
||||||
x.taxAViz,
|
|
||||||
this.pvm.languageName,
|
|
||||||
this.pvm.currencyName
|
|
||||||
),
|
|
||||||
taxBViz: window.$gz.locale.currencyLocalized(
|
|
||||||
x.taxBViz,
|
|
||||||
this.pvm.languageName,
|
|
||||||
this.pvm.currencyName
|
|
||||||
),
|
|
||||||
lineTotalViz: window.$gz.locale.currencyLocalized(
|
|
||||||
x.lineTotalViz,
|
|
||||||
this.pvm.languageName,
|
|
||||||
this.pvm.currencyName
|
|
||||||
),
|
|
||||||
reimburseUser: x.reimburseUser,
|
|
||||||
userViz: x.userViz
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user