ts-glitter 21.9.0 → 21.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +6 -1
- package/lowcode/Entry.ts +6 -1
- package/lowcode/cms-plugin/filter-options.js +1 -1
- package/lowcode/cms-plugin/filter-options.ts +1 -1
- package/lowcode/cms-plugin/model/order.d.ts +62 -21
- package/lowcode/cms-plugin/module/data.js +7 -0
- package/lowcode/cms-plugin/module/data.ts +7 -189
- package/lowcode/cms-plugin/module/delivery-html.ts +1 -2
- package/lowcode/cms-plugin/module/order-setting.js +90 -60
- package/lowcode/cms-plugin/module/order-setting.ts +110 -77
- package/lowcode/cms-plugin/shopping-order-manager.js +152 -81
- package/lowcode/cms-plugin/shopping-order-manager.ts +165 -85
- package/lowcode/css/editor.css +1 -1
- package/lowcode/public-components/checkout/index.js +38 -33
- package/lowcode/public-components/checkout/index.ts +37 -34
- package/package.json +1 -1
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/shopping.js +5 -4
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +5 -4
|
@@ -1961,10 +1961,10 @@ class Shopping {
|
|
|
1961
1961
|
const disValue = parseFloat(voucher.value) / (voucher.method === 'percent' ? 100 : 1);
|
|
1962
1962
|
if (voucher.conditionType === 'order') {
|
|
1963
1963
|
if (voucher.method === 'fixed') {
|
|
1964
|
-
voucher.discount_total = disValue * voucher.times;
|
|
1964
|
+
voucher.discount_total = Math.floor(disValue * voucher.times);
|
|
1965
1965
|
}
|
|
1966
1966
|
if (voucher.method === 'percent') {
|
|
1967
|
-
voucher.discount_total = voucher.bind_subtotal * disValue;
|
|
1967
|
+
voucher.discount_total = Math.floor(voucher.bind_subtotal * disValue);
|
|
1968
1968
|
}
|
|
1969
1969
|
if (voucher.bind_subtotal >= voucher.discount_total) {
|
|
1970
1970
|
let remain = parseInt(`${voucher.discount_total}`, 10);
|
|
@@ -2038,6 +2038,7 @@ class Shopping {
|
|
|
2038
2038
|
});
|
|
2039
2039
|
}
|
|
2040
2040
|
}
|
|
2041
|
+
voucher.discount_total = Math.floor(voucher.discount_total);
|
|
2041
2042
|
return voucher.bind.length > 0;
|
|
2042
2043
|
}
|
|
2043
2044
|
function countingBindDiscount(voucher) {
|
|
@@ -4352,8 +4353,8 @@ class Shopping {
|
|
|
4352
4353
|
async batchPostCustomerInvoice(dataArray) {
|
|
4353
4354
|
let result = [];
|
|
4354
4355
|
const chunk = 10;
|
|
4355
|
-
const
|
|
4356
|
-
for (let i = 0; i <
|
|
4356
|
+
const chunkLength = Math.ceil(dataArray.length / chunk);
|
|
4357
|
+
for (let i = 0; i < chunkLength; i++) {
|
|
4357
4358
|
const arr = dataArray.slice(i * chunk, (i + 1) * chunk);
|
|
4358
4359
|
const res = await Promise.all(arr.map(item => {
|
|
4359
4360
|
return this.postCustomerInvoice(item);
|