@kmkf-fe-packages/basic-components 2.0.0-rc.3 → 2.0.0-rc.4

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
@@ -13277,13 +13277,39 @@ var GoodItem$1 = function GoodItem(props) {
13277
13277
  title: "\u5546\u54C1\u6570\u91CF",
13278
13278
  align: 'center',
13279
13279
  ellipsis: true,
13280
- width: 100
13280
+ width: 100,
13281
+ render: function render(val, record, index) {
13282
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13283
+ style: {
13284
+ width: 70
13285
+ },
13286
+ value: val,
13287
+ min: 1,
13288
+ precision: 0,
13289
+ onChange: function onChange(num) {
13290
+ return updateHandle(num, index, 'goodsNumber');
13291
+ }
13292
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13293
+ }
13281
13294
  }, {
13282
13295
  dataIndex: 'goodsPrice',
13283
13296
  title: "\u5546\u54C1\u5355\u4EF7",
13284
13297
  align: 'center',
13285
13298
  ellipsis: true,
13286
- width: 120
13299
+ width: 120,
13300
+ render: function render(val, record, index) {
13301
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13302
+ style: {
13303
+ width: 70
13304
+ },
13305
+ value: val,
13306
+ min: 0,
13307
+ precision: 2,
13308
+ onChange: function onChange(num) {
13309
+ return updateHandle(num, index, 'goodsPrice');
13310
+ }
13311
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13312
+ }
13287
13313
  }, {
13288
13314
  dataIndex: 'shopPrice',
13289
13315
  title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
@@ -13307,7 +13333,20 @@ var GoodItem$1 = function GoodItem(props) {
13307
13333
  title: "\u5B9E\u4ED8\u91D1\u989D",
13308
13334
  align: 'center',
13309
13335
  ellipsis: true,
13310
- width: 120
13336
+ width: 120,
13337
+ render: function render(val, record, index) {
13338
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13339
+ style: {
13340
+ width: 70
13341
+ },
13342
+ value: val,
13343
+ min: 0,
13344
+ precision: 2,
13345
+ onChange: function onChange(num) {
13346
+ return updateHandle(num, index, 'payment');
13347
+ }
13348
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13349
+ }
13311
13350
  }, {
13312
13351
  dataIndex: 'tcSku',
13313
13352
  title: "\u5957\u9910SKU",
@@ -13347,6 +13386,116 @@ var GoodItem$1 = function GoodItem(props) {
13347
13386
  });
13348
13387
  }
13349
13388
  break;
13389
+ case 'BS_GOODS':
13390
+ columns = [{
13391
+ dataIndex: 'mark',
13392
+ title: "\u5546\u54C1\u6807\u8BB0",
13393
+ align: 'center',
13394
+ ellipsis: true,
13395
+ width: 70,
13396
+ render: function render(val, record, index) {
13397
+ return /*#__PURE__*/React.createElement(Select, {
13398
+ options: [{
13399
+ label: '是',
13400
+ value: '是'
13401
+ }, {
13402
+ label: '否',
13403
+ value: '否'
13404
+ }],
13405
+ disabled: disabled,
13406
+ value: val,
13407
+ onChange: function onChange(val) {
13408
+ return updateHandle(val, index, 'mark');
13409
+ }
13410
+ });
13411
+ }
13412
+ }, {
13413
+ dataIndex: 'skuName',
13414
+ title: "".concat(text, "sku\u540D\u79F0"),
13415
+ align: 'center',
13416
+ ellipsis: true,
13417
+ width: 250
13418
+ }, {
13419
+ dataIndex: 'sku',
13420
+ title: "".concat(text, "sku\u7F16\u7801"),
13421
+ align: 'center',
13422
+ ellipsis: true,
13423
+ width: 100
13424
+ }, {
13425
+ dataIndex: 'name',
13426
+ title: "".concat(text, "\u540D\u79F0"),
13427
+ align: 'center',
13428
+ ellipsis: true,
13429
+ width: 250
13430
+ }, {
13431
+ dataIndex: 'pic',
13432
+ title: "\u56FE\u7247",
13433
+ align: 'center',
13434
+ ellipsis: true,
13435
+ width: 100,
13436
+ render: function render(val) {
13437
+ return /*#__PURE__*/React.createElement(Image, {
13438
+ width: 60,
13439
+ src: val
13440
+ });
13441
+ }
13442
+ }, {
13443
+ dataIndex: 'code',
13444
+ title: "".concat(text, "\u7F16\u7801"),
13445
+ align: 'center',
13446
+ ellipsis: true,
13447
+ width: 100
13448
+ }, {
13449
+ dataIndex: 'money',
13450
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13451
+ align: 'center',
13452
+ ellipsis: true,
13453
+ width: 100
13454
+ }, {
13455
+ dataIndex: 'number',
13456
+ title: "".concat(text, "\u6570\u91CF"),
13457
+ align: 'center',
13458
+ ellipsis: true,
13459
+ width: 100,
13460
+ render: function render(val, record, index) {
13461
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13462
+ style: {
13463
+ width: 70
13464
+ },
13465
+ value: val,
13466
+ min: 1,
13467
+ precision: 0,
13468
+ onChange: function onChange(num) {
13469
+ return updateHandle(num, index, 'number');
13470
+ }
13471
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13472
+ }
13473
+ }, {
13474
+ dataIndex: 'share',
13475
+ title: "\u5206\u644A\u4EF7",
13476
+ align: 'center',
13477
+ ellipsis: true,
13478
+ width: 70
13479
+ }, {
13480
+ dataIndex: 'type',
13481
+ title: "\u8D60\u54C1\u7C7B\u578B",
13482
+ align: 'center',
13483
+ ellipsis: true,
13484
+ width: 100
13485
+ }, {
13486
+ dataIndex: 'batch',
13487
+ title: "\u6279\u6B21\u53F7",
13488
+ align: 'center',
13489
+ ellipsis: true,
13490
+ width: 100
13491
+ }, {
13492
+ dataIndex: 'expireDate',
13493
+ title: "\u6709\u6548\u671F",
13494
+ align: 'center',
13495
+ ellipsis: true,
13496
+ width: 100
13497
+ }];
13498
+ break;
13350
13499
  default:
13351
13500
  columns = [{
13352
13501
  dataIndex: 'mark',
@@ -13500,6 +13649,7 @@ var GoodItem$1 = function GoodItem(props) {
13500
13649
  }].concat(_toConsumableArray(columns));
13501
13650
  }, []);
13502
13651
  var onSubmit = function onSubmit(list) {
13652
+ console.log('🚀 ~ onSubmit ~ list:', list);
13503
13653
  var newList = [];
13504
13654
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
13505
13655
  newList = list.map(function (item) {
@@ -13544,6 +13694,7 @@ var GoodItem$1 = function GoodItem(props) {
13544
13694
  isGift: '',
13545
13695
  uuid: uuid(),
13546
13696
  canDelete: true,
13697
+ canEdit: true,
13547
13698
  goodsNumber: 1,
13548
13699
  canUpdateNumber: canUpdateNumber
13549
13700
  });
package/dist/index.js CHANGED
@@ -13289,13 +13289,39 @@ var GoodItem$1 = function GoodItem(props) {
13289
13289
  title: "\u5546\u54C1\u6570\u91CF",
13290
13290
  align: 'center',
13291
13291
  ellipsis: true,
13292
- width: 100
13292
+ width: 100,
13293
+ render: function render(val, record, index) {
13294
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13295
+ style: {
13296
+ width: 70
13297
+ },
13298
+ value: val,
13299
+ min: 1,
13300
+ precision: 0,
13301
+ onChange: function onChange(num) {
13302
+ return updateHandle(num, index, 'goodsNumber');
13303
+ }
13304
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13305
+ }
13293
13306
  }, {
13294
13307
  dataIndex: 'goodsPrice',
13295
13308
  title: "\u5546\u54C1\u5355\u4EF7",
13296
13309
  align: 'center',
13297
13310
  ellipsis: true,
13298
- width: 120
13311
+ width: 120,
13312
+ render: function render(val, record, index) {
13313
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13314
+ style: {
13315
+ width: 70
13316
+ },
13317
+ value: val,
13318
+ min: 0,
13319
+ precision: 2,
13320
+ onChange: function onChange(num) {
13321
+ return updateHandle(num, index, 'goodsPrice');
13322
+ }
13323
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13324
+ }
13299
13325
  }, {
13300
13326
  dataIndex: 'shopPrice',
13301
13327
  title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
@@ -13319,7 +13345,20 @@ var GoodItem$1 = function GoodItem(props) {
13319
13345
  title: "\u5B9E\u4ED8\u91D1\u989D",
13320
13346
  align: 'center',
13321
13347
  ellipsis: true,
13322
- width: 120
13348
+ width: 120,
13349
+ render: function render(val, record, index) {
13350
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13351
+ style: {
13352
+ width: 70
13353
+ },
13354
+ value: val,
13355
+ min: 0,
13356
+ precision: 2,
13357
+ onChange: function onChange(num) {
13358
+ return updateHandle(num, index, 'payment');
13359
+ }
13360
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13361
+ }
13323
13362
  }, {
13324
13363
  dataIndex: 'tcSku',
13325
13364
  title: "\u5957\u9910SKU",
@@ -13359,6 +13398,116 @@ var GoodItem$1 = function GoodItem(props) {
13359
13398
  });
13360
13399
  }
13361
13400
  break;
13401
+ case 'BS_GOODS':
13402
+ columns = [{
13403
+ dataIndex: 'mark',
13404
+ title: "\u5546\u54C1\u6807\u8BB0",
13405
+ align: 'center',
13406
+ ellipsis: true,
13407
+ width: 70,
13408
+ render: function render(val, record, index) {
13409
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13410
+ options: [{
13411
+ label: '是',
13412
+ value: '是'
13413
+ }, {
13414
+ label: '否',
13415
+ value: '否'
13416
+ }],
13417
+ disabled: disabled,
13418
+ value: val,
13419
+ onChange: function onChange(val) {
13420
+ return updateHandle(val, index, 'mark');
13421
+ }
13422
+ });
13423
+ }
13424
+ }, {
13425
+ dataIndex: 'skuName',
13426
+ title: "".concat(text, "sku\u540D\u79F0"),
13427
+ align: 'center',
13428
+ ellipsis: true,
13429
+ width: 250
13430
+ }, {
13431
+ dataIndex: 'sku',
13432
+ title: "".concat(text, "sku\u7F16\u7801"),
13433
+ align: 'center',
13434
+ ellipsis: true,
13435
+ width: 100
13436
+ }, {
13437
+ dataIndex: 'name',
13438
+ title: "".concat(text, "\u540D\u79F0"),
13439
+ align: 'center',
13440
+ ellipsis: true,
13441
+ width: 250
13442
+ }, {
13443
+ dataIndex: 'pic',
13444
+ title: "\u56FE\u7247",
13445
+ align: 'center',
13446
+ ellipsis: true,
13447
+ width: 100,
13448
+ render: function render(val) {
13449
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13450
+ width: 60,
13451
+ src: val
13452
+ });
13453
+ }
13454
+ }, {
13455
+ dataIndex: 'code',
13456
+ title: "".concat(text, "\u7F16\u7801"),
13457
+ align: 'center',
13458
+ ellipsis: true,
13459
+ width: 100
13460
+ }, {
13461
+ dataIndex: 'money',
13462
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13463
+ align: 'center',
13464
+ ellipsis: true,
13465
+ width: 100
13466
+ }, {
13467
+ dataIndex: 'number',
13468
+ title: "".concat(text, "\u6570\u91CF"),
13469
+ align: 'center',
13470
+ ellipsis: true,
13471
+ width: 100,
13472
+ render: function render(val, record, index) {
13473
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13474
+ style: {
13475
+ width: 70
13476
+ },
13477
+ value: val,
13478
+ min: 1,
13479
+ precision: 0,
13480
+ onChange: function onChange(num) {
13481
+ return updateHandle(num, index, 'number');
13482
+ }
13483
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13484
+ }
13485
+ }, {
13486
+ dataIndex: 'share',
13487
+ title: "\u5206\u644A\u4EF7",
13488
+ align: 'center',
13489
+ ellipsis: true,
13490
+ width: 70
13491
+ }, {
13492
+ dataIndex: 'type',
13493
+ title: "\u8D60\u54C1\u7C7B\u578B",
13494
+ align: 'center',
13495
+ ellipsis: true,
13496
+ width: 100
13497
+ }, {
13498
+ dataIndex: 'batch',
13499
+ title: "\u6279\u6B21\u53F7",
13500
+ align: 'center',
13501
+ ellipsis: true,
13502
+ width: 100
13503
+ }, {
13504
+ dataIndex: 'expireDate',
13505
+ title: "\u6709\u6548\u671F",
13506
+ align: 'center',
13507
+ ellipsis: true,
13508
+ width: 100
13509
+ }];
13510
+ break;
13362
13511
  default:
13363
13512
  columns = [{
13364
13513
  dataIndex: 'mark',
@@ -13512,6 +13661,7 @@ var GoodItem$1 = function GoodItem(props) {
13512
13661
  }].concat(_toConsumableArray(columns));
13513
13662
  }, []);
13514
13663
  var onSubmit = function onSubmit(list) {
13664
+ console.log('🚀 ~ onSubmit ~ list:', list);
13515
13665
  var newList = [];
13516
13666
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
13517
13667
  newList = list.map(function (item) {
@@ -13556,6 +13706,7 @@ var GoodItem$1 = function GoodItem(props) {
13556
13706
  isGift: '',
13557
13707
  uuid: kmkfUtils.uuid(),
13558
13708
  canDelete: true,
13709
+ canEdit: true,
13559
13710
  goodsNumber: 1,
13560
13711
  canUpdateNumber: canUpdateNumber
13561
13712
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.0.0-rc.3",
3
+ "version": "2.0.0-rc.4",
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": "2.0.0-rc.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.0.0-rc.4",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.9",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "b94db5dd823b45bf56147451e12c1ab94b1277f7"
68
+ "gitHead": "d628f4bf4052983d776c37525bb6498a20110a12"
69
69
  }