#1045 ticket.datos basicos
This commit is contained in:
parent
1337e0e92f
commit
7096273800
|
@ -19,7 +19,7 @@
|
|||
value-field="id"
|
||||
field="$ctrl.ticket.addressFk">
|
||||
<tpl-item>{{::nickname}}
|
||||
<span ng-show="city || province">- {{::city}} ({{::province.name}})</span>
|
||||
<span ng-show="city || province || street">- {{::street}} - {{::city}} - {{::province.name}} - {{::agencyMode.name}}</span>
|
||||
</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete vn-one
|
||||
|
@ -32,12 +32,12 @@
|
|||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-date-picker vn-one
|
||||
<vn-date-picker vn-one
|
||||
label="Shipped"
|
||||
model="$ctrl.shipped"
|
||||
ini-options="{enableTime: true, dateFormat: 'd-m-Y h:i'}">
|
||||
</vn-date-picker>
|
||||
<vn-date-picker vn-one
|
||||
<vn-date-picker vn-one
|
||||
label="Landed"
|
||||
model="$ctrl.landed">
|
||||
</vn-date-picker>
|
||||
|
|
|
@ -35,6 +35,8 @@ class Controller {
|
|||
get clientFk() {
|
||||
if (this.ticket)
|
||||
return this.ticket.clientFk;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
set shipped(value) {
|
||||
|
@ -45,6 +47,8 @@ class Controller {
|
|||
get shipped() {
|
||||
if (this.ticket)
|
||||
return this.ticket.shipped;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
set landed(value) {
|
||||
|
@ -55,6 +59,8 @@ class Controller {
|
|||
get landed() {
|
||||
if (this.ticket)
|
||||
return this.ticket.landed;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
onChangeShipped(value) {
|
||||
|
@ -94,6 +100,12 @@ class Controller {
|
|||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -107,10 +119,11 @@ class Controller {
|
|||
}
|
||||
|
||||
async onStepChange(state) {
|
||||
if (this.isFormInvalid())
|
||||
if (this.isFormInvalid()) {
|
||||
return this.vnApp.showError(
|
||||
this.$translate.instant('Some fields are invalid')
|
||||
);
|
||||
}
|
||||
|
||||
let query = `/ticket/api/sales/${this.ticket.id}/priceDifference`;
|
||||
let data = {
|
||||
|
@ -126,10 +139,11 @@ class Controller {
|
|||
|
||||
return true;
|
||||
}, res => {
|
||||
if (res.data.error.message === 'NO_AGENCY_AVAILABLE')
|
||||
if (res.data.error.message === 'NO_AGENCY_AVAILABLE') {
|
||||
this.vnApp.showMessage(
|
||||
this.$translate.instant(`There's no available agency for this landing date`)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue