@kmkf-fe-packages/services-components 1.22.1-beta.60 → 1.22.1-beta.62

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,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData" | "queryJSTLogisticsCompany" | "queryWLNLogisticsCompany";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryGyAddressData" | "queryBsE3LogisticsCompany" | "querySendData" | "queryJSTLogisticsCompany" | "queryWLNLogisticsCompany";
3
3
  declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -42,6 +42,7 @@ var Global = function Global(_ref) {
42
42
  queryAllLogisticsCompany: queryAllLogisticsCompany,
43
43
  queryLabel: queryLabel,
44
44
  queryWdtAddressData: servers.queryWdtAddressData,
45
+ queryGyAddressData: servers.queryGyAddressData,
45
46
  queryWdtLogisticsCompany: queryWdtLogisticsCompany,
46
47
  queryBsE3LogisticsCompany: queryBsE3LogisticsCompany,
47
48
  querySendData: querySendData,
@@ -267,8 +267,9 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
267
267
  return SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendName);
268
268
  };
269
269
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
270
- var logisticsCompany = item.logisticsCompany;
271
- var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
270
+ var logisticsCompany = item.logisticsCompany,
271
+ logisticsCompanyName = item.logisticsCompanyName;
272
+ var company = platformType === "gy" ? logisticsCompanyName : ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
272
273
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
273
274
  content: content(item, index),
274
275
  overlayStyle: {
@@ -13,7 +13,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
- import { AddressData, BsAddressData, WdtAddressData } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import Province from "../BS/BsPosting/components/Province";
18
18
  import City from "../BS/BsPosting/components//City";
19
19
  import District from "../BS/BsPosting/components//District";
@@ -191,6 +191,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
191
191
  var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
192
192
  this.addressDateInstance = (showField && {
193
193
  bs: BsAddressData,
194
+ gy: GyAddressData,
194
195
  wdt: WdtAddressData,
195
196
  workOrder: AddressData
196
197
  }[showField] || AddressData).getInstance();
@@ -30,6 +30,15 @@ declare class Logistics implements ComponentInterface {
30
30
  renderExport: (value: any, record: any) => any;
31
31
  editRender: (p: any) => React.JSX.Element;
32
32
  filterConfig: (item: ColumnConfig) => ({
33
+ searchDefaultConditions: "in";
34
+ type: string;
35
+ id: string;
36
+ name: string;
37
+ filterComponentType: "Input";
38
+ filterFn: (value: string) => (i: Record) => boolean;
39
+ formatFilterValue: (input: string) => string | string[];
40
+ props?: undefined;
41
+ } | {
33
42
  searchDefaultConditions: "in";
34
43
  type: string;
35
44
  id: string;
@@ -40,15 +49,6 @@ declare class Logistics implements ComponentInterface {
40
49
  };
41
50
  filterFn: (value: string) => (i: Record) => any;
42
51
  formatFilterValue?: undefined;
43
- } | {
44
- searchDefaultConditions: "in";
45
- type: string;
46
- id: string;
47
- name: string;
48
- filterComponentType: "Input";
49
- filterFn: (value: string) => (i: Record) => boolean;
50
- formatFilterValue: (input: string) => string | string[];
51
- props?: undefined;
52
52
  } | {
53
53
  searchDefaultConditions: "like";
54
54
  type: string;
@@ -56,8 +56,8 @@ declare class Logistics implements ComponentInterface {
56
56
  name: string;
57
57
  filterComponentType: "Input";
58
58
  filterFn: (value: string) => (i: Record) => boolean;
59
- props?: undefined;
60
59
  formatFilterValue?: undefined;
60
+ props?: undefined;
61
61
  })[];
62
62
  }
63
63
  export default Logistics;
@@ -16,10 +16,18 @@ import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { SYMBOL, batchInput } from "../../../constant";
18
18
  var typeMap = {
19
+ JST_LOGISTICS: {
20
+ key: "jstItemList",
21
+ name: "jst",
22
+ company: "logisticsCompany",
23
+ companyName: "logisticsCompanyName",
24
+ code: "logisticsCode"
25
+ },
19
26
  REISSUE_LOGISTICS: {
20
27
  key: "reissueLogisticsList",
21
28
  name: "reissue",
22
29
  company: "reissueLogisticsCompany",
30
+ companyName: "reissueLogisticsCompanyName",
23
31
  code: "reissueLogisticsCode"
24
32
  }
25
33
  };
@@ -27,9 +35,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
27
35
  var _this = this,
28
36
  _typeMap$_options$typ,
29
37
  _typeMap$_options$typ2,
30
- _this$componentConfig8,
31
38
  _this$componentConfig9,
32
- _this$componentConfig10;
39
+ _this$componentConfig11,
40
+ _this$componentConfig12;
33
41
  _classCallCheck(this, Logistics);
34
42
  _defineProperty(this, "name", void 0);
35
43
  _defineProperty(this, "id", void 0);
@@ -124,11 +132,26 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
124
132
  });
125
133
  });
126
134
  _defineProperty(this, "filterConfig", function (item) {
127
- var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
128
- return [{
135
+ var _this$componentConfig8, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8;
136
+ var logisticsType = ((_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.logistics) === 'gy' ? 'input' : 'select';
137
+ return [logisticsType === "input" ? {
138
+ searchDefaultConditions: SYMBOL.in,
139
+ type: item.type,
140
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.companyName),
141
+ name: "".concat(_this.name, "\u7269\u6D41\u516C\u53F8"),
142
+ filterComponentType: "Input",
143
+ filterFn: function filterFn(value) {
144
+ return function (i) {
145
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
146
+ };
147
+ },
148
+ formatFilterValue: function formatFilterValue(input) {
149
+ return batchInput(input);
150
+ }
151
+ } : {
129
152
  searchDefaultConditions: SYMBOL.in,
130
153
  type: item.type,
131
- id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.company),
154
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.company),
132
155
  name: "".concat(_this.name, "\u7269\u6D41\u516C\u53F8"),
133
156
  filterComponentType: "MultipleSelect",
134
157
  props: {
@@ -147,7 +170,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
147
170
  }, _this.type === "REISSUE_LOGISTICS" ? {
148
171
  searchDefaultConditions: SYMBOL.in,
149
172
  type: item.type,
150
- id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.code),
173
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.code),
151
174
  name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
152
175
  filterComponentType: "Input",
153
176
  filterFn: function filterFn(value) {
@@ -161,7 +184,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
161
184
  } : {
162
185
  searchDefaultConditions: SYMBOL.like,
163
186
  type: item.type,
164
- id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.code),
187
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.code),
165
188
  name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
166
189
  filterComponentType: "Input",
167
190
  filterFn: function filterFn(value) {
@@ -181,10 +204,14 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
181
204
  this.canSort = false;
182
205
  this.children = [];
183
206
  this.dataType = "object";
184
- this.rules = (_this$componentConfig8 = this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.required ? [{
207
+ this.rules = (_this$componentConfig9 = this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.required ? [{
185
208
  required: true,
186
209
  validator: function validator(_, value) {
187
210
  var hasNo = (value || []).some(function (item) {
211
+ var _this$componentConfig10;
212
+ if (((_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.logistics) === 'gy') {
213
+ return item.logisticsCompanyName && item.logisticsCode;
214
+ }
188
215
  return item.logisticsCompany && item.logisticsCode;
189
216
  });
190
217
  if (!hasNo) {
@@ -194,7 +221,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
194
221
  }
195
222
  }] : [];
196
223
  this.align = "left";
197
- this.expressDateInstance = ExpressData.getInstance((_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.logistics);
198
- this.sortChildField = this.getSortChildFields(((_this$componentConfig10 = this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.showField) || "", _options);
224
+ this.expressDateInstance = ExpressData.getInstance((_this$componentConfig11 = this.componentConfig) === null || _this$componentConfig11 === void 0 ? void 0 : _this$componentConfig11.logistics);
225
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig12 = this.componentConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.showField) || "", _options);
199
226
  });
200
227
  export default Logistics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.22.1-beta.60",
3
+ "version": "1.22.1-beta.62",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.22.1-beta.60",
25
- "@kmkf-fe-packages/kmkf-utils": "1.22.1-beta.60",
24
+ "@kmkf-fe-packages/basic-components": "1.22.1-beta.62",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.22.1-beta.62",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "4294b9ce062ebadf9b41a69e74d2904b58632ef8",
44
+ "gitHead": "8292bf6d7b28318d4475d2ddf1ed82ee90d23b77",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }