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

208 lines
5.3 KiB
XML
Raw Permalink Normal View History

2015-03-06 23:33:54 +00:00
<vn>
2023-01-30 10:08:26 +00:00
<vn-lot-query id="params">
<vn-spec name="id" type="Number"/>
</vn-lot-query>
2015-03-06 23:33:54 +00:00
<vn-group>
2022-05-30 01:30:33 +00:00
<vn-lot id="lot" on-change="this.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">
2023-01-30 10:08:26 +00:00
<db-model property="model" lot="params">
2018-05-11 09:25:10 +00:00
SELECT m.code deliveryMethod, o.sent, o.agencyModeFk, o.addressFk
2023-01-30 10:08:26 +00:00
FROM myOrder o
2018-05-11 09:25:10 +00:00
JOIN vn.deliveryMethod m ON m.id = o.deliveryMethodFk
2023-01-30 10:08:26 +00:00
WHERE o.id = #id
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"
2022-05-30 01:30:33 +00:00
lot="lot"
2018-01-19 14:59:44 +00:00
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-17 14:34:42 +00:00
</db-model>
2018-01-19 14:59:44 +00:00
<db-model id="warehouses"
auto-load="false"
2022-05-30 01:30:33 +00:00
lot="lot"
2018-01-19 14:59:44 +00:00
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-15 13:39:07 +00:00
</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>
2023-01-16 13:18:07 +00:00
<div id="form" class="hedera-checkout">
2022-05-26 06:08:31 +00:00
<div class="vn-w-sm">
<div class="box bar">
<htk-assistant-bar
id="assistant-bar"
assistant="assistant"/>
</div>
<div class="box vn-px-md vn-py-xl">
2022-05-26 06:08:31 +00:00
<div class="form">
<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"
2022-06-06 16:02:17 +00:00
form="lot"
column="method"
2022-05-26 06:08:31 +00:00
on-changed="onMethodChange"/>
<div>
<label>
<htk-radio radio-group="rg-method" value="AGENCY"/>
<t>Receive the order</t>
</label>
</div>
<div>
<label>
<htk-radio radio-group="rg-method" value="PICKUP"/>
<t>PickupInStore</t>
</label>
</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"
2022-06-06 16:02:17 +00:00
form="lot"
column="date"
2022-05-26 06:08:31 +00:00
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"
2022-06-06 16:02:17 +00:00
on-change="onAddressChange">
2022-05-26 06:08:31 +00:00
<db-model property="model" id="addresses">
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.name
2022-05-26 06:08:31 +00:00
FROM myAddress a
2022-10-05 08:49:54 +00:00
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.isActive
2022-05-26 06:08:31 +00:00
</db-model>
<custom>
2022-06-06 16:02:17 +00:00
<div
class="address"
on-click="this.onAddressClick(iter.id)"
id="address">
<p class="consignee">{{iter.nickname}}</p>
<p>{{iter.street}}</p>
2022-05-26 06:08:31 +00:00
</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"
2022-06-06 16:02:17 +00:00
form="lot"
column="agency"
2022-05-26 06:08:31 +00:00
on-changed="onFieldChange"
model="agencies"/>
</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"
2022-06-06 16:02:17 +00:00
form="lot"
column="agency"
2022-05-26 06:08:31 +00:00
on-changed="onFieldChange"
model="warehouses"/>
</div>
</htk-step>
<htk-step
name="confirm-delivery">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Arrival</t>
2022-06-06 16:02:17 +00:00
<htk-text format="%D" form="lot" column="date"/>
2022-05-26 06:08:31 +00:00
</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>
2022-05-26 06:08:31 +00:00
</htk-step>
<htk-step
name="confirm-pickup">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Pickup</t>
2022-06-06 16:02:17 +00:00
<htk-text format="%D" form="lot" column="date"/>
2022-05-26 06:08:31 +00:00
</p>
<p>
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
<div class="clear"/>
2015-07-10 12:30:08 +00:00
</div>
2022-05-26 06:08:31 +00:00
</htk-step>
</htk-assistant>
</div>
2015-03-06 23:33:54 +00:00
</div>
</div>
</div>
</vn>