0
1
Fork 0
hedera-web-mindshore/forms/ecomerce/checkout/ui.xml

230 lines
6.0 KiB
XML
Raw Normal View History

2015-03-06 23:33:54 +00:00
<vn>
<vn-group>
2015-07-15 13:39:07 +00:00
<vn-param id="method"/>
2015-07-23 15:58:48 +00:00
<vn-param id="date"/>
2015-07-15 13:39:07 +00:00
<vn-param id="agency"/>
2015-07-23 15:58:48 +00:00
<vn-param id="address" on-changed="onAddressChange"/>
2015-07-15 13:39:07 +00:00
<db-form id="defaults" on-ready="onValuesReady">
2015-11-09 08:14:33 +00:00
<db-model property="model">
<custom>
SELECT delivery_method, agency_id, address_id
FROM basket_defaults
</custom>
</db-model>
</db-form>
2015-07-15 13:39:07 +00:00
<db-form id="order-form" on-ready="onValuesReady">
2015-11-09 08:14:33 +00:00
<db-model property="model">
<custom>
SELECT v.code delivery_method, o.date_send, o.agency_id, o.address_id
FROM basket o
JOIN vn2008.Vistas v ON o.delivery_method_id = v.vista_id
</custom>
2015-07-03 05:49:45 +00:00
</db-model>
</db-form>
2018-01-19 14:59:44 +00:00
<db-model id="agencies"
auto-load="false"
result-index="1"
on-status-changed="onAgenciesReady">
2015-11-09 08:14:33 +00:00
<custom>
2018-01-19 14:59:44 +00:00
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
2018-02-06 08:57:05 +00:00
WHERE d.code IN ('AGENCY', 'DELIVERY')
ORDER BY m.description;
2018-01-19 14:59:44 +00:00
DROP TEMPORARY TABLE tmp.agencyAvailable;
2015-11-09 08:14:33 +00:00
</custom>
2015-07-15 13:39:07 +00:00
<sql-batch property="batch">
2015-11-09 08:14:33 +00:00
<custom>
<item name="address" param="address"/>
<item name="date" param="date"/>
</custom>
2015-07-17 14:34:42 +00:00
</sql-batch>
</db-model>
2018-01-19 14:59:44 +00:00
<db-model id="warehouses"
auto-load="false"
result-index="1"
on-status-changed="onWarehousesReady">
2015-11-09 08:14:33 +00:00
<custom>
2018-01-19 14:59:44 +00:00
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
2018-02-06 08:57:05 +00:00
WHERE d.code IN ('PICKUP')
ORDER BY m.description;
2018-01-19 14:59:44 +00:00
DROP TEMPORARY TABLE tmp.agencyAvailable;
2015-11-09 08:14:33 +00:00
</custom>
2015-07-17 14:34:42 +00:00
<sql-batch property="batch">
2015-11-09 08:14:33 +00:00
<custom>
<item name="address" param="address"/>
<item name="date" param="date"/>
</custom>
2015-07-15 13:39:07 +00:00
</sql-batch>
</db-model>
2015-03-06 23:33:54 +00:00
</vn-group>
<div id="title">
<h1><t>ConfigureOrder</t></h1>
</div>
2015-09-16 16:11:15 +00:00
<div id="actions">
2016-09-19 06:40:18 +00:00
<htk-bar-button
icon="close"
2015-09-16 16:11:15 +00:00
tip="_Cancel"
2016-09-19 06:40:18 +00:00
on-click="onCancelClick"/>
</div>
2015-03-06 23:33:54 +00:00
<div id="form" class="checkout">
<div class="box">
<div class="form">
<htk-assistant
id="assistant"
step-count="5"
step-func="stepFunc"
node="assistant-node"/>
2015-07-07 15:27:47 +00:00
<div id="assistant-node">
2015-07-15 13:39:07 +00:00
<div id="method-step">
<h2><t>DeliveryOrPickupQuestion</t></h2>
<div class="answers radio">
<htk-radio-group
2015-07-15 13:39:07 +00:00
id="rg-method"
param="method"
on-changed="onFieldChange"/>
2015-07-03 05:49:45 +00:00
<div>
2015-07-15 13:39:07 +00:00
<htk-radio radio-group="rg-method" value="AGENCY"/>
2018-01-22 09:29:47 +00:00
<label><t>Receive the order</t></label>
2015-07-03 05:49:45 +00:00
</div>
<div>
2015-07-15 13:39:07 +00:00
<htk-radio radio-group="rg-method" value="PICKUP"/>
2015-07-03 05:49:45 +00:00
<label><t>PickupInStore</t></label>
</div>
</div>
</div>
2015-07-10 12:30:08 +00:00
<div id="date-step">
2018-01-19 14:59:44 +00:00
<h2 id="date-question"/>
2015-07-10 12:30:08 +00:00
<div class="answers">
<htk-calendar
id="calendar"
class="thin-calendar"
2015-07-17 14:34:42 +00:00
param="date"
2015-07-15 13:39:07 +00:00
restrict-func="calendarRestrict"
2015-07-10 12:30:08 +00:00
on-changed="onFieldChange"/>
</div>
</div>
<div id="address-step">
2018-01-19 14:59:44 +00:00
<h2 id="address-question"/>
2015-07-23 15:58:48 +00:00
<db-form id="address-form" model="addresses"/>
<div class="answers target">
<htk-repeater
id="repeater"
form-id="iter"
on-change="onAddressChange"
renderer="addressRenderer">
2015-11-09 08:14:33 +00:00
<db-model property="model" id="addresses">
<custom>
2018-01-22 08:52:43 +00:00
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
2015-11-09 08:14:33 +00:00
</custom>
2015-07-23 15:58:48 +00:00
</db-model>
2015-11-09 08:14:33 +00:00
<custom>
2015-07-23 15:58:48 +00:00
<div class="address" id="address">
<p class="consignee">
2018-01-22 08:52:43 +00:00
<htk-text form="iter" column="nickname"/>
2015-07-23 15:58:48 +00:00
</p>
<p>
2018-01-22 08:52:43 +00:00
<htk-text form="iter" column="street"/>
2015-07-23 15:58:48 +00:00
</p>
</div>
2015-11-09 08:14:33 +00:00
</custom>
2015-07-23 15:58:48 +00:00
</htk-repeater>
</div>
</div>
<div id="agency-step">
<h2><t>AgencyQuestion</t></h2>
<div class="answers target">
2015-07-15 13:39:07 +00:00
<htk-combo
id="agency-combo"
param="agency"
on-changed="onFieldChange"
model="agencies"/>
</div>
</div>
<div id="pickup-step">
<h2><t>PickupWarehouseQuestion</t></h2>
<div class="answers target">
2015-07-15 13:39:07 +00:00
<htk-combo
id="warehouse-combo"
param="agency"
on-changed="onFieldChange"
2015-07-17 14:34:42 +00:00
model="warehouses"/>
2015-07-03 05:49:45 +00:00
</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"/>
2015-07-03 05:49:45 +00:00
</p>
<p>
2018-01-22 08:52:43 +00:00
<htk-text form="address-form" column="street"/>
2015-07-03 05:49:45 +00:00
</p>
<p>
<t>Agency</t>
<htk-text form="agency-combo" column="description"/>
</p>
2015-12-10 13:48:43 +00:00
<button id="confirm-agency" class="thin" on-click="onConfirmClick">
2015-07-07 15:27:47 +00:00
<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>
2015-07-03 05:49:45 +00:00
<t>Arrival</t>
<htk-text format="%D" param="date"/>
</p>
<p>
2018-01-22 08:52:43 +00:00
<htk-text form="address-form" column="street"/>
</p>
<p>
2015-07-03 05:49:45 +00:00
<t>ReceiveThroughtRoute</t>
</p>
2015-12-10 13:48:43 +00:00
<button id="confirm-delivery" class="thin" on-click="onConfirmClick">
2015-07-07 15:27:47 +00:00
<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>
2015-07-03 05:49:45 +00:00
<t>Pickup</t>
<htk-text format="%D" param="date"/>
</p>
<p>
2015-07-03 05:49:45 +00:00
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
2015-12-10 13:48:43 +00:00
<button id="confirm-pickup" class="thin" on-click="onConfirmClick">
2015-07-07 15:27:47 +00:00
<t>Confirm</t>
</button>
<div class="clear"/>
</div>
</div>
</div>
<htk-assistant-bar assistant="assistant"/>
2015-03-06 23:33:54 +00:00
</div>
</div>
</div>
</vn>