This commit is contained in:
2023-04-21 22:07:38 +00:00
parent ef585bddbd
commit 5f76206f3d
2 changed files with 75 additions and 6 deletions

View File

@@ -95,6 +95,38 @@
></v-text-field> ></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<gz-currency
ref="initialPrice"
v-model="obj.initialPrice"
:readonly="formState.readOnly"
:label="$sock.t('InitialPrice')"
data-cy="initialPrice"
:rules="[
form().decimalValid(this, 'initialPrice'),
form().required(this, 'initialPrice')
]"
:error-messages="form().serverErrors(this, 'initialPrice')"
@input="fieldValueChanged('initialPrice')"
></gz-currency>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<gz-currency
ref="renewPrice"
v-model="obj.renewPrice"
:readonly="formState.readOnly"
:label="$sock.t('RenewPrice')"
data-cy="renewPrice"
:rules="[
form().decimalValid(this, 'renewPrice'),
form().required(this, 'renewPrice')
]"
:error-messages="form().serverErrors(this, 'renewPrice')"
@input="fieldValueChanged('renewPrice')"
></gz-currency>
</v-col>
<v-col <v-col
v-if="form().showMe(this, 'ProductLicenseInterval')" v-if="form().showMe(this, 'ProductLicenseInterval')"
cols="12" cols="12"
@@ -203,6 +235,8 @@ export default {
maintInterval: "365.0:00:00", maintInterval: "365.0:00:00",
vendorCode: null, vendorCode: null,
ourCode: null, ourCode: null,
renewPrice: 0,
initialPrice: 0,
wiki: null, wiki: null,
tags: [] tags: []
}, },
@@ -666,7 +700,9 @@ async function fetchTranslatedText() {
"ProductMaintInterval", "ProductMaintInterval",
"ProductVendorCode", "ProductVendorCode",
"ProductOurCode", "ProductOurCode",
"ProductGroup" "ProductGroup",
"InitialPrice",
"RenewPrice"
]); ]);
} }

View File

@@ -136,6 +136,13 @@
</v-col> </v-col>
</template> </template>
<template v-slot:[`item.renewal`]="{ item }">
<v-simple-checkbox
v-model="item.renewal"
disabled
></v-simple-checkbox>
</template>
<template v-slot:[`item.active`]="{ item }"> <template v-slot:[`item.active`]="{ item }">
<v-simple-checkbox <v-simple-checkbox
v-model="item.active" v-model="item.active"
@@ -319,7 +326,24 @@
</v-col> </v-col>
</v-row> </v-row>
</v-col> </v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
ref="renewal"
v-model="obj.items[editItemIndex].renewal"
dense
:readonly="formState.readOnly"
:label="$sock.t('Renewal')"
:error-messages="
form().serverErrors(
this,
`Items[${editItemIndex}].renewal`
)
"
@change="
fieldValueChanged(`Items[${editItemIndex}].renewal`)
"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3"> <v-col cols="12" sm="6" lg="4" xl="3">
<gz-date-time-picker <gz-date-time-picker
ref="Items.originalOrderDate" ref="Items.originalOrderDate"
@@ -531,6 +555,11 @@ export default {
align: "right", align: "right",
value: "quantity" value: "quantity"
}); });
headers.push({
text: this.$sock.t("Renewal"),
align: "center",
value: "renewal"
});
headers.push({ headers.push({
text: this.$sock.t("PurchaseExpireDate"), text: this.$sock.t("PurchaseExpireDate"),
@@ -565,6 +594,7 @@ export default {
this.hour12 this.hour12
), ),
active: x.active, active: x.active,
renewal: x.renewal,
productViz: x.productViz productViz: x.productViz
}; };
}); });
@@ -674,7 +704,8 @@ export default {
expireDate: window.$gz.locale.nowUTC8601String(), expireDate: window.$gz.locale.nowUTC8601String(),
originalOrderDate: window.$gz.locale.nowUTC8601String(), originalOrderDate: window.$gz.locale.nowUTC8601String(),
originalOrderNumber: null, originalOrderNumber: null,
active: true active: true,
renewal: false
}); });
this.editItemIndex = this.obj.items.length - 1; this.editItemIndex = this.obj.items.length - 1;
this.editItemDialog = true; this.editItemDialog = true;
@@ -689,7 +720,8 @@ export default {
expireDate: src.expireDate, expireDate: src.expireDate,
originalOrderDate: src.originalOrderDate, originalOrderDate: src.originalOrderDate,
originalOrderNumber: src.originalOrderNumber, originalOrderNumber: src.originalOrderNumber,
active: true active: true,
renewal: false
}); });
this.editItemIndex = this.obj.items.length - 1; this.editItemIndex = this.obj.items.length - 1;
this.editItemDialog = true; this.editItemDialog = true;
@@ -1073,7 +1105,7 @@ async function clickHandler(menuItem) {
wiki: null, wiki: null,
tags: [], tags: [],
trialMode: false, trialMode: false,
renewal: false, renewal: true,
//dto only props //dto only props
customerUsers: 250, customerUsers: 250,
maxDataGB: 20, maxDataGB: 20,
@@ -1411,7 +1443,8 @@ async function fetchTranslatedText() {
"OriginalOrderDate", "OriginalOrderDate",
"LicenseRegTo", "LicenseRegTo",
"LicenseFetchEmail", "LicenseFetchEmail",
"DatabaseID" "DatabaseID",
"Renewal"
]); ]);
} }