kts-component-invoice-operate 3.2.211 → 3.2.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +4 -3
- package/dist/index.js +4 -3
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +143 -3
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +2 -1
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/Statistics/index.tsx +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -14281,7 +14281,7 @@ var useColumns = (function (form) {
|
|
|
14281
14281
|
style: {
|
|
14282
14282
|
padding: '0 10px'
|
|
14283
14283
|
}
|
|
14284
|
-
}, value ===
|
|
14284
|
+
}, value === '' ? '' : formatSearch(parseFloat(value).toFixed(2), searchValue));
|
|
14285
14285
|
}
|
|
14286
14286
|
}
|
|
14287
14287
|
}, {
|
|
@@ -19054,7 +19054,7 @@ var Statistics$1 = (function () {
|
|
|
19054
19054
|
fontWeight: 'bold',
|
|
19055
19055
|
marginLeft: 4
|
|
19056
19056
|
}
|
|
19057
|
-
}, lineAmountIncludeTax
|
|
19057
|
+
}, lineAmountIncludeTax ? toStringChinese(lineAmountIncludeTax) : '')), /*#__PURE__*/React.createElement("div", {
|
|
19058
19058
|
style: {
|
|
19059
19059
|
flex: 1
|
|
19060
19060
|
}
|
|
@@ -19068,7 +19068,7 @@ var Statistics$1 = (function () {
|
|
|
19068
19068
|
minWidth: 119,
|
|
19069
19069
|
maxWidth: 300
|
|
19070
19070
|
}
|
|
19071
|
-
}, "\xA5", lineAmountIncludeTax
|
|
19071
|
+
}, "\xA5", lineAmountIncludeTax ? parseFloat(lineAmountIncludeTax).toFixed(2) : '')));
|
|
19072
19072
|
});
|
|
19073
19073
|
|
|
19074
19074
|
var AddRowButton$1 = (function () {
|
|
@@ -22197,6 +22197,7 @@ var useColumns$1 = (function (form) {
|
|
|
22197
22197
|
}
|
|
22198
22198
|
})));
|
|
22199
22199
|
} else {
|
|
22200
|
+
console.log(value);
|
|
22200
22201
|
return /*#__PURE__*/React.createElement("span", {
|
|
22201
22202
|
style: {
|
|
22202
22203
|
padding: '0 10px'
|
package/dist/index.js
CHANGED
|
@@ -14291,7 +14291,7 @@ var useColumns = (function (form) {
|
|
|
14291
14291
|
style: {
|
|
14292
14292
|
padding: '0 10px'
|
|
14293
14293
|
}
|
|
14294
|
-
}, value ===
|
|
14294
|
+
}, value === '' ? '' : formatSearch(parseFloat(value).toFixed(2), searchValue));
|
|
14295
14295
|
}
|
|
14296
14296
|
}
|
|
14297
14297
|
}, {
|
|
@@ -19064,7 +19064,7 @@ var Statistics$1 = (function () {
|
|
|
19064
19064
|
fontWeight: 'bold',
|
|
19065
19065
|
marginLeft: 4
|
|
19066
19066
|
}
|
|
19067
|
-
}, lineAmountIncludeTax
|
|
19067
|
+
}, lineAmountIncludeTax ? toStringChinese(lineAmountIncludeTax) : '')), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19068
19068
|
style: {
|
|
19069
19069
|
flex: 1
|
|
19070
19070
|
}
|
|
@@ -19078,7 +19078,7 @@ var Statistics$1 = (function () {
|
|
|
19078
19078
|
minWidth: 119,
|
|
19079
19079
|
maxWidth: 300
|
|
19080
19080
|
}
|
|
19081
|
-
}, "\xA5", lineAmountIncludeTax
|
|
19081
|
+
}, "\xA5", lineAmountIncludeTax ? parseFloat(lineAmountIncludeTax).toFixed(2) : '')));
|
|
19082
19082
|
});
|
|
19083
19083
|
|
|
19084
19084
|
var AddRowButton$1 = (function () {
|
|
@@ -22207,6 +22207,7 @@ var useColumns$1 = (function (form) {
|
|
|
22207
22207
|
}
|
|
22208
22208
|
})));
|
|
22209
22209
|
} else {
|
|
22210
|
+
console.log(value);
|
|
22210
22211
|
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22211
22212
|
style: {
|
|
22212
22213
|
padding: '0 10px'
|
package/package.json
CHANGED
|
@@ -12,12 +12,124 @@ export default () => {
|
|
|
12
12
|
// console.log(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).done().toNumber())
|
|
13
13
|
// console.log(Math.abs(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).subtract(bignumber(0.24)).done().toNumber()))
|
|
14
14
|
const controller = React.useMemo(() => new Invoice.InvoiceController(), [])
|
|
15
|
-
|
|
15
|
+
const data = {
|
|
16
|
+
"invoiceDataSource": null,
|
|
17
|
+
"checkNumber": null,
|
|
18
|
+
"id": "1723171330414006273",
|
|
19
|
+
"invoiceCode": "051002100207",
|
|
20
|
+
"invoiceNo": "26027235",
|
|
21
|
+
"invoiceDate": "20230915",
|
|
22
|
+
"checkCode": "06085105111389440471",
|
|
23
|
+
"invoiceType": "11",
|
|
24
|
+
"salerName": "锦江区新川西乡土菜餐厅",
|
|
25
|
+
"salerTaxNo": "92510104MA6C07Q46X",
|
|
26
|
+
"salerAddressPhone": null,
|
|
27
|
+
"salerAccount": null,
|
|
28
|
+
"buyerName": "中科迅联智慧网络科技(重庆)有限公司",
|
|
29
|
+
"buyerTaxNo": "91500000MA6131YC2B",
|
|
30
|
+
"buyerAddressPhone": null,
|
|
31
|
+
"buyerAccount": null,
|
|
32
|
+
"invoiceAmount": "97.03",
|
|
33
|
+
"taxAmount": "0.97",
|
|
34
|
+
"totalAmount": "",
|
|
35
|
+
"machineNo": "929906183942",
|
|
36
|
+
"drawer": "管理员",
|
|
37
|
+
"payee": "管理员",
|
|
38
|
+
"reviewer": null,
|
|
39
|
+
"blueinvoiceCode": null,
|
|
40
|
+
"blueinvoiceNo": null,
|
|
41
|
+
"detailedListType": 2,
|
|
42
|
+
"cancellationMark": "1",
|
|
43
|
+
"remark": null,
|
|
44
|
+
"ofdUrl": null,
|
|
45
|
+
"pdfUrl": null,
|
|
46
|
+
"xmlUrl": null,
|
|
47
|
+
"productOilMark": "N",
|
|
48
|
+
"validTaxAmount": null,
|
|
49
|
+
"invoiceState": "0",
|
|
50
|
+
"isSelected": null,
|
|
51
|
+
"selectedDate": null,
|
|
52
|
+
"authState": null,
|
|
53
|
+
"deductibleMode": null,
|
|
54
|
+
"authPeriodDate": null,
|
|
55
|
+
"infoSources": null,
|
|
56
|
+
"adminStatus": null,
|
|
57
|
+
"isTs": 0,
|
|
58
|
+
"isConfirm": null,
|
|
59
|
+
"confirmDate": null,
|
|
60
|
+
"updateTime": "2024-10-29 11:10:43",
|
|
61
|
+
"verifyType": null,
|
|
62
|
+
"taxCode": null,
|
|
63
|
+
"taxMessage": null,
|
|
64
|
+
"eInvoiceNo": null,
|
|
65
|
+
"internationalOrInternal": null,
|
|
66
|
+
"gpNumber": null,
|
|
67
|
+
"name": null,
|
|
68
|
+
"idNumber": null,
|
|
69
|
+
"eTicketNumber": null,
|
|
70
|
+
"departureDate": null,
|
|
71
|
+
"departureTime": null,
|
|
72
|
+
"departureStation": null,
|
|
73
|
+
"destinationStation": null,
|
|
74
|
+
"trainNumber": null,
|
|
75
|
+
"trainCarriage": null,
|
|
76
|
+
"seatNumber": null,
|
|
77
|
+
"seatLevel": null,
|
|
78
|
+
"taxRate": null,
|
|
79
|
+
"invoiceDateFull": "2023-09-15 20:16:42",
|
|
80
|
+
"entryAccountStatus": "01",
|
|
81
|
+
"entryAccountFlag": "N",
|
|
82
|
+
"entryAccountTime": null,
|
|
83
|
+
"handleStatus": null,
|
|
84
|
+
"handleTime": null,
|
|
85
|
+
"handleType": null,
|
|
86
|
+
"dataSource": null,
|
|
87
|
+
"partAmount": null,
|
|
88
|
+
"verifyStatus": null,
|
|
89
|
+
"detailList": [
|
|
90
|
+
{
|
|
91
|
+
"detailNo": "1",
|
|
92
|
+
"goodsName": "*餐饮服务*餐饮服务",
|
|
93
|
+
"goodsTaxCode": "3070401000000000000",
|
|
94
|
+
"detailAmount": "",
|
|
95
|
+
"num": "",
|
|
96
|
+
"taxRate": "",
|
|
97
|
+
"taxAmount": "",
|
|
98
|
+
"taxUnitPrice": "",
|
|
99
|
+
"taxDetailAmount": "98",
|
|
100
|
+
"zeroTaxRateFlag": "",
|
|
101
|
+
"unitPrice": "",
|
|
102
|
+
"specificationModel": "",
|
|
103
|
+
"unit": "",
|
|
104
|
+
"plateNo": "",
|
|
105
|
+
"type": "",
|
|
106
|
+
"trafficDateStart": "",
|
|
107
|
+
"trafficDateEnd": "",
|
|
108
|
+
"flightSegment": null,
|
|
109
|
+
"departureStation": null,
|
|
110
|
+
"destinationStation": null,
|
|
111
|
+
"carrier": null,
|
|
112
|
+
"flightNumber": null,
|
|
113
|
+
"seatLevel": null,
|
|
114
|
+
"shipmentDate": null,
|
|
115
|
+
"takeoffTime": null,
|
|
116
|
+
"ticketType": null,
|
|
117
|
+
"lineAttribute": "COMMON",
|
|
118
|
+
"TaxClassificationCode": null
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"invoiceTagResp": null
|
|
122
|
+
}
|
|
16
123
|
React.useEffect(() => {
|
|
17
|
-
controller.run(async s=>{
|
|
124
|
+
controller.run(async s => {
|
|
18
125
|
s.stakeholder.enables = ['taxAmount'];
|
|
19
126
|
s.priceIntegerDigit = 25;
|
|
20
|
-
s.calculatingDigits=25;
|
|
127
|
+
s.calculatingDigits = 25;
|
|
128
|
+
s.goodsListState.isTaxIncluded = false;
|
|
129
|
+
s.goodsListState.amountExcludeTax = parseFloat(data?.invoiceAmount) || undefined;
|
|
130
|
+
s.goodsListState.amountIncludeTax = parseFloat(data?.totalAmount) || undefined;
|
|
131
|
+
s.goodsListState.amountTax = parseFloat(data?.taxAmount) || undefined;
|
|
132
|
+
s.goodsListState.goodsList = data?.detailList?.map(e => sToCi(e)) ?? [];
|
|
21
133
|
})
|
|
22
134
|
}, [controller])
|
|
23
135
|
return (
|
|
@@ -33,3 +145,31 @@ export default () => {
|
|
|
33
145
|
/>
|
|
34
146
|
)
|
|
35
147
|
};
|
|
148
|
+
function sToCi(data: any) {
|
|
149
|
+
return {
|
|
150
|
+
$index: Invoice.idGenerator(),
|
|
151
|
+
lineAttribute: 0,
|
|
152
|
+
discountGroup: 'discountGroup',
|
|
153
|
+
// favouredPolicyMark: data.favouredPolicyMark ? 1 : 0,
|
|
154
|
+
// favouredPolicyName: data.favouredPolicyName,
|
|
155
|
+
// itemName: getItemName(data.goodsName),
|
|
156
|
+
// shorthand: getShorthand(data.goodsName),
|
|
157
|
+
unit: data.unit,
|
|
158
|
+
itemModelName: data.specificationModel,
|
|
159
|
+
quantity: data.num,
|
|
160
|
+
priceIncludeTax: 0,
|
|
161
|
+
priceExcludeTax: data.unitPrice,
|
|
162
|
+
lineAmountIncludeTax: 0,
|
|
163
|
+
lineAmountExcludeTax: data.detailAmount,
|
|
164
|
+
taxRate: percentToDecimal(data.taxRate),
|
|
165
|
+
taxFreeType: (data.zeroTaxRateFlag) as any,
|
|
166
|
+
taxAmount: data.taxAmount,
|
|
167
|
+
taxClassificationCode: data.taxCode
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function percentToDecimal(percent: any) {
|
|
171
|
+
if (!percent) return 0;
|
|
172
|
+
|
|
173
|
+
// 去掉百分号并转换为小数
|
|
174
|
+
return parseFloat(percent);
|
|
175
|
+
}
|
|
@@ -484,7 +484,8 @@ export default (form: WrappedFormUtils) => {
|
|
|
484
484
|
</Form.Item>
|
|
485
485
|
);
|
|
486
486
|
} else {
|
|
487
|
-
|
|
487
|
+
|
|
488
|
+
return <span style={{ padding: '0 10px' }}>{value === '' ? '' : formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
488
489
|
}
|
|
489
490
|
},
|
|
490
491
|
},
|
|
@@ -87,11 +87,11 @@ export default () => {
|
|
|
87
87
|
<div>价税合计(大写)</div>
|
|
88
88
|
<div style={{ paddingLeft: 30 }} >
|
|
89
89
|
<Icon style={{fontSize: 16}} component={ForkSvg} />
|
|
90
|
-
<span style={{ fontWeight: 'bold', marginLeft: 4 }} >{lineAmountIncludeTax
|
|
90
|
+
<span style={{ fontWeight: 'bold', marginLeft: 4 }} >{lineAmountIncludeTax?Money.toStringChinese(lineAmountIncludeTax):''}</span>
|
|
91
91
|
</div>
|
|
92
92
|
<div style={{ flex: 1 }} />
|
|
93
93
|
<div style={{ width: 90, color: '#9F613E' }} >(小写)</div>
|
|
94
|
-
<div style={{ minWidth: 119, maxWidth: 300 }} >¥{lineAmountIncludeTax
|
|
94
|
+
<div style={{ minWidth: 119, maxWidth: 300 }} >¥{lineAmountIncludeTax?parseFloat(lineAmountIncludeTax).toFixed(2):''}</div>
|
|
95
95
|
</div>
|
|
96
96
|
</div >
|
|
97
97
|
);
|