@pisell/private-materials 6.9.4 → 6.9.6
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/components/footer/index.js +14 -13
- package/es/components/booking/components/footer/utils.js +3 -2
- package/es/components/booking/info2/service/editNormalService/index.js +3 -1
- package/es/components/checkout/PaymentModal.js +11 -7
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CupActionList/index.d.ts +0 -1
- package/es/components/ecocup/components/CupActionModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +0 -1
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CustomerCard/index.d.ts +0 -1
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
- package/es/components/ecocup/components/SearchBar/index.d.ts +0 -1
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.js +9 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +1 -1
- package/es/plus/orderList/components/BatchActionBar.js +46 -72
- package/es/plus/orderList/components/HandleActions.d.ts +1 -1
- package/es/plus/orderList/components/HandleActions.js +5 -2
- package/es/plus/orderList/components/QuickFilter.d.ts +0 -1
- package/es/plus/orderList/components/Reset.d.ts +0 -1
- package/es/plus/orderList/components/Toolbar.d.ts +1 -1
- package/es/plus/orderList/components/Toolbar.js +4 -2
- package/es/plus/orderList/config.d.ts +2 -0
- package/es/plus/orderList/config.js +1 -0
- package/es/plus/orderList/index.d.ts +1 -0
- package/es/plus/orderList/index.js +7 -2
- package/es/plus/orderList/serve.js +1 -1
- package/es/pro/Selector/demo.d.ts +0 -1
- package/es/pro/skuDetailModal/index.js +4 -0
- package/lib/components/booking/components/footer/index.js +1 -0
- package/lib/components/booking/components/footer/utils.js +2 -2
- package/lib/components/booking/info2/service/editNormalService/index.js +2 -1
- package/lib/components/checkout/PaymentModal.js +1 -7
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupActionList/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +0 -1
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
- package/lib/components/ecocup/components/SearchBar/index.d.ts +0 -1
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.js +9 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -1
- package/lib/plus/orderList/components/BatchActionBar.js +45 -62
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -1
- package/lib/plus/orderList/components/HandleActions.js +2 -2
- package/lib/plus/orderList/components/QuickFilter.d.ts +0 -1
- package/lib/plus/orderList/components/Reset.d.ts +0 -1
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -1
- package/lib/plus/orderList/components/Toolbar.js +2 -2
- package/lib/plus/orderList/config.d.ts +2 -0
- package/lib/plus/orderList/config.js +8 -5
- package/lib/plus/orderList/index.d.ts +1 -0
- package/lib/plus/orderList/index.js +3 -3
- package/lib/plus/orderList/serve.js +1 -1
- package/lib/pro/Selector/demo.d.ts +0 -1
- package/lib/pro/skuDetailModal/index.js +3 -0
- package/package.json +3 -3
|
@@ -1250,7 +1250,7 @@ var Footer = function Footer(props) {
|
|
|
1250
1250
|
case 33:
|
|
1251
1251
|
checkout = pisellos.getModule('checkout'); // 如果有 orderid,则应该走更新逻辑
|
|
1252
1252
|
if (!editOrderId) {
|
|
1253
|
-
_context9.next =
|
|
1253
|
+
_context9.next = 44;
|
|
1254
1254
|
break;
|
|
1255
1255
|
}
|
|
1256
1256
|
subtotal_info = {
|
|
@@ -1277,8 +1277,9 @@ var Footer = function Footer(props) {
|
|
|
1277
1277
|
state === null || state === void 0 || state.callback(res, type);
|
|
1278
1278
|
_setLoading(false);
|
|
1279
1279
|
}
|
|
1280
|
+
setEditOrderId(0);
|
|
1280
1281
|
return _context9.abrupt("return");
|
|
1281
|
-
case
|
|
1282
|
+
case 44:
|
|
1282
1283
|
// 如果是保存,检查是否需要支付定金
|
|
1283
1284
|
if (type === 'save') {
|
|
1284
1285
|
isNeedDeposit = checkout.checkIsNeedDepositAsync(values.bookings, values.relation_products);
|
|
@@ -1342,43 +1343,43 @@ var Footer = function Footer(props) {
|
|
|
1342
1343
|
|
|
1343
1344
|
// 如果有addons改动, 则先保存
|
|
1344
1345
|
if (!addonsEdit) {
|
|
1345
|
-
_context9.next =
|
|
1346
|
+
_context9.next = 50;
|
|
1346
1347
|
break;
|
|
1347
1348
|
}
|
|
1348
|
-
_context9.next =
|
|
1349
|
+
_context9.next = 50;
|
|
1349
1350
|
return handleSaveAddons();
|
|
1350
|
-
case
|
|
1351
|
+
case 50:
|
|
1351
1352
|
if (!infoEdit) {
|
|
1352
|
-
_context9.next =
|
|
1353
|
+
_context9.next = 55;
|
|
1353
1354
|
break;
|
|
1354
1355
|
}
|
|
1355
|
-
_context9.next =
|
|
1356
|
+
_context9.next = 53;
|
|
1356
1357
|
return api(values, state.bookingId || editOrderId);
|
|
1357
|
-
case
|
|
1358
|
+
case 53:
|
|
1358
1359
|
callbackData = _context9.sent;
|
|
1359
1360
|
if (messageShow) {
|
|
1360
1361
|
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
1361
1362
|
}
|
|
1362
|
-
case
|
|
1363
|
+
case 55:
|
|
1363
1364
|
// 回调关闭弹窗
|
|
1364
1365
|
state === null || state === void 0 || state.callback(callbackData, type);
|
|
1365
1366
|
_setLoading(false);
|
|
1366
1367
|
|
|
1367
1368
|
// return数据 checkout时需要
|
|
1368
1369
|
return _context9.abrupt("return", callbackData || values);
|
|
1369
|
-
case
|
|
1370
|
-
_context9.prev =
|
|
1370
|
+
case 60:
|
|
1371
|
+
_context9.prev = 60;
|
|
1371
1372
|
_context9.t1 = _context9["catch"](27);
|
|
1372
1373
|
console.log(_context9.t1);
|
|
1373
1374
|
if ((_context9.t1 === null || _context9.t1 === void 0 ? void 0 : _context9.t1.code) === 70101) {
|
|
1374
1375
|
message.error(_context9.t1 === null || _context9.t1 === void 0 ? void 0 : _context9.t1.message);
|
|
1375
1376
|
}
|
|
1376
1377
|
_setLoading(false);
|
|
1377
|
-
case
|
|
1378
|
+
case 65:
|
|
1378
1379
|
case "end":
|
|
1379
1380
|
return _context9.stop();
|
|
1380
1381
|
}
|
|
1381
|
-
}, _callee9, null, [[27,
|
|
1382
|
+
}, _callee9, null, [[27, 60]]);
|
|
1382
1383
|
}));
|
|
1383
1384
|
return function handleSave(_x6) {
|
|
1384
1385
|
return _ref10.apply(this, arguments);
|
|
@@ -107,6 +107,7 @@ export var formatProductBundle = function formatProductBundle(bundle, is_price_i
|
|
|
107
107
|
}
|
|
108
108
|
} catch (error) {}
|
|
109
109
|
return bundle.map(function (d) {
|
|
110
|
+
var _d$original_price;
|
|
110
111
|
var option = formatProductOption(d.option);
|
|
111
112
|
var option_price = option.reduce(function (temp, item) {
|
|
112
113
|
return temp + Number(item.num) * item.custom_add_price;
|
|
@@ -128,7 +129,7 @@ export var formatProductBundle = function formatProductBundle(bundle, is_price_i
|
|
|
128
129
|
"price": Number(d === null || d === void 0 ? void 0 : d.product_price),
|
|
129
130
|
"price_type": d === null || d === void 0 ? void 0 : d.price_type,
|
|
130
131
|
"price_type_ext": d === null || d === void 0 ? void 0 : d.price_type_ext,
|
|
131
|
-
"custom_price": (d === null || d === void 0 ? void 0 : d.custom_price) || Math.abs(new Decimal((d === null || d === void 0 ? void 0 : d.original_price)
|
|
132
|
+
"custom_price": (d === null || d === void 0 ? void 0 : d.custom_price) || Math.abs(new Decimal((_d$original_price = d === null || d === void 0 ? void 0 : d.original_price) !== null && _d$original_price !== void 0 ? _d$original_price : d === null || d === void 0 ? void 0 : d.product_price).sub(option_price).toNumber()).toFixed(2),
|
|
132
133
|
"custom_price_type": d === null || d === void 0 ? void 0 : d.price_type,
|
|
133
134
|
"option": option,
|
|
134
135
|
"bundle_selling_price": Math.abs(d === null || d === void 0 ? void 0 : d.price),
|
|
@@ -295,7 +296,7 @@ export var formatProductPrice = function formatProductPrice(item) {
|
|
|
295
296
|
var _item$_extend6, _item$price, _item$_extend7, _item$_extend8, _item$_extend9, _item$variant;
|
|
296
297
|
var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
|
|
297
298
|
var price = Number((_item$price = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price !== void 0 ? _item$price : item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
|
|
298
|
-
if (isString((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.priceOverride)
|
|
299
|
+
if (isString((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.priceOverride) || isNumber((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.priceOverride)) {
|
|
299
300
|
var _item$_extend10;
|
|
300
301
|
price = Number(item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.price);
|
|
301
302
|
}
|
|
@@ -94,7 +94,9 @@ var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
94
94
|
newTotal: (_data7 = data) === null || _data7 === void 0 || (_data7 = _data7._extend) === null || _data7 === void 0 ? void 0 : _data7.total,
|
|
95
95
|
origin_total: (_data$_extend = data._extend) === null || _data$_extend === void 0 ? void 0 : _data$_extend.origin_total
|
|
96
96
|
});
|
|
97
|
-
var e = _objectSpread({}, detail._extend.other)
|
|
97
|
+
var e = _objectSpread(_objectSpread({}, detail._extend.other), {}, {
|
|
98
|
+
quantity: quantity
|
|
99
|
+
});
|
|
98
100
|
e = formatDataKey(e);
|
|
99
101
|
payload.callback(e, undefined, detail, false);
|
|
100
102
|
return;
|
|
@@ -2081,13 +2081,17 @@ var PaymentModal = function PaymentModal(_ref19) {
|
|
|
2081
2081
|
status: 'cancelled'
|
|
2082
2082
|
});
|
|
2083
2083
|
var checkout = pisellos.getModule('checkout');
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2084
|
+
|
|
2085
|
+
// if (!notCancelOrder) {
|
|
2086
|
+
// checkout.cancelCurrentOrderAsync();
|
|
2087
|
+
// } else {
|
|
2088
|
+
// onClose?.(false)
|
|
2089
|
+
// onSetLocalOrderId?.(checkout.getCurrentOrderId())
|
|
2090
|
+
// return
|
|
2091
|
+
// }
|
|
2092
|
+
// 暂时先使用取消订单的逻辑(本地数据库标记)
|
|
2093
|
+
// 确认是否有地方重复调用 checkout
|
|
2094
|
+
checkout.cancelCurrentOrderAsync();
|
|
2091
2095
|
// 不关闭PaymentResultToast,让它独立存在
|
|
2092
2096
|
onClose === null || onClose === void 0 || onClose(reset || false);
|
|
2093
2097
|
};
|
|
@@ -174,16 +174,16 @@ export default (function (_ref) {
|
|
|
174
174
|
if (isPay) {
|
|
175
175
|
var _deviceRef$current2;
|
|
176
176
|
_params = _objectSpread(_objectSpread({}, custom !== null && custom !== void 0 && custom.platform ? {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"service_charge": {
|
|
182
|
-
"amount": payRef.current.surMoney,
|
|
183
|
-
"percentage": payRef.current.surPercentRate
|
|
184
|
-
},
|
|
185
|
-
"original_amount": payRef.current.amount
|
|
177
|
+
operator_id: custom.operator_id,
|
|
178
|
+
operator_type: custom.operator_type,
|
|
179
|
+
platform: custom.platform,
|
|
180
|
+
custom_payment_id: custom.custom_payment_id
|
|
186
181
|
} : {}), {}, {
|
|
182
|
+
service_charge: {
|
|
183
|
+
amount: payRef.current.surMoney,
|
|
184
|
+
percentage: payRef.current.surPercentRate
|
|
185
|
+
},
|
|
186
|
+
original_amount: payRef.current.amount,
|
|
187
187
|
order_id: orderIdRef.current,
|
|
188
188
|
amount: payRef.current.total,
|
|
189
189
|
card_reader_type: eftposRef.current,
|
|
@@ -1408,7 +1408,7 @@ var TicketBooking = function TicketBooking(props) {
|
|
|
1408
1408
|
holder: 1,
|
|
1409
1409
|
note: 1
|
|
1410
1410
|
}
|
|
1411
|
-
})), /*#__PURE__*/React.createElement(PisellFloatingPanel, {
|
|
1411
|
+
})), isShowFloatButtons && /*#__PURE__*/React.createElement(PisellFloatingPanel, {
|
|
1412
1412
|
bookingId: activeBookingId,
|
|
1413
1413
|
ref: pisellFloatingPanelRef,
|
|
1414
1414
|
currentDate: currentDate,
|
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import React, { useState, useCallback, useMemo } from 'react';
|
|
17
17
|
import { Checkbox, Button } from 'antd';
|
|
18
18
|
import { PisellBatchActionBar, PisellQuickFilter, PisellDataSourceContainer, PisellModal } from '@pisell/materials';
|
|
19
|
-
import { editordership, postSendInvoice, printPack, printPicking, batchAddOrderTags, batchDeleteOrderTags, batchPutOrderStatus
|
|
19
|
+
import { editordership, postSendInvoice, printPack, printPicking, batchAddOrderTags, batchDeleteOrderTags, batchPutOrderStatus } from "../serve";
|
|
20
20
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
21
21
|
import { getTagSelectOptions } from "../serve";
|
|
22
22
|
var useContainerContext = PisellDataSourceContainer.useContainerContext;
|
|
@@ -715,69 +715,39 @@ var OrderBatchActionBar = function OrderBatchActionBar(props) {
|
|
|
715
715
|
/**
|
|
716
716
|
* 作废订单(voided)
|
|
717
717
|
*/
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
case 10:
|
|
752
|
-
_context15.prev = 10;
|
|
753
|
-
setLoadingStates(function (prev) {
|
|
754
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
755
|
-
markAsVoid: false
|
|
756
|
-
});
|
|
757
|
-
});
|
|
758
|
-
return _context15.finish(10);
|
|
759
|
-
case 13:
|
|
760
|
-
case "end":
|
|
761
|
-
return _context15.stop();
|
|
762
|
-
}
|
|
763
|
-
}, _callee15, null, [[0, 7, 10, 13]]);
|
|
764
|
-
}));
|
|
765
|
-
function onOk() {
|
|
766
|
-
return _onOk7.apply(this, arguments);
|
|
767
|
-
}
|
|
768
|
-
return onOk;
|
|
769
|
-
}()
|
|
770
|
-
});
|
|
771
|
-
case 1:
|
|
772
|
-
case "end":
|
|
773
|
-
return _context16.stop();
|
|
774
|
-
}
|
|
775
|
-
}, _callee16);
|
|
776
|
-
}));
|
|
777
|
-
return function (_x16, _x17) {
|
|
778
|
-
return _ref9.apply(this, arguments);
|
|
779
|
-
};
|
|
780
|
-
}(), [handleSuccess, handleError, locales]);
|
|
718
|
+
// const handleMarkAsVoid = useCallback(
|
|
719
|
+
// async (keys: React.Key[], rows?: any[]) => {
|
|
720
|
+
// PisellModal.confirm({
|
|
721
|
+
// title: locales.getText('pisell2.orderList.batchAction.void.title'),
|
|
722
|
+
// cancelText: locales.getText(
|
|
723
|
+
// 'pisell2.orderList.batchAction.button.cancel'
|
|
724
|
+
// ),
|
|
725
|
+
// okText: locales.getText('pisell2.orderList.batchAction.button.ok'),
|
|
726
|
+
// content: locales.getText('page.order.lists.cancel.content')(
|
|
727
|
+
// 0,
|
|
728
|
+
// 0,
|
|
729
|
+
// 0,
|
|
730
|
+
// '',
|
|
731
|
+
// false,
|
|
732
|
+
// 'void'
|
|
733
|
+
// ),
|
|
734
|
+
// onOk: async () => {
|
|
735
|
+
// try {
|
|
736
|
+
// setLoadingStates((prev) => ({ ...prev, markAsVoid: true }));
|
|
737
|
+
// await batchVoidedOrder({
|
|
738
|
+
// order_ids: keys as number[],
|
|
739
|
+
// });
|
|
740
|
+
// handleSuccess();
|
|
741
|
+
// } catch (error: any) {
|
|
742
|
+
// handleError();
|
|
743
|
+
// } finally {
|
|
744
|
+
// setLoadingStates((prev) => ({ ...prev, markAsVoid: false }));
|
|
745
|
+
// }
|
|
746
|
+
// },
|
|
747
|
+
// });
|
|
748
|
+
// },
|
|
749
|
+
// [handleSuccess, handleError, locales]
|
|
750
|
+
// );
|
|
781
751
|
|
|
782
752
|
/**
|
|
783
753
|
* 批量操作按钮配置
|
|
@@ -835,14 +805,18 @@ var OrderBatchActionBar = function OrderBatchActionBar(props) {
|
|
|
835
805
|
icon: 'pisell2-slash-circle-01',
|
|
836
806
|
loading: loadingStates.markAsCancelled,
|
|
837
807
|
onClick: handleMarkAsCancelled
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
808
|
+
}
|
|
809
|
+
// {
|
|
810
|
+
// key: 'mark-as-void',
|
|
811
|
+
// label: locales.getText('page.order.void'),
|
|
812
|
+
// icon: 'pisell2-alert-circle',
|
|
813
|
+
// loading: loadingStates.markAsVoid,
|
|
814
|
+
// onClick: handleMarkAsVoid,
|
|
815
|
+
// },
|
|
816
|
+
];
|
|
817
|
+
}, [loadingStates.ship, loadingStates.invoice, loadingStates.addTags, loadingStates.removeTags, loadingStates.markAsOpen, loadingStates.markAsCompleted, loadingStates.markAsCancelled, loadingStates.markAsVoid, handleShip, handleInvoice, handlePrintPack, handlePrintPicking, handleAddTags, handleRemoveTags, handleMarkAsOpen, handleMarkAsCompleted, handleMarkAsCancelled,
|
|
818
|
+
// handleMarkAsVoid,
|
|
819
|
+
locales]);
|
|
846
820
|
if (selectedKeys.length === 0) {
|
|
847
821
|
return null;
|
|
848
822
|
}
|
|
@@ -3,7 +3,8 @@ import { PisellDataSourceContainer, PisellSort, PisellFilter } from '@pisell/mat
|
|
|
3
3
|
import { getFilterButtonList, getSortList } from "../config";
|
|
4
4
|
var ColumnsSetting = PisellDataSourceContainer.ColumnsSetting;
|
|
5
5
|
var HandleActions = function HandleActions(props) {
|
|
6
|
-
var locales = props.locales
|
|
6
|
+
var locales = props.locales,
|
|
7
|
+
__id = props.__id;
|
|
7
8
|
var filterButtonListValue = useMemo(function () {
|
|
8
9
|
return {
|
|
9
10
|
otherFilter: getFilterButtonList(locales)
|
|
@@ -12,7 +13,9 @@ var HandleActions = function HandleActions(props) {
|
|
|
12
13
|
var sortList = useMemo(function () {
|
|
13
14
|
return getSortList(locales);
|
|
14
15
|
}, [locales]);
|
|
15
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColumnsSetting,
|
|
16
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColumnsSetting, {
|
|
17
|
+
__id: __id
|
|
18
|
+
}), /*#__PURE__*/React.createElement(PisellSort, {
|
|
16
19
|
hasForm: false,
|
|
17
20
|
list: sortList
|
|
18
21
|
}), /*#__PURE__*/React.createElement(PisellFilter, {
|
|
@@ -20,7 +20,8 @@ import dayjs from 'dayjs';
|
|
|
20
20
|
var useContainerContext = PisellDataSourceContainer.useContainerContext;
|
|
21
21
|
var Toolbar = function Toolbar(props) {
|
|
22
22
|
var locales = props.locales,
|
|
23
|
-
clearSelectedData = props.clearSelectedData
|
|
23
|
+
clearSelectedData = props.clearSelectedData,
|
|
24
|
+
__id = props.__id;
|
|
24
25
|
var _useContainerContext = useContainerContext(),
|
|
25
26
|
serverActions = _useContainerContext.serverActions,
|
|
26
27
|
refManager = _useContainerContext.refManager,
|
|
@@ -50,7 +51,8 @@ var Toolbar = function Toolbar(props) {
|
|
|
50
51
|
locales: locales
|
|
51
52
|
}),
|
|
52
53
|
bottomRight: /*#__PURE__*/React.createElement(HandleActions, {
|
|
53
|
-
locales: locales
|
|
54
|
+
locales: locales,
|
|
55
|
+
__id: __id
|
|
54
56
|
})
|
|
55
57
|
}));
|
|
56
58
|
};
|
|
@@ -46,6 +46,7 @@ export declare const getQuickFilterList: (locales: any) => ({
|
|
|
46
46
|
label: any;
|
|
47
47
|
other: {
|
|
48
48
|
placeholder: any;
|
|
49
|
+
allowClear?: undefined;
|
|
49
50
|
trigger?: undefined;
|
|
50
51
|
style?: undefined;
|
|
51
52
|
};
|
|
@@ -54,6 +55,7 @@ export declare const getQuickFilterList: (locales: any) => ({
|
|
|
54
55
|
type: string;
|
|
55
56
|
key: string;
|
|
56
57
|
other: {
|
|
58
|
+
allowClear: boolean;
|
|
57
59
|
placeholder: any;
|
|
58
60
|
trigger: string[];
|
|
59
61
|
style: {
|
|
@@ -479,6 +479,7 @@ export var getQuickFilterList = function getQuickFilterList(locales) {
|
|
|
479
479
|
type: 'search',
|
|
480
480
|
key: 'keyword',
|
|
481
481
|
other: {
|
|
482
|
+
allowClear: true,
|
|
482
483
|
placeholder: locales.getText('pisell2.orderList.quickFilter.keyword.placeholder'),
|
|
483
484
|
trigger: ['onChange'],
|
|
484
485
|
style: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -25,7 +26,8 @@ var OrderList = function OrderList(props) {
|
|
|
25
26
|
var _context$engine, _context$appHelper, _window, _utils$getApp;
|
|
26
27
|
var biz = props.biz,
|
|
27
28
|
style = props.style,
|
|
28
|
-
className = props.className
|
|
29
|
+
className = props.className,
|
|
30
|
+
__id = props.__id;
|
|
29
31
|
var context = useEngineContext();
|
|
30
32
|
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en'); // 默认改为英文
|
|
31
33
|
|
|
@@ -122,7 +124,10 @@ var OrderList = function OrderList(props) {
|
|
|
122
124
|
title: locales.getText('pisell2.orderList.title')
|
|
123
125
|
}), /*#__PURE__*/React.createElement(Toolbar, {
|
|
124
126
|
clearSelectedData: clearSelectedData,
|
|
127
|
+
__id: __id,
|
|
125
128
|
locales: locales
|
|
126
|
-
}), /*#__PURE__*/React.createElement(PisellGridView, null, /*#__PURE__*/React.createElement(PisellDataSourceContainer.Table,
|
|
129
|
+
}), /*#__PURE__*/React.createElement(PisellGridView, null, /*#__PURE__*/React.createElement(PisellDataSourceContainer.Table, _extends({}, tableConfig, {
|
|
130
|
+
__id: __id
|
|
131
|
+
}))), /*#__PURE__*/React.createElement(OrderBatchActionBar, batchActionBarConfig), /*#__PURE__*/React.createElement(PisellGridPro.Footer, null, /*#__PURE__*/React.createElement(PisellDataSourceContainer.Pagination, null)))));
|
|
127
132
|
};
|
|
128
133
|
export default OrderList;
|
|
@@ -298,7 +298,7 @@ export var openUrl = function openUrl(host, url, shopId, ids) {
|
|
|
298
298
|
var previewPrefix = '/shop';
|
|
299
299
|
|
|
300
300
|
// 过滤 /shop 避免重复添加
|
|
301
|
-
var prefix = _host.
|
|
301
|
+
var prefix = _host.indexOf(previewPrefix) !== -1 ? '' : previewPrefix;
|
|
302
302
|
window.open("".concat(_host).concat(prefix).concat(url, "?shop_id=").concat(shopId).concat(str));
|
|
303
303
|
} catch (err) {}
|
|
304
304
|
};
|
|
@@ -482,6 +482,10 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
|
482
482
|
return false;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
+
// 如果有 variant,则不检测商品本身的库存了
|
|
486
|
+
if (value !== null && value !== void 0 && value.product_variant_id) {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
485
489
|
// 检测商品本身库存
|
|
486
490
|
var productCanSell = checkSkuStockCanSell(data);
|
|
487
491
|
if (!productCanSell.hasStock) {
|
|
@@ -131,7 +131,7 @@ var formatProductBundle = (bundle, is_price_include_tax) => {
|
|
|
131
131
|
"price": Number(d == null ? void 0 : d.product_price),
|
|
132
132
|
"price_type": d == null ? void 0 : d.price_type,
|
|
133
133
|
"price_type_ext": d == null ? void 0 : d.price_type_ext,
|
|
134
|
-
"custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price)
|
|
134
|
+
"custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) ?? (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
|
|
135
135
|
"custom_price_type": d == null ? void 0 : d.price_type,
|
|
136
136
|
"option": option,
|
|
137
137
|
"bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
|
|
@@ -261,7 +261,7 @@ var formatProductPrice = (item) => {
|
|
|
261
261
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
262
262
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
263
263
|
let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
|
|
264
|
-
if ((0, import_utils5.isString)((_c = item._extend) == null ? void 0 : _c.priceOverride)
|
|
264
|
+
if ((0, import_utils5.isString)((_c = item._extend) == null ? void 0 : _c.priceOverride) || (0, import_utils5.isNumber)((_d = item._extend) == null ? void 0 : _d.priceOverride)) {
|
|
265
265
|
price = Number((_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.price);
|
|
266
266
|
}
|
|
267
267
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_f = item == null ? void 0 : item.variant) == null ? void 0 : _f.length) > 0) {
|
|
@@ -110,7 +110,8 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
|
|
|
110
110
|
origin_total: (_g = data._extend) == null ? void 0 : _g.origin_total
|
|
111
111
|
});
|
|
112
112
|
let e = {
|
|
113
|
-
...detail._extend.other
|
|
113
|
+
...detail._extend.other,
|
|
114
|
+
quantity
|
|
114
115
|
};
|
|
115
116
|
e = (0, import_utils2.formatDataKey)(e);
|
|
116
117
|
payload.callback(e, void 0, detail, false);
|
|
@@ -1479,13 +1479,7 @@ var PaymentModal = ({
|
|
|
1479
1479
|
console.log("Payment cancelled");
|
|
1480
1480
|
callback == null ? void 0 : callback({ status: "cancelled" });
|
|
1481
1481
|
const checkout = pisellos.getModule("checkout");
|
|
1482
|
-
|
|
1483
|
-
checkout.cancelCurrentOrderAsync();
|
|
1484
|
-
} else {
|
|
1485
|
-
onClose == null ? void 0 : onClose(false);
|
|
1486
|
-
onSetLocalOrderId == null ? void 0 : onSetLocalOrderId(checkout.getCurrentOrderId());
|
|
1487
|
-
return;
|
|
1488
|
-
}
|
|
1482
|
+
checkout.cancelCurrentOrderAsync();
|
|
1489
1483
|
onClose == null ? void 0 : onClose(reset || false);
|
|
1490
1484
|
};
|
|
1491
1485
|
const handleSetEditCartMode = async (closeModal = false) => {
|