274 lines
7.1 KiB
XML
274 lines
7.1 KiB
XML
<vn>
|
|
<vn-group>
|
|
<vn-lot 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"
|
|
auto-load="false"
|
|
lot="lot"
|
|
result-index="1"
|
|
on-status-changed="onAgenciesReady">
|
|
CALL vn.agencyListAvailable (#date, #address);
|
|
SELECT DISTINCT m.id, m.description
|
|
FROM tmp.agencyAvailable a
|
|
JOIN vn.agencyMode m
|
|
ON m.agencyFk = a.agencyFk
|
|
JOIN vn.deliveryMethod d
|
|
ON d.id = m.deliveryMethodFk
|
|
WHERE d.code IN ('AGENCY', 'DELIVERY')
|
|
ORDER BY m.description;
|
|
DROP TEMPORARY TABLE tmp.agencyAvailable;
|
|
</db-model>
|
|
<db-model id="warehouses"
|
|
auto-load="false"
|
|
lot="lot"
|
|
result-index="1"
|
|
on-status-changed="onWarehousesReady">
|
|
CALL vn.agencyListAvailable (#date, #address);
|
|
SELECT DISTINCT m.id, m.description
|
|
FROM tmp.agencyAvailable a
|
|
JOIN vn.agencyMode m
|
|
ON m.agencyFk = a.agencyFk
|
|
JOIN vn.deliveryMethod d
|
|
ON d.id = m.deliveryMethodFk
|
|
WHERE d.code IN ('PICKUP')
|
|
ORDER BY m.description;
|
|
DROP TEMPORARY TABLE tmp.agencyAvailable;
|
|
</db-model>
|
|
</vn-group>
|
|
<h1 id="title">
|
|
_ConfigureOrder
|
|
</h1>
|
|
<div id="actions">
|
|
<htk-bar-button
|
|
icon="close"
|
|
tip="_Cancel"
|
|
on-click="onCancelClick"/>
|
|
</div>
|
|
<<<<<<< HEAD
|
|
<div id="main" class="checkout">
|
|
<div class="card form">
|
|
<htk-assistant
|
|
id="assistant"
|
|
step-count="5"
|
|
step-func="stepFunc">
|
|
<htk-step name="method">
|
|
<h2>_DeliveryOrPickupQuestion</h2>
|
|
<div class="answers radio">
|
|
<htk-radio-group
|
|
id="rg-method"
|
|
lot="lot"
|
|
name="method"
|
|
on-changed="onFieldChange"/>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" id="r-agency" value="AGENCY"/>
|
|
<label for="r-agency">_ReceiveThroughtAgency</label>
|
|
</div>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" id="r-delivery" value="DELIVERY"/>
|
|
<label for="r-delivery">_ReceiveThroughtRoute</label>
|
|
=======
|
|
<div id="form" class="checkout">
|
|
<div class="box">
|
|
<div class="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"
|
|
param="method"
|
|
on-changed="onFieldChange"/>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" value="AGENCY"/>
|
|
<label><t>Receive the order</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"/>
|
|
<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 id="address-question"/>
|
|
<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">
|
|
<custom>
|
|
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
|
|
FROM myAddress a
|
|
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
|
JOIN vn.country c ON c.id = p.countryFk
|
|
WHERE a.isActive
|
|
</custom>
|
|
</db-model>
|
|
<custom>
|
|
<div class="address" id="address">
|
|
<p class="consignee">
|
|
<htk-text form="iter" column="nickname"/>
|
|
</p>
|
|
<p>
|
|
<htk-text form="iter" column="street"/>
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
>>>>>>> master
|
|
</div>
|
|
<div>
|
|
<htk-radio radio-group="rg-method" id="r-pickup" value="PICKUP"/>
|
|
<label for="r-pickup">_PickupInStore</label>
|
|
</div>
|
|
</div>
|
|
</htk-step>
|
|
<htk-step name="date">
|
|
<h2 id="date-question"/>
|
|
<div class="answers">
|
|
<htk-calendar
|
|
id="calendar"
|
|
class="thin-calendar"
|
|
lot="lot"
|
|
name="date"
|
|
restrict-func="calendarRestrict"
|
|
on-pick="onFieldChange"/>
|
|
</div>
|
|
<<<<<<< HEAD
|
|
</htk-step>
|
|
<htk-step name="address">
|
|
<h2>_AddressQuestion</h2>
|
|
<div class="answers target">
|
|
<htk-repeater
|
|
id="repeater"
|
|
form-id="iter"
|
|
on-change="onAddressChange"
|
|
renderer="addressRenderer"
|
|
model="addresses">
|
|
<custom>
|
|
<div class="address" id="address">
|
|
<p class="consignee">
|
|
{{consignee}}
|
|
</p>
|
|
<p>
|
|
{{name}}
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
</div>
|
|
</htk-step>
|
|
<htk-step name="delivery">
|
|
<h2 id="wh-question"/>
|
|
<div class="answers target">
|
|
<htk-combo
|
|
id="agency"
|
|
lot="lot"
|
|
name="agency"
|
|
not-null="true"
|
|
placeholder="_Select agency"
|
|
show-field="description"
|
|
on-changed="onFieldChange"
|
|
model="agencies"/>
|
|
=======
|
|
<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 form="address-form" column="street"/>
|
|
</p>
|
|
<p>
|
|
<t>Agency</t>
|
|
<htk-text form="agency-combo" column="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 form="address-form" column="street"/>
|
|
</p>
|
|
<p>
|
|
<t>ReceiveThroughtRoute</t>
|
|
</p>
|
|
<button id="confirm-delivery" class="thin" on-click="onConfirmClick">
|
|
<t>Confirm</t>
|
|
</button>
|
|
<div class="clear"/>
|
|
</div>
|
|
>>>>>>> master
|
|
</div>
|
|
</htk-step>
|
|
<htk-step name="confirm" class="confirm">
|
|
<h2>_ConfirmToAccessCatalog</h2>
|
|
<div class="answers target">
|
|
<p>
|
|
_Arrival <htk-text format="%D" lot="lot" name="date"/>
|
|
</p>
|
|
<p>
|
|
{{addressForm.name}}
|
|
</p>
|
|
<p id="agency-text">
|
|
<span>_Agency</span> {{agency.description}}
|
|
</p>
|
|
<p id="delivery-text">
|
|
_ReceiveThroughtRoute
|
|
</p>
|
|
<p id="pickup-text">
|
|
<span>_Warehouse</span> {{agency.description}}
|
|
</p>
|
|
<button id="confirm-button" class="thin" on-click="onConfirmClick">
|
|
_Confirm
|
|
</button>
|
|
<div class="clear"/>
|
|
</div>
|
|
</htk-step>
|
|
</htk-assistant>
|
|
<htk-assistant-bar assistant="assistant"/>
|
|
</div>
|
|
</div>
|
|
</vn>
|