@kmkf-fe-packages/basic-components 2.6.1-beta.1 → 2.6.1-beta.10
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 +45 -5
- package/dist/index.js +45 -5
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -8601,6 +8601,10 @@ var processCallBackStatus = function processCallBackStatus(getValue) {
|
|
|
8601
8601
|
REPAIR_ORDER_STATUS: {
|
|
8602
8602
|
status: 'repairOrderStatusValue',
|
|
8603
8603
|
reason: 'repairOrderStatusReason'
|
|
8604
|
+
},
|
|
8605
|
+
ERP_REMARK: {
|
|
8606
|
+
status: 'erpRemarkStatusValue',
|
|
8607
|
+
reason: 'erpRemarkStatusReason'
|
|
8604
8608
|
}
|
|
8605
8609
|
};
|
|
8606
8610
|
return _defineProperty({}, nex.uniqueKey, {
|
|
@@ -9446,6 +9450,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9446
9450
|
REISSUE_LOGISTICS: processReissueLogistics,
|
|
9447
9451
|
REISSUE_STATUS: processCallBackStatus,
|
|
9448
9452
|
ADJUST_WORK_ORDER_STATUS: processCallBackStatus,
|
|
9453
|
+
ERP_REMARK: processCallBackStatus,
|
|
9449
9454
|
CREATE_STATUS: processCallBackStatus,
|
|
9450
9455
|
INVOICE_STATUS: processCallBackStatus,
|
|
9451
9456
|
INVOICING_STATUS: processCallBackStatus,
|
|
@@ -26395,11 +26400,46 @@ var index$2 = (function (props) {
|
|
|
26395
26400
|
return _ref13.apply(this, arguments);
|
|
26396
26401
|
};
|
|
26397
26402
|
}();
|
|
26398
|
-
var
|
|
26399
|
-
|
|
26403
|
+
var rowKey = rowKeyMap[type] || 'billNo';
|
|
26404
|
+
var handleRadioChange = function handleRadioChange(record) {
|
|
26405
|
+
var _value$selectIds;
|
|
26406
|
+
if (disabled) return;
|
|
26407
|
+
var currentKey = String(value === null || value === void 0 ? void 0 : (_value$selectIds = value.selectIds) === null || _value$selectIds === void 0 ? void 0 : _value$selectIds[0]);
|
|
26408
|
+
var rowKeyVal = String(record[rowKey]);
|
|
26409
|
+
if (currentKey && currentKey === rowKeyVal) {
|
|
26410
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26411
|
+
selectIds: [],
|
|
26412
|
+
selectedRows: []
|
|
26413
|
+
}));
|
|
26414
|
+
} else {
|
|
26415
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26416
|
+
selectIds: [rowKeyVal],
|
|
26417
|
+
selectedRows: [record]
|
|
26418
|
+
}));
|
|
26419
|
+
}
|
|
26420
|
+
};
|
|
26421
|
+
var radioColumn = isRadio ? {
|
|
26422
|
+
width: 50,
|
|
26423
|
+
fixed: true,
|
|
26424
|
+
render: function render(_, record) {
|
|
26425
|
+
var _value$selectIds2;
|
|
26426
|
+
var checked = String(value === null || value === void 0 ? void 0 : (_value$selectIds2 = value.selectIds) === null || _value$selectIds2 === void 0 ? void 0 : _value$selectIds2[0]) === String(record[rowKey]);
|
|
26427
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
26428
|
+
checked: checked,
|
|
26429
|
+
onClick: function onClick(e) {
|
|
26430
|
+
e.preventDefault();
|
|
26431
|
+
handleRadioChange(record);
|
|
26432
|
+
},
|
|
26433
|
+
disabled: disabled
|
|
26434
|
+
});
|
|
26435
|
+
}
|
|
26436
|
+
} : null;
|
|
26437
|
+
var displayColumns = isRadio && radioColumn ? [radioColumn].concat(_toConsumableArray(columns)) : columns;
|
|
26438
|
+
var rowSelection = isRadio ? undefined : {
|
|
26439
|
+
type: 'checkbox',
|
|
26400
26440
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
26401
26441
|
fixed: true,
|
|
26402
|
-
onChange: function onChange(selectedRowKeys, selectedRows
|
|
26442
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
26403
26443
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26404
26444
|
selectIds: selectedRowKeys,
|
|
26405
26445
|
selectedRows: selectedRows
|
|
@@ -26445,9 +26485,9 @@ var index$2 = (function (props) {
|
|
|
26445
26485
|
allowClear: true
|
|
26446
26486
|
})), /*#__PURE__*/React.createElement(Table, {
|
|
26447
26487
|
dataSource: filteredData,
|
|
26448
|
-
columns:
|
|
26488
|
+
columns: displayColumns,
|
|
26449
26489
|
rowSelection: rowSelection,
|
|
26450
|
-
rowKey:
|
|
26490
|
+
rowKey: rowKey,
|
|
26451
26491
|
size: "small",
|
|
26452
26492
|
pagination: false,
|
|
26453
26493
|
scroll: {
|
package/dist/index.js
CHANGED
|
@@ -8616,6 +8616,10 @@ var processCallBackStatus = function processCallBackStatus(getValue) {
|
|
|
8616
8616
|
REPAIR_ORDER_STATUS: {
|
|
8617
8617
|
status: 'repairOrderStatusValue',
|
|
8618
8618
|
reason: 'repairOrderStatusReason'
|
|
8619
|
+
},
|
|
8620
|
+
ERP_REMARK: {
|
|
8621
|
+
status: 'erpRemarkStatusValue',
|
|
8622
|
+
reason: 'erpRemarkStatusReason'
|
|
8619
8623
|
}
|
|
8620
8624
|
};
|
|
8621
8625
|
return _defineProperty({}, nex.uniqueKey, {
|
|
@@ -9461,6 +9465,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9461
9465
|
REISSUE_LOGISTICS: processReissueLogistics,
|
|
9462
9466
|
REISSUE_STATUS: processCallBackStatus,
|
|
9463
9467
|
ADJUST_WORK_ORDER_STATUS: processCallBackStatus,
|
|
9468
|
+
ERP_REMARK: processCallBackStatus,
|
|
9464
9469
|
CREATE_STATUS: processCallBackStatus,
|
|
9465
9470
|
INVOICE_STATUS: processCallBackStatus,
|
|
9466
9471
|
INVOICING_STATUS: processCallBackStatus,
|
|
@@ -26410,11 +26415,46 @@ var index$2 = (function (props) {
|
|
|
26410
26415
|
return _ref13.apply(this, arguments);
|
|
26411
26416
|
};
|
|
26412
26417
|
}();
|
|
26413
|
-
var
|
|
26414
|
-
|
|
26418
|
+
var rowKey = rowKeyMap[type] || 'billNo';
|
|
26419
|
+
var handleRadioChange = function handleRadioChange(record) {
|
|
26420
|
+
var _value$selectIds;
|
|
26421
|
+
if (disabled) return;
|
|
26422
|
+
var currentKey = String(value === null || value === void 0 ? void 0 : (_value$selectIds = value.selectIds) === null || _value$selectIds === void 0 ? void 0 : _value$selectIds[0]);
|
|
26423
|
+
var rowKeyVal = String(record[rowKey]);
|
|
26424
|
+
if (currentKey && currentKey === rowKeyVal) {
|
|
26425
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26426
|
+
selectIds: [],
|
|
26427
|
+
selectedRows: []
|
|
26428
|
+
}));
|
|
26429
|
+
} else {
|
|
26430
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26431
|
+
selectIds: [rowKeyVal],
|
|
26432
|
+
selectedRows: [record]
|
|
26433
|
+
}));
|
|
26434
|
+
}
|
|
26435
|
+
};
|
|
26436
|
+
var radioColumn = isRadio ? {
|
|
26437
|
+
width: 50,
|
|
26438
|
+
fixed: true,
|
|
26439
|
+
render: function render(_, record) {
|
|
26440
|
+
var _value$selectIds2;
|
|
26441
|
+
var checked = String(value === null || value === void 0 ? void 0 : (_value$selectIds2 = value.selectIds) === null || _value$selectIds2 === void 0 ? void 0 : _value$selectIds2[0]) === String(record[rowKey]);
|
|
26442
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Radio, {
|
|
26443
|
+
checked: checked,
|
|
26444
|
+
onClick: function onClick(e) {
|
|
26445
|
+
e.preventDefault();
|
|
26446
|
+
handleRadioChange(record);
|
|
26447
|
+
},
|
|
26448
|
+
disabled: disabled
|
|
26449
|
+
});
|
|
26450
|
+
}
|
|
26451
|
+
} : null;
|
|
26452
|
+
var displayColumns = isRadio && radioColumn ? [radioColumn].concat(_toConsumableArray(columns)) : columns;
|
|
26453
|
+
var rowSelection = isRadio ? undefined : {
|
|
26454
|
+
type: 'checkbox',
|
|
26415
26455
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
26416
26456
|
fixed: true,
|
|
26417
|
-
onChange: function onChange(selectedRowKeys, selectedRows
|
|
26457
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
26418
26458
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
26419
26459
|
selectIds: selectedRowKeys,
|
|
26420
26460
|
selectedRows: selectedRows
|
|
@@ -26460,9 +26500,9 @@ var index$2 = (function (props) {
|
|
|
26460
26500
|
allowClear: true
|
|
26461
26501
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
26462
26502
|
dataSource: filteredData,
|
|
26463
|
-
columns:
|
|
26503
|
+
columns: displayColumns,
|
|
26464
26504
|
rowSelection: rowSelection,
|
|
26465
|
-
rowKey:
|
|
26505
|
+
rowKey: rowKey,
|
|
26466
26506
|
size: "small",
|
|
26467
26507
|
pagination: false,
|
|
26468
26508
|
scroll: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.6.1-beta.
|
|
3
|
+
"version": "2.6.1-beta.10",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.6.1-beta.10",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"ali-react-table": "2.6.1",
|
|
26
26
|
"bignumber.js": "^9.1.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "aa1a82517582f1260e843c4b6160bb4f3fb6ddcf"
|
|
70
70
|
}
|