kts-component-invoice-operate 3.2.156-8 → 3.2.156-9

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
@@ -12516,10 +12516,16 @@ var useColumns = (function (form) {
12516
12516
  width: 75,
12517
12517
  render: function render(value, record) {
12518
12518
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab' && calculateType === '3')) {
12519
+ var _controller$state$goo;
12520
+
12519
12521
  // 如存在按税编异步获取税率的能力,并且当前行有税编但还没拿到专属税率列表,
12520
12522
  // 为避免“接口未返回时误用全局 taxRateList”,暂不展示全局税率,先展示一个 loading 状态,
12521
12523
  // 等 record.goodsTaxRateList 赋值后再渲染真正的下拉选项。
12522
- if (controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList) {
12524
+ var persistedGoodsTaxRateList = (_controller$state$goo = controller.state.goodsListState.goodsList.find(function (e) {
12525
+ return e.$index === record.$index;
12526
+ })) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.goodsTaxRateList;
12527
+
12528
+ if (controller.getGoodsTaxRateList && record.taxClassificationCode && !(record.goodsTaxRateList || persistedGoodsTaxRateList)) {
12523
12529
  return /*#__PURE__*/React.createElement("div", {
12524
12530
  style: {
12525
12531
  textAlign: 'center'
package/dist/index.js CHANGED
@@ -12526,10 +12526,16 @@ var useColumns = (function (form) {
12526
12526
  width: 75,
12527
12527
  render: function render(value, record) {
12528
12528
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab' && calculateType === '3')) {
12529
+ var _controller$state$goo;
12530
+
12529
12531
  // 如存在按税编异步获取税率的能力,并且当前行有税编但还没拿到专属税率列表,
12530
12532
  // 为避免“接口未返回时误用全局 taxRateList”,暂不展示全局税率,先展示一个 loading 状态,
12531
12533
  // 等 record.goodsTaxRateList 赋值后再渲染真正的下拉选项。
12532
- if (controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList) {
12534
+ var persistedGoodsTaxRateList = (_controller$state$goo = controller.state.goodsListState.goodsList.find(function (e) {
12535
+ return e.$index === record.$index;
12536
+ })) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.goodsTaxRateList;
12537
+
12538
+ if (controller.getGoodsTaxRateList && record.taxClassificationCode && !(record.goodsTaxRateList || persistedGoodsTaxRateList)) {
12533
12539
  return /*#__PURE__*/React__default['default'].createElement("div", {
12534
12540
  style: {
12535
12541
  textAlign: 'center'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.156-8",
3
+ "version": "3.2.156-9",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -499,7 +499,8 @@ export default (form: WrappedFormUtils) => {
499
499
  // 如存在按税编异步获取税率的能力,并且当前行有税编但还没拿到专属税率列表,
500
500
  // 为避免“接口未返回时误用全局 taxRateList”,暂不展示全局税率,先展示一个 loading 状态,
501
501
  // 等 record.goodsTaxRateList 赋值后再渲染真正的下拉选项。
502
- if (controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList) {
502
+ const persistedGoodsTaxRateList = controller.state.goodsListState.goodsList.find(e => e.$index === record.$index)?.goodsTaxRateList;
503
+ if (controller.getGoodsTaxRateList && record.taxClassificationCode && !(record.goodsTaxRateList || persistedGoodsTaxRateList)) {
503
504
  return (
504
505
  <div style={{ textAlign: 'center' }}>
505
506
  <Spin size="small" />