@kmkf-fe-packages/basic-components 2.0.19-beta.69 → 2.0.19-beta.70

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
@@ -1,10 +1,10 @@
1
1
  import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
2
- import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography } from 'antd';
2
+ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -12178,6 +12178,497 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
12178
12178
  };
12179
12179
  var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
12180
12180
 
12181
+ var gyColumns = [{
12182
+ dataIndex: 'specName',
12183
+ title: 'SKU名称',
12184
+ width: 250,
12185
+ ellipsis: true
12186
+ }, {
12187
+ dataIndex: 'specNo',
12188
+ title: 'SKU编码',
12189
+ width: 200,
12190
+ ellipsis: true
12191
+ }, {
12192
+ dataIndex: 'goodName',
12193
+ title: '商品名称',
12194
+ width: 250,
12195
+ ellipsis: true
12196
+ }, {
12197
+ dataIndex: 'goodShortName',
12198
+ title: "\u5546\u54C1\u7B80\u79F0",
12199
+ ellipsis: true,
12200
+ width: 250
12201
+ }, {
12202
+ dataIndex: 'goodNo',
12203
+ title: '商品编码',
12204
+ width: 200,
12205
+ ellipsis: true
12206
+ }, {
12207
+ dataIndex: 'goodPicUrl',
12208
+ title: '商品图片',
12209
+ width: 100,
12210
+ render: function render(picUrl) {
12211
+ return /*#__PURE__*/React.createElement("img", {
12212
+ style: {
12213
+ width: '40px',
12214
+ height: '40px',
12215
+ objectFit: 'contain'
12216
+ },
12217
+ src: picUrl
12218
+ });
12219
+ }
12220
+ }, {
12221
+ dataIndex: 'brandName',
12222
+ title: '品牌名称',
12223
+ width: 200,
12224
+ ellipsis: true
12225
+ }, {
12226
+ dataIndex: 'retailPrice',
12227
+ title: "\u6807\u51C6\u552E\u4EF7",
12228
+ ellipsis: true,
12229
+ width: 100
12230
+ }, {
12231
+ dataIndex: 'costPrice',
12232
+ title: "\u6210\u672C\u4EF7",
12233
+ ellipsis: true,
12234
+ width: 100
12235
+ }];
12236
+
12237
+ var jstColumns = [{
12238
+ dataIndex: 'goodName',
12239
+ title: '商品名称',
12240
+ width: 250,
12241
+ ellipsis: true
12242
+ }, {
12243
+ dataIndex: 'goodNo',
12244
+ title: '商品编码',
12245
+ width: 200,
12246
+ ellipsis: true
12247
+ }, {
12248
+ dataIndex: 'styleCode',
12249
+ title: '款式编码',
12250
+ width: 200,
12251
+ ellipsis: true
12252
+ }, {
12253
+ dataIndex: 'propertiesValue',
12254
+ title: '规格值',
12255
+ width: 200,
12256
+ ellipsis: true
12257
+ }, {
12258
+ dataIndex: 'goodPicUrl',
12259
+ title: '商品图片',
12260
+ width: 100,
12261
+ render: function render(picUrl) {
12262
+ return /*#__PURE__*/React.createElement("img", {
12263
+ style: {
12264
+ width: '40px',
12265
+ height: '40px',
12266
+ objectFit: 'contain'
12267
+ },
12268
+ src: picUrl
12269
+ });
12270
+ }
12271
+ }, {
12272
+ dataIndex: 'goodShortName',
12273
+ title: "\u5546\u54C1\u7B80\u79F0",
12274
+ ellipsis: true,
12275
+ width: 250
12276
+ }, {
12277
+ dataIndex: 'brandName',
12278
+ title: '品牌名称',
12279
+ width: 200,
12280
+ ellipsis: true
12281
+ }, {
12282
+ dataIndex: 'retailPrice',
12283
+ title: "\u9500\u552E\u4EF7\u683C",
12284
+ ellipsis: true,
12285
+ width: 100,
12286
+ render: function render(price) {
12287
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12288
+ }
12289
+ }, {
12290
+ dataIndex: 'marketPrice',
12291
+ title: "\u5E02\u573A\u4EF7",
12292
+ ellipsis: true,
12293
+ width: 100,
12294
+ render: function render(price) {
12295
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12296
+ }
12297
+ }, {
12298
+ dataIndex: 'costPrice',
12299
+ title: "\u6210\u672C\u4EF7",
12300
+ ellipsis: true,
12301
+ width: 100,
12302
+ render: function render(price) {
12303
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12304
+ }
12305
+ }, {
12306
+ dataIndex: 'skuType',
12307
+ title: "\u5546\u54C1\u7C7B\u578B",
12308
+ ellipsis: true,
12309
+ width: 100,
12310
+ render: function render() {
12311
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
12312
+ return {
12313
+ combine: '组合装商品',
12314
+ normal: '普通商品'
12315
+ }[type] || type;
12316
+ }
12317
+ }];
12318
+
12319
+ var wdtColumns = [{
12320
+ dataIndex: 'specName',
12321
+ title: 'SKU名称',
12322
+ width: 250,
12323
+ ellipsis: true
12324
+ }, {
12325
+ dataIndex: 'specNo',
12326
+ title: 'SKU编码',
12327
+ width: 200,
12328
+ ellipsis: true
12329
+ }, {
12330
+ dataIndex: 'specId',
12331
+ title: 'SKUID',
12332
+ width: 200,
12333
+ ellipsis: true
12334
+ }, {
12335
+ dataIndex: 'specImgUrl',
12336
+ title: '商品图片',
12337
+ width: 100,
12338
+ render: function render(picUrl) {
12339
+ return /*#__PURE__*/React.createElement("img", {
12340
+ style: {
12341
+ width: '40px',
12342
+ height: '40px',
12343
+ objectFit: 'contain'
12344
+ },
12345
+ src: picUrl
12346
+ });
12347
+ }
12348
+ }, {
12349
+ dataIndex: 'goodName',
12350
+ title: '商品名称',
12351
+ width: 250,
12352
+ ellipsis: true
12353
+ }, {
12354
+ dataIndex: 'goodNo',
12355
+ title: '商品编码',
12356
+ width: 200,
12357
+ ellipsis: true
12358
+ }, {
12359
+ dataIndex: 'goodId',
12360
+ title: '商品ID',
12361
+ width: 200,
12362
+ ellipsis: true
12363
+ }, {
12364
+ dataIndex: 'brandName',
12365
+ title: '品牌名称',
12366
+ width: 200,
12367
+ ellipsis: true
12368
+ }, {
12369
+ dataIndex: 'marketPrice',
12370
+ title: '市场价',
12371
+ width: 140,
12372
+ render: function render(price) {
12373
+ return Number(price).toFixed(2);
12374
+ }
12375
+ }, {
12376
+ dataIndex: 'retailPrice',
12377
+ title: '零售价',
12378
+ width: 140,
12379
+ render: function render(price) {
12380
+ return Number(price).toFixed(2);
12381
+ }
12382
+ }, {
12383
+ dataIndex: 'memberPrice',
12384
+ title: '会员价',
12385
+ width: 140,
12386
+ render: function render(price) {
12387
+ return Number(price).toFixed(2);
12388
+ }
12389
+ }];
12390
+
12391
+ var bse3Columns = [{
12392
+ dataIndex: 'specNo',
12393
+ title: "SKU",
12394
+ ellipsis: true,
12395
+ width: 200
12396
+ }, {
12397
+ dataIndex: 'specId',
12398
+ title: "SKU ID",
12399
+ ellipsis: true,
12400
+ width: 80
12401
+ }, {
12402
+ dataIndex: 'goodName',
12403
+ title: "\u5546\u54C1\u540D\u79F0",
12404
+ ellipsis: true,
12405
+ width: 250
12406
+ }, {
12407
+ dataIndex: 'goodShortName',
12408
+ title: "\u5546\u54C1\u7B80\u79F0",
12409
+ ellipsis: true,
12410
+ width: 250
12411
+ },
12412
+ // {
12413
+ // dataIndex: 'goodPicUrl',
12414
+ // title: `商品图片`,
12415
+ // ellipsis: true,
12416
+ // width: 100,
12417
+ // render: (picUrl: string) => {
12418
+ // return (
12419
+ // <img
12420
+ // style={{
12421
+ // width: '40px',
12422
+ // height: '40px',
12423
+ // objectFit: 'contain',
12424
+ // }}
12425
+ // src={picUrl}
12426
+ // ></img>
12427
+ // );
12428
+ // },
12429
+ // },
12430
+ {
12431
+ dataIndex: 'goodNo',
12432
+ title: "\u8D27\u53F7",
12433
+ ellipsis: true,
12434
+ width: 150
12435
+ }, {
12436
+ dataIndex: 'goodId',
12437
+ title: "\u8D27\u53F7ID",
12438
+ ellipsis: true,
12439
+ width: 100
12440
+ }, {
12441
+ dataIndex: 'colorName',
12442
+ title: "\u989C\u8272\u540D\u79F0",
12443
+ ellipsis: true,
12444
+ width: 100
12445
+ }, {
12446
+ dataIndex: 'colorCode',
12447
+ title: "\u989C\u8272\u4EE3\u7801",
12448
+ ellipsis: true,
12449
+ width: 100
12450
+ }, {
12451
+ dataIndex: 'sizeName',
12452
+ title: "\u5C3A\u7801\u540D\u79F0",
12453
+ ellipsis: true,
12454
+ width: 100
12455
+ }, {
12456
+ dataIndex: 'sizeCode',
12457
+ title: "\u5C3A\u7801\u4EE3\u7801",
12458
+ ellipsis: true,
12459
+ width: 100
12460
+ }, {
12461
+ dataIndex: 'brandName',
12462
+ title: "\u54C1\u724C\u540D\u79F0",
12463
+ ellipsis: true,
12464
+ width: 100
12465
+ }, {
12466
+ dataIndex: 'marketPrice',
12467
+ title: "\u5E02\u573A\u4EF7",
12468
+ ellipsis: true,
12469
+ width: 100
12470
+ }, {
12471
+ dataIndex: 'retailPrice',
12472
+ title: "\u552E\u4EF7",
12473
+ ellipsis: true,
12474
+ width: 100
12475
+ }];
12476
+
12477
+ var getColumnsMap = function getColumnsMap() {
12478
+ return cloneDeep({
12479
+ gy: gyColumns,
12480
+ jst: jstColumns,
12481
+ wdt: wdtColumns,
12482
+ bse3: bse3Columns
12483
+ });
12484
+ };
12485
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
12486
+ var clone_columnsMap = cloneDeep(getColumnsMap());
12487
+ var newColumns = {};
12488
+ Object.keys(clone_columnsMap).forEach(function (key) {
12489
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
12490
+ return {
12491
+ title: col.title,
12492
+ dataIndex: col.dataIndex
12493
+ };
12494
+ });
12495
+ });
12496
+ return newColumns;
12497
+ };
12498
+ var index$2 = getColumnsBaseInfo();
12499
+
12500
+ var initNo = {
12501
+ dataIndex: 'index',
12502
+ title: 'NO',
12503
+ render: function render(val, record, index) {
12504
+ return /*#__PURE__*/React.createElement("div", {
12505
+ style: {
12506
+ width: 25
12507
+ }
12508
+ }, index + 1);
12509
+ },
12510
+ width: 80
12511
+ };
12512
+ var asyncGetData = function asyncGetData(type) {
12513
+ return extendRequest('/qy/condition/list', {
12514
+ method: 'get',
12515
+ params: {
12516
+ typeKey: "erp_select_modal_".concat(type),
12517
+ configScope: 'company' //按企业查询
12518
+ }
12519
+ }).then(function (res) {
12520
+ if (res && res.data && res.data[0] && res.data[0].queryInfo && res.data[0].queryInfo.length > 0) {
12521
+ return JSON.parse(res.data[0].queryInfo);
12522
+ } else {
12523
+ return getColumnsMap()[type];
12524
+ }
12525
+ });
12526
+ };
12527
+ var useGetColumns = (function (type) {
12528
+ var _useState = useState([]),
12529
+ _useState2 = _slicedToArray(_useState, 2),
12530
+ columns = _useState2[0],
12531
+ setColumns = _useState2[1];
12532
+ var _useState3 = useState(false),
12533
+ _useState4 = _slicedToArray(_useState3, 2),
12534
+ loading = _useState4[0],
12535
+ setLoading = _useState4[1];
12536
+ var showColumnsDataIndexList = useMemo(function () {
12537
+ return columns.filter(function (item) {
12538
+ return Object.hasOwn(item, 'dataIndex');
12539
+ }).map(function (item) {
12540
+ return item.dataIndex;
12541
+ });
12542
+ }, [columns]);
12543
+ useEffect(function () {
12544
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
12545
+ var initColumns, requestSortColumns, list, initDataIndexList;
12546
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12547
+ while (1) switch (_context.prev = _context.next) {
12548
+ case 0:
12549
+ initColumns = getColumnsMap()[type];
12550
+ setLoading(true);
12551
+ _context.next = 4;
12552
+ return asyncGetData(type);
12553
+ case 4:
12554
+ requestSortColumns = _context.sent;
12555
+ setLoading(false);
12556
+ list = [initNo];
12557
+ if (requestSortColumns && requestSortColumns.length > 0) {
12558
+ initDataIndexList = initColumns.map(function (item) {
12559
+ return item.dataIndex;
12560
+ });
12561
+ requestSortColumns.forEach(function (item) {
12562
+ var dataIndex = item.dataIndex,
12563
+ show = item.show;
12564
+ if (show !== false && initDataIndexList.includes(dataIndex)) {
12565
+ list.push(initColumns.find(function (item) {
12566
+ return item.dataIndex === dataIndex;
12567
+ }));
12568
+ }
12569
+ });
12570
+ }
12571
+ setColumns(list);
12572
+ case 9:
12573
+ case "end":
12574
+ return _context.stop();
12575
+ }
12576
+ }, _callee);
12577
+ }))();
12578
+ }, []);
12579
+ return [columns, showColumnsDataIndexList, loading];
12580
+ });
12581
+
12582
+ function SearchForm(_ref) {
12583
+ var searchFormData = _ref.searchFormData,
12584
+ form = _ref.form,
12585
+ showColumnsDataIndexList = _ref.showColumnsDataIndexList,
12586
+ submit = _ref.submit,
12587
+ reset = _ref.reset;
12588
+ var _useState = useState({}),
12589
+ _useState2 = _slicedToArray(_useState, 2),
12590
+ searchData = _useState2[0],
12591
+ setSearchData = _useState2[1];
12592
+ var submitForm = /*#__PURE__*/function () {
12593
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(submitBtnClickFlag) {
12594
+ var values;
12595
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12596
+ while (1) switch (_context.prev = _context.next) {
12597
+ case 0:
12598
+ _context.next = 2;
12599
+ return form.getFieldsValue();
12600
+ case 2:
12601
+ values = _context.sent;
12602
+ if (submitBtnClickFlag || !isEqual(values, searchData)) {
12603
+ setSearchData(values);
12604
+ submit();
12605
+ }
12606
+ case 4:
12607
+ case "end":
12608
+ return _context.stop();
12609
+ }
12610
+ }, _callee);
12611
+ }));
12612
+ return function submitForm(_x) {
12613
+ return _ref2.apply(this, arguments);
12614
+ };
12615
+ }();
12616
+ return /*#__PURE__*/React.createElement(Form, {
12617
+ layout: "inline",
12618
+ form: form
12619
+ }, searchFormData.map(function (item) {
12620
+ var label = item.label,
12621
+ name = item.name,
12622
+ dataIndex = item.dataIndex,
12623
+ type = item.type,
12624
+ _item$formItemProps = item.formItemProps,
12625
+ formItemProps = _item$formItemProps === void 0 ? {} : _item$formItemProps;
12626
+ if (!showColumnsDataIndexList.includes(dataIndex || name)) return;
12627
+ return /*#__PURE__*/React.createElement(Form.Item, {
12628
+ name: name,
12629
+ style: {
12630
+ marginBottom: '12px'
12631
+ }
12632
+ }, type === 'select' ? /*#__PURE__*/React.createElement(Select, _objectSpread2({
12633
+ placeholder: label,
12634
+ showSearch: true,
12635
+ allowClear: true,
12636
+ style: {
12637
+ width: 150
12638
+ },
12639
+ onBlur: function onBlur() {
12640
+ return submitForm();
12641
+ }
12642
+ }, formItemProps)) : /*#__PURE__*/React.createElement(Input, _objectSpread2({
12643
+ placeholder: label,
12644
+ allowClear: true,
12645
+ style: {
12646
+ width: 150
12647
+ },
12648
+ onPressEnter: function onPressEnter() {
12649
+ return submitForm();
12650
+ },
12651
+ onBlur: function onBlur() {
12652
+ return submitForm();
12653
+ }
12654
+ }, formItemProps)));
12655
+ }), /*#__PURE__*/React.createElement(Form.Item, {
12656
+ style: {
12657
+ marginBottom: '12px'
12658
+ }
12659
+ }, /*#__PURE__*/React.createElement(Button, {
12660
+ type: "primary",
12661
+ style: {
12662
+ marginRight: '8px'
12663
+ },
12664
+ onClick: function onClick() {
12665
+ return submitForm(true);
12666
+ }
12667
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12668
+ onClick: reset
12669
+ }, "\u91CD\u7F6E")));
12670
+ }
12671
+
12181
12672
  var getTableData = function getTableData(_ref, formData) {
12182
12673
  var _formData$brandIds;
12183
12674
  var current = _ref.current,
@@ -12213,88 +12704,6 @@ var getTableData = function getTableData(_ref, formData) {
12213
12704
  };
12214
12705
  });
12215
12706
  };
12216
- var columns$1 = [{
12217
- dataIndex: 'index',
12218
- title: 'NO',
12219
- render: function render(val, record, index) {
12220
- return /*#__PURE__*/React.createElement("div", {
12221
- style: {
12222
- width: 25
12223
- }
12224
- }, index + 1);
12225
- },
12226
- width: 100
12227
- }, {
12228
- dataIndex: 'specName',
12229
- title: 'SKU名称',
12230
- width: 250,
12231
- ellipsis: true
12232
- }, {
12233
- dataIndex: 'specNo',
12234
- title: 'SKU编码',
12235
- width: 200,
12236
- ellipsis: true
12237
- }, {
12238
- dataIndex: 'specId',
12239
- title: 'SKUID',
12240
- width: 200,
12241
- ellipsis: true
12242
- }, {
12243
- dataIndex: 'specImgUrl',
12244
- title: '商品图片',
12245
- width: 100,
12246
- render: function render(picUrl) {
12247
- return /*#__PURE__*/React.createElement("img", {
12248
- style: {
12249
- width: '40px',
12250
- height: '40px',
12251
- objectFit: 'contain'
12252
- },
12253
- src: picUrl
12254
- });
12255
- }
12256
- }, {
12257
- dataIndex: 'goodName',
12258
- title: '商品名称',
12259
- width: 250,
12260
- ellipsis: true
12261
- }, {
12262
- dataIndex: 'goodNo',
12263
- title: '商品编码',
12264
- width: 200,
12265
- ellipsis: true
12266
- }, {
12267
- dataIndex: 'goodId',
12268
- title: '商品ID',
12269
- width: 200,
12270
- ellipsis: true
12271
- }, {
12272
- dataIndex: 'brandName',
12273
- title: '品牌名称',
12274
- width: 200,
12275
- ellipsis: true
12276
- }, {
12277
- dataIndex: 'marketPrice',
12278
- title: '市场价',
12279
- width: 140,
12280
- render: function render(price) {
12281
- return Number(price).toFixed(2);
12282
- }
12283
- }, {
12284
- dataIndex: 'retailPrice',
12285
- title: '零售价',
12286
- width: 140,
12287
- render: function render(price) {
12288
- return Number(price).toFixed(2);
12289
- }
12290
- }, {
12291
- dataIndex: 'memberPrice',
12292
- title: '会员价',
12293
- width: 140,
12294
- render: function render(price) {
12295
- return Number(price).toFixed(2);
12296
- }
12297
- }];
12298
12707
  var GoodList = function GoodList(props, ref) {
12299
12708
  var _useState = useState([]),
12300
12709
  _useState2 = _slicedToArray(_useState, 2),
@@ -12308,6 +12717,11 @@ var GoodList = function GoodList(props, ref) {
12308
12717
  _useState6 = _slicedToArray(_useState5, 2),
12309
12718
  brandList = _useState6[0],
12310
12719
  setBrandList = _useState6[1];
12720
+ var _useGetColumns = useGetColumns('wdt'),
12721
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
12722
+ columns = _useGetColumns2[0],
12723
+ showColumnsDataIndexList = _useGetColumns2[1],
12724
+ loading = _useGetColumns2[2];
12311
12725
  useImperativeHandle(ref, function () {
12312
12726
  return {
12313
12727
  getSelectGoodList: function getSelectGoodList() {
@@ -12359,92 +12773,42 @@ var GoodList = function GoodList(props, ref) {
12359
12773
  React.useEffect(function () {
12360
12774
  setGoodBrandList();
12361
12775
  }, []);
12362
- var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12363
- layout: "inline",
12364
- form: form
12365
- }, /*#__PURE__*/React.createElement(Form.Item, {
12366
- name: "skuName",
12367
- style: {
12368
- marginBottom: '12px'
12369
- }
12370
- }, /*#__PURE__*/React.createElement(Input, {
12371
- placeholder: "SKU\u540D\u79F0",
12372
- allowClear: true,
12373
- style: {
12374
- width: 150
12375
- }
12376
- })), /*#__PURE__*/React.createElement(Form.Item, {
12377
- name: "skuCode",
12378
- style: {
12379
- marginBottom: '12px'
12380
- }
12381
- }, /*#__PURE__*/React.createElement(Input, {
12382
- placeholder: "SKU\u7F16\u7801",
12383
- allowClear: true,
12384
- style: {
12385
- width: 150
12386
- }
12387
- })), /*#__PURE__*/React.createElement(Form.Item, {
12388
- name: "goodName",
12389
- style: {
12390
- marginBottom: '12px'
12391
- }
12392
- }, /*#__PURE__*/React.createElement(Input, {
12393
- placeholder: "\u5546\u54C1\u540D\u79F0",
12394
- allowClear: true,
12395
- style: {
12396
- width: 150
12397
- }
12398
- })), /*#__PURE__*/React.createElement(Form.Item, {
12399
- name: "goodNo",
12400
- style: {
12401
- marginBottom: '12px'
12402
- }
12403
- }, /*#__PURE__*/React.createElement(Input, {
12404
- placeholder: "\u5546\u54C1\u7F16\u7801",
12405
- allowClear: true,
12406
- style: {
12407
- width: 150
12408
- }
12409
- })), /*#__PURE__*/React.createElement(Form.Item, {
12410
- name: "brandIds",
12411
- style: {
12412
- marginBottom: '12px'
12413
- }
12414
- }, /*#__PURE__*/React.createElement(Select, {
12415
- mode: "multiple",
12416
- showSearch: true,
12417
- allowClear: true,
12418
- filterOption: function filterOption(input, option) {
12419
- return option.label.includes(input);
12420
- },
12421
- style: {
12422
- width: 150
12423
- },
12424
- placeholder: "\u54C1\u724C",
12425
- options: brandList.filter(function (item) {
12426
- return !item.isDisabled;
12427
- }).map(function (_ref2) {
12428
- var value = _ref2.brandId,
12429
- label = _ref2.brandName;
12430
- return {
12431
- value: value,
12432
- label: label
12433
- };
12434
- })
12435
- })), /*#__PURE__*/React.createElement(Form.Item, {
12436
- style: {
12437
- marginBottom: '12px'
12776
+ var searchFormData = [{
12777
+ label: 'SKU名称',
12778
+ name: 'skuName',
12779
+ dataIndex: 'specName'
12780
+ }, {
12781
+ label: 'SKU编码',
12782
+ name: 'skuCode',
12783
+ dataIndex: 'specNo'
12784
+ }, {
12785
+ label: '商品名称',
12786
+ name: 'goodName'
12787
+ }, {
12788
+ label: '商品编码',
12789
+ name: 'goodNo'
12790
+ }, {
12791
+ label: '品牌',
12792
+ name: 'brandIds',
12793
+ dataIndex: 'brandName',
12794
+ type: 'select',
12795
+ formItemProps: {
12796
+ mode: 'multiple',
12797
+ filterOption: function filterOption(input, option) {
12798
+ return option.label.includes(input);
12799
+ },
12800
+ options: brandList.filter(function (item) {
12801
+ return !item.isDisabled;
12802
+ }).map(function (_ref2) {
12803
+ var value = _ref2.brandId,
12804
+ label = _ref2.brandName;
12805
+ return {
12806
+ value: value,
12807
+ label: label
12808
+ };
12809
+ })
12438
12810
  }
12439
- }, /*#__PURE__*/React.createElement(Button, {
12440
- type: "primary",
12441
- style: {
12442
- marginRight: '8px'
12443
- },
12444
- onClick: submit
12445
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12446
- onClick: reset
12447
- }, "\u91CD\u7F6E")));
12811
+ }];
12448
12812
  var rowSelection = {
12449
12813
  selectedRowKeys: selectIds,
12450
12814
  fixed: true,
@@ -12500,7 +12864,7 @@ var GoodList = function GoodList(props, ref) {
12500
12864
  }
12501
12865
  }, "\u5220\u9664");
12502
12866
  }
12503
- }].concat(takeRight(columns$1, columns$1.length - 1));
12867
+ }].concat(takeRight(columns, columns.length - 1));
12504
12868
  return selectList.length ? /*#__PURE__*/React.createElement("div", {
12505
12869
  style: {
12506
12870
  width: '100%',
@@ -12522,14 +12886,23 @@ var GoodList = function GoodList(props, ref) {
12522
12886
  }
12523
12887
  })) : null;
12524
12888
  };
12525
- return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12889
+ return /*#__PURE__*/React.createElement(Skeleton, {
12890
+ active: true,
12891
+ loading: loading
12892
+ }, /*#__PURE__*/React.createElement(SearchForm, {
12893
+ searchFormData: searchFormData,
12894
+ form: form,
12895
+ showColumnsDataIndexList: showColumnsDataIndexList,
12896
+ submit: submit,
12897
+ reset: reset
12898
+ }), /*#__PURE__*/React.createElement("div", {
12526
12899
  style: {
12527
12900
  marginTop: '4px'
12528
12901
  }
12529
12902
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12530
12903
  rowSelection: rowSelection,
12531
12904
  rowKey: "specNo",
12532
- columns: columns$1,
12905
+ columns: columns,
12533
12906
  scroll: {
12534
12907
  x: '100%',
12535
12908
  y: 250
@@ -12578,132 +12951,50 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
12578
12951
  visible: visible,
12579
12952
  width: width || 850,
12580
12953
  onCancel: function onCancel() {
12581
- _onCancel();
12582
- },
12583
- onOk: onOk,
12584
- wrapClassName: "goodModal"
12585
- }, /*#__PURE__*/React.createElement(WdtGoodList, {
12586
- ref: wdtGoodListRef
12587
- })));
12588
- };
12589
- var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12590
-
12591
- var getTableData$1 = function getTableData(_ref, formData) {
12592
- var current = _ref.current,
12593
- pageSize = _ref.pageSize;
12594
- return extendRequest('/qy/gdfw/product/product/page', {
12595
- method: 'post',
12596
- data: _objectSpread2({
12597
- pageSize: pageSize,
12598
- pageNo: current,
12599
- platform: 'JST_ERP'
12600
- }, formData)
12601
- }).then(function (res) {
12602
- var _res$data = res.data,
12603
- _res$data$productSkuL = _res$data.productSkuList,
12604
- productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12605
- _res$data$total = _res$data.total,
12606
- total = _res$data$total === void 0 ? 0 : _res$data$total;
12607
- var newProducts = productSkuList.map(function (item, index) {
12608
- return _objectSpread2({}, item);
12609
- });
12610
- return {
12611
- total: total,
12612
- list: newProducts
12613
- };
12614
- });
12615
- };
12616
- var columns$2 = [{
12617
- dataIndex: 'index',
12618
- title: 'NO',
12619
- render: function render(val, record, index) {
12620
- return /*#__PURE__*/React.createElement("div", {
12621
- style: {
12622
- width: 25
12623
- }
12624
- }, index + 1);
12625
- },
12626
- width: 80
12627
- }, {
12628
- dataIndex: 'goodName',
12629
- title: '商品名称',
12630
- width: 250,
12631
- ellipsis: true
12632
- }, {
12633
- dataIndex: 'goodNo',
12634
- title: '商品编码',
12635
- width: 200,
12636
- ellipsis: true
12637
- }, {
12638
- dataIndex: 'styleCode',
12639
- title: '款式编码',
12640
- width: 200,
12641
- ellipsis: true
12642
- }, {
12643
- dataIndex: 'propertiesValue',
12644
- title: '规格值',
12645
- width: 200,
12646
- ellipsis: true
12647
- }, {
12648
- dataIndex: 'goodPicUrl',
12649
- title: '商品图片',
12650
- width: 100,
12651
- render: function render(picUrl) {
12652
- return /*#__PURE__*/React.createElement("img", {
12653
- style: {
12654
- width: '40px',
12655
- height: '40px',
12656
- objectFit: 'contain'
12657
- },
12658
- src: picUrl
12954
+ _onCancel();
12955
+ },
12956
+ onOk: onOk,
12957
+ wrapClassName: "goodModal"
12958
+ }, /*#__PURE__*/React.createElement(WdtGoodList, {
12959
+ ref: wdtGoodListRef
12960
+ })));
12961
+ };
12962
+ var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12963
+
12964
+ var getTableData$1 = function getTableData(_ref, formData) {
12965
+ var current = _ref.current,
12966
+ pageSize = _ref.pageSize;
12967
+ return extendRequest('/qy/gdfw/product/product/page', {
12968
+ method: 'post',
12969
+ data: _objectSpread2({
12970
+ pageSize: pageSize,
12971
+ pageNo: current,
12972
+ platform: 'JST_ERP'
12973
+ }, formData)
12974
+ }).then(function (res) {
12975
+ var _res$data = res.data,
12976
+ _res$data$productSkuL = _res$data.productSkuList,
12977
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12978
+ _res$data$total = _res$data.total,
12979
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12980
+ var newProducts = productSkuList.map(function (item, index) {
12981
+ return _objectSpread2({}, item);
12659
12982
  });
12660
- }
12661
- }, {
12662
- dataIndex: 'goodShortName',
12663
- title: "\u5546\u54C1\u7B80\u79F0",
12664
- ellipsis: true,
12665
- width: 250
12666
- }, {
12667
- dataIndex: 'brandName',
12668
- title: '品牌名称',
12669
- width: 200,
12670
- ellipsis: true
12671
- }, {
12672
- dataIndex: 'retailPrice',
12673
- title: "\u9500\u552E\u4EF7\u683C",
12674
- ellipsis: true,
12675
- width: 100,
12676
- render: function render(price) {
12677
- return price || price === 0 ? Number(price).toFixed(2) : '';
12678
- }
12679
- }, {
12680
- dataIndex: 'marketPrice',
12681
- title: "\u5E02\u573A\u4EF7",
12682
- ellipsis: true,
12683
- width: 100,
12684
- render: function render(price) {
12685
- return price || price === 0 ? Number(price).toFixed(2) : '';
12686
- }
12983
+ return {
12984
+ total: total,
12985
+ list: newProducts
12986
+ };
12987
+ });
12988
+ };
12989
+ var searchFormData = [{
12990
+ label: '商品名称',
12991
+ name: 'goodName'
12687
12992
  }, {
12688
- dataIndex: 'costPrice',
12689
- title: "\u6210\u672C\u4EF7",
12690
- ellipsis: true,
12691
- width: 100,
12692
- render: function render(price) {
12693
- return price || price === 0 ? Number(price).toFixed(2) : '';
12694
- }
12993
+ label: '商品编码',
12994
+ name: 'goodNo'
12695
12995
  }, {
12696
- dataIndex: 'skuType',
12697
- title: "\u5546\u54C1\u7C7B\u578B",
12698
- ellipsis: true,
12699
- width: 100,
12700
- render: function render() {
12701
- var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
12702
- return {
12703
- 'combine': '组合装商品',
12704
- 'normal': '普通商品'
12705
- }[type] || type;
12706
- }
12996
+ label: '款式编码',
12997
+ name: 'styleCode'
12707
12998
  }];
12708
12999
  var GoodList$1 = function GoodList(props, ref) {
12709
13000
  var _useState = useState([]),
@@ -12714,6 +13005,11 @@ var GoodList$1 = function GoodList(props, ref) {
12714
13005
  _useState4 = _slicedToArray(_useState3, 2),
12715
13006
  selectIds = _useState4[0],
12716
13007
  setSelectIds = _useState4[1];
13008
+ var _useGetColumns = useGetColumns('jst'),
13009
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13010
+ columns = _useGetColumns2[0],
13011
+ showColumnsDataIndexList = _useGetColumns2[1],
13012
+ loading = _useGetColumns2[2];
12717
13013
  useImperativeHandle(ref, function () {
12718
13014
  return {
12719
13015
  getSelectGoodList: function getSelectGoodList() {
@@ -12733,55 +13029,6 @@ var GoodList$1 = function GoodList(props, ref) {
12733
13029
  params = _useAntdTable.params;
12734
13030
  var submit = search.submit,
12735
13031
  reset = search.reset;
12736
- var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12737
- layout: "inline",
12738
- form: form
12739
- }, /*#__PURE__*/React.createElement(Form.Item, {
12740
- name: "goodName",
12741
- style: {
12742
- marginBottom: '12px'
12743
- }
12744
- }, /*#__PURE__*/React.createElement(Input, {
12745
- placeholder: "\u5546\u54C1\u540D\u79F0",
12746
- allowClear: true,
12747
- style: {
12748
- width: 150
12749
- }
12750
- })), /*#__PURE__*/React.createElement(Form.Item, {
12751
- name: "goodNo",
12752
- style: {
12753
- marginBottom: '12px'
12754
- }
12755
- }, /*#__PURE__*/React.createElement(Input, {
12756
- placeholder: "\u5546\u54C1\u7F16\u7801",
12757
- allowClear: true,
12758
- style: {
12759
- width: 150
12760
- }
12761
- })), /*#__PURE__*/React.createElement(Form.Item, {
12762
- name: "styleCode",
12763
- style: {
12764
- marginBottom: '12px'
12765
- }
12766
- }, /*#__PURE__*/React.createElement(Input, {
12767
- placeholder: "\u6B3E\u5F0F\u7F16\u7801",
12768
- allowClear: true,
12769
- style: {
12770
- width: 150
12771
- }
12772
- })), /*#__PURE__*/React.createElement(Form.Item, {
12773
- style: {
12774
- marginBottom: '12px'
12775
- }
12776
- }, /*#__PURE__*/React.createElement(Button, {
12777
- type: "primary",
12778
- style: {
12779
- marginRight: '8px'
12780
- },
12781
- onClick: submit
12782
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12783
- onClick: reset
12784
- }, "\u91CD\u7F6E")));
12785
13032
  var rowSelection = {
12786
13033
  selectedRowKeys: selectIds,
12787
13034
  fixed: true,
@@ -12846,7 +13093,7 @@ var GoodList$1 = function GoodList(props, ref) {
12846
13093
  }
12847
13094
  }, "\u5220\u9664");
12848
13095
  }
12849
- }].concat(takeRight(columns$2, columns$2.length - 1));
13096
+ }].concat(takeRight(columns, columns.length - 1));
12850
13097
  return selectList.length ? /*#__PURE__*/React.createElement("div", {
12851
13098
  style: {
12852
13099
  width: '100%',
@@ -12868,14 +13115,23 @@ var GoodList$1 = function GoodList(props, ref) {
12868
13115
  }
12869
13116
  })) : null;
12870
13117
  };
12871
- return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
13118
+ return /*#__PURE__*/React.createElement(Skeleton, {
13119
+ active: true,
13120
+ loading: loading
13121
+ }, /*#__PURE__*/React.createElement(SearchForm, {
13122
+ searchFormData: searchFormData,
13123
+ form: form,
13124
+ showColumnsDataIndexList: showColumnsDataIndexList,
13125
+ submit: submit,
13126
+ reset: reset
13127
+ }), /*#__PURE__*/React.createElement("div", {
12872
13128
  style: {
12873
13129
  marginTop: '4px'
12874
13130
  }
12875
13131
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12876
13132
  rowSelection: rowSelection,
12877
13133
  rowKey: "goodNo",
12878
- columns: columns$2,
13134
+ columns: columns,
12879
13135
  scroll: {
12880
13136
  x: '100%',
12881
13137
  y: 250
@@ -12920,156 +13176,75 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
12920
13176
  var onOk = function onOk() {
12921
13177
  var _gyGoodsListRef$curre;
12922
13178
  var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12923
- onSubmit(selectedList);
12924
- _onCancel();
12925
- };
12926
- return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12927
- title: '选择商品',
12928
- okText: '确认',
12929
- cancelText: '取消',
12930
- visible: visible,
12931
- width: width || 850,
12932
- onCancel: function onCancel() {
12933
- _onCancel();
12934
- },
12935
- onOk: onOk,
12936
- wrapClassName: "goodModal"
12937
- }, /*#__PURE__*/React.createElement(GyGoodsList, {
12938
- ref: gyGoodsListRef,
12939
- selectedRows: selectedRows
12940
- })));
12941
- };
12942
- var JstGoodsModal = /*#__PURE__*/forwardRef(GyGoodsModal);
12943
-
12944
- var getTableData$2 = function getTableData(_ref, formData) {
12945
- var current = _ref.current,
12946
- pageSize = _ref.pageSize;
12947
- var data = {
12948
- goodShortName: formData.goodShortName || null,
12949
- goodNo: formData.goodNo || null,
12950
- goodName: formData.goodName || null,
12951
- skuCode: formData.skuCode || null,
12952
- skuId: formData.skuId || null
12953
- };
12954
- return extendRequest('/qy/gdfw/product/product/page', {
12955
- method: 'post',
12956
- data: _objectSpread2({
12957
- pageSize: pageSize,
12958
- pageNo: current,
12959
- platform: 'BS_E3_ERP'
12960
- }, data)
12961
- }).then(function (res) {
12962
- var _res$data = res.data,
12963
- _res$data$productSkuL = _res$data.productSkuList,
12964
- productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12965
- _res$data$total = _res$data.total,
12966
- total = _res$data$total === void 0 ? 0 : _res$data$total;
12967
- var newProducts = productSkuList.map(function (item, index) {
12968
- return _objectSpread2(_objectSpread2({}, item), {}, {
12969
- index: index + 1
12970
- });
12971
- });
12972
- return {
12973
- total: total,
12974
- list: newProducts
12975
- };
12976
- });
12977
- };
12978
- var columns$3 = [{
12979
- dataIndex: 'index',
12980
- title: 'NO',
12981
- render: function render(val, record, index) {
12982
- return /*#__PURE__*/React.createElement("div", {
12983
- style: {
12984
- width: 25
12985
- }
12986
- }, index + 1);
12987
- },
12988
- width: 80
12989
- }, {
12990
- dataIndex: 'specNo',
12991
- title: "SKU",
12992
- ellipsis: true,
12993
- width: 200
12994
- }, {
12995
- dataIndex: 'specId',
12996
- title: "SKU ID",
12997
- ellipsis: true,
12998
- width: 80
12999
- }, {
13000
- dataIndex: 'goodName',
13001
- title: "\u5546\u54C1\u540D\u79F0",
13002
- ellipsis: true,
13003
- width: 250
13004
- }, {
13005
- dataIndex: 'goodShortName',
13006
- title: "\u5546\u54C1\u7B80\u79F0",
13007
- ellipsis: true,
13008
- width: 250
13009
- },
13010
- // {
13011
- // dataIndex: 'goodPicUrl',
13012
- // title: `商品图片`,
13013
- // ellipsis: true,
13014
- // width: 100,
13015
- // render: (picUrl: string) => {
13016
- // return (
13017
- // <img
13018
- // style={{
13019
- // width: '40px',
13020
- // height: '40px',
13021
- // objectFit: 'contain',
13022
- // }}
13023
- // src={picUrl}
13024
- // ></img>
13025
- // );
13026
- // },
13027
- // },
13028
- {
13029
- dataIndex: 'goodNo',
13030
- title: "\u8D27\u53F7",
13031
- ellipsis: true,
13032
- width: 150
13033
- }, {
13034
- dataIndex: 'goodId',
13035
- title: "\u8D27\u53F7ID",
13036
- ellipsis: true,
13037
- width: 100
13038
- }, {
13039
- dataIndex: 'colorName',
13040
- title: "\u989C\u8272\u540D\u79F0",
13041
- ellipsis: true,
13042
- width: 100
13043
- }, {
13044
- dataIndex: 'colorCode',
13045
- title: "\u989C\u8272\u4EE3\u7801",
13046
- ellipsis: true,
13047
- width: 100
13048
- }, {
13049
- dataIndex: 'sizeName',
13050
- title: "\u5C3A\u7801\u540D\u79F0",
13051
- ellipsis: true,
13052
- width: 100
13053
- }, {
13054
- dataIndex: 'sizeCode',
13055
- title: "\u5C3A\u7801\u4EE3\u7801",
13056
- ellipsis: true,
13057
- width: 100
13179
+ onSubmit(selectedList);
13180
+ _onCancel();
13181
+ };
13182
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
13183
+ title: '选择商品',
13184
+ okText: '确认',
13185
+ cancelText: '取消',
13186
+ visible: visible,
13187
+ width: width || 850,
13188
+ onCancel: function onCancel() {
13189
+ _onCancel();
13190
+ },
13191
+ onOk: onOk,
13192
+ wrapClassName: "goodModal"
13193
+ }, /*#__PURE__*/React.createElement(GyGoodsList, {
13194
+ ref: gyGoodsListRef,
13195
+ selectedRows: selectedRows
13196
+ })));
13197
+ };
13198
+ var JstGoodsModal = /*#__PURE__*/forwardRef(GyGoodsModal);
13199
+
13200
+ var getTableData$2 = function getTableData(_ref, formData) {
13201
+ var current = _ref.current,
13202
+ pageSize = _ref.pageSize;
13203
+ var data = {
13204
+ goodShortName: formData.goodShortName || null,
13205
+ goodNo: formData.goodNo || null,
13206
+ goodName: formData.goodName || null,
13207
+ skuCode: formData.skuCode || null,
13208
+ skuId: formData.skuId || null
13209
+ };
13210
+ return extendRequest('/qy/gdfw/product/product/page', {
13211
+ method: 'post',
13212
+ data: _objectSpread2({
13213
+ pageSize: pageSize,
13214
+ pageNo: current,
13215
+ platform: 'BS_E3_ERP'
13216
+ }, data)
13217
+ }).then(function (res) {
13218
+ var _res$data = res.data,
13219
+ _res$data$productSkuL = _res$data.productSkuList,
13220
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
13221
+ _res$data$total = _res$data.total,
13222
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
13223
+ var newProducts = productSkuList.map(function (item, index) {
13224
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13225
+ index: index + 1
13226
+ });
13227
+ });
13228
+ return {
13229
+ total: total,
13230
+ list: newProducts
13231
+ };
13232
+ });
13233
+ };
13234
+ var searchFormData$1 = [{
13235
+ label: '商品货号',
13236
+ name: 'goodNo'
13058
13237
  }, {
13059
- dataIndex: 'brandName',
13060
- title: "\u54C1\u724C\u540D\u79F0",
13061
- ellipsis: true,
13062
- width: 100
13238
+ label: '商品名称',
13239
+ name: 'goodName'
13063
13240
  }, {
13064
- dataIndex: 'marketPrice',
13065
- title: "\u5E02\u573A\u4EF7",
13066
- ellipsis: true,
13067
- width: 100
13241
+ label: 'SKU',
13242
+ name: 'skuCode',
13243
+ dataIndex: 'specNo'
13068
13244
  }, {
13069
- dataIndex: 'retailPrice',
13070
- title: "\u552E\u4EF7",
13071
- ellipsis: true,
13072
- width: 100
13245
+ label: 'SKU ID',
13246
+ name: 'skuId',
13247
+ dataIndex: 'specId'
13073
13248
  }];
13074
13249
  var GoodList$2 = function GoodList(props, ref) {
13075
13250
  var _useState = useState([]),
@@ -13080,6 +13255,11 @@ var GoodList$2 = function GoodList(props, ref) {
13080
13255
  _useState4 = _slicedToArray(_useState3, 2),
13081
13256
  selectIds = _useState4[0],
13082
13257
  setSelectIds = _useState4[1];
13258
+ var _useGetColumns = useGetColumns('bse3'),
13259
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13260
+ columns = _useGetColumns2[0],
13261
+ showColumnsDataIndexList = _useGetColumns2[1],
13262
+ loading = _useGetColumns2[2];
13083
13263
  useImperativeHandle(ref, function () {
13084
13264
  return {
13085
13265
  getSelectGoodList: function getSelectGoodList() {
@@ -13099,77 +13279,6 @@ var GoodList$2 = function GoodList(props, ref) {
13099
13279
  params = _useAntdTable.params;
13100
13280
  var submit = search.submit,
13101
13281
  reset = search.reset;
13102
- var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
13103
- layout: "inline",
13104
- form: form
13105
- }, /*#__PURE__*/React.createElement(Form.Item, {
13106
- name: "goodShortName",
13107
- style: {
13108
- marginBottom: '12px'
13109
- }
13110
- }, /*#__PURE__*/React.createElement(Input, {
13111
- placeholder: "\u5546\u54C1\u7B80\u79F0",
13112
- allowClear: true,
13113
- style: {
13114
- width: 150
13115
- }
13116
- })), /*#__PURE__*/React.createElement(Form.Item, {
13117
- name: "goodNo",
13118
- style: {
13119
- marginBottom: '12px'
13120
- }
13121
- }, /*#__PURE__*/React.createElement(Input, {
13122
- placeholder: "\u5546\u54C1\u8D27\u53F7",
13123
- allowClear: true,
13124
- style: {
13125
- width: 150
13126
- }
13127
- })), /*#__PURE__*/React.createElement(Form.Item, {
13128
- name: "goodName",
13129
- style: {
13130
- marginBottom: '12px'
13131
- }
13132
- }, /*#__PURE__*/React.createElement(Input, {
13133
- placeholder: "\u5546\u54C1\u540D\u79F0",
13134
- allowClear: true,
13135
- style: {
13136
- width: 150
13137
- }
13138
- })), /*#__PURE__*/React.createElement(Form.Item, {
13139
- name: "skuCode",
13140
- style: {
13141
- marginBottom: '12px'
13142
- }
13143
- }, /*#__PURE__*/React.createElement(Input, {
13144
- placeholder: "SKU",
13145
- allowClear: true,
13146
- style: {
13147
- width: 150
13148
- }
13149
- })), /*#__PURE__*/React.createElement(Form.Item, {
13150
- name: "skuId",
13151
- style: {
13152
- marginBottom: '12px'
13153
- }
13154
- }, /*#__PURE__*/React.createElement(Input, {
13155
- placeholder: "SKU ID",
13156
- allowClear: true,
13157
- style: {
13158
- width: 150
13159
- }
13160
- })), /*#__PURE__*/React.createElement(Form.Item, {
13161
- style: {
13162
- marginBottom: '12px'
13163
- }
13164
- }, /*#__PURE__*/React.createElement(Button, {
13165
- type: "primary",
13166
- style: {
13167
- marginRight: '8px'
13168
- },
13169
- onClick: submit
13170
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
13171
- onClick: reset
13172
- }, "\u91CD\u7F6E")));
13173
13282
  var rowSelection = {
13174
13283
  selectedRowKeys: selectIds,
13175
13284
  fixed: true,
@@ -13225,7 +13334,7 @@ var GoodList$2 = function GoodList(props, ref) {
13225
13334
  }
13226
13335
  }, "\u5220\u9664");
13227
13336
  }
13228
- }].concat(takeRight(columns$3, columns$3.length - 1));
13337
+ }].concat(takeRight(columns, columns.length - 1));
13229
13338
  return selectList.length ? /*#__PURE__*/React.createElement("div", {
13230
13339
  style: {
13231
13340
  width: '100%',
@@ -13247,14 +13356,23 @@ var GoodList$2 = function GoodList(props, ref) {
13247
13356
  }
13248
13357
  })) : null;
13249
13358
  };
13250
- return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
13359
+ return /*#__PURE__*/React.createElement(Skeleton, {
13360
+ active: true,
13361
+ loading: loading
13362
+ }, /*#__PURE__*/React.createElement(SearchForm, {
13363
+ searchFormData: searchFormData$1,
13364
+ form: form,
13365
+ showColumnsDataIndexList: showColumnsDataIndexList,
13366
+ submit: submit,
13367
+ reset: reset
13368
+ }), /*#__PURE__*/React.createElement("div", {
13251
13369
  style: {
13252
13370
  marginTop: '4px'
13253
13371
  }
13254
13372
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
13255
13373
  rowSelection: rowSelection,
13256
13374
  rowKey: "specNo",
13257
- columns: columns$3,
13375
+ columns: columns,
13258
13376
  scroll: {
13259
13377
  x: '100%',
13260
13378
  y: 250
@@ -13345,71 +13463,23 @@ var getTableData$3 = function getTableData(_ref, formData) {
13345
13463
  };
13346
13464
  });
13347
13465
  };
13348
- var columns$4 = [{
13349
- dataIndex: 'index',
13350
- title: 'NO',
13351
- render: function render(val, record, index) {
13352
- return /*#__PURE__*/React.createElement("div", {
13353
- style: {
13354
- width: 25
13355
- }
13356
- }, index + 1);
13357
- },
13358
- width: 80
13359
- }, {
13360
- dataIndex: 'specName',
13361
- title: 'SKU名称',
13362
- width: 250,
13363
- ellipsis: true
13364
- }, {
13365
- dataIndex: 'specNo',
13366
- title: 'SKU编码',
13367
- width: 200,
13368
- ellipsis: true
13369
- }, {
13370
- dataIndex: 'goodName',
13371
- title: '商品名称',
13372
- width: 250,
13373
- ellipsis: true
13374
- }, {
13375
- dataIndex: 'goodShortName',
13376
- title: "\u5546\u54C1\u7B80\u79F0",
13377
- ellipsis: true,
13378
- width: 250
13379
- }, {
13380
- dataIndex: 'goodNo',
13381
- title: '商品编码',
13382
- width: 200,
13383
- ellipsis: true
13466
+ var searchFormData$2 = [{
13467
+ label: '商品简称',
13468
+ name: 'goodShortName'
13384
13469
  }, {
13385
- dataIndex: 'goodPicUrl',
13386
- title: '商品图片',
13387
- width: 100,
13388
- render: function render(picUrl) {
13389
- return /*#__PURE__*/React.createElement("img", {
13390
- style: {
13391
- width: '40px',
13392
- height: '40px',
13393
- objectFit: 'contain'
13394
- },
13395
- src: picUrl
13396
- });
13397
- }
13470
+ label: '商品简称',
13471
+ name: 'skuName',
13472
+ dataIndex: 'specName'
13398
13473
  }, {
13399
- dataIndex: 'brandName',
13400
- title: '品牌名称',
13401
- width: 200,
13402
- ellipsis: true
13474
+ label: '商品sku编码',
13475
+ name: 'skuCode',
13476
+ dataIndex: 'specNo'
13403
13477
  }, {
13404
- dataIndex: 'retailPrice',
13405
- title: "\u6807\u51C6\u552E\u4EF7",
13406
- ellipsis: true,
13407
- width: 100
13478
+ label: '商品名称',
13479
+ name: 'goodName'
13408
13480
  }, {
13409
- dataIndex: 'costPrice',
13410
- title: "\u6210\u672C\u4EF7",
13411
- ellipsis: true,
13412
- width: 100
13481
+ label: '商品编码',
13482
+ name: 'goodNo'
13413
13483
  }];
13414
13484
  var GoodList$3 = function GoodList(props, ref) {
13415
13485
  var _useState = useState([]),
@@ -13420,6 +13490,11 @@ var GoodList$3 = function GoodList(props, ref) {
13420
13490
  _useState4 = _slicedToArray(_useState3, 2),
13421
13491
  selectIds = _useState4[0],
13422
13492
  setSelectIds = _useState4[1];
13493
+ var _useGetColumns = useGetColumns('gy'),
13494
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13495
+ columns = _useGetColumns2[0],
13496
+ showColumnsDataIndexList = _useGetColumns2[1],
13497
+ loading = _useGetColumns2[2];
13423
13498
  useImperativeHandle(ref, function () {
13424
13499
  return {
13425
13500
  getSelectGoodList: function getSelectGoodList() {
@@ -13439,77 +13514,6 @@ var GoodList$3 = function GoodList(props, ref) {
13439
13514
  params = _useAntdTable.params;
13440
13515
  var submit = search.submit,
13441
13516
  reset = search.reset;
13442
- var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
13443
- layout: "inline",
13444
- form: form
13445
- }, /*#__PURE__*/React.createElement(Form.Item, {
13446
- name: "goodShortName",
13447
- style: {
13448
- marginBottom: '12px'
13449
- }
13450
- }, /*#__PURE__*/React.createElement(Input, {
13451
- placeholder: "\u5546\u54C1\u7B80\u79F0",
13452
- allowClear: true,
13453
- style: {
13454
- width: 150
13455
- }
13456
- })), /*#__PURE__*/React.createElement(Form.Item, {
13457
- name: "skuName",
13458
- style: {
13459
- marginBottom: '12px'
13460
- }
13461
- }, /*#__PURE__*/React.createElement(Input, {
13462
- placeholder: "\u5546\u54C1sku\u540D\u79F0",
13463
- allowClear: true,
13464
- style: {
13465
- width: 150
13466
- }
13467
- })), /*#__PURE__*/React.createElement(Form.Item, {
13468
- name: "skuCode",
13469
- style: {
13470
- marginBottom: '12px'
13471
- }
13472
- }, /*#__PURE__*/React.createElement(Input, {
13473
- placeholder: "\u5546\u54C1sku\u7F16\u7801",
13474
- allowClear: true,
13475
- style: {
13476
- width: 150
13477
- }
13478
- })), /*#__PURE__*/React.createElement(Form.Item, {
13479
- name: "goodName",
13480
- style: {
13481
- marginBottom: '12px'
13482
- }
13483
- }, /*#__PURE__*/React.createElement(Input, {
13484
- placeholder: "\u5546\u54C1\u540D\u79F0",
13485
- allowClear: true,
13486
- style: {
13487
- width: 150
13488
- }
13489
- })), /*#__PURE__*/React.createElement(Form.Item, {
13490
- name: "goodNo",
13491
- style: {
13492
- marginBottom: '12px'
13493
- }
13494
- }, /*#__PURE__*/React.createElement(Input, {
13495
- placeholder: "\u5546\u54C1\u7F16\u7801",
13496
- allowClear: true,
13497
- style: {
13498
- width: 150
13499
- }
13500
- })), /*#__PURE__*/React.createElement(Form.Item, {
13501
- style: {
13502
- marginBottom: '12px'
13503
- }
13504
- }, /*#__PURE__*/React.createElement(Button, {
13505
- type: "primary",
13506
- style: {
13507
- marginRight: '8px'
13508
- },
13509
- onClick: submit
13510
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
13511
- onClick: reset
13512
- }, "\u91CD\u7F6E")));
13513
13517
  var rowSelection = {
13514
13518
  selectedRowKeys: selectIds,
13515
13519
  fixed: true,
@@ -13565,7 +13569,7 @@ var GoodList$3 = function GoodList(props, ref) {
13565
13569
  }
13566
13570
  }, "\u5220\u9664");
13567
13571
  }
13568
- }].concat(takeRight(columns$4, columns$4.length - 1));
13572
+ }].concat(takeRight(columns, columns.length - 1));
13569
13573
  return selectList.length ? /*#__PURE__*/React.createElement("div", {
13570
13574
  style: {
13571
13575
  width: '100%',
@@ -13587,14 +13591,23 @@ var GoodList$3 = function GoodList(props, ref) {
13587
13591
  }
13588
13592
  })) : null;
13589
13593
  };
13590
- return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
13594
+ return /*#__PURE__*/React.createElement(Skeleton, {
13595
+ active: true,
13596
+ loading: loading
13597
+ }, /*#__PURE__*/React.createElement(SearchForm, {
13598
+ searchFormData: searchFormData$2,
13599
+ form: form,
13600
+ showColumnsDataIndexList: showColumnsDataIndexList,
13601
+ submit: submit,
13602
+ reset: reset
13603
+ }), /*#__PURE__*/React.createElement("div", {
13591
13604
  style: {
13592
13605
  marginTop: '4px'
13593
13606
  }
13594
13607
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
13595
13608
  rowSelection: rowSelection,
13596
13609
  rowKey: "id",
13597
- columns: columns$4,
13610
+ columns: columns,
13598
13611
  scroll: {
13599
13612
  x: '100%',
13600
13613
  y: 250
@@ -14074,7 +14087,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
14074
14087
  var disabled = _ref2.disabled,
14075
14088
  updateHandle = _ref2.updateHandle,
14076
14089
  operate = _ref2.operate;
14077
- return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
14090
+ return getColumnsMap$1()['WDT_REISSUE_GOODS'].map(function (item) {
14078
14091
  var newItem = _objectSpread2({
14079
14092
  align: 'center',
14080
14093
  ellipsis: true
@@ -15597,7 +15610,7 @@ var getColumns$6 = function getColumns(_ref) {
15597
15610
  };
15598
15611
  };
15599
15612
 
15600
- var getColumnsMap = function getColumnsMap(args) {
15613
+ var getColumnsMap$1 = function getColumnsMap(args) {
15601
15614
  var _ref = args || {},
15602
15615
  _ref$text = _ref.text,
15603
15616
  text = _ref$text === void 0 ? '' : _ref$text,
@@ -15637,8 +15650,8 @@ var getColumnsMap = function getColumnsMap(args) {
15637
15650
  })['default']
15638
15651
  });
15639
15652
  };
15640
- var getColumnsBaseInfo = function getColumnsBaseInfo() {
15641
- var clone_columnsMap = cloneDeep(getColumnsMap());
15653
+ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15654
+ var clone_columnsMap = cloneDeep(getColumnsMap$1());
15642
15655
  var newColumns = {};
15643
15656
  Object.keys(clone_columnsMap).forEach(function (key) {
15644
15657
  newColumns[key] = clone_columnsMap[key].map(function (col) {
@@ -15650,7 +15663,7 @@ var getColumnsBaseInfo = function getColumnsBaseInfo() {
15650
15663
  });
15651
15664
  return newColumns;
15652
15665
  };
15653
- var columnsBaseInfoMap = getColumnsBaseInfo();
15666
+ var columnsBaseInfoMap = getColumnsBaseInfo$1();
15654
15667
 
15655
15668
  var renderFieldMap$1 = {
15656
15669
  goodsNumber: function goodsNumber(_ref) {
@@ -15717,7 +15730,7 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
15717
15730
  var disabled = _ref4.disabled,
15718
15731
  updateHandle = _ref4.updateHandle,
15719
15732
  operate = _ref4.operate;
15720
- return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
15733
+ return getColumnsMap$1()['BS_E3_REISSUE_GOODS'].map(function (item) {
15721
15734
  var newItem = _objectSpread2({
15722
15735
  align: 'center',
15723
15736
  ellipsis: true
@@ -15976,7 +15989,7 @@ var GoodItem$1 = function GoodItem(props) {
15976
15989
  case 'GY_REISSUE_GOODS':
15977
15990
  case 'GY_RETURN_GOODS':
15978
15991
  {
15979
- columns = getColumnsMap({
15992
+ columns = getColumnsMap$1({
15980
15993
  text: text,
15981
15994
  disabled: disabled || columnsOptions.disabled,
15982
15995
  updateHandle: updateHandle,
@@ -16003,7 +16016,7 @@ var GoodItem$1 = function GoodItem(props) {
16003
16016
  }
16004
16017
  break;
16005
16018
  default:
16006
- columns = getColumnsMap({
16019
+ columns = getColumnsMap$1({
16007
16020
  text: text,
16008
16021
  disabled: disabled || columnsOptions.disabled,
16009
16022
  updateHandle: updateHandle,
@@ -17140,7 +17153,7 @@ var rowKeyMap = {
17140
17153
  GY_SYSTEM_ORDER: 'billNo',
17141
17154
  JST_SYSTEM_ORDER: 'oId'
17142
17155
  };
17143
- var index$2 = (function (props) {
17156
+ var index$3 = (function (props) {
17144
17157
  var value = props.value,
17145
17158
  _onChange = props.onChange,
17146
17159
  disabled = props.disabled,
@@ -19145,7 +19158,7 @@ var Goods$1 = function Goods(props, ref) {
19145
19158
  userNick: userNick
19146
19159
  }));
19147
19160
  };
19148
- var index$3 = /*#__PURE__*/forwardRef(Goods$1);
19161
+ var index$4 = /*#__PURE__*/forwardRef(Goods$1);
19149
19162
 
19150
19163
  var _excluded$k = ["onChange", "value", "failValue"];
19151
19164
  function CommonStatus(props) {
@@ -20243,4 +20256,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
20243
20256
  })));
20244
20257
  };
20245
20258
 
20246
- 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, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, getColumns$5 as getJstColumns, getColumns$3 as getWlnColumns };
20259
+ 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, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, index$2 as erpModalColumnsMap, getColumns$5 as getJstColumns, getColumns$3 as getWlnColumns };