kts-component-invoice-operate 3.1.6 → 3.1.7

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
@@ -2221,11 +2221,12 @@ var useAddDiscount = (function (goods) {
2221
2221
  _context2.next = 7;
2222
2222
  return controller.run( /*#__PURE__*/function () {
2223
2223
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2224
+ var _s$goodsListState$edi, _goods;
2224
2225
  var err, key;
2225
2226
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2226
2227
  while (1) switch (_context.prev = _context.next) {
2227
2228
  case 0:
2228
- if (!s.goodsListState.form) {
2229
+ if (!(s.goodsListState.form && ((_s$goodsListState$edi = s.goodsListState.editGood) === null || _s$goodsListState$edi === void 0 ? void 0 : _s$goodsListState$edi.$index) === ((_goods = goods) === null || _goods === void 0 ? void 0 : _goods.$index))) {
2229
2230
  _context.next = 11;
2230
2231
  break;
2231
2232
  }
@@ -8821,11 +8822,12 @@ var endowCode = /*#__PURE__*/function () {
8821
8822
  _context17.next = 6;
8822
8823
  return controller.pipeline( /*#__PURE__*/function () {
8823
8824
  var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
8825
+ var _s$goodsListState$edi;
8824
8826
  var err, key, g, i;
8825
8827
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
8826
8828
  while (1) switch (_context16.prev = _context16.next) {
8827
8829
  case 0:
8828
- if (!s.goodsListState.form) {
8830
+ if (!(s.goodsListState.form && ((_s$goodsListState$edi = s.goodsListState.editGood) === null || _s$goodsListState$edi === void 0 ? void 0 : _s$goodsListState$edi.$index) === (goods === null || goods === void 0 ? void 0 : goods.$index))) {
8829
8831
  _context16.next = 11;
8830
8832
  break;
8831
8833
  }
package/dist/index.js CHANGED
@@ -2231,11 +2231,12 @@ var useAddDiscount = (function (goods) {
2231
2231
  _context2.next = 7;
2232
2232
  return controller.run( /*#__PURE__*/function () {
2233
2233
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2234
+ var _s$goodsListState$edi, _goods;
2234
2235
  var err, key;
2235
2236
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2236
2237
  while (1) switch (_context.prev = _context.next) {
2237
2238
  case 0:
2238
- if (!s.goodsListState.form) {
2239
+ if (!(s.goodsListState.form && ((_s$goodsListState$edi = s.goodsListState.editGood) === null || _s$goodsListState$edi === void 0 ? void 0 : _s$goodsListState$edi.$index) === ((_goods = goods) === null || _goods === void 0 ? void 0 : _goods.$index))) {
2239
2240
  _context.next = 11;
2240
2241
  break;
2241
2242
  }
@@ -8831,11 +8832,12 @@ var endowCode = /*#__PURE__*/function () {
8831
8832
  _context17.next = 6;
8832
8833
  return controller.pipeline( /*#__PURE__*/function () {
8833
8834
  var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
8835
+ var _s$goodsListState$edi;
8834
8836
  var err, key, g, i;
8835
8837
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
8836
8838
  while (1) switch (_context16.prev = _context16.next) {
8837
8839
  case 0:
8838
- if (!s.goodsListState.form) {
8840
+ if (!(s.goodsListState.form && ((_s$goodsListState$edi = s.goodsListState.editGood) === null || _s$goodsListState$edi === void 0 ? void 0 : _s$goodsListState$edi.$index) === (goods === null || goods === void 0 ? void 0 : goods.$index))) {
8839
8841
  _context16.next = 11;
8840
8842
  break;
8841
8843
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.1.6",
3
+ "version": "3.1.7",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -451,7 +451,7 @@ export const endowCode = async (controller: InvoiceController, goods: IGood) =>
451
451
  await controller.wait();
452
452
  await controller.saveEditGood();
453
453
  await controller.pipeline(async (s) => {
454
- if (s.goodsListState.form) {
454
+ if (s.goodsListState.form && s.goodsListState.editGood?.$index === goods?.$index) {
455
455
  const err: any = s.goodsListState.form.getFieldsError();
456
456
  for (let key in err) {
457
457
  if (!err[key]) continue;
@@ -21,7 +21,7 @@ export default (goods: IGood) => {
21
21
  await controller.wait();
22
22
  await controller.saveEditGood();
23
23
  await controller.run(async s => {
24
- if (s.goodsListState.form) {
24
+ if (s.goodsListState.form && s.goodsListState.editGood?.$index === goods?.$index) {
25
25
  const err: any = s.goodsListState.form.getFieldsError();
26
26
  for (let key in err) {
27
27
  if (!err[key]) continue;