@kmkf-fe-packages/basic-components 0.10.3 → 0.11.0-alpha.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/dist/index.esm.js +91 -15
- package/dist/index.js +91 -14
- package/dist/src/bs/SystemOrder/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/wln/Goods/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -11164,26 +11164,43 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11164
11164
|
})));
|
|
11165
11165
|
};
|
|
11166
11166
|
|
|
11167
|
-
var
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
}
|
|
11167
|
+
var columnsNameMap = {
|
|
11168
|
+
BS_SYSTEM_ORDER: {
|
|
11169
|
+
typeName: '单据类型',
|
|
11170
|
+
tagName: '标签'
|
|
11171
|
+
},
|
|
11172
|
+
WLN_SYSTEM_ORDER: {
|
|
11173
|
+
typeName: '订单类型',
|
|
11174
|
+
tagName: '标记'
|
|
11175
|
+
}
|
|
11176
|
+
};
|
|
11177
11177
|
var index = (function (props) {
|
|
11178
11178
|
var value = props.value,
|
|
11179
11179
|
_onChange = props.onChange,
|
|
11180
|
-
disabled = props.disabled
|
|
11180
|
+
disabled = props.disabled,
|
|
11181
|
+
type = props.type;
|
|
11181
11182
|
useEffect(function () {
|
|
11182
11183
|
var _value$orders, _value$showOrderInfo;
|
|
11183
11184
|
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
11184
|
-
|
|
11185
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11186
|
+
getOrderList(value.orderNo);
|
|
11187
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11188
|
+
getWlnOrderList(value.orderNo);
|
|
11189
|
+
}
|
|
11185
11190
|
}
|
|
11186
|
-
}, [value]);
|
|
11191
|
+
}, [value, type]);
|
|
11192
|
+
var columns = useMemo(function () {
|
|
11193
|
+
return [{
|
|
11194
|
+
dataIndex: 'billType',
|
|
11195
|
+
title: columnsNameMap[type].typeName
|
|
11196
|
+
}, {
|
|
11197
|
+
dataIndex: 'billNo',
|
|
11198
|
+
title: '系统订单号'
|
|
11199
|
+
}, {
|
|
11200
|
+
dataIndex: 'billTag',
|
|
11201
|
+
title: columnsNameMap[type].tagName
|
|
11202
|
+
}];
|
|
11203
|
+
}, [type]);
|
|
11187
11204
|
var getOrderList = /*#__PURE__*/function () {
|
|
11188
11205
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11189
11206
|
var _yield$request, success, data;
|
|
@@ -11223,6 +11240,51 @@ var index = (function (props) {
|
|
|
11223
11240
|
return _ref.apply(this, arguments);
|
|
11224
11241
|
};
|
|
11225
11242
|
}();
|
|
11243
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11244
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11245
|
+
var _yield$request2, success, data;
|
|
11246
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11247
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11248
|
+
case 0:
|
|
11249
|
+
_context2.next = 2;
|
|
11250
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11251
|
+
method: 'post',
|
|
11252
|
+
data: {
|
|
11253
|
+
billCode: orderNo
|
|
11254
|
+
}
|
|
11255
|
+
});
|
|
11256
|
+
case 2:
|
|
11257
|
+
_yield$request2 = _context2.sent;
|
|
11258
|
+
success = _yield$request2.success;
|
|
11259
|
+
data = _yield$request2.data;
|
|
11260
|
+
if (success) {
|
|
11261
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11262
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11263
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11264
|
+
billNo: item.tradeNo,
|
|
11265
|
+
billType: item.tradeType,
|
|
11266
|
+
billTag: item.mark
|
|
11267
|
+
});
|
|
11268
|
+
}),
|
|
11269
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11270
|
+
return {
|
|
11271
|
+
billNo: item.tradeNo,
|
|
11272
|
+
billType: item.tradeType,
|
|
11273
|
+
billTag: item.mark
|
|
11274
|
+
};
|
|
11275
|
+
})
|
|
11276
|
+
}));
|
|
11277
|
+
}
|
|
11278
|
+
case 6:
|
|
11279
|
+
case "end":
|
|
11280
|
+
return _context2.stop();
|
|
11281
|
+
}
|
|
11282
|
+
}, _callee2);
|
|
11283
|
+
}));
|
|
11284
|
+
return function getWlnOrderList(_x2) {
|
|
11285
|
+
return _ref2.apply(this, arguments);
|
|
11286
|
+
};
|
|
11287
|
+
}();
|
|
11226
11288
|
var rowSelection = {
|
|
11227
11289
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11228
11290
|
fixed: true,
|
|
@@ -11241,7 +11303,7 @@ var index = (function (props) {
|
|
|
11241
11303
|
};
|
|
11242
11304
|
return /*#__PURE__*/React.createElement(Table, {
|
|
11243
11305
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11244
|
-
columns: columns
|
|
11306
|
+
columns: columns,
|
|
11245
11307
|
rowSelection: rowSelection,
|
|
11246
11308
|
rowKey: 'billNo',
|
|
11247
11309
|
size: "small",
|
|
@@ -11255,6 +11317,20 @@ var index = (function (props) {
|
|
|
11255
11317
|
});
|
|
11256
11318
|
});
|
|
11257
11319
|
|
|
11320
|
+
var WlnGoods = function WlnGoods(props) {
|
|
11321
|
+
var value = props.value,
|
|
11322
|
+
disabled = props.disabled,
|
|
11323
|
+
onChange = props.onChange;
|
|
11324
|
+
return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11325
|
+
key: 'wlnGoods'
|
|
11326
|
+
}, props), {}, {
|
|
11327
|
+
disabled: disabled,
|
|
11328
|
+
value: value,
|
|
11329
|
+
showChangeBtn: false,
|
|
11330
|
+
onChange: onChange
|
|
11331
|
+
}));
|
|
11332
|
+
};
|
|
11333
|
+
|
|
11258
11334
|
var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
11259
11335
|
styleInject(css_248z$9);
|
|
11260
11336
|
|
|
@@ -11925,4 +12001,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
11925
12001
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
11926
12002
|
};
|
|
11927
12003
|
|
|
11928
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
|
|
12004
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|
package/dist/index.js
CHANGED
|
@@ -11175,26 +11175,43 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11175
11175
|
})));
|
|
11176
11176
|
};
|
|
11177
11177
|
|
|
11178
|
-
var
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
}
|
|
11178
|
+
var columnsNameMap = {
|
|
11179
|
+
BS_SYSTEM_ORDER: {
|
|
11180
|
+
typeName: '单据类型',
|
|
11181
|
+
tagName: '标签'
|
|
11182
|
+
},
|
|
11183
|
+
WLN_SYSTEM_ORDER: {
|
|
11184
|
+
typeName: '订单类型',
|
|
11185
|
+
tagName: '标记'
|
|
11186
|
+
}
|
|
11187
|
+
};
|
|
11188
11188
|
var index = (function (props) {
|
|
11189
11189
|
var value = props.value,
|
|
11190
11190
|
_onChange = props.onChange,
|
|
11191
|
-
disabled = props.disabled
|
|
11191
|
+
disabled = props.disabled,
|
|
11192
|
+
type = props.type;
|
|
11192
11193
|
React.useEffect(function () {
|
|
11193
11194
|
var _value$orders, _value$showOrderInfo;
|
|
11194
11195
|
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
11195
|
-
|
|
11196
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11197
|
+
getOrderList(value.orderNo);
|
|
11198
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11199
|
+
getWlnOrderList(value.orderNo);
|
|
11200
|
+
}
|
|
11196
11201
|
}
|
|
11197
|
-
}, [value]);
|
|
11202
|
+
}, [value, type]);
|
|
11203
|
+
var columns = React.useMemo(function () {
|
|
11204
|
+
return [{
|
|
11205
|
+
dataIndex: 'billType',
|
|
11206
|
+
title: columnsNameMap[type].typeName
|
|
11207
|
+
}, {
|
|
11208
|
+
dataIndex: 'billNo',
|
|
11209
|
+
title: '系统订单号'
|
|
11210
|
+
}, {
|
|
11211
|
+
dataIndex: 'billTag',
|
|
11212
|
+
title: columnsNameMap[type].tagName
|
|
11213
|
+
}];
|
|
11214
|
+
}, [type]);
|
|
11198
11215
|
var getOrderList = /*#__PURE__*/function () {
|
|
11199
11216
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11200
11217
|
var _yield$request, success, data;
|
|
@@ -11234,6 +11251,51 @@ var index = (function (props) {
|
|
|
11234
11251
|
return _ref.apply(this, arguments);
|
|
11235
11252
|
};
|
|
11236
11253
|
}();
|
|
11254
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11255
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11256
|
+
var _yield$request2, success, data;
|
|
11257
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11258
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11259
|
+
case 0:
|
|
11260
|
+
_context2.next = 2;
|
|
11261
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11262
|
+
method: 'post',
|
|
11263
|
+
data: {
|
|
11264
|
+
billCode: orderNo
|
|
11265
|
+
}
|
|
11266
|
+
});
|
|
11267
|
+
case 2:
|
|
11268
|
+
_yield$request2 = _context2.sent;
|
|
11269
|
+
success = _yield$request2.success;
|
|
11270
|
+
data = _yield$request2.data;
|
|
11271
|
+
if (success) {
|
|
11272
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11273
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11274
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11275
|
+
billNo: item.tradeNo,
|
|
11276
|
+
billType: item.tradeType,
|
|
11277
|
+
billTag: item.mark
|
|
11278
|
+
});
|
|
11279
|
+
}),
|
|
11280
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11281
|
+
return {
|
|
11282
|
+
billNo: item.tradeNo,
|
|
11283
|
+
billType: item.tradeType,
|
|
11284
|
+
billTag: item.mark
|
|
11285
|
+
};
|
|
11286
|
+
})
|
|
11287
|
+
}));
|
|
11288
|
+
}
|
|
11289
|
+
case 6:
|
|
11290
|
+
case "end":
|
|
11291
|
+
return _context2.stop();
|
|
11292
|
+
}
|
|
11293
|
+
}, _callee2);
|
|
11294
|
+
}));
|
|
11295
|
+
return function getWlnOrderList(_x2) {
|
|
11296
|
+
return _ref2.apply(this, arguments);
|
|
11297
|
+
};
|
|
11298
|
+
}();
|
|
11237
11299
|
var rowSelection = {
|
|
11238
11300
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11239
11301
|
fixed: true,
|
|
@@ -11252,7 +11314,7 @@ var index = (function (props) {
|
|
|
11252
11314
|
};
|
|
11253
11315
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11254
11316
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11255
|
-
columns: columns
|
|
11317
|
+
columns: columns,
|
|
11256
11318
|
rowSelection: rowSelection,
|
|
11257
11319
|
rowKey: 'billNo',
|
|
11258
11320
|
size: "small",
|
|
@@ -11266,6 +11328,20 @@ var index = (function (props) {
|
|
|
11266
11328
|
});
|
|
11267
11329
|
});
|
|
11268
11330
|
|
|
11331
|
+
var WlnGoods = function WlnGoods(props) {
|
|
11332
|
+
var value = props.value,
|
|
11333
|
+
disabled = props.disabled,
|
|
11334
|
+
onChange = props.onChange;
|
|
11335
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11336
|
+
key: 'wlnGoods'
|
|
11337
|
+
}, props), {}, {
|
|
11338
|
+
disabled: disabled,
|
|
11339
|
+
value: value,
|
|
11340
|
+
showChangeBtn: false,
|
|
11341
|
+
onChange: onChange
|
|
11342
|
+
}));
|
|
11343
|
+
};
|
|
11344
|
+
|
|
11269
11345
|
var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
11270
11346
|
styleInject(css_248z$9);
|
|
11271
11347
|
|
|
@@ -11986,3 +12062,4 @@ exports.Supplier = Supplier;
|
|
|
11986
12062
|
exports.TBGoodId = TBGoodId;
|
|
11987
12063
|
exports.TBGoodSerial = TBGoodSerial;
|
|
11988
12064
|
exports.TradeId = TradeId;
|
|
12065
|
+
exports.WlnGoods = WlnGoods;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { default as BsExchange } from './bs/Exchange';
|
|
|
41
41
|
export { default as BsReissue } from './bs/Reissue';
|
|
42
42
|
export { default as BsReturn } from './bs/Return';
|
|
43
43
|
export { default as BsSystemOrder } from './bs/SystemOrder';
|
|
44
|
+
export { default as WlnGoods } from './wln/Goods';
|
|
44
45
|
export { default as GoodsTable } from './common/GoodsTable';
|
|
45
46
|
export { default as CommonStatus } from './common/CommonStatus';
|
|
46
47
|
export { default as CommonSystemOrder } from './common/CommonSystemOrder';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-alpha.2",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.2",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"pubsub-js": "^1.9.4",
|
|
26
26
|
"react-copy-to-clipboard": "^5.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "4082b35353767d77e58b4e29caed4360b03a7d86"
|
|
65
65
|
}
|