kts-component-invoice-operate 3.2.0 → 3.2.2
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/Invoice/Invoice-digtal/_test/importGoods/index.d.ts +3 -0
- package/dist/Invoice/Invoice-digtal/_test/importStakeholder/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +2 -1
- package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +5 -0
- package/dist/InvoiceTypeModal/index.d.ts +4 -2
- package/dist/index.esm.js +147 -52
- package/dist/index.js +147 -52
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +471 -0
- package/src/Invoice/Invoice-digtal/_test/importStakeholder/index.tsx +17 -0
- package/src/Invoice/Invoice-digtal/index.md +6 -0
- package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +1 -1
- package/src/Invoice/index.tsx +8 -6
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +15 -2
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/svg/plus.svg +12 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +7 -2
- package/src/Invoice/ui/digtal/GoodsList/index.tsx +0 -1
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +1 -2
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +25 -2
- package/src/Invoice/ui/digtal/Stakeholder/svg/plus.svg +12 -0
- package/src/InvoiceTypeModal/_test/easiest/index.tsx +0 -1
- package/src/InvoiceTypeModal/index.tsx +29 -8
- package/docs-dist/404.html +0 -33
- package/docs-dist/index.html +0 -33
- package/docs-dist/static/auto.a6cd905c.svg +0 -1
- package/docs-dist/static/magnifier.2b26be6e.svg +0 -1
- package/docs-dist/static/spot.42e620e1.svg +0 -1
- package/docs-dist/umi.css +0 -20
- package/docs-dist/umi.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1555,7 +1555,7 @@ var addGoodDiscountV2 = /*#__PURE__*/(function () {
|
|
|
1555
1555
|
function getLineAmountExcludeTax(lineAmountIncludeTax) {
|
|
1556
1556
|
var taxRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1557
1557
|
var biTaxRate = mathjs.chain(mathjs.bignumber(taxRate)).divide(mathjs.bignumber(100)).done();
|
|
1558
|
-
return mathjs.chain(mathjs.bignumber(lineAmountIncludeTax)).divide(mathjs.chain(mathjs.bignumber(1)).add(biTaxRate).done()).multiply(mathjs.bignumber(100)).
|
|
1558
|
+
return mathjs.chain(mathjs.bignumber(lineAmountIncludeTax)).divide(mathjs.chain(mathjs.bignumber(1)).add(biTaxRate).done()).multiply(mathjs.bignumber(100)).round().divide(mathjs.bignumber(100)).done().toNumber();
|
|
1559
1559
|
}
|
|
1560
1560
|
/** 税额 = 含税金额 - 金额(不含税) */
|
|
1561
1561
|
|
|
@@ -14018,6 +14018,32 @@ function SvgArrowDown(props) {
|
|
|
14018
14018
|
})));
|
|
14019
14019
|
}
|
|
14020
14020
|
|
|
14021
|
+
var _g, _defs$2;
|
|
14022
|
+
|
|
14023
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
14024
|
+
|
|
14025
|
+
function SvgPlus(props) {
|
|
14026
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
14027
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14028
|
+
width: 16,
|
|
14029
|
+
height: 15,
|
|
14030
|
+
fill: "none"
|
|
14031
|
+
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
14032
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
14033
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14034
|
+
d: "M8 14.531A7.031 7.031 0 118 .468a7.031 7.031 0 010 14.063zm0-.937A6.094 6.094 0 108 1.406a6.094 6.094 0 000 12.188z"
|
|
14035
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14036
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
14037
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14038
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
14039
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
14040
|
+
id: "plus_svg__clip0_715_360"
|
|
14041
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14042
|
+
transform: "translate(.5)",
|
|
14043
|
+
d: "M0 0h15v15H0z"
|
|
14044
|
+
})))));
|
|
14045
|
+
}
|
|
14046
|
+
|
|
14021
14047
|
var css_248z$d = ".kts-invoice-operate-invoice-digtal-stakeholder {\n display: flex;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-expand-button {\n cursor: pointer;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div {\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:nth-child(even) {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: end;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:nth-child(odd) {\n flex: none;\n text-align: center;\n color: #9F613E;\n display: flex;\n flex-direction: column;\n justify-content: center;\n justify-items: center;\n padding: 0 4px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:last-child {\n border-right: none;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form {\n padding: 20px 10px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item {\n display: flex;\n margin-bottom: 0;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {\n flex: none;\n font-weight: 500;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label label {\n color: #9F603D;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-control-wrapper {\n flex: 1;\n}\n";
|
|
14022
14048
|
styleInject(css_248z$d);
|
|
14023
14049
|
|
|
@@ -14076,7 +14102,9 @@ var formatCompanyName = function formatCompanyName(e) {
|
|
|
14076
14102
|
|
|
14077
14103
|
|
|
14078
14104
|
var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
14079
|
-
var form = props.form
|
|
14105
|
+
var form = props.form,
|
|
14106
|
+
isShowImportButton = props.isShowImportButton,
|
|
14107
|
+
onClickImportButton = props.onClickImportButton;
|
|
14080
14108
|
|
|
14081
14109
|
var _React$useState = React__default['default'].useState(true),
|
|
14082
14110
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -14133,7 +14161,20 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
14133
14161
|
})(React__default['default'].createElement(MyInput$1, {
|
|
14134
14162
|
readOnly: isReadOnly('buyerName'),
|
|
14135
14163
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
14136
|
-
autoComplete: "off"
|
|
14164
|
+
autoComplete: "off",
|
|
14165
|
+
suffix: isShowImportButton === true && React__default['default'].createElement(ktsXui.Button, {
|
|
14166
|
+
type: 'link',
|
|
14167
|
+
style: {
|
|
14168
|
+
padding: 0,
|
|
14169
|
+
width: 20
|
|
14170
|
+
},
|
|
14171
|
+
icon: React__default['default'].createElement(Icon, {
|
|
14172
|
+
component: SvgPlus
|
|
14173
|
+
}),
|
|
14174
|
+
onClick: function onClick() {
|
|
14175
|
+
onClickImportButton && onClickImportButton(controller);
|
|
14176
|
+
}
|
|
14177
|
+
})
|
|
14137
14178
|
})))), React__default['default'].createElement(ktsXui.Col, {
|
|
14138
14179
|
span: 24
|
|
14139
14180
|
}, React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
@@ -14516,17 +14557,17 @@ function TableVirtual$1 (props) {
|
|
|
14516
14557
|
})));
|
|
14517
14558
|
}
|
|
14518
14559
|
|
|
14519
|
-
var _g, _defs$
|
|
14560
|
+
var _g$1, _defs$3;
|
|
14520
14561
|
|
|
14521
|
-
function _extends$
|
|
14562
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
14522
14563
|
|
|
14523
14564
|
function SvgFork(props) {
|
|
14524
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14565
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
14525
14566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14526
14567
|
width: 16,
|
|
14527
14568
|
height: 16,
|
|
14528
14569
|
fill: "none"
|
|
14529
|
-
}, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
14570
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React.createElement("g", {
|
|
14530
14571
|
clipPath: "url(#fork_svg__clip0_695_1221)",
|
|
14531
14572
|
fill: "#333"
|
|
14532
14573
|
}, /*#__PURE__*/React.createElement("path", {
|
|
@@ -14535,7 +14576,7 @@ function SvgFork(props) {
|
|
|
14535
14576
|
d: "M10.702 11.329l-5.973-5.97.629-.63 5.971 5.971-.627.629z"
|
|
14536
14577
|
}), /*#__PURE__*/React.createElement("path", {
|
|
14537
14578
|
d: "M4.669 10.702l5.97-5.971.63.628-5.972 5.972-.628-.629z"
|
|
14538
|
-
}))), _defs$
|
|
14579
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
14539
14580
|
id: "fork_svg__clip0_695_1221"
|
|
14540
14581
|
}, /*#__PURE__*/React.createElement("path", {
|
|
14541
14582
|
fill: "#fff",
|
|
@@ -14895,10 +14936,10 @@ var TaxIncludedSwitch$1 = (function () {
|
|
|
14895
14936
|
|
|
14896
14937
|
var _path$5;
|
|
14897
14938
|
|
|
14898
|
-
function _extends$
|
|
14939
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
14899
14940
|
|
|
14900
14941
|
function SvgMagnifier$1(props) {
|
|
14901
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14942
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
14902
14943
|
className: "magnifier_svg__icon",
|
|
14903
14944
|
viewBox: "0 0 1024 1024",
|
|
14904
14945
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15021,6 +15062,32 @@ function TableRow$1(props) {
|
|
|
15021
15062
|
}));
|
|
15022
15063
|
}
|
|
15023
15064
|
|
|
15065
|
+
var _g$2, _defs$4;
|
|
15066
|
+
|
|
15067
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
15068
|
+
|
|
15069
|
+
function SvgPlus$1(props) {
|
|
15070
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
15071
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15072
|
+
width: 16,
|
|
15073
|
+
height: 15,
|
|
15074
|
+
fill: "none"
|
|
15075
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React.createElement("g", {
|
|
15076
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
15077
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15078
|
+
d: "M8 14.531A7.031 7.031 0 118 .468a7.031 7.031 0 010 14.063zm0-.937A6.094 6.094 0 108 1.406a6.094 6.094 0 000 12.188z"
|
|
15079
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15080
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
15081
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15082
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
15083
|
+
}))), _defs$4 || (_defs$4 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
15084
|
+
id: "plus_svg__clip0_715_360"
|
|
15085
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15086
|
+
transform: "translate(.5)",
|
|
15087
|
+
d: "M0 0h15v15H0z"
|
|
15088
|
+
})))));
|
|
15089
|
+
}
|
|
15090
|
+
|
|
15024
15091
|
var Text$5 = ktsComponentsAntdX3.Typography.Text;
|
|
15025
15092
|
var TitleText$1 = (function (props) {
|
|
15026
15093
|
var rules = props.rules,
|
|
@@ -15056,7 +15123,8 @@ function ItemNameInput$1(props) {
|
|
|
15056
15123
|
height: '100%'
|
|
15057
15124
|
},
|
|
15058
15125
|
value: props.value,
|
|
15059
|
-
onChange: onChange
|
|
15126
|
+
onChange: onChange,
|
|
15127
|
+
suffix: props.suffix
|
|
15060
15128
|
}));
|
|
15061
15129
|
}
|
|
15062
15130
|
|
|
@@ -16267,37 +16335,42 @@ var useColumns$1 = (function (form) {
|
|
|
16267
16335
|
}])
|
|
16268
16336
|
})(React__default['default'].createElement(ItemNameInput$1, {
|
|
16269
16337
|
shorthand: editGood.shorthand,
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
}
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16338
|
+
suffix: React__default['default'].createElement(ktsXui.Tooltip, {
|
|
16339
|
+
title: "\u70B9\u51FB\u4ECE\u5546\u54C1\u7BA1\u7406\u4E2D\u6DFB\u52A0\u5546\u54C1\u4FE1\u606F"
|
|
16340
|
+
}, React__default['default'].createElement(ktsXui.Button, {
|
|
16341
|
+
type: "link",
|
|
16342
|
+
style: {
|
|
16343
|
+
padding: 0,
|
|
16344
|
+
width: 20
|
|
16345
|
+
},
|
|
16346
|
+
icon: React__default['default'].createElement(Icon, {
|
|
16347
|
+
component: SvgPlus$1
|
|
16348
|
+
}),
|
|
16349
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
16350
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
16351
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
16352
|
+
while (1) {
|
|
16353
|
+
switch (_context3.prev = _context3.next) {
|
|
16354
|
+
case 0:
|
|
16355
|
+
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
16285
16356
|
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
16357
|
+
case 1:
|
|
16358
|
+
case "end":
|
|
16359
|
+
return _context3.stop();
|
|
16360
|
+
}
|
|
16289
16361
|
}
|
|
16290
|
-
}
|
|
16291
|
-
}
|
|
16292
|
-
}));
|
|
16362
|
+
}, _callee3);
|
|
16363
|
+
}));
|
|
16293
16364
|
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16365
|
+
return function (_x5) {
|
|
16366
|
+
return _ref2.apply(this, arguments);
|
|
16367
|
+
};
|
|
16368
|
+
}())
|
|
16369
|
+
})),
|
|
16370
|
+
onChange: function onChange() {
|
|
16371
|
+
onChangeItemName$1(controller, form, record);
|
|
16372
|
+
}
|
|
16373
|
+
}))));
|
|
16301
16374
|
} else {
|
|
16302
16375
|
return React__default['default'].createElement("span", null, record.lineAttribute === LineAttributeType$1.折扣行 ? React__default['default'].createElement("span", {
|
|
16303
16376
|
className: 'goods-list-digtal-discount-tag'
|
|
@@ -17608,17 +17681,17 @@ var useDelRowButton$1 = (function () {
|
|
|
17608
17681
|
};
|
|
17609
17682
|
});
|
|
17610
17683
|
|
|
17611
|
-
var _g$
|
|
17684
|
+
var _g$3, _defs$5;
|
|
17612
17685
|
|
|
17613
|
-
function _extends$
|
|
17686
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
17614
17687
|
|
|
17615
17688
|
function SvgAdd(props) {
|
|
17616
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
17689
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
17617
17690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17618
17691
|
width: 15,
|
|
17619
17692
|
height: 15,
|
|
17620
17693
|
fill: "none"
|
|
17621
|
-
}, props), _g$
|
|
17694
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React.createElement("g", {
|
|
17622
17695
|
clipPath: "url(#add_svg__clip0_715_372)"
|
|
17623
17696
|
}, /*#__PURE__*/React.createElement("path", {
|
|
17624
17697
|
d: "M7.5 14.531A7.031 7.031 0 117.5.468a7.031 7.031 0 010 14.063zm0-.937a6.094 6.094 0 100-12.188 6.094 6.094 0 000 12.188z"
|
|
@@ -17626,7 +17699,7 @@ function SvgAdd(props) {
|
|
|
17626
17699
|
d: "M3.75 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
17627
17700
|
}), /*#__PURE__*/React.createElement("path", {
|
|
17628
17701
|
d: "M7.031 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
17629
|
-
}))), _defs$
|
|
17702
|
+
}))), _defs$5 || (_defs$5 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
17630
17703
|
id: "add_svg__clip0_715_372"
|
|
17631
17704
|
}, /*#__PURE__*/React.createElement("path", {
|
|
17632
17705
|
d: "M0 0h15v15H0z"
|
|
@@ -17935,7 +18008,7 @@ function AddDiscountRowDrawer(props) {
|
|
|
17935
18008
|
// 折扣金额占比
|
|
17936
18009
|
var share = mathjs.chain(mathjs.bignumber((_e$lineAmountIncludeT2 = e === null || e === void 0 ? void 0 : e.lineAmountIncludeTax) !== null && _e$lineAmountIncludeT2 !== void 0 ? _e$lineAmountIncludeT2 : 0)).divide(mathjs.bignumber(totalAmount)); // 折扣金额
|
|
17937
18010
|
|
|
17938
|
-
var value = totalDiscoline.multiply(share.done()).multiply(mathjs.bignumber(100)).
|
|
18011
|
+
var value = totalDiscoline.multiply(share.done()).multiply(mathjs.bignumber(100)).round().divide(mathjs.bignumber(100)).done();
|
|
17939
18012
|
discolinesSum = discolinesSum.add(value);
|
|
17940
18013
|
return value.toNumber();
|
|
17941
18014
|
}); // 剩余折扣金额
|
|
@@ -18373,6 +18446,13 @@ function InvoiceTypeModal(props) {
|
|
|
18373
18446
|
var _props$disableds = props.disableds,
|
|
18374
18447
|
disableds = _props$disableds === void 0 ? [] : _props$disableds;
|
|
18375
18448
|
|
|
18449
|
+
var _React$useState = React__default['default'].useState({
|
|
18450
|
+
billingType: props.defaultBillingType || 'digital'
|
|
18451
|
+
}),
|
|
18452
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
18453
|
+
formValues = _React$useState2[0],
|
|
18454
|
+
setValues = _React$useState2[1];
|
|
18455
|
+
|
|
18376
18456
|
var _Form$useForm = ktsXui.Form.useForm(),
|
|
18377
18457
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
18378
18458
|
form = _Form$useForm2[0];
|
|
@@ -18399,12 +18479,14 @@ function InvoiceTypeModal(props) {
|
|
|
18399
18479
|
})), [props.onOk]);
|
|
18400
18480
|
React__default['default'].useEffect(function () {
|
|
18401
18481
|
if (props.open) {
|
|
18402
|
-
|
|
18403
|
-
form.setFieldsValue({
|
|
18482
|
+
var values = {
|
|
18404
18483
|
billingType: props.defaultBillingType || 'digital',
|
|
18405
18484
|
invoiceType: props.defaultInvoiceType,
|
|
18406
18485
|
business: props.defaultBusiness
|
|
18407
|
-
}
|
|
18486
|
+
};
|
|
18487
|
+
form.resetFields();
|
|
18488
|
+
form.setFieldsValue(values);
|
|
18489
|
+
setValues(values);
|
|
18408
18490
|
}
|
|
18409
18491
|
}, [props.open, props.defaultBillingType, props.defaultBusiness, props.defaultInvoiceType, form]);
|
|
18410
18492
|
return React__default['default'].createElement(ktsXui.Modal, {
|
|
@@ -18419,6 +18501,9 @@ function InvoiceTypeModal(props) {
|
|
|
18419
18501
|
layout: "vertical",
|
|
18420
18502
|
style: {
|
|
18421
18503
|
paddingTop: 20
|
|
18504
|
+
},
|
|
18505
|
+
onValuesChange: function onValuesChange(_, e) {
|
|
18506
|
+
setValues(e);
|
|
18422
18507
|
}
|
|
18423
18508
|
}, React__default['default'].createElement(ktsXui.Row, {
|
|
18424
18509
|
gutter: [16, 16]
|
|
@@ -18431,6 +18516,9 @@ function InvoiceTypeModal(props) {
|
|
|
18431
18516
|
className: "goods-list-digtal-reselect-invoice-typeModal-radio",
|
|
18432
18517
|
optionType: "button",
|
|
18433
18518
|
disabled: disableds.indexOf('billingType') >= 0,
|
|
18519
|
+
onChange: function onChange(e) {
|
|
18520
|
+
props.onChange && props.onChange(e.target.value);
|
|
18521
|
+
},
|
|
18434
18522
|
options: [{
|
|
18435
18523
|
label: '数电发票',
|
|
18436
18524
|
value: 'digital'
|
|
@@ -18442,9 +18530,15 @@ function InvoiceTypeModal(props) {
|
|
|
18442
18530
|
span: 12
|
|
18443
18531
|
}, React__default['default'].createElement(ktsXui.Form.Item, {
|
|
18444
18532
|
name: 'invoiceType',
|
|
18445
|
-
label: "\u9009\u62E9\u7968\u7C7B"
|
|
18533
|
+
label: "\u9009\u62E9\u7968\u7C7B",
|
|
18534
|
+
rules: [{
|
|
18535
|
+
required: true,
|
|
18536
|
+
message: '选择票类必填'
|
|
18537
|
+
}]
|
|
18446
18538
|
}, React__default['default'].createElement(ktsXui.Select, {
|
|
18447
18539
|
size: 'large',
|
|
18540
|
+
allowClear: true,
|
|
18541
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u975E\u5FC5\u586B\u9879\uFF09",
|
|
18448
18542
|
disabled: disableds.indexOf('invoiceType') >= 0,
|
|
18449
18543
|
options: props.invoiceTypeOptions
|
|
18450
18544
|
}))), React__default['default'].createElement(ktsXui.Col, {
|
|
@@ -18454,7 +18548,8 @@ function InvoiceTypeModal(props) {
|
|
|
18454
18548
|
label: "\u7279\u5B9A\u4E1A\u52A1"
|
|
18455
18549
|
}, React__default['default'].createElement(ktsXui.Select, {
|
|
18456
18550
|
size: 'large',
|
|
18457
|
-
|
|
18551
|
+
allowClear: true,
|
|
18552
|
+
disabled: disableds.indexOf('business') >= 0 || !formValues.invoiceType,
|
|
18458
18553
|
options: props.businessOptions
|
|
18459
18554
|
}))))));
|
|
18460
18555
|
}
|
|
@@ -20200,12 +20295,12 @@ var Digtal = function Digtal(props) {
|
|
|
20200
20295
|
, React__default['default'].createElement("div", {
|
|
20201
20296
|
className: 'kts-invoice-operate-digtal-cont'
|
|
20202
20297
|
}, props.stakeholder || React__default['default'].createElement(Stakeholder$1, null)
|
|
20203
|
-
/** 干系人
|
|
20298
|
+
/** 干系人 */
|
|
20204
20299
|
, props.goodsList || React__default['default'].createElement(GoodsList$1
|
|
20205
20300
|
/** 货物列表 */
|
|
20206
20301
|
, null)), props.sign || React__default['default'].createElement(SignDigtal, null)
|
|
20207
20302
|
/** 落款 */
|
|
20208
|
-
), React__default['default'].createElement(EndowCodeDrawer, null));
|
|
20303
|
+
), React__default['default'].createElement(ImportGoodsDrawer, null), React__default['default'].createElement(EndowCodeDrawer, null));
|
|
20209
20304
|
};
|
|
20210
20305
|
|
|
20211
20306
|
exports.Invoice = Invoice;
|