@bit-sun/business-component 1.1.22 → 1.1.25
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/components/Business/CommodityEntry/index.d.ts +2 -0
- package/dist/components/{SearchSelect/business → Business/SearchSelect}/BusinessUtils.d.ts +1 -0
- package/dist/components/Business/SearchSelect/common.d.ts +13 -0
- package/dist/components/{SearchSelect/business/BusinessSearchSelect.d.ts → Business/SearchSelect/index.d.ts} +0 -0
- package/dist/components/Business/SearchSelect/utils.d.ts +4 -0
- package/dist/components/{DataValidation → Functional/DataValidation}/index.d.ts +0 -0
- package/dist/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.d.ts +0 -0
- package/dist/components/{SearchSelect → Functional/SearchSelect}/index.d.ts +0 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.esm.js +949 -136
- package/dist/index.js +947 -133
- package/package.json +1 -1
- package/src/components/Business/CommodityEntry/index.md +69 -0
- package/src/components/Business/CommodityEntry/index.tsx +75 -0
- package/src/components/Business/SearchSelect/BusinessUtils.ts +888 -0
- package/src/components/Business/SearchSelect/common.ts +34 -0
- package/src/components/Business/SearchSelect/index.md +906 -0
- package/src/components/{SearchSelect/business/BusinessSearchSelect.tsx → Business/SearchSelect/index.tsx} +3 -2
- package/src/components/Business/SearchSelect/utils.ts +74 -0
- package/src/components/{DataValidation → Functional/DataValidation}/index.less +0 -0
- package/src/components/{DataValidation → Functional/DataValidation}/index.md +3 -3
- package/src/components/{DataValidation → Functional/DataValidation}/index.tsx +1 -1
- package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.less +0 -0
- package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.md +3 -3
- package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.tsx +0 -0
- package/src/components/{SearchSelect → Functional/SearchSelect}/index.less +0 -0
- package/src/components/{SearchSelect → Functional/SearchSelect}/index.md +14 -11
- package/src/components/{SearchSelect → Functional/SearchSelect}/index.tsx +225 -105
- package/src/index.ts +5 -4
- package/src/components/SearchSelect/business/BusinessUtils.ts +0 -464
- package/src/components/SearchSelect/business/index.md +0 -181
package/dist/index.js
CHANGED
|
@@ -495,7 +495,7 @@ function boundAlpha(a) {
|
|
|
495
495
|
*/
|
|
496
496
|
function convertToPercentage(n) {
|
|
497
497
|
if (n <= 1) {
|
|
498
|
-
return Number(n) * 100
|
|
498
|
+
return "".concat(Number(n) * 100, "%");
|
|
499
499
|
}
|
|
500
500
|
return n;
|
|
501
501
|
}
|
|
@@ -877,12 +877,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
877
877
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
878
878
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
879
879
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
880
|
-
var CSS_UNIT = "(?:"
|
|
880
|
+
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
|
|
881
881
|
// Actual matching.
|
|
882
882
|
// Parentheses and commas are optional, but not required.
|
|
883
883
|
// Whitespace can take the place of commas or opening paren
|
|
884
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
885
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
884
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
885
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
886
886
|
var matchers = {
|
|
887
887
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
888
888
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -1233,6 +1233,17 @@ function canUseDom() {
|
|
|
1233
1233
|
|
|
1234
1234
|
var MARK_KEY = "rc-util-key";
|
|
1235
1235
|
|
|
1236
|
+
function getMark() {
|
|
1237
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1238
|
+
mark = _ref.mark;
|
|
1239
|
+
|
|
1240
|
+
if (mark) {
|
|
1241
|
+
return mark.startsWith('data-') ? mark : "data-".concat(mark);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
return MARK_KEY;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1236
1247
|
function getContainer(option) {
|
|
1237
1248
|
if (option.attachTo) {
|
|
1238
1249
|
return option.attachTo;
|
|
@@ -1281,7 +1292,7 @@ function findExistNode(key) {
|
|
|
1281
1292
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1282
1293
|
var container = getContainer(option);
|
|
1283
1294
|
return Array.from(containerCache.get(container).children).find(function (node) {
|
|
1284
|
-
return node.tagName === 'STYLE' && node
|
|
1295
|
+
return node.tagName === 'STYLE' && node.getAttribute(getMark(option)) === key;
|
|
1285
1296
|
});
|
|
1286
1297
|
}
|
|
1287
1298
|
function updateCSS(css, key) {
|
|
@@ -1314,7 +1325,7 @@ function updateCSS(css, key) {
|
|
|
1314
1325
|
}
|
|
1315
1326
|
|
|
1316
1327
|
var newNode = injectCSS(css, option);
|
|
1317
|
-
newNode
|
|
1328
|
+
newNode.setAttribute(getMark(option), key);
|
|
1318
1329
|
return newNode;
|
|
1319
1330
|
}
|
|
1320
1331
|
|
|
@@ -1953,7 +1964,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1953
1964
|
_this.getData = function () {
|
|
1954
1965
|
console.time();
|
|
1955
1966
|
var sheetData = luckysheet.getSheetData();
|
|
1956
|
-
var data = sheetData.filter(function (item) {
|
|
1967
|
+
var data = JSON.parse(JSON.stringify(sheetData)).filter(function (item) {
|
|
1957
1968
|
return item[0];
|
|
1958
1969
|
}).map(function (item) {
|
|
1959
1970
|
var obj = {};
|
|
@@ -2389,62 +2400,6 @@ function ToCDB(str) {
|
|
|
2389
2400
|
return tmp;
|
|
2390
2401
|
}
|
|
2391
2402
|
|
|
2392
|
-
/*
|
|
2393
|
-
* @Description:
|
|
2394
|
-
* @Author: rodchen
|
|
2395
|
-
* @Date: 2022-01-14 14:12:01
|
|
2396
|
-
* @LastEditTime: 2022-01-14 17:17:26
|
|
2397
|
-
* @LastEditors: rodchen
|
|
2398
|
-
*/
|
|
2399
|
-
var index = (function (storageKeyString) {
|
|
2400
|
-
var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
2401
|
-
var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
|
|
2402
|
-
if (typeof seconds !== 'number') throw new Error('seconds should be number');
|
|
2403
|
-
var cacheValue = getStorageVale(storageKeyString);
|
|
2404
|
-
|
|
2405
|
-
if (document.hidden !== undefined) {
|
|
2406
|
-
document.addEventListener('visibilitychange', function () {
|
|
2407
|
-
if (!document.hidden) {
|
|
2408
|
-
var currentValue = getStorageVale(storageKeyString);
|
|
2409
|
-
|
|
2410
|
-
if (currentValue !== cacheValue) {
|
|
2411
|
-
if (tipsCallFunction && typeof tipsCallFunction === 'function') {
|
|
2412
|
-
tipsCallFunction();
|
|
2413
|
-
} else {
|
|
2414
|
-
window.alert('检测新用户登录,当前页面会在2s之后刷新!');
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
setTimeout(function () {
|
|
2418
|
-
window.location.reload();
|
|
2419
|
-
}, seconds * 1000);
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
});
|
|
2423
|
-
}
|
|
2424
|
-
});
|
|
2425
|
-
|
|
2426
|
-
function getStorageVale(storageKeyString) {
|
|
2427
|
-
var _storageKeyString$spl = storageKeyString.split('.'),
|
|
2428
|
-
_storageKeyString$spl2 = _toArray(_storageKeyString$spl),
|
|
2429
|
-
localstorage = _storageKeyString$spl2[0],
|
|
2430
|
-
restKeyArrays = _storageKeyString$spl2.slice(1);
|
|
2431
|
-
|
|
2432
|
-
var localStorageInfo = window.localStorage.getItem(localstorage);
|
|
2433
|
-
if (!restKeyArrays.length) return localStorageInfo;
|
|
2434
|
-
var returnVal = JSON.parse(localStorageInfo || '{}');
|
|
2435
|
-
|
|
2436
|
-
for (var i = 0; i < restKeyArrays.length; i++) {
|
|
2437
|
-
returnVal = returnVal[restKeyArrays[i]];
|
|
2438
|
-
if (!returnVal) return '';
|
|
2439
|
-
|
|
2440
|
-
if (typeof returnVal === 'string') {
|
|
2441
|
-
return returnVal;
|
|
2442
|
-
}
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
return "";
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
2403
|
var css_248z$2 = ".search_select_show {\n display: flex;\n}\n.search_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.search_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_wrapper {\n position: relative;\n display: flex;\n min-height: 60vh;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n}\n.search_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.search_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_left {\n width: 28%;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-left: 20px;\n}\n.search_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.search_select_wrapper_right {\n width: 70%;\n margin-left: 1%;\n}\n.search_select_wrapper_right1 {\n width: 100%;\n margin-left: 20px;\n}\n.search_select_wrapper_right,\n.search_select_wrapper_right1 {\n overflow-x: auto;\n}\n.search_select_wrapper .select_list_columns {\n width: 100%;\n height: calc(60vh - 60px);\n overflow-y: auto;\n border: 1px solid #d8d8d8;\n}\n.search_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.search_select_wrapper .select_list_columns_formItems {\n padding: 0 20px;\n}\n.search_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px 0px;\n justify-content: flex-end;\n}\n.search_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 34px;\n line-height: 32px;\n background-color: #eee;\n margin-bottom: 10px;\n padding: 0 12px;\n}\n.search_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n";
|
|
2449
2404
|
styleInject(css_248z$2);
|
|
2450
2405
|
|
|
@@ -2461,7 +2416,9 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
2461
2416
|
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
2462
2417
|
requestConfig = props.requestConfig,
|
|
2463
2418
|
ctx = props.ctx,
|
|
2464
|
-
sourceName = props.sourceName
|
|
2419
|
+
sourceName = props.sourceName,
|
|
2420
|
+
_props$needModalTable = props.needModalTable,
|
|
2421
|
+
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable;
|
|
2465
2422
|
|
|
2466
2423
|
var _ref = requestConfig || {},
|
|
2467
2424
|
url = _ref.url,
|
|
@@ -2606,7 +2563,12 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
2606
2563
|
var _useState31 = React.useState({}),
|
|
2607
2564
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
2608
2565
|
tableFormParams = _useState32[0],
|
|
2609
|
-
setTableFormParams = _useState32[1];
|
|
2566
|
+
setTableFormParams = _useState32[1];
|
|
2567
|
+
|
|
2568
|
+
var _useState33 = React.useState(false),
|
|
2569
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
2570
|
+
tooltipVisible = _useState34[0],
|
|
2571
|
+
setTooltipVisible = _useState34[1]; // 获取数据源 (type: 1下拉框 2弹框 不传值默认为下拉框)
|
|
2610
2572
|
|
|
2611
2573
|
|
|
2612
2574
|
var getData = function getData() {
|
|
@@ -2625,6 +2587,101 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
2625
2587
|
fixedParam[item] = fixedParamVal;
|
|
2626
2588
|
}
|
|
2627
2589
|
});
|
|
2590
|
+
} // 数组对象处理,对带有特殊标记的name进行处理
|
|
2591
|
+
|
|
2592
|
+
|
|
2593
|
+
for (var key in params) {
|
|
2594
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2595
|
+
(function () {
|
|
2596
|
+
var element = params[key];
|
|
2597
|
+
|
|
2598
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
2599
|
+
var dataParams = key.split('*number*');
|
|
2600
|
+
dataParams.forEach(function (value, index) {
|
|
2601
|
+
params[value] = element[index];
|
|
2602
|
+
});
|
|
2603
|
+
delete params[key];
|
|
2604
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
2605
|
+
var _dataParams = key.split('*address*');
|
|
2606
|
+
|
|
2607
|
+
_dataParams.forEach(function (value, index) {
|
|
2608
|
+
params[value] = element.PCDCode[index];
|
|
2609
|
+
});
|
|
2610
|
+
|
|
2611
|
+
delete params[key];
|
|
2612
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
2613
|
+
var _dataParams2 = key.split('*costType*'); // eslint-disable-next-line prefer-destructuring
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
params[_dataParams2[0]] = element[1];
|
|
2617
|
+
delete params[key];
|
|
2618
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
2619
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
2620
|
+
|
|
2621
|
+
_dataParams3.forEach(function (value, index) {
|
|
2622
|
+
if (index === 0) {
|
|
2623
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
2624
|
+
} else {
|
|
2625
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2626
|
+
}
|
|
2627
|
+
});
|
|
2628
|
+
|
|
2629
|
+
delete params[key];
|
|
2630
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2631
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
2632
|
+
|
|
2633
|
+
if (element) {
|
|
2634
|
+
params[_dataParams4[0]] = 0;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
delete params[key];
|
|
2638
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
2639
|
+
var _dataParams5 = key.split('*cascader*');
|
|
2640
|
+
|
|
2641
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
2642
|
+
delete params[key];
|
|
2643
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
2644
|
+
var _dataParams6 = key.split('*date*');
|
|
2645
|
+
|
|
2646
|
+
_dataParams6.forEach(function (value, index) {
|
|
2647
|
+
if (index === 0) {
|
|
2648
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2649
|
+
} else {
|
|
2650
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
|
|
2654
|
+
delete params[key];
|
|
2655
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
2656
|
+
var _dataParams7 = key.split('*');
|
|
2657
|
+
|
|
2658
|
+
_dataParams7.forEach(function (value, index) {
|
|
2659
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2660
|
+
});
|
|
2661
|
+
|
|
2662
|
+
delete params[key];
|
|
2663
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2664
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2665
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2666
|
+
|
|
2667
|
+
if (params[key][0] === 'range') {
|
|
2668
|
+
if (params[key][1][0]) {
|
|
2669
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
if (params[key][1][1]) {
|
|
2673
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2674
|
+
}
|
|
2675
|
+
} else {
|
|
2676
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
delete params[key];
|
|
2680
|
+
} else if (Array.isArray(element)) {
|
|
2681
|
+
params[key] = element.join(',');
|
|
2682
|
+
}
|
|
2683
|
+
})();
|
|
2684
|
+
}
|
|
2628
2685
|
}
|
|
2629
2686
|
|
|
2630
2687
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
@@ -3015,11 +3072,57 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3015
3072
|
}
|
|
3016
3073
|
};
|
|
3017
3074
|
|
|
3075
|
+
var TooltipContent = function TooltipContent() {
|
|
3076
|
+
if (selectMode && value && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
3077
|
+
var listSelected = JSON.parse(JSON.stringify(items)).filter(function (i) {
|
|
3078
|
+
return value.find(function (item) {
|
|
3079
|
+
return item === i.value;
|
|
3080
|
+
});
|
|
3081
|
+
}) || [];
|
|
3082
|
+
|
|
3083
|
+
var _onClose = function onClose(e, item) {
|
|
3084
|
+
e.preventDefault();
|
|
3085
|
+
var newValue = JSON.parse(JSON.stringify(value)).filter(function (i) {
|
|
3086
|
+
return i !== item.value;
|
|
3087
|
+
});
|
|
3088
|
+
onChange(newValue);
|
|
3089
|
+
};
|
|
3090
|
+
|
|
3091
|
+
return (listSelected === null || listSelected === void 0 ? void 0 : listSelected.length) && listSelected.map(function (i) {
|
|
3092
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tag, {
|
|
3093
|
+
closable: true,
|
|
3094
|
+
onClose: function onClose(e) {
|
|
3095
|
+
return _onClose(e, i);
|
|
3096
|
+
},
|
|
3097
|
+
style: {
|
|
3098
|
+
marginRight: 3,
|
|
3099
|
+
background: '#f5f5f5',
|
|
3100
|
+
height: '24px',
|
|
3101
|
+
border: '1px solid #f0f0f0'
|
|
3102
|
+
}
|
|
3103
|
+
}, i.text);
|
|
3104
|
+
}) || '';
|
|
3105
|
+
} else {
|
|
3106
|
+
setTooltipVisible(false);
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
return '';
|
|
3110
|
+
};
|
|
3111
|
+
|
|
3018
3112
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3019
3113
|
className: 'search_select'
|
|
3020
3114
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3021
3115
|
className: "search_select_show",
|
|
3022
3116
|
id: "search_select_div_".concat(uniqueValue)
|
|
3117
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
3118
|
+
title: TooltipContent,
|
|
3119
|
+
visible: tooltipVisible,
|
|
3120
|
+
trigger: 'hover',
|
|
3121
|
+
onVisibleChange: function onVisibleChange(visible) {
|
|
3122
|
+
if (selectMode && value && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
3123
|
+
setTooltipVisible(visible);
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3023
3126
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
|
|
3024
3127
|
virtual: true,
|
|
3025
3128
|
labelInValue: labelInValue,
|
|
@@ -3062,15 +3165,15 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3062
3165
|
fontSize: '50px'
|
|
3063
3166
|
}
|
|
3064
3167
|
})), /*#__PURE__*/React__default['default'].createElement("div", null, "\u65E0\u5339\u914D\u7ED3\u679C\uFF0C\u8BF7\u66F4\u6362\u5176\u4ED6\u5185\u5BB9\u518D\u8BD5")),
|
|
3065
|
-
onPopupScroll: SelectScroll
|
|
3066
|
-
}, currentSelectProps), {}, {
|
|
3067
|
-
getPopupContainer: function getPopupContainer() {
|
|
3068
|
-
return document.getElementById("search_select_div_".concat(uniqueValue));
|
|
3069
|
-
},
|
|
3168
|
+
onPopupScroll: SelectScroll,
|
|
3070
3169
|
style: {
|
|
3071
|
-
width: 'calc(100% - 30px)'
|
|
3170
|
+
width: needModalTable ? 'calc(100% - 30px)' : 'calc(100%)'
|
|
3072
3171
|
},
|
|
3073
3172
|
placeholder: "\u8BF7\u9009\u62E9"
|
|
3173
|
+
}, currentSelectProps), {}, {
|
|
3174
|
+
getPopupContainer: function getPopupContainer() {
|
|
3175
|
+
return document.getElementById("search_select_div_".concat(uniqueValue));
|
|
3176
|
+
}
|
|
3074
3177
|
}), items.map(function (item) {
|
|
3075
3178
|
return /*#__PURE__*/React__default['default'].createElement(Option, {
|
|
3076
3179
|
key: item.value,
|
|
@@ -3079,7 +3182,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3079
3182
|
text: "".concat(item.textShowKey, " ").concat(item.text),
|
|
3080
3183
|
filterTxt: searchValue
|
|
3081
3184
|
}));
|
|
3082
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
3185
|
+
}))), needModalTable && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
3083
3186
|
style: {
|
|
3084
3187
|
width: '30px',
|
|
3085
3188
|
padding: '2px',
|
|
@@ -3087,7 +3190,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3087
3190
|
},
|
|
3088
3191
|
onClick: showModal,
|
|
3089
3192
|
type: "primary"
|
|
3090
|
-
}, /*#__PURE__*/React__default['default'].createElement(SearchOutlined$2, null))), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
3193
|
+
}, /*#__PURE__*/React__default['default'].createElement(SearchOutlined$2, null))), needModalTable && isModalVisible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
3091
3194
|
width: '80%',
|
|
3092
3195
|
title: modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalTableTitle,
|
|
3093
3196
|
visible: isModalVisible,
|
|
@@ -3177,13 +3280,36 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3177
3280
|
}), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
|
|
3178
3281
|
};
|
|
3179
3282
|
|
|
3283
|
+
var shopFileType = [{
|
|
3284
|
+
text: "线上",
|
|
3285
|
+
value: 'online'
|
|
3286
|
+
}, {
|
|
3287
|
+
text: "线下",
|
|
3288
|
+
value: 'offline'
|
|
3289
|
+
}];
|
|
3290
|
+
var arrivalPaySupportList = [{
|
|
3291
|
+
text: "支持",
|
|
3292
|
+
value: 1
|
|
3293
|
+
}, {
|
|
3294
|
+
text: "不支持",
|
|
3295
|
+
value: 0
|
|
3296
|
+
}];
|
|
3297
|
+
var sharingType = [{
|
|
3298
|
+
text: "共享",
|
|
3299
|
+
value: '10'
|
|
3300
|
+
}, {
|
|
3301
|
+
text: "私有",
|
|
3302
|
+
value: '20'
|
|
3303
|
+
}];
|
|
3304
|
+
|
|
3180
3305
|
var getDicData = function getDicData(dicCode) {
|
|
3181
3306
|
var dicData = {};
|
|
3182
3307
|
|
|
3183
3308
|
{
|
|
3184
3309
|
var storageDic = localStorage.getItem('dicData') ? JSON.parse(localStorage.getItem('dicData') || '{}') : {};
|
|
3185
3310
|
dicData = storageDic[dicCode];
|
|
3186
|
-
}
|
|
3311
|
+
} // @ts-ignore
|
|
3312
|
+
|
|
3187
3313
|
|
|
3188
3314
|
if (!dicData || !dicData.length) ;
|
|
3189
3315
|
|
|
@@ -3196,6 +3322,7 @@ var getDictionarySource = function getDictionarySource(dicCode) {
|
|
|
3196
3322
|
|
|
3197
3323
|
try {
|
|
3198
3324
|
if (needConvertInterger) {
|
|
3325
|
+
// @ts-ignore
|
|
3199
3326
|
dicData = dicData.map(function (item) {
|
|
3200
3327
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
3201
3328
|
value: parseFloat(item.value)
|
|
@@ -3209,7 +3336,8 @@ var getDictionarySource = function getDictionarySource(dicCode) {
|
|
|
3209
3336
|
|
|
3210
3337
|
var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value) {
|
|
3211
3338
|
var dicData = getDicData(dicCode);
|
|
3212
|
-
if (value === undefined) return '';
|
|
3339
|
+
if (value === undefined) return ''; // @ts-ignore
|
|
3340
|
+
|
|
3213
3341
|
var dicItemArray = dicData === null || dicData === void 0 ? void 0 : dicData.filter(function (item) {
|
|
3214
3342
|
return item.value === value.toString();
|
|
3215
3343
|
});
|
|
@@ -3239,11 +3367,14 @@ var loadSelectSource = function loadSelectSource(url, params) {
|
|
|
3239
3367
|
});
|
|
3240
3368
|
};
|
|
3241
3369
|
|
|
3370
|
+
var _getDictionarySource;
|
|
3371
|
+
var hasDictSharingType = (_getDictionarySource = getDictionarySource('UC000013')) === null || _getDictionarySource === void 0 ? void 0 : _getDictionarySource.length;
|
|
3372
|
+
var sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType;
|
|
3242
3373
|
function commonFun(type, prefixUrl) {
|
|
3243
3374
|
// 默认type === 'supplier' 供应商选择器
|
|
3244
3375
|
var requestConfig = {
|
|
3245
3376
|
url: "".concat(prefixUrl.selectPrefix, "/supplier"),
|
|
3246
|
-
filter: 'qp-
|
|
3377
|
+
filter: 'qp-name,code-orGroup,like',
|
|
3247
3378
|
otherParams: {
|
|
3248
3379
|
sorter: 'desc-id'
|
|
3249
3380
|
} // 默认参数
|
|
@@ -3280,7 +3411,7 @@ function commonFun(type, prefixUrl) {
|
|
|
3280
3411
|
var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
|
|
3281
3412
|
return {
|
|
3282
3413
|
title: treeDataItem[resKeyValue[1]],
|
|
3283
|
-
|
|
3414
|
+
value: treeDataItem[resKeyValue[0]],
|
|
3284
3415
|
parentId: treeDataItem.parent,
|
|
3285
3416
|
data: _objectSpread2({}, treeDataItem),
|
|
3286
3417
|
isLeaf: !haveChildren,
|
|
@@ -3302,15 +3433,15 @@ function commonFun(type, prefixUrl) {
|
|
|
3302
3433
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
3303
3434
|
};
|
|
3304
3435
|
|
|
3305
|
-
var tableSearchForm = [];
|
|
3436
|
+
var tableSearchForm = []; // 供应商选择器
|
|
3306
3437
|
|
|
3307
3438
|
if (type === 'supplier') {
|
|
3308
3439
|
tableSearchForm = [{
|
|
3309
3440
|
name: 'qp-name-like',
|
|
3310
|
-
label: '
|
|
3441
|
+
label: '供应商名称'
|
|
3311
3442
|
}, {
|
|
3312
3443
|
name: 'qp-code-like',
|
|
3313
|
-
label: '
|
|
3444
|
+
label: '供应商编码'
|
|
3314
3445
|
}, {
|
|
3315
3446
|
name: 'qp-conglomerateCode-in',
|
|
3316
3447
|
type: 'select',
|
|
@@ -3372,7 +3503,7 @@ function commonFun(type, prefixUrl) {
|
|
|
3372
3503
|
name: 'qp-sharingType-eq',
|
|
3373
3504
|
type: 'select',
|
|
3374
3505
|
label: '共享类型',
|
|
3375
|
-
initialSource:
|
|
3506
|
+
initialSource: sharingTypeDataList
|
|
3376
3507
|
}];
|
|
3377
3508
|
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
3378
3509
|
pageSize: 5000,
|
|
@@ -3396,10 +3527,10 @@ function commonFun(type, prefixUrl) {
|
|
|
3396
3527
|
modalTableTitle: '选择供应商',
|
|
3397
3528
|
tableSearchForm: tableSearchForm,
|
|
3398
3529
|
tableColumns: [{
|
|
3399
|
-
title: '
|
|
3530
|
+
title: '供应商编码',
|
|
3400
3531
|
dataIndex: 'code'
|
|
3401
3532
|
}, {
|
|
3402
|
-
title: '
|
|
3533
|
+
title: '供应商名称',
|
|
3403
3534
|
dataIndex: 'name'
|
|
3404
3535
|
}, {
|
|
3405
3536
|
title: '归属集团',
|
|
@@ -3414,15 +3545,20 @@ function commonFun(type, prefixUrl) {
|
|
|
3414
3545
|
title: '共享类型',
|
|
3415
3546
|
dataIndex: 'sharingType',
|
|
3416
3547
|
render: function render(text) {
|
|
3417
|
-
|
|
3548
|
+
var _sharingType$find;
|
|
3549
|
+
|
|
3550
|
+
return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find = sharingType.find(function (i) {
|
|
3551
|
+
return i.value === text;
|
|
3552
|
+
})) === null || _sharingType$find === void 0 ? void 0 : _sharingType$find.text;
|
|
3418
3553
|
}
|
|
3419
3554
|
}]
|
|
3420
|
-
};
|
|
3555
|
+
};
|
|
3556
|
+
var needModalTable = true; // 商品选择器
|
|
3421
3557
|
|
|
3422
3558
|
if (type === 'skuCommodity') {
|
|
3423
3559
|
requestConfig = {
|
|
3424
3560
|
url: "".concat(prefixUrl.selectPrefix, "/sku"),
|
|
3425
|
-
filter: 'qp-
|
|
3561
|
+
filter: 'qp-name,skuCode-orGroup,like',
|
|
3426
3562
|
mappingTextField: 'name',
|
|
3427
3563
|
mappingValueField: 'skuCode',
|
|
3428
3564
|
otherParams: {
|
|
@@ -3554,17 +3690,18 @@ function commonFun(type, prefixUrl) {
|
|
|
3554
3690
|
dataIndex: 'barCode'
|
|
3555
3691
|
}]
|
|
3556
3692
|
};
|
|
3557
|
-
} //
|
|
3693
|
+
} // 仓库选择器(物理、逻辑仓)
|
|
3558
3694
|
|
|
3559
3695
|
|
|
3560
3696
|
if (type === 'physicalWarehouse') {
|
|
3561
3697
|
requestConfig = {
|
|
3562
3698
|
url: "".concat(prefixUrl.selectPrefix, "/physicalWarehouse"),
|
|
3563
|
-
filter: 'qp-
|
|
3699
|
+
filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like',
|
|
3564
3700
|
mappingTextField: 'physicalWarehouseName',
|
|
3565
3701
|
mappingTextShowKeyField: 'physicalWarehouseCode',
|
|
3566
3702
|
mappingValueField: 'id',
|
|
3567
3703
|
otherParams: {
|
|
3704
|
+
'qp-isEnable-eq': 1,
|
|
3568
3705
|
sorter: 'desc-id'
|
|
3569
3706
|
},
|
|
3570
3707
|
sourceName: 'warehouseIds'
|
|
@@ -3599,11 +3736,6 @@ function commonFun(type, prefixUrl) {
|
|
|
3599
3736
|
}
|
|
3600
3737
|
}
|
|
3601
3738
|
}
|
|
3602
|
-
}, {
|
|
3603
|
-
name: 'qp-isEnable-eq',
|
|
3604
|
-
type: 'select',
|
|
3605
|
-
label: '物理仓状态',
|
|
3606
|
-
initialSource: getDictionarySource('SC00001')
|
|
3607
3739
|
}];
|
|
3608
3740
|
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
3609
3741
|
pageSize: 5000,
|
|
@@ -3627,12 +3759,6 @@ function commonFun(type, prefixUrl) {
|
|
|
3627
3759
|
render: function render(text) {
|
|
3628
3760
|
return getDictionaryTextByValue('SC00002', text);
|
|
3629
3761
|
}
|
|
3630
|
-
}, {
|
|
3631
|
-
title: '物理仓状态',
|
|
3632
|
-
dataIndex: 'isEnable',
|
|
3633
|
-
render: function render(text) {
|
|
3634
|
-
return getDictionaryTextByValue('SC00001', text);
|
|
3635
|
-
}
|
|
3636
3762
|
}, {
|
|
3637
3763
|
title: '所属公司',
|
|
3638
3764
|
dataIndex: 'companyName'
|
|
@@ -3643,11 +3769,12 @@ function commonFun(type, prefixUrl) {
|
|
|
3643
3769
|
if (type === 'realWarehouse') {
|
|
3644
3770
|
requestConfig = {
|
|
3645
3771
|
url: "".concat(prefixUrl.selectPrefix, "/realWarehouse"),
|
|
3646
|
-
filter: 'qp-
|
|
3772
|
+
filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like',
|
|
3647
3773
|
mappingTextField: 'realWarehouseName',
|
|
3648
3774
|
mappingTextShowKeyField: 'realWarehouseCode',
|
|
3649
3775
|
mappingValueField: 'id',
|
|
3650
3776
|
otherParams: {
|
|
3777
|
+
'qp-isEnable-eq': 1,
|
|
3651
3778
|
sorter: 'desc-id'
|
|
3652
3779
|
},
|
|
3653
3780
|
sourceName: 'warehouseIds'
|
|
@@ -3663,11 +3790,6 @@ function commonFun(type, prefixUrl) {
|
|
|
3663
3790
|
type: 'select',
|
|
3664
3791
|
label: '逻辑仓类型',
|
|
3665
3792
|
initialSource: getDictionarySource('SC00004')
|
|
3666
|
-
}, {
|
|
3667
|
-
name: 'qp-isEnable-eq',
|
|
3668
|
-
type: 'select',
|
|
3669
|
-
label: '逻辑仓状态',
|
|
3670
|
-
initialSource: getDictionarySource('SC00001')
|
|
3671
3793
|
}];
|
|
3672
3794
|
modalTableProps = {
|
|
3673
3795
|
modalTableTitle: '选择逻辑仓',
|
|
@@ -3684,41 +3806,732 @@ function commonFun(type, prefixUrl) {
|
|
|
3684
3806
|
render: function render(text) {
|
|
3685
3807
|
return getDictionaryTextByValue('SC00004', text);
|
|
3686
3808
|
}
|
|
3687
|
-
}, {
|
|
3688
|
-
title: '逻辑仓状态',
|
|
3689
|
-
dataIndex: 'isEnable',
|
|
3690
|
-
render: function render(text) {
|
|
3691
|
-
return getDictionaryTextByValue('SC00001', text);
|
|
3692
|
-
}
|
|
3693
3809
|
}]
|
|
3694
3810
|
};
|
|
3695
|
-
}
|
|
3811
|
+
} // 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
3696
3812
|
|
|
3697
|
-
return {
|
|
3698
|
-
modalTableProps: modalTableProps,
|
|
3699
|
-
requestConfig: requestConfig
|
|
3700
|
-
};
|
|
3701
|
-
}
|
|
3702
3813
|
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3814
|
+
if (type === 'virtualWarehouse') {
|
|
3815
|
+
requestConfig = {
|
|
3816
|
+
url: "".concat(prefixUrl.selectPrefix, "/virtualWarehouse"),
|
|
3817
|
+
filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like',
|
|
3818
|
+
mappingTextField: 'virtualWarehouseName',
|
|
3819
|
+
mappingTextShowKeyField: 'virtualWarehouseCode',
|
|
3820
|
+
mappingValueField: 'id',
|
|
3821
|
+
otherParams: {
|
|
3822
|
+
'qp-isEnable-eq': 1,
|
|
3823
|
+
sorter: 'desc-id'
|
|
3824
|
+
},
|
|
3825
|
+
sourceName: 'warehouseIds'
|
|
3826
|
+
};
|
|
3827
|
+
needModalTable = false;
|
|
3828
|
+
}
|
|
3709
3829
|
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3830
|
+
if (type === 'channelWarehouse') {
|
|
3831
|
+
requestConfig = {
|
|
3832
|
+
url: "".concat(prefixUrl.selectPrefix, "/channelWarehouse"),
|
|
3833
|
+
filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like',
|
|
3834
|
+
mappingTextField: 'channelWarehouseName',
|
|
3835
|
+
mappingTextShowKeyField: 'channelWarehouseCode',
|
|
3836
|
+
mappingValueField: 'id',
|
|
3837
|
+
otherParams: {
|
|
3838
|
+
'qp-isEnable-eq': 1,
|
|
3839
|
+
sorter: 'desc-id'
|
|
3840
|
+
},
|
|
3841
|
+
sourceName: 'warehouseIds'
|
|
3842
|
+
};
|
|
3843
|
+
needModalTable = false;
|
|
3844
|
+
} // 客户选择器
|
|
3713
3845
|
|
|
3714
|
-
var currentProps = _objectSpread2(_objectSpread2({
|
|
3715
|
-
requestConfig: requestConfig
|
|
3716
|
-
}, props), {}, {
|
|
3717
|
-
modalTableProps: modalTableProps
|
|
3718
|
-
});
|
|
3719
3846
|
|
|
3720
|
-
|
|
3721
|
-
|
|
3847
|
+
if (type === 'customer') {
|
|
3848
|
+
requestConfig = {
|
|
3849
|
+
url: "".concat(prefixUrl.selectPrefix, "/uc/customer/v2"),
|
|
3850
|
+
filter: 'qp-name,code-orGroup,like',
|
|
3851
|
+
mappingTextField: 'name',
|
|
3852
|
+
mappingValueField: 'code',
|
|
3853
|
+
otherParams: {
|
|
3854
|
+
sorter: 'desc-id'
|
|
3855
|
+
},
|
|
3856
|
+
sourceName: 'customCode'
|
|
3857
|
+
};
|
|
3858
|
+
tableSearchForm = [{
|
|
3859
|
+
name: 'qp-name-like',
|
|
3860
|
+
label: '客户名称'
|
|
3861
|
+
}, {
|
|
3862
|
+
name: 'qp-code-like',
|
|
3863
|
+
label: '客户编码'
|
|
3864
|
+
}, {
|
|
3865
|
+
name: 'qp-conglomerateCode-in',
|
|
3866
|
+
type: 'select',
|
|
3867
|
+
label: '归属集团',
|
|
3868
|
+
field: {
|
|
3869
|
+
type: 'select',
|
|
3870
|
+
props: {
|
|
3871
|
+
mode: 'multiple',
|
|
3872
|
+
notFoundContent: '暂无数据',
|
|
3873
|
+
allowClear: true,
|
|
3874
|
+
showSearch: true,
|
|
3875
|
+
showArrow: true,
|
|
3876
|
+
maxTagCount: 1,
|
|
3877
|
+
optionFilterProp: 'children',
|
|
3878
|
+
filterOption: function filterOption(input, option) {
|
|
3879
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
}, {
|
|
3884
|
+
name: 'qp-accountingCode-in',
|
|
3885
|
+
type: 'select',
|
|
3886
|
+
label: '归属核算主体',
|
|
3887
|
+
field: {
|
|
3888
|
+
type: 'select',
|
|
3889
|
+
props: {
|
|
3890
|
+
mode: 'multiple',
|
|
3891
|
+
notFoundContent: '暂无数据',
|
|
3892
|
+
allowClear: true,
|
|
3893
|
+
showSearch: true,
|
|
3894
|
+
showArrow: true,
|
|
3895
|
+
maxTagCount: 1,
|
|
3896
|
+
optionFilterProp: 'children',
|
|
3897
|
+
filterOption: function filterOption(input, option) {
|
|
3898
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
}, {
|
|
3903
|
+
name: 'qp-companyCode-in',
|
|
3904
|
+
type: 'select',
|
|
3905
|
+
label: '归属法人公司',
|
|
3906
|
+
field: {
|
|
3907
|
+
type: 'select',
|
|
3908
|
+
props: {
|
|
3909
|
+
mode: 'multiple',
|
|
3910
|
+
notFoundContent: '暂无数据',
|
|
3911
|
+
allowClear: true,
|
|
3912
|
+
showSearch: true,
|
|
3913
|
+
showArrow: true,
|
|
3914
|
+
maxTagCount: 1,
|
|
3915
|
+
optionFilterProp: 'children',
|
|
3916
|
+
filterOption: function filterOption(input, option) {
|
|
3917
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
}, {
|
|
3922
|
+
name: 'qp-sharingType-eq',
|
|
3923
|
+
type: 'select',
|
|
3924
|
+
label: '共享类型',
|
|
3925
|
+
initialSource: sharingTypeDataList
|
|
3926
|
+
}];
|
|
3927
|
+
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
3928
|
+
pageSize: 5000,
|
|
3929
|
+
currentPage: 1,
|
|
3930
|
+
'qp-companyType-eq': '30'
|
|
3931
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/accountingSubject"), {
|
|
3932
|
+
pageSize: 5000,
|
|
3933
|
+
currentPage: 1
|
|
3934
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
3935
|
+
pageSize: 5000,
|
|
3936
|
+
currentPage: 1,
|
|
3937
|
+
'qp-companyType-eq': '20'
|
|
3938
|
+
})]).then(function (x) {
|
|
3939
|
+
formatSource(x, 0, 2, tableSearchForm);
|
|
3940
|
+
formatSource(x, 1, 3, tableSearchForm);
|
|
3941
|
+
formatSource(x, 2, 4, tableSearchForm);
|
|
3942
|
+
});
|
|
3943
|
+
modalTableProps = {
|
|
3944
|
+
modalTableTitle: '选择客户',
|
|
3945
|
+
tableSearchForm: tableSearchForm,
|
|
3946
|
+
tableColumns: [{
|
|
3947
|
+
title: '客户编码',
|
|
3948
|
+
dataIndex: 'code'
|
|
3949
|
+
}, {
|
|
3950
|
+
title: '客户名称',
|
|
3951
|
+
dataIndex: 'name'
|
|
3952
|
+
}, {
|
|
3953
|
+
title: '归属集团',
|
|
3954
|
+
dataIndex: 'conglomerateName'
|
|
3955
|
+
}, {
|
|
3956
|
+
title: '归属法人公司',
|
|
3957
|
+
dataIndex: 'legalCompanyName'
|
|
3958
|
+
}, {
|
|
3959
|
+
title: '归属核算主体',
|
|
3960
|
+
dataIndex: 'accountingName'
|
|
3961
|
+
}, {
|
|
3962
|
+
title: '共享类型',
|
|
3963
|
+
dataIndex: 'sharingType',
|
|
3964
|
+
render: function render(text) {
|
|
3965
|
+
var _sharingType$find2;
|
|
3966
|
+
|
|
3967
|
+
return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find2 = sharingType.find(function (i) {
|
|
3968
|
+
return i.value === text;
|
|
3969
|
+
})) === null || _sharingType$find2 === void 0 ? void 0 : _sharingType$find2.text;
|
|
3970
|
+
}
|
|
3971
|
+
}]
|
|
3972
|
+
};
|
|
3973
|
+
} // 店铺选择器
|
|
3974
|
+
|
|
3975
|
+
|
|
3976
|
+
if (type === 'shopFile') {
|
|
3977
|
+
requestConfig = {
|
|
3978
|
+
url: "".concat(prefixUrl.selectPrefix, "/store"),
|
|
3979
|
+
filter: 'qp-name,code-orGroup,like',
|
|
3980
|
+
mappingTextField: 'name',
|
|
3981
|
+
mappingValueField: 'code',
|
|
3982
|
+
otherParams: {
|
|
3983
|
+
sorter: 'desc-id'
|
|
3984
|
+
},
|
|
3985
|
+
sourceName: 'code'
|
|
3986
|
+
};
|
|
3987
|
+
tableSearchForm = [{
|
|
3988
|
+
name: 'qp-name-like',
|
|
3989
|
+
label: '店铺名称'
|
|
3990
|
+
}, {
|
|
3991
|
+
name: 'qp-code-like',
|
|
3992
|
+
label: '店铺编码'
|
|
3993
|
+
}, {
|
|
3994
|
+
name: 'qp-conglomerateCode-in',
|
|
3995
|
+
type: 'select',
|
|
3996
|
+
label: '归属集团',
|
|
3997
|
+
field: {
|
|
3998
|
+
type: 'select',
|
|
3999
|
+
props: {
|
|
4000
|
+
mode: 'multiple',
|
|
4001
|
+
notFoundContent: '暂无数据',
|
|
4002
|
+
allowClear: true,
|
|
4003
|
+
showSearch: true,
|
|
4004
|
+
showArrow: true,
|
|
4005
|
+
maxTagCount: 1,
|
|
4006
|
+
optionFilterProp: 'children',
|
|
4007
|
+
filterOption: function filterOption(input, option) {
|
|
4008
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
}, {
|
|
4013
|
+
name: 'qp-companyCode-in',
|
|
4014
|
+
type: 'select',
|
|
4015
|
+
label: '归属法人公司',
|
|
4016
|
+
field: {
|
|
4017
|
+
type: 'select',
|
|
4018
|
+
props: {
|
|
4019
|
+
mode: 'multiple',
|
|
4020
|
+
notFoundContent: '暂无数据',
|
|
4021
|
+
allowClear: true,
|
|
4022
|
+
showSearch: true,
|
|
4023
|
+
showArrow: true,
|
|
4024
|
+
maxTagCount: 1,
|
|
4025
|
+
optionFilterProp: 'children',
|
|
4026
|
+
filterOption: function filterOption(input, option) {
|
|
4027
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
}, {
|
|
4032
|
+
name: 'qp-type-in',
|
|
4033
|
+
type: 'select',
|
|
4034
|
+
label: '店铺类型',
|
|
4035
|
+
initialSource: shopFileType
|
|
4036
|
+
}, {
|
|
4037
|
+
name: 'qp-plateformCode-in',
|
|
4038
|
+
type: 'select',
|
|
4039
|
+
label: '店铺来源',
|
|
4040
|
+
field: {
|
|
4041
|
+
type: 'select',
|
|
4042
|
+
props: {
|
|
4043
|
+
mode: 'multiple',
|
|
4044
|
+
notFoundContent: '暂无数据',
|
|
4045
|
+
allowClear: true,
|
|
4046
|
+
showSearch: true,
|
|
4047
|
+
showArrow: true,
|
|
4048
|
+
maxTagCount: 1,
|
|
4049
|
+
optionFilterProp: 'children',
|
|
4050
|
+
filterOption: function filterOption(input, option) {
|
|
4051
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
}, {
|
|
4056
|
+
name: 'qp-accountingCode-in',
|
|
4057
|
+
type: 'select',
|
|
4058
|
+
label: '归属核算主体',
|
|
4059
|
+
field: {
|
|
4060
|
+
type: 'select',
|
|
4061
|
+
props: {
|
|
4062
|
+
mode: 'multiple',
|
|
4063
|
+
notFoundContent: '暂无数据',
|
|
4064
|
+
allowClear: true,
|
|
4065
|
+
showSearch: true,
|
|
4066
|
+
showArrow: true,
|
|
4067
|
+
maxTagCount: 1,
|
|
4068
|
+
optionFilterProp: 'children',
|
|
4069
|
+
filterOption: function filterOption(input, option) {
|
|
4070
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
}];
|
|
4075
|
+
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
4076
|
+
pageSize: 5000,
|
|
4077
|
+
currentPage: 1,
|
|
4078
|
+
'qp-companyType-eq': '30'
|
|
4079
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
4080
|
+
pageSize: 5000,
|
|
4081
|
+
currentPage: 1,
|
|
4082
|
+
'qp-companyType-eq': '20'
|
|
4083
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/platformRecord/getPlatformRecordList"), {
|
|
4084
|
+
// pageSize: 5000,
|
|
4085
|
+
// currentPage: 1,
|
|
4086
|
+
'qp-status-eq': '1'
|
|
4087
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/accountingSubject"), {
|
|
4088
|
+
pageSize: 5000,
|
|
4089
|
+
currentPage: 1
|
|
4090
|
+
})]).then(function (x) {
|
|
4091
|
+
formatSource(x, 0, 2, tableSearchForm);
|
|
4092
|
+
formatSource(x, 1, 3, tableSearchForm);
|
|
4093
|
+
formatSource(x, 2, 5, tableSearchForm);
|
|
4094
|
+
formatSource(x, 3, 6, tableSearchForm);
|
|
4095
|
+
});
|
|
4096
|
+
modalTableProps = {
|
|
4097
|
+
modalTableTitle: '选择店铺',
|
|
4098
|
+
tableSearchForm: tableSearchForm,
|
|
4099
|
+
tableColumns: [{
|
|
4100
|
+
title: '店铺编码',
|
|
4101
|
+
dataIndex: 'code'
|
|
4102
|
+
}, {
|
|
4103
|
+
title: '店铺名称',
|
|
4104
|
+
dataIndex: 'name'
|
|
4105
|
+
}, {
|
|
4106
|
+
title: '归属集团',
|
|
4107
|
+
dataIndex: 'conglomerateName'
|
|
4108
|
+
}, {
|
|
4109
|
+
title: '归属法人公司',
|
|
4110
|
+
dataIndex: 'companyName'
|
|
4111
|
+
}, {
|
|
4112
|
+
title: '店铺类型',
|
|
4113
|
+
dataIndex: 'type',
|
|
4114
|
+
render: function render(text) {
|
|
4115
|
+
var _shopFileType$find;
|
|
4116
|
+
|
|
4117
|
+
return (_shopFileType$find = shopFileType.find(function (i) {
|
|
4118
|
+
return i.value === text;
|
|
4119
|
+
})) === null || _shopFileType$find === void 0 ? void 0 : _shopFileType$find.text;
|
|
4120
|
+
}
|
|
4121
|
+
}, {
|
|
4122
|
+
title: '店铺来源',
|
|
4123
|
+
dataIndex: 'platformName'
|
|
4124
|
+
}, {
|
|
4125
|
+
title: '归属核算主体',
|
|
4126
|
+
dataIndex: 'accountingName'
|
|
4127
|
+
}]
|
|
4128
|
+
};
|
|
4129
|
+
} // 核算主体选择器(无弹窗)
|
|
4130
|
+
|
|
4131
|
+
|
|
4132
|
+
if (type === 'accountingSubject') {
|
|
4133
|
+
requestConfig = {
|
|
4134
|
+
url: "".concat(prefixUrl.selectPrefix, "/accountingSubject"),
|
|
4135
|
+
filter: 'qp-name,code-orGroup,like',
|
|
4136
|
+
mappingTextField: 'name',
|
|
4137
|
+
mappingTextShowKeyField: 'code',
|
|
4138
|
+
mappingValueField: 'id',
|
|
4139
|
+
otherParams: {
|
|
4140
|
+
sorter: 'desc-id'
|
|
4141
|
+
},
|
|
4142
|
+
sourceName: 'accountingSubjectCode'
|
|
4143
|
+
};
|
|
4144
|
+
needModalTable = false;
|
|
4145
|
+
} // 库存组织选择器(无弹窗)
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
if (type === 'inventoryOrg') {
|
|
4149
|
+
requestConfig = {
|
|
4150
|
+
url: "".concat(prefixUrl.selectPrefix, "/inventoryOrg"),
|
|
4151
|
+
filter: 'qp-name,code-orGroup,like',
|
|
4152
|
+
mappingTextField: 'name',
|
|
4153
|
+
mappingTextShowKeyField: 'code',
|
|
4154
|
+
mappingValueField: 'id',
|
|
4155
|
+
otherParams: {
|
|
4156
|
+
sorter: 'desc-id'
|
|
4157
|
+
},
|
|
4158
|
+
sourceName: 'inventoryOrgCode'
|
|
4159
|
+
};
|
|
4160
|
+
needModalTable = false;
|
|
4161
|
+
} // 法人公司选择器(无弹窗)
|
|
4162
|
+
|
|
4163
|
+
|
|
4164
|
+
if (type === 'corporationCompany') {
|
|
4165
|
+
requestConfig = {
|
|
4166
|
+
url: "".concat(prefixUrl.selectPrefix, "/company"),
|
|
4167
|
+
filter: 'qp-name,code-orGroup,like',
|
|
4168
|
+
mappingTextField: 'name',
|
|
4169
|
+
mappingTextShowKeyField: 'code',
|
|
4170
|
+
mappingValueField: 'id',
|
|
4171
|
+
otherParams: {
|
|
4172
|
+
sorter: 'desc-id'
|
|
4173
|
+
},
|
|
4174
|
+
sourceName: 'corporationCompany'
|
|
4175
|
+
};
|
|
4176
|
+
needModalTable = false;
|
|
4177
|
+
} // 员工选择器
|
|
4178
|
+
|
|
4179
|
+
|
|
4180
|
+
if (type === 'employee') {
|
|
4181
|
+
requestConfig = {
|
|
4182
|
+
url: "".concat(prefixUrl.selectPrefix, "/employee/v2"),
|
|
4183
|
+
filter: 'qp-name,employeeNumber-orGroup,like',
|
|
4184
|
+
mappingTextField: 'name',
|
|
4185
|
+
mappingTextShowKeyField: 'employeeNumber',
|
|
4186
|
+
mappingValueField: 'employeeNumber',
|
|
4187
|
+
otherParams: {
|
|
4188
|
+
'qp-enable-eq': 10,
|
|
4189
|
+
sorter: 'desc-id'
|
|
4190
|
+
},
|
|
4191
|
+
sourceName: 'employeeNumber'
|
|
4192
|
+
};
|
|
4193
|
+
tableSearchForm = [{
|
|
4194
|
+
name: 'qp-name-like',
|
|
4195
|
+
label: '员工名称'
|
|
4196
|
+
}, {
|
|
4197
|
+
name: 'qp-employeeNumber-like',
|
|
4198
|
+
label: '员工编码'
|
|
4199
|
+
}, {
|
|
4200
|
+
name: 'qp-companyCode-in',
|
|
4201
|
+
type: 'select',
|
|
4202
|
+
label: '所属公司',
|
|
4203
|
+
field: {
|
|
4204
|
+
type: 'select',
|
|
4205
|
+
props: {
|
|
4206
|
+
mode: 'multiple',
|
|
4207
|
+
notFoundContent: '暂无数据',
|
|
4208
|
+
allowClear: true,
|
|
4209
|
+
showSearch: true,
|
|
4210
|
+
showArrow: true,
|
|
4211
|
+
maxTagCount: 1,
|
|
4212
|
+
optionFilterProp: 'children',
|
|
4213
|
+
filterOption: function filterOption(input, option) {
|
|
4214
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4215
|
+
}
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4218
|
+
}, {
|
|
4219
|
+
name: 'qp-email-like',
|
|
4220
|
+
label: '邮箱'
|
|
4221
|
+
}, {
|
|
4222
|
+
name: 'qp-officeTelephone-like',
|
|
4223
|
+
label: '手机号'
|
|
4224
|
+
}];
|
|
4225
|
+
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
4226
|
+
pageSize: 5000,
|
|
4227
|
+
currentPage: 1,
|
|
4228
|
+
'qp-companyType-eq': 20
|
|
4229
|
+
})]).then(function (x) {
|
|
4230
|
+
formatSource(x, 0, 2, tableSearchForm);
|
|
4231
|
+
});
|
|
4232
|
+
modalTableProps = {
|
|
4233
|
+
modalTableTitle: '选择员工',
|
|
4234
|
+
tableSearchForm: tableSearchForm,
|
|
4235
|
+
tableColumns: [{
|
|
4236
|
+
title: '员工编码',
|
|
4237
|
+
dataIndex: 'employeeNumber'
|
|
4238
|
+
}, {
|
|
4239
|
+
title: '员工名称',
|
|
4240
|
+
dataIndex: 'name'
|
|
4241
|
+
}, {
|
|
4242
|
+
title: '所属公司',
|
|
4243
|
+
dataIndex: 'companyName'
|
|
4244
|
+
}, {
|
|
4245
|
+
title: '邮箱',
|
|
4246
|
+
dataIndex: 'email'
|
|
4247
|
+
}, {
|
|
4248
|
+
title: '手机号',
|
|
4249
|
+
dataIndex: 'officeTelephone'
|
|
4250
|
+
}]
|
|
4251
|
+
};
|
|
4252
|
+
} // 配送方式选择器
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
if (type === 'deliveryMode') {
|
|
4256
|
+
requestConfig = {
|
|
4257
|
+
url: "".concat(prefixUrl.selectPrefix, "/deliveryMode"),
|
|
4258
|
+
filter: 'qp-name,code-orGroup,like',
|
|
4259
|
+
mappingTextField: 'name',
|
|
4260
|
+
mappingTextShowKeyField: 'code',
|
|
4261
|
+
mappingValueField: 'code',
|
|
4262
|
+
otherParams: {
|
|
4263
|
+
sorter: 'desc-id'
|
|
4264
|
+
},
|
|
4265
|
+
sourceName: 'deliveryModeCode'
|
|
4266
|
+
};
|
|
4267
|
+
tableSearchForm = [{
|
|
4268
|
+
name: 'qp-name-like',
|
|
4269
|
+
label: '配送方式名称'
|
|
4270
|
+
}, {
|
|
4271
|
+
name: 'qp-code-like',
|
|
4272
|
+
label: '配送方式编码'
|
|
4273
|
+
}, {
|
|
4274
|
+
name: 'qp-logisCompanyCode-in',
|
|
4275
|
+
type: 'select',
|
|
4276
|
+
label: '所属物流商',
|
|
4277
|
+
field: {
|
|
4278
|
+
type: 'select',
|
|
4279
|
+
props: {
|
|
4280
|
+
mode: 'multiple',
|
|
4281
|
+
notFoundContent: '暂无数据',
|
|
4282
|
+
allowClear: true,
|
|
4283
|
+
showSearch: true,
|
|
4284
|
+
showArrow: true,
|
|
4285
|
+
maxTagCount: 1,
|
|
4286
|
+
optionFilterProp: 'children',
|
|
4287
|
+
filterOption: function filterOption(input, option) {
|
|
4288
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
}, {
|
|
4293
|
+
name: 'qp-recordChannnelCode-in',
|
|
4294
|
+
type: 'select',
|
|
4295
|
+
label: '单号获取通道',
|
|
4296
|
+
initialSource: getDictionarySource('BSC00004')
|
|
4297
|
+
}, {
|
|
4298
|
+
name: 'qp-arrivalPaySupport-in',
|
|
4299
|
+
type: 'select',
|
|
4300
|
+
label: '是否支持到付',
|
|
4301
|
+
initialSource: arrivalPaySupportList
|
|
4302
|
+
}, {
|
|
4303
|
+
name: 'qp-sheetTemplateCode-in',
|
|
4304
|
+
type: 'select',
|
|
4305
|
+
label: '面单模板',
|
|
4306
|
+
field: {
|
|
4307
|
+
type: 'select',
|
|
4308
|
+
props: {
|
|
4309
|
+
mode: 'multiple',
|
|
4310
|
+
notFoundContent: '暂无数据',
|
|
4311
|
+
allowClear: true,
|
|
4312
|
+
showSearch: true,
|
|
4313
|
+
showArrow: true,
|
|
4314
|
+
maxTagCount: 1,
|
|
4315
|
+
optionFilterProp: 'children',
|
|
4316
|
+
filterOption: function filterOption(input, option) {
|
|
4317
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
}, {
|
|
4322
|
+
name: 'qp-remark-like',
|
|
4323
|
+
label: '备注'
|
|
4324
|
+
}];
|
|
4325
|
+
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/logisCompany"), {
|
|
4326
|
+
pageSize: 5000,
|
|
4327
|
+
currentPage: 1
|
|
4328
|
+
}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/printTemplate"), {
|
|
4329
|
+
pageSize: 5000,
|
|
4330
|
+
currentPage: 1
|
|
4331
|
+
})]).then(function (x) {
|
|
4332
|
+
formatSource(x, 0, 2, tableSearchForm);
|
|
4333
|
+
formatSource(x, 1, 5, tableSearchForm);
|
|
4334
|
+
});
|
|
4335
|
+
modalTableProps = {
|
|
4336
|
+
modalTableTitle: '选择配送方式',
|
|
4337
|
+
tableSearchForm: tableSearchForm,
|
|
4338
|
+
tableColumns: [{
|
|
4339
|
+
title: '配送方式编码',
|
|
4340
|
+
dataIndex: 'code'
|
|
4341
|
+
}, {
|
|
4342
|
+
title: '配送方式名称',
|
|
4343
|
+
dataIndex: 'name'
|
|
4344
|
+
}, {
|
|
4345
|
+
title: '所属物流商',
|
|
4346
|
+
dataIndex: 'logisCompanyName'
|
|
4347
|
+
}, {
|
|
4348
|
+
dataIndex: 'recordChannnelCode',
|
|
4349
|
+
title: '单号获取通道',
|
|
4350
|
+
render: function render(text) {
|
|
4351
|
+
return getDictionaryTextByValue('BSC00004', text);
|
|
4352
|
+
}
|
|
4353
|
+
}, {
|
|
4354
|
+
dataIndex: 'arrivalPaySupport',
|
|
4355
|
+
title: '是否支持到付',
|
|
4356
|
+
render: function render(text) {
|
|
4357
|
+
var _arrivalPaySupportLis;
|
|
4358
|
+
|
|
4359
|
+
return (_arrivalPaySupportLis = arrivalPaySupportList.find(function (i) {
|
|
4360
|
+
return i.value === text;
|
|
4361
|
+
})) === null || _arrivalPaySupportLis === void 0 ? void 0 : _arrivalPaySupportLis.text;
|
|
4362
|
+
}
|
|
4363
|
+
}, {
|
|
4364
|
+
dataIndex: 'sheetTemplateName',
|
|
4365
|
+
title: '面单模板'
|
|
4366
|
+
}, {
|
|
4367
|
+
dataIndex: 'remark',
|
|
4368
|
+
title: '备注'
|
|
4369
|
+
}]
|
|
4370
|
+
};
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
return {
|
|
4374
|
+
modalTableProps: modalTableProps,
|
|
4375
|
+
requestConfig: requestConfig,
|
|
4376
|
+
needModalTable: needModalTable
|
|
4377
|
+
};
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
var BusinessSearchSelect = function BusinessSearchSelect(props) {
|
|
4381
|
+
var businessType = (props === null || props === void 0 ? void 0 : props.selectBusinessType) || 'supplier';
|
|
4382
|
+
var prefixUrl = (props === null || props === void 0 ? void 0 : props.prefixUrl) || {
|
|
4383
|
+
selectPrefix: '/bop/api',
|
|
4384
|
+
formSelectFix: '/bop/api'
|
|
4385
|
+
};
|
|
4386
|
+
|
|
4387
|
+
var _commonFun = commonFun(businessType, prefixUrl),
|
|
4388
|
+
requestConfig = _commonFun.requestConfig,
|
|
4389
|
+
modalTableProps = _commonFun.modalTableProps,
|
|
4390
|
+
needModalTable = _commonFun.needModalTable;
|
|
4391
|
+
|
|
4392
|
+
var currentProps = _objectSpread2(_objectSpread2({
|
|
4393
|
+
requestConfig: requestConfig
|
|
4394
|
+
}, props), {}, {
|
|
4395
|
+
needModalTable: needModalTable,
|
|
4396
|
+
modalTableProps: modalTableProps
|
|
4397
|
+
});
|
|
4398
|
+
|
|
4399
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(SearchSelect, _objectSpread2({}, currentProps)));
|
|
4400
|
+
};
|
|
4401
|
+
|
|
4402
|
+
var CommodityEntry = function CommodityEntry(props) {
|
|
4403
|
+
var dataValidationRef = React.useRef();
|
|
4404
|
+
var _props$buttonName = props.buttonName,
|
|
4405
|
+
buttonName = _props$buttonName === void 0 ? ' + 录入商品' : _props$buttonName,
|
|
4406
|
+
_props$modalTitle = props.modalTitle,
|
|
4407
|
+
modalTitle = _props$modalTitle === void 0 ? '录入商品' : _props$modalTitle,
|
|
4408
|
+
callbackHideModal = props.callbackHideModal,
|
|
4409
|
+
callbackHandleOk = props.callbackHandleOk,
|
|
4410
|
+
_props$columns = props.columns,
|
|
4411
|
+
columns = _props$columns === void 0 ? ["skuCode", "quantity", "price"] : _props$columns,
|
|
4412
|
+
_props$validDataUrl = props.validDataUrl,
|
|
4413
|
+
validDataUrl = _props$validDataUrl === void 0 ? "/bop/api/recordDetailImport/check" : _props$validDataUrl;
|
|
4414
|
+
|
|
4415
|
+
var _useState = React.useState({
|
|
4416
|
+
maskClosable: false,
|
|
4417
|
+
width: 800,
|
|
4418
|
+
visible: false,
|
|
4419
|
+
title: modalTitle,
|
|
4420
|
+
okText: '确定',
|
|
4421
|
+
cancelText: '取消',
|
|
4422
|
+
hideModal: function hideModal() {
|
|
4423
|
+
setModalProps(function () {
|
|
4424
|
+
return _objectSpread2(_objectSpread2({}, modalProps), {}, {
|
|
4425
|
+
visible: false
|
|
4426
|
+
});
|
|
4427
|
+
});
|
|
4428
|
+
callbackHideModal && callbackHideModal();
|
|
4429
|
+
}
|
|
4430
|
+
}),
|
|
4431
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4432
|
+
modalProps = _useState2[0],
|
|
4433
|
+
setModalProps = _useState2[1];
|
|
4434
|
+
|
|
4435
|
+
var handleOk = function handleOk() {
|
|
4436
|
+
// 方法获取当前组件内部的数据,然后进行自身的业务操作
|
|
4437
|
+
var resultData = dataValidationRef.getValidateData();
|
|
4438
|
+
|
|
4439
|
+
if (!resultData.successData.length) {
|
|
4440
|
+
antd.message.error("无校验通过数据,请校验数据");
|
|
4441
|
+
return;
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4444
|
+
if (resultData.failData.length) {
|
|
4445
|
+
antd.message.error("\u6709".concat(resultData.failData.length, "\u6761\u6821\u9A8C\u5931\u8D25\u6570\u636E"));
|
|
4446
|
+
return;
|
|
4447
|
+
}
|
|
4448
|
+
|
|
4449
|
+
callbackHandleOk(resultData, function () {
|
|
4450
|
+
modalProps.hideModal();
|
|
4451
|
+
});
|
|
4452
|
+
};
|
|
4453
|
+
|
|
4454
|
+
var handleShowModal = function handleShowModal() {
|
|
4455
|
+
setModalProps(_objectSpread2(_objectSpread2({}, modalProps), {}, {
|
|
4456
|
+
visible: true
|
|
4457
|
+
}));
|
|
4458
|
+
};
|
|
4459
|
+
|
|
4460
|
+
var handleCancel = function handleCancel() {
|
|
4461
|
+
modalProps.hideModal();
|
|
4462
|
+
};
|
|
4463
|
+
|
|
4464
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
4465
|
+
onClick: handleShowModal
|
|
4466
|
+
}, buttonName), modalProps.visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, _objectSpread2(_objectSpread2({}, modalProps), {}, {
|
|
4467
|
+
onOk: handleOk,
|
|
4468
|
+
onCancel: handleCancel,
|
|
4469
|
+
destroyOnClose: true,
|
|
4470
|
+
zIndex: 15
|
|
4471
|
+
}), /*#__PURE__*/React__default['default'].createElement(DataValidation, {
|
|
4472
|
+
onRef: function onRef(ref) {
|
|
4473
|
+
dataValidationRef = ref;
|
|
4474
|
+
},
|
|
4475
|
+
columns: columns,
|
|
4476
|
+
validDataUrl: validDataUrl
|
|
4477
|
+
})) || '');
|
|
4478
|
+
};
|
|
4479
|
+
|
|
4480
|
+
/*
|
|
4481
|
+
* @Description:
|
|
4482
|
+
* @Author: rodchen
|
|
4483
|
+
* @Date: 2022-01-14 14:12:01
|
|
4484
|
+
* @LastEditTime: 2022-01-14 17:17:26
|
|
4485
|
+
* @LastEditors: rodchen
|
|
4486
|
+
*/
|
|
4487
|
+
var index = (function (storageKeyString) {
|
|
4488
|
+
var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
4489
|
+
var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
|
|
4490
|
+
if (typeof seconds !== 'number') throw new Error('seconds should be number');
|
|
4491
|
+
var cacheValue = getStorageVale(storageKeyString);
|
|
4492
|
+
|
|
4493
|
+
if (document.hidden !== undefined) {
|
|
4494
|
+
document.addEventListener('visibilitychange', function () {
|
|
4495
|
+
if (!document.hidden) {
|
|
4496
|
+
var currentValue = getStorageVale(storageKeyString);
|
|
4497
|
+
|
|
4498
|
+
if (currentValue !== cacheValue) {
|
|
4499
|
+
if (tipsCallFunction && typeof tipsCallFunction === 'function') {
|
|
4500
|
+
tipsCallFunction();
|
|
4501
|
+
} else {
|
|
4502
|
+
window.alert('检测新用户登录,当前页面会在2s之后刷新!');
|
|
4503
|
+
}
|
|
4504
|
+
|
|
4505
|
+
setTimeout(function () {
|
|
4506
|
+
window.location.reload();
|
|
4507
|
+
}, seconds * 1000);
|
|
4508
|
+
}
|
|
4509
|
+
}
|
|
4510
|
+
});
|
|
4511
|
+
}
|
|
4512
|
+
});
|
|
4513
|
+
|
|
4514
|
+
function getStorageVale(storageKeyString) {
|
|
4515
|
+
var _storageKeyString$spl = storageKeyString.split('.'),
|
|
4516
|
+
_storageKeyString$spl2 = _toArray(_storageKeyString$spl),
|
|
4517
|
+
localstorage = _storageKeyString$spl2[0],
|
|
4518
|
+
restKeyArrays = _storageKeyString$spl2.slice(1);
|
|
4519
|
+
|
|
4520
|
+
var localStorageInfo = window.localStorage.getItem(localstorage);
|
|
4521
|
+
if (!restKeyArrays.length) return localStorageInfo;
|
|
4522
|
+
var returnVal = JSON.parse(localStorageInfo || '{}');
|
|
4523
|
+
|
|
4524
|
+
for (var i = 0; i < restKeyArrays.length; i++) {
|
|
4525
|
+
returnVal = returnVal[restKeyArrays[i]];
|
|
4526
|
+
if (!returnVal) return '';
|
|
4527
|
+
|
|
4528
|
+
if (typeof returnVal === 'string') {
|
|
4529
|
+
return returnVal;
|
|
4530
|
+
}
|
|
4531
|
+
}
|
|
4532
|
+
|
|
4533
|
+
return "";
|
|
4534
|
+
}
|
|
3722
4535
|
|
|
3723
4536
|
/*
|
|
3724
4537
|
* @Description:
|
|
@@ -3733,6 +4546,7 @@ axios__default['default'].defaults.headers.common['sso-sessionid'] = (resposne =
|
|
|
3733
4546
|
|
|
3734
4547
|
exports.BusinessSearchSelect = BusinessSearchSelect;
|
|
3735
4548
|
exports.CheckOneUser = index;
|
|
4549
|
+
exports.CommodityEntry = CommodityEntry;
|
|
3736
4550
|
exports.DataValidation = DataValidation;
|
|
3737
4551
|
exports.QueryMutipleInput = QueryMutipleInput;
|
|
3738
4552
|
exports.SearchSelect = SearchSelect;
|