Преглед на файлове

Form produits intégration prix par unité de référence (travail en cours)

feature/export_comptable
Fab преди 4 години
родител
ревизия
b67b0e62bf
променени са 4 файла, в които са добавени 16 реда и са изтрити 8 реда
  1. +11
    -5
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  2. +3
    -1
      ShopBundle/Resources/views/backend/productfamily/form.html.twig
  3. +1
    -1
      ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig
  4. +1
    -1
      ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig

+ 11
- 5
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js Целия файл

@@ -63,6 +63,14 @@ Vue.component('product-unit-price', {
},
supplierTaxRate: function () {
//this.setBuyingPriceWithTax();
},
activeProducts:function () {
this.$parent.updateActiveProducts();
},
behaviorPrice:function () {
if(this.behaviorPrice == 'by-reference-unit'){
this.quantity = 1;
}
}
}
});
@@ -144,7 +152,6 @@ Vue.component('product-form', {
availableQuantityDefault: null,
availableQuantity: null,
propertyExpirationDate: null,

titleInherited: false,
priceInherited: false,
priceWithTaxInherited: false,
@@ -248,6 +255,7 @@ appProductFamily = new Vue({
propertyAllergens: null,
propertyOrganicLabelActive: false,
propertyNoveltyExpirationDateActive: false,
activeProducts:false,

formProductArray: [],
currentSection: 'price',
@@ -317,10 +325,8 @@ appProductFamily = new Vue({
return this.$refs.productUnitPrice.unitReference;
}
},
isProductsActice: function () {
if (typeof this.$refs.productUnitPrice !== 'undefined') {
return this.$refs.productUnitPrice.activeProducts;
}
updateActiveProducts: function () {
this.activeProducts = this.$refs.productUnitPrice.activeProducts;
},
getBehaviorPrice: function () {
if (typeof this.$refs.productUnitPrice !== 'undefined') {

+ 3
- 1
ShopBundle/Resources/views/backend/productfamily/form.html.twig Целия файл

@@ -8,7 +8,7 @@
<ul class="nav nav-tabs" id="nav-params">
<li class="nav-item" v-for="section in sectionsArray">
<button type="button"
v-if="(section.name == 'products' && isProductsActice() == true) || (section.name != 'products')"
v-if="(section.name == 'products' && activeProducts == true) || (section.name != 'products')"
:class="'btn '+((currentSection == section.name) ? 'btn btn-primary' : 'btn ')"
@click="changeSection(section)">
${ section.nameDisplay }
@@ -42,6 +42,8 @@
{% if formValues.typeExpirationDate %}typeExpirationDate: "{{ formValues.typeExpirationDate }}",{% endif %}
{% if formValues.behaviorExpirationDate %}behaviorExpirationDate: "{{ formValues.behaviorExpirationDate }}",{% endif %}
{% if formValues.propertyExpirationDate %}propertyExpirationDate: "{{ formValues.propertyExpirationDate|date('d/m/Y') }}",{% endif %}
{% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %}

};
multiplyingFactor = "{{ form.multiplyingFactor.vars.value }}"
window.productUnitPriceValues = {

+ 1
- 1
ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig Целия файл

@@ -44,7 +44,7 @@
{{ form_row(form.unit, {"attr":{'v-model': 'unit', '@change': "unitUpdated"}}) }}
</div>

<div class="col-6">
<div class="col-6" v-show="behaviorPrice=='by-piece'">
<div class="form-group field-weight">
{{ form_label(form.quantity) }}
<div class="form-widget">

+ 1
- 1
ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig Целия файл

@@ -9,7 +9,7 @@
{{ form_label(form.behaviorCountStock) }}
{% for field in form.behaviorCountStock %}
{% if field.vars.value == "by-product" %}
<div v-if="isProductsActice() == true">
<div v-if="activeProducts == true">
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorCountStock'}}) }}
</div>
{% else %}

Loading…
Отказ
Запис