188 lines
4.8 KiB
XML
Executable File
188 lines
4.8 KiB
XML
Executable File
<vn>
|
|
<vn-group>
|
|
<vn-basic-set id="lot" on-change="onAddressChange"/>
|
|
<db-form id="defaults" on-ready="onValuesReady">
|
|
<db-model property="model">
|
|
SELECT delivery_method, agency_id, address_id
|
|
FROM basket_defaults
|
|
</db-model>
|
|
</db-form>
|
|
<db-form id="order-form" on-ready="onValuesReady">
|
|
<db-model property="model">
|
|
SELECT d.code delivery_method, o.date_send, o.agency_id, o.address_id
|
|
FROM basket o
|
|
JOIN vn.deliveryMethod d ON d.id = o.delivery_method_id
|
|
</db-model>
|
|
</db-form>
|
|
<db-model
|
|
id="agencies"
|
|
lot="lot"
|
|
auto-load="false"
|
|
on-status-changed="onAgenciesReady">
|
|
CALL vn.agencyListForMethod(#date, #address, #method)
|
|
</db-model>
|
|
</vn-group>
|
|
<h1 id="title">
|
|
<t>ConfigureOrder</t>
|
|
</h1>
|
|
<div id="actions">
|
|
<htk-bar-button
|
|
icon="close"
|
|
tip="_Cancel"
|
|
on-click="onCancelClick"/>
|
|
</div>
|
|
<div id="main" class="checkout">
|
|
<div class="card form">
|
|
<htk-assistant
|
|
id="assistant"
|
|
step-count="5"
|
|
step-func="stepFunc"
|
|
node="assistant-node"/>
|
|
<div id="assistant-node">
|
|
<div id="method-step">
|
|
<h2><t>DeliveryOrPickupQuestion</t></h2>
|
|
<div class="answers radio">
|
|
<htk-radio-group
|
|
id="rg-method"
|
|
lot="lot"
|
|
name="method"
|
|
param="method"
|
|
on-changed="onFieldChange"/>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" value="AGENCY"/>
|
|
<label><t>ReceiveThroughtAgency</t></label>
|
|
</div>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" value="DELIVERY"/>
|
|
<label><t>ReceiveThroughtRoute</t></label>
|
|
</div>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" value="PICKUP"/>
|
|
<label><t>PickupInStore</t></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="date-step">
|
|
<h2 id="date-question"><t>OrderDateDeliveryQuestion</t></h2>
|
|
<div class="answers">
|
|
<htk-calendar
|
|
id="calendar"
|
|
class="thin-calendar"
|
|
param="date"
|
|
restrict-func="calendarRestrict"
|
|
on-changed="onFieldChange"/>
|
|
</div>
|
|
</div>
|
|
<div id="address-step">
|
|
<h2><t>AddressQuestion</t></h2>
|
|
<db-form id="address-form" model="addresses"/>
|
|
<div class="answers target">
|
|
<htk-repeater
|
|
id="repeater"
|
|
form-id="iter"
|
|
on-change="onAddressChange"
|
|
renderer="addressRenderer">
|
|
<db-model property="model" id="addresses">
|
|
SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
|
|
FROM address_view a
|
|
LEFT JOIN vn2008.province p ON a.province_id = p.province_id
|
|
JOIN vn2008.Paises c ON c.Id = p.Paises_Id
|
|
WHERE active != FALSE
|
|
</db-model>
|
|
<custom>
|
|
<div class="address" id="address">
|
|
<p class="consignee">
|
|
<htk-text lot="iter" name="consignee"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="iter" name="name"/>
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
</div>
|
|
</div>
|
|
<div id="agency-step">
|
|
<h2><t>AgencyQuestion</t></h2>
|
|
<div class="answers target">
|
|
<htk-combo
|
|
id="agency-combo"
|
|
lot="lot"
|
|
name="agency"
|
|
on-changed="onFieldChange"
|
|
model="agencies"/>
|
|
</div>
|
|
</div>
|
|
<div id="pickup-step">
|
|
<h2><t>PickupWarehouseQuestion</t></h2>
|
|
<div class="answers target">
|
|
<htk-combo
|
|
id="warehouse-combo"
|
|
lot="lot"
|
|
name="agency"
|
|
on-changed="onFieldChange"
|
|
model="warehouses"/>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-agency-step" class="confirm">
|
|
<h2><t>ConfirmToAccessCatalog</t></h2>
|
|
<div class="answers target">
|
|
<p>
|
|
<t>Arrival</t>
|
|
<htk-text format="%D" param="date"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="address-form" name="name"/>
|
|
</p>
|
|
<p>
|
|
<t>Agency</t>
|
|
<htk-text lot="agency-combo" name="description"/>
|
|
</p>
|
|
<button id="confirm-agency" class="thin" on-click="onConfirmClick">
|
|
<t>Confirm</t>
|
|
</button>
|
|
<div class="clear"/>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-delivery-step" class="confirm">
|
|
<h2><t>ConfirmToAccessCatalog</t></h2>
|
|
<div class="answers target">
|
|
<p>
|
|
<t>Arrival</t>
|
|
<htk-text format="%D" param="date"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="address-form" name="name"/>
|
|
</p>
|
|
<p>
|
|
<t>ReceiveThroughtRoute</t>
|
|
</p>
|
|
<button id="confirm-delivery" class="thin" on-click="onConfirmClick">
|
|
<t>Confirm</t>
|
|
</button>
|
|
<div class="clear"/>
|
|
</div>
|
|
</div>
|
|
<div id="confirm-pickup-step" class="confirm">
|
|
<h2><t>ConfirmToAccessCatalog</t></h2>
|
|
<div class="answers target">
|
|
<p>
|
|
<t>Pickup</t>
|
|
<htk-text format="%D" param="date"/>
|
|
</p>
|
|
<p>
|
|
<t>Warehouse</t>
|
|
<htk-text lot="warehouse-combo" name="description"/>
|
|
</p>
|
|
<button id="confirm-pickup" class="thin" on-click="onConfirmClick">
|
|
<t>Confirm</t>
|
|
</button>
|
|
<div class="clear"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<htk-assistant-bar assistant="assistant"/>
|
|
</div>
|
|
</div>
|
|
</vn>
|