@bit-sun/business-component 4.2.1-alpha.2-aiwei → 4.2.1-alpha.20-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',
@@ -11338,19 +11368,34 @@ function commonFun(type, prefixUrl, parentProps) {
11338
11368
  });
11339
11369
  Promise.all([loadSelectSource$1("/channel-manage/channelInfo/tree", {
11340
11370
  'qp-status-eq': 10,
11341
- 'qp-isMain-eq': 1,
11371
+ // 'qp-isMain-eq': 1,
11342
11372
  'qp-type-in': '1,2'
11343
- }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
11373
+ }, {
11374
+ headers: _objectSpread2({}, extralHeaders)
11375
+ }), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
11344
11376
  'qp-status-eq': 1
11345
- }, getQueryHeadersItem(_queryHeaderParams7, 'qp-orgCode-in'))]).then(function (x) {
11377
+ }, {
11378
+ headers: _objectSpread2({}, extralHeaders)
11379
+ })]).then(function (x) {
11380
+ var _x$, _x$$data$, _x$$data$$channelInfo;
11381
+ debugger;
11382
+ // 战区限制一级数据
11383
+ var newData1 = [];
11384
+ (_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) {
11385
+ newData1.push({
11386
+ code: item.code,
11387
+ name: item.name
11388
+ });
11389
+ });
11390
+ x[0].data = newData1;
11346
11391
  var channelDisabledJude = function channelDisabledJude(data) {
11347
11392
  return data['parentCode'] === '0';
11348
11393
  }; // 所属销售渠道 树节点不能点判断
11349
11394
  var areaDisabledJude = function areaDisabledJude(data) {
11350
11395
  return data['parent'] === '0';
11351
11396
  }; // 所属营销区域 树节点不能点判断
11352
- formatTreeDataSource(x, 0, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11353
- formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11397
+ formatTreeDataSource(x, 0, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11398
+ formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
11354
11399
  });
11355
11400
  tableSearchForm = [{
11356
11401
  name: 'realWarehouseName*multiInput',
@@ -11468,7 +11513,7 @@ function commonFun(type, prefixUrl, parentProps) {
11468
11513
  },
11469
11514
  width: 100
11470
11515
  }, {
11471
- title: '所属销售渠道',
11516
+ title: '战区',
11472
11517
  dataIndex: 'channelName',
11473
11518
  defaultSort: 4,
11474
11519
  width: 100
@@ -11549,11 +11594,11 @@ function commonFun(type, prefixUrl, parentProps) {
11549
11594
  }
11550
11595
  }
11551
11596
  }, {
11552
- name: 'qp-channelCode-in',
11553
- type: 'treeSelect',
11554
- label: '销售渠道',
11597
+ name: 'qp-operationWarehouseClassification-in',
11598
+ type: 'select',
11599
+ label: '分类',
11555
11600
  field: {
11556
- type: 'treeSelect',
11601
+ type: 'select',
11557
11602
  props: {
11558
11603
  multiple: true,
11559
11604
  treeData: [],
@@ -11582,16 +11627,28 @@ function commonFun(type, prefixUrl, parentProps) {
11582
11627
  });
11583
11628
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
11584
11629
  'qp-status-eq': 1
11585
- }, getQueryHeadersItem(_queryHeaderParams8, 'qp-groupCode-in')), loadSelectSource$1("/channel-manage/channelInfo/tree", {
11630
+ }, {
11631
+ headers: _objectSpread2({}, extralHeaders)
11632
+ }), loadSelectSource$1("/channel-manage/channelInfo/tree", {
11586
11633
  'qp-status-eq': 10,
11587
11634
  'qp-isMain-eq': 1,
11588
11635
  'qp-type-in': '1,2'
11589
- }, getQueryHeadersItem(_queryHeaderParams8, 'qp-orgCode-in'))]).then(function (x) {
11636
+ }, {
11637
+ headers: _objectSpread2({}, extralHeaders)
11638
+ }), loadSelectSource$1("/stock/ownerWarehouse/operationWarehouseClassificationList", {}, {
11639
+ headers: _objectSpread2({}, extralHeaders)
11640
+ })]).then(function (x) {
11641
+ var _x$2, _x$2$data$, _x$2$data$$channelInf;
11590
11642
  formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
11591
- var channelDisabledJude = function channelDisabledJude(data) {
11592
- return data['parentCode'] === '0';
11593
- }; // 所属销售渠道 树节点不能点判断
11594
- formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
11643
+ formatSource(x, 2, 3, tableSearchForm, ['operationWarehouseClassification', 'operationWarehouseClassificationName']);
11644
+ var newData1 = [];
11645
+ (_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) {
11646
+ newData1.push({
11647
+ code: item.code,
11648
+ name: item.name
11649
+ });
11650
+ });
11651
+ x[1].data = newData1;
11595
11652
  });
11596
11653
  modalTableProps = _objectSpread2({
11597
11654
  modalTableTitle: '选择运营仓',
@@ -11863,18 +11920,18 @@ function commonFun(type, prefixUrl, parentProps) {
11863
11920
  name: 'qp-code-like',
11864
11921
  label: '客户编码'
11865
11922
  }, {
11866
- name: 'qp-createOrgCode-eq',
11923
+ name: 'qp-createOrgCode-in',
11867
11924
  type: 'select',
11868
11925
  label: '创建组织',
11869
11926
  field: {
11870
11927
  type: 'select',
11871
11928
  props: {
11872
- // mode: 'multiple',
11929
+ mode: 'multiple',
11873
11930
  notFoundContent: '暂无数据',
11874
11931
  allowClear: true,
11875
11932
  showSearch: true,
11876
11933
  showArrow: true,
11877
- // maxTagCount: 1,
11934
+ maxTagCount: 1,
11878
11935
  optionFilterProp: 'children',
11879
11936
  filterOption: function filterOption(input, option) {
11880
11937
  return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
@@ -12249,26 +12306,21 @@ function commonFun(type, prefixUrl, parentProps) {
12249
12306
  initialSource: shopFile2Type
12250
12307
  },
12251
12308
  // { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
12309
+ // { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
12310
+ // type: 'select',
12311
+ // props: {
12312
+ // mode: 'multiple',
12313
+ // notFoundContent: '暂无数据',
12314
+ // allowClear: true,
12315
+ // showSearch: true,
12316
+ // showArrow: true,
12317
+ // maxTagCount: 1,
12318
+ // optionFilterProp: 'children',
12319
+ // filterOption: (input: string, option: { props: { children: string } }) =>
12320
+ // option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
12321
+ // },
12322
+ // } },
12252
12323
  {
12253
- name: 'qp-orgCode-in',
12254
- type: 'select',
12255
- label: '所属销售组织',
12256
- field: {
12257
- type: 'select',
12258
- props: {
12259
- mode: 'multiple',
12260
- notFoundContent: '暂无数据',
12261
- allowClear: true,
12262
- showSearch: true,
12263
- showArrow: true,
12264
- maxTagCount: 1,
12265
- optionFilterProp: 'children',
12266
- filterOption: function filterOption(input, option) {
12267
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12268
- }
12269
- }
12270
- }
12271
- }, {
12272
12324
  name: 'qp-channelCode-in',
12273
12325
  type: 'treeSelect',
12274
12326
  label: '战区',
@@ -12352,24 +12404,100 @@ function commonFun(type, prefixUrl, parentProps) {
12352
12404
  }
12353
12405
  }, {
12354
12406
  name: 'qp-manageSupervisor-like',
12407
+ type: 'select',
12355
12408
  label: '管理督导',
12356
- type: 'input'
12409
+ field: {
12410
+ type: 'select',
12411
+ props: {
12412
+ notFoundContent: '暂无数据',
12413
+ allowClear: true,
12414
+ showSearch: true,
12415
+ showArrow: true,
12416
+ maxTagCount: 1,
12417
+ optionFilterProp: 'children',
12418
+ filterOption: function filterOption(input, option) {
12419
+ var _option$value;
12420
+ debugger;
12421
+ return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12422
+ }
12423
+ }
12424
+ }
12357
12425
  }, {
12358
12426
  name: 'qp-directSupervisor-like',
12427
+ type: 'select',
12359
12428
  label: '直接督导',
12360
- type: 'input'
12429
+ field: {
12430
+ type: 'select',
12431
+ props: {
12432
+ notFoundContent: '暂无数据',
12433
+ allowClear: true,
12434
+ showSearch: true,
12435
+ showArrow: true,
12436
+ maxTagCount: 1,
12437
+ optionFilterProp: 'children',
12438
+ filterOption: function filterOption(input, option) {
12439
+ var _option$value2;
12440
+ return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
12441
+ }
12442
+ }
12443
+ }
12361
12444
  }, {
12362
12445
  name: 'qp-distributionItem-like',
12446
+ type: 'select',
12363
12447
  label: '分销商品',
12364
- type: 'input'
12448
+ field: {
12449
+ type: 'select',
12450
+ props: {
12451
+ notFoundContent: '暂无数据',
12452
+ allowClear: true,
12453
+ showSearch: true,
12454
+ showArrow: true,
12455
+ maxTagCount: 1,
12456
+ optionFilterProp: 'children',
12457
+ filterOption: function filterOption(input, option) {
12458
+ var _option$value3;
12459
+ return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
12460
+ }
12461
+ }
12462
+ }
12365
12463
  }, {
12366
12464
  name: 'qp-headItem-like',
12465
+ type: 'select',
12367
12466
  label: '总部商品',
12368
- type: 'input'
12467
+ field: {
12468
+ type: 'select',
12469
+ props: {
12470
+ notFoundContent: '暂无数据',
12471
+ allowClear: true,
12472
+ showSearch: true,
12473
+ showArrow: true,
12474
+ maxTagCount: 1,
12475
+ optionFilterProp: 'children',
12476
+ filterOption: function filterOption(input, option) {
12477
+ var _option$value4;
12478
+ return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
12479
+ }
12480
+ }
12481
+ }
12369
12482
  }, {
12370
12483
  name: 'qp-storeChannelName-like',
12484
+ type: 'select',
12371
12485
  label: '管理模式',
12372
- type: 'input'
12486
+ field: {
12487
+ type: 'select',
12488
+ props: {
12489
+ notFoundContent: '暂无数据',
12490
+ allowClear: true,
12491
+ showSearch: true,
12492
+ showArrow: true,
12493
+ maxTagCount: 1,
12494
+ optionFilterProp: 'children',
12495
+ filterOption: function filterOption(input, option) {
12496
+ var _option$value5;
12497
+ return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
12498
+ }
12499
+ }
12500
+ }
12373
12501
  }];
12374
12502
  var _queryHeaderParams10 = getQueryHeadersList({
12375
12503
  querySelectHeadersList: querySelectHeadersList,
@@ -12379,27 +12507,86 @@ function commonFun(type, prefixUrl, parentProps) {
12379
12507
  'qp-employeeCode-eq': getEmployeeCode(),
12380
12508
  'qp-realOrg-eq': true,
12381
12509
  'qp-status-eq': 10
12382
- }, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/channelInfo/tree"), {
12510
+ }, {
12511
+ headers: _objectSpread2({}, extralHeaders)
12512
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/channelInfo/tree"), {
12383
12513
  'qp-status-eq': 10,
12384
12514
  'qp-isMain-eq': 1,
12385
12515
  'qp-type-in': '1,2'
12386
- }, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/tagNode/getTree/10"), {
12516
+ }, {
12517
+ headers: _objectSpread2({}, extralHeaders)
12518
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/tagNode/getTree/10"), {
12387
12519
  'qp-status-eq': 1
12388
- }, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12520
+ }, {
12521
+ headers: _objectSpread2({}, extralHeaders)
12522
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12389
12523
  pageSize: 5000,
12390
12524
  currentPage: 1,
12391
12525
  'ctl-withAuth': true
12392
- }, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
12526
+ }, {
12527
+ headers: _objectSpread2({}, extralHeaders)
12528
+ }), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, {
12529
+ headers: _objectSpread2({}, extralHeaders)
12530
+ })]).then(function (x) {
12531
+ var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
12532
+ var newData1 = [];
12533
+ (_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) {
12534
+ newData1.push({
12535
+ code: item.code,
12536
+ name: item.name
12537
+ });
12538
+ });
12539
+ x[1].data = newData1;
12393
12540
  var channelDisabledJude = function channelDisabledJude(data) {
12394
12541
  return data['parentCode'] === '0';
12395
12542
  }; // 所属销售渠道 树节点不能点判断
12396
12543
  var areaDisabledJude = function areaDisabledJude(data) {
12397
12544
  return data['parent'] === '0';
12398
12545
  }; // 所属营销区域 树节点不能点判断
12399
- formatSource(x, 0, 3, tableSearchForm);
12400
- formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12401
- formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12402
- formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
12546
+ // formatSource(x,0, 3, tableSearchForm);
12547
+ formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
12548
+ formatTreeDataSource(x, 2, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
12549
+ formatSource(x, 3, 6, tableSearchForm, ['brandCode', 'name']);
12550
+ var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
12551
+ // 新增label属性
12552
+ (_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
12553
+ r.label = r === null || r === void 0 ? void 0 : r.value;
12554
+ });
12555
+ var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
12556
+ if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
12557
+ opList = opList[0];
12558
+ }
12559
+ var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
12560
+ return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12561
+ });
12562
+ var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
12563
+ return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
12564
+ });
12565
+ var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12566
+ return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12567
+ });
12568
+ debugger;
12569
+ var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12570
+ return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12571
+ });
12572
+ var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
12573
+ return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && trim(r === null || r === void 0 ? void 0 : r.value);
12574
+ });
12575
+ tableSearchForm[7] = _objectSpread2(_objectSpread2({}, tableSearchForm[7]), {}, {
12576
+ initialSource: m1
12577
+ });
12578
+ tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
12579
+ initialSource: m2
12580
+ });
12581
+ tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
12582
+ initialSource: m3
12583
+ });
12584
+ tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
12585
+ initialSource: m4
12586
+ });
12587
+ tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
12588
+ initialSource: m5
12589
+ });
12403
12590
  });
12404
12591
  modalTableProps = _objectSpread2({
12405
12592
  modalTableTitle: '选择商店',
@@ -19486,7 +19673,8 @@ var BsSulaQueryTable = (function (props) {
19486
19673
  setPagePath = _useState0[1];
19487
19674
  var _useLocation = useLocation(),
19488
19675
  pathname = _useLocation.pathname,
19489
- _useLocation$state = _useLocation.state;
19676
+ _useLocation$state = _useLocation.state,
19677
+ state = _useLocation$state === void 0 ? {} : _useLocation$state;
19490
19678
  var _useState1 = useState(false),
19491
19679
  _useState10 = _slicedToArray(_useState1, 2),
19492
19680
  isFullScreen = _useState10[0],
@@ -19962,16 +20150,17 @@ var BsSulaQueryTable = (function (props) {
19962
20150
  isFullScreen: isFullScreen
19963
20151
  });
19964
20152
  useEffect(function () {
19965
- // if (!localStorage.getItem('isTabChange') || state?.updateCurrentPage) {
19966
- // if (pagePath === pathname) {
19967
- // // @ts-ignore
19968
- // config.ref?.current?.tableRef?.current?.refreshTable();
19969
- // }
19970
- // }
19971
- // setTimeout(() => {
19972
- // // 处理页面刷新两面
19973
- // localStorage.removeItem('isTabChange');
19974
- // }, 0);
20153
+ if (!localStorage.getItem('isTabChange') || (state === null || state === void 0 ? void 0 : state.updateCurrentPage)) {
20154
+ if (pagePath === pathname) {
20155
+ var _config$ref, _config$ref$current, _config$ref$current$t, _config$ref$current$t2;
20156
+ // @ts-ignore
20157
+ (_config$ref = config.ref) === null || _config$ref === void 0 ? void 0 : (_config$ref$current = _config$ref.current) === null || _config$ref$current === void 0 ? void 0 : (_config$ref$current$t = _config$ref$current.tableRef) === null || _config$ref$current$t === void 0 ? void 0 : (_config$ref$current$t2 = _config$ref$current$t.current) === null || _config$ref$current$t2 === void 0 ? void 0 : _config$ref$current$t2.refreshTable();
20158
+ }
20159
+ }
20160
+ setTimeout(function () {
20161
+ // 处理页面刷新两面
20162
+ localStorage.removeItem('isTabChange');
20163
+ }, 0);
19975
20164
  }, [pathname]);
19976
20165
  var expandedRowKeys = props === null || props === void 0 ? void 0 : (_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.expandedRowKeys;
19977
20166
  //todo summary属性已经被使用,为了兼容之前的,现在使用 summaryList
@@ -34396,11 +34585,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
34396
34585
  itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
34397
34586
  _this$props2$others = _this$props2.others,
34398
34587
  others = _this$props2$others === void 0 ? {} : _this$props2$others,
34399
- propertyCode = _this$props2.propertyCode;
34588
+ propertyCode = _this$props2.propertyCode,
34589
+ isQueryParams = _this$props2.isQueryParams;
34400
34590
  var thresholdList = _this.state.thresholdList;
34401
34591
  var styleCommon = {
34402
34592
  width: customerWidth || '180px'
34403
34593
  };
34594
+ if (isQueryParams) {
34595
+ return /*#__PURE__*/React$1.createElement(Input, {
34596
+ defaultValue: values.join(','),
34597
+ disabled: disabled,
34598
+ style: styleCommon,
34599
+ onBlur: function onBlur(e) {
34600
+ values = e.target.value.split(',');
34601
+ valueNames = e.target.value.split(',');
34602
+ callback(values, valueNames);
34603
+ }
34604
+ });
34605
+ }
34404
34606
  if (!selectOperation) return /*#__PURE__*/React$1.createElement(Input, {
34405
34607
  disabled: true,
34406
34608
  style: styleCommon
@@ -36926,7 +37128,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
36926
37128
  fieldValues: [],
36927
37129
  thresholdQuery: {},
36928
37130
  thresholdList: [],
36929
- options: []
37131
+ options: [],
37132
+ isQueryParams: false
36930
37133
  };
36931
37134
  return _this;
36932
37135
  }
@@ -36946,13 +37149,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
36946
37149
  initialThresholdQuery = _this$props3.initialThresholdQuery,
36947
37150
  queryIdentify = _this$props3.queryIdentify,
36948
37151
  propertyCode = _this$props3.propertyCode,
36949
- queryIdentifyType = _this$props3.queryIdentifyType;
37152
+ queryIdentifyType = _this$props3.queryIdentifyType,
37153
+ isQueryParams = _this$props3.isQueryParams;
36950
37154
  this.setState({
36951
37155
  selectOperation: selectOperation,
36952
37156
  thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
36953
37157
  dataTypeCode: dataTypeCode,
36954
37158
  dataChoiceBusinessType: dataChoiceBusinessType,
36955
37159
  dataInputBusinessType: dataInputBusinessType,
37160
+ isQueryParams: isQueryParams,
36956
37161
  others: others,
36957
37162
  fieldValues: _toConsumableArray(values),
36958
37163
  options: options
@@ -38159,6 +38364,18 @@ function RenderCompItem(props) {
38159
38364
  }
38160
38365
 
38161
38366
  var RangePicker$2 = DatePicker.RangePicker;
38367
+ var FIXED_DATA_TYPES = {
38368
+ 10: '字符串',
38369
+ 20: '短整数',
38370
+ 21: '长整数',
38371
+ 22: '小数',
38372
+ 40: '数组',
38373
+ 41: '布尔值',
38374
+ 12: '富文本',
38375
+ 30: '日期',
38376
+ 31: '时间',
38377
+ 32: '日期时间'
38378
+ };
38162
38379
  var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38163
38380
  function RuleObjectComponent(props) {
38164
38381
  var _this;
@@ -38202,6 +38419,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38202
38419
  value: element.id,
38203
38420
  id: element.id,
38204
38421
  dataTypeCode: element.valueType,
38422
+ entityValueType: element.entityValueType,
38423
+ entityInputType: element.entityInputType,
38205
38424
  dataChoiceBusinessType: element.choiceType,
38206
38425
  dataInputBusinessType: element.inputType,
38207
38426
  info: element.info,
@@ -38223,6 +38442,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38223
38442
  metaObjectCode: _this.props.metaObjectCode || item.code
38224
38443
  }, item), {}, {
38225
38444
  dataTypeCode: item.valueType,
38445
+ entityValueType: item.entityValueType,
38446
+ entityInputType: item.entityInputType,
38226
38447
  dataChoiceBusinessType: item.choiceType,
38227
38448
  dataInputBusinessType: item.inputType
38228
38449
  }));
@@ -38256,6 +38477,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38256
38477
  value: element.id,
38257
38478
  id: element.id,
38258
38479
  dataTypeCode: element.valueType,
38480
+ entityValueType: element.entityValueType,
38481
+ entityInputType: element.entityInputType,
38259
38482
  dataChoiceBusinessType: element.choiceType,
38260
38483
  dataInputBusinessType: element.inputType,
38261
38484
  info: element.info,
@@ -38625,7 +38848,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38625
38848
  initialThresholdQuery = _this$props3$initialT === void 0 ? {} : _this$props3$initialT,
38626
38849
  disabled = _this$props3.disabled,
38627
38850
  systemVariableList = _this$props3.systemVariableList,
38628
- needShowInsertSQL = _this$props3.needShowInsertSQL;
38851
+ needShowInsertSQL = _this$props3.needShowInsertSQL,
38852
+ needShowReqCondition = _this$props3.needShowReqCondition;
38629
38853
  var thresholdQuery = _objectSpread2(_objectSpread2({}, initialThresholdQuery), relateDatas);
38630
38854
  var finalIndex = floorIndex + 1;
38631
38855
  var queryIdentify = '';
@@ -38716,6 +38940,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38716
38940
  itemDetail.elementId = nodeInfo.triggerNode.props.id;
38717
38941
  itemDetail.elementName = nodeInfo.triggerNode.props.title;
38718
38942
  itemDetail.dataTypeCode = nodeInfo.triggerNode.props.dataTypeCode;
38943
+ itemDetail.entityValueType = nodeInfo.triggerNode.props.entityValueType;
38944
+ itemDetail.entityInputType = nodeInfo.triggerNode.props.entityInputType;
38719
38945
  itemDetail.metaObjectCode = nodeInfo.triggerNode.props.metaObjectCode;
38720
38946
  itemDetail.isInsertParam = false;
38721
38947
  if (needShowInsertSQL) {
@@ -38902,7 +39128,99 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38902
39128
  fontSize: '14px',
38903
39129
  marginRight: '5px'
38904
39130
  }
38905
- }), "\u6DFB\u52A0\u6761\u4EF6"))));
39131
+ }), "\u6DFB\u52A0\u6761\u4EF6"), needShowReqCondition && /*#__PURE__*/React$1.createElement("span", {
39132
+ style: {
39133
+ marginLeft: 10
39134
+ }
39135
+ }, /*#__PURE__*/React$1.createElement(Button, {
39136
+ type: "link",
39137
+ style: {
39138
+ padding: 0,
39139
+ height: 'auto'
39140
+ },
39141
+ onClick: function onClick() {
39142
+ return _this.handleReqConditionToggle(itemDetail);
39143
+ }
39144
+ }, itemDetail.isReqCondition ? '取消参数条件控制' : '参数条件控制')), itemDetail.isReqCondition && itemDetail.reqConditionData && /*#__PURE__*/React$1.createElement("div", {
39145
+ style: {
39146
+ marginTop: 10,
39147
+ display: 'flex',
39148
+ alignItems: 'center',
39149
+ background: '#f5f5f5',
39150
+ padding: '10px',
39151
+ borderRadius: '4px'
39152
+ }
39153
+ }, /*#__PURE__*/React$1.createElement("span", {
39154
+ style: {
39155
+ marginRight: 8,
39156
+ flexShrink: 0
39157
+ }
39158
+ }, "\u8BF7\u6C42\u53C2\u6570\u540D\u79F0:"), /*#__PURE__*/React$1.createElement(Input, {
39159
+ style: {
39160
+ width: 150,
39161
+ marginRight: 10
39162
+ },
39163
+ value: itemDetail.reqConditionData.reqParamName,
39164
+ onChange: function onChange(e) {
39165
+ return _this.handleReqDataChange(itemDetail, 'reqParamName', e.target.value);
39166
+ }
39167
+ }), /*#__PURE__*/React$1.createElement("span", {
39168
+ style: {
39169
+ marginRight: 8,
39170
+ flexShrink: 0
39171
+ }
39172
+ }, "\u7C7B\u578B:"), /*#__PURE__*/React$1.createElement(Select, {
39173
+ style: {
39174
+ width: 120,
39175
+ marginRight: 10
39176
+ },
39177
+ value: itemDetail.reqConditionData.dataTypeCode,
39178
+ onChange: function onChange(val) {
39179
+ return _this.handleReqDataChange(itemDetail, 'dataTypeCode', val);
39180
+ }
39181
+ }, Object.keys(FIXED_DATA_TYPES).map(function (code) {
39182
+ return /*#__PURE__*/React$1.createElement(Select.Option, {
39183
+ key: code,
39184
+ value: code
39185
+ }, FIXED_DATA_TYPES[code]);
39186
+ })), /*#__PURE__*/React$1.createElement(Select, {
39187
+ style: {
39188
+ width: 120,
39189
+ marginRight: 10
39190
+ },
39191
+ value: itemDetail.reqConditionData.operationCode,
39192
+ onChange: function onChange(val) {
39193
+ return _this.handleReqDataChange(itemDetail, 'operationCode', val);
39194
+ }
39195
+ }, [{
39196
+ 'code': 'eq',
39197
+ 'name': '等于'
39198
+ }, {
39199
+ 'code': 'cn',
39200
+ 'name': '包含'
39201
+ }, {
39202
+ code: 'gt',
39203
+ name: '大于'
39204
+ }, {
39205
+ code: 'lt',
39206
+ name: '小于'
39207
+ }].map(function (op) {
39208
+ return /*#__PURE__*/React$1.createElement(Select.Option, {
39209
+ key: op.code,
39210
+ value: op.code
39211
+ }, op.name);
39212
+ })), /*#__PURE__*/React$1.createElement(RuleField, {
39213
+ customerWidth: '180px',
39214
+ isQueryParams: true,
39215
+ selectOperation: itemDetail.reqConditionData.operationCode,
39216
+ dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
39217
+ values: itemDetail.reqConditionData.params || [],
39218
+ valueNames: itemDetail.reqConditionData.paramNames || [],
39219
+ callback: function callback(newValues, newValueNames) {
39220
+ return _this.handleReqDataChange(itemDetail, 'params', newValues, newValueNames);
39221
+ },
39222
+ disabled: disabled
39223
+ })))));
38906
39224
  };
38907
39225
  _this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex, key) {
38908
39226
  var ruleClassData = _this.state.ruleClassData;
@@ -39218,6 +39536,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39218
39536
  delete itemDetail.params;
39219
39537
  delete itemDetail.paramNames;
39220
39538
  delete itemDetail.dataTypeCode;
39539
+ delete itemDetail.entityValueType;
39540
+ delete itemDetail.entityInputType;
39221
39541
  delete itemDetail.elementId;
39222
39542
  delete itemDetail.elementName;
39223
39543
  delete itemDetail.metaObjectCode;
@@ -39268,6 +39588,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39268
39588
  parentDetail.elementId = parentDetail.subExpression[0].elementId;
39269
39589
  parentDetail.elementName = parentDetail.subExpression[0].elementName;
39270
39590
  parentDetail.dataTypeCode = parentDetail.subExpression[0].dataTypeCode;
39591
+ parentDetail.entityValueType = parentDetail.subExpression[0].entityValueType;
39592
+ parentDetail.entityInputType = parentDetail.subExpression[0].entityInputType;
39271
39593
  delete parentDetail.subExpression;
39272
39594
  }
39273
39595
  }
@@ -39341,6 +39663,55 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39341
39663
  callBack(ruleClassData);
39342
39664
  });
39343
39665
  };
39666
+ _this.handleReqConditionToggle = function (itemDetail) {
39667
+ var ruleClassData = _this.state.ruleClassData;
39668
+ var callBack = _this.props.callBack;
39669
+ itemDetail.isReqCondition = !itemDetail.isReqCondition;
39670
+ if (itemDetail.isReqCondition && !itemDetail.reqConditionData) {
39671
+ itemDetail.reqConditionData = {
39672
+ operationType: 'relation',
39673
+ dataTypeCode: '21',
39674
+ entityInputType: '21',
39675
+ entityValueType: '21',
39676
+ operationCode: '',
39677
+ reqParamName: '',
39678
+ params: [],
39679
+ paramNames: []
39680
+ };
39681
+ }
39682
+ _this.setState({
39683
+ ruleClassData: ruleClassData
39684
+ }, function () {
39685
+ callBack(ruleClassData);
39686
+ });
39687
+ };
39688
+ _this.handleReqDataChange = function (itemDetail, field, value, valueNames) {
39689
+ var ruleClassData = _this.state.ruleClassData;
39690
+ var callBack = _this.props.callBack;
39691
+ if (!itemDetail.reqConditionData) return;
39692
+ if (field === 'dataTypeCode') {
39693
+ itemDetail.reqConditionData.dataTypeCode = value;
39694
+ itemDetail.reqConditionData.entityInputType = value;
39695
+ itemDetail.reqConditionData.entityValueType = value;
39696
+ itemDetail.reqConditionData.operationCode = '';
39697
+ itemDetail.reqConditionData.params = [];
39698
+ itemDetail.reqConditionData.paramNames = [];
39699
+ } else if (field === 'operationCode') {
39700
+ itemDetail.reqConditionData.operationCode = value;
39701
+ } else if (field === 'reqParamName') {
39702
+ itemDetail.reqConditionData.reqParamName = value;
39703
+ } else if (field === 'params') {
39704
+ itemDetail.reqConditionData.params = value;
39705
+ if (valueNames) {
39706
+ itemDetail.reqConditionData.paramNames = valueNames;
39707
+ }
39708
+ }
39709
+ _this.setState({
39710
+ ruleClassData: ruleClassData
39711
+ }, function () {
39712
+ callBack(ruleClassData);
39713
+ });
39714
+ };
39344
39715
  _this.state = {
39345
39716
  editNameIndex: 0,
39346
39717
  isEdit: false,