case 4504
This commit is contained in:
@@ -49,33 +49,6 @@
|
|||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
|
||||||
<v-textarea
|
|
||||||
ref="notes"
|
|
||||||
v-model="obj.notes"
|
|
||||||
dense
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:label="$sock.t('ContractNotes')"
|
|
||||||
:error-messages="form().serverErrors(this, 'notes')"
|
|
||||||
data-cy="notes"
|
|
||||||
auto-grow
|
|
||||||
@input="fieldValueChanged('notes')"
|
|
||||||
></v-textarea>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
|
||||||
<v-checkbox
|
|
||||||
ref="active"
|
|
||||||
v-model="obj.active"
|
|
||||||
dense
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:label="$sock.t('Active')"
|
|
||||||
data-cy="active"
|
|
||||||
:error-messages="form().serverErrors(this, 'active')"
|
|
||||||
@change="fieldValueChanged('active')"
|
|
||||||
></v-checkbox>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<!-- ################################ SUBSCRIPTION ITEMS LIST ############################### -->
|
<!-- ################################ SUBSCRIPTION ITEMS LIST ############################### -->
|
||||||
|
|
||||||
<v-col cols="12" class="mb-6">
|
<v-col cols="12" class="mb-6">
|
||||||
@@ -103,7 +76,7 @@
|
|||||||
<v-menu v-if="rights.change" offset-y>
|
<v-menu v-if="rights.change" offset-y>
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<span class="text-subtitle-2">
|
<span class="text-subtitle-2">
|
||||||
{{ $sock.t("SubscriptionList") }}</span
|
{{ $sock.t("SubscriptionItemList") }}</span
|
||||||
><v-btn large icon v-bind="attrs" v-on="on">
|
><v-btn large icon v-bind="attrs" v-on="on">
|
||||||
<v-icon small color="primary">$sockiEllipsisV</v-icon>
|
<v-icon small color="primary">$sockiEllipsisV</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
@@ -125,6 +98,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:[`item.active`]="{ item }">
|
||||||
|
<v-simple-checkbox
|
||||||
|
v-model="item.active"
|
||||||
|
disabled
|
||||||
|
></v-simple-checkbox>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:[`item.actions`]="{ item }">
|
<template v-slot:[`item.actions`]="{ item }">
|
||||||
<v-btn icon @click="editItem(item)">
|
<v-btn icon @click="editItem(item)">
|
||||||
<v-icon :class="itemsRowClasses(item)">
|
<v-icon :class="itemsRowClasses(item)">
|
||||||
@@ -136,6 +116,33 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- --------------------------------- -->
|
<!-- --------------------------------- -->
|
||||||
|
|
||||||
|
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
||||||
|
<v-textarea
|
||||||
|
ref="notes"
|
||||||
|
v-model="obj.notes"
|
||||||
|
dense
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('ContractNotes')"
|
||||||
|
:error-messages="form().serverErrors(this, 'notes')"
|
||||||
|
data-cy="notes"
|
||||||
|
auto-grow
|
||||||
|
@input="fieldValueChanged('notes')"
|
||||||
|
></v-textarea>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<v-checkbox
|
||||||
|
ref="active"
|
||||||
|
v-model="obj.active"
|
||||||
|
dense
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('Active')"
|
||||||
|
data-cy="active"
|
||||||
|
:error-messages="form().serverErrors(this, 'active')"
|
||||||
|
@change="fieldValueChanged('active')"
|
||||||
|
></v-checkbox>
|
||||||
|
</v-col>
|
||||||
<!-- --------------------------------- -->
|
<!-- --------------------------------- -->
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
||||||
@@ -170,9 +177,7 @@
|
|||||||
<v-row dense justify="center">
|
<v-row dense justify="center">
|
||||||
<v-dialog v-model="editItemDialog">
|
<v-dialog v-model="editItemDialog">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title> </v-card-title>
|
||||||
a title here
|
|
||||||
</v-card-title>
|
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row dense>
|
<v-row dense>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -271,6 +276,25 @@
|
|||||||
"
|
"
|
||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<v-checkbox
|
||||||
|
ref="active"
|
||||||
|
v-model="obj.items[editItemIndex].active"
|
||||||
|
dense
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('Active')"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`Items[${editItemIndex}].active`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@change="
|
||||||
|
fieldValueChanged(`Items[${editItemIndex}].active`)
|
||||||
|
"
|
||||||
|
></v-checkbox>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -411,6 +435,12 @@ export default {
|
|||||||
value: "expireDate"
|
value: "expireDate"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
headers.push({
|
||||||
|
text: this.$sock.t("Active"),
|
||||||
|
align: "center",
|
||||||
|
value: "active"
|
||||||
|
});
|
||||||
|
|
||||||
if (!this.formState.readOnly) {
|
if (!this.formState.readOnly) {
|
||||||
headers.push({ text: "", value: "actions" });
|
headers.push({ text: "", value: "actions" });
|
||||||
}
|
}
|
||||||
@@ -431,6 +461,7 @@ export default {
|
|||||||
this.languageName,
|
this.languageName,
|
||||||
this.hour12
|
this.hour12
|
||||||
),
|
),
|
||||||
|
active: x.active,
|
||||||
productViz: x.productViz
|
productViz: x.productViz
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -535,7 +566,8 @@ export default {
|
|||||||
subscriptionId: 0,
|
subscriptionId: 0,
|
||||||
productId: null,
|
productId: null,
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
expireDate: window.$gz.locale.nowUTC8601String()
|
expireDate: window.$gz.locale.nowUTC8601String(),
|
||||||
|
active: true
|
||||||
});
|
});
|
||||||
this.editItemIndex = this.obj.items.length - 1;
|
this.editItemIndex = this.obj.items.length - 1;
|
||||||
this.editItemDialog = true;
|
this.editItemDialog = true;
|
||||||
@@ -660,7 +692,7 @@ export default {
|
|||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({
|
this.$router.replace({
|
||||||
name: "biz-subscription",
|
name: "subscription-edit",
|
||||||
params: {
|
params: {
|
||||||
recordid: res.data.id,
|
recordid: res.data.id,
|
||||||
obj: res.data
|
obj: res.data
|
||||||
@@ -815,7 +847,7 @@ function generateMenu(vm) {
|
|||||||
sockType: window.$gz.type.Subscription,
|
sockType: window.$gz.type.Subscription,
|
||||||
recordId: vm.$route.params.recordid,
|
recordId: vm.$route.params.recordid,
|
||||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||||
recordName: vm.obj.name
|
recordName: vm.obj.subsite
|
||||||
},
|
},
|
||||||
menuItems: []
|
menuItems: []
|
||||||
};
|
};
|
||||||
@@ -900,11 +932,13 @@ async function fetchTranslatedText() {
|
|||||||
"Subscription",
|
"Subscription",
|
||||||
"Customer",
|
"Customer",
|
||||||
"ProductGroup",
|
"ProductGroup",
|
||||||
|
"Product",
|
||||||
"SubSite",
|
"SubSite",
|
||||||
"ContractNotes",
|
"ContractNotes",
|
||||||
"ProductName",
|
"ProductName",
|
||||||
"PurchaseQuantity",
|
"PurchaseQuantity",
|
||||||
"PurchaseExpireDate"
|
"PurchaseExpireDate",
|
||||||
|
"SubscriptionItemList"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1251,6 +1251,16 @@ async function clickHandler(menuItem) {
|
|||||||
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "SubscriptionList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "biz-subscription-list",
|
||||||
|
params: {
|
||||||
|
aType: m.vm.sockType,
|
||||||
|
objectId: m.vm.obj.id,
|
||||||
|
name: m.vm.obj.name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
case "PurchaseList":
|
case "PurchaseList":
|
||||||
m.vm.$router.push({
|
m.vm.$router.push({
|
||||||
name: "biz-purchase-list",
|
name: "biz-purchase-list",
|
||||||
@@ -1384,6 +1394,13 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "SubscriptionList",
|
||||||
|
icon: "$sockiFileContract",
|
||||||
|
key: FORM_KEY + ":SubscriptionList",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "PurchaseList",
|
title: "PurchaseList",
|
||||||
icon: "$sockiShoppingCart",
|
icon: "$sockiShoppingCart",
|
||||||
|
|||||||
Reference in New Issue
Block a user