@kmkf-fe-packages/services-components 0.7.15-alpha.23 → 0.7.15-alpha.26

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.
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useState } from "react";
12
- import { Modal, Timeline, message, Input } from "antd";
12
+ import { Modal, Timeline, message } from "antd";
13
13
  import { request } from "@kmkf-fe-packages/kmkf-utils";
14
14
  var info = Modal.info;
15
15
  var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
@@ -48,24 +48,26 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
48
48
  }
49
49
  return _context.abrupt("return", message.error("缺少物流公司或物流单号"));
50
50
  case 2:
51
+ logisticsTraceSearch();
51
52
  //如果是顺丰且没有手机号 要输入手机号
52
- if (interceptCompany === "SF" && !interceptSenderMobile) {
53
- Modal.confirm({
54
- title: "查询物流轨迹",
55
- okText: "查询",
56
- cancelText: "取消",
57
- content: /*#__PURE__*/React.createElement("div", null, "\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7", /*#__PURE__*/React.createElement(Input, {
58
- onChange: function onChange(e) {
59
- return setInputVal(e.target.value);
60
- }
61
- })),
62
- onOk: function onOk() {
63
- logisticsTraceSearch(inputVal);
64
- }
65
- });
66
- } else {
67
- logisticsTraceSearch();
68
- }
53
+ // if (interceptCompany === "SF" && !interceptSenderMobile) {
54
+ // Modal.confirm({
55
+ // title: "查询物流轨迹",
56
+ // okText: "查询",
57
+ // cancelText: "取消",
58
+ // content: (
59
+ // <div>
60
+ // 发件人手机号
61
+ // <Input onChange={(e) => setInputVal(e.target.value)}></Input>
62
+ // </div>
63
+ // ),
64
+ // onOk: () => {
65
+ // logisticsTraceSearch(inputVal);
66
+ // },
67
+ // });
68
+ // } else {
69
+ // logisticsTraceSearch();
70
+ // }
69
71
  case 3:
70
72
  case "end":
71
73
  return _context.stop();
@@ -93,17 +95,17 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
93
95
  var result = res.result,
94
96
  success = res.success,
95
97
  data = res.data,
96
- message = res.message;
98
+ msg = res.message;
97
99
  if (result === 100 || success) {
98
100
  info({
99
101
  title: "物流轨迹",
100
102
  okText: "确定",
101
103
  icon: null,
102
104
  width: modelWidth,
103
- content: LogisticsList(data)
105
+ content: LogisticsList(data === null || data === void 0 ? void 0 : data.traceDetailList)
104
106
  });
105
107
  } else {
106
- message && message.error(message);
108
+ msg && message.error(msg);
107
109
  }
108
110
  });
109
111
  } catch (err) {
@@ -11,12 +11,85 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import { BsGoodImage } from "../../Common";
14
- import { BsChildPic, BsChildName, BsChildCode, BsChildSku, BsChildMoney, BsChildNumber, BsChildShare, BsChildType } from "../common/index";
14
+ import { BsChildPic, BsChildName, BsChildCode, BsChildSku, BsChildMoney, BsChildShare, BsChildType } from "../common/index";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { BsGoods as Goods } from "@kmkf-fe-packages/basic-components";
17
17
  import { SYMBOL } from "../../../constant";
18
+ var childHeaderMap = {
19
+ pic: {
20
+ component: BsChildPic,
21
+ name: "图片"
22
+ },
23
+ name: {
24
+ component: BsChildName,
25
+ name: "名称"
26
+ },
27
+ code: {
28
+ component: BsChildCode,
29
+ name: "编码"
30
+ },
31
+ sku: {
32
+ component: BsChildSku,
33
+ name: "sku编码"
34
+ },
35
+ money: {
36
+ component: BsChildMoney,
37
+ name: "实付金额"
38
+ },
39
+ number: {
40
+ component: BsChildMoney,
41
+ name: "数量"
42
+ },
43
+ share: {
44
+ component: BsChildShare,
45
+ name: "分摊价"
46
+ },
47
+ type: {
48
+ component: BsChildType,
49
+ name: "赠品类型"
50
+ }
51
+
52
+ // return {
53
+ // name: new BsChildName({
54
+ // ...options,
55
+ // name: "名称",
56
+ // id: `${options.id}_bsGoods`,
57
+ // }),
58
+ // code: new BsChildCode({
59
+ // ...options,
60
+ // name: "编码",
61
+ // id: `${options.id}_bsGoods`,
62
+ // }),
63
+ // sku: new BsChildSku({
64
+ // ...options,
65
+ // name: "sku编码",
66
+ // id: `${options.id}_bsGoods`,
67
+ // }),
68
+ // money: new BsChildMoney({
69
+ // ...options,
70
+ // name: "实付金额",
71
+ // id: `${options.id}_bsGoods`,
72
+ // }),
73
+ // number: new BsChildNumber({
74
+ // ...options,
75
+ // name: "数量",
76
+ // id: `${options.id}_bsGoods`,
77
+ // }),
78
+ // share: new BsChildShare({
79
+ // ...options,
80
+ // name: "分摊价",
81
+ // id: `${options.id}_bsGoods`,
82
+ // }),
83
+ // type: new BsChildType({
84
+ // ...options,
85
+ // name: "赠品类型",
86
+ // id: `${options.id}_bsGoods`,
87
+ // }),
88
+ // };
89
+ };
18
90
  var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
19
91
  var _this = this,
92
+ _options$componentCon,
20
93
  _this$componentConfig2;
21
94
  _classCallCheck(this, BsGoods);
22
95
  _defineProperty(this, "name", void 0);
@@ -96,31 +169,15 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
96
169
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
97
170
  this.isCombinationComponent = false;
98
171
  this.canSort = false;
99
- this.children = [new BsChildPic(_objectSpread(_objectSpread({}, options), {}, {
100
- name: "bs图片",
101
- id: "".concat(options.id, "_bsGoods")
102
- })), new BsChildName(_objectSpread(_objectSpread({}, options), {}, {
103
- name: "名称",
104
- id: "".concat(options.id, "_bsGoods")
105
- })), new BsChildCode(_objectSpread(_objectSpread({}, options), {}, {
106
- name: "编码",
107
- id: "".concat(options.id, "_bsGoods")
108
- })), new BsChildSku(_objectSpread(_objectSpread({}, options), {}, {
109
- name: "sku编码",
110
- id: "".concat(options.id, "_bsGoods")
111
- })), new BsChildMoney(_objectSpread(_objectSpread({}, options), {}, {
112
- name: "实付金额",
113
- id: "".concat(options.id, "_bsGoods")
114
- })), new BsChildNumber(_objectSpread(_objectSpread({}, options), {}, {
115
- name: "数量",
116
- id: "".concat(options.id, "_bsGoods")
117
- })), new BsChildShare(_objectSpread(_objectSpread({}, options), {}, {
118
- name: "分摊价",
119
- id: "".concat(options.id, "_bsGoods")
120
- })), new BsChildType(_objectSpread(_objectSpread({}, options), {}, {
121
- name: "赠品类型",
122
- id: "".concat(options.id, "_bsGoods")
123
- }))];
172
+ this.children = [((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.reasonList) || []).reduce(function (prv, next) {
173
+ if (childHeaderMap[next]) {
174
+ prv.push(new childHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
175
+ name: childHeaderMap[next].name,
176
+ id: "".concat(options.id, "_bsGoods")
177
+ })));
178
+ }
179
+ return prv;
180
+ }, [])];
124
181
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
125
182
  this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
126
183
  required: true,
@@ -31,13 +31,14 @@ var TrajectoryCode = /*#__PURE__*/_createClass(function TrajectoryCode(options)
31
31
  _defineProperty(this, "renderCode", function (record) {
32
32
  var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
33
33
  var company = record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryCompany")];
34
+ var mobile = record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryPhone")];
34
35
  var code = record === null || record === void 0 ? void 0 : record[_this.id];
35
36
  return /*#__PURE__*/React.createElement("div", null, code ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
36
37
  title: code,
37
38
  modelWidth: w,
38
39
  interceptCompany: company,
39
40
  interceptCode: code,
40
- interceptSenderMobile: ""
41
+ interceptSenderMobile: mobile
41
42
  }) : "--");
42
43
  });
43
44
  _defineProperty(this, "renderClient", function (record) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.23",
3
+ "version": "0.7.15-alpha.26",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.23",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.23"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.26",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.26"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "9e7a956b3c1caa6e2e0395bc7e174593217728a8"
43
+ "gitHead": "1864859c358cb78f091b1fdca91c1d3171bd5584"
44
44
  }