salix/modules/client/front/address/create/index.html

193 lines
6.1 KiB
HTML
Raw Normal View History

2017-02-21 15:21:55 +00:00
<vn-watcher
vn-id="watcher"
2020-01-28 08:03:20 +00:00
url="Clients/{{$ctrl.$params.id}}/createAddress"
2017-02-21 15:21:55 +00:00
id-field="id"
2020-01-28 08:03:20 +00:00
data="$ctrl.address"
params="$ctrl.address"
insert-mode="true"
2017-02-21 15:21:55 +00:00
form="form">
</vn-watcher>
<vn-crud-model
2020-09-17 18:12:52 +00:00
auto-load="true"
url="Provinces/location"
data="provincesLocation"
order="id">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="Incoterms"
data="incoterms"
order="name">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="CustomsAgents"
data="customsAgents"
order="fiscalName">
</vn-crud-model>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
2019-10-09 22:47:29 +00:00
<vn-horizontal>
<vn-check
vn-one
2020-01-28 08:03:20 +00:00
label="Default" ng-model="$ctrl.address.isDefaultAddress">
2019-10-09 22:47:29 +00:00
</vn-check>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
label="Consignee"
ng-model="$ctrl.address.nickname"
rule
vn-focus>
</vn-textfield>
<vn-textfield
vn-one
label="Street address"
ng-model="$ctrl.address.street"
rule>
</vn-textfield>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
2020-02-24 10:27:36 +00:00
<vn-datalist vn-one
label="Postcode"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.address.postalCode"
2020-02-24 10:27:36 +00:00
selection="$ctrl.postcode"
url="Postcodes/location"
fields="['code','townFk']"
order="code, townFk"
value-field="code"
2020-02-24 10:27:36 +00:00
show-field="code"
rule>
<tpl-item>
2020-02-24 10:27:36 +00:00
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
</tpl-item>
2020-02-24 10:27:36 +00:00
<append>
<vn-icon-button
icon="add_circle"
vn-tooltip="New postcode"
2020-03-04 11:51:29 +00:00
ng-click="postcode.open()"
vn-acl="deliveryBoss"
vn-acl-action="remove">
2020-02-24 10:27:36 +00:00
</vn-icon-button>
</append>
</vn-datalist>
2020-03-02 08:30:54 +00:00
<vn-datalist vn-id="town" vn-one
label="City"
ng-model="$ctrl.address.city"
selection="$ctrl.town"
url="Towns/location"
fields="['id', 'name', 'provinceFk']"
show-field="name"
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
</tpl-item>
</vn-datalist>
<vn-autocomplete vn-id="province" vn-one
label="Province"
2020-10-20 12:42:23 +00:00
ng-model="$ctrl.address.provinceFk"
2020-09-17 18:12:52 +00:00
data="provincesLocation"
2020-03-02 08:30:54 +00:00
fields="['id', 'name', 'countryFk']"
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
2018-03-01 22:38:14 +00:00
<vn-horizontal>
2018-09-10 11:00:01 +00:00
<vn-autocomplete
vn-one
2020-10-20 12:42:23 +00:00
ng-model="$ctrl.address.agencyModeFk"
url="AgencyModes/isActive"
2018-03-01 22:38:14 +00:00
show-field="name"
value-field="id"
label="Agency">
2018-03-01 22:38:14 +00:00
</vn-autocomplete>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
label="Phone"
ng-model="$ctrl.address.phone"
rule>
</vn-textfield>
<vn-textfield
vn-one
label="Mobile"
ng-model="$ctrl.address.mobile"
rule>
</vn-textfield>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
2020-10-20 12:42:23 +00:00
ng-model="$ctrl.address.incotermsFk"
2020-09-17 18:12:52 +00:00
data="incoterms"
show-field="name"
value-field="code"
label="Incoterms">
</vn-autocomplete>
<vn-autocomplete vn-one
2020-10-20 12:42:23 +00:00
ng-model="$ctrl.address.customsAgentFk"
2020-09-17 18:12:52 +00:00
data="customsAgents"
show-field="fiscalName"
value-field="id"
label="Customs agent">
2020-01-28 10:56:26 +00:00
<append>
<vn-icon-button
icon="add_circle"
vn-tooltip="New customs agent"
ng-click="$ctrl.showCustomAgent($event)">
</vn-icon-button>
</append>
</vn-autocomplete>
</vn-horizontal>
</vn-card>
<vn-button-bar>
2017-06-07 06:39:40 +00:00
<vn-submit label="Save"></vn-submit>
2019-10-18 19:36:30 +00:00
<vn-button
label="Cancel"
2019-10-09 22:47:29 +00:00
ui-sref="client.card.address.index">
2019-10-18 19:36:30 +00:00
</vn-button>
</vn-button-bar>
</form>
2019-07-08 12:07:09 +00:00
<!-- New postcode dialog -->
<vn-geo-postcode vn-id="postcode"
2019-10-30 15:57:14 +00:00
on-response="$ctrl.onResponse($response)">
</vn-geo-postcode>
<!-- Create custom agent dialog -->
<vn-dialog class="edit"
vn-id="customAgent"
2020-05-06 12:38:09 +00:00
on-accept="$ctrl.onCustomAgentAccept()"
message="New customs agent">
<tpl-body>
<vn-horizontal>
<vn-textfield vn-one vn-focus
label="NIF"
ng-model="$ctrl.newCustomsAgent.nif"
required="true">
</vn-textfield>
<vn-textfield vn-one
label="Fiscal name"
ng-model="$ctrl.newCustomsAgent.fiscalName"
required="true">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one
label="Street"
ng-model="$ctrl.newCustomsAgent.street">
</vn-textfield>
<vn-textfield vn-one
label="Phone"
ng-model="$ctrl.newCustomsAgent.phone">
</vn-textfield>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Create</button>
</tpl-buttons>
</vn-dialog>