kts-component-invoice-operate 3.2.177 → 3.2.178

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.
@@ -4,6 +4,7 @@ export interface IGoodsListProps {
4
4
  /** 产品最大数 */
5
5
  goodMax?: number;
6
6
  addressOptions: any[];
7
+ vehicleTypeList: any[];
7
8
  /**
8
9
  * 建筑服务地址数据字段名
9
10
  */
package/dist/index.esm.js CHANGED
@@ -25698,7 +25698,7 @@ var Main$4 = decorator(Form.create())(function (props) {
25698
25698
  while (1) {
25699
25699
  switch (_context3.prev = _context3.next) {
25700
25700
  case 0:
25701
- s.freightListState.area = props.addressOptions;
25701
+ s.freightListState.vehicleTypeList = props.vehicleTypeList;
25702
25702
 
25703
25703
  case 1:
25704
25704
  case "end":
@@ -25712,8 +25712,7 @@ var Main$4 = decorator(Form.create())(function (props) {
25712
25712
  return _ref3.apply(this, arguments);
25713
25713
  };
25714
25714
  }());
25715
- }, [props.addressOptions]); // 跟新 货物
25716
-
25715
+ }, [props.vehicleTypeList]);
25717
25716
  React.useEffect(function () {
25718
25717
  controller.run( /*#__PURE__*/function () {
25719
25718
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
@@ -25721,12 +25720,9 @@ var Main$4 = decorator(Form.create())(function (props) {
25721
25720
  while (1) {
25722
25721
  switch (_context4.prev = _context4.next) {
25723
25722
  case 0:
25724
- s.freightListState.goodsMap = new Map();
25725
- goodsList.forEach(function (e) {
25726
- s.freightListState.goodsMap.set(e.$index, e);
25727
- });
25723
+ s.freightListState.area = props.addressOptions;
25728
25724
 
25729
- case 2:
25725
+ case 1:
25730
25726
  case "end":
25731
25727
  return _context4.stop();
25732
25728
  }
@@ -25738,19 +25734,21 @@ var Main$4 = decorator(Form.create())(function (props) {
25738
25734
  return _ref4.apply(this, arguments);
25739
25735
  };
25740
25736
  }());
25741
- }, [controller, goodsList]);
25742
- /** props 产品最大数 更新 */
25737
+ }, [props.addressOptions]); // 跟新 货物
25743
25738
 
25744
25739
  React.useEffect(function () {
25745
- controller.pipeline( /*#__PURE__*/function () {
25740
+ controller.run( /*#__PURE__*/function () {
25746
25741
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
25747
25742
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
25748
25743
  while (1) {
25749
25744
  switch (_context5.prev = _context5.next) {
25750
25745
  case 0:
25751
- s.freightListState.goodMax = props.goodMax;
25746
+ s.freightListState.goodsMap = new Map();
25747
+ goodsList.forEach(function (e) {
25748
+ s.freightListState.goodsMap.set(e.$index, e);
25749
+ });
25752
25750
 
25753
- case 1:
25751
+ case 2:
25754
25752
  case "end":
25755
25753
  return _context5.stop();
25756
25754
  }
@@ -25761,6 +25759,30 @@ var Main$4 = decorator(Form.create())(function (props) {
25761
25759
  return function (_x6) {
25762
25760
  return _ref5.apply(this, arguments);
25763
25761
  };
25762
+ }());
25763
+ }, [controller, goodsList]);
25764
+ /** props 产品最大数 更新 */
25765
+
25766
+ React.useEffect(function () {
25767
+ controller.pipeline( /*#__PURE__*/function () {
25768
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
25769
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
25770
+ while (1) {
25771
+ switch (_context6.prev = _context6.next) {
25772
+ case 0:
25773
+ s.freightListState.goodMax = props.goodMax;
25774
+
25775
+ case 1:
25776
+ case "end":
25777
+ return _context6.stop();
25778
+ }
25779
+ }
25780
+ }, _callee6);
25781
+ }));
25782
+
25783
+ return function (_x7) {
25784
+ return _ref6.apply(this, arguments);
25785
+ };
25764
25786
  }())();
25765
25787
  }, [controller, props.goodMax]); // 注册 form
25766
25788
  // controller.useForm('freightInfo', form);
package/dist/index.js CHANGED
@@ -25708,7 +25708,7 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25708
25708
  while (1) {
25709
25709
  switch (_context3.prev = _context3.next) {
25710
25710
  case 0:
25711
- s.freightListState.area = props.addressOptions;
25711
+ s.freightListState.vehicleTypeList = props.vehicleTypeList;
25712
25712
 
25713
25713
  case 1:
25714
25714
  case "end":
@@ -25722,8 +25722,7 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25722
25722
  return _ref3.apply(this, arguments);
25723
25723
  };
25724
25724
  }());
25725
- }, [props.addressOptions]); // 跟新 货物
25726
-
25725
+ }, [props.vehicleTypeList]);
25727
25726
  React__default['default'].useEffect(function () {
25728
25727
  controller.run( /*#__PURE__*/function () {
25729
25728
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
@@ -25731,12 +25730,9 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25731
25730
  while (1) {
25732
25731
  switch (_context4.prev = _context4.next) {
25733
25732
  case 0:
25734
- s.freightListState.goodsMap = new Map();
25735
- goodsList.forEach(function (e) {
25736
- s.freightListState.goodsMap.set(e.$index, e);
25737
- });
25733
+ s.freightListState.area = props.addressOptions;
25738
25734
 
25739
- case 2:
25735
+ case 1:
25740
25736
  case "end":
25741
25737
  return _context4.stop();
25742
25738
  }
@@ -25748,19 +25744,21 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25748
25744
  return _ref4.apply(this, arguments);
25749
25745
  };
25750
25746
  }());
25751
- }, [controller, goodsList]);
25752
- /** props 产品最大数 更新 */
25747
+ }, [props.addressOptions]); // 跟新 货物
25753
25748
 
25754
25749
  React__default['default'].useEffect(function () {
25755
- controller.pipeline( /*#__PURE__*/function () {
25750
+ controller.run( /*#__PURE__*/function () {
25756
25751
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
25757
25752
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
25758
25753
  while (1) {
25759
25754
  switch (_context5.prev = _context5.next) {
25760
25755
  case 0:
25761
- s.freightListState.goodMax = props.goodMax;
25756
+ s.freightListState.goodsMap = new Map();
25757
+ goodsList.forEach(function (e) {
25758
+ s.freightListState.goodsMap.set(e.$index, e);
25759
+ });
25762
25760
 
25763
- case 1:
25761
+ case 2:
25764
25762
  case "end":
25765
25763
  return _context5.stop();
25766
25764
  }
@@ -25771,6 +25769,30 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25771
25769
  return function (_x6) {
25772
25770
  return _ref5.apply(this, arguments);
25773
25771
  };
25772
+ }());
25773
+ }, [controller, goodsList]);
25774
+ /** props 产品最大数 更新 */
25775
+
25776
+ React__default['default'].useEffect(function () {
25777
+ controller.pipeline( /*#__PURE__*/function () {
25778
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
25779
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
25780
+ while (1) {
25781
+ switch (_context6.prev = _context6.next) {
25782
+ case 0:
25783
+ s.freightListState.goodMax = props.goodMax;
25784
+
25785
+ case 1:
25786
+ case "end":
25787
+ return _context6.stop();
25788
+ }
25789
+ }
25790
+ }, _callee6);
25791
+ }));
25792
+
25793
+ return function (_x7) {
25794
+ return _ref6.apply(this, arguments);
25795
+ };
25774
25796
  }())();
25775
25797
  }, [controller, props.goodMax]); // 注册 form
25776
25798
  // controller.useForm('freightInfo', form);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.177",
3
+ "version": "3.2.178",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -6,7 +6,7 @@ import 'antd/dist/antd.css';
6
6
  export default () => {
7
7
 
8
8
  const controller = React.useMemo(() => new Invoice.InvoiceController(), []);
9
- const area=React.useMemo(() => [
9
+ const area = React.useMemo(() => [
10
10
  {
11
11
  "code": "11",
12
12
  "name": "北京市",
@@ -14545,12 +14545,12 @@ export default () => {
14545
14545
  React.useEffect(() => {
14546
14546
  controller.run(async s => {
14547
14547
  // await controller.run(async s => { s.model = 'readOnly' }); // 设置只读
14548
- controller.state.freightListState.vehicleTypeList = [
14549
- { label: '铁路运输', value: 'RAILWAY' }
14550
- ];
14551
- controller.state.freightListState.area=area;
14552
- controller.state.freightListState.addressFieldNames={label:'name',value:'name',children:'children'}
14553
- controller.state.freightListState.goodsList=[{$index:'222',type:'RAILWAY',itemName:'咖啡机',licensePlate:'渝bkb190',origin:['北京','市辖区','东城区'],destination:['北京','市辖区','东城区']}]
14548
+ // controller.state.freightListState.vehicleTypeList = [
14549
+ // { label: '铁路运输', value: 'RAILWAY' }
14550
+ // ];
14551
+ // controller.state.freightListState.area=area;
14552
+ // controller.state.freightListState.addressFieldNames={label:'name',value:'name',children:'children'}
14553
+ controller.state.freightListState.goodsList = [{ $index: '222', type: 'RAILWAY', itemName: '咖啡机', licensePlate: '渝bkb190', origin: ['北京', '市辖区', '东城区'], destination: ['北京', '市辖区', '东城区'] }]
14554
14554
  })
14555
14555
  }, [])
14556
14556
 
@@ -14558,7 +14558,18 @@ export default () => {
14558
14558
  <Invoice
14559
14559
  invoiceType='digtal'
14560
14560
  controller={controller}
14561
- specialInfor={<Invoice.FreightList />}
14561
+ specialInfor={<Invoice.FreightList
14562
+ vehicleTypeList={[
14563
+ { label: '铁路运输', value: 'RAILWAY' }
14564
+ ]}
14565
+ addressOptions={area}
14566
+ fieldNames={{
14567
+ label: 'name',
14568
+ value: 'name',
14569
+ children: 'children'
14570
+ }}
14571
+ />
14572
+ }
14562
14573
  />
14563
14574
  )
14564
14575
  };
@@ -26,9 +26,9 @@ export interface IGoodsListProps {
26
26
  goodMax?: number;
27
27
 
28
28
  addressOptions: any[];
29
-
29
+ vehicleTypeList:any[];
30
30
  /**
31
- * 建筑服务地址数据字段名
31
+ * 地址数据字段名
32
32
  */
33
33
  fieldNames?: any;
34
34
 
@@ -68,6 +68,11 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
68
68
  s.freightListState.addressFieldNames = props.fieldNames
69
69
  });
70
70
  }, [props.fieldNames])
71
+ React.useEffect(() => {
72
+ controller.run(async (s) => {
73
+ s.freightListState.vehicleTypeList = props.vehicleTypeList
74
+ });
75
+ }, [props.vehicleTypeList])
71
76
  React.useEffect(() => {
72
77
  controller.run(async (s) => {
73
78
  s.freightListState.area = props.addressOptions