@kmkf-fe-packages/basic-components 0.10.3 → 0.11.0-alpha.10

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 CHANGED
@@ -11164,26 +11164,44 @@ var BsReturnGoods = function BsReturnGoods(props) {
11164
11164
  })));
11165
11165
  };
11166
11166
 
11167
- var columns$1 = [{
11168
- dataIndex: 'billType',
11169
- title: '单据类型'
11170
- }, {
11171
- dataIndex: 'billNo',
11172
- title: '系统订单号'
11173
- }, {
11174
- dataIndex: 'billTag',
11175
- title: '标签'
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
- getOrderList(value.orderNo);
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
+ var _columnsNameMap$type, _columnsNameMap$type2;
11194
+ return [{
11195
+ dataIndex: 'billType',
11196
+ title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
11197
+ }, {
11198
+ dataIndex: 'billNo',
11199
+ title: '系统订单号'
11200
+ }, {
11201
+ dataIndex: 'billTag',
11202
+ title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
11203
+ }];
11204
+ }, [type]);
11187
11205
  var getOrderList = /*#__PURE__*/function () {
11188
11206
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
11189
11207
  var _yield$request, success, data;
@@ -11223,6 +11241,51 @@ var index = (function (props) {
11223
11241
  return _ref.apply(this, arguments);
11224
11242
  };
11225
11243
  }();
11244
+ var getWlnOrderList = /*#__PURE__*/function () {
11245
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
11246
+ var _yield$request2, success, data;
11247
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11248
+ while (1) switch (_context2.prev = _context2.next) {
11249
+ case 0:
11250
+ _context2.next = 2;
11251
+ return extendRequest('/qy/gdfw/order/wlnOrderList', {
11252
+ method: 'post',
11253
+ data: {
11254
+ billCode: orderNo
11255
+ }
11256
+ });
11257
+ case 2:
11258
+ _yield$request2 = _context2.sent;
11259
+ success = _yield$request2.success;
11260
+ data = _yield$request2.data;
11261
+ if (success) {
11262
+ _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11263
+ orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
11264
+ return _objectSpread2(_objectSpread2({}, item), {}, {
11265
+ billNo: item.tradeNo,
11266
+ billType: item.tradeType,
11267
+ billTag: item.mark
11268
+ });
11269
+ }),
11270
+ showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
11271
+ return {
11272
+ billNo: item.tradeNo,
11273
+ billType: item.tradeType,
11274
+ billTag: item.mark
11275
+ };
11276
+ })
11277
+ }));
11278
+ }
11279
+ case 6:
11280
+ case "end":
11281
+ return _context2.stop();
11282
+ }
11283
+ }, _callee2);
11284
+ }));
11285
+ return function getWlnOrderList(_x2) {
11286
+ return _ref2.apply(this, arguments);
11287
+ };
11288
+ }();
11226
11289
  var rowSelection = {
11227
11290
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
11228
11291
  fixed: true,
@@ -11241,7 +11304,7 @@ var index = (function (props) {
11241
11304
  };
11242
11305
  return /*#__PURE__*/React.createElement(Table, {
11243
11306
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
11244
- columns: columns$1,
11307
+ columns: columns,
11245
11308
  rowSelection: rowSelection,
11246
11309
  rowKey: 'billNo',
11247
11310
  size: "small",
@@ -11255,6 +11318,28 @@ var index = (function (props) {
11255
11318
  });
11256
11319
  });
11257
11320
 
11321
+ var WlnGoods = function WlnGoods(props) {
11322
+ var value = props.value,
11323
+ disabled = props.disabled,
11324
+ onChange = props.onChange;
11325
+ var changeHandle = function changeHandle(list) {
11326
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11327
+ wlnGoods: list
11328
+ }));
11329
+ };
11330
+ return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
11331
+ key: 'wlnGoods'
11332
+ }, props), {}, {
11333
+ disabled: disabled,
11334
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
11335
+ value: value === null || value === void 0 ? void 0 : value.wlnGoods,
11336
+ showChangeBtn: false,
11337
+ onChange: function onChange(val) {
11338
+ return changeHandle(val);
11339
+ }
11340
+ }));
11341
+ };
11342
+
11258
11343
  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
11344
  styleInject(css_248z$9);
11260
11345
 
@@ -11925,4 +12010,4 @@ var CalculationInput = function CalculationInput(props) {
11925
12010
  }, config === null || config === void 0 ? void 0 : config.unit));
11926
12011
  };
11927
12012
 
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 };
12013
+ 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,44 @@ var BsReturnGoods = function BsReturnGoods(props) {
11175
11175
  })));
11176
11176
  };
11177
11177
 
11178
- var columns$1 = [{
11179
- dataIndex: 'billType',
11180
- title: '单据类型'
11181
- }, {
11182
- dataIndex: 'billNo',
11183
- title: '系统订单号'
11184
- }, {
11185
- dataIndex: 'billTag',
11186
- title: '标签'
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
- getOrderList(value.orderNo);
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
+ var _columnsNameMap$type, _columnsNameMap$type2;
11205
+ return [{
11206
+ dataIndex: 'billType',
11207
+ title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
11208
+ }, {
11209
+ dataIndex: 'billNo',
11210
+ title: '系统订单号'
11211
+ }, {
11212
+ dataIndex: 'billTag',
11213
+ title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
11214
+ }];
11215
+ }, [type]);
11198
11216
  var getOrderList = /*#__PURE__*/function () {
11199
11217
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
11200
11218
  var _yield$request, success, data;
@@ -11234,6 +11252,51 @@ var index = (function (props) {
11234
11252
  return _ref.apply(this, arguments);
11235
11253
  };
11236
11254
  }();
11255
+ var getWlnOrderList = /*#__PURE__*/function () {
11256
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
11257
+ var _yield$request2, success, data;
11258
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11259
+ while (1) switch (_context2.prev = _context2.next) {
11260
+ case 0:
11261
+ _context2.next = 2;
11262
+ return extendRequest('/qy/gdfw/order/wlnOrderList', {
11263
+ method: 'post',
11264
+ data: {
11265
+ billCode: orderNo
11266
+ }
11267
+ });
11268
+ case 2:
11269
+ _yield$request2 = _context2.sent;
11270
+ success = _yield$request2.success;
11271
+ data = _yield$request2.data;
11272
+ if (success) {
11273
+ _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11274
+ orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
11275
+ return _objectSpread2(_objectSpread2({}, item), {}, {
11276
+ billNo: item.tradeNo,
11277
+ billType: item.tradeType,
11278
+ billTag: item.mark
11279
+ });
11280
+ }),
11281
+ showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
11282
+ return {
11283
+ billNo: item.tradeNo,
11284
+ billType: item.tradeType,
11285
+ billTag: item.mark
11286
+ };
11287
+ })
11288
+ }));
11289
+ }
11290
+ case 6:
11291
+ case "end":
11292
+ return _context2.stop();
11293
+ }
11294
+ }, _callee2);
11295
+ }));
11296
+ return function getWlnOrderList(_x2) {
11297
+ return _ref2.apply(this, arguments);
11298
+ };
11299
+ }();
11237
11300
  var rowSelection = {
11238
11301
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
11239
11302
  fixed: true,
@@ -11252,7 +11315,7 @@ var index = (function (props) {
11252
11315
  };
11253
11316
  return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
11254
11317
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
11255
- columns: columns$1,
11318
+ columns: columns,
11256
11319
  rowSelection: rowSelection,
11257
11320
  rowKey: 'billNo',
11258
11321
  size: "small",
@@ -11266,6 +11329,28 @@ var index = (function (props) {
11266
11329
  });
11267
11330
  });
11268
11331
 
11332
+ var WlnGoods = function WlnGoods(props) {
11333
+ var value = props.value,
11334
+ disabled = props.disabled,
11335
+ onChange = props.onChange;
11336
+ var changeHandle = function changeHandle(list) {
11337
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11338
+ wlnGoods: list
11339
+ }));
11340
+ };
11341
+ return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
11342
+ key: 'wlnGoods'
11343
+ }, props), {}, {
11344
+ disabled: disabled,
11345
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
11346
+ value: value === null || value === void 0 ? void 0 : value.wlnGoods,
11347
+ showChangeBtn: false,
11348
+ onChange: function onChange(val) {
11349
+ return changeHandle(val);
11350
+ }
11351
+ }));
11352
+ };
11353
+
11269
11354
  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
11355
  styleInject(css_248z$9);
11271
11356
 
@@ -11986,3 +12071,4 @@ exports.Supplier = Supplier;
11986
12071
  exports.TBGoodId = TBGoodId;
11987
12072
  exports.TBGoodSerial = TBGoodSerial;
11988
12073
  exports.TradeId = TradeId;
12074
+ exports.WlnGoods = WlnGoods;
@@ -6,6 +6,7 @@ interface BsSystemOrderProps {
6
6
  selectIds: string[];
7
7
  showOrderInfo: any[];
8
8
  };
9
+ type: string;
9
10
  disabled: boolean;
10
11
  onChange: (val: any) => void;
11
12
  onChangeOrder?: (val: any) => void;
@@ -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';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const WlnGoods: (props: any) => React.JSX.Element;
3
+ export default WlnGoods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.10.3",
3
+ "version": "0.11.0-alpha.10",
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.10.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.8",
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": "1af0c41f4802ef4a21314f67e394d85e7c9a401c"
64
+ "gitHead": "61b21be50cb56ff7de6cce7249c0e1543ba9f75c"
65
65
  }