ts-glitter 21.8.9 → 21.9.1
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 +1 -1
- package/lowcode/Entry.ts +1 -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/glitter-base/route/post.js +5 -0
- package/lowcode/glitter-base/route/post.ts +6 -0
- package/lowcode/public-components/checkout/index.js +38 -33
- package/lowcode/public-components/checkout/index.ts +37 -34
- package/lowcode/public-components/public/ad.ts +0 -1
- 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 +5 -1
- package/src/api-public/services/shopping.ts +5 -4
|
@@ -2820,10 +2820,10 @@ export class Shopping {
|
|
|
2820
2820
|
|
|
2821
2821
|
if (voucher.conditionType === 'order') {
|
|
2822
2822
|
if (voucher.method === 'fixed') {
|
|
2823
|
-
voucher.discount_total = disValue * voucher.times;
|
|
2823
|
+
voucher.discount_total = Math.floor(disValue * voucher.times);
|
|
2824
2824
|
}
|
|
2825
2825
|
if (voucher.method === 'percent') {
|
|
2826
|
-
voucher.discount_total = voucher.bind_subtotal * disValue;
|
|
2826
|
+
voucher.discount_total = Math.floor(voucher.bind_subtotal * disValue);
|
|
2827
2827
|
}
|
|
2828
2828
|
if (voucher.bind_subtotal >= voucher.discount_total) {
|
|
2829
2829
|
let remain = parseInt(`${voucher.discount_total}`, 10);
|
|
@@ -2897,6 +2897,7 @@ export class Shopping {
|
|
|
2897
2897
|
}
|
|
2898
2898
|
}
|
|
2899
2899
|
|
|
2900
|
+
voucher.discount_total = Math.floor(voucher.discount_total);
|
|
2900
2901
|
return voucher.bind.length > 0;
|
|
2901
2902
|
}
|
|
2902
2903
|
|
|
@@ -5875,9 +5876,9 @@ export class Shopping {
|
|
|
5875
5876
|
async batchPostCustomerInvoice(dataArray: InvoiceData[]) {
|
|
5876
5877
|
let result: any = [];
|
|
5877
5878
|
const chunk = 10;
|
|
5878
|
-
const
|
|
5879
|
+
const chunkLength = Math.ceil(dataArray.length / chunk);
|
|
5879
5880
|
|
|
5880
|
-
for (let i = 0; i <
|
|
5881
|
+
for (let i = 0; i < chunkLength; i++) {
|
|
5881
5882
|
const arr = dataArray.slice(i * chunk, (i + 1) * chunk);
|
|
5882
5883
|
const res = await Promise.all(
|
|
5883
5884
|
arr.map(item => {
|