kts-component-invoice-operate 3.2.33 → 3.2.34

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.
@@ -1,5 +1,7 @@
1
1
  /** 商品拖拽数据 */
2
2
  export default class Drag {
3
+ /** 是否启用拖拽 */
4
+ isStart: boolean;
3
5
  /** 当前拖动中的货品索引 */
4
6
  current?: string;
5
7
  /** 准备插入的货物索引 */
package/dist/index.esm.js CHANGED
@@ -990,6 +990,7 @@ var ProductComparison = /*#__PURE__*/_createClass(function ProductComparison() {
990
990
  var Drag = /*#__PURE__*/_createClass(function Drag() {
991
991
  _classCallCheck(this, Drag);
992
992
 
993
+ this.isStart = false;
993
994
  this.current = void 0;
994
995
  this.container = void 0;
995
996
  });
@@ -12256,6 +12257,11 @@ var useColumns = (function (form) {
12256
12257
  var model = controller.useMemo(function (e) {
12257
12258
  return e.model;
12258
12259
  }, []);
12260
+ /** 是否启用拖拽 */
12261
+
12262
+ var isStart = controller.useMemo(function (e) {
12263
+ return e.goodsListState.drag.isStart;
12264
+ }, []);
12259
12265
  /** 是否显示我方 */
12260
12266
 
12261
12267
  var isMyShow = controller.useMemo(function (e) {
@@ -13109,6 +13115,9 @@ var useColumns = (function (form) {
13109
13115
  } else {
13110
13116
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
13111
13117
  }
13118
+ }) // 是否启动拖拽
13119
+ .filter(function (e) {
13120
+ return e.key !== 'drag' || isStart;
13112
13121
  }) // 只读
13113
13122
  .filter(function (e) {
13114
13123
  if (model === 'readOnly') {
@@ -13121,7 +13130,7 @@ var useColumns = (function (form) {
13121
13130
  ellipsis: true
13122
13131
  });
13123
13132
  });
13124
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide]);
13133
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide, isStart]);
13125
13134
  return columns;
13126
13135
  });
13127
13136
  /** 字段 */
@@ -16826,6 +16835,7 @@ function ItemNameInput$1(props) {
16826
16835
  }
16827
16836
  }, "*", props.shorthand, "*"), React.createElement(AutoComplete$1, {
16828
16837
  onSearch: onSearch,
16838
+ value: props.value,
16829
16839
  options: options.map(function (e) {
16830
16840
  return {
16831
16841
  value: e.itemName
@@ -16836,7 +16846,6 @@ function ItemNameInput$1(props) {
16836
16846
  style: {
16837
16847
  height: '100%'
16838
16848
  },
16839
- value: props.value,
16840
16849
  onChange: onChange,
16841
16850
  suffix: props.suffix
16842
16851
  })));
@@ -18254,6 +18263,11 @@ var useColumns$1 = (function (form) {
18254
18263
  var editGood = controller.useMemo(function (e) {
18255
18264
  return e.goodsListState.editGood;
18256
18265
  }, []);
18266
+ /** 是否启用拖拽 */
18267
+
18268
+ var isStart = controller.useMemo(function (e) {
18269
+ return e.goodsListState.drag.isStart;
18270
+ }, []);
18257
18271
  /** 搜索条件 */
18258
18272
 
18259
18273
  var searchValue = controller.useMemo(function (e) {
@@ -19048,6 +19062,9 @@ var useColumns$1 = (function (form) {
19048
19062
  } else {
19049
19063
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
19050
19064
  }
19065
+ }) // 是否启动拖拽
19066
+ .filter(function (e) {
19067
+ return e.key !== 'drag' || isStart;
19051
19068
  }) // 只读
19052
19069
  .filter(function (e) {
19053
19070
  if (model === 'readOnly') {
@@ -19060,7 +19077,7 @@ var useColumns$1 = (function (form) {
19060
19077
  ellipsis: true
19061
19078
  });
19062
19079
  });
19063
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish]); // React.useEffect(() => {
19080
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, isStart]); // React.useEffect(() => {
19064
19081
  // clearTimeout(t)
19065
19082
  // const t = setTimeout(() => { setChangeField('') }, 1000);
19066
19083
  // return () => { clearTimeout(t) }
package/dist/index.js CHANGED
@@ -1000,6 +1000,7 @@ var ProductComparison = /*#__PURE__*/_createClass(function ProductComparison() {
1000
1000
  var Drag = /*#__PURE__*/_createClass(function Drag() {
1001
1001
  _classCallCheck(this, Drag);
1002
1002
 
1003
+ this.isStart = false;
1003
1004
  this.current = void 0;
1004
1005
  this.container = void 0;
1005
1006
  });
@@ -12266,6 +12267,11 @@ var useColumns = (function (form) {
12266
12267
  var model = controller.useMemo(function (e) {
12267
12268
  return e.model;
12268
12269
  }, []);
12270
+ /** 是否启用拖拽 */
12271
+
12272
+ var isStart = controller.useMemo(function (e) {
12273
+ return e.goodsListState.drag.isStart;
12274
+ }, []);
12269
12275
  /** 是否显示我方 */
12270
12276
 
12271
12277
  var isMyShow = controller.useMemo(function (e) {
@@ -13119,6 +13125,9 @@ var useColumns = (function (form) {
13119
13125
  } else {
13120
13126
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
13121
13127
  }
13128
+ }) // 是否启动拖拽
13129
+ .filter(function (e) {
13130
+ return e.key !== 'drag' || isStart;
13122
13131
  }) // 只读
13123
13132
  .filter(function (e) {
13124
13133
  if (model === 'readOnly') {
@@ -13131,7 +13140,7 @@ var useColumns = (function (form) {
13131
13140
  ellipsis: true
13132
13141
  });
13133
13142
  });
13134
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide]);
13143
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide, isStart]);
13135
13144
  return columns;
13136
13145
  });
13137
13146
  /** 字段 */
@@ -16836,6 +16845,7 @@ function ItemNameInput$1(props) {
16836
16845
  }
16837
16846
  }, "*", props.shorthand, "*"), React__default['default'].createElement(ktsXui.AutoComplete, {
16838
16847
  onSearch: onSearch,
16848
+ value: props.value,
16839
16849
  options: options.map(function (e) {
16840
16850
  return {
16841
16851
  value: e.itemName
@@ -16846,7 +16856,6 @@ function ItemNameInput$1(props) {
16846
16856
  style: {
16847
16857
  height: '100%'
16848
16858
  },
16849
- value: props.value,
16850
16859
  onChange: onChange,
16851
16860
  suffix: props.suffix
16852
16861
  })));
@@ -18264,6 +18273,11 @@ var useColumns$1 = (function (form) {
18264
18273
  var editGood = controller.useMemo(function (e) {
18265
18274
  return e.goodsListState.editGood;
18266
18275
  }, []);
18276
+ /** 是否启用拖拽 */
18277
+
18278
+ var isStart = controller.useMemo(function (e) {
18279
+ return e.goodsListState.drag.isStart;
18280
+ }, []);
18267
18281
  /** 搜索条件 */
18268
18282
 
18269
18283
  var searchValue = controller.useMemo(function (e) {
@@ -19058,6 +19072,9 @@ var useColumns$1 = (function (form) {
19058
19072
  } else {
19059
19073
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
19060
19074
  }
19075
+ }) // 是否启动拖拽
19076
+ .filter(function (e) {
19077
+ return e.key !== 'drag' || isStart;
19061
19078
  }) // 只读
19062
19079
  .filter(function (e) {
19063
19080
  if (model === 'readOnly') {
@@ -19070,7 +19087,7 @@ var useColumns$1 = (function (form) {
19070
19087
  ellipsis: true
19071
19088
  });
19072
19089
  });
19073
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish]); // React.useEffect(() => {
19090
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, isStart]); // React.useEffect(() => {
19074
19091
  // clearTimeout(t)
19075
19092
  // const t = setTimeout(() => { setChangeField('') }, 1000);
19076
19093
  // return () => { clearTimeout(t) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.33",
3
+ "version": "3.2.34",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -2,6 +2,9 @@
2
2
  /** 商品拖拽数据 */
3
3
  export default class Drag {
4
4
 
5
+ /** 是否启用拖拽 */
6
+ isStart: boolean = false;
7
+
5
8
  /** 当前拖动中的货品索引 */
6
9
  current?: string;
7
10
 
@@ -65,6 +65,7 @@ class MyController1 extends Invoice.InvoiceController {
65
65
  super()
66
66
  this.state.model = 'default'
67
67
  this.state.goodsListState.isMergeDetails = true;
68
+ this.state.goodsListState.drag.isStart = true;
68
69
  }
69
70
 
70
71
  getTaxCategoryCodeList = this.pipeline(async (s) => {
@@ -90,6 +91,7 @@ class MyController2 extends Invoice.InvoiceController {
90
91
  super()
91
92
  this.state.model = 'prefab'
92
93
  this.state.goodsListState.isMergeDetails = true;
94
+ this.state.goodsListState.drag.isStart = true;
93
95
  }
94
96
 
95
97
  getTaxCategoryCodeList = this.pipeline(async (s) => {
@@ -32,6 +32,9 @@ export default (form: WrappedFormUtils) => {
32
32
  /** 组件模式 */
33
33
  const model = controller.useMemo(e => e.model, []);
34
34
 
35
+ /** 是否启用拖拽 */
36
+ const isStart = controller.useMemo((e) => e.goodsListState.drag.isStart, []);
37
+
35
38
  /** 是否显示我方 */
36
39
  const isMyShow = controller.useMemo(e => e.goodsListState.isMyShow, []);
37
40
 
@@ -548,6 +551,8 @@ export default (form: WrappedFormUtils) => {
548
551
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
549
552
  }
550
553
  })
554
+ // 是否启动拖拽
555
+ .filter(e => e.key !=='drag' || isStart)
551
556
  // 只读
552
557
  .filter(e => {
553
558
  if (model === 'readOnly') {
@@ -562,7 +567,7 @@ export default (form: WrappedFormUtils) => {
562
567
  ellipsis: true,
563
568
  };
564
569
  }) as any[];
565
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide]);
570
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide, isStart]);
566
571
  return columns;
567
572
  };
568
573
 
@@ -38,6 +38,9 @@ export default (form: WrappedFormUtils) => {
38
38
  /** 正在编辑的货物 */
39
39
  const editGood = controller.useMemo((e) => e.goodsListState.editGood, []);
40
40
 
41
+ /** 是否启用拖拽 */
42
+ const isStart = controller.useMemo((e) => e.goodsListState.drag.isStart, []);
43
+
41
44
  /** 搜索条件 */
42
45
  const searchValue = controller.useMemo((e) => e.goodsListState.searchValue, []);
43
46
 
@@ -528,6 +531,8 @@ export default (form: WrappedFormUtils) => {
528
531
  return !(e.key === 'priceIncludeTax' || e.key === 'lineAmountIncludeTax');
529
532
  }
530
533
  })
534
+ // 是否启动拖拽
535
+ .filter(e => e.key !=='drag' || isStart)
531
536
  // 只读
532
537
  .filter(e => {
533
538
  if (model === 'readOnly') {
@@ -542,7 +547,7 @@ export default (form: WrappedFormUtils) => {
542
547
  ellipsis: true,
543
548
  };
544
549
  }) as any[];
545
- }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish]);
550
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, isStart]);
546
551
 
547
552
  // React.useEffect(() => {
548
553
  // clearTimeout(t)
@@ -42,8 +42,8 @@ export default function ItemNameInput(props: {
42
42
  return (
43
43
  <div className='kts-invoice-operate-goods-list-itemName-input'>
44
44
  {props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
45
- <AutoComplete onSearch={onSearch} options={options.map(e => ({ value: e.itemName }))} onChange={onChangeAutoComplete} >
46
- <Input style={{ height: '100%' }} value={props.value} onChange={onChange} suffix={props.suffix} />
45
+ <AutoComplete onSearch={onSearch} value={props.value} options={options.map(e => ({ value: e.itemName }))} onChange={onChangeAutoComplete} >
46
+ <Input style={{ height: '100%' }} onChange={onChange} suffix={props.suffix} />
47
47
  </AutoComplete>
48
48
  </div>
49
49
  )