kts-component-invoice-operate 3.2.148 → 3.2.150

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
@@ -701,7 +701,7 @@ function styleInject(css, ref) {
701
701
  }
702
702
  }
703
703
 
704
- var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
704
+ var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n position: relative;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n position: relative;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
705
705
  styleInject(css_248z);
706
706
 
707
707
  var LineAttributeType;
@@ -11167,6 +11167,9 @@ styleInject(css_248z$7);
11167
11167
 
11168
11168
  function ItemNameInput(props) {
11169
11169
  var controller = Invoice.useInvoiceController();
11170
+ var rootElement = controller.useMemo(function (s) {
11171
+ return s.rootElement;
11172
+ }, []);
11170
11173
  var autoComplete = controller.useMemo(function (s) {
11171
11174
  return s.autoComplete;
11172
11175
  }, []);
@@ -11366,6 +11369,9 @@ function ItemNameInput(props) {
11366
11369
  label: e.itemName
11367
11370
  };
11368
11371
  }),
11372
+ getPopupContainer: function getPopupContainer() {
11373
+ return rootElement || document.body;
11374
+ },
11369
11375
  onSelect: onChangeAutoComplete
11370
11376
  }, /*#__PURE__*/React.createElement(Input, {
11371
11377
  style: {
@@ -11383,6 +11389,9 @@ styleInject(css_248z$8);
11383
11389
 
11384
11390
  function ItemCodeInput(props) {
11385
11391
  var controller = Invoice.useInvoiceController();
11392
+ var rootElement = controller.useMemo(function (s) {
11393
+ return s.rootElement;
11394
+ }, []);
11386
11395
  var autoComplete = controller.useMemo(function (s) {
11387
11396
  return s.autoComplete;
11388
11397
  }, []);
@@ -11486,6 +11495,9 @@ function ItemCodeInput(props) {
11486
11495
  value: e.itemCode
11487
11496
  };
11488
11497
  }),
11498
+ getPopupContainer: function getPopupContainer() {
11499
+ return rootElement || document.body;
11500
+ },
11489
11501
  onSelect: onChangeAutoComplete
11490
11502
  }, /*#__PURE__*/React.createElement(Input, {
11491
11503
  style: {
@@ -12978,6 +12990,9 @@ var useColumns = (function (form) {
12978
12990
  var getFieldDecorator = form.getFieldDecorator,
12979
12991
  getFieldValue = form.getFieldValue;
12980
12992
  var controller = Invoice.useInvoiceController();
12993
+ var rootElement = controller.useMemo(function (s) {
12994
+ return s.rootElement;
12995
+ }, []);
12981
12996
  /** 是否含税 */
12982
12997
 
12983
12998
  var isTaxIncluded = controller.useMemo(function (e) {
@@ -13322,6 +13337,9 @@ var useColumns = (function (form) {
13322
13337
  width: '100%'
13323
13338
  },
13324
13339
  dataSource: unitList,
13340
+ getPopupContainer: function getPopupContainer() {
13341
+ return rootElement || document.body;
13342
+ },
13325
13343
  onChange: function () {
13326
13344
  var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
13327
13345
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
@@ -13783,6 +13801,9 @@ var useColumns = (function (form) {
13783
13801
  style: {
13784
13802
  width: '100%'
13785
13803
  },
13804
+ getPopupContainer: function getPopupContainer() {
13805
+ return rootElement || document.body;
13806
+ },
13786
13807
  onChange: function onChange() {
13787
13808
  setChangeField('taxRate');
13788
13809
  onChangeTaxRate(controller, form, record);
@@ -17213,6 +17234,9 @@ function BuyerNameInput$1(props) {
17213
17234
  var fieldName = props.fieldName,
17214
17235
  form = props.myform;
17215
17236
  var controller = Invoice.useInvoiceController();
17237
+ var rootElement = controller.useMemo(function (s) {
17238
+ return s.rootElement;
17239
+ }, []);
17216
17240
  var autoComplete = controller.useMemo(function (s) {
17217
17241
  return s.autoComplete;
17218
17242
  }, []);
@@ -17317,6 +17341,9 @@ function BuyerNameInput$1(props) {
17317
17341
  }),
17318
17342
  onChange: onChangeAutoComplete,
17319
17343
  value: props.value,
17344
+ getPopupContainer: function getPopupContainer() {
17345
+ return rootElement || document.body;
17346
+ },
17320
17347
  style: {
17321
17348
  width: '100%'
17322
17349
  }
@@ -17699,13 +17726,15 @@ var Statistics$1 = (function () {
17699
17726
  }
17700
17727
  }), /*#__PURE__*/React.createElement("div", {
17701
17728
  style: {
17702
- width: 119,
17729
+ minWidth: 119,
17730
+ maxWidth: 300,
17703
17731
  textAlign: 'right',
17704
17732
  paddingRight: 15
17705
17733
  }
17706
17734
  }, "\xA5", parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2)), /*#__PURE__*/React.createElement("div", {
17707
17735
  style: {
17708
- width: 119,
17736
+ minWidth: 119,
17737
+ maxWidth: 300,
17709
17738
  textAlign: 'right',
17710
17739
  paddingRight: 15
17711
17740
  }
@@ -17736,7 +17765,8 @@ var Statistics$1 = (function () {
17736
17765
  }
17737
17766
  }, "\uFF08\u5C0F\u5199\uFF09"), /*#__PURE__*/React.createElement("div", {
17738
17767
  style: {
17739
- width: 119
17768
+ minWidth: 119,
17769
+ maxWidth: 300
17740
17770
  }
17741
17771
  }, "\xA5", parseFloat(lineAmountIncludeTax).toFixed(2))));
17742
17772
  });
@@ -19372,6 +19402,9 @@ styleInject(css_248z$m);
19372
19402
 
19373
19403
  function ItemNameInput$1(props) {
19374
19404
  var controller = Invoice.useInvoiceController();
19405
+ var rootElement = controller.useMemo(function (s) {
19406
+ return s.rootElement;
19407
+ }, []);
19375
19408
  var autoComplete = controller.useMemo(function (s) {
19376
19409
  return s.autoComplete;
19377
19410
  }, []);
@@ -19561,6 +19594,9 @@ function ItemNameInput$1(props) {
19561
19594
  label: e.itemName
19562
19595
  };
19563
19596
  }),
19597
+ getPopupContainer: function getPopupContainer() {
19598
+ return rootElement || document.body;
19599
+ },
19564
19600
  onSelect: onChangeAutoComplete
19565
19601
  }, /*#__PURE__*/React.createElement(Input$1, {
19566
19602
  style: {
@@ -19942,6 +19978,9 @@ var useColumns$1 = (function (form) {
19942
19978
  var getFieldDecorator = form.getFieldDecorator,
19943
19979
  getFieldValue = form.getFieldValue;
19944
19980
  var controller = Invoice.useInvoiceController();
19981
+ var rootElement = controller.useMemo(function (s) {
19982
+ return s.rootElement;
19983
+ }, []);
19945
19984
  /** 是否含税 */
19946
19985
 
19947
19986
  var isTaxIncluded = controller.useMemo(function (e) {
@@ -20248,6 +20287,9 @@ var useColumns$1 = (function (form) {
20248
20287
  width: '100%'
20249
20288
  },
20250
20289
  dataSource: unitList,
20290
+ getPopupContainer: function getPopupContainer() {
20291
+ return rootElement || document.body;
20292
+ },
20251
20293
  onChange: function () {
20252
20294
  var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
20253
20295
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -20707,6 +20749,9 @@ var useColumns$1 = (function (form) {
20707
20749
  style: {
20708
20750
  width: '100%'
20709
20751
  },
20752
+ getPopupContainer: function getPopupContainer() {
20753
+ return rootElement || document.body;
20754
+ },
20710
20755
  onChange: function onChange() {
20711
20756
  setChangeField('taxRate');
20712
20757
  onChangeTaxRate$1(controller, form, record);
@@ -22924,15 +22969,16 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
22924
22969
  _createClass(MyArrMoment, [{
22925
22970
  key: "render",
22926
22971
  value: function render() {
22927
- var _this$props$value2;
22928
-
22972
+ var _this$props$value2 = this.props.value,
22973
+ value = _this$props$value2 === void 0 ? [] : _this$props$value2;
22929
22974
  return /*#__PURE__*/React.createElement("div", {
22930
22975
  style: this.props.style
22931
- }, (_this$props$value2 = this.props.value) === null || _this$props$value2 === void 0 ? void 0 : _this$props$value2.map(function (e) {
22932
- return hooks.isMoment(e) && e.format('YYYY-MM-DD');
22933
- }).filter(function (e) {
22934
- return !!e;
22935
- }).join(' - '));
22976
+ }, /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD')), /*#__PURE__*/React.createElement("span", {
22977
+ style: {
22978
+ color: '#9F603D',
22979
+ fontWeight: 600
22980
+ }
22981
+ }, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
22936
22982
  }
22937
22983
  }]);
22938
22984
 
package/dist/index.js CHANGED
@@ -711,7 +711,7 @@ function styleInject(css, ref) {
711
711
  }
712
712
  }
713
713
 
714
- var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
714
+ var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n position: relative;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n position: relative;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
715
715
  styleInject(css_248z);
716
716
 
717
717
  var LineAttributeType;
@@ -11177,6 +11177,9 @@ styleInject(css_248z$7);
11177
11177
 
11178
11178
  function ItemNameInput(props) {
11179
11179
  var controller = Invoice.useInvoiceController();
11180
+ var rootElement = controller.useMemo(function (s) {
11181
+ return s.rootElement;
11182
+ }, []);
11180
11183
  var autoComplete = controller.useMemo(function (s) {
11181
11184
  return s.autoComplete;
11182
11185
  }, []);
@@ -11376,6 +11379,9 @@ function ItemNameInput(props) {
11376
11379
  label: e.itemName
11377
11380
  };
11378
11381
  }),
11382
+ getPopupContainer: function getPopupContainer() {
11383
+ return rootElement || document.body;
11384
+ },
11379
11385
  onSelect: onChangeAutoComplete
11380
11386
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, {
11381
11387
  style: {
@@ -11393,6 +11399,9 @@ styleInject(css_248z$8);
11393
11399
 
11394
11400
  function ItemCodeInput(props) {
11395
11401
  var controller = Invoice.useInvoiceController();
11402
+ var rootElement = controller.useMemo(function (s) {
11403
+ return s.rootElement;
11404
+ }, []);
11396
11405
  var autoComplete = controller.useMemo(function (s) {
11397
11406
  return s.autoComplete;
11398
11407
  }, []);
@@ -11496,6 +11505,9 @@ function ItemCodeInput(props) {
11496
11505
  value: e.itemCode
11497
11506
  };
11498
11507
  }),
11508
+ getPopupContainer: function getPopupContainer() {
11509
+ return rootElement || document.body;
11510
+ },
11499
11511
  onSelect: onChangeAutoComplete
11500
11512
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, {
11501
11513
  style: {
@@ -12988,6 +13000,9 @@ var useColumns = (function (form) {
12988
13000
  var getFieldDecorator = form.getFieldDecorator,
12989
13001
  getFieldValue = form.getFieldValue;
12990
13002
  var controller = Invoice.useInvoiceController();
13003
+ var rootElement = controller.useMemo(function (s) {
13004
+ return s.rootElement;
13005
+ }, []);
12991
13006
  /** 是否含税 */
12992
13007
 
12993
13008
  var isTaxIncluded = controller.useMemo(function (e) {
@@ -13332,6 +13347,9 @@ var useColumns = (function (form) {
13332
13347
  width: '100%'
13333
13348
  },
13334
13349
  dataSource: unitList,
13350
+ getPopupContainer: function getPopupContainer() {
13351
+ return rootElement || document.body;
13352
+ },
13335
13353
  onChange: function () {
13336
13354
  var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
13337
13355
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
@@ -13793,6 +13811,9 @@ var useColumns = (function (form) {
13793
13811
  style: {
13794
13812
  width: '100%'
13795
13813
  },
13814
+ getPopupContainer: function getPopupContainer() {
13815
+ return rootElement || document.body;
13816
+ },
13796
13817
  onChange: function onChange() {
13797
13818
  setChangeField('taxRate');
13798
13819
  onChangeTaxRate(controller, form, record);
@@ -17223,6 +17244,9 @@ function BuyerNameInput$1(props) {
17223
17244
  var fieldName = props.fieldName,
17224
17245
  form = props.myform;
17225
17246
  var controller = Invoice.useInvoiceController();
17247
+ var rootElement = controller.useMemo(function (s) {
17248
+ return s.rootElement;
17249
+ }, []);
17226
17250
  var autoComplete = controller.useMemo(function (s) {
17227
17251
  return s.autoComplete;
17228
17252
  }, []);
@@ -17327,6 +17351,9 @@ function BuyerNameInput$1(props) {
17327
17351
  }),
17328
17352
  onChange: onChangeAutoComplete,
17329
17353
  value: props.value,
17354
+ getPopupContainer: function getPopupContainer() {
17355
+ return rootElement || document.body;
17356
+ },
17330
17357
  style: {
17331
17358
  width: '100%'
17332
17359
  }
@@ -17709,13 +17736,15 @@ var Statistics$1 = (function () {
17709
17736
  }
17710
17737
  }), /*#__PURE__*/React__default['default'].createElement("div", {
17711
17738
  style: {
17712
- width: 119,
17739
+ minWidth: 119,
17740
+ maxWidth: 300,
17713
17741
  textAlign: 'right',
17714
17742
  paddingRight: 15
17715
17743
  }
17716
17744
  }, "\xA5", parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2)), /*#__PURE__*/React__default['default'].createElement("div", {
17717
17745
  style: {
17718
- width: 119,
17746
+ minWidth: 119,
17747
+ maxWidth: 300,
17719
17748
  textAlign: 'right',
17720
17749
  paddingRight: 15
17721
17750
  }
@@ -17746,7 +17775,8 @@ var Statistics$1 = (function () {
17746
17775
  }
17747
17776
  }, "\uFF08\u5C0F\u5199\uFF09"), /*#__PURE__*/React__default['default'].createElement("div", {
17748
17777
  style: {
17749
- width: 119
17778
+ minWidth: 119,
17779
+ maxWidth: 300
17750
17780
  }
17751
17781
  }, "\xA5", parseFloat(lineAmountIncludeTax).toFixed(2))));
17752
17782
  });
@@ -19382,6 +19412,9 @@ styleInject(css_248z$m);
19382
19412
 
19383
19413
  function ItemNameInput$1(props) {
19384
19414
  var controller = Invoice.useInvoiceController();
19415
+ var rootElement = controller.useMemo(function (s) {
19416
+ return s.rootElement;
19417
+ }, []);
19385
19418
  var autoComplete = controller.useMemo(function (s) {
19386
19419
  return s.autoComplete;
19387
19420
  }, []);
@@ -19571,6 +19604,9 @@ function ItemNameInput$1(props) {
19571
19604
  label: e.itemName
19572
19605
  };
19573
19606
  }),
19607
+ getPopupContainer: function getPopupContainer() {
19608
+ return rootElement || document.body;
19609
+ },
19574
19610
  onSelect: onChangeAutoComplete
19575
19611
  }, /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, {
19576
19612
  style: {
@@ -19952,6 +19988,9 @@ var useColumns$1 = (function (form) {
19952
19988
  var getFieldDecorator = form.getFieldDecorator,
19953
19989
  getFieldValue = form.getFieldValue;
19954
19990
  var controller = Invoice.useInvoiceController();
19991
+ var rootElement = controller.useMemo(function (s) {
19992
+ return s.rootElement;
19993
+ }, []);
19955
19994
  /** 是否含税 */
19956
19995
 
19957
19996
  var isTaxIncluded = controller.useMemo(function (e) {
@@ -20258,6 +20297,9 @@ var useColumns$1 = (function (form) {
20258
20297
  width: '100%'
20259
20298
  },
20260
20299
  dataSource: unitList,
20300
+ getPopupContainer: function getPopupContainer() {
20301
+ return rootElement || document.body;
20302
+ },
20261
20303
  onChange: function () {
20262
20304
  var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
20263
20305
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -20717,6 +20759,9 @@ var useColumns$1 = (function (form) {
20717
20759
  style: {
20718
20760
  width: '100%'
20719
20761
  },
20762
+ getPopupContainer: function getPopupContainer() {
20763
+ return rootElement || document.body;
20764
+ },
20720
20765
  onChange: function onChange() {
20721
20766
  setChangeField('taxRate');
20722
20767
  onChangeTaxRate$1(controller, form, record);
@@ -22934,15 +22979,16 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
22934
22979
  _createClass(MyArrMoment, [{
22935
22980
  key: "render",
22936
22981
  value: function render() {
22937
- var _this$props$value2;
22938
-
22982
+ var _this$props$value2 = this.props.value,
22983
+ value = _this$props$value2 === void 0 ? [] : _this$props$value2;
22939
22984
  return /*#__PURE__*/React__default['default'].createElement("div", {
22940
22985
  style: this.props.style
22941
- }, (_this$props$value2 = this.props.value) === null || _this$props$value2 === void 0 ? void 0 : _this$props$value2.map(function (e) {
22942
- return hooks.isMoment(e) && e.format('YYYY-MM-DD');
22943
- }).filter(function (e) {
22944
- return !!e;
22945
- }).join(' - '));
22986
+ }, /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD')), /*#__PURE__*/React__default['default'].createElement("span", {
22987
+ style: {
22988
+ color: '#9F603D',
22989
+ fontWeight: 600
22990
+ }
22991
+ }, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
22946
22992
  }
22947
22993
  }]);
22948
22994
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.148",
3
+ "version": "3.2.150",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -1,11 +1,22 @@
1
1
  import React from 'react';
2
2
  import Invoice from '../../..';
3
+ import moment from 'moment';
3
4
  import 'antd/dist/antd.css';
4
5
 
5
6
  export default () => {
7
+
8
+ const controller = React.useMemo(() => new Invoice.InvoiceController(), []);
9
+
10
+ React.useEffect(() => {
11
+ controller.run(async s => {
12
+ s.model = 'readOnly'
13
+ })
14
+ }, [])
15
+
6
16
  return (
7
17
  <Invoice
8
18
  invoiceType='digtal'
19
+ controller={controller}
9
20
  specialInfor={<Invoice.RealEstateInfo />}
10
21
  />
11
22
  )
@@ -1,6 +1,7 @@
1
1
  .kts-invoice-operate {
2
2
  border : 1px solid #dcdcdc;
3
3
  font-size: 12px;
4
+ position: relative;
4
5
 
5
6
  &>* {
6
7
  border-bottom: 1px solid #dcdcdc;
@@ -15,6 +16,7 @@
15
16
 
16
17
  font-family: PingFang SC;
17
18
  font-size : 14px;
19
+ position: relative;
18
20
 
19
21
  .kts-invoice-operate-digtal-cont {
20
22
  border: 2px solid #9F613E;
@@ -27,6 +27,8 @@ export default (form: WrappedFormUtils) => {
27
27
 
28
28
  const controller = Invoice.useInvoiceController();
29
29
 
30
+ const rootElement = controller.useMemo(s => s.rootElement, []);
31
+
30
32
  /** 是否含税 */
31
33
  const isTaxIncluded = controller.useMemo(e => e.goodsListState.isTaxIncluded, []);
32
34
 
@@ -235,6 +237,7 @@ export default (form: WrappedFormUtils) => {
235
237
  <AutoComplete
236
238
  style={{ width: '100%' }}
237
239
  dataSource={unitList}
240
+ getPopupContainer={() => rootElement || document.body}
238
241
  onChange={async () => {
239
242
  await controller.wait()
240
243
  controller.setEditGood({ unit: form.getFieldsValue().unit });
@@ -494,6 +497,7 @@ export default (form: WrappedFormUtils) => {
494
497
  dropdownMenuStyle={{ textAlign: "right" }}
495
498
  showArrow={false}
496
499
  style={{ width: '100%' }}
500
+ getPopupContainer={() => rootElement || document.body}
497
501
  onChange={() => {
498
502
  setChangeField('taxRate');
499
503
  onChangeTaxRate(controller, form, record);
@@ -9,6 +9,8 @@ export default function ItemCodeInput(props: { onChange?: (e: ChangeEvent<HTMLIn
9
9
 
10
10
  const controller = Invoice.useInvoiceController();
11
11
 
12
+ const rootElement = controller.useMemo(s => s.rootElement, []);
13
+
12
14
  const autoComplete = controller.useMemo(s => s.autoComplete, [])
13
15
 
14
16
  const editGood = controller.useMemo((e) => e.goodsListState.editGood, []);
@@ -39,7 +41,7 @@ export default function ItemCodeInput(props: { onChange?: (e: ChangeEvent<HTMLIn
39
41
 
40
42
  return (
41
43
  <div className='kts-invoice-operate-goods-list-itemCode-input'>
42
- <AutoComplete onSearch={onSearch} value={props.value} options={options.map(e => ({ value: e.itemCode }))} onSelect={onChangeAutoComplete} >
44
+ <AutoComplete onSearch={onSearch} value={props.value} options={options.map(e => ({ value: e.itemCode }))} getPopupContainer={() => rootElement || document.body} onSelect={onChangeAutoComplete} >
43
45
  <Input style={{ height: '100%', border: 'none' }} onChange={onChange} />
44
46
  </AutoComplete>
45
47
  </div>
@@ -10,6 +10,8 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
10
10
 
11
11
  const controller = Invoice.useInvoiceController();
12
12
 
13
+ const rootElement = controller.useMemo(s => s.rootElement, []);
14
+
13
15
  const autoComplete = controller.useMemo(s => s.autoComplete, [])
14
16
 
15
17
  const [options, setOptions] = React.useState<IGood[]>([]);
@@ -79,6 +81,7 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
79
81
  onSearch={onSearch}
80
82
  value={props.value}
81
83
  options={options.map(e => ({ value: e.$index, label: e.itemName }))}
84
+ getPopupContainer={() => rootElement || document.body}
82
85
  onSelect={onChangeAutoComplete}
83
86
  >
84
87
  <Input style={{ height: '100%', border: 'none' }} value={value} onChange={onChange} onBlur={onBlur} />
@@ -27,6 +27,8 @@ export default (form: WrappedFormUtils) => {
27
27
 
28
28
  const controller = Invoice.useInvoiceController();
29
29
 
30
+ const rootElement = controller.useMemo(s => s.rootElement, []);
31
+
30
32
  /** 是否含税 */
31
33
  const isTaxIncluded = controller.useMemo(e => e.goodsListState.isTaxIncluded, []);
32
34
 
@@ -208,6 +210,7 @@ export default (form: WrappedFormUtils) => {
208
210
  <AutoComplete
209
211
  style={{ width: '100%' }}
210
212
  dataSource={unitList}
213
+ getPopupContainer={() => rootElement || document.body}
211
214
  onChange={async () => {
212
215
  await controller.wait()
213
216
  controller.setEditGood({ unit: form.getFieldsValue().unit });
@@ -467,6 +470,7 @@ export default (form: WrappedFormUtils) => {
467
470
  // dropdownMenuStyle={{ textAlign: "right" }}
468
471
  showArrow={false}
469
472
  style={{ width: '100%' }}
473
+ getPopupContainer={() => rootElement || document.body}
470
474
  onChange={() => {
471
475
  setChangeField('taxRate');
472
476
  onChangeTaxRate(controller, form, record);
@@ -15,6 +15,8 @@ export default function ItemNameInput(props: {
15
15
 
16
16
  const controller = Invoice.useInvoiceController();
17
17
 
18
+ const rootElement = controller.useMemo(s => s.rootElement, []);
19
+
18
20
  const autoComplete = controller.useMemo(s => s.autoComplete, [])
19
21
 
20
22
  const [options, setOptions] = React.useState<IGood[]>([])
@@ -75,6 +77,7 @@ export default function ItemNameInput(props: {
75
77
  onSearch={onSearch}
76
78
  value={props.value}
77
79
  options={options.map(e => ({ value: e.$index, label: e.itemName }))}
80
+ getPopupContainer={() => rootElement || document.body}
78
81
  onSelect={onChangeAutoComplete}
79
82
  >
80
83
  <Input style={{ height: '100%' }} onChange={onChange} suffix={props.suffix} onBlur={onBlur} />
@@ -80,8 +80,8 @@ export default () => {
80
80
  <div className='statistics-digtal-total' >
81
81
  <div>合计</div>
82
82
  <div style={{ flex: 1 }} />
83
- <div style={{ width: 119, textAlign: 'right', paddingRight: 15 }} >¥{parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2)}</div>
84
- <div style={{ width: 119, textAlign: 'right', paddingRight: 15 }} >¥{parseFloat(taxAmount).toFixed(2)}</div>
83
+ <div style={{ minWidth: 119, maxWidth: 300, textAlign: 'right', paddingRight: 15 }} >¥{parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2)}</div>
84
+ <div style={{ minWidth: 119, maxWidth: 300, textAlign: 'right', paddingRight: 15 }} >¥{parseFloat(taxAmount).toFixed(2)}</div>
85
85
  </div>
86
86
  <div className='statistics-digtal-total-tax' >
87
87
  <div>价税合计(大写)</div>
@@ -91,7 +91,7 @@ export default () => {
91
91
  </div>
92
92
  <div style={{ flex: 1 }} />
93
93
  <div style={{ width: 90, color: '#9F613E' }} >(小写)</div>
94
- <div style={{ width: 119 }} >¥{parseFloat(lineAmountIncludeTax).toFixed(2)}</div>
94
+ <div style={{ minWidth: 119, maxWidth: 300 }} >¥{parseFloat(lineAmountIncludeTax).toFixed(2)}</div>
95
95
  </div>
96
96
  </div >
97
97
  );
@@ -184,13 +184,12 @@ class MyArrString extends React.Component<{ value?: string[], style?: React.CSSP
184
184
 
185
185
  class MyArrMoment extends React.Component<{ value?: moment.Moment[], style?: React.CSSProperties }> {
186
186
  render(): React.ReactNode {
187
+ const { value = [] } = this.props
187
188
  return (
188
189
  <div style={this.props.style}>
189
- {
190
- this.props.value?.map(e => moment.isMoment(e) && e.format('YYYY-MM-DD'))
191
- .filter(e => !!e)
192
- .join(' - ')
193
- }
190
+ <span>{moment.isMoment(value[0]) && value[0].format('YYYY-MM-DD')}</span>
191
+ <span style={{ color: '#9F603D', fontWeight: 600 }} > - </span>
192
+ <span>{moment.isMoment(value[1]) && value[0].format('YYYY-MM-DD')}</span>
194
193
  </div>
195
194
  )
196
195
  }
@@ -324,6 +324,8 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
324
324
 
325
325
  const controller = Invoice.useInvoiceController();
326
326
 
327
+ const rootElement = controller.useMemo(s => s.rootElement, []);
328
+
327
329
  const autoComplete = controller.useMemo(s => s.autoComplete, [])
328
330
 
329
331
  const [options, setOptions] = React.useState<any[]>([])
@@ -363,6 +365,7 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
363
365
  options={options.map(e => ({ value: e[fieldName] }))}
364
366
  onChange={onChangeAutoComplete}
365
367
  value={props.value}
368
+ getPopupContainer={() => rootElement || document.body}
366
369
  style={{ width: '100%' }}
367
370
  >
368
371
  <Input {...props} style={{ width: '100%', ...props.style }} />