kts-component-invoice-operate 2.0.13 → 2.0.14

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
@@ -13541,7 +13541,7 @@ function AddComparisonDrawer() {
13541
13541
  var onSubmit = React.useCallback(function () {
13542
13542
  controller.run( /*#__PURE__*/function () {
13543
13543
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
13544
- var _getSN, _getSN2, values, shorthand;
13544
+ var _getSN, _getSN2, values, shorthand, setGood, c, g;
13545
13545
 
13546
13546
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
13547
13547
  while (1) {
@@ -13562,28 +13562,40 @@ function AddComparisonDrawer() {
13562
13562
  case 5:
13563
13563
  values = _context2.sent;
13564
13564
  shorthand = s.goodsListState.isMyShow ? (_getSN = getSN(good.itemNameSelf)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand : (_getSN2 = getSN(good.itemName)) === null || _getSN2 === void 0 ? void 0 : _getSN2.shorthand;
13565
- good.itemCode = values.itemCode;
13566
- good.itemCodeSelf = values.itemCodeSelf;
13567
- good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
13568
- good.itemNameSelf = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameSelf) : values.itemNameSelf;
13569
- good.itemModelName = values.itemModelName;
13570
- good.itemModelNameSelf = values.itemModelNameSelf;
13565
+
13566
+ setGood = function setGood(good) {
13567
+ good.itemCode = values.itemCode;
13568
+ good.itemCodeSelf = values.itemCodeSelf;
13569
+ good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
13570
+ good.itemNameSelf = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameSelf) : values.itemNameSelf;
13571
+ good.itemModelName = values.itemModelName;
13572
+ good.itemModelNameSelf = values.itemModelNameSelf;
13573
+ };
13574
+
13575
+ setGood(good);
13576
+
13577
+ if (good.lineAttribute !== LineAttributeType$1.正常) {
13578
+ c = good.lineAttribute === LineAttributeType$1.折扣行 ? -1 : good.lineAttribute === LineAttributeType$1.被折扣行 ? 1 : 0;
13579
+ g = s.goodsListState.goodsList[s.goodsListState.goodsList.indexOf(good) + c];
13580
+ setGood(g);
13581
+ }
13582
+
13571
13583
  s.goodsListState.addComparisonIndex = undefined;
13572
13584
  s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
13573
13585
  message.success('商品映射成功');
13574
- _context2.next = 20;
13586
+ _context2.next = 17;
13575
13587
  break;
13576
13588
 
13577
- case 18:
13578
- _context2.prev = 18;
13589
+ case 15:
13590
+ _context2.prev = 15;
13579
13591
  _context2.t0 = _context2["catch"](2);
13580
13592
 
13581
- case 20:
13593
+ case 17:
13582
13594
  case "end":
13583
13595
  return _context2.stop();
13584
13596
  }
13585
13597
  }
13586
- }, _callee2, null, [[2, 18]]);
13598
+ }, _callee2, null, [[2, 15]]);
13587
13599
  }));
13588
13600
 
13589
13601
  return function (_x2) {
package/dist/index.js CHANGED
@@ -13551,7 +13551,7 @@ function AddComparisonDrawer() {
13551
13551
  var onSubmit = React__default['default'].useCallback(function () {
13552
13552
  controller.run( /*#__PURE__*/function () {
13553
13553
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
13554
- var _getSN, _getSN2, values, shorthand;
13554
+ var _getSN, _getSN2, values, shorthand, setGood, c, g;
13555
13555
 
13556
13556
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
13557
13557
  while (1) {
@@ -13572,28 +13572,40 @@ function AddComparisonDrawer() {
13572
13572
  case 5:
13573
13573
  values = _context2.sent;
13574
13574
  shorthand = s.goodsListState.isMyShow ? (_getSN = getSN(good.itemNameSelf)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand : (_getSN2 = getSN(good.itemName)) === null || _getSN2 === void 0 ? void 0 : _getSN2.shorthand;
13575
- good.itemCode = values.itemCode;
13576
- good.itemCodeSelf = values.itemCodeSelf;
13577
- good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
13578
- good.itemNameSelf = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameSelf) : values.itemNameSelf;
13579
- good.itemModelName = values.itemModelName;
13580
- good.itemModelNameSelf = values.itemModelNameSelf;
13575
+
13576
+ setGood = function setGood(good) {
13577
+ good.itemCode = values.itemCode;
13578
+ good.itemCodeSelf = values.itemCodeSelf;
13579
+ good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
13580
+ good.itemNameSelf = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameSelf) : values.itemNameSelf;
13581
+ good.itemModelName = values.itemModelName;
13582
+ good.itemModelNameSelf = values.itemModelNameSelf;
13583
+ };
13584
+
13585
+ setGood(good);
13586
+
13587
+ if (good.lineAttribute !== LineAttributeType$1.正常) {
13588
+ c = good.lineAttribute === LineAttributeType$1.折扣行 ? -1 : good.lineAttribute === LineAttributeType$1.被折扣行 ? 1 : 0;
13589
+ g = s.goodsListState.goodsList[s.goodsListState.goodsList.indexOf(good) + c];
13590
+ setGood(g);
13591
+ }
13592
+
13581
13593
  s.goodsListState.addComparisonIndex = undefined;
13582
13594
  s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
13583
13595
  ktsComponentsAntdX3.message.success('商品映射成功');
13584
- _context2.next = 20;
13596
+ _context2.next = 17;
13585
13597
  break;
13586
13598
 
13587
- case 18:
13588
- _context2.prev = 18;
13599
+ case 15:
13600
+ _context2.prev = 15;
13589
13601
  _context2.t0 = _context2["catch"](2);
13590
13602
 
13591
- case 20:
13603
+ case 17:
13592
13604
  case "end":
13593
13605
  return _context2.stop();
13594
13606
  }
13595
13607
  }
13596
- }, _callee2, null, [[2, 18]]);
13608
+ }, _callee2, null, [[2, 15]]);
13597
13609
  }));
13598
13610
 
13599
13611
  return function (_x2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -2,8 +2,9 @@
2
2
  import React from "react";
3
3
  import { Row, Col, Input, Button, message } from "kts-components-antd-x3";
4
4
  import { Form, Drawer } from "kts-xui";
5
- import { Invoice } from "../../../";
5
+ import { Invoice, IGood } from "../../../";
6
6
  import { getSN } from "../../tools/itemName";
7
+ import { LineAttributeType } from "../../InvoiceController";
7
8
 
8
9
  export default function AddComparisonDrawer() {
9
10
 
@@ -32,13 +33,22 @@ export default function AddComparisonDrawer() {
32
33
  try {
33
34
  const values = await form.validateFields()
34
35
  const shorthand = s.goodsListState.isMyShow ? getSN(good.itemNameSelf)?.shorthand : getSN(good.itemName)?.shorthand;
35
-
36
- good.itemCode = values.itemCode;
37
- good.itemCodeSelf = values.itemCodeSelf;
38
- good.itemName = shorthand ? `*${shorthand}*${values.itemName}` : values.itemName;
39
- good.itemNameSelf = shorthand ? `*${shorthand}*${values.itemNameSelf}` : values.itemNameSelf;
40
- good.itemModelName = values.itemModelName;
41
- good.itemModelNameSelf = values.itemModelNameSelf;
36
+ const setGood = (good: IGood) => {
37
+ good.itemCode = values.itemCode;
38
+ good.itemCodeSelf = values.itemCodeSelf;
39
+ good.itemName = shorthand ? `*${shorthand}*${values.itemName}` : values.itemName;
40
+ good.itemNameSelf = shorthand ? `*${shorthand}*${values.itemNameSelf}` : values.itemNameSelf;
41
+ good.itemModelName = values.itemModelName;
42
+ good.itemModelNameSelf = values.itemModelNameSelf;
43
+ }
44
+
45
+ setGood(good);
46
+
47
+ if (good.lineAttribute !== LineAttributeType.正常) {
48
+ const c = good.lineAttribute === LineAttributeType.折扣行 ? -1 : good.lineAttribute === LineAttributeType.被折扣行 ? 1 : 0
49
+ const g = s.goodsListState.goodsList[s.goodsListState.goodsList.indexOf(good) + c]
50
+ setGood(g);
51
+ }
42
52
 
43
53
  s.goodsListState.addComparisonIndex = undefined;
44
54
  s.goodsListState.goodsList = [...s.goodsListState.goodsList];
@@ -1,33 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta
6
- name="viewport"
7
- content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
8
- />
9
- <link rel="stylesheet" href="/docs-dist/umi.css" />
10
- <script>
11
- window.routerBase = "/";
12
- </script>
13
- <script>
14
- //! umi version: 3.5.27
15
- </script>
16
- <script>
17
- !(function () {
18
- var e = localStorage.getItem("dumi:prefers-color"),
19
- t = window.matchMedia("(prefers-color-scheme: dark)").matches,
20
- r = ["light", "dark", "auto"];
21
- document.documentElement.setAttribute(
22
- "data-prefers-color",
23
- e === r[2] ? (t ? r[1] : r[0]) : r.indexOf(e) > -1 ? e : r[0]
24
- );
25
- })();
26
- </script>
27
- </head>
28
- <body>
29
- <div id="root"></div>
30
-
31
- <script src="/docs-dist/umi.js"></script>
32
- </body>
33
- </html>
@@ -1,33 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta
6
- name="viewport"
7
- content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
8
- />
9
- <link rel="stylesheet" href="/docs-dist/umi.css" />
10
- <script>
11
- window.routerBase = "/";
12
- </script>
13
- <script>
14
- //! umi version: 3.5.27
15
- </script>
16
- <script>
17
- !(function () {
18
- var e = localStorage.getItem("dumi:prefers-color"),
19
- t = window.matchMedia("(prefers-color-scheme: dark)").matches,
20
- r = ["light", "dark", "auto"];
21
- document.documentElement.setAttribute(
22
- "data-prefers-color",
23
- e === r[2] ? (t ? r[1] : r[0]) : r.indexOf(e) > -1 ? e : r[0]
24
- );
25
- })();
26
- </script>
27
- </head>
28
- <body>
29
- <div id="root"></div>
30
-
31
- <script src="/docs-dist/umi.js"></script>
32
- </body>
33
- </html>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1586510245354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4976" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M510.677 83.529c60.891 0 119.75 13.191 174.046 38.055l-40.087 70.028 202.97-1.016-101.99-175.063-35.52 61.909c-61.908-29.433-129.903-44.657-199.419-44.657-257.266 0-466.833 209.566-466.833 466.833 0 93.368 27.4 183.69 79.668 261.326l42.116-28.415c-46.684-69.012-71.039-149.183-71.039-232.91 0-229.355 186.729-416.09 416.088-416.09z m425.225 223.774l-46.175 20.802c24.356 53.788 37.039 111.637 37.039 171.512 0 229.358-186.73 416.089-416.089 416.089-46.684 0-92.351-7.608-135.99-22.832l34-65.968-202.468 10.148 110.116 170.5 35.52-69.012c50.738 18.777 104.526 27.908 159.33 27.908 257.265 0 466.832-209.567 466.832-466.833-0.507-66.98-14.715-131.93-42.115-192.314z m0 0" p-id="4977"></path><path d="M317.096 1023.06L192.387 829.965 421.78 818.47l-36.039 69.924c40.06 12.971 82.045 19.543 124.936 19.543 225.147 0 408.317-183.17 408.317-408.317 0-58.417-12.23-115.043-36.348-168.305l-3.212-7.094 60.343-27.186 3.203 7.059c27.889 61.462 42.292 127.226 42.81 195.467 0 261.757-212.908 474.664-474.606 474.664-54.211 0-106.5-8.76-155.546-26.05l-38.54 74.885zM220.05 844.143l95.524 147.906 32.521-63.187 6.458 2.39c49.176 18.198 101.874 27.425 156.632 27.425 253.126 0 459.06-205.933 459.06-459.06-0.48-63.377-13.353-124.59-38.275-182.018l-32.013 14.422c22.95 53.205 34.582 109.55 34.582 167.595 0 233.719-190.143 423.862-423.862 423.862-47.682 0-94.297-7.828-138.55-23.266l-8.448-2.948 31.914-61.92-175.543 8.8z m-98.64-72.405l-4.345-6.455C64.08 686.583 36.071 594.717 36.071 499.617c0-261.698 212.907-474.605 474.605-474.605 68.724 0 134.705 14.25 196.232 42.368L745.564 0.005 861.09 198.301l-229.898 1.151 42.514-74.27c-51.835-22.486-106.64-33.88-163.03-33.88-225.147 0-408.317 183.17-408.317 408.316 0 82.11 24.104 161.145 69.705 228.556l4.36 6.445-55.014 37.12zM510.677 40.557c-253.126 0-459.06 205.934-459.06 459.06 0 89.396 25.578 175.828 74.053 250.495l29.221-19.715c-44.563-68.554-68.074-148.169-68.074-230.78 0-233.717 190.143-423.861 423.861-423.861 61.471 0 121.117 13.04 177.283 38.76l7.738 3.543-37.618 65.714 176.044-0.882-88.458-151.83-32.41 56.489-6.498-3.09C645.482 55.329 579.51 40.558 510.677 40.558z" p-id="4978"></path><path d="M320.113 320.409h383.973v63.55H320.113z m0.184 127.952H704.27v63.55H320.297z m-0.184 127.803h383.973v63.55H320.113z" p-id="4979"></path></svg>
@@ -1 +0,0 @@
1
- <svg t="1656901778998" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9253" width="200" height="200"><path d="M985.781333 918.594133 820.773333 765.5264c27.3728-32.973867 49.6544-69.5776 66.436267-109.258667 22.933333-54.218667 34.561067-111.7952 34.561067-171.1296 0-59.333333-11.627733-116.910933-34.561067-171.1296-22.142933-52.354133-53.837867-99.365333-94.200533-139.729067S705.633067 102.222933 653.28 80.08c-54.218667-22.933333-111.7952-34.561067-171.1296-34.561067S365.240533 57.147733 311.021867 80.08c-52.354133 22.142933-99.365333 53.8368-139.729067 94.200533s-72.0576 87.374933-94.200533 139.729067c-22.932267 54.218667-34.56 111.7952-34.56 171.1296 0 59.3344 11.627733 116.910933 34.56 171.1296 22.144 52.354133 53.837867 99.365333 94.200533 139.729067s87.374933 72.0576 139.729067 94.200533c54.218667 22.932267 111.7952 34.56 171.1296 34.56s116.910933-11.627733 171.1296-34.56c45.352533-19.181867 86.686933-45.543467 123.172267-78.487467L942.256 965.514667c6.16 5.714133 13.966933 8.539733 21.755733 8.539733 8.593067 0 17.163733-3.441067 23.467733-10.237867C999.4976 950.8608 998.738133 930.612267 985.781333 918.594133zM482.151467 860.7584c-207.117867 0-375.620267-168.5024-375.620267-375.620267 0-207.1168 168.5024-375.6192 375.620267-375.6192S857.770667 278.021333 857.770667 485.138133C857.770667 692.256 689.268267 860.7584 482.151467 860.7584z" p-id="9254"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1574652728953" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4119" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M512 512m-96 0a1.5 1.5 0 1 0 192 0 1.5 1.5 0 1 0-192 0Z" p-id="4120"></path><path d="M512 96.64m-96 0a1.5 1.5 0 1 0 192 0 1.5 1.5 0 1 0-192 0Z" p-id="4121"></path><path d="M512 927.36m-96 0a1.5 1.5 0 1 0 192 0 1.5 1.5 0 1 0-192 0Z" p-id="4122"></path></svg>