kts-component-invoice-operate 2.0.3 → 2.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "2.0.3",
3
+ "version": "2.0.6",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -37,15 +37,32 @@ class MyInvoiceController extends InvoiceController {
37
37
  // 设置比对方法
38
38
  this.state.goodsListState.productComparison = {
39
39
  onComply: async (e: IGood[]) => {
40
- return e.map(e => {
41
- return {
42
- ...e,
43
- itemNameOther: e.itemName + '(他方)',
44
- unitOther: e.unit + '(他方)',
45
- itemModelNameOther: e.itemModelName + '(他方)',
46
- itemCodeOther: e.itemCode + '(他方)',
40
+ // return e.map(e => {
41
+ // return {
42
+ // ...e,
43
+ // itemName: e.itemNameSelf + '(他方)',
44
+ // itemModelName: e.itemModelNameSelf + '(他方)',
45
+ // itemCode: e.itemCodeSelf + '(他方)',
46
+ // }
47
+ // })
48
+ return [
49
+ {
50
+ "itemCodeSelf": null,
51
+ "itemNameSelf": "china",
52
+ "itemModelNameSelf": "xx",
53
+ "itemCode": null,
54
+ "itemName": "中国",
55
+ "itemModelName": "北京房山 "
56
+ },
57
+ {
58
+ "itemCodeSelf": null,
59
+ "itemNameSelf": "china",
60
+ "itemModelNameSelf": "xx",
61
+ "itemCode": null,
62
+ "itemName": "中国",
63
+ "itemModelName": "北京房山 "
47
64
  }
48
- })
65
+ ] as any
49
66
  }
50
67
  }
51
68
 
@@ -77,7 +77,7 @@ export default function AddComparisonDrawer() {
77
77
  !!good &&
78
78
  <Form layout="vertical" style={{ flex: 1 }} form={form} >
79
79
  <Row gutter={[8, 8]} >
80
- <Col span={12}>
80
+ {/* <Col span={12}>
81
81
  <Form.Item
82
82
  name="itemCodeSelf"
83
83
  label="我方商品编码"
@@ -92,7 +92,7 @@ export default function AddComparisonDrawer() {
92
92
  >
93
93
  <Input />
94
94
  </Form.Item>
95
- </Col>
95
+ </Col> */}
96
96
  <Col span={12} >
97
97
  <Form.Item
98
98
  name="itemNameSelf"
@@ -42,7 +42,7 @@ export default () => {
42
42
  // 比对后的商品
43
43
  const newGoods = await s.goodsListState.productComparison.onComply(goods);
44
44
 
45
- newGoods.filter(e => {
45
+ newGoods.forEach(e => {
46
46
  const vt = s.goodsListState.goodsMap.get(e.$index);
47
47
  if (!vt) return undefined;
48
48
 
@@ -27,7 +27,7 @@ export default function Search() {
27
27
 
28
28
  React.useEffect(() => {
29
29
  controller.run(async s => {
30
- s.goodsListState.searchValue = value;
30
+ s.goodsListState.searchValue = value.replace(/^ */, '').replace(/ *$/, '');
31
31
  })
32
32
  }, [value, controller])
33
33