kts-component-invoice-operate 3.2.2 → 3.2.4
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/{ui/digtal/GoodsList.o/ui/AddRowButton → Invoice-digtal/_test/prefab}/index.d.ts +1 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.d.ts +1 -1
- package/dist/index.esm.js +21 -5
- package/dist/index.js +21 -5
- package/package.json +2 -2
- package/src/Invoice/Invoice-digtal/_test/prefab/index.tsx +150 -0
- package/src/Invoice/Invoice-digtal/index.md +3 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useRowSelection/index.tsx +12 -2
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useReselectInvoiceType/index.tsx +1 -0
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +5 -1
- package/src/InvoiceTypeModal/index.tsx +2 -1
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.d.ts +0 -35
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.d.ts +0 -7
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowEditButton/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.d.ts +0 -4
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +0 -7
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +0 -7
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +0 -7
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.d.ts +0 -7
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useDeduction/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/GoodsList.o/hook/useWindowClick/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/GoodsList.o/index.d.ts +0 -20
- package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.d.ts +0 -2
- package/dist/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.d.ts +0 -4
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/autoFillFn/index.ts +0 -520
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/index.tsx +0 -624
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.less +0 -10
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/ItemNameInput/index.tsx +0 -19
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowEditButton/index.tsx +0 -30
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +0 -43
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +0 -76
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +0 -41
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +0 -34
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.less +0 -13
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/index.tsx +0 -98
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowMenu/spot.svg +0 -1
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/RowSaveButton/index.tsx +0 -14
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useColumns/ui/TitleText/index.tsx +0 -20
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useDeduction/index.tsx +0 -24
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useOnRow/index.tsx +0 -39
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useRowSelection/index.tsx +0 -112
- package/src/Invoice/ui/digtal/GoodsList.o/hook/useWindowClick/index.tsx +0 -23
- package/src/Invoice/ui/digtal/GoodsList.o/index.less +0 -7
- package/src/Invoice/ui/digtal/GoodsList.o/index.tsx +0 -132
- package/src/Invoice/ui/digtal/GoodsList.o/ui/AddRowButton/index.tsx +0 -66
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableRow/index.tsx +0 -28
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.less +0 -43
- package/src/Invoice/ui/digtal/GoodsList.o/ui/TableVirtual/index.tsx +0 -109
package/dist/index.esm.js
CHANGED
|
@@ -14113,7 +14113,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
14113
14113
|
return s.stakeholder.rulesMap || {};
|
|
14114
14114
|
}, []);
|
|
14115
14115
|
var readOnly = React.useMemo(function () {
|
|
14116
|
-
|
|
14116
|
+
if (model === 'readOnly') return true;
|
|
14117
|
+
if (model === 'prefab') return true;
|
|
14118
|
+
return false;
|
|
14117
14119
|
}, [model]);
|
|
14118
14120
|
var onExpand = React.useCallback(function () {
|
|
14119
14121
|
setExpand(function (e) {
|
|
@@ -17301,11 +17303,20 @@ var useRowSelection$1 = (function () {
|
|
|
17301
17303
|
var goodsList = controller.useMemo(function (s) {
|
|
17302
17304
|
return s.goodsListState.goodsList;
|
|
17303
17305
|
}, []);
|
|
17304
|
-
/**
|
|
17306
|
+
/** 组件模式 */
|
|
17305
17307
|
|
|
17306
|
-
var
|
|
17307
|
-
return s.
|
|
17308
|
+
var model = controller.useMemo(function (s) {
|
|
17309
|
+
return s.model;
|
|
17308
17310
|
}, []);
|
|
17311
|
+
/** 搜索条件 */
|
|
17312
|
+
// const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
17313
|
+
|
|
17314
|
+
/** 是否显示选择框 */
|
|
17315
|
+
|
|
17316
|
+
var isShow = React.useMemo(function () {
|
|
17317
|
+
if (model === 'readOnly') return false;
|
|
17318
|
+
return true;
|
|
17319
|
+
}, [model]);
|
|
17309
17320
|
/** 是否全选 */
|
|
17310
17321
|
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
17311
17322
|
|
|
@@ -17569,6 +17580,7 @@ var useRowSelection$1 = (function () {
|
|
|
17569
17580
|
React.useEffect(function () {
|
|
17570
17581
|
sortOut(true);
|
|
17571
17582
|
}, [sortOut, goodsList]);
|
|
17583
|
+
if (isShow === false) return undefined;
|
|
17572
17584
|
return {
|
|
17573
17585
|
columnWidth: 45,
|
|
17574
17586
|
columnTitle: columnTitle,
|
|
@@ -17890,6 +17902,7 @@ var useAddDiscountRowButton$1 = (function () {
|
|
|
17890
17902
|
|
|
17891
17903
|
var isEnable = React.useMemo(function () {
|
|
17892
17904
|
if (model === 'readOnly') return false;
|
|
17905
|
+
if (model === 'prefab') return false;
|
|
17893
17906
|
return !(isAddDiscount === false);
|
|
17894
17907
|
}, [isAddDiscount, model]);
|
|
17895
17908
|
var button = React.useMemo(function () {
|
|
@@ -18415,6 +18428,7 @@ var useEmptyRefill = (function () {
|
|
|
18415
18428
|
}, [controller]);
|
|
18416
18429
|
var button = React.useMemo(function () {
|
|
18417
18430
|
if (model === 'readOnly') return React.createElement(React.Fragment, null);
|
|
18431
|
+
if (model === 'prefab') return React.createElement(React.Fragment, null);
|
|
18418
18432
|
return React.createElement(Popconfirm, {
|
|
18419
18433
|
title: "\u5C06\u8981\u6E05\u7A7A\u6240\u6709\u9879\u76EE\u4FE1\u606F\uFF0C\u662F\u5426\u7EE7\u7EED",
|
|
18420
18434
|
onConfirm: confirm,
|
|
@@ -18528,7 +18542,7 @@ function InvoiceTypeModal(props) {
|
|
|
18528
18542
|
}, React.createElement(Select$1, {
|
|
18529
18543
|
size: 'large',
|
|
18530
18544
|
allowClear: true,
|
|
18531
|
-
placeholder: "\u8BF7\u9009\u62E9\uFF08\
|
|
18545
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u5FC5\u586B\u9879\uFF09",
|
|
18532
18546
|
disabled: disableds.indexOf('invoiceType') >= 0,
|
|
18533
18547
|
options: props.invoiceTypeOptions
|
|
18534
18548
|
}))), React.createElement(Col, {
|
|
@@ -18539,6 +18553,7 @@ function InvoiceTypeModal(props) {
|
|
|
18539
18553
|
}, React.createElement(Select$1, {
|
|
18540
18554
|
size: 'large',
|
|
18541
18555
|
allowClear: true,
|
|
18556
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u975E\u5FC5\u586B\u9879\uFF09",
|
|
18542
18557
|
disabled: disableds.indexOf('business') >= 0 || !formValues.invoiceType,
|
|
18543
18558
|
options: props.businessOptions
|
|
18544
18559
|
}))))));
|
|
@@ -18575,6 +18590,7 @@ var useReselectInvoiceType = (function () {
|
|
|
18575
18590
|
}, [onClose, typeModalProps === null || typeModalProps === void 0 ? void 0 : typeModalProps.onOk]);
|
|
18576
18591
|
var isEnable = React.useMemo(function () {
|
|
18577
18592
|
if (model === 'readOnly') return false;
|
|
18593
|
+
if (model === 'prefab') return false;
|
|
18578
18594
|
return true;
|
|
18579
18595
|
}, [model]);
|
|
18580
18596
|
var button = React.useMemo(function () {
|
package/dist/index.js
CHANGED
|
@@ -14123,7 +14123,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
14123
14123
|
return s.stakeholder.rulesMap || {};
|
|
14124
14124
|
}, []);
|
|
14125
14125
|
var readOnly = React__default['default'].useMemo(function () {
|
|
14126
|
-
|
|
14126
|
+
if (model === 'readOnly') return true;
|
|
14127
|
+
if (model === 'prefab') return true;
|
|
14128
|
+
return false;
|
|
14127
14129
|
}, [model]);
|
|
14128
14130
|
var onExpand = React__default['default'].useCallback(function () {
|
|
14129
14131
|
setExpand(function (e) {
|
|
@@ -17311,11 +17313,20 @@ var useRowSelection$1 = (function () {
|
|
|
17311
17313
|
var goodsList = controller.useMemo(function (s) {
|
|
17312
17314
|
return s.goodsListState.goodsList;
|
|
17313
17315
|
}, []);
|
|
17314
|
-
/**
|
|
17316
|
+
/** 组件模式 */
|
|
17315
17317
|
|
|
17316
|
-
var
|
|
17317
|
-
return s.
|
|
17318
|
+
var model = controller.useMemo(function (s) {
|
|
17319
|
+
return s.model;
|
|
17318
17320
|
}, []);
|
|
17321
|
+
/** 搜索条件 */
|
|
17322
|
+
// const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
17323
|
+
|
|
17324
|
+
/** 是否显示选择框 */
|
|
17325
|
+
|
|
17326
|
+
var isShow = React__default['default'].useMemo(function () {
|
|
17327
|
+
if (model === 'readOnly') return false;
|
|
17328
|
+
return true;
|
|
17329
|
+
}, [model]);
|
|
17319
17330
|
/** 是否全选 */
|
|
17320
17331
|
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
17321
17332
|
|
|
@@ -17579,6 +17590,7 @@ var useRowSelection$1 = (function () {
|
|
|
17579
17590
|
React__default['default'].useEffect(function () {
|
|
17580
17591
|
sortOut(true);
|
|
17581
17592
|
}, [sortOut, goodsList]);
|
|
17593
|
+
if (isShow === false) return undefined;
|
|
17582
17594
|
return {
|
|
17583
17595
|
columnWidth: 45,
|
|
17584
17596
|
columnTitle: columnTitle,
|
|
@@ -17900,6 +17912,7 @@ var useAddDiscountRowButton$1 = (function () {
|
|
|
17900
17912
|
|
|
17901
17913
|
var isEnable = React__default['default'].useMemo(function () {
|
|
17902
17914
|
if (model === 'readOnly') return false;
|
|
17915
|
+
if (model === 'prefab') return false;
|
|
17903
17916
|
return !(isAddDiscount === false);
|
|
17904
17917
|
}, [isAddDiscount, model]);
|
|
17905
17918
|
var button = React__default['default'].useMemo(function () {
|
|
@@ -18425,6 +18438,7 @@ var useEmptyRefill = (function () {
|
|
|
18425
18438
|
}, [controller]);
|
|
18426
18439
|
var button = React__default['default'].useMemo(function () {
|
|
18427
18440
|
if (model === 'readOnly') return React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
18441
|
+
if (model === 'prefab') return React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
18428
18442
|
return React__default['default'].createElement(ktsXui.Popconfirm, {
|
|
18429
18443
|
title: "\u5C06\u8981\u6E05\u7A7A\u6240\u6709\u9879\u76EE\u4FE1\u606F\uFF0C\u662F\u5426\u7EE7\u7EED",
|
|
18430
18444
|
onConfirm: confirm,
|
|
@@ -18538,7 +18552,7 @@ function InvoiceTypeModal(props) {
|
|
|
18538
18552
|
}, React__default['default'].createElement(ktsXui.Select, {
|
|
18539
18553
|
size: 'large',
|
|
18540
18554
|
allowClear: true,
|
|
18541
|
-
placeholder: "\u8BF7\u9009\u62E9\uFF08\
|
|
18555
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u5FC5\u586B\u9879\uFF09",
|
|
18542
18556
|
disabled: disableds.indexOf('invoiceType') >= 0,
|
|
18543
18557
|
options: props.invoiceTypeOptions
|
|
18544
18558
|
}))), React__default['default'].createElement(ktsXui.Col, {
|
|
@@ -18549,6 +18563,7 @@ function InvoiceTypeModal(props) {
|
|
|
18549
18563
|
}, React__default['default'].createElement(ktsXui.Select, {
|
|
18550
18564
|
size: 'large',
|
|
18551
18565
|
allowClear: true,
|
|
18566
|
+
placeholder: "\u8BF7\u9009\u62E9\uFF08\u975E\u5FC5\u586B\u9879\uFF09",
|
|
18552
18567
|
disabled: disableds.indexOf('business') >= 0 || !formValues.invoiceType,
|
|
18553
18568
|
options: props.businessOptions
|
|
18554
18569
|
}))))));
|
|
@@ -18585,6 +18600,7 @@ var useReselectInvoiceType = (function () {
|
|
|
18585
18600
|
}, [onClose, typeModalProps === null || typeModalProps === void 0 ? void 0 : typeModalProps.onOk]);
|
|
18586
18601
|
var isEnable = React__default['default'].useMemo(function () {
|
|
18587
18602
|
if (model === 'readOnly') return false;
|
|
18603
|
+
if (model === 'prefab') return false;
|
|
18588
18604
|
return true;
|
|
18589
18605
|
}, [model]);
|
|
18590
18606
|
var button = React__default['default'].useMemo(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kts-component-invoice-operate",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"gitHooks": {
|
|
20
20
|
"pre-commit": "lint-staged"
|
|
21
21
|
},
|
|
22
|
-
"lint-staged": {
|
|
22
|
+
"lint-staged": {
|
|
23
23
|
"*.{js,jsx,less,md,json}": [],
|
|
24
24
|
"*.ts?(x)": []
|
|
25
25
|
},
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Invoice from '../../..';
|
|
3
|
+
import idGenerator from '../../../../Invoice/tools/idGenerator';
|
|
4
|
+
import 'antd/dist/antd.css';
|
|
5
|
+
|
|
6
|
+
export default () => {
|
|
7
|
+
|
|
8
|
+
const controller = React.useMemo(() => {
|
|
9
|
+
const controller = new Invoice.InvoiceController();
|
|
10
|
+
controller.run(async s => {
|
|
11
|
+
s.model = 'prefab';
|
|
12
|
+
s.goodsListState.goodsList = lines.map(e => {
|
|
13
|
+
return {
|
|
14
|
+
$index: idGenerator(),
|
|
15
|
+
...e,
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}).then(() => {
|
|
19
|
+
controller.formList.get('stakeholder')?.setFieldsValue({
|
|
20
|
+
buyerName: '购买方名称',
|
|
21
|
+
buyerTaxId: 'xxxxxxxxxx',
|
|
22
|
+
buyerAddress: '购买方地址',
|
|
23
|
+
buyerPhone: '15800000000',
|
|
24
|
+
buyerBank: '购买方开户银行',
|
|
25
|
+
buyerAccount: '银行账号',
|
|
26
|
+
|
|
27
|
+
supplierName: '销售方名称',
|
|
28
|
+
supplierTaxId: 'xxxxxxxxxxxx',
|
|
29
|
+
sellerAddress: '购买方地址',
|
|
30
|
+
sellerPhone: '15800000000',
|
|
31
|
+
sellerBank: '购买方开户银行',
|
|
32
|
+
sellerAccount: '银行账号',
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
return controller;
|
|
36
|
+
}, []);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Invoice
|
|
40
|
+
invoiceType='digtal'
|
|
41
|
+
controller={controller}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const lines: any[] = [
|
|
47
|
+
{
|
|
48
|
+
"buyersItemCode": null,
|
|
49
|
+
"buyersItemModelName": "GN-G32Z104",
|
|
50
|
+
"buyersItemName": "*配电控制设备*公牛(BULL)",
|
|
51
|
+
"buyersItemUnit": null,
|
|
52
|
+
"discount": 5010.04,
|
|
53
|
+
"discountGroup": "31b6d887-4877-4926-abe8-ab49ef6902da",
|
|
54
|
+
"dispatchDocumentReference": null,
|
|
55
|
+
"dispatchLineReference": null,
|
|
56
|
+
"favouredPolicyMark": "0",
|
|
57
|
+
"favouredPolicyName": null,
|
|
58
|
+
"id": "40823568750477313",
|
|
59
|
+
"itemModelName": "GN-G32Z104",
|
|
60
|
+
"itemName": "*配电控制设备*公牛(BULL)",
|
|
61
|
+
"lineAmountExcludeTax": 443365.88,
|
|
62
|
+
"lineAmountIncludeTax": 501003.53,
|
|
63
|
+
"lineAttribute": "0",
|
|
64
|
+
"lineDiscountExcludeTax": 4433.66,
|
|
65
|
+
"lineDiscountRate": null,
|
|
66
|
+
"lineId": "1740823580142206976",
|
|
67
|
+
"lineOrder": 1,
|
|
68
|
+
"materialCode": null,
|
|
69
|
+
"noticeCodeNo": null,
|
|
70
|
+
"noticeLineId": null,
|
|
71
|
+
"orderLineId": null,
|
|
72
|
+
"orderLineReference": null,
|
|
73
|
+
"orderNo": null,
|
|
74
|
+
"orderReference": null,
|
|
75
|
+
"priceExcludeTax": 827.17518997,
|
|
76
|
+
"priceIncludeTax": 934.70796467,
|
|
77
|
+
"quantity": 536,
|
|
78
|
+
"receiptDocumentReference": null,
|
|
79
|
+
"receiptLineReference": null,
|
|
80
|
+
"reconciliationDocumentReference": null,
|
|
81
|
+
"reconciliationSheetLineReference": null,
|
|
82
|
+
"relationReferences": null,
|
|
83
|
+
"requisitionLineNo": null,
|
|
84
|
+
"sellersItemCode": null,
|
|
85
|
+
"sellersItemModelName": null,
|
|
86
|
+
"sellersItemName": "*配电控制设备*1",
|
|
87
|
+
"sellersItemUnit": null,
|
|
88
|
+
"specialManagement": null,
|
|
89
|
+
"statementCode": null,
|
|
90
|
+
"statementLineId": null,
|
|
91
|
+
"taxAmount": 57637.65,
|
|
92
|
+
"taxClassificationCode": "1090407030000000000",
|
|
93
|
+
"taxDiscount": 576.38,
|
|
94
|
+
"taxRate": 13,
|
|
95
|
+
"unit": "件",
|
|
96
|
+
"zeroTaxRateFlag": 'dddddd'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"buyersItemCode": null,
|
|
100
|
+
"buyersItemModelName": "GN-G32Z104",
|
|
101
|
+
"buyersItemName": "*配电控制设备*公牛(BULL)",
|
|
102
|
+
"buyersItemUnit": null,
|
|
103
|
+
"discount": null,
|
|
104
|
+
"discountGroup": "31b6d887-4877-4926-abe8-ab49ef6902da",
|
|
105
|
+
"dispatchDocumentReference": null,
|
|
106
|
+
"dispatchLineReference": null,
|
|
107
|
+
"favouredPolicyMark": "0",
|
|
108
|
+
"favouredPolicyName": null,
|
|
109
|
+
"id": "40823568750477313",
|
|
110
|
+
"itemModelName": "",
|
|
111
|
+
"itemName": "*配电控制设备*公牛(BULL)",
|
|
112
|
+
"lineAmountExcludeTax": -4433.66,
|
|
113
|
+
"lineAmountIncludeTax": -5010.04,
|
|
114
|
+
"lineAttribute": "0",
|
|
115
|
+
"lineDiscountExcludeTax": null,
|
|
116
|
+
"lineDiscountRate": null,
|
|
117
|
+
"lineId": "1740823580142206976",
|
|
118
|
+
"lineOrder": 2,
|
|
119
|
+
"materialCode": null,
|
|
120
|
+
"noticeCodeNo": null,
|
|
121
|
+
"noticeLineId": null,
|
|
122
|
+
"orderLineId": null,
|
|
123
|
+
"orderLineReference": null,
|
|
124
|
+
"orderNo": null,
|
|
125
|
+
"orderReference": null,
|
|
126
|
+
"priceExcludeTax": null,
|
|
127
|
+
"priceIncludeTax": null,
|
|
128
|
+
"quantity": null,
|
|
129
|
+
"receiptDocumentReference": null,
|
|
130
|
+
"receiptLineReference": null,
|
|
131
|
+
"reconciliationDocumentReference": null,
|
|
132
|
+
"reconciliationSheetLineReference": null,
|
|
133
|
+
"relationReferences": null,
|
|
134
|
+
"requisitionLineNo": null,
|
|
135
|
+
"sellersItemCode": null,
|
|
136
|
+
"sellersItemModelName": null,
|
|
137
|
+
"sellersItemName": "*配电控制设备*1",
|
|
138
|
+
"sellersItemUnit": null,
|
|
139
|
+
"specialManagement": null,
|
|
140
|
+
"statementCode": null,
|
|
141
|
+
"statementLineId": null,
|
|
142
|
+
"taxAmount": -576.38,
|
|
143
|
+
"taxClassificationCode": "1090407030000000000",
|
|
144
|
+
"taxDiscount": null,
|
|
145
|
+
"taxRate": 13,
|
|
146
|
+
"unit": "",
|
|
147
|
+
"zeroTaxRateFlag": null
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
|
|
@@ -15,8 +15,17 @@ export default () => {
|
|
|
15
15
|
/** 货物列表 */
|
|
16
16
|
const goodsList = controller.useMemo(s => s.goodsListState.goodsList, []);
|
|
17
17
|
|
|
18
|
+
/** 组件模式 */
|
|
19
|
+
const model = controller.useMemo(s => s.model, []);
|
|
20
|
+
|
|
18
21
|
/** 搜索条件 */
|
|
19
|
-
const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
22
|
+
// const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
23
|
+
|
|
24
|
+
/** 是否显示选择框 */
|
|
25
|
+
const isShow = React.useMemo(() => {
|
|
26
|
+
if (model === 'readOnly') return false
|
|
27
|
+
return true;
|
|
28
|
+
}, [model])
|
|
20
29
|
|
|
21
30
|
/** 是否全选 */
|
|
22
31
|
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
@@ -40,7 +49,7 @@ export default () => {
|
|
|
40
49
|
await controller.pipeline(async s => {
|
|
41
50
|
const seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue, s.goodsListState.isTaxIncluded).map(e => e.$index)
|
|
42
51
|
|
|
43
|
-
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(e
|
|
52
|
+
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(e => !seeGoodsIndex.some(t => e === t));
|
|
44
53
|
})()
|
|
45
54
|
} else {
|
|
46
55
|
await controller.pipeline(async s => {
|
|
@@ -103,6 +112,7 @@ export default () => {
|
|
|
103
112
|
sortOut(true);
|
|
104
113
|
}, [sortOut, goodsList])
|
|
105
114
|
|
|
115
|
+
if (isShow === false) return undefined;
|
|
106
116
|
return {
|
|
107
117
|
columnWidth: 45,
|
|
108
118
|
columnTitle,
|
|
@@ -65,7 +65,11 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
65
65
|
|
|
66
66
|
const rulesMap = controller.useMemo(s => s.stakeholder.rulesMap || {}, []);
|
|
67
67
|
|
|
68
|
-
const readOnly = React.useMemo(() =>
|
|
68
|
+
const readOnly = React.useMemo(() => {
|
|
69
|
+
if(model === 'readOnly') return true;
|
|
70
|
+
if(model === 'prefab') return true;
|
|
71
|
+
return false;
|
|
72
|
+
}, [model]);
|
|
69
73
|
|
|
70
74
|
const onExpand = React.useCallback(() => { setExpand(e => !e) }, []);
|
|
71
75
|
|
|
@@ -120,7 +120,7 @@ export default function InvoiceTypeModal(props: IInvoiceTypeModalProps) {
|
|
|
120
120
|
<Select
|
|
121
121
|
size='large'
|
|
122
122
|
allowClear
|
|
123
|
-
placeholder="
|
|
123
|
+
placeholder="请选择(必填项)"
|
|
124
124
|
disabled={disableds.indexOf('invoiceType') >= 0}
|
|
125
125
|
options={props.invoiceTypeOptions}
|
|
126
126
|
/>
|
|
@@ -132,6 +132,7 @@ export default function InvoiceTypeModal(props: IInvoiceTypeModalProps) {
|
|
|
132
132
|
<Select
|
|
133
133
|
size='large'
|
|
134
134
|
allowClear
|
|
135
|
+
placeholder="请选择(非必填项)"
|
|
135
136
|
disabled={disableds.indexOf('business') >= 0 || !formValues.invoiceType}
|
|
136
137
|
options={props.businessOptions}
|
|
137
138
|
/>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 数量 保留15位数字
|
|
3
|
-
* 单价 保留15位数字
|
|
4
|
-
* 金额 小数点后 2位
|
|
5
|
-
* 税额 小数点后 2位
|
|
6
|
-
*/
|
|
7
|
-
import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
|
|
8
|
-
import InvoiceController, { IGood } from '../../../../../../InvoiceController';
|
|
9
|
-
export { format2, format15 } from '../../../../../../tools/calculate';
|
|
10
|
-
/** 清除计算中启动字段 */
|
|
11
|
-
export declare const clearCalculatingField: (controller: InvoiceController) => Promise<any>;
|
|
12
|
-
/** 数量改变了 */
|
|
13
|
-
export declare const onChangeQuantity: (...par: any[]) => void;
|
|
14
|
-
/** 单价(含税) */
|
|
15
|
-
export declare const onChangePriceIncludeTax: (...par: any[]) => void;
|
|
16
|
-
/** 单价(不含税) */
|
|
17
|
-
export declare const onChangePriceExcludeTax: (...par: any[]) => void;
|
|
18
|
-
/** 金额(含税) */
|
|
19
|
-
export declare const onChangeLineAmountIncludeTax: (...par: any[]) => void;
|
|
20
|
-
/** 金额(不含税) */
|
|
21
|
-
export declare const onChangeLineAmountExcludeTax: (...par: any[]) => void;
|
|
22
|
-
/** 税率 */
|
|
23
|
-
export declare const onChangeTaxRate: (...par: any[]) => void;
|
|
24
|
-
/** 小规模纳税人 1% 和 3% 自动赋码免税 */
|
|
25
|
-
export declare function dutyFree(controller: InvoiceController, taxRate: number, form: WrappedFormUtils<any>, record: IGood): number | undefined;
|
|
26
|
-
/** 含税 => 更新(不含税) */
|
|
27
|
-
export declare const updateUnitPriceExcludingTax: (controller: InvoiceController, form: WrappedFormUtils, record: IGood) => Promise<unknown>;
|
|
28
|
-
/** 不含税 => 更新(含税) */
|
|
29
|
-
export declare const updateUnitPriceTax: (controller: InvoiceController, form: WrappedFormUtils, record: IGood) => Promise<unknown>;
|
|
30
|
-
/** 保存到编辑货物 */
|
|
31
|
-
export declare const onSaveEditGood: (...par: any[]) => void;
|
|
32
|
-
/** 单调赋码 */
|
|
33
|
-
export declare const endowCode: (controller: InvoiceController, goods: IGood) => Promise<void>;
|
|
34
|
-
/** 修改了 项目名称 */
|
|
35
|
-
export declare const onChangeItemName: (controller: InvoiceController, form: WrappedFormUtils<any>, record: IGood) => Promise<void>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface IGoodsListProps {
|
|
4
|
-
/** 扩展部分 */
|
|
5
|
-
menuExpansion?: React.ReactNode;
|
|
6
|
-
/** 产品最大数 */
|
|
7
|
-
goodMax?: number;
|
|
8
|
-
/** 扣除额 */
|
|
9
|
-
deduction?: number;
|
|
10
|
-
/** 是否能添加折扣行 */
|
|
11
|
-
isAddDiscount?: boolean;
|
|
12
|
-
/** 是否可以切换(含税/不含税)状态 */
|
|
13
|
-
isSwitchTax?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 货物列表
|
|
17
|
-
*/
|
|
18
|
-
export default class GoodsList extends React.Component<IGoodsListProps> {
|
|
19
|
-
render(): JSX.Element;
|
|
20
|
-
}
|