kts-component-invoice-operate 3.2.151 → 3.2.153
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 +42 -63
- package/dist/index.js +42 -63
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +0 -1
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/autoFillFn/index.ts +0 -2
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +13 -11
- package/src/Invoice/ui/default/GoodsList/hook/useOnRow/index.tsx +1 -1
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +0 -1
- package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +3 -18
package/dist/index.esm.js
CHANGED
|
@@ -8904,7 +8904,6 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8904
8904
|
while (1) {
|
|
8905
8905
|
switch (_context9.prev = _context9.next) {
|
|
8906
8906
|
case 0:
|
|
8907
|
-
debugger;
|
|
8908
8907
|
err = err || {};
|
|
8909
8908
|
/** 税额 */
|
|
8910
8909
|
|
|
@@ -8919,12 +8918,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8919
8918
|
form.setFieldsValue({
|
|
8920
8919
|
taxAmount: taxAmount
|
|
8921
8920
|
});
|
|
8922
|
-
_context9.next =
|
|
8921
|
+
_context9.next = 7;
|
|
8923
8922
|
return controller.setEditGood({
|
|
8924
8923
|
taxAmount: taxAmount
|
|
8925
8924
|
});
|
|
8926
8925
|
|
|
8927
|
-
case
|
|
8926
|
+
case 7:
|
|
8928
8927
|
// 计算 金额(不含税)
|
|
8929
8928
|
if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
|
|
8930
8929
|
lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax || (editGood === null || editGood === void 0 ? void 0 : editGood.lineAmountIncludeTax), taxAmount);
|
|
@@ -8933,12 +8932,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8933
8932
|
form.setFieldsValue({
|
|
8934
8933
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
8935
8934
|
});
|
|
8936
|
-
_context9.next =
|
|
8935
|
+
_context9.next = 11;
|
|
8937
8936
|
return controller.setEditGood({
|
|
8938
8937
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
8939
8938
|
});
|
|
8940
8939
|
|
|
8941
|
-
case
|
|
8940
|
+
case 11:
|
|
8942
8941
|
// 单价(不含税)
|
|
8943
8942
|
if (lineAmountExcludeTax && !promptErr(err.quantity)) {
|
|
8944
8943
|
priceExcludeTax = countPrice(lineAmountExcludeTax, values.quantity || (editGood === null || editGood === void 0 ? void 0 : editGood.quantity), controller.state.calculatingDigits);
|
|
@@ -8947,12 +8946,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8947
8946
|
form.setFieldsValue({
|
|
8948
8947
|
priceExcludeTax: priceExcludeTax
|
|
8949
8948
|
});
|
|
8950
|
-
_context9.next =
|
|
8949
|
+
_context9.next = 15;
|
|
8951
8950
|
return controller.setEditGood({
|
|
8952
8951
|
priceExcludeTax: priceExcludeTax
|
|
8953
8952
|
});
|
|
8954
8953
|
|
|
8955
|
-
case
|
|
8954
|
+
case 15:
|
|
8956
8955
|
case "end":
|
|
8957
8956
|
return _context9.stop();
|
|
8958
8957
|
}
|
|
@@ -13027,6 +13026,11 @@ var useColumns = (function (form) {
|
|
|
13027
13026
|
var model = controller.useMemo(function (e) {
|
|
13028
13027
|
return e.model;
|
|
13029
13028
|
}, []);
|
|
13029
|
+
/** 计算类型 */
|
|
13030
|
+
|
|
13031
|
+
var calculateType = controller.useMemo(function (e) {
|
|
13032
|
+
return e.goodsListState.calculateType;
|
|
13033
|
+
}, []);
|
|
13030
13034
|
/** 是否启用拖拽 */
|
|
13031
13035
|
|
|
13032
13036
|
var isStart = controller.useMemo(function (e) {
|
|
@@ -13152,7 +13156,7 @@ var useColumns = (function (form) {
|
|
|
13152
13156
|
key: 'itemCode',
|
|
13153
13157
|
width: 119,
|
|
13154
13158
|
render: function render(_, record) {
|
|
13155
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13159
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13156
13160
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemCode', {
|
|
13157
13161
|
initialValue: editGood.itemCode,
|
|
13158
13162
|
rules: [].concat(_toConsumableArray(getReplenishRules('itemCode')), [{
|
|
@@ -13198,7 +13202,7 @@ var useColumns = (function (form) {
|
|
|
13198
13202
|
}, "\u9879\u76EE\u540D\u79F0"),
|
|
13199
13203
|
key: 'itemName',
|
|
13200
13204
|
render: function render(_, record) {
|
|
13201
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13205
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13202
13206
|
return /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
13203
13207
|
style: {
|
|
13204
13208
|
display: 'flex'
|
|
@@ -13301,7 +13305,7 @@ var useColumns = (function (form) {
|
|
|
13301
13305
|
key: 'itemModelName',
|
|
13302
13306
|
width: 119,
|
|
13303
13307
|
render: function render(_, record) {
|
|
13304
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13308
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13305
13309
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemModelName', {
|
|
13306
13310
|
initialValue: isMyShow ? editGood.itemModelNameSelf : editGood.itemModelName,
|
|
13307
13311
|
rules: getReplenishRules('itemModelName')
|
|
@@ -13352,7 +13356,7 @@ var useColumns = (function (form) {
|
|
|
13352
13356
|
key: 'unit',
|
|
13353
13357
|
width: 70,
|
|
13354
13358
|
render: function render(_, record) {
|
|
13355
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13359
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13356
13360
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('unit', {
|
|
13357
13361
|
initialValue: editGood.unit,
|
|
13358
13362
|
rules: getReplenishRules('unit')
|
|
@@ -13410,7 +13414,7 @@ var useColumns = (function (form) {
|
|
|
13410
13414
|
align: 'right',
|
|
13411
13415
|
width: 149,
|
|
13412
13416
|
render: function render(value, record) {
|
|
13413
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13417
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13414
13418
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('quantity', {
|
|
13415
13419
|
initialValue: nonScientificNotation(editGood.quantity),
|
|
13416
13420
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13505,7 +13509,7 @@ var useColumns = (function (form) {
|
|
|
13505
13509
|
align: 'right',
|
|
13506
13510
|
width: 149,
|
|
13507
13511
|
render: function render(value, record) {
|
|
13508
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13512
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13509
13513
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceIncludeTax', {
|
|
13510
13514
|
initialValue: nonScientificNotation(editGood.priceIncludeTax),
|
|
13511
13515
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13580,7 +13584,7 @@ var useColumns = (function (form) {
|
|
|
13580
13584
|
align: 'right',
|
|
13581
13585
|
width: 149,
|
|
13582
13586
|
render: function render(value, record) {
|
|
13583
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13587
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13584
13588
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceExcludeTax', {
|
|
13585
13589
|
initialValue: nonScientificNotation(editGood.priceExcludeTax),
|
|
13586
13590
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13655,7 +13659,7 @@ var useColumns = (function (form) {
|
|
|
13655
13659
|
width: 119,
|
|
13656
13660
|
align: 'right',
|
|
13657
13661
|
render: function render(value, record) {
|
|
13658
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13662
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13659
13663
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('lineAmountIncludeTax', {
|
|
13660
13664
|
initialValue: editGood.lineAmountIncludeTax,
|
|
13661
13665
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13743,7 +13747,7 @@ var useColumns = (function (form) {
|
|
|
13743
13747
|
align: 'right',
|
|
13744
13748
|
width: 119,
|
|
13745
13749
|
render: function render(value, record) {
|
|
13746
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13750
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13747
13751
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('lineAmountExcludeTax', {
|
|
13748
13752
|
initialValue: editGood.lineAmountExcludeTax,
|
|
13749
13753
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13806,7 +13810,7 @@ var useColumns = (function (form) {
|
|
|
13806
13810
|
align: 'right',
|
|
13807
13811
|
width: 75,
|
|
13808
13812
|
render: function render(value, record) {
|
|
13809
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13813
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab' && calculateType === '3')) {
|
|
13810
13814
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('taxRate', {
|
|
13811
13815
|
initialValue: editGood.taxRate,
|
|
13812
13816
|
rules: [].concat(_toConsumableArray(getReplenishRules('taxRate')), [{
|
|
@@ -14148,7 +14152,6 @@ function dcoding(v) {
|
|
|
14148
14152
|
|
|
14149
14153
|
|
|
14150
14154
|
function isDutyFree(record) {
|
|
14151
|
-
console.log(record);
|
|
14152
14155
|
return record.taxFreeType === 1 && record.favouredPolicyName === '免税';
|
|
14153
14156
|
}
|
|
14154
14157
|
|
|
@@ -14165,7 +14168,7 @@ var useOnRow = (function () {
|
|
|
14165
14168
|
while (1) {
|
|
14166
14169
|
switch (_context2.prev = _context2.next) {
|
|
14167
14170
|
case 0:
|
|
14168
|
-
if (!(model === '
|
|
14171
|
+
if (!(model === 'readOnly')) {
|
|
14169
14172
|
_context2.next = 2;
|
|
14170
14173
|
break;
|
|
14171
14174
|
}
|
|
@@ -14173,46 +14176,38 @@ var useOnRow = (function () {
|
|
|
14173
14176
|
return _context2.abrupt("return");
|
|
14174
14177
|
|
|
14175
14178
|
case 2:
|
|
14176
|
-
if (!(model === 'readOnly')) {
|
|
14177
|
-
_context2.next = 4;
|
|
14178
|
-
break;
|
|
14179
|
-
}
|
|
14180
|
-
|
|
14181
|
-
return _context2.abrupt("return");
|
|
14182
|
-
|
|
14183
|
-
case 4:
|
|
14184
14179
|
editGood = controller.state.goodsListState.editGood;
|
|
14185
14180
|
|
|
14186
14181
|
if (!(record.lineAttribute !== LineAttributeType$1.正常)) {
|
|
14187
|
-
_context2.next =
|
|
14182
|
+
_context2.next = 5;
|
|
14188
14183
|
break;
|
|
14189
14184
|
}
|
|
14190
14185
|
|
|
14191
14186
|
return _context2.abrupt("return");
|
|
14192
14187
|
|
|
14193
|
-
case
|
|
14188
|
+
case 5:
|
|
14194
14189
|
if (!editGood) {
|
|
14195
|
-
_context2.next =
|
|
14190
|
+
_context2.next = 16;
|
|
14196
14191
|
break;
|
|
14197
14192
|
}
|
|
14198
14193
|
|
|
14199
14194
|
if (!(editGood.$index === record.$index)) {
|
|
14200
|
-
_context2.next =
|
|
14195
|
+
_context2.next = 8;
|
|
14201
14196
|
break;
|
|
14202
14197
|
}
|
|
14203
14198
|
|
|
14204
14199
|
return _context2.abrupt("return");
|
|
14205
14200
|
|
|
14201
|
+
case 8:
|
|
14202
|
+
_context2.next = 10;
|
|
14203
|
+
return controller.saveEditGood();
|
|
14204
|
+
|
|
14206
14205
|
case 10:
|
|
14207
14206
|
_context2.next = 12;
|
|
14208
|
-
return controller.
|
|
14207
|
+
return controller.wait();
|
|
14209
14208
|
|
|
14210
14209
|
case 12:
|
|
14211
14210
|
_context2.next = 14;
|
|
14212
|
-
return controller.wait();
|
|
14213
|
-
|
|
14214
|
-
case 14:
|
|
14215
|
-
_context2.next = 16;
|
|
14216
14211
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
14217
14212
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
14218
14213
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -14242,15 +14237,15 @@ var useOnRow = (function () {
|
|
|
14242
14237
|
};
|
|
14243
14238
|
}())();
|
|
14244
14239
|
|
|
14245
|
-
case
|
|
14246
|
-
_context2.next =
|
|
14240
|
+
case 14:
|
|
14241
|
+
_context2.next = 18;
|
|
14247
14242
|
break;
|
|
14248
14243
|
|
|
14249
|
-
case
|
|
14250
|
-
_context2.next =
|
|
14244
|
+
case 16:
|
|
14245
|
+
_context2.next = 18;
|
|
14251
14246
|
return controller.setEditGood(record);
|
|
14252
14247
|
|
|
14253
|
-
case
|
|
14248
|
+
case 18:
|
|
14254
14249
|
case "end":
|
|
14255
14250
|
return _context2.stop();
|
|
14256
14251
|
}
|
|
@@ -21045,7 +21040,6 @@ function dcoding$1(v) {
|
|
|
21045
21040
|
|
|
21046
21041
|
|
|
21047
21042
|
function isDutyFree$1(record) {
|
|
21048
|
-
console.log(record);
|
|
21049
21043
|
return record.taxFreeType === 1 && record.favouredPolicyName === '免税';
|
|
21050
21044
|
}
|
|
21051
21045
|
|
|
@@ -22928,27 +22922,12 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
22928
22922
|
}, "\u516C\u9877"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22929
22923
|
value: "\u4EA9"
|
|
22930
22924
|
}, "\u4EA9"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22931
|
-
value: "
|
|
22932
|
-
},
|
|
22933
|
-
|
|
22934
|
-
|
|
22935
|
-
|
|
22936
|
-
|
|
22937
|
-
}, "2"))), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22938
|
-
value: "Km2"
|
|
22939
|
-
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", null, "Km"), /*#__PURE__*/React.createElement("span", {
|
|
22940
|
-
style: {
|
|
22941
|
-
verticalAlign: 'super',
|
|
22942
|
-
fontSize: 'smaller'
|
|
22943
|
-
}
|
|
22944
|
-
}, "2"))), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22945
|
-
value: "m2"
|
|
22946
|
-
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", null, "m"), /*#__PURE__*/React.createElement("span", {
|
|
22947
|
-
style: {
|
|
22948
|
-
verticalAlign: 'super',
|
|
22949
|
-
fontSize: 'smaller'
|
|
22950
|
-
}
|
|
22951
|
-
}, "2")))))))));
|
|
22925
|
+
value: "h\u33A1"
|
|
22926
|
+
}, "h\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22927
|
+
value: "k\u33A1"
|
|
22928
|
+
}, "k\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
22929
|
+
value: "\u33A1"
|
|
22930
|
+
}, "\u33A1")))))));
|
|
22952
22931
|
});
|
|
22953
22932
|
|
|
22954
22933
|
var MyDiv$3 = /*#__PURE__*/function (_React$Component) {
|
package/dist/index.js
CHANGED
|
@@ -8914,7 +8914,6 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8914
8914
|
while (1) {
|
|
8915
8915
|
switch (_context9.prev = _context9.next) {
|
|
8916
8916
|
case 0:
|
|
8917
|
-
debugger;
|
|
8918
8917
|
err = err || {};
|
|
8919
8918
|
/** 税额 */
|
|
8920
8919
|
|
|
@@ -8929,12 +8928,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8929
8928
|
form.setFieldsValue({
|
|
8930
8929
|
taxAmount: taxAmount
|
|
8931
8930
|
});
|
|
8932
|
-
_context9.next =
|
|
8931
|
+
_context9.next = 7;
|
|
8933
8932
|
return controller.setEditGood({
|
|
8934
8933
|
taxAmount: taxAmount
|
|
8935
8934
|
});
|
|
8936
8935
|
|
|
8937
|
-
case
|
|
8936
|
+
case 7:
|
|
8938
8937
|
// 计算 金额(不含税)
|
|
8939
8938
|
if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
|
|
8940
8939
|
lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax || (editGood === null || editGood === void 0 ? void 0 : editGood.lineAmountIncludeTax), taxAmount);
|
|
@@ -8943,12 +8942,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8943
8942
|
form.setFieldsValue({
|
|
8944
8943
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
8945
8944
|
});
|
|
8946
|
-
_context9.next =
|
|
8945
|
+
_context9.next = 11;
|
|
8947
8946
|
return controller.setEditGood({
|
|
8948
8947
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
8949
8948
|
});
|
|
8950
8949
|
|
|
8951
|
-
case
|
|
8950
|
+
case 11:
|
|
8952
8951
|
// 单价(不含税)
|
|
8953
8952
|
if (lineAmountExcludeTax && !promptErr(err.quantity)) {
|
|
8954
8953
|
priceExcludeTax = countPrice(lineAmountExcludeTax, values.quantity || (editGood === null || editGood === void 0 ? void 0 : editGood.quantity), controller.state.calculatingDigits);
|
|
@@ -8957,12 +8956,12 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
|
|
|
8957
8956
|
form.setFieldsValue({
|
|
8958
8957
|
priceExcludeTax: priceExcludeTax
|
|
8959
8958
|
});
|
|
8960
|
-
_context9.next =
|
|
8959
|
+
_context9.next = 15;
|
|
8961
8960
|
return controller.setEditGood({
|
|
8962
8961
|
priceExcludeTax: priceExcludeTax
|
|
8963
8962
|
});
|
|
8964
8963
|
|
|
8965
|
-
case
|
|
8964
|
+
case 15:
|
|
8966
8965
|
case "end":
|
|
8967
8966
|
return _context9.stop();
|
|
8968
8967
|
}
|
|
@@ -13037,6 +13036,11 @@ var useColumns = (function (form) {
|
|
|
13037
13036
|
var model = controller.useMemo(function (e) {
|
|
13038
13037
|
return e.model;
|
|
13039
13038
|
}, []);
|
|
13039
|
+
/** 计算类型 */
|
|
13040
|
+
|
|
13041
|
+
var calculateType = controller.useMemo(function (e) {
|
|
13042
|
+
return e.goodsListState.calculateType;
|
|
13043
|
+
}, []);
|
|
13040
13044
|
/** 是否启用拖拽 */
|
|
13041
13045
|
|
|
13042
13046
|
var isStart = controller.useMemo(function (e) {
|
|
@@ -13162,7 +13166,7 @@ var useColumns = (function (form) {
|
|
|
13162
13166
|
key: 'itemCode',
|
|
13163
13167
|
width: 119,
|
|
13164
13168
|
render: function render(_, record) {
|
|
13165
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13169
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13166
13170
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('itemCode', {
|
|
13167
13171
|
initialValue: editGood.itemCode,
|
|
13168
13172
|
rules: [].concat(_toConsumableArray(getReplenishRules('itemCode')), [{
|
|
@@ -13208,7 +13212,7 @@ var useColumns = (function (form) {
|
|
|
13208
13212
|
}, "\u9879\u76EE\u540D\u79F0"),
|
|
13209
13213
|
key: 'itemName',
|
|
13210
13214
|
render: function render(_, record) {
|
|
13211
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13215
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13212
13216
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13213
13217
|
style: {
|
|
13214
13218
|
display: 'flex'
|
|
@@ -13311,7 +13315,7 @@ var useColumns = (function (form) {
|
|
|
13311
13315
|
key: 'itemModelName',
|
|
13312
13316
|
width: 119,
|
|
13313
13317
|
render: function render(_, record) {
|
|
13314
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13318
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13315
13319
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('itemModelName', {
|
|
13316
13320
|
initialValue: isMyShow ? editGood.itemModelNameSelf : editGood.itemModelName,
|
|
13317
13321
|
rules: getReplenishRules('itemModelName')
|
|
@@ -13362,7 +13366,7 @@ var useColumns = (function (form) {
|
|
|
13362
13366
|
key: 'unit',
|
|
13363
13367
|
width: 70,
|
|
13364
13368
|
render: function render(_, record) {
|
|
13365
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13369
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13366
13370
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('unit', {
|
|
13367
13371
|
initialValue: editGood.unit,
|
|
13368
13372
|
rules: getReplenishRules('unit')
|
|
@@ -13420,7 +13424,7 @@ var useColumns = (function (form) {
|
|
|
13420
13424
|
align: 'right',
|
|
13421
13425
|
width: 149,
|
|
13422
13426
|
render: function render(value, record) {
|
|
13423
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13427
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13424
13428
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('quantity', {
|
|
13425
13429
|
initialValue: nonScientificNotation(editGood.quantity),
|
|
13426
13430
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13515,7 +13519,7 @@ var useColumns = (function (form) {
|
|
|
13515
13519
|
align: 'right',
|
|
13516
13520
|
width: 149,
|
|
13517
13521
|
render: function render(value, record) {
|
|
13518
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13522
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13519
13523
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('priceIncludeTax', {
|
|
13520
13524
|
initialValue: nonScientificNotation(editGood.priceIncludeTax),
|
|
13521
13525
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13590,7 +13594,7 @@ var useColumns = (function (form) {
|
|
|
13590
13594
|
align: 'right',
|
|
13591
13595
|
width: 149,
|
|
13592
13596
|
render: function render(value, record) {
|
|
13593
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13597
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13594
13598
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('priceExcludeTax', {
|
|
13595
13599
|
initialValue: nonScientificNotation(editGood.priceExcludeTax),
|
|
13596
13600
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13665,7 +13669,7 @@ var useColumns = (function (form) {
|
|
|
13665
13669
|
width: 119,
|
|
13666
13670
|
align: 'right',
|
|
13667
13671
|
render: function render(value, record) {
|
|
13668
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13672
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13669
13673
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('lineAmountIncludeTax', {
|
|
13670
13674
|
initialValue: editGood.lineAmountIncludeTax,
|
|
13671
13675
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13753,7 +13757,7 @@ var useColumns = (function (form) {
|
|
|
13753
13757
|
align: 'right',
|
|
13754
13758
|
width: 119,
|
|
13755
13759
|
render: function render(value, record) {
|
|
13756
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13760
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
13757
13761
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('lineAmountExcludeTax', {
|
|
13758
13762
|
initialValue: editGood.lineAmountExcludeTax,
|
|
13759
13763
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -13816,7 +13820,7 @@ var useColumns = (function (form) {
|
|
|
13816
13820
|
align: 'right',
|
|
13817
13821
|
width: 75,
|
|
13818
13822
|
render: function render(value, record) {
|
|
13819
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13823
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab' && calculateType === '3')) {
|
|
13820
13824
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('taxRate', {
|
|
13821
13825
|
initialValue: editGood.taxRate,
|
|
13822
13826
|
rules: [].concat(_toConsumableArray(getReplenishRules('taxRate')), [{
|
|
@@ -14158,7 +14162,6 @@ function dcoding(v) {
|
|
|
14158
14162
|
|
|
14159
14163
|
|
|
14160
14164
|
function isDutyFree(record) {
|
|
14161
|
-
console.log(record);
|
|
14162
14165
|
return record.taxFreeType === 1 && record.favouredPolicyName === '免税';
|
|
14163
14166
|
}
|
|
14164
14167
|
|
|
@@ -14175,7 +14178,7 @@ var useOnRow = (function () {
|
|
|
14175
14178
|
while (1) {
|
|
14176
14179
|
switch (_context2.prev = _context2.next) {
|
|
14177
14180
|
case 0:
|
|
14178
|
-
if (!(model === '
|
|
14181
|
+
if (!(model === 'readOnly')) {
|
|
14179
14182
|
_context2.next = 2;
|
|
14180
14183
|
break;
|
|
14181
14184
|
}
|
|
@@ -14183,46 +14186,38 @@ var useOnRow = (function () {
|
|
|
14183
14186
|
return _context2.abrupt("return");
|
|
14184
14187
|
|
|
14185
14188
|
case 2:
|
|
14186
|
-
if (!(model === 'readOnly')) {
|
|
14187
|
-
_context2.next = 4;
|
|
14188
|
-
break;
|
|
14189
|
-
}
|
|
14190
|
-
|
|
14191
|
-
return _context2.abrupt("return");
|
|
14192
|
-
|
|
14193
|
-
case 4:
|
|
14194
14189
|
editGood = controller.state.goodsListState.editGood;
|
|
14195
14190
|
|
|
14196
14191
|
if (!(record.lineAttribute !== LineAttributeType$1.正常)) {
|
|
14197
|
-
_context2.next =
|
|
14192
|
+
_context2.next = 5;
|
|
14198
14193
|
break;
|
|
14199
14194
|
}
|
|
14200
14195
|
|
|
14201
14196
|
return _context2.abrupt("return");
|
|
14202
14197
|
|
|
14203
|
-
case
|
|
14198
|
+
case 5:
|
|
14204
14199
|
if (!editGood) {
|
|
14205
|
-
_context2.next =
|
|
14200
|
+
_context2.next = 16;
|
|
14206
14201
|
break;
|
|
14207
14202
|
}
|
|
14208
14203
|
|
|
14209
14204
|
if (!(editGood.$index === record.$index)) {
|
|
14210
|
-
_context2.next =
|
|
14205
|
+
_context2.next = 8;
|
|
14211
14206
|
break;
|
|
14212
14207
|
}
|
|
14213
14208
|
|
|
14214
14209
|
return _context2.abrupt("return");
|
|
14215
14210
|
|
|
14211
|
+
case 8:
|
|
14212
|
+
_context2.next = 10;
|
|
14213
|
+
return controller.saveEditGood();
|
|
14214
|
+
|
|
14216
14215
|
case 10:
|
|
14217
14216
|
_context2.next = 12;
|
|
14218
|
-
return controller.
|
|
14217
|
+
return controller.wait();
|
|
14219
14218
|
|
|
14220
14219
|
case 12:
|
|
14221
14220
|
_context2.next = 14;
|
|
14222
|
-
return controller.wait();
|
|
14223
|
-
|
|
14224
|
-
case 14:
|
|
14225
|
-
_context2.next = 16;
|
|
14226
14221
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
14227
14222
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
14228
14223
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -14252,15 +14247,15 @@ var useOnRow = (function () {
|
|
|
14252
14247
|
};
|
|
14253
14248
|
}())();
|
|
14254
14249
|
|
|
14255
|
-
case
|
|
14256
|
-
_context2.next =
|
|
14250
|
+
case 14:
|
|
14251
|
+
_context2.next = 18;
|
|
14257
14252
|
break;
|
|
14258
14253
|
|
|
14259
|
-
case
|
|
14260
|
-
_context2.next =
|
|
14254
|
+
case 16:
|
|
14255
|
+
_context2.next = 18;
|
|
14261
14256
|
return controller.setEditGood(record);
|
|
14262
14257
|
|
|
14263
|
-
case
|
|
14258
|
+
case 18:
|
|
14264
14259
|
case "end":
|
|
14265
14260
|
return _context2.stop();
|
|
14266
14261
|
}
|
|
@@ -21055,7 +21050,6 @@ function dcoding$1(v) {
|
|
|
21055
21050
|
|
|
21056
21051
|
|
|
21057
21052
|
function isDutyFree$1(record) {
|
|
21058
|
-
console.log(record);
|
|
21059
21053
|
return record.taxFreeType === 1 && record.favouredPolicyName === '免税';
|
|
21060
21054
|
}
|
|
21061
21055
|
|
|
@@ -22938,27 +22932,12 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
22938
22932
|
}, "\u516C\u9877"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22939
22933
|
value: "\u4EA9"
|
|
22940
22934
|
}, "\u4EA9"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22941
|
-
value: "
|
|
22942
|
-
},
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
}, "2"))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22948
|
-
value: "Km2"
|
|
22949
|
-
}, /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("span", null, "Km"), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22950
|
-
style: {
|
|
22951
|
-
verticalAlign: 'super',
|
|
22952
|
-
fontSize: 'smaller'
|
|
22953
|
-
}
|
|
22954
|
-
}, "2"))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22955
|
-
value: "m2"
|
|
22956
|
-
}, /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("span", null, "m"), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22957
|
-
style: {
|
|
22958
|
-
verticalAlign: 'super',
|
|
22959
|
-
fontSize: 'smaller'
|
|
22960
|
-
}
|
|
22961
|
-
}, "2")))))))));
|
|
22935
|
+
value: "h\u33A1"
|
|
22936
|
+
}, "h\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22937
|
+
value: "k\u33A1"
|
|
22938
|
+
}, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
22939
|
+
value: "\u33A1"
|
|
22940
|
+
}, "\u33A1")))))));
|
|
22962
22941
|
});
|
|
22963
22942
|
|
|
22964
22943
|
var MyDiv$3 = /*#__PURE__*/function (_React$Component) {
|
package/package.json
CHANGED
|
@@ -35,6 +35,9 @@ export default (form: WrappedFormUtils) => {
|
|
|
35
35
|
/** 组件模式 */
|
|
36
36
|
const model = controller.useMemo(e => e.model, []);
|
|
37
37
|
|
|
38
|
+
/** 计算类型 */
|
|
39
|
+
const calculateType = controller.useMemo(e => e.goodsListState.calculateType, []);
|
|
40
|
+
|
|
38
41
|
/** 是否启用拖拽 */
|
|
39
42
|
const isStart = controller.useMemo((e) => e.goodsListState.drag.isStart, []);
|
|
40
43
|
|
|
@@ -105,7 +108,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
105
108
|
key: 'itemCode',
|
|
106
109
|
width: 119,
|
|
107
110
|
render: (_: string, record: IGood) => {
|
|
108
|
-
if (editGood?.$index === record.$index) {
|
|
111
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
109
112
|
return (
|
|
110
113
|
<Form.Item>
|
|
111
114
|
{getFieldDecorator('itemCode', {
|
|
@@ -133,7 +136,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
133
136
|
title: <TitleText required >项目名称</TitleText>,
|
|
134
137
|
key: 'itemName',
|
|
135
138
|
render: (_: string, record: IGood) => {
|
|
136
|
-
if (editGood?.$index === record.$index) {
|
|
139
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
137
140
|
return (
|
|
138
141
|
<Form.Item>
|
|
139
142
|
<div style={{ display: 'flex' }} >
|
|
@@ -192,7 +195,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
192
195
|
key: 'itemModelName',
|
|
193
196
|
width: 119,
|
|
194
197
|
render: (_: string, record: IGood) => {
|
|
195
|
-
if (editGood?.$index === record.$index) {
|
|
198
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
196
199
|
return (
|
|
197
200
|
<Form.Item>
|
|
198
201
|
{getFieldDecorator('itemModelName', {
|
|
@@ -227,7 +230,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
227
230
|
key: 'unit',
|
|
228
231
|
width: 70,
|
|
229
232
|
render: (_: string, record: IGood) => {
|
|
230
|
-
if (editGood?.$index === record.$index) {
|
|
233
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
231
234
|
return (
|
|
232
235
|
<Form.Item>
|
|
233
236
|
{getFieldDecorator('unit', {
|
|
@@ -258,7 +261,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
258
261
|
align: 'right',
|
|
259
262
|
width: 149,
|
|
260
263
|
render: (value: string, record: IGood) => {
|
|
261
|
-
if (editGood?.$index === record.$index) {
|
|
264
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
262
265
|
return (
|
|
263
266
|
<Form.Item>
|
|
264
267
|
{getFieldDecorator('quantity', {
|
|
@@ -302,7 +305,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
302
305
|
align: 'right',
|
|
303
306
|
width: 149,
|
|
304
307
|
render: (value: string, record: IGood) => {
|
|
305
|
-
if (editGood?.$index === record.$index) {
|
|
308
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
306
309
|
return (
|
|
307
310
|
<Form.Item>
|
|
308
311
|
{getFieldDecorator('priceIncludeTax', {
|
|
@@ -346,7 +349,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
346
349
|
align: 'right',
|
|
347
350
|
width: 149,
|
|
348
351
|
render: (value: string, record: IGood) => {
|
|
349
|
-
if (editGood?.$index === record.$index) {
|
|
352
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
350
353
|
return (
|
|
351
354
|
<Form.Item>
|
|
352
355
|
{getFieldDecorator('priceExcludeTax', {
|
|
@@ -390,7 +393,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
390
393
|
width: 119,
|
|
391
394
|
align: 'right',
|
|
392
395
|
render: (value: string, record: IGood) => {
|
|
393
|
-
if (editGood?.$index === record.$index) {
|
|
396
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
394
397
|
return (
|
|
395
398
|
<Form.Item>
|
|
396
399
|
{getFieldDecorator('lineAmountIncludeTax', {
|
|
@@ -439,7 +442,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
439
442
|
align: 'right',
|
|
440
443
|
width: 119,
|
|
441
444
|
render: (value: string, record: IGood) => {
|
|
442
|
-
if (editGood?.$index === record.$index) {
|
|
445
|
+
if (editGood?.$index === record.$index && model !== 'prefab') {
|
|
443
446
|
return (
|
|
444
447
|
<Form.Item>
|
|
445
448
|
{getFieldDecorator('lineAmountExcludeTax', {
|
|
@@ -481,7 +484,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
481
484
|
align: 'right',
|
|
482
485
|
width: 75,
|
|
483
486
|
render: (value: string, record: IGood) => {
|
|
484
|
-
if (editGood?.$index === record.$index) {
|
|
487
|
+
if (editGood?.$index === record.$index && !(model === 'prefab' && calculateType === '3')) {
|
|
485
488
|
return (
|
|
486
489
|
<Form.Item>
|
|
487
490
|
{getFieldDecorator('taxRate', {
|
|
@@ -690,6 +693,5 @@ function dcoding(v: string): string {
|
|
|
690
693
|
|
|
691
694
|
/** 是否免税 */
|
|
692
695
|
function isDutyFree(record: IGood): boolean {
|
|
693
|
-
console.log(record);
|
|
694
696
|
return (record.taxFreeType as any) === 1 && record.favouredPolicyName === '免税';
|
|
695
697
|
}
|
|
@@ -15,7 +15,7 @@ export default () => {
|
|
|
15
15
|
|
|
16
16
|
const onClick = React.useCallback(
|
|
17
17
|
async (record: IGood) => {
|
|
18
|
-
if (model === 'prefab') return;
|
|
18
|
+
// if (model === 'prefab') return;
|
|
19
19
|
if (model === 'readOnly') return;
|
|
20
20
|
|
|
21
21
|
const editGood = controller.state.goodsListState.editGood;
|
|
@@ -134,24 +134,9 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
134
134
|
<Select.Option value="平方米">平方米</Select.Option>
|
|
135
135
|
<Select.Option value="公顷">公顷</Select.Option>
|
|
136
136
|
<Select.Option value="亩">亩</Select.Option>
|
|
137
|
-
<Select.Option value="
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<span style={{ verticalAlign: 'super', fontSize: 'smaller' }} >2</span>
|
|
141
|
-
</span>
|
|
142
|
-
</Select.Option>
|
|
143
|
-
<Select.Option value="Km2">
|
|
144
|
-
<span>
|
|
145
|
-
<span>Km</span>
|
|
146
|
-
<span style={{ verticalAlign: 'super', fontSize: 'smaller' }} >2</span>
|
|
147
|
-
</span>
|
|
148
|
-
</Select.Option>
|
|
149
|
-
<Select.Option value="m2">
|
|
150
|
-
<span>
|
|
151
|
-
<span>m</span>
|
|
152
|
-
<span style={{ verticalAlign: 'super', fontSize: 'smaller' }} >2</span>
|
|
153
|
-
</span>
|
|
154
|
-
</Select.Option>
|
|
137
|
+
<Select.Option value="h㎡">h㎡</Select.Option>
|
|
138
|
+
<Select.Option value="k㎡">k㎡</Select.Option>
|
|
139
|
+
<Select.Option value="㎡">㎡</Select.Option>
|
|
155
140
|
</Select>
|
|
156
141
|
)}
|
|
157
142
|
</Form.Item>
|