ztxkui 3.3.8 → 3.3.9
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.
|
@@ -98,7 +98,7 @@ var QunjSeal = function (_a) {
|
|
|
98
98
|
width: '100%',
|
|
99
99
|
} },
|
|
100
100
|
React.createElement(Item, { name: "needQj", label: "", noBorder: true, width: "half" },
|
|
101
|
-
React.createElement(Checkbox, { checked: checked, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u662F\u5426\u52A0\u76D6\u7FA4\u6770\u5370\u7AE0")),
|
|
101
|
+
React.createElement(Checkbox, { checked: checked, disabled: !isEdit, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u662F\u5426\u52A0\u76D6\u7FA4\u6770\u5370\u7AE0")),
|
|
102
102
|
checked ? (React.createElement(React.Fragment, null,
|
|
103
103
|
React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "half" },
|
|
104
104
|
React.createElement(Radio.Group, { style: { padding: '5px 6px' }, disabled: !isEdit },
|
|
@@ -112,7 +112,7 @@ var QunjSeal = function (_a) {
|
|
|
112
112
|
React.createElement(InputNumber, { disabled: !isEdit, min: 0 }))) : (''),
|
|
113
113
|
getSealCheckboxGroupRender())) : (React.createElement(React.Fragment, null)))))) : (React.createElement(Form, { form: form, onValuesChange: onValuesChangeHandle },
|
|
114
114
|
React.createElement(Item, { name: "needQj", label: "", noBorder: true, width: "all" },
|
|
115
|
-
React.createElement(Checkbox, { checked: checked, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u662F\u5426\u52A0\u76D6\u7FA4\u6770\u5370\u7AE0")),
|
|
115
|
+
React.createElement(Checkbox, { checked: checked, disabled: !isEdit, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u662F\u5426\u52A0\u76D6\u7FA4\u6770\u5370\u7AE0")),
|
|
116
116
|
React.createElement(SearchContainer, null, checked ? (React.createElement(SearchLeft, null,
|
|
117
117
|
React.createElement(Item, { name: "vertifyCode", label: "\u7FA4\u6770\u9A8C\u8BC1\u7801", width: "all" },
|
|
118
118
|
React.createElement(Input, { disabled: true })),
|
|
@@ -35,23 +35,36 @@ var SealCheckbox = function (_a) {
|
|
|
35
35
|
if (count < 0) {
|
|
36
36
|
num = 0;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
if (typeof num !== 'number') {
|
|
39
|
+
Reflect.deleteProperty(value, 'sealCount');
|
|
40
|
+
}
|
|
41
|
+
onChange &&
|
|
42
|
+
onChange(__assign(__assign({}, (value || {})), (typeof num === 'number' ? { sealCount: num } : {})));
|
|
39
43
|
};
|
|
40
|
-
return (React.createElement("div", { style: __assign({ padding: '
|
|
41
|
-
|
|
42
|
-
: {})) },
|
|
43
|
-
React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealNo ? true : false, disabled: !isEdit }, name),
|
|
44
|
+
return (React.createElement("div", { style: __assign({ padding: '6px' }, (isOnlyQunj ? { display: 'flex' } : {})) },
|
|
45
|
+
React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealNo ? true : false, disabled: !isEdit, style: { width: '40%' } }, name),
|
|
44
46
|
React.createElement("div", null,
|
|
45
47
|
React.createElement("span", null, "\u7528\u5370\u6B21\u6570\uFF1A"),
|
|
46
|
-
React.createElement(InputNumber, { bordered: false, disabled: !isEdit, min: 0, size: "small", value: typeof (value === null || value === void 0 ? void 0 : value.sealCount) === 'number' ? value === null || value === void 0 ? void 0 : value.sealCount : undefined, onChange: onNumberChange, style: { borderBottom: '1px solid #e9ecf3' } }))));
|
|
48
|
+
React.createElement(InputNumber, { bordered: false, disabled: !isEdit || !(value === null || value === void 0 ? void 0 : value.sealNo), min: 0, size: "small", value: typeof (value === null || value === void 0 ? void 0 : value.sealCount) === 'number' ? value === null || value === void 0 ? void 0 : value.sealCount : undefined, onChange: onNumberChange, style: { borderBottom: '1px solid #e9ecf3' } }))));
|
|
47
49
|
};
|
|
48
50
|
var SealCheckboxGroup = function (_a) {
|
|
49
51
|
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList, handleRef = _a.handleRef, isEdit = _a.isEdit, isOnlyQunj = _a.isOnlyQunj;
|
|
50
|
-
var onChangeHandle = function (_value, index) {
|
|
52
|
+
var onChangeHandle = function (_value, index, sealNo) {
|
|
51
53
|
var _a, _b, _c, _d;
|
|
52
54
|
var contractNum = (_b = (_a = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _a === void 0 ? void 0 : _a.getData().qunjSeal) === null || _b === void 0 ? void 0 : _b.contranctNum;
|
|
53
55
|
var valueArr = Array.isArray(value) ? __spreadArray([], value) : [];
|
|
54
|
-
valueArr.
|
|
56
|
+
var vIndex = valueArr === null || valueArr === void 0 ? void 0 : valueArr.findIndex(function (item) { return item.sealNo === sealNo; });
|
|
57
|
+
if (_value.sealNo) {
|
|
58
|
+
if (typeof (_value === null || _value === void 0 ? void 0 : _value.sealCount) === 'number') {
|
|
59
|
+
valueArr.splice(vIndex, 1, _value);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
valueArr.splice(vIndex, vIndex > -1 ? 1 : 0, _value);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
valueArr.splice(vIndex, 1);
|
|
67
|
+
}
|
|
55
68
|
var totalSealNum = sumBy(valueArr, 'sealCount');
|
|
56
69
|
onChange && onChange(valueArr);
|
|
57
70
|
if (contractNum) {
|
|
@@ -80,7 +93,7 @@ var SealCheckboxGroup = function (_a) {
|
|
|
80
93
|
itemValue = value.find(function (valueItem) { return valueItem.sealNo === item.sealNo; });
|
|
81
94
|
}
|
|
82
95
|
return (React.createElement(SealCheckbox, { key: item === null || item === void 0 ? void 0 : item.sealNo, name: item === null || item === void 0 ? void 0 : item.sealName, id: item === null || item === void 0 ? void 0 : item.sealNo, value: itemValue, isEdit: isEdit, isOnlyQunj: isOnlyQunj, onChange: function (value) {
|
|
83
|
-
onChangeHandle(value, index);
|
|
96
|
+
onChangeHandle(value, index, item.sealNo);
|
|
84
97
|
} }));
|
|
85
98
|
})));
|
|
86
99
|
};
|