@kmkf-fe-packages/services-components 0.10.3 → 0.11.0-alpha.1

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,8 +1,8 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
- import ExpressCompany from '../common/expressCompany';
5
- import ExpressCode from '../common/expressCode';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ import ExpressCompany from "../common/expressCompany";
5
+ import ExpressCode from "../common/expressCode";
6
6
  declare class BsLogistics implements ComponentInterface {
7
7
  name: string;
8
8
  id: string;
@@ -15,13 +15,13 @@ declare class BsLogistics implements ComponentInterface {
15
15
  }[];
16
16
  type: string;
17
17
  rules: any[];
18
- componentConfig: ComponentInterface['componentConfig'];
18
+ componentConfig: ComponentInterface["componentConfig"];
19
19
  expressDateInstance: InstanceType<typeof ExpressData>;
20
20
  isCombinationComponent: boolean;
21
21
  formField: string;
22
22
  canSort: boolean;
23
23
  children: ComponentInterface[];
24
- dataType: ComponentInterface['dataType'];
24
+ dataType: ComponentInterface["dataType"];
25
25
  expressCompany: ExpressCompany;
26
26
  expressCode: ExpressCode;
27
27
  constructor(options: PickOption);
@@ -8,22 +8,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
- import React from 'react';
12
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
13
- import some from 'lodash/some';
11
+ import React from "react";
12
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
13
+ import some from "lodash/some";
14
14
  import GetFormItem from "../../GetFormItem";
15
15
  import { JstGoodImage } from "../../Common";
16
- import { JstGoods } from '@kmkf-fe-packages/basic-components';
16
+ import { JstGoods } from "@kmkf-fe-packages/basic-components";
17
17
  import ItemView from "../../../commonComponents/ItemView";
18
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
18
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
19
19
  import ExpressCompany from "../common/expressCompany";
20
20
  import ExpressCode from "../common/expressCode";
21
21
  var typeMap = {
22
22
  BS_LOGISTICS: {
23
- key: 'bsLogisticsList',
24
- name: 'bs',
25
- company: 'bsLogisticsCompany',
26
- code: 'bsLogisticsCode'
23
+ key: "bsLogisticsList",
24
+ name: "bs",
25
+ company: "bsLogisticsCompany",
26
+ code: "bsLogisticsCode"
27
+ },
28
+ WLN_LOGISTICS: {
29
+ key: "wlnLogisticsList",
30
+ name: "wln",
31
+ company: "wlnLogisticsCompany",
32
+ code: "wlnLogisticsCode"
27
33
  }
28
34
  };
29
35
  var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
@@ -123,17 +129,17 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
123
129
  this.isCombinationComponent = true;
124
130
  this.canSort = false;
125
131
  this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, options), {}, {
126
- name: '物流公司',
132
+ name: "物流公司",
127
133
  id: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.key, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.company),
128
134
  width: 200
129
135
  }));
130
136
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
131
- name: '物流单号',
137
+ name: "物流单号",
132
138
  id: "".concat(options.id, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key, "_").concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.code),
133
139
  width: 200
134
140
  }));
135
141
  this.children = [this.expressCompany, this.expressCode];
136
- this.dataType = 'object';
142
+ this.dataType = "object";
137
143
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
138
144
  required: true,
139
145
  validator: function validator(_, value) {
@@ -148,14 +154,14 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
148
154
  }] : [];
149
155
  this.expressDateInstance = ExpressData.getInstance();
150
156
  this.sortChildField = [{
151
- name: '物流公司',
157
+ name: "物流公司",
152
158
  key: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.company),
153
159
  options: this.expressDateInstance.getExpressData(),
154
- dataType: 'string'
160
+ dataType: "string"
155
161
  }, {
156
- name: '物流单号',
162
+ name: "物流单号",
157
163
  key: "".concat(options.id, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.code),
158
- dataType: 'string'
164
+ dataType: "string"
159
165
  }];
160
166
  });
161
167
  export default BsLogistics;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type getFormItemProps = {
3
3
  name: string;
4
4
  title: string;