kts-component-invoice-operate 1.2.29 → 1.2.30
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
CHANGED
|
@@ -12763,7 +12763,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12763
12763
|
}), React.createElement(SchemaMarkupField, {
|
|
12764
12764
|
name: "shorthand",
|
|
12765
12765
|
type: "string",
|
|
12766
|
-
default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
|
|
12766
|
+
default: getShorthand((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.taxClassificationCode) ? defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName : ''),
|
|
12767
12767
|
title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
|
|
12768
12768
|
}), React.createElement(SchemaMarkupField, {
|
|
12769
12769
|
name: "taxRate",
|
|
@@ -12875,7 +12875,7 @@ var getItemName$1 = function getItemName(value, shorthand) {
|
|
|
12875
12875
|
|
|
12876
12876
|
var arr = value.match(/\*[^*]+\*/);
|
|
12877
12877
|
|
|
12878
|
-
if (arr) {
|
|
12878
|
+
if (arr && value.charAt(0) === '*') {
|
|
12879
12879
|
return value.replace(/\*[^*]+\*/, "*".concat(shorthand, "*"));
|
|
12880
12880
|
} else {
|
|
12881
12881
|
return "*".concat(shorthand, "*").concat(value);
|
package/dist/index.js
CHANGED
|
@@ -12773,7 +12773,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12773
12773
|
}), React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
12774
12774
|
name: "shorthand",
|
|
12775
12775
|
type: "string",
|
|
12776
|
-
default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
|
|
12776
|
+
default: getShorthand((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.taxClassificationCode) ? defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName : ''),
|
|
12777
12777
|
title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
|
|
12778
12778
|
}), React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
12779
12779
|
name: "taxRate",
|
|
@@ -12885,7 +12885,7 @@ var getItemName$1 = function getItemName(value, shorthand) {
|
|
|
12885
12885
|
|
|
12886
12886
|
var arr = value.match(/\*[^*]+\*/);
|
|
12887
12887
|
|
|
12888
|
-
if (arr) {
|
|
12888
|
+
if (arr && value.charAt(0) === '*') {
|
|
12889
12889
|
return value.replace(/\*[^*]+\*/, "*".concat(shorthand, "*"));
|
|
12890
12890
|
} else {
|
|
12891
12891
|
return "*".concat(shorthand, "*").concat(value);
|
package/package.json
CHANGED
|
@@ -390,7 +390,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
390
390
|
<Field
|
|
391
391
|
name="shorthand"
|
|
392
392
|
type="string"
|
|
393
|
-
default={getShorthand(defaultValue?.itemName)}
|
|
393
|
+
default={getShorthand(defaultValue?.taxClassificationCode?defaultValue?.itemName:'')}
|
|
394
394
|
title="商品和服务分类简称"
|
|
395
395
|
/>
|
|
396
396
|
<Field
|
|
@@ -471,7 +471,7 @@ const getItemName = (value?: string, shorthand?: string) => {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
const arr = value.match(/\*[^*]+\*/);
|
|
474
|
-
if (arr) {
|
|
474
|
+
if (arr&&value.charAt(0)==='*') {
|
|
475
475
|
return value.replace(/\*[^*]+\*/, `*${shorthand}*`);
|
|
476
476
|
} else {
|
|
477
477
|
return `*${shorthand}*${value}`;
|