kts-component-invoice-operate 3.2.251 → 3.2.253

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.
@@ -10,7 +10,7 @@ export interface RealEstateInfoProps {
10
10
  */
11
11
  fieldNames?: any;
12
12
  /** 获取"跨区域涉税事项报验管理编号" */
13
- getCrossRegionTaxReportNo?: () => Promise<string>;
13
+ getCrossRegionTaxReportNo?: () => Promise<any>;
14
14
  /** 是否显示 【 获取"跨区域涉税事项报验管理编号"】按钮 */
15
15
  showGetCrossRegionTaxReportNoButton?: boolean;
16
16
  }
package/dist/index.esm.js CHANGED
@@ -9686,7 +9686,7 @@ var updateUnitPriceTax = /*#__PURE__*/function () {
9686
9686
  // 税额 = 金额(含税)-金额(不含税) (老逻辑)
9687
9687
  // const taxAmount = evaluate(`${lineAmountIncludeTax} - ${lineAmountExcludeTax}`);
9688
9688
  // 税额 = 金额(含税)-金额(不含税)(新逻辑)
9689
- taxAmount = evaluate("".concat(lineAmountExcludeTax, " * ").concat(values.taxRate, "/100"));
9689
+ taxAmount = format2(evaluate("".concat(lineAmountExcludeTax, " * ").concat(values.taxRate, "/100")));
9690
9690
  form.setFieldsValue({
9691
9691
  taxAmount: taxAmount
9692
9692
  });
@@ -26855,7 +26855,16 @@ var Architecture = decorator(Form.create())(function (props) {
26855
26855
  width: '100%'
26856
26856
  },
26857
26857
  onChange: function onChange(value) {
26858
- return setCrossCitiesSign(value);
26858
+ setCrossCitiesSign(value);
26859
+
26860
+ if (value === 'N') {
26861
+ form.setFieldsValue({
26862
+ crossRegionTaxReportNo: '',
26863
+ constructAddress: [],
26864
+ constructDetailAddress: '',
26865
+ constructName: ''
26866
+ });
26867
+ }
26859
26868
  }
26860
26869
  }, /*#__PURE__*/React.createElement(Select$2.Option, {
26861
26870
  value: 'Y'
@@ -26866,11 +26875,11 @@ var Architecture = decorator(Form.create())(function (props) {
26866
26875
  }, /*#__PURE__*/React.createElement(Form.Item, {
26867
26876
  label: "\u8DE8\u533A\u57DF\u6D89\u7A0E\u4E8B\u9879\u62A5\u9A8C\u7BA1\u7406\u7F16\u53F7"
26868
26877
  }, getFieldDecorator('crossRegionTaxReportNo', {
26869
- rules: [{
26878
+ rules: readOnly ? [] : [{
26870
26879
  required: crossCitiesSign === 'Y',
26871
26880
  message: '请输入跨区域涉税事项报验管理编号'
26872
26881
  }]
26873
- })( /*#__PURE__*/React.createElement(Input$2, {
26882
+ })(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
26874
26883
  readOnly: true,
26875
26884
  autoComplete: 'off',
26876
26885
  addonAfter: props.showGetCrossRegionTaxReportNoButton && /*#__PURE__*/React.createElement(Button$2, {
@@ -26888,7 +26897,7 @@ var Architecture = decorator(Form.create())(function (props) {
26888
26897
  var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26889
26898
  var _props$getCrossRegion;
26890
26899
 
26891
- var no;
26900
+ var values;
26892
26901
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26893
26902
  while (1) {
26894
26903
  switch (_context.prev = _context.next) {
@@ -26897,10 +26906,8 @@ var Architecture = decorator(Form.create())(function (props) {
26897
26906
  return (_props$getCrossRegion = props.getCrossRegionTaxReportNo) === null || _props$getCrossRegion === void 0 ? void 0 : _props$getCrossRegion.call(props);
26898
26907
 
26899
26908
  case 2:
26900
- no = _context.sent;
26901
- form.setFieldsValue({
26902
- crossRegionTaxReportNo: no
26903
- });
26909
+ values = _context.sent;
26910
+ form.setFieldsValue(values);
26904
26911
 
26905
26912
  case 4:
26906
26913
  case "end":
package/dist/index.js CHANGED
@@ -9696,7 +9696,7 @@ var updateUnitPriceTax = /*#__PURE__*/function () {
9696
9696
  // 税额 = 金额(含税)-金额(不含税) (老逻辑)
9697
9697
  // const taxAmount = evaluate(`${lineAmountIncludeTax} - ${lineAmountExcludeTax}`);
9698
9698
  // 税额 = 金额(含税)-金额(不含税)(新逻辑)
9699
- taxAmount = evaluate("".concat(lineAmountExcludeTax, " * ").concat(values.taxRate, "/100"));
9699
+ taxAmount = format2(evaluate("".concat(lineAmountExcludeTax, " * ").concat(values.taxRate, "/100")));
9700
9700
  form.setFieldsValue({
9701
9701
  taxAmount: taxAmount
9702
9702
  });
@@ -26865,7 +26865,16 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
26865
26865
  width: '100%'
26866
26866
  },
26867
26867
  onChange: function onChange(value) {
26868
- return setCrossCitiesSign(value);
26868
+ setCrossCitiesSign(value);
26869
+
26870
+ if (value === 'N') {
26871
+ form.setFieldsValue({
26872
+ crossRegionTaxReportNo: '',
26873
+ constructAddress: [],
26874
+ constructDetailAddress: '',
26875
+ constructName: ''
26876
+ });
26877
+ }
26869
26878
  }
26870
26879
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26871
26880
  value: 'Y'
@@ -26876,11 +26885,11 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
26876
26885
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26877
26886
  label: "\u8DE8\u533A\u57DF\u6D89\u7A0E\u4E8B\u9879\u62A5\u9A8C\u7BA1\u7406\u7F16\u53F7"
26878
26887
  }, getFieldDecorator('crossRegionTaxReportNo', {
26879
- rules: [{
26888
+ rules: readOnly ? [] : [{
26880
26889
  required: crossCitiesSign === 'Y',
26881
26890
  message: '请输入跨区域涉税事项报验管理编号'
26882
26891
  }]
26883
- })( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
26892
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$4, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
26884
26893
  readOnly: true,
26885
26894
  autoComplete: 'off',
26886
26895
  addonAfter: props.showGetCrossRegionTaxReportNoButton && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
@@ -26898,7 +26907,7 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
26898
26907
  var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26899
26908
  var _props$getCrossRegion;
26900
26909
 
26901
- var no;
26910
+ var values;
26902
26911
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26903
26912
  while (1) {
26904
26913
  switch (_context.prev = _context.next) {
@@ -26907,10 +26916,8 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
26907
26916
  return (_props$getCrossRegion = props.getCrossRegionTaxReportNo) === null || _props$getCrossRegion === void 0 ? void 0 : _props$getCrossRegion.call(props);
26908
26917
 
26909
26918
  case 2:
26910
- no = _context.sent;
26911
- form.setFieldsValue({
26912
- crossRegionTaxReportNo: no
26913
- });
26919
+ values = _context.sent;
26920
+ form.setFieldsValue(values);
26914
26921
 
26915
26922
  case 4:
26916
26923
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.251",
3
+ "version": "3.2.253",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -443,7 +443,7 @@ export const updateUnitPriceTax = async (controller: InvoiceController, form: Wr
443
443
  // const taxAmount = evaluate(`${lineAmountIncludeTax} - ${lineAmountExcludeTax}`);
444
444
 
445
445
  // 税额 = 金额(含税)-金额(不含税)(新逻辑)
446
- const taxAmount = evaluate(`${lineAmountExcludeTax} * ${values.taxRate}/100`);
446
+ const taxAmount = format2(evaluate(`${lineAmountExcludeTax} * ${values.taxRate}/100`));
447
447
  form.setFieldsValue({ taxAmount });
448
448
  await controller.setEditGood({ taxAmount });
449
449
  } else {
@@ -23,7 +23,7 @@ export interface RealEstateInfoProps {
23
23
  fieldNames?: any;
24
24
 
25
25
  /** 获取"跨区域涉税事项报验管理编号" */
26
- getCrossRegionTaxReportNo?: () => Promise<string>;
26
+ getCrossRegionTaxReportNo?: () => Promise<any>;
27
27
 
28
28
  /** 是否显示 【 获取"跨区域涉税事项报验管理编号"】按钮 */
29
29
  showGetCrossRegionTaxReportNoButton?: boolean;
@@ -122,7 +122,17 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
122
122
  : <Select
123
123
  placeholder='请选择'
124
124
  style={{ width: '100%' }}
125
- onChange={(value) => setCrossCitiesSign(value)}
125
+ onChange={(value) => {
126
+ setCrossCitiesSign(value)
127
+ if (value === 'N') {
128
+ form.setFieldsValue({
129
+ crossRegionTaxReportNo: '',
130
+ constructAddress: [],
131
+ constructDetailAddress: '',
132
+ constructName: '',
133
+ });
134
+ }
135
+ }}
126
136
  >
127
137
  <Select.Option value='Y'>是</Select.Option>
128
138
  <Select.Option value='N'>否</Select.Option>
@@ -134,20 +144,22 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
134
144
  <Col span={6} >
135
145
  <Form.Item label='跨区域涉税事项报验管理编号' >
136
146
  {getFieldDecorator('crossRegionTaxReportNo', {
137
- rules: [{ required: crossCitiesSign === 'Y', message:'请输入跨区域涉税事项报验管理编号' }]
147
+ rules: readOnly ? [] : [{ required: crossCitiesSign === 'Y', message: '请输入跨区域涉税事项报验管理编号' }]
138
148
  })(
139
- <Input readOnly autoComplete='off'
140
- addonAfter={props.showGetCrossRegionTaxReportNoButton && <Button style={{ height: 0, padding: 0, width: "auto" }} type="link" icon={<Icon component={I001} />} disabled={readOnly || crossCitiesSign !== 'Y'}
141
- onClick={async () => {
142
- const no = await props.getCrossRegionTaxReportNo?.();
143
- form.setFieldsValue({ crossRegionTaxReportNo: no });
144
- }}
145
- />}
146
- />
149
+ readOnly
150
+ ? <MyDiv />
151
+ : <Input readOnly autoComplete='off'
152
+ addonAfter={props.showGetCrossRegionTaxReportNoButton && <Button style={{ height: 0, padding: 0, width: "auto" }} type="link" icon={<Icon component={I001} />} disabled={readOnly || crossCitiesSign !== 'Y'}
153
+ onClick={async () => {
154
+ const values = await props.getCrossRegionTaxReportNo?.();
155
+ form.setFieldsValue(values);
156
+ }}
157
+ />}
158
+ />
147
159
  )}
148
160
  </Form.Item>
149
161
  </Col>
150
-
162
+
151
163
  <Col span={6} >
152
164
  <Form.Item label='建筑项目名称' >
153
165
  {getFieldDecorator('constructName', {