kts-component-invoice-operate 3.2.44 → 3.2.45
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/InvoiceController/index.d.ts +1 -1
- package/dist/index.esm.js +55 -36
- package/dist/index.js +53 -34
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +12 -12
- package/src/Invoice/InvoiceController/index.ts +1 -1
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Drag/index.tsx +30 -15
- package/src/Invoice/ui/digtal/Stakeholder/index.less +20 -1
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +2 -1
|
@@ -17,7 +17,7 @@ export default class InvoiceController extends InvoiceControllerForm {
|
|
|
17
17
|
/** 设置当前的编辑货物 */
|
|
18
18
|
setEditGood: (option?: any) => Promise<any>;
|
|
19
19
|
/** 保存正在编辑的货物 */
|
|
20
|
-
saveEditGood: (option?:
|
|
20
|
+
saveEditGood: (option?: any) => Promise<any>;
|
|
21
21
|
/** 删除一个货物 */
|
|
22
22
|
delGood: (option?: string | undefined) => Promise<any>;
|
|
23
23
|
/** 添加一个货物 */
|
package/dist/index.esm.js
CHANGED
|
@@ -2,10 +2,10 @@ import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
|
|
|
2
2
|
import React, { createElement, createContext, useContext, useEffect, forwardRef, Children, isValidElement } from 'react';
|
|
3
3
|
import GreyReactBox, { decorator } from 'grey-react-box';
|
|
4
4
|
import { chain as chain$1, bignumber, create, all } from 'mathjs';
|
|
5
|
-
import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover, Table as Table$1, Tree, Modal as Modal$1, Row as Row$1, Col as Col$1 } from 'kts-components-antd-x3';
|
|
5
|
+
import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$1, Col as Col$1 } from 'kts-components-antd-x3';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
|
-
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Row, Col, Button as Button$1, Tooltip as Tooltip$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal } from 'kts-xui';
|
|
8
|
-
import
|
|
7
|
+
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Row, Col, Button as Button$1, Tooltip as Tooltip$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal } from 'kts-xui';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
9
|
import { Table } from 'kts-components-antd-x4-v4';
|
|
10
10
|
import { render } from 'react-dom';
|
|
11
11
|
import { Input as Input$2, NumberPicker } from '@formily/antd-components';
|
|
@@ -10188,7 +10188,7 @@ function TableRow(props) {
|
|
|
10188
10188
|
bottom: 0
|
|
10189
10189
|
}
|
|
10190
10190
|
})) : React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10191
|
-
className:
|
|
10191
|
+
className: classNames(props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container' : undefined)
|
|
10192
10192
|
}));
|
|
10193
10193
|
}
|
|
10194
10194
|
|
|
@@ -11895,8 +11895,8 @@ var Icon = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
11895
11895
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
11896
11896
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
|
|
11897
11897
|
|
|
11898
|
-
var classString =
|
|
11899
|
-
var svgClassString =
|
|
11898
|
+
var classString = classNames(prefixCls, className);
|
|
11899
|
+
var svgClassString = classNames(_defineProperty$1({}, "".concat(prefixCls, "-spin"), !!spin));
|
|
11900
11900
|
var svgStyle = rotate ? {
|
|
11901
11901
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
11902
11902
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -11980,6 +11980,12 @@ styleInject(css_248z$9);
|
|
|
11980
11980
|
|
|
11981
11981
|
function Drag$1(props) {
|
|
11982
11982
|
var record = props.record;
|
|
11983
|
+
|
|
11984
|
+
var _React$useState = React.useState(false),
|
|
11985
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11986
|
+
open = _React$useState2[0],
|
|
11987
|
+
setOpen = _React$useState2[1];
|
|
11988
|
+
|
|
11983
11989
|
var controller = Invoice.useInvoiceController();
|
|
11984
11990
|
var editGood = controller.useMemo(function (s) {
|
|
11985
11991
|
return s.goodsListState.editGood;
|
|
@@ -11988,7 +11994,7 @@ function Drag$1(props) {
|
|
|
11988
11994
|
return !!editGood;
|
|
11989
11995
|
}, [editGood]);
|
|
11990
11996
|
var onMouseDown = React.useCallback(function () {
|
|
11991
|
-
if (!controller || !record) return;
|
|
11997
|
+
if (!controller || !record || disabled) return;
|
|
11992
11998
|
controller.run( /*#__PURE__*/function () {
|
|
11993
11999
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
11994
12000
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -12253,33 +12259,44 @@ function Drag$1(props) {
|
|
|
12253
12259
|
};
|
|
12254
12260
|
}());
|
|
12255
12261
|
}
|
|
12256
|
-
}, [controller, record]);
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12262
|
+
}, [controller, record, disabled]);
|
|
12263
|
+
var renderButton = React.useMemo(function () {
|
|
12264
|
+
return React.createElement(Button, {
|
|
12265
|
+
type: 'link',
|
|
12266
|
+
style: {
|
|
12267
|
+
padding: 0
|
|
12268
|
+
},
|
|
12269
|
+
onMouseDown: onMouseDown,
|
|
12270
|
+
onClick: function onClick(e) {
|
|
12271
|
+
e.stopPropagation();
|
|
12272
|
+
},
|
|
12273
|
+
className: "kts-invoice-operate-goods-list-itemName-drag",
|
|
12274
|
+
onMouseOver: controller.saveEditGood
|
|
12275
|
+
}, React.createElement(Icon, {
|
|
12276
|
+
component: SvgI001
|
|
12277
|
+
}));
|
|
12278
|
+
}, [onMouseDown, controller]);
|
|
12279
|
+
|
|
12280
|
+
if (disabled) {
|
|
12281
|
+
return React.createElement(Popover, {
|
|
12282
|
+
content: '您还有未编辑完成的商品',
|
|
12283
|
+
trigger: 'focus'
|
|
12284
|
+
}, renderButton);
|
|
12285
|
+
} else {
|
|
12286
|
+
return renderButton;
|
|
12287
|
+
}
|
|
12271
12288
|
}
|
|
12272
12289
|
|
|
12273
12290
|
function DragDiv(props) {
|
|
12274
|
-
var _React$
|
|
12275
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12276
|
-
x = _React$useState2[0],
|
|
12277
|
-
setX = _React$useState2[1];
|
|
12278
|
-
|
|
12279
|
-
var _React$useState3 = React.useState(-110),
|
|
12291
|
+
var _React$useState3 = React.useState(0),
|
|
12280
12292
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
12281
|
-
|
|
12282
|
-
|
|
12293
|
+
x = _React$useState4[0],
|
|
12294
|
+
setX = _React$useState4[1];
|
|
12295
|
+
|
|
12296
|
+
var _React$useState5 = React.useState(-110),
|
|
12297
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
12298
|
+
y = _React$useState6[0],
|
|
12299
|
+
setY = _React$useState6[1];
|
|
12283
12300
|
|
|
12284
12301
|
var div = React.useMemo(function () {
|
|
12285
12302
|
return window.document.querySelector("[data-row-key=\"".concat(props.$index, "\"]"));
|
|
@@ -14782,7 +14799,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
14782
14799
|
}, React.createElement(AddRowButton, null), endowCodeButton.button, delRowButton.button, mergeDetails.button, mergeDiscount.button, addDiscountRowButton.drawer, React.createElement(Search, null)), React.createElement("div", {
|
|
14783
14800
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
14784
14801
|
}, props.menuExpansion, React.createElement(DescribeSwitch, null), React.createElement(TaxIncludedSwitch, null))), React.createElement("div", {
|
|
14785
|
-
className:
|
|
14802
|
+
className: classNames('kts-invoice-operate-goods-list-table', {
|
|
14786
14803
|
'kts-invoice-operate-prefab': isprefab
|
|
14787
14804
|
})
|
|
14788
14805
|
}, React.createElement(TableVirtual, {
|
|
@@ -15131,7 +15148,7 @@ var BuyerNameInput = (function (props) {
|
|
|
15131
15148
|
});
|
|
15132
15149
|
}
|
|
15133
15150
|
|
|
15134
|
-
return React.createElement(Popover, {
|
|
15151
|
+
return React.createElement(Popover$1, {
|
|
15135
15152
|
onVisibleChange: setVisible,
|
|
15136
15153
|
overlayClassName: 'kts-invoice-operate-buyer-name-popover',
|
|
15137
15154
|
placement: "bottomLeft",
|
|
@@ -15581,7 +15598,7 @@ function SvgPlus(props) {
|
|
|
15581
15598
|
})))));
|
|
15582
15599
|
}
|
|
15583
15600
|
|
|
15584
|
-
var css_248z$g = ".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";
|
|
15601
|
+
var css_248z$g = ".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 .ktsAntX-col {\n margin-bottom: 15px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAntX-col:last-child {\n margin-bottom: 0;\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 line-height: 29px;\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 {\n line-height: 1.4;\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.kts-invoice-operate-invoice-digtal-stakeholder.readOnly .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {\n line-height: 1.4;\n}\n";
|
|
15585
15602
|
styleInject(css_248z$g);
|
|
15586
15603
|
|
|
15587
15604
|
var RULES = {
|
|
@@ -15695,7 +15712,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
15695
15712
|
}, [rulesMap, isReadOnly, isReadOnly]);
|
|
15696
15713
|
controller.useForm('stakeholder', form);
|
|
15697
15714
|
return React.createElement("div", {
|
|
15698
|
-
className: "kts-invoice-operate-invoice-digtal-stakeholder"
|
|
15715
|
+
className: classNames("kts-invoice-operate-invoice-digtal-stakeholder", {
|
|
15716
|
+
readOnly: readOnly
|
|
15717
|
+
})
|
|
15699
15718
|
}, React.createElement("div", null, '购买方信息'.split('').map(function (e) {
|
|
15700
15719
|
return React.createElement("span", null, e);
|
|
15701
15720
|
}), !readOnly && React.createElement(Icon, {
|
|
@@ -16761,7 +16780,7 @@ function TableRow$1(props) {
|
|
|
16761
16780
|
bottom: 0
|
|
16762
16781
|
}
|
|
16763
16782
|
})) : React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
16764
|
-
className:
|
|
16783
|
+
className: classNames(props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container' : '')
|
|
16765
16784
|
}));
|
|
16766
16785
|
}
|
|
16767
16786
|
|
|
@@ -21013,7 +21032,7 @@ var Main$3 = decorator(Form.create())(function (props) {
|
|
|
21013
21032
|
flex: 1
|
|
21014
21033
|
}
|
|
21015
21034
|
}), props.menuExpansion, reselectInvoiceType.button, emptyRefill.button), React.createElement("div", {
|
|
21016
|
-
className:
|
|
21035
|
+
className: classNames('kts-invoice-operate-goods-list-table-digtal')
|
|
21017
21036
|
}, React.createElement(TableVirtual$1, {
|
|
21018
21037
|
size: "small",
|
|
21019
21038
|
rowKey: "$index",
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var mathjs = require('mathjs');
|
|
|
9
9
|
var ktsComponentsAntdX3 = require('kts-components-antd-x3');
|
|
10
10
|
var uuid = require('uuid');
|
|
11
11
|
var ktsXui = require('kts-xui');
|
|
12
|
-
var
|
|
12
|
+
var classNames = require('classnames');
|
|
13
13
|
var ktsComponentsAntdX4V4 = require('kts-components-antd-x4-v4');
|
|
14
14
|
var ReactDOM = require('react-dom');
|
|
15
15
|
var antdComponents = require('@formily/antd-components');
|
|
@@ -19,7 +19,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
19
|
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
21
|
var GreyReactBox__default = /*#__PURE__*/_interopDefaultLegacy(GreyReactBox);
|
|
22
|
-
var
|
|
22
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
23
23
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) {
|
|
25
25
|
var keys = Object.keys(object);
|
|
@@ -10198,7 +10198,7 @@ function TableRow(props) {
|
|
|
10198
10198
|
bottom: 0
|
|
10199
10199
|
}
|
|
10200
10200
|
})) : React__default['default'].createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10201
|
-
className:
|
|
10201
|
+
className: classNames__default['default'](props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container' : undefined)
|
|
10202
10202
|
}));
|
|
10203
10203
|
}
|
|
10204
10204
|
|
|
@@ -11905,8 +11905,8 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
11905
11905
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
11906
11906
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
|
|
11907
11907
|
|
|
11908
|
-
var classString =
|
|
11909
|
-
var svgClassString =
|
|
11908
|
+
var classString = classNames__default['default'](prefixCls, className);
|
|
11909
|
+
var svgClassString = classNames__default['default'](_defineProperty$1({}, "".concat(prefixCls, "-spin"), !!spin));
|
|
11910
11910
|
var svgStyle = rotate ? {
|
|
11911
11911
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
11912
11912
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -11990,6 +11990,12 @@ styleInject(css_248z$9);
|
|
|
11990
11990
|
|
|
11991
11991
|
function Drag$1(props) {
|
|
11992
11992
|
var record = props.record;
|
|
11993
|
+
|
|
11994
|
+
var _React$useState = React__default['default'].useState(false),
|
|
11995
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11996
|
+
open = _React$useState2[0],
|
|
11997
|
+
setOpen = _React$useState2[1];
|
|
11998
|
+
|
|
11993
11999
|
var controller = Invoice.useInvoiceController();
|
|
11994
12000
|
var editGood = controller.useMemo(function (s) {
|
|
11995
12001
|
return s.goodsListState.editGood;
|
|
@@ -11998,7 +12004,7 @@ function Drag$1(props) {
|
|
|
11998
12004
|
return !!editGood;
|
|
11999
12005
|
}, [editGood]);
|
|
12000
12006
|
var onMouseDown = React__default['default'].useCallback(function () {
|
|
12001
|
-
if (!controller || !record) return;
|
|
12007
|
+
if (!controller || !record || disabled) return;
|
|
12002
12008
|
controller.run( /*#__PURE__*/function () {
|
|
12003
12009
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
12004
12010
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -12263,33 +12269,44 @@ function Drag$1(props) {
|
|
|
12263
12269
|
};
|
|
12264
12270
|
}());
|
|
12265
12271
|
}
|
|
12266
|
-
}, [controller, record]);
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12272
|
+
}, [controller, record, disabled]);
|
|
12273
|
+
var renderButton = React__default['default'].useMemo(function () {
|
|
12274
|
+
return React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
12275
|
+
type: 'link',
|
|
12276
|
+
style: {
|
|
12277
|
+
padding: 0
|
|
12278
|
+
},
|
|
12279
|
+
onMouseDown: onMouseDown,
|
|
12280
|
+
onClick: function onClick(e) {
|
|
12281
|
+
e.stopPropagation();
|
|
12282
|
+
},
|
|
12283
|
+
className: "kts-invoice-operate-goods-list-itemName-drag",
|
|
12284
|
+
onMouseOver: controller.saveEditGood
|
|
12285
|
+
}, React__default['default'].createElement(Icon, {
|
|
12286
|
+
component: SvgI001
|
|
12287
|
+
}));
|
|
12288
|
+
}, [onMouseDown, controller]);
|
|
12289
|
+
|
|
12290
|
+
if (disabled) {
|
|
12291
|
+
return React__default['default'].createElement(ktsXui.Popover, {
|
|
12292
|
+
content: '您还有未编辑完成的商品',
|
|
12293
|
+
trigger: 'focus'
|
|
12294
|
+
}, renderButton);
|
|
12295
|
+
} else {
|
|
12296
|
+
return renderButton;
|
|
12297
|
+
}
|
|
12281
12298
|
}
|
|
12282
12299
|
|
|
12283
12300
|
function DragDiv(props) {
|
|
12284
|
-
var _React$
|
|
12285
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12286
|
-
x = _React$useState2[0],
|
|
12287
|
-
setX = _React$useState2[1];
|
|
12288
|
-
|
|
12289
|
-
var _React$useState3 = React__default['default'].useState(-110),
|
|
12301
|
+
var _React$useState3 = React__default['default'].useState(0),
|
|
12290
12302
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
12291
|
-
|
|
12292
|
-
|
|
12303
|
+
x = _React$useState4[0],
|
|
12304
|
+
setX = _React$useState4[1];
|
|
12305
|
+
|
|
12306
|
+
var _React$useState5 = React__default['default'].useState(-110),
|
|
12307
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
12308
|
+
y = _React$useState6[0],
|
|
12309
|
+
setY = _React$useState6[1];
|
|
12293
12310
|
|
|
12294
12311
|
var div = React__default['default'].useMemo(function () {
|
|
12295
12312
|
return window.document.querySelector("[data-row-key=\"".concat(props.$index, "\"]"));
|
|
@@ -14792,7 +14809,7 @@ var Main = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (p
|
|
|
14792
14809
|
}, React__default['default'].createElement(AddRowButton, null), endowCodeButton.button, delRowButton.button, mergeDetails.button, mergeDiscount.button, addDiscountRowButton.drawer, React__default['default'].createElement(Search, null)), React__default['default'].createElement("div", {
|
|
14793
14810
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
14794
14811
|
}, props.menuExpansion, React__default['default'].createElement(DescribeSwitch, null), React__default['default'].createElement(TaxIncludedSwitch, null))), React__default['default'].createElement("div", {
|
|
14795
|
-
className:
|
|
14812
|
+
className: classNames__default['default']('kts-invoice-operate-goods-list-table', {
|
|
14796
14813
|
'kts-invoice-operate-prefab': isprefab
|
|
14797
14814
|
})
|
|
14798
14815
|
}, React__default['default'].createElement(TableVirtual, {
|
|
@@ -15591,7 +15608,7 @@ function SvgPlus(props) {
|
|
|
15591
15608
|
})))));
|
|
15592
15609
|
}
|
|
15593
15610
|
|
|
15594
|
-
var css_248z$g = ".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";
|
|
15611
|
+
var css_248z$g = ".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 .ktsAntX-col {\n margin-bottom: 15px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAntX-col:last-child {\n margin-bottom: 0;\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 line-height: 29px;\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 {\n line-height: 1.4;\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.kts-invoice-operate-invoice-digtal-stakeholder.readOnly .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {\n line-height: 1.4;\n}\n";
|
|
15595
15612
|
styleInject(css_248z$g);
|
|
15596
15613
|
|
|
15597
15614
|
var RULES = {
|
|
@@ -15705,7 +15722,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
15705
15722
|
}, [rulesMap, isReadOnly, isReadOnly]);
|
|
15706
15723
|
controller.useForm('stakeholder', form);
|
|
15707
15724
|
return React__default['default'].createElement("div", {
|
|
15708
|
-
className: "kts-invoice-operate-invoice-digtal-stakeholder"
|
|
15725
|
+
className: classNames__default['default']("kts-invoice-operate-invoice-digtal-stakeholder", {
|
|
15726
|
+
readOnly: readOnly
|
|
15727
|
+
})
|
|
15709
15728
|
}, React__default['default'].createElement("div", null, '购买方信息'.split('').map(function (e) {
|
|
15710
15729
|
return React__default['default'].createElement("span", null, e);
|
|
15711
15730
|
}), !readOnly && React__default['default'].createElement(Icon, {
|
|
@@ -16771,7 +16790,7 @@ function TableRow$1(props) {
|
|
|
16771
16790
|
bottom: 0
|
|
16772
16791
|
}
|
|
16773
16792
|
})) : React__default['default'].createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
16774
|
-
className:
|
|
16793
|
+
className: classNames__default['default'](props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container' : '')
|
|
16775
16794
|
}));
|
|
16776
16795
|
}
|
|
16777
16796
|
|
|
@@ -21023,7 +21042,7 @@ var Main$3 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
21023
21042
|
flex: 1
|
|
21024
21043
|
}
|
|
21025
21044
|
}), props.menuExpansion, reselectInvoiceType.button, emptyRefill.button), React__default['default'].createElement("div", {
|
|
21026
|
-
className:
|
|
21045
|
+
className: classNames__default['default']('kts-invoice-operate-goods-list-table-digtal')
|
|
21027
21046
|
}, React__default['default'].createElement(TableVirtual$1, {
|
|
21028
21047
|
size: "small",
|
|
21029
21048
|
rowKey: "$index",
|
package/package.json
CHANGED
|
@@ -15,19 +15,19 @@ export default () => {
|
|
|
15
15
|
tag:'成品油',
|
|
16
16
|
})
|
|
17
17
|
await controller.formList.get('stakeholder')?.setFieldsValue({
|
|
18
|
-
buyerName: '
|
|
19
|
-
buyerTaxId: '
|
|
20
|
-
buyerAddress: '
|
|
21
|
-
buyerPhone: '
|
|
22
|
-
buyerBank: '
|
|
23
|
-
buyerAccount: '
|
|
18
|
+
buyerName: '国能供应链内蒙古有限公司',
|
|
19
|
+
buyerTaxId: '91150291552838725H',
|
|
20
|
+
buyerAddress: '内蒙古自治区包头稀士高新区总部经济园区9号楼204号',
|
|
21
|
+
buyerPhone: '0472-5368680',
|
|
22
|
+
buyerBank: '11050167360000000932中国银行股份有限公司包头开发区支行',
|
|
23
|
+
buyerAccount: '',
|
|
24
24
|
|
|
25
|
-
supplierName: '
|
|
26
|
-
supplierTaxId: '
|
|
27
|
-
sellerAddress: '
|
|
28
|
-
sellerPhone: '
|
|
29
|
-
sellerBank: '
|
|
30
|
-
sellerAccount: '
|
|
25
|
+
supplierName: '国星供应链管理(北京)有限公司上海分公司',
|
|
26
|
+
supplierTaxId: '91310230MA1JWA3QX1',
|
|
27
|
+
sellerAddress: '上海市宝山区南镇逸仙路华滋奔腾大厦A座1207室',
|
|
28
|
+
sellerPhone: '13511077832',
|
|
29
|
+
sellerBank: '广发银行股份有限公司上海大柏树支行',
|
|
30
|
+
sellerAccount: '9550880218186900195',
|
|
31
31
|
})
|
|
32
32
|
await controller.formList.get('sign')?.setFieldsValue({
|
|
33
33
|
remark: '备注',
|
|
@@ -43,7 +43,7 @@ export default class InvoiceController extends InvoiceControllerForm {
|
|
|
43
43
|
setEditGood = this.pipeline(setEditGood);
|
|
44
44
|
|
|
45
45
|
/** 保存正在编辑的货物 */
|
|
46
|
-
saveEditGood = this.pipeline(saveEditGood);
|
|
46
|
+
saveEditGood = this.pipeline<any>(saveEditGood);
|
|
47
47
|
|
|
48
48
|
/** 删除一个货物 */
|
|
49
49
|
delGood = this.pipeline(delGood);
|
|
@@ -7,6 +7,7 @@ import { IGood, Invoice } from '../../../../../../../..';
|
|
|
7
7
|
import mounting from "../../../../../../../tools/mounting";
|
|
8
8
|
import { LineAttributeType } from "../../../../../../../InvoiceController";
|
|
9
9
|
import './index.less';
|
|
10
|
+
import { Popover } from "kts-xui";
|
|
10
11
|
|
|
11
12
|
export interface IDragProps {
|
|
12
13
|
record: IGood
|
|
@@ -16,6 +17,8 @@ export default function Drag(props: IDragProps) {
|
|
|
16
17
|
|
|
17
18
|
const { record } = props;
|
|
18
19
|
|
|
20
|
+
const [open, setOpen] = React.useState(false)
|
|
21
|
+
|
|
19
22
|
const controller = Invoice.useInvoiceController();
|
|
20
23
|
|
|
21
24
|
const editGood = controller.useMemo(s => s.goodsListState.editGood, []);
|
|
@@ -23,7 +26,7 @@ export default function Drag(props: IDragProps) {
|
|
|
23
26
|
const disabled = React.useMemo(() => !!editGood, [editGood]);
|
|
24
27
|
|
|
25
28
|
const onMouseDown = React.useCallback(() => {
|
|
26
|
-
if (!controller || !record) return;
|
|
29
|
+
if (!controller || !record || disabled) return;
|
|
27
30
|
controller.run(async s => s.goodsListState.drag.current = record.$index);
|
|
28
31
|
|
|
29
32
|
const rowList = window.document.querySelectorAll<HTMLDivElement>('.kts-invoice-operate-goods-list');
|
|
@@ -136,20 +139,32 @@ export default function Drag(props: IDragProps) {
|
|
|
136
139
|
s.goodsListState.drag.current = undefined;
|
|
137
140
|
})
|
|
138
141
|
}
|
|
139
|
-
}, [controller, record])
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
}, [controller, record, disabled])
|
|
143
|
+
|
|
144
|
+
const renderButton = React.useMemo(() => {
|
|
145
|
+
return (
|
|
146
|
+
<Button
|
|
147
|
+
type='link'
|
|
148
|
+
style={{ padding: 0 }}
|
|
149
|
+
onMouseDown={onMouseDown}
|
|
150
|
+
onClick={e => { e.stopPropagation() }}
|
|
151
|
+
className={"kts-invoice-operate-goods-list-itemName-drag"}
|
|
152
|
+
onMouseOver={controller.saveEditGood}
|
|
153
|
+
>
|
|
154
|
+
<Icon component={I001Svg} />
|
|
155
|
+
</Button>
|
|
156
|
+
)
|
|
157
|
+
}, [onMouseDown, controller])
|
|
158
|
+
|
|
159
|
+
if (disabled) {
|
|
160
|
+
return (
|
|
161
|
+
<Popover content={'您还有未编辑完成的商品'} trigger='focus' >
|
|
162
|
+
{renderButton}
|
|
163
|
+
</Popover>
|
|
164
|
+
)
|
|
165
|
+
} else {
|
|
166
|
+
return renderButton;
|
|
167
|
+
}
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
function DragDiv(props: IGood) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
display: flex;
|
|
4
4
|
|
|
5
|
-
.digtal-stakeholder-expand-button{
|
|
5
|
+
.digtal-stakeholder-expand-button {
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
|
|
37
37
|
padding: 20px 10px;
|
|
38
38
|
|
|
39
|
+
.ktsAntX-col {
|
|
40
|
+
margin-bottom: 15px;
|
|
41
|
+
|
|
42
|
+
&:last-child {
|
|
43
|
+
margin-bottom: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
.ktsAnt3x-row.ktsAnt3x-form-item {
|
|
40
48
|
display : flex;
|
|
41
49
|
margin-bottom: 0;
|
|
@@ -43,15 +51,26 @@
|
|
|
43
51
|
.ktsAnt3x-form-item-label {
|
|
44
52
|
flex : none;
|
|
45
53
|
font-weight: 500;
|
|
54
|
+
line-height: 29px;
|
|
46
55
|
|
|
47
56
|
label {
|
|
48
57
|
color: #9F603D;
|
|
49
58
|
}
|
|
50
59
|
}
|
|
51
60
|
|
|
61
|
+
.ktsAnt3x-form-item-control {
|
|
62
|
+
line-height: 1.4;
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
.ktsAnt3x-form-item-control-wrapper {
|
|
53
66
|
flex: 1;
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
69
|
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.kts-invoice-operate-invoice-digtal-stakeholder.readOnly {
|
|
73
|
+
.digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {
|
|
74
|
+
line-height: 1.4;
|
|
75
|
+
}
|
|
57
76
|
}
|
|
@@ -13,6 +13,7 @@ import { ReactComponent as PlusSvg } from './svg/plus.svg'
|
|
|
13
13
|
import InvoiceController from "../../../InvoiceController";
|
|
14
14
|
import Invoice from "../../../../Invoice";
|
|
15
15
|
import './index.less';
|
|
16
|
+
import classNames from 'classnames';
|
|
16
17
|
|
|
17
18
|
const RULES = {
|
|
18
19
|
companyName: (label: string) => [
|
|
@@ -98,7 +99,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
98
99
|
controller.useForm('stakeholder', form);
|
|
99
100
|
|
|
100
101
|
return (
|
|
101
|
-
<div className="kts-invoice-operate-invoice-digtal-stakeholder" >
|
|
102
|
+
<div className={classNames("kts-invoice-operate-invoice-digtal-stakeholder", { readOnly: readOnly })} >
|
|
102
103
|
<div>
|
|
103
104
|
{'购买方信息'.split('').map(e => <span>{e}</span>)}
|
|
104
105
|
{
|