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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ChangeEvent } from 'react';
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
export default function ItemNameInput(props: {
|
|
4
4
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
suffix?: React.ReactNode;
|
|
5
6
|
value?: string;
|
|
6
7
|
shorthand?: string;
|
|
7
8
|
}): JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import InvoiceController from "../../../InvoiceController";
|
|
2
3
|
import './index.less';
|
|
3
4
|
export interface IStakeholder {
|
|
5
|
+
/** 是否显示导入按钮 */
|
|
6
|
+
isShowImportButton?: boolean;
|
|
7
|
+
/** 点击了 */
|
|
8
|
+
onClickImportButton?: (e: InvoiceController) => void;
|
|
4
9
|
}
|
|
5
10
|
/** 干系人 */
|
|
6
11
|
declare const _default: React.FunctionComponent<IStakeholder>;
|
|
@@ -5,9 +5,9 @@ export interface IFormValues {
|
|
|
5
5
|
/** 开票种类 */
|
|
6
6
|
billingType: 'digital' | 'taxation';
|
|
7
7
|
/** 特定业务 */
|
|
8
|
-
business
|
|
8
|
+
business?: any;
|
|
9
9
|
/** 选择票类 */
|
|
10
|
-
invoiceType
|
|
10
|
+
invoiceType?: any;
|
|
11
11
|
}
|
|
12
12
|
export interface IInvoiceTypeModalProps {
|
|
13
13
|
/** 窗口标题 */
|
|
@@ -18,6 +18,8 @@ export interface IInvoiceTypeModalProps {
|
|
|
18
18
|
onOk?: (values: IFormValues) => void;
|
|
19
19
|
/** 点击了取消 */
|
|
20
20
|
onCancel?: () => void;
|
|
21
|
+
/** 切换了 开票种类 */
|
|
22
|
+
onChange?: (e: 'digital' | 'taxation') => void;
|
|
21
23
|
/** 禁用列表 */
|
|
22
24
|
disableds?: ('billingType' | 'invoiceType' | 'business')[];
|
|
23
25
|
/** 选择票类 选项 */
|
package/dist/index.esm.js
CHANGED
|
@@ -1545,7 +1545,7 @@ var addGoodDiscountV2 = /*#__PURE__*/(function () {
|
|
|
1545
1545
|
function getLineAmountExcludeTax(lineAmountIncludeTax) {
|
|
1546
1546
|
var taxRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1547
1547
|
var biTaxRate = chain$1(bignumber(taxRate)).divide(bignumber(100)).done();
|
|
1548
|
-
return chain$1(bignumber(lineAmountIncludeTax)).divide(chain$1(bignumber(1)).add(biTaxRate).done()).multiply(bignumber(100)).
|
|
1548
|
+
return chain$1(bignumber(lineAmountIncludeTax)).divide(chain$1(bignumber(1)).add(biTaxRate).done()).multiply(bignumber(100)).round().divide(bignumber(100)).done().toNumber();
|
|
1549
1549
|
}
|
|
1550
1550
|
/** 税额 = 含税金额 - 金额(不含税) */
|
|
1551
1551
|
|
|
@@ -14008,6 +14008,32 @@ function SvgArrowDown(props) {
|
|
|
14008
14008
|
})));
|
|
14009
14009
|
}
|
|
14010
14010
|
|
|
14011
|
+
var _g, _defs$2;
|
|
14012
|
+
|
|
14013
|
+
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); }
|
|
14014
|
+
|
|
14015
|
+
function SvgPlus(props) {
|
|
14016
|
+
return /*#__PURE__*/createElement("svg", _extends$5({
|
|
14017
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14018
|
+
width: 16,
|
|
14019
|
+
height: 15,
|
|
14020
|
+
fill: "none"
|
|
14021
|
+
}, props), _g || (_g = /*#__PURE__*/createElement("g", {
|
|
14022
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
14023
|
+
}, /*#__PURE__*/createElement("path", {
|
|
14024
|
+
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"
|
|
14025
|
+
}), /*#__PURE__*/createElement("path", {
|
|
14026
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
14027
|
+
}), /*#__PURE__*/createElement("path", {
|
|
14028
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
14029
|
+
}))), _defs$2 || (_defs$2 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("clipPath", {
|
|
14030
|
+
id: "plus_svg__clip0_715_360"
|
|
14031
|
+
}, /*#__PURE__*/createElement("path", {
|
|
14032
|
+
transform: "translate(.5)",
|
|
14033
|
+
d: "M0 0h15v15H0z"
|
|
14034
|
+
})))));
|
|
14035
|
+
}
|
|
14036
|
+
|
|
14011
14037
|
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";
|
|
14012
14038
|
styleInject(css_248z$d);
|
|
14013
14039
|
|
|
@@ -14066,7 +14092,9 @@ var formatCompanyName = function formatCompanyName(e) {
|
|
|
14066
14092
|
|
|
14067
14093
|
|
|
14068
14094
|
var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
14069
|
-
var form = props.form
|
|
14095
|
+
var form = props.form,
|
|
14096
|
+
isShowImportButton = props.isShowImportButton,
|
|
14097
|
+
onClickImportButton = props.onClickImportButton;
|
|
14070
14098
|
|
|
14071
14099
|
var _React$useState = React.useState(true),
|
|
14072
14100
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -14123,7 +14151,20 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
14123
14151
|
})(React.createElement(MyInput$1, {
|
|
14124
14152
|
readOnly: isReadOnly('buyerName'),
|
|
14125
14153
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
14126
|
-
autoComplete: "off"
|
|
14154
|
+
autoComplete: "off",
|
|
14155
|
+
suffix: isShowImportButton === true && React.createElement(Button$1, {
|
|
14156
|
+
type: 'link',
|
|
14157
|
+
style: {
|
|
14158
|
+
padding: 0,
|
|
14159
|
+
width: 20
|
|
14160
|
+
},
|
|
14161
|
+
icon: React.createElement(Icon, {
|
|
14162
|
+
component: SvgPlus
|
|
14163
|
+
}),
|
|
14164
|
+
onClick: function onClick() {
|
|
14165
|
+
onClickImportButton && onClickImportButton(controller);
|
|
14166
|
+
}
|
|
14167
|
+
})
|
|
14127
14168
|
})))), React.createElement(Col, {
|
|
14128
14169
|
span: 24
|
|
14129
14170
|
}, React.createElement(Form.Item, {
|
|
@@ -14506,17 +14547,17 @@ function TableVirtual$1 (props) {
|
|
|
14506
14547
|
})));
|
|
14507
14548
|
}
|
|
14508
14549
|
|
|
14509
|
-
var _g, _defs$
|
|
14550
|
+
var _g$1, _defs$3;
|
|
14510
14551
|
|
|
14511
|
-
function _extends$
|
|
14552
|
+
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); }
|
|
14512
14553
|
|
|
14513
14554
|
function SvgFork(props) {
|
|
14514
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
14555
|
+
return /*#__PURE__*/createElement("svg", _extends$6({
|
|
14515
14556
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14516
14557
|
width: 16,
|
|
14517
14558
|
height: 16,
|
|
14518
14559
|
fill: "none"
|
|
14519
|
-
}, props), _g || (_g = /*#__PURE__*/createElement("g", {
|
|
14560
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/createElement("g", {
|
|
14520
14561
|
clipPath: "url(#fork_svg__clip0_695_1221)",
|
|
14521
14562
|
fill: "#333"
|
|
14522
14563
|
}, /*#__PURE__*/createElement("path", {
|
|
@@ -14525,7 +14566,7 @@ function SvgFork(props) {
|
|
|
14525
14566
|
d: "M10.702 11.329l-5.973-5.97.629-.63 5.971 5.971-.627.629z"
|
|
14526
14567
|
}), /*#__PURE__*/createElement("path", {
|
|
14527
14568
|
d: "M4.669 10.702l5.97-5.971.63.628-5.972 5.972-.628-.629z"
|
|
14528
|
-
}))), _defs$
|
|
14569
|
+
}))), _defs$3 || (_defs$3 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("clipPath", {
|
|
14529
14570
|
id: "fork_svg__clip0_695_1221"
|
|
14530
14571
|
}, /*#__PURE__*/createElement("path", {
|
|
14531
14572
|
fill: "#fff",
|
|
@@ -14885,10 +14926,10 @@ var TaxIncludedSwitch$1 = (function () {
|
|
|
14885
14926
|
|
|
14886
14927
|
var _path$5;
|
|
14887
14928
|
|
|
14888
|
-
function _extends$
|
|
14929
|
+
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); }
|
|
14889
14930
|
|
|
14890
14931
|
function SvgMagnifier$1(props) {
|
|
14891
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
14932
|
+
return /*#__PURE__*/createElement("svg", _extends$7({
|
|
14892
14933
|
className: "magnifier_svg__icon",
|
|
14893
14934
|
viewBox: "0 0 1024 1024",
|
|
14894
14935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15011,6 +15052,32 @@ function TableRow$1(props) {
|
|
|
15011
15052
|
}));
|
|
15012
15053
|
}
|
|
15013
15054
|
|
|
15055
|
+
var _g$2, _defs$4;
|
|
15056
|
+
|
|
15057
|
+
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); }
|
|
15058
|
+
|
|
15059
|
+
function SvgPlus$1(props) {
|
|
15060
|
+
return /*#__PURE__*/createElement("svg", _extends$8({
|
|
15061
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15062
|
+
width: 16,
|
|
15063
|
+
height: 15,
|
|
15064
|
+
fill: "none"
|
|
15065
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/createElement("g", {
|
|
15066
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
15067
|
+
}, /*#__PURE__*/createElement("path", {
|
|
15068
|
+
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"
|
|
15069
|
+
}), /*#__PURE__*/createElement("path", {
|
|
15070
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
15071
|
+
}), /*#__PURE__*/createElement("path", {
|
|
15072
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
15073
|
+
}))), _defs$4 || (_defs$4 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("clipPath", {
|
|
15074
|
+
id: "plus_svg__clip0_715_360"
|
|
15075
|
+
}, /*#__PURE__*/createElement("path", {
|
|
15076
|
+
transform: "translate(.5)",
|
|
15077
|
+
d: "M0 0h15v15H0z"
|
|
15078
|
+
})))));
|
|
15079
|
+
}
|
|
15080
|
+
|
|
15014
15081
|
var Text$5 = Typography.Text;
|
|
15015
15082
|
var TitleText$1 = (function (props) {
|
|
15016
15083
|
var rules = props.rules,
|
|
@@ -15046,7 +15113,8 @@ function ItemNameInput$1(props) {
|
|
|
15046
15113
|
height: '100%'
|
|
15047
15114
|
},
|
|
15048
15115
|
value: props.value,
|
|
15049
|
-
onChange: onChange
|
|
15116
|
+
onChange: onChange,
|
|
15117
|
+
suffix: props.suffix
|
|
15050
15118
|
}));
|
|
15051
15119
|
}
|
|
15052
15120
|
|
|
@@ -16257,37 +16325,42 @@ var useColumns$1 = (function (form) {
|
|
|
16257
16325
|
}])
|
|
16258
16326
|
})(React.createElement(ItemNameInput$1, {
|
|
16259
16327
|
shorthand: editGood.shorthand,
|
|
16260
|
-
|
|
16261
|
-
|
|
16262
|
-
}
|
|
16263
|
-
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16328
|
+
suffix: React.createElement(Tooltip$1, {
|
|
16329
|
+
title: "\u70B9\u51FB\u4ECE\u5546\u54C1\u7BA1\u7406\u4E2D\u6DFB\u52A0\u5546\u54C1\u4FE1\u606F"
|
|
16330
|
+
}, React.createElement(Button$1, {
|
|
16331
|
+
type: "link",
|
|
16332
|
+
style: {
|
|
16333
|
+
padding: 0,
|
|
16334
|
+
width: 20
|
|
16335
|
+
},
|
|
16336
|
+
icon: React.createElement(Icon, {
|
|
16337
|
+
component: SvgPlus$1
|
|
16338
|
+
}),
|
|
16339
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
16340
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
16341
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
16342
|
+
while (1) {
|
|
16343
|
+
switch (_context3.prev = _context3.next) {
|
|
16344
|
+
case 0:
|
|
16345
|
+
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
16275
16346
|
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16347
|
+
case 1:
|
|
16348
|
+
case "end":
|
|
16349
|
+
return _context3.stop();
|
|
16350
|
+
}
|
|
16279
16351
|
}
|
|
16280
|
-
}
|
|
16281
|
-
}
|
|
16282
|
-
}));
|
|
16352
|
+
}, _callee3);
|
|
16353
|
+
}));
|
|
16283
16354
|
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
|
|
16290
|
-
|
|
16355
|
+
return function (_x5) {
|
|
16356
|
+
return _ref2.apply(this, arguments);
|
|
16357
|
+
};
|
|
16358
|
+
}())
|
|
16359
|
+
})),
|
|
16360
|
+
onChange: function onChange() {
|
|
16361
|
+
onChangeItemName$1(controller, form, record);
|
|
16362
|
+
}
|
|
16363
|
+
}))));
|
|
16291
16364
|
} else {
|
|
16292
16365
|
return React.createElement("span", null, record.lineAttribute === LineAttributeType$1.折扣行 ? React.createElement("span", {
|
|
16293
16366
|
className: 'goods-list-digtal-discount-tag'
|
|
@@ -17598,17 +17671,17 @@ var useDelRowButton$1 = (function () {
|
|
|
17598
17671
|
};
|
|
17599
17672
|
});
|
|
17600
17673
|
|
|
17601
|
-
var _g$
|
|
17674
|
+
var _g$3, _defs$5;
|
|
17602
17675
|
|
|
17603
|
-
function _extends$
|
|
17676
|
+
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); }
|
|
17604
17677
|
|
|
17605
17678
|
function SvgAdd(props) {
|
|
17606
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
17679
|
+
return /*#__PURE__*/createElement("svg", _extends$9({
|
|
17607
17680
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17608
17681
|
width: 15,
|
|
17609
17682
|
height: 15,
|
|
17610
17683
|
fill: "none"
|
|
17611
|
-
}, props), _g$
|
|
17684
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/createElement("g", {
|
|
17612
17685
|
clipPath: "url(#add_svg__clip0_715_372)"
|
|
17613
17686
|
}, /*#__PURE__*/createElement("path", {
|
|
17614
17687
|
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"
|
|
@@ -17616,7 +17689,7 @@ function SvgAdd(props) {
|
|
|
17616
17689
|
d: "M3.75 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
17617
17690
|
}), /*#__PURE__*/createElement("path", {
|
|
17618
17691
|
d: "M7.031 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
17619
|
-
}))), _defs$
|
|
17692
|
+
}))), _defs$5 || (_defs$5 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("clipPath", {
|
|
17620
17693
|
id: "add_svg__clip0_715_372"
|
|
17621
17694
|
}, /*#__PURE__*/createElement("path", {
|
|
17622
17695
|
d: "M0 0h15v15H0z"
|
|
@@ -17925,7 +17998,7 @@ function AddDiscountRowDrawer(props) {
|
|
|
17925
17998
|
// 折扣金额占比
|
|
17926
17999
|
var share = chain$1(bignumber((_e$lineAmountIncludeT2 = e === null || e === void 0 ? void 0 : e.lineAmountIncludeTax) !== null && _e$lineAmountIncludeT2 !== void 0 ? _e$lineAmountIncludeT2 : 0)).divide(bignumber(totalAmount)); // 折扣金额
|
|
17927
18000
|
|
|
17928
|
-
var value = totalDiscoline.multiply(share.done()).multiply(bignumber(100)).
|
|
18001
|
+
var value = totalDiscoline.multiply(share.done()).multiply(bignumber(100)).round().divide(bignumber(100)).done();
|
|
17929
18002
|
discolinesSum = discolinesSum.add(value);
|
|
17930
18003
|
return value.toNumber();
|
|
17931
18004
|
}); // 剩余折扣金额
|
|
@@ -18363,6 +18436,13 @@ function InvoiceTypeModal(props) {
|
|
|
18363
18436
|
var _props$disableds = props.disableds,
|
|
18364
18437
|
disableds = _props$disableds === void 0 ? [] : _props$disableds;
|
|
18365
18438
|
|
|
18439
|
+
var _React$useState = React.useState({
|
|
18440
|
+
billingType: props.defaultBillingType || 'digital'
|
|
18441
|
+
}),
|
|
18442
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
18443
|
+
formValues = _React$useState2[0],
|
|
18444
|
+
setValues = _React$useState2[1];
|
|
18445
|
+
|
|
18366
18446
|
var _Form$useForm = Form$1.useForm(),
|
|
18367
18447
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
18368
18448
|
form = _Form$useForm2[0];
|
|
@@ -18389,12 +18469,14 @@ function InvoiceTypeModal(props) {
|
|
|
18389
18469
|
})), [props.onOk]);
|
|
18390
18470
|
React.useEffect(function () {
|
|
18391
18471
|
if (props.open) {
|
|
18392
|
-
|
|
18393
|
-
form.setFieldsValue({
|
|
18472
|
+
var values = {
|
|
18394
18473
|
billingType: props.defaultBillingType || 'digital',
|
|
18395
18474
|
invoiceType: props.defaultInvoiceType,
|
|
18396
18475
|
business: props.defaultBusiness
|
|
18397
|
-
}
|
|
18476
|
+
};
|
|
18477
|
+
form.resetFields();
|
|
18478
|
+
form.setFieldsValue(values);
|
|
18479
|
+
setValues(values);
|
|
18398
18480
|
}
|
|
18399
18481
|
}, [props.open, props.defaultBillingType, props.defaultBusiness, props.defaultInvoiceType, form]);
|
|
18400
18482
|
return React.createElement(Modal, {
|
|
@@ -18409,6 +18491,9 @@ function InvoiceTypeModal(props) {
|
|
|
18409
18491
|
layout: "vertical",
|
|
18410
18492
|
style: {
|
|
18411
18493
|
paddingTop: 20
|
|
18494
|
+
},
|
|
18495
|
+
onValuesChange: function onValuesChange(_, e) {
|
|
18496
|
+
setValues(e);
|
|
18412
18497
|
}
|
|
18413
18498
|
}, React.createElement(Row, {
|
|
18414
18499
|
gutter: [16, 16]
|
|
@@ -18421,6 +18506,9 @@ function InvoiceTypeModal(props) {
|
|
|
18421
18506
|
className: "goods-list-digtal-reselect-invoice-typeModal-radio",
|
|
18422
18507
|
optionType: "button",
|
|
18423
18508
|
disabled: disableds.indexOf('billingType') >= 0,
|
|
18509
|
+
onChange: function onChange(e) {
|
|
18510
|
+
props.onChange && props.onChange(e.target.value);
|
|
18511
|
+
},
|
|
18424
18512
|
options: [{
|
|
18425
18513
|
label: '数电发票',
|
|
18426
18514
|
value: 'digital'
|
|
@@ -18432,9 +18520,15 @@ function InvoiceTypeModal(props) {
|
|
|
18432
18520
|
span: 12
|
|
18433
18521
|
}, React.createElement(Form$1.Item, {
|
|
18434
18522
|
name: 'invoiceType',
|
|
18435
|
-
label: "\u9009\u62E9\u7968\u7C7B"
|
|
18523
|
+
label: "\u9009\u62E9\u7968\u7C7B",
|
|
18524
|
+
rules: [{
|
|
18525
|
+
required: true,
|
|
18526
|
+
message: '选择票类必填'
|
|
18527
|
+
}]
|
|
18436
18528
|
}, React.createElement(Select$1, {
|
|
18437
18529
|
size: 'large',
|
|
18530
|
+
allowClear: true,
|
|
18531
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u975E\u5FC5\u586B\u9879\uFF09",
|
|
18438
18532
|
disabled: disableds.indexOf('invoiceType') >= 0,
|
|
18439
18533
|
options: props.invoiceTypeOptions
|
|
18440
18534
|
}))), React.createElement(Col, {
|
|
@@ -18444,7 +18538,8 @@ function InvoiceTypeModal(props) {
|
|
|
18444
18538
|
label: "\u7279\u5B9A\u4E1A\u52A1"
|
|
18445
18539
|
}, React.createElement(Select$1, {
|
|
18446
18540
|
size: 'large',
|
|
18447
|
-
|
|
18541
|
+
allowClear: true,
|
|
18542
|
+
disabled: disableds.indexOf('business') >= 0 || !formValues.invoiceType,
|
|
18448
18543
|
options: props.businessOptions
|
|
18449
18544
|
}))))));
|
|
18450
18545
|
}
|
|
@@ -20190,12 +20285,12 @@ var Digtal = function Digtal(props) {
|
|
|
20190
20285
|
, React.createElement("div", {
|
|
20191
20286
|
className: 'kts-invoice-operate-digtal-cont'
|
|
20192
20287
|
}, props.stakeholder || React.createElement(Stakeholder$1, null)
|
|
20193
|
-
/** 干系人
|
|
20288
|
+
/** 干系人 */
|
|
20194
20289
|
, props.goodsList || React.createElement(GoodsList$1
|
|
20195
20290
|
/** 货物列表 */
|
|
20196
20291
|
, null)), props.sign || React.createElement(SignDigtal, null)
|
|
20197
20292
|
/** 落款 */
|
|
20198
|
-
), React.createElement(EndowCodeDrawer, null));
|
|
20293
|
+
), React.createElement(ImportGoodsDrawer, null), React.createElement(EndowCodeDrawer, null));
|
|
20199
20294
|
};
|
|
20200
20295
|
|
|
20201
20296
|
export { Invoice, InvoiceController, InvoiceTypeModal };
|