|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
dayClickList: function(event) { |
|
|
dayClickList: function(event) { |
|
|
var dateStr = event.currentTarget.getAttribute('data-distribution-date') ; |
|
|
var dateStr = event.currentTarget.getAttribute('data-distribution-date') ; |
|
|
/*var arr = dateStr.split(/[- :]/), |
|
|
|
|
|
dateObject = new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4], arr[5]);*/ |
|
|
|
|
|
|
|
|
|
|
|
var dateObject = Date.parse(String(dateStr)); |
|
|
|
|
|
|
|
|
|
|
|
console.log(dateObject) ; |
|
|
|
|
|
//var dateObject = new Date(dateStr) ; |
|
|
|
|
|
|
|
|
var dateObject = new Date(dateStr.replace(/-/g, "/")) ; |
|
|
if(this.isAvailableDate(dateObject)) { |
|
|
if(this.isAvailableDate(dateObject)) { |
|
|
this.dayClickEvent(dateObject) ; |
|
|
this.dayClickEvent(dateObject) ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.changeStep('products') ; |
|
|
this.changeStep('products') ; |
|
|
}, |
|
|
}, |
|
|
productQuantityClick: function(product, quantity) { |
|
|
productQuantityClick: function(product, quantity) { |
|
|
console.log(this.products[product.index].quantity_remaining) ; |
|
|
|
|
|
if( this.products[product.index].quantity_form + quantity >= 0 && |
|
|
if( this.products[product.index].quantity_form + quantity >= 0 && |
|
|
(this.products[product.index].quantity_form + quantity <= (this.products[product.index].quantity_remaining * this.products[product.index].coefficient_unit) || |
|
|
(this.products[product.index].quantity_form + quantity <= (this.products[product.index].quantity_remaining * this.products[product.index].coefficient_unit) || |
|
|
!this.products[product.index].quantity_max) |
|
|
!this.products[product.index].quantity_max) |