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

213 lines
5.3 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">
2018-09-14 13:13:28 +00:00
SELECT deliveryMethod, agencyModeFk, addressFk, defaultAgencyFk
2018-05-11 09:25:10 +00:00
FROM myBasketDefaults
</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">
2018-05-11 09:25:10 +00:00
SELECT m.code deliveryMethod, o.sent, o.agencyModeFk, o.addressFk
FROM myBasket o
JOIN vn.deliveryMethod m ON m.id = o.deliveryMethodFk
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">
2020-02-12 07:24:32 +00:00
CALL vn.zone_getAgency(#address, #date);
2019-06-05 07:05:54 +00:00
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
2018-05-11 09:25:10 +00:00
JOIN vn.deliveryMethod d
2019-06-05 07:05:54 +00:00
ON d.id = a.deliveryMethodFk
2018-05-11 09:25:10 +00:00
WHERE d.code IN ('AGENCY', 'DELIVERY')
2020-04-11 11:37:03 +00:00
AND a.isVisible
2019-06-05 07:05:54 +00:00
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
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">
2020-02-12 07:24:32 +00:00
CALL vn.zone_getAgency(#address, #date);
2019-06-05 07:05:54 +00:00
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
2018-05-11 09:25:10 +00:00
JOIN vn.deliveryMethod d
2019-06-05 07:05:54 +00:00
ON d.id = a.deliveryMethodFk
2018-05-11 09:25:10 +00:00
WHERE d.code IN ('PICKUP')
2020-04-11 11:37:03 +00:00
AND a.isVisible
2019-06-05 07:05:54 +00:00
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
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 bar">
2018-05-17 08:52:27 +00:00
<htk-assistant-bar
id="assistant-bar"
assistant="assistant"/>
</div>
2015-03-06 23:33:54 +00:00
<div class="box">
<div class="form">
2018-05-17 08:52:27 +00:00
<htk-assistant id="assistant"
endFunc="onConfirmClick">
<htk-step
name="method"
validate-func="methodValidate">
<h2><t>DeliveryOrPickupQuestion</t></h2>
<div class="answers radio">
<htk-radio-group
id="rg-method"
param="method"
on-changed="onMethodChange"/>
<div>
2018-05-17 08:52:27 +00:00
<label>
<htk-radio radio-group="rg-method" value="AGENCY"/>
<t>Receive the order</t>
</label>
</div>
<div>
2018-05-17 08:52:27 +00:00
<label>
<htk-radio radio-group="rg-method" value="PICKUP"/>
<t>PickupInStore</t>
</label>
2015-07-10 12:30:08 +00:00
</div>
</div>
</htk-step>
<htk-step
name="date"
show-func="dateShow"
validate-func="dateValidate">
<h2 id="date-question"/>
<div class="answers">
<htk-calendar
id="calendar"
class="thin-calendar"
param="date"
restrict-func="calendarRestrict"
on-changed="onFieldChange"/>
</div>
</htk-step>
<htk-step
name="address"
show-func="addressShow"
validate-func="addressValidate">
<h2 id="address-question"/>
<div class="answers target">
<db-form id="address-form" model="addresses"/>
<htk-repeater
id="repeater"
form-id="iter"
on-change="onAddressChange"
renderer="addressRenderer">
<db-model property="model" id="addresses">
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
</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>
</div>
</htk-step>
<htk-step
name="agency"
show-func="agencyShow"
validate-func="agencyValidate">
<h2><t>AgencyQuestion</t></h2>
<div class="answers target">
<htk-combo
id="agency-combo"
param="agency"
on-changed="onFieldChange"
model="agencies"/>
2015-07-03 05:49:45 +00:00
</div>
</htk-step>
<htk-step
name="pickup"
show-func="pickupShow"
validate-func="pickupValidate">
<h2><t>PickupWarehouseQuestion</t></h2>
<div class="answers target">
<htk-combo
id="warehouse-combo"
param="agency"
on-changed="onFieldChange"
model="warehouses"/>
</div>
</htk-step>
<htk-step
name="confirm-delivery">
2022-05-24 10:18:44 +00:00
<h2><t>ConfirmData</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>
<div class="clear"/>
</div>
</htk-step>
<htk-step
name="confirm-pickup">
2022-05-24 10:18:44 +00:00
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Pickup</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
<div class="clear"/>
</div>
</htk-step>
</htk-assistant>
2015-03-06 23:33:54 +00:00
</div>
</div>
</div>
</vn>