@kmkf-fe-packages/services-components 2.0.19-beta.4 → 2.0.19-beta.41

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.
@@ -18,9 +18,14 @@ var getTemplate = function getTemplate(companyUserConfig) {
18
18
  };
19
19
  function useGetHasErpData(reduxData) {
20
20
  var companyUserConfig = useMemo(function () {
21
- var _ref, _reduxData$main$userI, _reduxData$main, _reduxData$workOrder, _userInfo$companyUser;
21
+ var _ref, _ref2, _reduxData$main$userI, _reduxData$main, _reduxData$workOrder, _reduxData$global, _userInfo$companyUser;
22
22
  // console.log("companyUserConfig--reduxData", reduxData);
23
- var userInfo = (_ref = (_reduxData$main$userI = reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : _reduxData$main.userInfo) !== null && _reduxData$main$userI !== void 0 ? _reduxData$main$userI : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : _reduxData$workOrder.userInfo) !== null && _ref !== void 0 ? _ref : {};
23
+ /**
24
+ * main - pc
25
+ * workOrder - 除千牛工作台外所有插件端
26
+ * global - 千牛工作台
27
+ * **/
28
+ var userInfo = (_ref = (_ref2 = (_reduxData$main$userI = reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : _reduxData$main.userInfo) !== null && _reduxData$main$userI !== void 0 ? _reduxData$main$userI : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : _reduxData$workOrder.userInfo) !== null && _ref2 !== void 0 ? _ref2 : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : _reduxData$global.userInfo) !== null && _ref !== void 0 ? _ref : {};
24
29
  var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
25
30
  if (typeof companyUserConfig === "string") {
26
31
  try {
@@ -41,7 +41,12 @@ var Global = function Global(_ref) {
41
41
  loading = _useState4[0],
42
42
  setLoading = _useState4[1];
43
43
  var reduxDataMap = useMemo(function () {
44
- sessionStorage.setItem("reduxData_test", JSON.stringify(reduxData));
44
+ try {
45
+ var _ref2, _ref3, _reduxData$main$userI, _reduxData$main, _reduxData$main$userI2, _reduxData$workOrder, _reduxData$workOrder$, _reduxData$global, _reduxData$global$use;
46
+ sessionStorage.setItem("companyKey_test", (_ref2 = (_ref3 = (_reduxData$main$userI = reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : (_reduxData$main$userI2 = _reduxData$main.userInfo) === null || _reduxData$main$userI2 === void 0 ? void 0 : _reduxData$main$userI2.companyKey) !== null && _reduxData$main$userI !== void 0 ? _reduxData$main$userI : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : (_reduxData$workOrder$ = _reduxData$workOrder.userInfo) === null || _reduxData$workOrder$ === void 0 ? void 0 : _reduxData$workOrder$.companyKey) !== null && _ref3 !== void 0 ? _ref3 : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : (_reduxData$global$use = _reduxData$global.userInfo) === null || _reduxData$global$use === void 0 ? void 0 : _reduxData$global$use.companyKey) !== null && _ref2 !== void 0 ? _ref2 : "");
47
+ } catch (error) {
48
+ console.log("companyKey_test_error", error);
49
+ }
45
50
  return reduxData;
46
51
  }, [JSON.stringify(reduxData)]);
47
52
  useEffect(function () {
@@ -73,7 +78,7 @@ var Global = function Global(_ref) {
73
78
  return "success";
74
79
  }, [globalState, logisticsCompanyState, sendDataState, addressDataState]);
75
80
  var reloadData = /*#__PURE__*/function () {
76
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
81
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
77
82
  return _regeneratorRuntime().wrap(function _callee$(_context) {
78
83
  while (1) switch (_context.prev = _context.next) {
79
84
  case 0:
@@ -119,11 +124,11 @@ var Global = function Global(_ref) {
119
124
  }, _callee);
120
125
  }));
121
126
  return function reloadData() {
122
- return _ref2.apply(this, arguments);
127
+ return _ref4.apply(this, arguments);
123
128
  };
124
129
  }();
125
130
  var initDataSource = /*#__PURE__*/function () {
126
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
131
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
127
132
  var mapping, mergeMapping, promises, _Object$keys, _Object$keys2, _Object$keys2$filter, _promises;
128
133
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
129
134
  while (1) switch (_context2.prev = _context2.next) {
@@ -171,7 +176,7 @@ var Global = function Global(_ref) {
171
176
  }, _callee2, null, [[4, 10]]);
172
177
  }));
173
178
  return function initDataSource() {
174
- return _ref3.apply(this, arguments);
179
+ return _ref5.apply(this, arguments);
175
180
  };
176
181
  }();
177
182
  if (allState === "loading") {
@@ -18,6 +18,7 @@ var componentType = {
18
18
  WDT_REISSUE_GOODS: "wdtSystemOrderNo",
19
19
  BS_E3_REISSUE_GOODS: "bsE3SystemOrderNo",
20
20
  GY_REISSUE_GOODS: "gySystemOrderNo",
21
+ GY_RETURN_GOODS: "gySystemOrderNo",
21
22
  JST_REISSUE_GOODS: "jstSystemOrderNo",
22
23
  JST_RETURN_GOODS: "jstSystemOrderNo"
23
24
  };
@@ -9,18 +9,20 @@ import bs_e3 from "./bs_e3";
9
9
  import bs from "./bs";
10
10
  import wdt from "./wdt";
11
11
  import gy from "./gy";
12
- import { getJstColumns } from "@kmkf-fe-packages/basic-components";
12
+ import { getJstColumns, getWlnColumns } from "@kmkf-fe-packages/basic-components";
13
13
  import defaultColumns from "./defaultColumns";
14
14
  export var getColumnsMap = function getColumnsMap(args) {
15
15
  var _ref = args || {},
16
16
  _ref$text = _ref.text,
17
17
  text = _ref$text === void 0 ? "" : _ref$text;
18
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
18
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
19
19
  text: text
20
20
  })), bs_e3()), wdt({
21
21
  text: text
22
22
  })), gy()), getJstColumns({
23
23
  disabled: true
24
+ })), getWlnColumns({
25
+ text: text
24
26
  })), {}, {
25
27
  default: defaultColumns({
26
28
  text: text
@@ -55,10 +55,13 @@ var getColumns = function getColumns(_ref) {
55
55
  }
56
56
  }, {
57
57
  dataIndex: "orderPrice",
58
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
58
+ title: "\u6210\u4EA4\u603B\u91D1\u989D",
59
59
  align: "center",
60
60
  ellipsis: true,
61
- width: 100
61
+ width: 100,
62
+ render: function render(val, record) {
63
+ return (record.num || record.num === 0) && (val || val === 0) ? val * record.num : null;
64
+ }
62
65
  }, {
63
66
  dataIndex: "num",
64
67
  title: "".concat(text, "\u6570\u91CF"),
@@ -69,9 +69,17 @@ var GoodHeaderMap = {
69
69
  },
70
70
  orderPrice: {
71
71
  component: BsHeaderChild,
72
- name: "实付总金额",
72
+ name: "成交总金额",
73
73
  key: "orderPrice",
74
- width: 100
74
+ width: 100,
75
+ transformValue: function transformValue(val, record, parentName) {
76
+ var num = record["".concat(parentName, "_num")];
77
+ return (num || num === 0) && (val || val === 0) ? val * num : null;
78
+ },
79
+ renderExport: function renderExport(val, record, parentName) {
80
+ var num = record["".concat(parentName, "_num")];
81
+ return (num || num === 0) && (val || val === 0) ? val * num : null;
82
+ }
75
83
  },
76
84
  num: {
77
85
  component: BsHeaderChild,
@@ -99,7 +107,7 @@ var GoodHeaderMap = {
99
107
  specId: "SKUID",
100
108
  specNo: "商品SKU编码",
101
109
  specName: "商品SKU名称",
102
- orderPrice: "实付总金额",
110
+ orderPrice: "成交总金额",
103
111
  num: "数量",
104
112
  sharePrice: "分摊价",
105
113
  giftType: "赠品方式"
@@ -1068,6 +1076,81 @@ var GoodHeaderMap = {
1068
1076
  remark: "备注"
1069
1077
  },
1070
1078
  moneyKey: "salePrice"
1079
+ },
1080
+ WLN_GOODS: {
1081
+ headerMap: {
1082
+ wlnItemName: {
1083
+ name: '商品名称',
1084
+ width: 250
1085
+ },
1086
+ goodsCode: {
1087
+ name: '商品编码',
1088
+ width: 250
1089
+ },
1090
+ skuCode: {
1091
+ name: 'sku编码',
1092
+ width: 250
1093
+ },
1094
+ skuName: {
1095
+ name: '线上sku名称',
1096
+ width: 250
1097
+ },
1098
+ olnSkuCode: {
1099
+ name: '线上sku编码',
1100
+ width: 150
1101
+ },
1102
+ sku: {
1103
+ name: '线上sku id',
1104
+ width: 150
1105
+ },
1106
+ name: {
1107
+ name: '线上商品名称',
1108
+ width: 250
1109
+ },
1110
+ pic: {
1111
+ name: '线上图片',
1112
+ width: 100,
1113
+ component: BsHeaderPic
1114
+ },
1115
+ olnItemCOde: {
1116
+ name: '线上商品编码',
1117
+ width: 150
1118
+ },
1119
+ code: {
1120
+ name: '线上商品id',
1121
+ width: 150
1122
+ },
1123
+ barCode: {
1124
+ name: '商品条码',
1125
+ width: 150
1126
+ },
1127
+ money: {
1128
+ name: '实付金额',
1129
+ width: 100
1130
+ },
1131
+ number: {
1132
+ name: '数量',
1133
+ width: 100
1134
+ },
1135
+ share: '应收款',
1136
+ type: {
1137
+ name: '赠品类型',
1138
+ width: 100
1139
+ },
1140
+ isPackage: {
1141
+ width: 100,
1142
+ name: "是否组合商品",
1143
+ transformValue: function transformValue(val) {
1144
+ if (isNull(val)) return '--';
1145
+ return val ? '是' : '否';
1146
+ },
1147
+ renderExport: function renderExport(val) {
1148
+ if (isNull(val)) return '--';
1149
+ return val ? '是' : '否';
1150
+ }
1151
+ }
1152
+ },
1153
+ moneyKey: "money"
1071
1154
  }
1072
1155
  };
1073
1156
  GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
@@ -17,6 +17,15 @@ import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
19
19
  import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ function toNum(value) {
21
+ if (typeof value === "string") {
22
+ return value ? +value : void 0;
23
+ }
24
+ if (typeof value === "number") {
25
+ return value;
26
+ }
27
+ return void 0;
28
+ }
20
29
  var typeMap = {
21
30
  GY_REISSUE_GOODS: {
22
31
  key: "gyReissueGoods",
@@ -24,7 +33,22 @@ var typeMap = {
24
33
  typeName: "gyReissueType",
25
34
  remark: "gyReissueType_memo",
26
35
  systemOrderNo: "gySystemOrderNo",
27
- errMsg: "请选择管易补发商品"
36
+ errMsg: "请选择管易补发商品",
37
+ validator: function validator(_rule, value) {
38
+ if (!_rule.required) return Promise.resolve();
39
+ var goodsName = "";
40
+ if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
41
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
42
+ var res = typeof qty === "number" ? qty < 1 : true;
43
+ if (res) {
44
+ goodsName = goods !== null && goods !== void 0 && goods.goodName ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : "";
45
+ }
46
+ return res;
47
+ })) {
48
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
49
+ }
50
+ return Promise.resolve();
51
+ }
28
52
  }
29
53
  };
30
54
  var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
@@ -33,7 +57,8 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
33
57
  _typeMap$options$type2,
34
58
  _typeMap$options$type3,
35
59
  _typeMap$options$type4,
36
- _this$componentConfig6;
60
+ _this$componentConfig6,
61
+ _typeMap$options$type7;
37
62
  _classCallCheck(this, GyReissue);
38
63
  _defineProperty(this, "name", void 0);
39
64
  _defineProperty(this, "id", void 0);
@@ -173,8 +198,9 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
173
198
  }));
174
199
  this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.reissueGoods];
175
200
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
176
- this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
177
- required: true,
201
+ var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
202
+ this.rules = [{
203
+ required: isRequired,
178
204
  validator: function validator(_, value) {
179
205
  var _value, _typeMap$options$type5;
180
206
  if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key)]) !== null && _value !== void 0 && _value.length)) {
@@ -183,7 +209,12 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
183
209
  }
184
210
  return Promise.resolve();
185
211
  }
186
- }] : [];
212
+ }, {
213
+ required: isRequired,
214
+ validator: ((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.validator) || function () {
215
+ return Promise.resolve();
216
+ }
217
+ }];
187
218
  this.dataType = "object";
188
219
  });
189
220
  export default GyReissue;
@@ -17,13 +17,37 @@ import { BsGoodsTable } from "../../Common";
17
17
  import CommonHeaderGoods from "../../CommonHeaderGood";
18
18
  import { GyReturn as Return } from "@kmkf-fe-packages/basic-components";
19
19
  import { BsType, SystemOrderNo } from "../../BS/common/index";
20
+ function toNum(value) {
21
+ if (typeof value === "string") {
22
+ return value ? +value : void 0;
23
+ }
24
+ if (typeof value === "number") {
25
+ return value;
26
+ }
27
+ return void 0;
28
+ }
20
29
  var typeMap = {
21
30
  GY_RETURN_GOODS: {
22
31
  key: "gyReturnGoods",
23
32
  name: "管易",
24
33
  typeName: "gyReturnType",
25
34
  systemOrderNo: "gySystemOrderNo",
26
- errMsg: "请选择管易退货商品"
35
+ errMsg: "请选择管易退货商品",
36
+ validator: function validator(_rule, value) {
37
+ if (!_rule.required) return Promise.resolve();
38
+ var goodsName = "";
39
+ if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
40
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
41
+ var res = typeof qty === "number" ? qty < 1 : true;
42
+ if (res) {
43
+ goodsName = goods !== null && goods !== void 0 && goods.goodName ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : "";
44
+ }
45
+ return res;
46
+ })) {
47
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
48
+ }
49
+ return Promise.resolve();
50
+ }
27
51
  }
28
52
  };
29
53
  var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
@@ -31,7 +55,8 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
31
55
  _typeMap$options$type,
32
56
  _typeMap$options$type2,
33
57
  _typeMap$options$type3,
34
- _this$componentConfig6;
58
+ _this$componentConfig6,
59
+ _typeMap$options$type6;
35
60
  _classCallCheck(this, GyReturn);
36
61
  _defineProperty(this, "name", void 0);
37
62
  _defineProperty(this, "id", void 0);
@@ -165,8 +190,9 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
165
190
  }));
166
191
  this.children = [this.gyType, this.systemOrderNo, this.returnGoods];
167
192
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
168
- this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
169
- required: true,
193
+ var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
194
+ this.rules = [{
195
+ required: isRequired,
170
196
  validator: function validator(_, value) {
171
197
  var _value, _typeMap$options$type4;
172
198
  if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key)]) !== null && _value !== void 0 && _value.length)) {
@@ -175,7 +201,12 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
175
201
  }
176
202
  return Promise.resolve();
177
203
  }
178
- }] : [];
204
+ }, {
205
+ required: isRequired,
206
+ validator: ((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.validator) || function () {
207
+ return Promise.resolve();
208
+ }
209
+ }];
179
210
  this.dataType = "object";
180
211
  });
181
212
  export default GyReturn;
@@ -18,6 +18,14 @@ export var getSelectTypeAttribute = function getSelectTypeAttribute(_ref) {
18
18
  color: "#ff4d4f"
19
19
  }]
20
20
  };
21
+ if (key === "agreeRefundStatusValue") {
22
+ var _dataMap$options;
23
+ dataMap === null || dataMap === void 0 ? void 0 : (_dataMap$options = dataMap.options) === null || _dataMap$options === void 0 ? void 0 : _dataMap$options.push({
24
+ value: "".concat(text, "\u62C6\u5355\u9000\u6B3E\u4E2D"),
25
+ label: "".concat(text, "\u62C6\u5355\u9000\u6B3E\u4E2D"),
26
+ color: "#1890ff"
27
+ });
28
+ }
21
29
  dataMap["failValue"] = dataMap.options[failValueIndex].value;
22
30
  return dataMap;
23
31
  };
@@ -1,6 +1,6 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
2
  import React from "react";
3
- import { BsHeaderGood } from "../../BS/common/index";
3
+ import CommonHeaderGoods from "../../CommonHeaderGood";
4
4
  declare class WlnGoods implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
@@ -14,7 +14,7 @@ declare class WlnGoods implements ComponentInterface {
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
16
  dataType: ComponentInterface["dataType"];
17
- wlnGoods: BsHeaderGood;
17
+ wlnGoods: CommonHeaderGoods;
18
18
  constructor(options: PickOption);
19
19
  renderClient: (record: any) => React.JSX.Element | null;
20
20
  renderPc: () => null;
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import { BsGoodsTable } from "../../Common";
14
- import { BsHeaderGood } from "../../BS/common/index";
14
+ import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { WlnGoods as Goods } from "@kmkf-fe-packages/basic-components";
@@ -40,7 +40,8 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
40
40
  label: _this.name,
41
41
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
42
42
  list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.wlnGoods) || [],
43
- showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
43
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || [],
44
+ type: _this.type
44
45
  })
45
46
  })) : null;
46
47
  });
@@ -52,7 +53,8 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
52
53
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wlnGoods")])) return null;
53
54
  return /*#__PURE__*/React.createElement(BsGoodsTable, {
54
55
  list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wlnGoods")]) || [],
55
- showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
56
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
57
+ type: _this.type
56
58
  });
57
59
  });
58
60
  _defineProperty(this, "getComponentValue", function (r) {
@@ -76,7 +78,8 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
76
78
  shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
77
79
  shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
78
80
  companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
79
- width: "90%"
81
+ width: "90%",
82
+ type: _this.type
80
83
  }))
81
84
  });
82
85
  });
@@ -99,7 +102,7 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
99
102
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
100
103
  this.isCombinationComponent = true;
101
104
  this.canSort = false;
102
- this.wlnGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
105
+ this.wlnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
103
106
  id: "".concat(options.id, "_wlnGoods"),
104
107
  name: "商品信息"
105
108
  }));
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => GyReturn | JstSendGood | LogisticsInterception | LogisticsMoreInterception | MsgStatus | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue;
3
+ export declare const factory: (type: string, options: PickOption) => GyReissue | GyReturn | JstSendGood | MsgStatus | WlnGoods | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.19-beta.4",
3
+ "version": "2.0.19-beta.41",
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": "2.0.19-beta.4",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.19-beta.4",
24
+ "@kmkf-fe-packages/basic-components": "2.0.19-beta.41",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.19-beta.39",
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": "cc4d5c45c3bf3a90837ab38528d87371ca98d79c",
44
+ "gitHead": "9c881a051621adc86272f18c385de54a784e3e11",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- var react_1 = require("react");
5
- var react_redux_1 = require("react-redux");
6
- var toolkit_1 = require("@reduxjs/toolkit");
7
- var getTemplate = function getTemplate(companyUserConfig) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
9
- return JSON.stringify({
10
- hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
11
- hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
12
- hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
13
- hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
14
- hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
15
- hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
16
- });
17
- };
18
- function useGetHasErpData() {
19
- var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
20
- var _a, _b, _c, _d;
21
- console.log("state--useSelector", state);
22
- /**
23
- * pc main
24
- * 端 workOrder
25
- * **/
26
- return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
27
- }], function (state) {
28
- var _a;
29
- var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
30
- if (typeof companyUserConfig === "string") {
31
- try {
32
- companyUserConfig = JSON.parse(companyUserConfig);
33
- } catch (e) {
34
- console.error("companyUserConfig转换异常", companyUserConfig);
35
- companyUserConfig = {};
36
- }
37
- }
38
- return companyUserConfig;
39
- }));
40
- var _a = react_1.useState(getTemplate({})),
41
- hasErpDataJson = _a[0],
42
- setHasErpDataJson = _a[1];
43
- react_1.useEffect(function () {
44
- setHasErpDataJson(getTemplate(companyUserConfig));
45
- console.log("companyUserConfig---", companyUserConfig);
46
- }, [companyUserConfig]);
47
- var hasErpData = react_1.useMemo(function () {
48
- return JSON.parse(hasErpDataJson);
49
- }, [hasErpDataJson]);
50
- return hasErpData;
51
- }
52
- exports["default"] = useGetHasErpData;