@bit-sun/business-component 2.2.24 → 2.2.26
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/.editorconfig +16 -16
- package/.fatherrc.ts +5 -5
- package/.gitlab-ci.yml +179 -179
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +74 -74
- package/README.md +27 -27
- package/dist/index.esm.js +190 -51
- package/dist/index.js +190 -51
- package/docs/index.md +21 -21
- package/lib/assets/drag.svg +17 -17
- package/lib/assets/exportFail.svg +37 -37
- package/lib/assets/exportProcessing.svg +28 -28
- package/lib/assets/exportSuccess.svg +34 -34
- package/lib/assets/label_icon_bottom.svg +25 -25
- package/lib/assets/upExport.svg +22 -22
- package/package.json +77 -77
- package/src/assets/32.svg +27 -27
- package/src/assets/addIcon.svg +17 -17
- package/src/assets/allfunc.svg +27 -27
- package/src/assets/arrowRight.svg +24 -24
- package/src/assets/btn-delete.svg +29 -29
- package/src/assets/btn-edit.svg +19 -19
- package/src/assets/btn-more.svg +17 -17
- package/src/assets/btn-submit.svg +19 -19
- package/src/assets/caidan.svg +11 -11
- package/src/assets/close.svg +26 -26
- package/src/assets/drag.svg +17 -17
- package/src/assets/exportFail.svg +37 -37
- package/src/assets/exportProcessing.svg +28 -28
- package/src/assets/exportSuccess.svg +34 -34
- package/src/assets/fixed-left-active.svg +11 -11
- package/src/assets/fixed-left.svg +15 -15
- package/src/assets/fixed-right-active.svg +11 -11
- package/src/assets/fixed-right.svg +15 -15
- package/src/assets/guanbi.svg +15 -15
- package/src/assets/icon-quanping.svg +15 -15
- package/src/assets/icon-shezhi.svg +17 -17
- package/src/assets/label_icon_bottom.svg +25 -25
- package/src/assets/list-no-img.svg +21 -21
- package/src/assets/morentouxiang-32.svg +23 -23
- package/src/assets/scanning.svg +24 -24
- package/src/assets/upExport.svg +22 -22
- package/src/components/Business/AddSelectBusiness/index.md +161 -129
- package/src/components/Business/AddSelectBusiness/index.tsx +859 -835
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
- package/src/components/Business/BsLayouts/index.less +79 -79
- package/src/components/Business/BsLayouts/index.tsx +1480 -1480
- package/src/components/Business/BsLayouts/service.ts +10 -10
- package/src/components/Business/BsLayouts/utils.tsx +203 -203
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
- package/src/components/Business/BsSulaQueryTable/index.less +219 -219
- package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
- package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
- package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
- package/src/components/Business/CommodityEntry/index.md +70 -70
- package/src/components/Business/CommodityEntry/index.tsx +80 -80
- package/src/components/Business/CommonAlert/index.tsx +23 -23
- package/src/components/Business/CommonGuideWrapper/index.less +111 -111
- package/src/components/Business/CommonGuideWrapper/index.md +39 -39
- package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
- package/src/components/Business/DetailPageWrapper/index.less +79 -79
- package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
- package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
- package/src/components/Business/HomePageWrapper/index.less +33 -33
- package/src/components/Business/HomePageWrapper/index.md +45 -45
- package/src/components/Business/HomePageWrapper/index.tsx +162 -162
- package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
- package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
- package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
- package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
- package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
- package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
- package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
- package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
- package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
- package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
- package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
- package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
- package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
- package/src/components/Business/JsonQueryTable/function.ts +62 -62
- package/src/components/Business/JsonQueryTable/index.less +16 -16
- package/src/components/Business/JsonQueryTable/index.md +328 -328
- package/src/components/Business/JsonQueryTable/index.tsx +320 -320
- package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
- package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
- package/src/components/Business/JsonQueryTable/static.ts +390 -390
- package/src/components/Business/SearchSelect/BusinessUtils.ts +1730 -1730
- package/src/components/Business/SearchSelect/common.ts +53 -53
- package/src/components/Business/SearchSelect/index.md +1310 -1310
- package/src/components/Business/SearchSelect/index.tsx +51 -51
- package/src/components/Business/SearchSelect/utils.ts +100 -100
- package/src/components/Business/StateFlow/index.less +130 -130
- package/src/components/Business/StateFlow/index.md +60 -60
- package/src/components/Business/StateFlow/index.tsx +29 -29
- package/src/components/Business/TreeSearchSelect/index.md +154 -154
- package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
- package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
- package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
- package/src/components/Business/columnSettingTable/index.less +247 -247
- package/src/components/Business/columnSettingTable/index.md +357 -357
- package/src/components/Business/columnSettingTable/index.tsx +232 -232
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
- package/src/components/Business/columnSettingTable/utils.tsx +68 -68
- package/src/components/Business/moreTreeTable/index.less +99 -99
- package/src/components/Business/moreTreeTable/index.md +448 -448
- package/src/components/Business/moreTreeTable/index.tsx +361 -361
- package/src/components/Business/moreTreeTable/utils.ts +126 -126
- package/src/components/Functional/AddSelect/index.less +367 -367
- package/src/components/Functional/AddSelect/index.md +155 -155
- package/src/components/Functional/AddSelect/index.tsx +1249 -1203
- package/src/components/Functional/BillEntry/index.less +371 -371
- package/src/components/Functional/BillEntry/index.md +39 -39
- package/src/components/Functional/BillEntry/index.tsx +766 -766
- package/src/components/Functional/DataImport/index.less +63 -63
- package/src/components/Functional/DataImport/index.md +44 -44
- package/src/components/Functional/DataImport/index.tsx +695 -695
- package/src/components/Functional/DataValidation/index.less +63 -63
- package/src/components/Functional/DataValidation/index.md +39 -39
- package/src/components/Functional/DataValidation/index.tsx +687 -687
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
- package/src/components/Functional/QueryMutipleInput/index.less +37 -37
- package/src/components/Functional/QueryMutipleInput/index.md +33 -33
- package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
- package/src/components/Functional/SearchSelect/index.less +115 -115
- package/src/components/Functional/SearchSelect/index.md +141 -141
- package/src/components/Functional/SearchSelect/index.tsx +846 -846
- package/src/components/Functional/SearchSelect/utils.ts +3 -3
- package/src/components/Functional/TreeSearchSelect/index.md +47 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +162 -162
- package/src/index.ts +34 -34
- package/src/plugin/TableColumnSetting/index.less +247 -247
- package/src/plugin/TableColumnSetting/index.md +50 -50
- package/src/plugin/TableColumnSetting/index.tsx +724 -724
- package/src/plugin/TableColumnSetting/utils.ts +19 -19
- package/src/styles/bsDefault.less +1912 -1912
- package/src/utils/CheckOneUser/index.md +39 -39
- package/src/utils/CheckOneUser/index.ts +51 -51
- package/src/utils/LocalstorageUtils.ts +90 -90
- package/src/utils/TableUtils.tsx +18 -18
- package/src/utils/checkUtils.ts +39 -39
- package/src/utils/enumConfig.ts +11 -11
- package/src/utils/getFormMode.js +12 -12
- package/src/utils/index.ts +3 -3
- package/src/utils/requestUtils.ts +34 -34
- package/src/utils/serialize.js +7 -7
- package/src/utils/utils.ts +183 -183
- package/tsconfig.json +29 -29
- package/typings.d.ts +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -9881,6 +9881,22 @@ var loadSelectSource = function loadSelectSource(url, params) {
|
|
|
9881
9881
|
});
|
|
9882
9882
|
});
|
|
9883
9883
|
};
|
|
9884
|
+
var checkSpuMatchCode = function checkSpuMatchCode(data) {
|
|
9885
|
+
return new Promise(function (resolve, reject) {
|
|
9886
|
+
axios.post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
|
|
9887
|
+
var _result3, _result4;
|
|
9888
|
+
result = result.data;
|
|
9889
|
+
if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
|
|
9890
|
+
message.error(result.msg);
|
|
9891
|
+
reject(false);
|
|
9892
|
+
return;
|
|
9893
|
+
}
|
|
9894
|
+
resolve(result);
|
|
9895
|
+
}).catch(function (err) {
|
|
9896
|
+
reject(err);
|
|
9897
|
+
});
|
|
9898
|
+
});
|
|
9899
|
+
};
|
|
9884
9900
|
var ResizeableTitle = function ResizeableTitle(props) {
|
|
9885
9901
|
var onResize = props.onResize,
|
|
9886
9902
|
width = props.width,
|
|
@@ -10121,6 +10137,87 @@ var AddSelect = function AddSelect(props) {
|
|
|
10121
10137
|
setShowToChooseColumns = _useState46[1];
|
|
10122
10138
|
var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
|
|
10123
10139
|
var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
|
|
10140
|
+
var checkSelectChange = /*#__PURE__*/function () {
|
|
10141
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
10142
|
+
var result;
|
|
10143
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10144
|
+
while (1) {
|
|
10145
|
+
switch (_context.prev = _context.next) {
|
|
10146
|
+
case 0:
|
|
10147
|
+
if (!(bType == 'skc' && tList.some(function (i) {
|
|
10148
|
+
return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
|
|
10149
|
+
}))) {
|
|
10150
|
+
_context.next = 3;
|
|
10151
|
+
break;
|
|
10152
|
+
}
|
|
10153
|
+
message.warning('相同skc配码不可设置相同哦');
|
|
10154
|
+
return _context.abrupt("return", false);
|
|
10155
|
+
case 3:
|
|
10156
|
+
if (!(bType == 'spu')) {
|
|
10157
|
+
_context.next = 26;
|
|
10158
|
+
break;
|
|
10159
|
+
}
|
|
10160
|
+
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10161
|
+
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10162
|
+
}))) {
|
|
10163
|
+
_context.next = 7;
|
|
10164
|
+
break;
|
|
10165
|
+
}
|
|
10166
|
+
message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10167
|
+
return _context.abrupt("return", false);
|
|
10168
|
+
case 7:
|
|
10169
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10170
|
+
_context.next = 10;
|
|
10171
|
+
break;
|
|
10172
|
+
}
|
|
10173
|
+
message.warning('请先选择颜色!');
|
|
10174
|
+
return _context.abrupt("return", false);
|
|
10175
|
+
case 10:
|
|
10176
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10177
|
+
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10178
|
+
}))) {
|
|
10179
|
+
_context.next = 13;
|
|
10180
|
+
break;
|
|
10181
|
+
}
|
|
10182
|
+
message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10183
|
+
return _context.abrupt("return", false);
|
|
10184
|
+
case 13:
|
|
10185
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10186
|
+
_context.next = 26;
|
|
10187
|
+
break;
|
|
10188
|
+
}
|
|
10189
|
+
result = true;
|
|
10190
|
+
_context.prev = 15;
|
|
10191
|
+
_context.next = 18;
|
|
10192
|
+
return checkSpuMatchCode({
|
|
10193
|
+
skcCode: recordItem[recordKey],
|
|
10194
|
+
matchingCode: changeValue,
|
|
10195
|
+
ext1: recordItem.colorName
|
|
10196
|
+
});
|
|
10197
|
+
case 18:
|
|
10198
|
+
result = _context.sent;
|
|
10199
|
+
result = true;
|
|
10200
|
+
_context.next = 25;
|
|
10201
|
+
break;
|
|
10202
|
+
case 22:
|
|
10203
|
+
_context.prev = 22;
|
|
10204
|
+
_context.t0 = _context["catch"](15);
|
|
10205
|
+
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10206
|
+
case 25:
|
|
10207
|
+
return _context.abrupt("return", result);
|
|
10208
|
+
case 26:
|
|
10209
|
+
return _context.abrupt("return", true);
|
|
10210
|
+
case 27:
|
|
10211
|
+
case "end":
|
|
10212
|
+
return _context.stop();
|
|
10213
|
+
}
|
|
10214
|
+
}
|
|
10215
|
+
}, _callee, null, [[15, 22]]);
|
|
10216
|
+
}));
|
|
10217
|
+
return function checkSelectChange(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
10218
|
+
return _ref4.apply(this, arguments);
|
|
10219
|
+
};
|
|
10220
|
+
}();
|
|
10124
10221
|
useEffect(function () {
|
|
10125
10222
|
setTableColumns(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns);
|
|
10126
10223
|
}, [modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns]);
|
|
@@ -10270,40 +10367,55 @@ var AddSelect = function AddSelect(props) {
|
|
|
10270
10367
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
10271
10368
|
render: function render(text, record, index) {
|
|
10272
10369
|
var _item$dataSource;
|
|
10273
|
-
if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
|
|
10370
|
+
if ((item === null || item === void 0 ? void 0 : (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) || (item === null || item === void 0 ? void 0 : item.dataSourceCode)) {
|
|
10371
|
+
var _item$dataSourceMappi, _item$dataSourceMappi2;
|
|
10372
|
+
var dataSourceList = item.dataSource || (record === null || record === void 0 ? void 0 : record[item === null || item === void 0 ? void 0 : item.dataSourceCode]) || [];
|
|
10373
|
+
var selectKey = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi = item.dataSourceMapping) === null || _item$dataSourceMappi === void 0 ? void 0 : _item$dataSourceMappi[0]) || 'code';
|
|
10374
|
+
var selectText = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi2 = item.dataSourceMapping) === null || _item$dataSourceMappi2 === void 0 ? void 0 : _item$dataSourceMappi2[1]) || 'name';
|
|
10274
10375
|
return /*#__PURE__*/React.createElement(Select, {
|
|
10275
10376
|
value: text || null,
|
|
10276
|
-
onChange: function
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10377
|
+
onChange: function () {
|
|
10378
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
10379
|
+
var isConformToTheRules, newPopValue;
|
|
10380
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10381
|
+
while (1) {
|
|
10382
|
+
switch (_context2.prev = _context2.next) {
|
|
10383
|
+
case 0:
|
|
10384
|
+
_context2.next = 2;
|
|
10385
|
+
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
10386
|
+
case 2:
|
|
10387
|
+
isConformToTheRules = _context2.sent;
|
|
10388
|
+
if (isConformToTheRules) {
|
|
10389
|
+
record[item.dataIndex] = value;
|
|
10390
|
+
} else {
|
|
10391
|
+
record[item.dataIndex] = null;
|
|
10392
|
+
}
|
|
10393
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10394
|
+
if (innerIndex == index) {
|
|
10395
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
10396
|
+
}
|
|
10397
|
+
return i;
|
|
10398
|
+
});
|
|
10399
|
+
setPopValue(newPopValue);
|
|
10400
|
+
case 6:
|
|
10401
|
+
case "end":
|
|
10402
|
+
return _context2.stop();
|
|
10403
|
+
}
|
|
10285
10404
|
}
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
return
|
|
10405
|
+
}, _callee2);
|
|
10406
|
+
}));
|
|
10407
|
+
function onChange(_x7) {
|
|
10408
|
+
return _onChange.apply(this, arguments);
|
|
10290
10409
|
}
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
if (innerIndex == index) {
|
|
10294
|
-
i[item.dataIndex] = record[item.dataIndex];
|
|
10295
|
-
}
|
|
10296
|
-
return i;
|
|
10297
|
-
});
|
|
10298
|
-
setPopValue(newPopValue);
|
|
10299
|
-
},
|
|
10410
|
+
return onChange;
|
|
10411
|
+
}(),
|
|
10300
10412
|
style: {
|
|
10301
10413
|
width: '160px'
|
|
10302
10414
|
}
|
|
10303
|
-
},
|
|
10415
|
+
}, dataSourceList.map(function (item) {
|
|
10304
10416
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
10305
|
-
value: item
|
|
10306
|
-
}, item
|
|
10417
|
+
value: item[selectKey]
|
|
10418
|
+
}, item[selectText]);
|
|
10307
10419
|
}));
|
|
10308
10420
|
}
|
|
10309
10421
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -10432,10 +10544,10 @@ var AddSelect = function AddSelect(props) {
|
|
|
10432
10544
|
currentPage: currentPage
|
|
10433
10545
|
}, otherParams), fixedParam), params);
|
|
10434
10546
|
axios.get("".concat(url, "?").concat(stringify(queryParams))).then(function (result) {
|
|
10435
|
-
var
|
|
10547
|
+
var _result5, _result6;
|
|
10436
10548
|
setFetching(false);
|
|
10437
10549
|
result = result.data;
|
|
10438
|
-
if (((
|
|
10550
|
+
if (((_result5 = result) === null || _result5 === void 0 ? void 0 : _result5.status) && result.status !== '0' || ((_result6 = result) === null || _result6 === void 0 ? void 0 : _result6.code) && result.code !== '000000') {
|
|
10439
10551
|
message.error(result.msg);
|
|
10440
10552
|
return;
|
|
10441
10553
|
}
|
|
@@ -10680,10 +10792,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
10680
10792
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
10681
10793
|
pageSize: tableInitPageSize
|
|
10682
10794
|
}), 2);
|
|
10683
|
-
if (selectMode) {
|
|
10684
|
-
|
|
10685
|
-
}
|
|
10795
|
+
// if (selectMode) {
|
|
10796
|
+
// getData(params)
|
|
10797
|
+
// }
|
|
10686
10798
|
};
|
|
10799
|
+
|
|
10687
10800
|
var onResetTable = function onResetTable() {
|
|
10688
10801
|
form.resetFields();
|
|
10689
10802
|
setTableFormParams({});
|
|
@@ -10861,8 +10974,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
10861
10974
|
});
|
|
10862
10975
|
}, [tableColumns]);
|
|
10863
10976
|
var handleResize = function handleResize(arr, index, callback) {
|
|
10864
|
-
return function (_,
|
|
10865
|
-
var size =
|
|
10977
|
+
return function (_, _ref5) {
|
|
10978
|
+
var size = _ref5.size;
|
|
10866
10979
|
var newColumns = arr.map(function (col) {
|
|
10867
10980
|
return _objectSpread2({}, col);
|
|
10868
10981
|
});
|
|
@@ -14221,14 +14334,9 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14221
14334
|
},
|
|
14222
14335
|
beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
|
|
14223
14336
|
onSaveCallback: parProps.onSaveCallback,
|
|
14224
|
-
businessType: 'sku'
|
|
14225
|
-
|
|
14226
|
-
// console.log('save call', rows);
|
|
14227
|
-
// // return Promise.resolve(true);
|
|
14228
|
-
// // return Promise.reject('FAILE')
|
|
14229
|
-
// }
|
|
14337
|
+
businessType: 'sku',
|
|
14338
|
+
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
14230
14339
|
};
|
|
14231
|
-
|
|
14232
14340
|
var modalTableProps = {
|
|
14233
14341
|
modalTableTitle: '选择商品',
|
|
14234
14342
|
tableSearchForm: [{
|
|
@@ -14519,8 +14627,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14519
14627
|
beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
|
|
14520
14628
|
onSaveCallback: parProps.onSaveCallback,
|
|
14521
14629
|
businessType: 'skc',
|
|
14522
|
-
isAllowRepeatedSelect: true
|
|
14630
|
+
isAllowRepeatedSelect: (parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) !== undefined ? !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) : true // 默认开启一行选多次
|
|
14523
14631
|
};
|
|
14632
|
+
|
|
14524
14633
|
var modalTableProps = {
|
|
14525
14634
|
modalTableTitle: '选择商品',
|
|
14526
14635
|
tableSearchForm: [{
|
|
@@ -14713,6 +14822,25 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
14713
14822
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
14714
14823
|
value = _useState8[0],
|
|
14715
14824
|
setValue = _useState8[1];
|
|
14825
|
+
var _useState9 = useState([]),
|
|
14826
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
14827
|
+
propertyList = _useState10[0],
|
|
14828
|
+
setPropertyList = _useState10[1];
|
|
14829
|
+
useEffect(function () {
|
|
14830
|
+
if (parProps === null || parProps === void 0 ? void 0 : parProps.isSingleColor) {
|
|
14831
|
+
// type: 1 尺码组; 2 配码组
|
|
14832
|
+
axios.get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
|
|
14833
|
+
var _result3, _result4;
|
|
14834
|
+
result = result.data;
|
|
14835
|
+
if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
|
|
14836
|
+
message.error(result.msg);
|
|
14837
|
+
return;
|
|
14838
|
+
}
|
|
14839
|
+
var data = result.data || [];
|
|
14840
|
+
setPropertyList(data);
|
|
14841
|
+
}).catch(function (err) {});
|
|
14842
|
+
}
|
|
14843
|
+
}, []);
|
|
14716
14844
|
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
14717
14845
|
var initialSelectColumn = [{
|
|
14718
14846
|
title: '商品编码',
|
|
@@ -14731,6 +14859,19 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
14731
14859
|
}, text);
|
|
14732
14860
|
},
|
|
14733
14861
|
dataIndex: 'name'
|
|
14862
|
+
}, {
|
|
14863
|
+
title: '颜色',
|
|
14864
|
+
dataIndex: 'colorName',
|
|
14865
|
+
width: 200,
|
|
14866
|
+
isSelectItem: true,
|
|
14867
|
+
dataSourceCode: 'colorValues',
|
|
14868
|
+
dataSourceMapping: ['value', 'value']
|
|
14869
|
+
}, {
|
|
14870
|
+
title: '配码',
|
|
14871
|
+
dataIndex: 'selectPropertyGroupCode',
|
|
14872
|
+
width: 160,
|
|
14873
|
+
isSelectItem: true,
|
|
14874
|
+
dataSource: propertyList
|
|
14734
14875
|
}, {
|
|
14735
14876
|
title: '数量',
|
|
14736
14877
|
width: 100,
|
|
@@ -14773,14 +14914,9 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
14773
14914
|
},
|
|
14774
14915
|
beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
|
|
14775
14916
|
onSaveCallback: parProps.onSaveCallback,
|
|
14776
|
-
businessType: 'spu'
|
|
14777
|
-
|
|
14778
|
-
// console.log('save call', rows);
|
|
14779
|
-
// // return Promise.resolve(true);
|
|
14780
|
-
// // return Promise.reject('FAILE')
|
|
14781
|
-
// }
|
|
14917
|
+
businessType: 'spu',
|
|
14918
|
+
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
14782
14919
|
};
|
|
14783
|
-
|
|
14784
14920
|
var modalTableProps = {
|
|
14785
14921
|
modalTableTitle: '选择商品',
|
|
14786
14922
|
tableSearchForm: [{
|
|
@@ -15310,7 +15446,8 @@ var handleDefaultProps = function handleDefaultProps(type) {
|
|
|
15310
15446
|
remoteSource: {
|
|
15311
15447
|
url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
|
|
15312
15448
|
initialParams: {
|
|
15313
|
-
'orgViewCode': 'sales-organizational-view'
|
|
15449
|
+
'orgViewCode': 'sales-organizational-view',
|
|
15450
|
+
'qp-status-eq': 10
|
|
15314
15451
|
},
|
|
15315
15452
|
resKeyValue: ['code', 'name']
|
|
15316
15453
|
}
|
|
@@ -15322,7 +15459,8 @@ var handleDefaultProps = function handleDefaultProps(type) {
|
|
|
15322
15459
|
remoteSource: {
|
|
15323
15460
|
url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
|
|
15324
15461
|
initialParams: {
|
|
15325
|
-
'orgViewCode': 'purchase-organizational-view'
|
|
15462
|
+
'orgViewCode': 'purchase-organizational-view',
|
|
15463
|
+
'qp-status-eq': 10
|
|
15326
15464
|
},
|
|
15327
15465
|
resKeyValue: ['code', 'name']
|
|
15328
15466
|
}
|
|
@@ -15334,7 +15472,8 @@ var handleDefaultProps = function handleDefaultProps(type) {
|
|
|
15334
15472
|
remoteSource: {
|
|
15335
15473
|
url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
|
|
15336
15474
|
initialParams: {
|
|
15337
|
-
'orgViewCode': 'stock-organizational-view'
|
|
15475
|
+
'orgViewCode': 'stock-organizational-view',
|
|
15476
|
+
'qp-status-eq': 10
|
|
15338
15477
|
},
|
|
15339
15478
|
resKeyValue: ['code', 'name']
|
|
15340
15479
|
}
|