@bit-sun/business-component 4.2.1-alpha.6-aiwei → 4.2.1-alpha.7-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';
@@ -6180,7 +6180,26 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
6180
6180
  });
6181
6181
  };
6182
6182
  var renderShowTable = function renderShowTable(tableList, type) {
6183
- var tableBoxHeighth = getTableHeigth(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm);
6183
+ var _modalTableProps$tabl;
6184
+ var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
6185
+ var canExpand = hasMoreQueryFields(modalTableProps);
6186
+ 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);
6187
+ var baseHeight = getTableHeigth(collapsedList);
6188
+ var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
6189
+ var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
6190
+ var rowsExpanded = rowsExpandedData.totalRows;
6191
+ var isMoreAction = false;
6192
+ if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
6193
+ rowsExpanded++;
6194
+ isMoreAction = true;
6195
+ }
6196
+ var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
6197
+ var tableBoxHeighth = baseHeight;
6198
+ if (isMoreAction && extraRows > 0) {
6199
+ tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
6200
+ } else {
6201
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34;
6202
+ }
6184
6203
  var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
6185
6204
  var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
6186
6205
  var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
@@ -12371,24 +12390,100 @@ function commonFun(type, prefixUrl, parentProps) {
12371
12390
  }
12372
12391
  }, {
12373
12392
  name: 'qp-manageSupervisor-like',
12393
+ type: 'select',
12374
12394
  label: '管理督导',
12375
- type: 'input'
12395
+ field: {
12396
+ type: 'select',
12397
+ props: {
12398
+ notFoundContent: '暂无数据',
12399
+ allowClear: true,
12400
+ showSearch: true,
12401
+ showArrow: true,
12402
+ maxTagCount: 1,
12403
+ optionFilterProp: 'children',
12404
+ filterOption: function filterOption(input, option) {
12405
+ var _option$value;
12406
+ debugger;
12407
+ return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12408
+ }
12409
+ }
12410
+ }
12376
12411
  }, {
12377
12412
  name: 'qp-directSupervisor-like',
12413
+ type: 'select',
12378
12414
  label: '直接督导',
12379
- type: 'input'
12415
+ field: {
12416
+ type: 'select',
12417
+ props: {
12418
+ notFoundContent: '暂无数据',
12419
+ allowClear: true,
12420
+ showSearch: true,
12421
+ showArrow: true,
12422
+ maxTagCount: 1,
12423
+ optionFilterProp: 'children',
12424
+ filterOption: function filterOption(input, option) {
12425
+ var _option$value2;
12426
+ return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
12427
+ }
12428
+ }
12429
+ }
12380
12430
  }, {
12381
12431
  name: 'qp-distributionItem-like',
12432
+ type: 'select',
12382
12433
  label: '分销商品',
12383
- type: 'input'
12434
+ field: {
12435
+ type: 'select',
12436
+ props: {
12437
+ notFoundContent: '暂无数据',
12438
+ allowClear: true,
12439
+ showSearch: true,
12440
+ showArrow: true,
12441
+ maxTagCount: 1,
12442
+ optionFilterProp: 'children',
12443
+ filterOption: function filterOption(input, option) {
12444
+ var _option$value3;
12445
+ return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
12446
+ }
12447
+ }
12448
+ }
12384
12449
  }, {
12385
12450
  name: 'qp-headItem-like',
12451
+ type: 'select',
12386
12452
  label: '总部商品',
12387
- type: 'input'
12453
+ field: {
12454
+ type: 'select',
12455
+ props: {
12456
+ notFoundContent: '暂无数据',
12457
+ allowClear: true,
12458
+ showSearch: true,
12459
+ showArrow: true,
12460
+ maxTagCount: 1,
12461
+ optionFilterProp: 'children',
12462
+ filterOption: function filterOption(input, option) {
12463
+ var _option$value4;
12464
+ return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
12465
+ }
12466
+ }
12467
+ }
12388
12468
  }, {
12389
12469
  name: 'qp-storeChannelName-like',
12470
+ type: 'select',
12390
12471
  label: '管理模式',
12391
- type: 'input'
12472
+ field: {
12473
+ type: 'select',
12474
+ props: {
12475
+ notFoundContent: '暂无数据',
12476
+ allowClear: true,
12477
+ showSearch: true,
12478
+ showArrow: true,
12479
+ maxTagCount: 1,
12480
+ optionFilterProp: 'children',
12481
+ filterOption: function filterOption(input, option) {
12482
+ var _option$value5;
12483
+ return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
12484
+ }
12485
+ }
12486
+ }
12392
12487
  }];
12393
12488
  var _queryHeaderParams10 = getQueryHeadersList({
12394
12489
  querySelectHeadersList: querySelectHeadersList,
@@ -12408,8 +12503,8 @@ function commonFun(type, prefixUrl, parentProps) {
12408
12503
  pageSize: 5000,
12409
12504
  currentPage: 1,
12410
12505
  'ctl-withAuth': true
12411
- }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
12412
- var _x$3, _x$3$data$, _x$3$data$$channelInf;
12506
+ }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in'))]).then(function (x) {
12507
+ var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
12413
12508
  var newData1 = [];
12414
12509
  (_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) {
12415
12510
  newData1.push({
@@ -12428,6 +12523,46 @@ function commonFun(type, prefixUrl, parentProps) {
12428
12523
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12429
12524
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12430
12525
  formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
12526
+ var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
12527
+ // 新增label属性
12528
+ (_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
12529
+ r.label = r === null || r === void 0 ? void 0 : r.value;
12530
+ });
12531
+ var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
12532
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
12533
+ opList = opList[0];
12534
+ }
12535
+ var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
12536
+ return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12537
+ });
12538
+ var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
12539
+ return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12540
+ });
12541
+ var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12542
+ return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12543
+ });
12544
+ debugger;
12545
+ var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12546
+ return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12547
+ });
12548
+ var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
12549
+ return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && trim(r === null || r === void 0 ? void 0 : r.value);
12550
+ });
12551
+ tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
12552
+ initialSource: m1
12553
+ });
12554
+ tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
12555
+ initialSource: m2
12556
+ });
12557
+ tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
12558
+ initialSource: m3
12559
+ });
12560
+ tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
12561
+ initialSource: m4
12562
+ });
12563
+ tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
12564
+ initialSource: m5
12565
+ });
12431
12566
  });
12432
12567
  modalTableProps = _objectSpread2({
12433
12568
  modalTableTitle: '选择商店',
package/dist/index.js CHANGED
@@ -6203,7 +6203,26 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
6203
6203
  });
6204
6204
  };
6205
6205
  var renderShowTable = function renderShowTable(tableList, type) {
6206
- var tableBoxHeighth = getTableHeigth(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm);
6206
+ var _modalTableProps$tabl;
6207
+ var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
6208
+ var canExpand = hasMoreQueryFields(modalTableProps);
6209
+ 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);
6210
+ var baseHeight = getTableHeigth(collapsedList);
6211
+ var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
6212
+ var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
6213
+ var rowsExpanded = rowsExpandedData.totalRows;
6214
+ var isMoreAction = false;
6215
+ if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
6216
+ rowsExpanded++;
6217
+ isMoreAction = true;
6218
+ }
6219
+ var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
6220
+ var tableBoxHeighth = baseHeight;
6221
+ if (isMoreAction && extraRows > 0) {
6222
+ tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
6223
+ } else {
6224
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34;
6225
+ }
6207
6226
  var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
6208
6227
  var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
6209
6228
  var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
@@ -12394,24 +12413,100 @@ function commonFun(type, prefixUrl, parentProps) {
12394
12413
  }
12395
12414
  }, {
12396
12415
  name: 'qp-manageSupervisor-like',
12416
+ type: 'select',
12397
12417
  label: '管理督导',
12398
- type: 'input'
12418
+ field: {
12419
+ type: 'select',
12420
+ props: {
12421
+ notFoundContent: '暂无数据',
12422
+ allowClear: true,
12423
+ showSearch: true,
12424
+ showArrow: true,
12425
+ maxTagCount: 1,
12426
+ optionFilterProp: 'children',
12427
+ filterOption: function filterOption(input, option) {
12428
+ var _option$value;
12429
+ debugger;
12430
+ return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12431
+ }
12432
+ }
12433
+ }
12399
12434
  }, {
12400
12435
  name: 'qp-directSupervisor-like',
12436
+ type: 'select',
12401
12437
  label: '直接督导',
12402
- type: 'input'
12438
+ field: {
12439
+ type: 'select',
12440
+ props: {
12441
+ notFoundContent: '暂无数据',
12442
+ allowClear: true,
12443
+ showSearch: true,
12444
+ showArrow: true,
12445
+ maxTagCount: 1,
12446
+ optionFilterProp: 'children',
12447
+ filterOption: function filterOption(input, option) {
12448
+ var _option$value2;
12449
+ return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
12450
+ }
12451
+ }
12452
+ }
12403
12453
  }, {
12404
12454
  name: 'qp-distributionItem-like',
12455
+ type: 'select',
12405
12456
  label: '分销商品',
12406
- type: 'input'
12457
+ field: {
12458
+ type: 'select',
12459
+ props: {
12460
+ notFoundContent: '暂无数据',
12461
+ allowClear: true,
12462
+ showSearch: true,
12463
+ showArrow: true,
12464
+ maxTagCount: 1,
12465
+ optionFilterProp: 'children',
12466
+ filterOption: function filterOption(input, option) {
12467
+ var _option$value3;
12468
+ return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
12469
+ }
12470
+ }
12471
+ }
12407
12472
  }, {
12408
12473
  name: 'qp-headItem-like',
12474
+ type: 'select',
12409
12475
  label: '总部商品',
12410
- type: 'input'
12476
+ field: {
12477
+ type: 'select',
12478
+ props: {
12479
+ notFoundContent: '暂无数据',
12480
+ allowClear: true,
12481
+ showSearch: true,
12482
+ showArrow: true,
12483
+ maxTagCount: 1,
12484
+ optionFilterProp: 'children',
12485
+ filterOption: function filterOption(input, option) {
12486
+ var _option$value4;
12487
+ return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
12488
+ }
12489
+ }
12490
+ }
12411
12491
  }, {
12412
12492
  name: 'qp-storeChannelName-like',
12493
+ type: 'select',
12413
12494
  label: '管理模式',
12414
- type: 'input'
12495
+ field: {
12496
+ type: 'select',
12497
+ props: {
12498
+ notFoundContent: '暂无数据',
12499
+ allowClear: true,
12500
+ showSearch: true,
12501
+ showArrow: true,
12502
+ maxTagCount: 1,
12503
+ optionFilterProp: 'children',
12504
+ filterOption: function filterOption(input, option) {
12505
+ var _option$value5;
12506
+ return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
12507
+ }
12508
+ }
12509
+ }
12415
12510
  }];
12416
12511
  var _queryHeaderParams10 = getQueryHeadersList({
12417
12512
  querySelectHeadersList: querySelectHeadersList,
@@ -12431,8 +12526,8 @@ function commonFun(type, prefixUrl, parentProps) {
12431
12526
  pageSize: 5000,
12432
12527
  currentPage: 1,
12433
12528
  'ctl-withAuth': true
12434
- }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
12435
- var _x$3, _x$3$data$, _x$3$data$$channelInf;
12529
+ }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in'))]).then(function (x) {
12530
+ var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
12436
12531
  var newData1 = [];
12437
12532
  (_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) {
12438
12533
  newData1.push({
@@ -12451,6 +12546,46 @@ function commonFun(type, prefixUrl, parentProps) {
12451
12546
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12452
12547
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12453
12548
  formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
12549
+ var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
12550
+ // 新增label属性
12551
+ (_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
12552
+ r.label = r === null || r === void 0 ? void 0 : r.value;
12553
+ });
12554
+ var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
12555
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
12556
+ opList = opList[0];
12557
+ }
12558
+ var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
12559
+ return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12560
+ });
12561
+ var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
12562
+ return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12563
+ });
12564
+ var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12565
+ return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12566
+ });
12567
+ debugger;
12568
+ var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12569
+ return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12570
+ });
12571
+ var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
12572
+ return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12573
+ });
12574
+ tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
12575
+ initialSource: m1
12576
+ });
12577
+ tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
12578
+ initialSource: m2
12579
+ });
12580
+ tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
12581
+ initialSource: m3
12582
+ });
12583
+ tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
12584
+ initialSource: m4
12585
+ });
12586
+ tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
12587
+ initialSource: m5
12588
+ });
12454
12589
  });
12455
12590
  modalTableProps = _objectSpread2({
12456
12591
  modalTableTitle: '选择商店',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.1-alpha.6-aiwei",
3
+ "version": "4.2.1-alpha.7-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
@@ -2295,11 +2295,74 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2295
2295
  },
2296
2296
  },
2297
2297
  },
2298
- { name: 'qp-manageSupervisor-like', label: '管理督导', type: 'input' },
2299
- { name: 'qp-directSupervisor-like', label: '直接督导', type: 'input' },
2300
- { name: 'qp-distributionItem-like', label: '分销商品', type: 'input' },
2301
- { name: 'qp-headItem-like', label: '总部商品', type: 'input' },
2302
- { name: 'qp-storeChannelName-like', label: '管理模式', type: 'input' },
2298
+ { name: 'qp-manageSupervisor-like', type: 'select', label: '管理督导', field: {
2299
+ type: 'select',
2300
+ props: {
2301
+ notFoundContent: '暂无数据',
2302
+ allowClear: true,
2303
+ showSearch: true,
2304
+ showArrow: true,
2305
+ maxTagCount: 1,
2306
+ optionFilterProp: 'children',
2307
+ filterOption: (input: string, option: { props: { children: string } }) =>
2308
+ {
2309
+ debugger
2310
+ return (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2311
+ }
2312
+ },
2313
+ } },
2314
+ { name: 'qp-directSupervisor-like', type: 'select', label: '直接督导', field: {
2315
+ type: 'select',
2316
+ props: {
2317
+ notFoundContent: '暂无数据',
2318
+ allowClear: true,
2319
+ showSearch: true,
2320
+ showArrow: true,
2321
+ maxTagCount: 1,
2322
+ optionFilterProp: 'children',
2323
+ filterOption: (input: string, option: { props: { children: string } }) =>
2324
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2325
+ },
2326
+ } },
2327
+ { name: 'qp-distributionItem-like', type: 'select', label: '分销商品', field: {
2328
+ type: 'select',
2329
+ props: {
2330
+ notFoundContent: '暂无数据',
2331
+ allowClear: true,
2332
+ showSearch: true,
2333
+ showArrow: true,
2334
+ maxTagCount: 1,
2335
+ optionFilterProp: 'children',
2336
+ filterOption: (input: string, option: { props: { children: string } }) =>
2337
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2338
+ },
2339
+ } },
2340
+ { name: 'qp-headItem-like', type: 'select', label: '总部商品', field: {
2341
+ type: 'select',
2342
+ props: {
2343
+ notFoundContent: '暂无数据',
2344
+ allowClear: true,
2345
+ showSearch: true,
2346
+ showArrow: true,
2347
+ maxTagCount: 1,
2348
+ optionFilterProp: 'children',
2349
+ filterOption: (input: string, option: { props: { children: string } }) =>
2350
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2351
+ },
2352
+ } },
2353
+ { name: 'qp-storeChannelName-like', type: 'select', label: '管理模式', field: {
2354
+ type: 'select',
2355
+ props: {
2356
+ notFoundContent: '暂无数据',
2357
+ allowClear: true,
2358
+ showSearch: true,
2359
+ showArrow: true,
2360
+ maxTagCount: 1,
2361
+ optionFilterProp: 'children',
2362
+ filterOption: (input: string, option: { props: { children: string } }) =>
2363
+ (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2364
+ },
2365
+ } },
2303
2366
  ]
2304
2367
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
2305
2368
  Promise.all([
@@ -2320,7 +2383,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2320
2383
  pageSize: 5000,
2321
2384
  currentPage: 1,
2322
2385
  'ctl-withAuth': true,
2323
- },getQueryHeadersItem(queryHeaderParams,'ctl-withAuth'))
2386
+ },getQueryHeadersItem(queryHeaderParams,'ctl-withAuth')),
2387
+ loadSelectSource(`/channel-manage/store/selectStoreOperationalInfo`, {}, getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in'))
2324
2388
  ]).then((x: any)=>{
2325
2389
  const newData1: any[] = [];
2326
2390
  x[1]?.data[0]?.channelInfoSon?.forEach((item: any) => {
@@ -2333,6 +2397,25 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2333
2397
  formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
2334
2398
  formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
2335
2399
  formatSource(x,3, 7, tableSearchForm, ['brandCode', 'name']);
2400
+
2401
+ const opRaw = x[4]?.data;
2402
+ // 新增label属性
2403
+ opList?.forEach((r: any) => {
2404
+ r.label = r?.value;
2405
+ })
2406
+ let opList = Array.isArray(opRaw) ? opRaw : (opRaw?.items || opRaw?.list || []);
2407
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !opList[0]?.field) { opList = opList[0]; }
2408
+ const m1 = opList?.filter((r: any) => r?.field === 'manage_supervisor' && trim(r?.value));
2409
+ const m2 = opList?.filter((r: any) => r?.field === 'direct_supervisor' && trim(r?.value));
2410
+ const m3 = opList?.filter((r: any) => r?.field === 'distribution_item' && trim(r?.value));
2411
+ debugger
2412
+ const m4 = opList?.filter((r: any) => r?.field === 'head_item' && trim(r?.value));
2413
+ const m5 = opList?.filter((r: any) => r?.field === 'store_channel_name' && trim(r?.value));
2414
+ tableSearchForm[8] = { ...tableSearchForm[8], initialSource: m1 };
2415
+ tableSearchForm[9] = { ...tableSearchForm[9], initialSource: m2 };
2416
+ tableSearchForm[10] = { ...tableSearchForm[10], initialSource: m3 };
2417
+ tableSearchForm[11] = { ...tableSearchForm[11], initialSource: m4 };
2418
+ tableSearchForm[12] = { ...tableSearchForm[12], initialSource: m5 };
2336
2419
  })
2337
2420
  modalTableProps = {
2338
2421
  modalTableTitle: '选择商店',
@@ -711,7 +711,25 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
711
711
  }
712
712
 
713
713
  const renderShowTable = (tableList, type) => {
714
- const tableBoxHeighth = getTableHeigth(modalTableProps?.tableSearchForm);
714
+ const viCount = modalTableProps?.visibleFieldsCount || defaultVisibleFieldsCount;
715
+ const canExpand = hasMoreQueryFields(modalTableProps);
716
+ const collapsedList = modalTableProps?.tableSearchForm?.slice(0, viCount);
717
+ const baseHeight = getTableHeigth(collapsedList);
718
+ const rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps?.tableSearchColSpan).totalRows;
719
+ const rowsExpandedData = getFormRowInfo(modalTableProps?.tableSearchForm, modalTableProps?.tableSearchColSpan);
720
+ let rowsExpanded = rowsExpandedData.totalRows;
721
+ let isMoreAction = false;
722
+ if(24 / modalTableProps?.tableSearchColSpan - rowsExpandedData.emptyArray.length === 1) {
723
+ rowsExpanded++;
724
+ isMoreAction = true;
725
+ }
726
+ const extraRows = (!collapsed && canExpand) ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
727
+ let tableBoxHeighth = baseHeight;
728
+ if(isMoreAction && extraRows > 0) {
729
+ tableBoxHeighth = tableBoxHeighth + ((extraRows - 1) ? (extraRows - 1) : 0) * 34 + 32
730
+ } else {
731
+ tableBoxHeighth = tableBoxHeighth + extraRows * 34
732
+ }
715
733
  const x = tableList?.length ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
716
734
  const oSY = `calc(100vh - ${tableBoxHeighth}px - ${x}px)`;
717
735
  const mTB = `calc(50vh - ${tableBoxHeighth/2}px - ${x/2}px - 40px)`