@kmkf-fe-packages/kmkf-utils 0.8.13-alpha.1 → 0.8.15-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.
@@ -20,10 +20,18 @@ export default class ExpressInterceptData {
20
20
  label: string;
21
21
  value: string;
22
22
  }[];
23
+ typeConditionOptions: {
24
+ label: string;
25
+ value: string;
26
+ }[];
23
27
  statusOptions: {
24
28
  label: string;
25
29
  value: string;
26
30
  }[];
31
+ statusConditionOptions: {
32
+ label: string;
33
+ value: string;
34
+ }[];
27
35
  constructor();
28
36
  initData: () => OptionsItem[] | undefined;
29
37
  getExpressData: () => OptionsItem[] | undefined;
@@ -37,10 +45,18 @@ export default class ExpressInterceptData {
37
45
  label: string;
38
46
  value: string;
39
47
  }[];
48
+ getTypeConditionOptions(): {
49
+ label: string;
50
+ value: string;
51
+ }[];
40
52
  getStatusOptions(): {
41
53
  label: string;
42
54
  value: string;
43
55
  }[];
56
+ getStatusConditionOptions(): {
57
+ label: string;
58
+ value: string;
59
+ }[];
44
60
  setExpressData: (val: OptionsItem[]) => OptionsItem[];
45
61
  isInterfaceCompany: (company: string) => boolean;
46
62
  static getInstance(): ExpressInterceptData;
@@ -14,6 +14,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  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); }
16
16
  import request from "../request";
17
+ var companyTypeMap = {
18
+ SF: '顺丰',
19
+ ZTO: '中通',
20
+ JT: '极兔',
21
+ DEFAULT: ''
22
+ };
17
23
  var ExpressInterceptData = /*#__PURE__*/function () {
18
24
  //展示拦截按钮映射
19
25
  //展示发件人手机号映射
@@ -21,8 +27,11 @@ var ExpressInterceptData = /*#__PURE__*/function () {
21
27
  //退回诶之显示映射
22
28
  //拦截类型映射
23
29
  //物流状态映射
30
+
24
31
  //拦截类型筛选options
32
+ // 拦截类型筛选options 顺丰/中通/极兔要拆开
25
33
  //物流状态筛选options
34
+ //物流状态条件选择筛选
26
35
  function ExpressInterceptData() {
27
36
  var _this = this;
28
37
  _classCallCheck(this, ExpressInterceptData);
@@ -34,12 +43,14 @@ var ExpressInterceptData = /*#__PURE__*/function () {
34
43
  _defineProperty(this, "typeNameMap", null);
35
44
  _defineProperty(this, "statusNameMap", null);
36
45
  _defineProperty(this, "typeOptions", []);
46
+ _defineProperty(this, "typeConditionOptions", []);
37
47
  _defineProperty(this, "statusOptions", []);
48
+ _defineProperty(this, "statusConditionOptions", []);
38
49
  _defineProperty(this, "initData", function () {
39
50
  if (_this.expressData.length > 0) return _this.expressData;
40
51
  request({
41
- url: "/qy/logistics/listLogisticsWithInterceptInfo",
42
- method: "post",
52
+ url: '/qy/logistics/listLogisticsWithInterceptInfo',
53
+ method: 'post',
43
54
  data: {
44
55
  platformType: 118
45
56
  }
@@ -106,15 +117,35 @@ var ExpressInterceptData = /*#__PURE__*/function () {
106
117
  _this.typeOptions = Object.keys(typeObj).map(function (key) {
107
118
  return {
108
119
  label: key,
109
- value: _toConsumableArray(typeObj[key]).join(",")
120
+ value: _toConsumableArray(typeObj[key]).join(',')
121
+ };
122
+ });
123
+ _this.typeConditionOptions = Object.keys(_this.typeNameMap).map(function (key) {
124
+ var type = key.split('|')[0];
125
+ return {
126
+ label: "".concat(companyTypeMap[type] || '').concat(_this.typeNameMap[key]),
127
+ value: key
110
128
  };
111
129
  });
112
130
  _this.statusOptions = Object.keys(statusObj).map(function (key) {
113
131
  return {
114
132
  label: key,
115
- value: _toConsumableArray(statusObj[key]).join(",")
133
+ value: _toConsumableArray(statusObj[key]).join(',')
116
134
  };
117
135
  });
136
+ var tempList = [];
137
+ var tempObj = {};
138
+ Object.keys(_this.statusNameMap).forEach(function (key) {
139
+ var type = key.split('|')[1];
140
+ if (!tempObj[type]) {
141
+ tempList.push({
142
+ label: _this.statusNameMap[key],
143
+ value: type
144
+ });
145
+ tempObj[type] = _this.statusNameMap[key];
146
+ }
147
+ });
148
+ _this.statusConditionOptions = tempList;
118
149
  }).catch(function (e) {
119
150
  console.log(e);
120
151
  });
@@ -177,11 +208,21 @@ var ExpressInterceptData = /*#__PURE__*/function () {
177
208
  value: function getTypeOptions() {
178
209
  return this.typeOptions;
179
210
  }
211
+ }, {
212
+ key: "getTypeConditionOptions",
213
+ value: function getTypeConditionOptions() {
214
+ return this.typeConditionOptions;
215
+ }
180
216
  }, {
181
217
  key: "getStatusOptions",
182
218
  value: function getStatusOptions() {
183
219
  return this.statusOptions;
184
220
  }
221
+ }, {
222
+ key: "getStatusConditionOptions",
223
+ value: function getStatusConditionOptions() {
224
+ return this.statusConditionOptions;
225
+ }
185
226
  }], [{
186
227
  key: "getInstance",
187
228
  value: function getInstance() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "0.8.13-alpha.1",
3
+ "version": "0.8.15-alpha.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -42,5 +42,5 @@
42
42
  "gitHooks": {
43
43
  "pre-commit": "lint-staged"
44
44
  },
45
- "gitHead": "eaffaa8f384544cd8abb9cac141419f4812af9be"
45
+ "gitHead": "7dfa5c1a4e86ef9ab482cd3dd611eb41e7ac2400"
46
46
  }