@pisell/private-materials 3.0.203 → 3.0.204
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +33 -18
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -46
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +35 -266
- package/es/components/booking/forms/model.d.ts +1 -1
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +9 -124
- package/es/components/booking/info/main.js +15 -28
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +96 -187
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -12
- package/es/components/booking/info/service/addService/utils.js +26 -103
- package/es/components/booking/info/service/editService/index.js +132 -435
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/service/serve.d.ts +0 -10
- package/es/components/booking/info/service/serve.js +0 -28
- package/es/components/booking/info/utils.d.ts +0 -20
- package/es/components/booking/info/utils.js +0 -37
- package/es/components/booking/locales.d.ts +0 -66
- package/es/components/booking/locales.js +3 -81
- package/es/components/booking/model.d.ts +1 -5
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -1
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +26 -143
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/app.d.ts +11 -0
- package/es/components/eftposPay/app.js +173 -0
- package/es/components/eftposPay/component/fail/failCustom.js +1 -0
- package/es/components/eftposPay/component/fail/index.js +1 -0
- package/es/components/eftposPay/component/manual/index.js +4 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/const.d.ts +27 -1
- package/es/components/eftposPay/const.js +22 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +2 -2
- package/es/components/eftposPay/helper.d.ts +6 -0
- package/es/components/eftposPay/helper.js +24 -4
- package/es/components/eftposPay/hooks.d.ts +2 -1
- package/es/components/eftposPay/hooks.js +22 -16
- package/es/components/eftposPay/index.d.ts +1 -1
- package/es/components/eftposPay/index.js +130 -179
- package/es/components/eftposPay/locales.d.ts +15 -0
- package/es/components/eftposPay/locales.js +15 -0
- package/es/components/eftposPay/payo/config.js +20 -8
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +10 -0
- package/es/components/eftposPay/tip.js +177 -0
- package/es/components/eftposPay/tip.less +9 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/tyro/index.js +55 -22
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.js +17 -6
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -27
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +35 -161
- package/lib/components/booking/forms/model.d.ts +1 -1
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +11 -87
- package/lib/components/booking/info/main.js +9 -17
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +84 -115
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
- package/lib/components/booking/info/service/addService/utils.js +10 -58
- package/lib/components/booking/info/service/editService/index.js +182 -425
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/service/serve.d.ts +0 -10
- package/lib/components/booking/info/service/serve.js +2 -7
- package/lib/components/booking/info/utils.d.ts +0 -20
- package/lib/components/booking/info/utils.js +0 -41
- package/lib/components/booking/locales.d.ts +0 -66
- package/lib/components/booking/locales.js +3 -69
- package/lib/components/booking/model.d.ts +1 -5
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +18 -89
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/app.d.ts +11 -0
- package/lib/components/eftposPay/app.js +166 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
- package/lib/components/eftposPay/component/fail/index.js +1 -1
- package/lib/components/eftposPay/component/manual/index.js +19 -5
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/const.d.ts +27 -1
- package/lib/components/eftposPay/const.js +18 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +2 -2
- package/lib/components/eftposPay/helper.d.ts +6 -0
- package/lib/components/eftposPay/helper.js +29 -4
- package/lib/components/eftposPay/hooks.d.ts +2 -1
- package/lib/components/eftposPay/hooks.js +8 -2
- package/lib/components/eftposPay/index.d.ts +1 -1
- package/lib/components/eftposPay/index.js +106 -144
- package/lib/components/eftposPay/locales.d.ts +15 -0
- package/lib/components/eftposPay/locales.js +15 -0
- package/lib/components/eftposPay/payo/config.js +33 -9
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +10 -0
- package/lib/components/eftposPay/tip.js +159 -0
- package/lib/components/eftposPay/tip.less +9 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/tyro/index.js +40 -9
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.js +29 -6
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +5 -5
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +0 -54
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
- package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceManager/index.js +0 -277
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/es/components/booking/info/service2/Group/utils.js +0 -146
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -152
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -6
- package/es/components/booking/info/service2/index.js +0 -57
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -237
- package/es/components/booking/info/service2/utils.js +0 -1064
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -68
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -69
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -59
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -116
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
- package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceManager/index.js +0 -207
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/lib/components/booking/info/service2/Group/utils.js +0 -142
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -115
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -6
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -237
- package/lib/components/booking/info/service2/utils.js +0 -678
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -75
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -86
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -67,6 +67,7 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
67
67
|
amount,
|
|
68
68
|
total: amount,
|
|
69
69
|
number,
|
|
70
|
+
uniquePaymentNumber: number,
|
|
70
71
|
device,
|
|
71
72
|
order_id
|
|
72
73
|
});
|
|
@@ -80,7 +81,7 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
setDisabled(true);
|
|
83
|
-
onChange("fail", { number, device, order_id });
|
|
84
|
+
onChange("fail", { number, uniquePaymentNumber: number, device, order_id });
|
|
84
85
|
};
|
|
85
86
|
const onSubmit = () => {
|
|
86
87
|
if (disabled) {
|
|
@@ -110,8 +111,13 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
110
111
|
surMoney: surMoneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
111
112
|
surcharge: surchargeDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
112
113
|
total: moneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
113
|
-
totalUnit: formatAmount(
|
|
114
|
+
totalUnit: formatAmount(
|
|
115
|
+
moneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
116
|
+
2,
|
|
117
|
+
symbol
|
|
118
|
+
),
|
|
114
119
|
number,
|
|
120
|
+
uniquePaymentNumber: number,
|
|
115
121
|
device,
|
|
116
122
|
order_id
|
|
117
123
|
});
|
|
@@ -120,9 +126,15 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
120
126
|
const onCancel = () => {
|
|
121
127
|
updateAmountStatus(false);
|
|
122
128
|
setMoney(pay == null ? void 0 : pay.total);
|
|
123
|
-
dispatch(
|
|
129
|
+
dispatch(
|
|
130
|
+
(0, import_store.updateState)({
|
|
131
|
+
manual: { ...manual, status: true, money: pay == null ? void 0 : pay.total }
|
|
132
|
+
})
|
|
133
|
+
);
|
|
124
134
|
};
|
|
125
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, isUpdateAmount ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-title" }, import_utils.locales.getText("page.eftpos-pay.text.manual.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-body" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.subtitle")(
|
|
135
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, isUpdateAmount ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-title" }, import_utils.locales.getText("page.eftpos-pay.text.manual.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-body" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.subtitle")(
|
|
136
|
+
formatAmount(pay == null ? void 0 : pay.total, 2, symbol)
|
|
137
|
+
), " ", /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.confirm"), /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.diff")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-act" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.tip")), /* @__PURE__ */ import_react.default.createElement(
|
|
126
138
|
import_antd.InputNumber,
|
|
127
139
|
{
|
|
128
140
|
type: "number",
|
|
@@ -161,7 +173,9 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
161
173
|
type: "primary",
|
|
162
174
|
onClick: onSubmit
|
|
163
175
|
},
|
|
164
|
-
import_utils.locales.getText("page.eftpos-pay.text.manual.btn.confirm")(
|
|
176
|
+
import_utils.locales.getText("page.eftpos-pay.text.manual.btn.confirm")(
|
|
177
|
+
formatAmount(money, 2, symbol)
|
|
178
|
+
)
|
|
165
179
|
))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-title" }, manual == null ? void 0 : manual.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-txt" }, manual == null ? void 0 : manual.text), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card-box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
166
180
|
"div",
|
|
167
181
|
{
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { StatusType } from '../../const';
|
|
3
3
|
declare const _default: (props: {
|
|
4
4
|
status: StatusType;
|
|
5
|
-
warn?: string;
|
|
6
|
-
text?: string;
|
|
7
|
-
tip?: string;
|
|
8
|
-
loading?: string;
|
|
9
|
-
success?: string;
|
|
10
|
-
fail?: string;
|
|
5
|
+
warn?: string | undefined;
|
|
6
|
+
text?: string | undefined;
|
|
7
|
+
tip?: string | undefined;
|
|
8
|
+
loading?: string | undefined;
|
|
9
|
+
success?: string | undefined;
|
|
10
|
+
fail?: string | undefined;
|
|
11
11
|
}) => React.JSX.Element;
|
|
12
12
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: (props: {
|
|
3
3
|
status: string;
|
|
4
|
-
pedding?: string;
|
|
5
|
-
resolve?: string;
|
|
6
|
-
reject?: string;
|
|
7
|
-
className?: string;
|
|
4
|
+
pedding?: string | undefined;
|
|
5
|
+
resolve?: string | undefined;
|
|
6
|
+
reject?: string | undefined;
|
|
7
|
+
className?: string | undefined;
|
|
8
8
|
}) => React.JSX.Element;
|
|
9
9
|
export default _default;
|
|
@@ -27,6 +27,32 @@ export declare enum ModeEnum {
|
|
|
27
27
|
/** 查询 */
|
|
28
28
|
Query = "query"
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* 崩溃恢复
|
|
32
|
+
*/
|
|
33
|
+
export declare enum RestoreEumn {
|
|
34
|
+
/** 常规 */
|
|
35
|
+
Normal = "normal",
|
|
36
|
+
/** 恢复 */
|
|
37
|
+
Restore = "restore"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 订单状态
|
|
41
|
+
*/
|
|
42
|
+
export declare enum OrderEumn {
|
|
43
|
+
/** 恢复 */
|
|
44
|
+
Restore = "restore",
|
|
45
|
+
/** 常规 */
|
|
46
|
+
Normal = "normal",
|
|
47
|
+
/** 成功 */
|
|
48
|
+
Succeed = "succeed",
|
|
49
|
+
/** 失败 */
|
|
50
|
+
Failed = "failed",
|
|
51
|
+
/** 等待 */
|
|
52
|
+
Pending = "pending",
|
|
53
|
+
/** 没有订单状态 */
|
|
54
|
+
Null = "null"
|
|
55
|
+
}
|
|
30
56
|
export declare enum ClientEnum {
|
|
31
57
|
/** 用户端 */
|
|
32
58
|
User = "user",
|
|
@@ -60,7 +86,7 @@ export interface PosProps {
|
|
|
60
86
|
[key: string]: unknown;
|
|
61
87
|
};
|
|
62
88
|
/** 回调 */
|
|
63
|
-
onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
|
|
89
|
+
onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page' | 'print' | 'mark_tx_processed', params?: {
|
|
64
90
|
[keys: string]: unknown;
|
|
65
91
|
} | string, other?: any) => void;
|
|
66
92
|
onChangeParams(...agrn: unknown[]): void;
|
|
@@ -22,8 +22,10 @@ __export(const_exports, {
|
|
|
22
22
|
ClientEnum: () => ClientEnum,
|
|
23
23
|
EftposEnum: () => EftposEnum,
|
|
24
24
|
ModeEnum: () => ModeEnum,
|
|
25
|
+
OrderEumn: () => OrderEumn,
|
|
25
26
|
PayRouteEnum: () => PayRouteEnum,
|
|
26
27
|
PayStatus: () => PayStatus,
|
|
28
|
+
RestoreEumn: () => RestoreEumn,
|
|
27
29
|
RouteEnum: () => RouteEnum,
|
|
28
30
|
StatusEnum: () => StatusEnum
|
|
29
31
|
});
|
|
@@ -53,6 +55,20 @@ var ModeEnum = /* @__PURE__ */ ((ModeEnum2) => {
|
|
|
53
55
|
ModeEnum2["Query"] = "query";
|
|
54
56
|
return ModeEnum2;
|
|
55
57
|
})(ModeEnum || {});
|
|
58
|
+
var RestoreEumn = /* @__PURE__ */ ((RestoreEumn2) => {
|
|
59
|
+
RestoreEumn2["Normal"] = "normal";
|
|
60
|
+
RestoreEumn2["Restore"] = "restore";
|
|
61
|
+
return RestoreEumn2;
|
|
62
|
+
})(RestoreEumn || {});
|
|
63
|
+
var OrderEumn = /* @__PURE__ */ ((OrderEumn2) => {
|
|
64
|
+
OrderEumn2["Restore"] = "restore";
|
|
65
|
+
OrderEumn2["Normal"] = "normal";
|
|
66
|
+
OrderEumn2["Succeed"] = "succeed";
|
|
67
|
+
OrderEumn2["Failed"] = "failed";
|
|
68
|
+
OrderEumn2["Pending"] = "pending";
|
|
69
|
+
OrderEumn2["Null"] = "null";
|
|
70
|
+
return OrderEumn2;
|
|
71
|
+
})(OrderEumn || {});
|
|
56
72
|
var ClientEnum = /* @__PURE__ */ ((ClientEnum2) => {
|
|
57
73
|
ClientEnum2["User"] = "user";
|
|
58
74
|
ClientEnum2["Merchant"] = "merchant";
|
|
@@ -89,8 +105,10 @@ var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
|
|
|
89
105
|
ClientEnum,
|
|
90
106
|
EftposEnum,
|
|
91
107
|
ModeEnum,
|
|
108
|
+
OrderEumn,
|
|
92
109
|
PayRouteEnum,
|
|
93
110
|
PayStatus,
|
|
111
|
+
RestoreEumn,
|
|
94
112
|
RouteEnum,
|
|
95
113
|
StatusEnum
|
|
96
114
|
});
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "page" | "success" | "fail", params?: string | {
|
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -167,11 +167,11 @@ var device_default = ({
|
|
|
167
167
|
role: "button",
|
|
168
168
|
tabIndex: index
|
|
169
169
|
},
|
|
170
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-name" }, name), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-money" }, pay.totalUnit), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-sucharge" }, import_utils.locales.getText(
|
|
170
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-name" }, name), mode === import_const.ModeEnum.Refund ? null : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-money" }, pay.totalUnit), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-sucharge" }, import_utils.locales.getText(
|
|
171
171
|
"page.eftpos-pay.text.surcharge.edit.inc.surcharge"
|
|
172
172
|
), ": ", formatAmount(`${pay.surcharge}`, 2, symbol), " (", import_utils.locales.getText(
|
|
173
173
|
"page.eftpos-pay.text.surcharge.edit.rate"
|
|
174
|
-
), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")")),
|
|
174
|
+
), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")"))),
|
|
175
175
|
/* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
176
176
|
import_ChevronRight.default,
|
|
177
177
|
{
|
|
@@ -28,16 +28,19 @@ export declare const getPayParams: (data: Partial<Omit<State, key>> & Pick<State
|
|
|
28
28
|
order_id: string | number;
|
|
29
29
|
amount?: undefined;
|
|
30
30
|
total?: undefined;
|
|
31
|
+
receipt?: undefined;
|
|
31
32
|
} | {
|
|
32
33
|
cardReaderSurcharge: {};
|
|
33
34
|
surMoney: string;
|
|
34
35
|
surcharge: string;
|
|
35
36
|
total: string;
|
|
36
37
|
number: string | number | undefined;
|
|
38
|
+
uniquePaymentNumber: string | number | undefined;
|
|
37
39
|
device: {
|
|
38
40
|
[key: string]: unknown;
|
|
39
41
|
} | undefined;
|
|
40
42
|
order_id: string | number;
|
|
43
|
+
receipt: {};
|
|
41
44
|
amount?: undefined;
|
|
42
45
|
} | {
|
|
43
46
|
amount: string | number;
|
|
@@ -47,12 +50,14 @@ export declare const getPayParams: (data: Partial<Omit<State, key>> & Pick<State
|
|
|
47
50
|
[key: string]: unknown;
|
|
48
51
|
} | undefined;
|
|
49
52
|
order_id: string | number;
|
|
53
|
+
receipt: {};
|
|
50
54
|
} | {
|
|
51
55
|
amount: string | number;
|
|
52
56
|
total: string | number;
|
|
53
57
|
number: string | number | undefined;
|
|
54
58
|
order_id: string | number;
|
|
55
59
|
device?: undefined;
|
|
60
|
+
receipt?: undefined;
|
|
56
61
|
};
|
|
57
62
|
export declare const limitDecimals: (value: any) => any;
|
|
58
63
|
/**
|
|
@@ -74,4 +79,5 @@ export declare function getPayAmonunt({ money, amount, surRate, surMoney }: Amou
|
|
|
74
79
|
surRateMoney: string;
|
|
75
80
|
totalUnit: string;
|
|
76
81
|
};
|
|
82
|
+
export declare function getBrowserVersion(): string;
|
|
77
83
|
export {};
|
|
@@ -21,6 +21,7 @@ var helper_exports = {};
|
|
|
21
21
|
__export(helper_exports, {
|
|
22
22
|
cloneDeep: () => cloneDeep,
|
|
23
23
|
getAmonunt: () => getAmonunt,
|
|
24
|
+
getBrowserVersion: () => getBrowserVersion,
|
|
24
25
|
getPayAmonunt: () => getPayAmonunt,
|
|
25
26
|
getPayParams: () => getPayParams,
|
|
26
27
|
getUuid: () => getUuid,
|
|
@@ -61,7 +62,7 @@ function cloneDeep(source, hash = /* @__PURE__ */ new WeakMap()) {
|
|
|
61
62
|
return target;
|
|
62
63
|
}
|
|
63
64
|
var getPayParams = (data, statue) => {
|
|
64
|
-
var _a;
|
|
65
|
+
var _a, _b, _c, _d, _e, _f;
|
|
65
66
|
if (statue === "fail") {
|
|
66
67
|
return {
|
|
67
68
|
number: data.number,
|
|
@@ -69,9 +70,10 @@ var getPayParams = (data, statue) => {
|
|
|
69
70
|
order_id: data.order_id
|
|
70
71
|
};
|
|
71
72
|
}
|
|
73
|
+
const receipt = ((_a = data == null ? void 0 : data.custom) == null ? void 0 : _a.receipt) || [];
|
|
72
74
|
if (data.mode === import_const.ModeEnum.Pay || data.mode === import_const.ModeEnum.FullPay) {
|
|
73
75
|
const pay = data.pay;
|
|
74
|
-
const card_reader_surcharge = ((
|
|
76
|
+
const card_reader_surcharge = ((_b = data.custom) == null ? void 0 : _b.card_reader_surcharge) || 0;
|
|
75
77
|
const obj = pay || {};
|
|
76
78
|
const cardReaderSurcharge = card_reader_surcharge;
|
|
77
79
|
const surCardDeci = new import_decimal.Decimal(Number(cardReaderSurcharge));
|
|
@@ -88,8 +90,10 @@ var getPayParams = (data, statue) => {
|
|
|
88
90
|
surcharge: surchargeDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
89
91
|
total: total.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
90
92
|
number: data.number,
|
|
93
|
+
uniquePaymentNumber: data.number,
|
|
91
94
|
device: data.device,
|
|
92
|
-
order_id: data.order_id
|
|
95
|
+
order_id: data.order_id,
|
|
96
|
+
receipt: ((_d = (_c = data.device) == null ? void 0 : _c.setting) == null ? void 0 : _d.receipts) ? [] : receipt
|
|
93
97
|
};
|
|
94
98
|
}
|
|
95
99
|
if (data.mode === import_const.ModeEnum.Refund) {
|
|
@@ -98,7 +102,8 @@ var getPayParams = (data, statue) => {
|
|
|
98
102
|
total: data.amount,
|
|
99
103
|
number: data.number,
|
|
100
104
|
device: data.device,
|
|
101
|
-
order_id: data.order_id
|
|
105
|
+
order_id: data.order_id,
|
|
106
|
+
receipt: ((_f = (_e = data.device) == null ? void 0 : _e.setting) == null ? void 0 : _f.receipts) ? [] : receipt
|
|
102
107
|
};
|
|
103
108
|
}
|
|
104
109
|
return {
|
|
@@ -185,10 +190,30 @@ function getPayAmonunt({ money, amount, surRate, surMoney }, formatAmount) {
|
|
|
185
190
|
totalUnit: formatAmount(total)
|
|
186
191
|
};
|
|
187
192
|
}
|
|
193
|
+
function getBrowserVersion() {
|
|
194
|
+
const Sys = {};
|
|
195
|
+
const ua = navigator.userAgent.toLowerCase();
|
|
196
|
+
let s;
|
|
197
|
+
(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? Sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? Sys.safari = s[1] : 0;
|
|
198
|
+
if (Sys.ie)
|
|
199
|
+
return "IE: " + Sys.ie;
|
|
200
|
+
if (Sys.edge)
|
|
201
|
+
return "EDGE: " + Sys.edge;
|
|
202
|
+
if (Sys.firefox)
|
|
203
|
+
return "Firefox: " + Sys.firefox;
|
|
204
|
+
if (Sys.chrome)
|
|
205
|
+
return "Chrome: " + Sys.chrome;
|
|
206
|
+
if (Sys.opera)
|
|
207
|
+
return "Opera: " + Sys.opera;
|
|
208
|
+
if (Sys.safari)
|
|
209
|
+
return "Safari: " + Sys.safari;
|
|
210
|
+
return "Unkonwn";
|
|
211
|
+
}
|
|
188
212
|
// Annotate the CommonJS export names for ESM import in node:
|
|
189
213
|
0 && (module.exports = {
|
|
190
214
|
cloneDeep,
|
|
191
215
|
getAmonunt,
|
|
216
|
+
getBrowserVersion,
|
|
192
217
|
getPayAmonunt,
|
|
193
218
|
getPayParams,
|
|
194
219
|
getUuid,
|
|
@@ -21,6 +21,7 @@ export declare const useStoreRef: <T extends {
|
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
22
|
readonly eftposRef: React.MutableRefObject<"windcave" | "tyro" | "payo" | "stripe">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
|
+
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
27
|
* @title: 通用失败处理
|
|
@@ -30,5 +31,5 @@ export declare const useStoreRef: <T extends {
|
|
|
30
31
|
* @Date: 2024-08-12 11:54
|
|
31
32
|
*/
|
|
32
33
|
export declare const useFail: (index: number) => (res: {
|
|
33
|
-
code?:
|
|
34
|
+
code?: "200" | "4004" | "701000" | "701001" | "701003" | "701004" | "701005" | "701006" | "701007" | "701008" | "701009" | "701010" | undefined;
|
|
34
35
|
}, isMark?: boolean) => void;
|
|
@@ -30,6 +30,7 @@ var import_store = require("./store");
|
|
|
30
30
|
var import_const2 = require("./const");
|
|
31
31
|
var Max4004 = 1;
|
|
32
32
|
var useStoreRef = () => {
|
|
33
|
+
const data = (0, import_store.useContextData)();
|
|
33
34
|
const {
|
|
34
35
|
order_id,
|
|
35
36
|
device,
|
|
@@ -42,7 +43,8 @@ var useStoreRef = () => {
|
|
|
42
43
|
amount,
|
|
43
44
|
eftpos,
|
|
44
45
|
client
|
|
45
|
-
} =
|
|
46
|
+
} = data;
|
|
47
|
+
const dataRef = (0, import_react.useRef)(data);
|
|
46
48
|
const deviceRef = (0, import_react.useRef)(device);
|
|
47
49
|
const payRef = (0, import_react.useRef)(pay);
|
|
48
50
|
const numRef = (0, import_react.useRef)(number);
|
|
@@ -54,6 +56,9 @@ var useStoreRef = () => {
|
|
|
54
56
|
const amountRef = (0, import_react.useRef)(amount);
|
|
55
57
|
const eftposRef = (0, import_react.useRef)(eftpos);
|
|
56
58
|
const clientRef = (0, import_react.useRef)(client);
|
|
59
|
+
(0, import_react.useEffect)(() => {
|
|
60
|
+
dataRef.current = data;
|
|
61
|
+
}, [data]);
|
|
57
62
|
(0, import_react.useEffect)(() => {
|
|
58
63
|
deviceRef.current = device;
|
|
59
64
|
}, [device]);
|
|
@@ -98,7 +103,8 @@ var useStoreRef = () => {
|
|
|
98
103
|
symbolRef,
|
|
99
104
|
amountRef,
|
|
100
105
|
eftposRef,
|
|
101
|
-
clientRef
|
|
106
|
+
clientRef,
|
|
107
|
+
dataRef
|
|
102
108
|
};
|
|
103
109
|
};
|
|
104
110
|
var useFail = (index) => {
|