@bit-sun/business-component 4.2.1-alpha.1-aiwei → 4.2.1-alpha.10-aiwei

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
@@ -2,7 +2,7 @@ import axios from 'axios';
2
2
  import request$1 from 'umi-request';
3
3
  import cookie from 'js-cookie';
4
4
  import { message as message$1, Tooltip, Image, Popover, Card, Avatar, Badge, Menu, Input, InputNumber, Space, Button, Dropdown, Upload, Checkbox, Modal, ConfigProvider, Tag, Select, Spin, Form, Table, Empty, Row, Col, Tabs, TreeSelect, DatePicker, Typography, Alert, Breadcrumb, Drawer as Drawer$1, List, Radio, Tree, Result, Affix, Cascader, TimePicker, Divider, Switch, Collapse } from 'antd';
5
- import _, { omit, uniqBy, escapeRegExp, isNil, isBoolean, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
5
+ import _, { omit, uniqBy, escapeRegExp, isNil, trim, isBoolean, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
6
6
  import memoizeOne from 'memoize-one';
7
7
  import { formatMessage, history, useLocation, Link, useModel, setLocale, useIntl, request as request$3 } from 'umi';
8
8
  import isEqual from 'lodash/isEqual';
@@ -5323,7 +5323,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
5323
5323
  viewShowValueStr = _ref.viewShowValueStr,
5324
5324
  searchStartLength = _ref.searchStartLength,
5325
5325
  _ref$isQuery = _ref.isQuery,
5326
- isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery;
5326
+ isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
5327
+ _ref$requireSearchCon = _ref.requireSearchCondition,
5328
+ requireSearchCondition = _ref$requireSearchCon === void 0 ? false : _ref$requireSearchCon;
5327
5329
  var requestConfig = _objectSpread2({
5328
5330
  url: url,
5329
5331
  method: method,
@@ -5886,6 +5888,16 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
5886
5888
  };
5887
5889
  var onSearchTable = function onSearchTable() {
5888
5890
  var params = form.getFieldsValue();
5891
+ // 必须选择一个值
5892
+ if (requireSearchCondition) {
5893
+ var hasValidValue = Object.values(params).some(function (value) {
5894
+ return Array.isArray(value) && value.length > 0 || typeof value === 'string' && value.trim().length > 0;
5895
+ });
5896
+ if (!hasValidValue) {
5897
+ message$1.warning('请至少选择一个搜索条件');
5898
+ return;
5899
+ }
5900
+ }
5889
5901
  setModalSearched(true);
5890
5902
  setTableFormParams(params);
5891
5903
  getData(_objectSpread2(_objectSpread2({}, params), {}, {
@@ -6180,7 +6192,26 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
6180
6192
  });
6181
6193
  };
6182
6194
  var renderShowTable = function renderShowTable(tableList, type) {
6183
- var tableBoxHeighth = getTableHeigth(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm);
6195
+ var _modalTableProps$tabl;
6196
+ var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
6197
+ var canExpand = hasMoreQueryFields(modalTableProps);
6198
+ var collapsedList = modalTableProps === null || modalTableProps === void 0 ? void 0 : (_modalTableProps$tabl = modalTableProps.tableSearchForm) === null || _modalTableProps$tabl === void 0 ? void 0 : _modalTableProps$tabl.slice(0, viCount);
6199
+ var baseHeight = getTableHeigth(collapsedList);
6200
+ var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
6201
+ var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
6202
+ var rowsExpanded = rowsExpandedData.totalRows;
6203
+ var isMoreAction = false;
6204
+ if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
6205
+ rowsExpanded++;
6206
+ isMoreAction = true;
6207
+ }
6208
+ var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
6209
+ var tableBoxHeighth = baseHeight;
6210
+ if (isMoreAction && extraRows > 0) {
6211
+ tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
6212
+ } else {
6213
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34;
6214
+ }
6184
6215
  var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
6185
6216
  var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
6186
6217
  var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
@@ -10455,7 +10486,7 @@ function commonFun(type, prefixUrl, parentProps) {
10455
10486
  }, {
10456
10487
  name: 'qp-zzdlbm-in',
10457
10488
  type: 'select',
10458
- label: '大类',
10489
+ label: '品类',
10459
10490
  field: {
10460
10491
  type: 'select',
10461
10492
  props: {
@@ -10474,7 +10505,7 @@ function commonFun(type, prefixUrl, parentProps) {
10474
10505
  }, {
10475
10506
  name: 'qp-zzzlbm-in',
10476
10507
  type: 'select',
10477
- label: '中类',
10508
+ label: '大类',
10478
10509
  field: {
10479
10510
  type: 'select',
10480
10511
  props: {
@@ -10493,7 +10524,7 @@ function commonFun(type, prefixUrl, parentProps) {
10493
10524
  }, {
10494
10525
  name: 'qp-zzxlbm-in',
10495
10526
  type: 'select',
10496
- label: '小类',
10527
+ label: '中类',
10497
10528
  field: {
10498
10529
  type: 'select',
10499
10530
  props: {
@@ -10583,7 +10614,6 @@ function commonFun(type, prefixUrl, parentProps) {
10583
10614
  tableSearchForm: tableSearchForm,
10584
10615
  isHorizontally: true,
10585
10616
  tableSearchColSpan: 6,
10586
- visibleFieldsCount: 13,
10587
10617
  tableColumns: [{
10588
10618
  title: '序号',
10589
10619
  dataIndex: 'keyIndex',
@@ -11343,14 +11373,25 @@ function commonFun(type, prefixUrl, parentProps) {
11343
11373
  }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
11344
11374
  'qp-status-eq': 1
11345
11375
  }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in'))]).then(function (x) {
11376
+ var _x$, _x$$data$, _x$$data$$channelInfo;
11377
+ debugger;
11378
+ // 战区限制一级数据
11379
+ var newData1 = [];
11380
+ (_x$ = x[0]) === null || _x$ === void 0 ? void 0 : (_x$$data$ = _x$.data[0]) === null || _x$$data$ === void 0 ? void 0 : (_x$$data$$channelInfo = _x$$data$.channelInfoSon) === null || _x$$data$$channelInfo === void 0 ? void 0 : _x$$data$$channelInfo.forEach(function (item) {
11381
+ newData1.push({
11382
+ code: item.code,
11383
+ name: item.name
11384
+ });
11385
+ });
11386
+ x[0].data = newData1;
11346
11387
  var channelDisabledJude = function channelDisabledJude(data) {
11347
11388
  return data['parentCode'] === '0';
11348
11389
  }; // 所属销售渠道 树节点不能点判断
11349
11390
  var areaDisabledJude = function areaDisabledJude(data) {
11350
11391
  return data['parent'] === '0';
11351
11392
  }; // 所属营销区域 树节点不能点判断
11352
- formatTreeDataSource(x, 0, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11353
- formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11393
+ formatTreeDataSource(x, 0, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11394
+ formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11354
11395
  });
11355
11396
  tableSearchForm = [{
11356
11397
  name: 'realWarehouseName*multiInput',
@@ -11365,17 +11406,9 @@ function commonFun(type, prefixUrl, parentProps) {
11365
11406
  type: 'select',
11366
11407
  label: '逻辑仓类型',
11367
11408
  initialSource: getDictionarySource$1('SC00004')
11368
- }, {
11369
- name: 'belongArea',
11370
- field: {
11371
- type: 'select',
11372
- props: {
11373
- mode: 'multiple'
11374
- }
11375
- },
11376
- label: '管理大区',
11377
- initialSource: getDictionarySource$1('BUSINESS_belongArea')
11378
- }, {
11409
+ },
11410
+ // { name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
11411
+ {
11379
11412
  name: 'qp-channelCode-in',
11380
11413
  type: 'treeSelect',
11381
11414
  label: '战区',
@@ -11476,7 +11509,7 @@ function commonFun(type, prefixUrl, parentProps) {
11476
11509
  },
11477
11510
  width: 100
11478
11511
  }, {
11479
- title: '所属销售渠道',
11512
+ title: '战区',
11480
11513
  dataIndex: 'channelName',
11481
11514
  defaultSort: 4,
11482
11515
  width: 100
@@ -11557,11 +11590,11 @@ function commonFun(type, prefixUrl, parentProps) {
11557
11590
  }
11558
11591
  }
11559
11592
  }, {
11560
- name: 'qp-channelCode-in',
11561
- type: 'treeSelect',
11562
- label: '销售渠道',
11593
+ name: 'qp-operationWarehouseClassification-in',
11594
+ type: 'select',
11595
+ label: '分类',
11563
11596
  field: {
11564
- type: 'treeSelect',
11597
+ type: 'select',
11565
11598
  props: {
11566
11599
  multiple: true,
11567
11600
  treeData: [],
@@ -11577,7 +11610,8 @@ function commonFun(type, prefixUrl, parentProps) {
11577
11610
  },
11578
11611
  showCheckedStrategy: 'TreeSelect.SHOW_ALL'
11579
11612
  }
11580
- }
11613
+ },
11614
+ initialSource: getDictionarySource$1('BASIC_OPS_WH_TYPE')
11581
11615
  }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
11582
11616
  name: 'qp-status-eq',
11583
11617
  type: 'select',
@@ -11595,11 +11629,16 @@ function commonFun(type, prefixUrl, parentProps) {
11595
11629
  'qp-isMain-eq': 1,
11596
11630
  'qp-type-in': '1,2'
11597
11631
  }, getQueryHeadersItem(_queryHeaderParams8, 'qp-orgCode-in'))]).then(function (x) {
11632
+ var _x$2, _x$2$data$, _x$2$data$$channelInf;
11598
11633
  formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
11599
- var channelDisabledJude = function channelDisabledJude(data) {
11600
- return data['parentCode'] === '0';
11601
- }; // 所属销售渠道 树节点不能点判断
11602
- formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11634
+ var newData1 = [];
11635
+ (_x$2 = x[1]) === null || _x$2 === void 0 ? void 0 : (_x$2$data$ = _x$2.data[0]) === null || _x$2$data$ === void 0 ? void 0 : (_x$2$data$$channelInf = _x$2$data$.channelInfoSon) === null || _x$2$data$$channelInf === void 0 ? void 0 : _x$2$data$$channelInf.forEach(function (item) {
11636
+ newData1.push({
11637
+ code: item.code,
11638
+ name: item.name
11639
+ });
11640
+ });
11641
+ x[1].data = newData1;
11603
11642
  });
11604
11643
  modalTableProps = _objectSpread2({
11605
11644
  modalTableTitle: '选择运营仓',
@@ -11871,18 +11910,18 @@ function commonFun(type, prefixUrl, parentProps) {
11871
11910
  name: 'qp-code-like',
11872
11911
  label: '客户编码'
11873
11912
  }, {
11874
- name: 'qp-createOrgCode-eq',
11913
+ name: 'qp-createOrgCode-in',
11875
11914
  type: 'select',
11876
11915
  label: '创建组织',
11877
11916
  field: {
11878
11917
  type: 'select',
11879
11918
  props: {
11880
- // mode: 'multiple',
11919
+ mode: 'multiple',
11881
11920
  notFoundContent: '暂无数据',
11882
11921
  allowClear: true,
11883
11922
  showSearch: true,
11884
11923
  showArrow: true,
11885
- // maxTagCount: 1,
11924
+ maxTagCount: 1,
11886
11925
  optionFilterProp: 'children',
11887
11926
  filterOption: function filterOption(input, option) {
11888
11927
  return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
@@ -12360,24 +12399,100 @@ function commonFun(type, prefixUrl, parentProps) {
12360
12399
  }
12361
12400
  }, {
12362
12401
  name: 'qp-manageSupervisor-like',
12402
+ type: 'select',
12363
12403
  label: '管理督导',
12364
- type: 'input'
12404
+ field: {
12405
+ type: 'select',
12406
+ props: {
12407
+ notFoundContent: '暂无数据',
12408
+ allowClear: true,
12409
+ showSearch: true,
12410
+ showArrow: true,
12411
+ maxTagCount: 1,
12412
+ optionFilterProp: 'children',
12413
+ filterOption: function filterOption(input, option) {
12414
+ var _option$value;
12415
+ debugger;
12416
+ return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12417
+ }
12418
+ }
12419
+ }
12365
12420
  }, {
12366
12421
  name: 'qp-directSupervisor-like',
12422
+ type: 'select',
12367
12423
  label: '直接督导',
12368
- type: 'input'
12424
+ field: {
12425
+ type: 'select',
12426
+ props: {
12427
+ notFoundContent: '暂无数据',
12428
+ allowClear: true,
12429
+ showSearch: true,
12430
+ showArrow: true,
12431
+ maxTagCount: 1,
12432
+ optionFilterProp: 'children',
12433
+ filterOption: function filterOption(input, option) {
12434
+ var _option$value2;
12435
+ return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
12436
+ }
12437
+ }
12438
+ }
12369
12439
  }, {
12370
12440
  name: 'qp-distributionItem-like',
12441
+ type: 'select',
12371
12442
  label: '分销商品',
12372
- type: 'input'
12443
+ field: {
12444
+ type: 'select',
12445
+ props: {
12446
+ notFoundContent: '暂无数据',
12447
+ allowClear: true,
12448
+ showSearch: true,
12449
+ showArrow: true,
12450
+ maxTagCount: 1,
12451
+ optionFilterProp: 'children',
12452
+ filterOption: function filterOption(input, option) {
12453
+ var _option$value3;
12454
+ return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
12455
+ }
12456
+ }
12457
+ }
12373
12458
  }, {
12374
12459
  name: 'qp-headItem-like',
12460
+ type: 'select',
12375
12461
  label: '总部商品',
12376
- type: 'input'
12462
+ field: {
12463
+ type: 'select',
12464
+ props: {
12465
+ notFoundContent: '暂无数据',
12466
+ allowClear: true,
12467
+ showSearch: true,
12468
+ showArrow: true,
12469
+ maxTagCount: 1,
12470
+ optionFilterProp: 'children',
12471
+ filterOption: function filterOption(input, option) {
12472
+ var _option$value4;
12473
+ return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
12474
+ }
12475
+ }
12476
+ }
12377
12477
  }, {
12378
12478
  name: 'qp-storeChannelName-like',
12479
+ type: 'select',
12379
12480
  label: '管理模式',
12380
- type: 'input'
12481
+ field: {
12482
+ type: 'select',
12483
+ props: {
12484
+ notFoundContent: '暂无数据',
12485
+ allowClear: true,
12486
+ showSearch: true,
12487
+ showArrow: true,
12488
+ maxTagCount: 1,
12489
+ optionFilterProp: 'children',
12490
+ filterOption: function filterOption(input, option) {
12491
+ var _option$value5;
12492
+ return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
12493
+ }
12494
+ }
12495
+ }
12381
12496
  }];
12382
12497
  var _queryHeaderParams10 = getQueryHeadersList({
12383
12498
  querySelectHeadersList: querySelectHeadersList,
@@ -12397,7 +12512,18 @@ function commonFun(type, prefixUrl, parentProps) {
12397
12512
  pageSize: 5000,
12398
12513
  currentPage: 1,
12399
12514
  'ctl-withAuth': true
12400
- }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
12515
+ }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, {
12516
+ headers: _objectSpread2({}, extralHeaders)
12517
+ })]).then(function (x) {
12518
+ var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
12519
+ var newData1 = [];
12520
+ (_x$3 = x[1]) === null || _x$3 === void 0 ? void 0 : (_x$3$data$ = _x$3.data[0]) === null || _x$3$data$ === void 0 ? void 0 : (_x$3$data$$channelInf = _x$3$data$.channelInfoSon) === null || _x$3$data$$channelInf === void 0 ? void 0 : _x$3$data$$channelInf.forEach(function (item) {
12521
+ newData1.push({
12522
+ code: item.code,
12523
+ name: item.name
12524
+ });
12525
+ });
12526
+ x[1].data = newData1;
12401
12527
  var channelDisabledJude = function channelDisabledJude(data) {
12402
12528
  return data['parentCode'] === '0';
12403
12529
  }; // 所属销售渠道 树节点不能点判断
@@ -12408,6 +12534,46 @@ function commonFun(type, prefixUrl, parentProps) {
12408
12534
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12409
12535
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12410
12536
  formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
12537
+ var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
12538
+ // 新增label属性
12539
+ (_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
12540
+ r.label = r === null || r === void 0 ? void 0 : r.value;
12541
+ });
12542
+ var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
12543
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
12544
+ opList = opList[0];
12545
+ }
12546
+ var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
12547
+ return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12548
+ });
12549
+ var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
12550
+ return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12551
+ });
12552
+ var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12553
+ return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12554
+ });
12555
+ debugger;
12556
+ var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12557
+ return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12558
+ });
12559
+ var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
12560
+ return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && trim(r === null || r === void 0 ? void 0 : r.value);
12561
+ });
12562
+ tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
12563
+ initialSource: m1
12564
+ });
12565
+ tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
12566
+ initialSource: m2
12567
+ });
12568
+ tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
12569
+ initialSource: m3
12570
+ });
12571
+ tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
12572
+ initialSource: m4
12573
+ });
12574
+ tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
12575
+ initialSource: m5
12576
+ });
12411
12577
  });
12412
12578
  modalTableProps = _objectSpread2({
12413
12579
  modalTableTitle: '选择商店',
package/dist/index.js CHANGED
@@ -5346,7 +5346,9 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
5346
5346
  viewShowValueStr = _ref.viewShowValueStr,
5347
5347
  searchStartLength = _ref.searchStartLength,
5348
5348
  _ref$isQuery = _ref.isQuery,
5349
- isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery;
5349
+ isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
5350
+ _ref$requireSearchCon = _ref.requireSearchCondition,
5351
+ requireSearchCondition = _ref$requireSearchCon === void 0 ? false : _ref$requireSearchCon;
5350
5352
  var requestConfig = _objectSpread2({
5351
5353
  url: url,
5352
5354
  method: method,
@@ -5909,6 +5911,16 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
5909
5911
  };
5910
5912
  var onSearchTable = function onSearchTable() {
5911
5913
  var params = form.getFieldsValue();
5914
+ // 必须选择一个值
5915
+ if (requireSearchCondition) {
5916
+ var hasValidValue = Object.values(params).some(function (value) {
5917
+ return Array.isArray(value) && value.length > 0 || typeof value === 'string' && value.trim().length > 0;
5918
+ });
5919
+ if (!hasValidValue) {
5920
+ antd.message.warning('请至少选择一个搜索条件');
5921
+ return;
5922
+ }
5923
+ }
5912
5924
  setModalSearched(true);
5913
5925
  setTableFormParams(params);
5914
5926
  getData(_objectSpread2(_objectSpread2({}, params), {}, {
@@ -6203,7 +6215,26 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
6203
6215
  });
6204
6216
  };
6205
6217
  var renderShowTable = function renderShowTable(tableList, type) {
6206
- var tableBoxHeighth = getTableHeigth(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm);
6218
+ var _modalTableProps$tabl;
6219
+ var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
6220
+ var canExpand = hasMoreQueryFields(modalTableProps);
6221
+ var collapsedList = modalTableProps === null || modalTableProps === void 0 ? void 0 : (_modalTableProps$tabl = modalTableProps.tableSearchForm) === null || _modalTableProps$tabl === void 0 ? void 0 : _modalTableProps$tabl.slice(0, viCount);
6222
+ var baseHeight = getTableHeigth(collapsedList);
6223
+ var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
6224
+ var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
6225
+ var rowsExpanded = rowsExpandedData.totalRows;
6226
+ var isMoreAction = false;
6227
+ if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
6228
+ rowsExpanded++;
6229
+ isMoreAction = true;
6230
+ }
6231
+ var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
6232
+ var tableBoxHeighth = baseHeight;
6233
+ if (isMoreAction && extraRows > 0) {
6234
+ tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
6235
+ } else {
6236
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34;
6237
+ }
6207
6238
  var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
6208
6239
  var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
6209
6240
  var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
@@ -10478,7 +10509,7 @@ function commonFun(type, prefixUrl, parentProps) {
10478
10509
  }, {
10479
10510
  name: 'qp-zzdlbm-in',
10480
10511
  type: 'select',
10481
- label: '大类',
10512
+ label: '品类',
10482
10513
  field: {
10483
10514
  type: 'select',
10484
10515
  props: {
@@ -10497,7 +10528,7 @@ function commonFun(type, prefixUrl, parentProps) {
10497
10528
  }, {
10498
10529
  name: 'qp-zzzlbm-in',
10499
10530
  type: 'select',
10500
- label: '中类',
10531
+ label: '大类',
10501
10532
  field: {
10502
10533
  type: 'select',
10503
10534
  props: {
@@ -10516,7 +10547,7 @@ function commonFun(type, prefixUrl, parentProps) {
10516
10547
  }, {
10517
10548
  name: 'qp-zzxlbm-in',
10518
10549
  type: 'select',
10519
- label: '小类',
10550
+ label: '中类',
10520
10551
  field: {
10521
10552
  type: 'select',
10522
10553
  props: {
@@ -10606,7 +10637,6 @@ function commonFun(type, prefixUrl, parentProps) {
10606
10637
  tableSearchForm: tableSearchForm,
10607
10638
  isHorizontally: true,
10608
10639
  tableSearchColSpan: 6,
10609
- visibleFieldsCount: 13,
10610
10640
  tableColumns: [{
10611
10641
  title: '序号',
10612
10642
  dataIndex: 'keyIndex',
@@ -11366,14 +11396,25 @@ function commonFun(type, prefixUrl, parentProps) {
11366
11396
  }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
11367
11397
  'qp-status-eq': 1
11368
11398
  }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in'))]).then(function (x) {
11399
+ var _x$, _x$$data$, _x$$data$$channelInfo;
11400
+ debugger;
11401
+ // 战区限制一级数据
11402
+ var newData1 = [];
11403
+ (_x$ = x[0]) === null || _x$ === void 0 ? void 0 : (_x$$data$ = _x$.data[0]) === null || _x$$data$ === void 0 ? void 0 : (_x$$data$$channelInfo = _x$$data$.channelInfoSon) === null || _x$$data$$channelInfo === void 0 ? void 0 : _x$$data$$channelInfo.forEach(function (item) {
11404
+ newData1.push({
11405
+ code: item.code,
11406
+ name: item.name
11407
+ });
11408
+ });
11409
+ x[0].data = newData1;
11369
11410
  var channelDisabledJude = function channelDisabledJude(data) {
11370
11411
  return data['parentCode'] === '0';
11371
11412
  }; // 所属销售渠道 树节点不能点判断
11372
11413
  var areaDisabledJude = function areaDisabledJude(data) {
11373
11414
  return data['parent'] === '0';
11374
11415
  }; // 所属营销区域 树节点不能点判断
11375
- formatTreeDataSource(x, 0, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11376
- formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11416
+ formatTreeDataSource(x, 0, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11417
+ formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11377
11418
  });
11378
11419
  tableSearchForm = [{
11379
11420
  name: 'realWarehouseName*multiInput',
@@ -11388,17 +11429,9 @@ function commonFun(type, prefixUrl, parentProps) {
11388
11429
  type: 'select',
11389
11430
  label: '逻辑仓类型',
11390
11431
  initialSource: getDictionarySource$1('SC00004')
11391
- }, {
11392
- name: 'belongArea',
11393
- field: {
11394
- type: 'select',
11395
- props: {
11396
- mode: 'multiple'
11397
- }
11398
- },
11399
- label: '管理大区',
11400
- initialSource: getDictionarySource$1('BUSINESS_belongArea')
11401
- }, {
11432
+ },
11433
+ // { name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
11434
+ {
11402
11435
  name: 'qp-channelCode-in',
11403
11436
  type: 'treeSelect',
11404
11437
  label: '战区',
@@ -11499,7 +11532,7 @@ function commonFun(type, prefixUrl, parentProps) {
11499
11532
  },
11500
11533
  width: 100
11501
11534
  }, {
11502
- title: '所属销售渠道',
11535
+ title: '战区',
11503
11536
  dataIndex: 'channelName',
11504
11537
  defaultSort: 4,
11505
11538
  width: 100
@@ -11580,11 +11613,11 @@ function commonFun(type, prefixUrl, parentProps) {
11580
11613
  }
11581
11614
  }
11582
11615
  }, {
11583
- name: 'qp-channelCode-in',
11584
- type: 'treeSelect',
11585
- label: '销售渠道',
11616
+ name: 'qp-operationWarehouseClassification-in',
11617
+ type: 'select',
11618
+ label: '分类',
11586
11619
  field: {
11587
- type: 'treeSelect',
11620
+ type: 'select',
11588
11621
  props: {
11589
11622
  multiple: true,
11590
11623
  treeData: [],
@@ -11600,7 +11633,8 @@ function commonFun(type, prefixUrl, parentProps) {
11600
11633
  },
11601
11634
  showCheckedStrategy: 'TreeSelect.SHOW_ALL'
11602
11635
  }
11603
- }
11636
+ },
11637
+ initialSource: getDictionarySource$1('BASIC_OPS_WH_TYPE')
11604
11638
  }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
11605
11639
  name: 'qp-status-eq',
11606
11640
  type: 'select',
@@ -11618,11 +11652,16 @@ function commonFun(type, prefixUrl, parentProps) {
11618
11652
  'qp-isMain-eq': 1,
11619
11653
  'qp-type-in': '1,2'
11620
11654
  }, getQueryHeadersItem(_queryHeaderParams8, 'qp-orgCode-in'))]).then(function (x) {
11655
+ var _x$2, _x$2$data$, _x$2$data$$channelInf;
11621
11656
  formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
11622
- var channelDisabledJude = function channelDisabledJude(data) {
11623
- return data['parentCode'] === '0';
11624
- }; // 所属销售渠道 树节点不能点判断
11625
- formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11657
+ var newData1 = [];
11658
+ (_x$2 = x[1]) === null || _x$2 === void 0 ? void 0 : (_x$2$data$ = _x$2.data[0]) === null || _x$2$data$ === void 0 ? void 0 : (_x$2$data$$channelInf = _x$2$data$.channelInfoSon) === null || _x$2$data$$channelInf === void 0 ? void 0 : _x$2$data$$channelInf.forEach(function (item) {
11659
+ newData1.push({
11660
+ code: item.code,
11661
+ name: item.name
11662
+ });
11663
+ });
11664
+ x[1].data = newData1;
11626
11665
  });
11627
11666
  modalTableProps = _objectSpread2({
11628
11667
  modalTableTitle: '选择运营仓',
@@ -11894,18 +11933,18 @@ function commonFun(type, prefixUrl, parentProps) {
11894
11933
  name: 'qp-code-like',
11895
11934
  label: '客户编码'
11896
11935
  }, {
11897
- name: 'qp-createOrgCode-eq',
11936
+ name: 'qp-createOrgCode-in',
11898
11937
  type: 'select',
11899
11938
  label: '创建组织',
11900
11939
  field: {
11901
11940
  type: 'select',
11902
11941
  props: {
11903
- // mode: 'multiple',
11942
+ mode: 'multiple',
11904
11943
  notFoundContent: '暂无数据',
11905
11944
  allowClear: true,
11906
11945
  showSearch: true,
11907
11946
  showArrow: true,
11908
- // maxTagCount: 1,
11947
+ maxTagCount: 1,
11909
11948
  optionFilterProp: 'children',
11910
11949
  filterOption: function filterOption(input, option) {
11911
11950
  return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
@@ -12383,24 +12422,100 @@ function commonFun(type, prefixUrl, parentProps) {
12383
12422
  }
12384
12423
  }, {
12385
12424
  name: 'qp-manageSupervisor-like',
12425
+ type: 'select',
12386
12426
  label: '管理督导',
12387
- type: 'input'
12427
+ field: {
12428
+ type: 'select',
12429
+ props: {
12430
+ notFoundContent: '暂无数据',
12431
+ allowClear: true,
12432
+ showSearch: true,
12433
+ showArrow: true,
12434
+ maxTagCount: 1,
12435
+ optionFilterProp: 'children',
12436
+ filterOption: function filterOption(input, option) {
12437
+ var _option$value;
12438
+ debugger;
12439
+ return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12440
+ }
12441
+ }
12442
+ }
12388
12443
  }, {
12389
12444
  name: 'qp-directSupervisor-like',
12445
+ type: 'select',
12390
12446
  label: '直接督导',
12391
- type: 'input'
12447
+ field: {
12448
+ type: 'select',
12449
+ props: {
12450
+ notFoundContent: '暂无数据',
12451
+ allowClear: true,
12452
+ showSearch: true,
12453
+ showArrow: true,
12454
+ maxTagCount: 1,
12455
+ optionFilterProp: 'children',
12456
+ filterOption: function filterOption(input, option) {
12457
+ var _option$value2;
12458
+ return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
12459
+ }
12460
+ }
12461
+ }
12392
12462
  }, {
12393
12463
  name: 'qp-distributionItem-like',
12464
+ type: 'select',
12394
12465
  label: '分销商品',
12395
- type: 'input'
12466
+ field: {
12467
+ type: 'select',
12468
+ props: {
12469
+ notFoundContent: '暂无数据',
12470
+ allowClear: true,
12471
+ showSearch: true,
12472
+ showArrow: true,
12473
+ maxTagCount: 1,
12474
+ optionFilterProp: 'children',
12475
+ filterOption: function filterOption(input, option) {
12476
+ var _option$value3;
12477
+ return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
12478
+ }
12479
+ }
12480
+ }
12396
12481
  }, {
12397
12482
  name: 'qp-headItem-like',
12483
+ type: 'select',
12398
12484
  label: '总部商品',
12399
- type: 'input'
12485
+ field: {
12486
+ type: 'select',
12487
+ props: {
12488
+ notFoundContent: '暂无数据',
12489
+ allowClear: true,
12490
+ showSearch: true,
12491
+ showArrow: true,
12492
+ maxTagCount: 1,
12493
+ optionFilterProp: 'children',
12494
+ filterOption: function filterOption(input, option) {
12495
+ var _option$value4;
12496
+ return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
12497
+ }
12498
+ }
12499
+ }
12400
12500
  }, {
12401
12501
  name: 'qp-storeChannelName-like',
12502
+ type: 'select',
12402
12503
  label: '管理模式',
12403
- type: 'input'
12504
+ field: {
12505
+ type: 'select',
12506
+ props: {
12507
+ notFoundContent: '暂无数据',
12508
+ allowClear: true,
12509
+ showSearch: true,
12510
+ showArrow: true,
12511
+ maxTagCount: 1,
12512
+ optionFilterProp: 'children',
12513
+ filterOption: function filterOption(input, option) {
12514
+ var _option$value5;
12515
+ return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
12516
+ }
12517
+ }
12518
+ }
12404
12519
  }];
12405
12520
  var _queryHeaderParams10 = getQueryHeadersList({
12406
12521
  querySelectHeadersList: querySelectHeadersList,
@@ -12420,7 +12535,18 @@ function commonFun(type, prefixUrl, parentProps) {
12420
12535
  pageSize: 5000,
12421
12536
  currentPage: 1,
12422
12537
  'ctl-withAuth': true
12423
- }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
12538
+ }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, {
12539
+ headers: _objectSpread2({}, extralHeaders)
12540
+ })]).then(function (x) {
12541
+ var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
12542
+ var newData1 = [];
12543
+ (_x$3 = x[1]) === null || _x$3 === void 0 ? void 0 : (_x$3$data$ = _x$3.data[0]) === null || _x$3$data$ === void 0 ? void 0 : (_x$3$data$$channelInf = _x$3$data$.channelInfoSon) === null || _x$3$data$$channelInf === void 0 ? void 0 : _x$3$data$$channelInf.forEach(function (item) {
12544
+ newData1.push({
12545
+ code: item.code,
12546
+ name: item.name
12547
+ });
12548
+ });
12549
+ x[1].data = newData1;
12424
12550
  var channelDisabledJude = function channelDisabledJude(data) {
12425
12551
  return data['parentCode'] === '0';
12426
12552
  }; // 所属销售渠道 树节点不能点判断
@@ -12431,6 +12557,46 @@ function commonFun(type, prefixUrl, parentProps) {
12431
12557
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12432
12558
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12433
12559
  formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
12560
+ var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
12561
+ // 新增label属性
12562
+ (_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
12563
+ r.label = r === null || r === void 0 ? void 0 : r.value;
12564
+ });
12565
+ var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
12566
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
12567
+ opList = opList[0];
12568
+ }
12569
+ var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
12570
+ return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12571
+ });
12572
+ var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
12573
+ return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12574
+ });
12575
+ var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12576
+ return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12577
+ });
12578
+ debugger;
12579
+ var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12580
+ return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12581
+ });
12582
+ var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
12583
+ return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12584
+ });
12585
+ tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
12586
+ initialSource: m1
12587
+ });
12588
+ tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
12589
+ initialSource: m2
12590
+ });
12591
+ tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
12592
+ initialSource: m3
12593
+ });
12594
+ tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
12595
+ initialSource: m4
12596
+ });
12597
+ tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
12598
+ initialSource: m5
12599
+ });
12434
12600
  });
12435
12601
  modalTableProps = _objectSpread2({
12436
12602
  modalTableTitle: '选择商店',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.1-alpha.1-aiwei",
3
+ "version": "4.2.1-alpha.10-aiwei",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -6,7 +6,7 @@ import { handleTextOverflow, tableColumnsImage, handleTooltip } from '@/componen
6
6
  import { getSkuImg } from '@/utils/TableUtils';
7
7
  import { getEmployeeCode, getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8
8
  import { Image } from 'antd';
9
- import { isBoolean } from 'lodash';
9
+ import { isBoolean, trim } from 'lodash';
10
10
 
11
11
  const hasDictSharingType = getDictionarySource('UC000013')?.length;
12
12
  const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
@@ -487,7 +487,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
487
487
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
488
488
  },
489
489
  } },
490
- { name: 'qp-zzdlbm-in', type: 'select', label: '大类', field: {
490
+ { name: 'qp-zzdlbm-in', type: 'select', label: '品类', field: {
491
491
  type: 'select',
492
492
  props: {
493
493
  mode: 'multiple',
@@ -501,7 +501,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
501
501
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
502
502
  },
503
503
  } },
504
- { name: 'qp-zzzlbm-in', type: 'select', label: '中类', field: {
504
+ { name: 'qp-zzzlbm-in', type: 'select', label: '大类', field: {
505
505
  type: 'select',
506
506
  props: {
507
507
  mode: 'multiple',
@@ -515,7 +515,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
515
515
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
516
516
  },
517
517
  } },
518
- { name: 'qp-zzxlbm-in', type: 'select', label: '小类', field: {
518
+ { name: 'qp-zzxlbm-in', type: 'select', label: '中类', field: {
519
519
  type: 'select',
520
520
  props: {
521
521
  mode: 'multiple',
@@ -595,7 +595,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
595
595
  tableSearchForm,
596
596
  isHorizontally: true,
597
597
  tableSearchColSpan: 6,
598
- visibleFieldsCount: 13,
599
598
  tableColumns: [
600
599
  {
601
600
  title: '序号',
@@ -1352,16 +1351,26 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1352
1351
  'qp-status-eq': 1,
1353
1352
  },getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
1354
1353
  ]).then((x: any)=>{
1354
+ debugger
1355
+ // 战区限制一级数据
1356
+ const newData1 = [];
1357
+ x[0]?.data[0]?.channelInfoSon?.forEach((item: any) => {
1358
+ newData1.push({
1359
+ code: item.code,
1360
+ name: item.name
1361
+ })
1362
+ })
1363
+ x[0].data = newData1;
1355
1364
  const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
1356
1365
  const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
1357
- formatTreeDataSource(x, 0, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
1358
- formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
1366
+ formatTreeDataSource(x, 0, 3, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
1367
+ formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
1359
1368
  })
1360
1369
  tableSearchForm = [
1361
1370
  { name: 'realWarehouseName*multiInput', label: '逻辑仓名称', type: 'multipleQueryInput' },
1362
1371
  { name: 'realWarehouseCode*multiInput', label: '逻辑仓编码', type: 'multipleQueryInput' },
1363
1372
  { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
1364
- { name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
1373
+ // { name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
1365
1374
  {
1366
1375
  name: 'qp-channelCode-in', type: 'treeSelect', label: '战区', field: {
1367
1376
  type: 'treeSelect',
@@ -1453,7 +1462,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1453
1462
  width: 100,
1454
1463
  },
1455
1464
  {
1456
- title: '所属销售渠道',
1465
+ title: '战区',
1457
1466
  dataIndex: 'channelName',
1458
1467
  defaultSort: 4,
1459
1468
  width: 100,
@@ -1530,8 +1539,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1530
1539
  },
1531
1540
  } },
1532
1541
  {
1533
- name: 'qp-channelCode-in', type: 'treeSelect', label: '销售渠道', field: {
1534
- type: 'treeSelect',
1542
+ name: 'qp-operationWarehouseClassification-in', type: 'select', label: '分类', field: {
1543
+ type: 'select',
1535
1544
  props: {
1536
1545
  multiple: true,
1537
1546
  treeData: [],
@@ -1546,7 +1555,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1546
1555
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1547
1556
  showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1548
1557
  },
1549
- }
1558
+ },
1559
+ initialSource: getDictionarySource('BASIC_OPS_WH_TYPE')
1550
1560
  },
1551
1561
  ...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
1552
1562
  ]
@@ -1560,8 +1570,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1560
1570
  },getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
1561
1571
  ]).then((x: any)=>{
1562
1572
  formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
1563
- const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
1564
- formatTreeDataSource(x, 1, 3, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
1573
+ const newData1: any[] = [];
1574
+ x[1]?.data[0]?.channelInfoSon?.forEach((item: any) => {
1575
+ newData1.push({ code: item.code, name: item.name })
1576
+ });
1577
+ x[1].data = newData1;
1565
1578
  })
1566
1579
  modalTableProps = {
1567
1580
  modalTableTitle: '选择运营仓',
@@ -1844,15 +1857,15 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1844
1857
  tableSearchForm = [
1845
1858
  { name: 'qp-name-like', label: '客户名称' },
1846
1859
  { name: 'qp-code-like', label: '客户编码' },
1847
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1860
+ { name: 'qp-createOrgCode-in', type: 'select', label: '创建组织', field: {
1848
1861
  type: 'select',
1849
1862
  props: {
1850
- // mode: 'multiple',
1863
+ mode: 'multiple',
1851
1864
  notFoundContent: '暂无数据',
1852
1865
  allowClear: true,
1853
1866
  showSearch: true,
1854
1867
  showArrow: true,
1855
- // maxTagCount: 1,
1868
+ maxTagCount: 1,
1856
1869
  optionFilterProp: 'children',
1857
1870
  filterOption: (input: string, option: { props: { children: string } }) =>
1858
1871
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
@@ -2281,11 +2294,74 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2281
2294
  },
2282
2295
  },
2283
2296
  },
2284
- { name: 'qp-manageSupervisor-like', label: '管理督导', type: 'input' },
2285
- { name: 'qp-directSupervisor-like', label: '直接督导', type: 'input' },
2286
- { name: 'qp-distributionItem-like', label: '分销商品', type: 'input' },
2287
- { name: 'qp-headItem-like', label: '总部商品', type: 'input' },
2288
- { name: 'qp-storeChannelName-like', label: '管理模式', type: 'input' },
2297
+ { name: 'qp-manageSupervisor-like', type: 'select', label: '管理督导', field: {
2298
+ type: 'select',
2299
+ props: {
2300
+ notFoundContent: '暂无数据',
2301
+ allowClear: true,
2302
+ showSearch: true,
2303
+ showArrow: true,
2304
+ maxTagCount: 1,
2305
+ optionFilterProp: 'children',
2306
+ filterOption: (input: string, option: { props: { children: string } }) =>
2307
+ {
2308
+ debugger
2309
+ return (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2310
+ }
2311
+ },
2312
+ } },
2313
+ { name: 'qp-directSupervisor-like', type: 'select', label: '直接督导', field: {
2314
+ type: 'select',
2315
+ props: {
2316
+ notFoundContent: '暂无数据',
2317
+ allowClear: true,
2318
+ showSearch: true,
2319
+ showArrow: true,
2320
+ maxTagCount: 1,
2321
+ optionFilterProp: 'children',
2322
+ filterOption: (input: string, option: { props: { children: string } }) =>
2323
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2324
+ },
2325
+ } },
2326
+ { name: 'qp-distributionItem-like', type: 'select', label: '分销商品', field: {
2327
+ type: 'select',
2328
+ props: {
2329
+ notFoundContent: '暂无数据',
2330
+ allowClear: true,
2331
+ showSearch: true,
2332
+ showArrow: true,
2333
+ maxTagCount: 1,
2334
+ optionFilterProp: 'children',
2335
+ filterOption: (input: string, option: { props: { children: string } }) =>
2336
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2337
+ },
2338
+ } },
2339
+ { name: 'qp-headItem-like', type: 'select', label: '总部商品', field: {
2340
+ type: 'select',
2341
+ props: {
2342
+ notFoundContent: '暂无数据',
2343
+ allowClear: true,
2344
+ showSearch: true,
2345
+ showArrow: true,
2346
+ maxTagCount: 1,
2347
+ optionFilterProp: 'children',
2348
+ filterOption: (input: string, option: { props: { children: string } }) =>
2349
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2350
+ },
2351
+ } },
2352
+ { name: 'qp-storeChannelName-like', type: 'select', label: '管理模式', field: {
2353
+ type: 'select',
2354
+ props: {
2355
+ notFoundContent: '暂无数据',
2356
+ allowClear: true,
2357
+ showSearch: true,
2358
+ showArrow: true,
2359
+ maxTagCount: 1,
2360
+ optionFilterProp: 'children',
2361
+ filterOption: (input: string, option: { props: { children: string } }) =>
2362
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2363
+ },
2364
+ } },
2289
2365
  ]
2290
2366
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
2291
2367
  Promise.all([
@@ -2306,14 +2382,43 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2306
2382
  pageSize: 5000,
2307
2383
  currentPage: 1,
2308
2384
  'ctl-withAuth': true,
2309
- },getQueryHeadersItem(queryHeaderParams,'ctl-withAuth'))
2385
+ },getQueryHeadersItem(queryHeaderParams,'ctl-withAuth')),
2386
+ loadSelectSource(`/channel-manage/store/selectStoreOperationalInfo`, {}, {
2387
+ headers: {
2388
+ ...extralHeaders
2389
+ },
2390
+ })
2310
2391
  ]).then((x: any)=>{
2392
+ const newData1: any[] = [];
2393
+ x[1]?.data[0]?.channelInfoSon?.forEach((item: any) => {
2394
+ newData1.push({ code: item.code, name: item.name })
2395
+ });
2396
+ x[1].data = newData1;
2311
2397
  const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
2312
2398
  const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
2313
2399
  formatSource(x,0, 3, tableSearchForm);
2314
2400
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
2315
2401
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
2316
2402
  formatSource(x,3, 7, tableSearchForm, ['brandCode', 'name']);
2403
+
2404
+ const opRaw = x[4]?.data;
2405
+ // 新增label属性
2406
+ opList?.forEach((r: any) => {
2407
+ r.label = r?.value;
2408
+ })
2409
+ let opList = Array.isArray(opRaw) ? opRaw : (opRaw?.items || opRaw?.list || []);
2410
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !opList[0]?.field) { opList = opList[0]; }
2411
+ const m1 = opList?.filter((r: any) => r?.field === 'manage_supervisor' && trim(r?.value));
2412
+ const m2 = opList?.filter((r: any) => r?.field === 'direct_supervisor' && trim(r?.value));
2413
+ const m3 = opList?.filter((r: any) => r?.field === 'distribution_item' && trim(r?.value));
2414
+ debugger
2415
+ const m4 = opList?.filter((r: any) => r?.field === 'head_item' && trim(r?.value));
2416
+ const m5 = opList?.filter((r: any) => r?.field === 'store_channel_name' && trim(r?.value));
2417
+ tableSearchForm[8] = { ...tableSearchForm[8], initialSource: m1 };
2418
+ tableSearchForm[9] = { ...tableSearchForm[9], initialSource: m2 };
2419
+ tableSearchForm[10] = { ...tableSearchForm[10], initialSource: m3 };
2420
+ tableSearchForm[11] = { ...tableSearchForm[11], initialSource: m4 };
2421
+ tableSearchForm[12] = { ...tableSearchForm[12], initialSource: m5 };
2317
2422
  })
2318
2423
  modalTableProps = {
2319
2424
  modalTableTitle: '选择商店',
@@ -317,7 +317,7 @@ export default () => {
317
317
  },
318
318
  // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
319
319
  selectProps,
320
- selectBusinessType: 'spuCommodityWithProperty',
320
+ selectBusinessType: 'skuCommodity',
321
321
  };
322
322
 
323
323
  const onTabChange = (key) => {
@@ -859,16 +859,17 @@ export default () => {
859
859
  console.log(value)
860
860
  setValue(value)
861
861
  },
862
- // requestConfig: {
863
- // url: `/bop/api/store`,
864
- // filter: 'qp-name,code-orGroup,like',,
865
- // mappingTextField: 'name',
866
- // mappingValueField: 'code',
867
- // otherParams: {
868
- // sorter: 'desc-id'
869
- // }, // 默认参数
870
- // sourceName: 'code',
871
- // },
862
+ requestConfig: {
863
+ url: `/bop/api/store`,
864
+ filter: 'qp-name,code-orGroup,like',
865
+ mappingTextField: 'name',
866
+ mappingValueField: 'code',
867
+ otherParams: {
868
+ sorter: 'desc-id'
869
+ }, // 默认参数
870
+ sourceName: 'code',
871
+ extralHeaders: {'x-biz-code': 3}
872
+ },
872
873
  // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
873
874
  selectProps,
874
875
  selectBusinessType: 'shopFile',
@@ -878,6 +879,25 @@ export default () => {
878
879
  ...props,
879
880
  // prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
880
881
  selectBusinessType: 'shopFile2',
882
+ modalTableProps: {
883
+ isOpen: true,
884
+ querySelectHeadersList: [
885
+ {
886
+ 'x-biz-code': 3
887
+ }
888
+ ]
889
+ },
890
+ requestConfig: {
891
+ url: `/bop/api/store`,
892
+ filter: 'qp-name,code-orGroup,like',
893
+ mappingTextField: 'name',
894
+ mappingValueField: 'code',
895
+ otherParams: {
896
+ sorter: 'desc-id'
897
+ }, // 默认参数
898
+ sourceName: 'code',
899
+ extralHeaders: {'x-biz-code': 3}
900
+ },
881
901
  }
882
902
 
883
903
  const onTabChange = (key) => {
@@ -55,6 +55,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
55
55
  viewShowValueStr, // 详情展示值,不传展示组件处理的默认值
56
56
  searchStartLength, // 默认不校验长度去搜索,如果配置了,则按照配置项长度进行处理搜索
57
57
  isQuery = false, // 是否是查询条件
58
+ requireSearchCondition = false, // 是否必须选择一个值
58
59
  } = rCTemp || {};
59
60
  const requestConfig = {url,method,otherParams,isMap,fixedparameter,fieldValToParam,fixedparamsDisabled,mappingTextField,mappingTextShowKeyField,mappingValueField,mappingTextShowTextField,init,extralHeaders,specialBracket,noNeedSplit,noOperate,viewShowValueStr,searchStartLength,...rCTemp};
60
61
  const resultSourceKey = handleSourceName(sourceName || requestConfig?.sourceName || ctx?.name || 'supplierCode')
@@ -479,6 +480,18 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
479
480
 
480
481
  const onSearchTable = () => {
481
482
  const params = form.getFieldsValue();
483
+ // 必须选择一个值
484
+ if(requireSearchCondition) {
485
+ const hasValidValue = Object.values(params).some(value =>
486
+ (Array.isArray(value) && value.length > 0) ||
487
+ (typeof value === 'string' && value.trim().length > 0)
488
+ );
489
+
490
+ if(!hasValidValue) {
491
+ message.warning('请至少选择一个搜索条件');
492
+ return;
493
+ }
494
+ }
482
495
  setModalSearched(true);
483
496
  setTableFormParams(params);
484
497
  getData({ ...params, pageSize: tableInitPageSize }, 2, null);
@@ -711,7 +724,25 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
711
724
  }
712
725
 
713
726
  const renderShowTable = (tableList, type) => {
714
- const tableBoxHeighth = getTableHeigth(modalTableProps?.tableSearchForm);
727
+ const viCount = modalTableProps?.visibleFieldsCount || defaultVisibleFieldsCount;
728
+ const canExpand = hasMoreQueryFields(modalTableProps);
729
+ const collapsedList = modalTableProps?.tableSearchForm?.slice(0, viCount);
730
+ const baseHeight = getTableHeigth(collapsedList);
731
+ const rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps?.tableSearchColSpan).totalRows;
732
+ const rowsExpandedData = getFormRowInfo(modalTableProps?.tableSearchForm, modalTableProps?.tableSearchColSpan);
733
+ let rowsExpanded = rowsExpandedData.totalRows;
734
+ let isMoreAction = false;
735
+ if(24 / modalTableProps?.tableSearchColSpan - rowsExpandedData.emptyArray.length === 1) {
736
+ rowsExpanded++;
737
+ isMoreAction = true;
738
+ }
739
+ const extraRows = (!collapsed && canExpand) ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
740
+ let tableBoxHeighth = baseHeight;
741
+ if(isMoreAction && extraRows > 0) {
742
+ tableBoxHeighth = tableBoxHeighth + ((extraRows - 1) ? (extraRows - 1) : 0) * 34 + 32
743
+ } else {
744
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34
745
+ }
715
746
  const x = tableList?.length ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
716
747
  const oSY = `calc(100vh - ${tableBoxHeighth}px - ${x}px)`;
717
748
  const mTB = `calc(50vh - ${tableBoxHeighth/2}px - ${x/2}px - 40px)`