@kmkf-fe-packages/services-components 2.0.69 → 2.0.71

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.
@@ -24,7 +24,8 @@ var componentType = {
24
24
  GY_REISSUE_GOODS: "gyReissueType",
25
25
  GY_RETURN_GOODS: "gyReturnType",
26
26
  JST_REISSUE_GOODS: "jstReissueType",
27
- JST_RETURN_GOODS: "jstReturnType"
27
+ JST_RETURN_GOODS: "jstReturnType",
28
+ KM_REISSUE_GOODS: "kmReissueType"
28
29
  };
29
30
  var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
30
31
  var _this = this;
@@ -25,7 +25,8 @@ var componentType = {
25
25
  GY_REISSUE_GOODS: "gyReissueType",
26
26
  GY_RETURN_GOODS: "gyReturnType",
27
27
  JST_REISSUE_GOODS: "jstReissueType",
28
- JST_RETURN_GOODS: "jstReturnType"
28
+ JST_RETURN_GOODS: "jstReturnType",
29
+ KM_REISSUE_GOODS: "kmReissueType"
29
30
  };
30
31
  var BsType = /*#__PURE__*/_createClass(function BsType(options) {
31
32
  var _this = this;
@@ -20,7 +20,8 @@ var componentType = {
20
20
  GY_REISSUE_GOODS: "gySystemOrderNo",
21
21
  GY_RETURN_GOODS: "gySystemOrderNo",
22
22
  JST_REISSUE_GOODS: "jstSystemOrderNo",
23
- JST_RETURN_GOODS: "jstSystemOrderNo"
23
+ JST_RETURN_GOODS: "jstSystemOrderNo",
24
+ KM_REISSUE_GOODS: "kmSystemOrderNo"
24
25
  };
25
26
  var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
26
27
  var _this = this;
@@ -1206,6 +1206,68 @@ var GoodHeaderMap = {
1206
1206
  }
1207
1207
  },
1208
1208
  moneyKey: "money"
1209
+ },
1210
+ KM_REISSUE_GOODS: {
1211
+ headerMap: {
1212
+ sysSkuPropertiesName: {
1213
+ name: "规格名称",
1214
+ width: 250
1215
+ },
1216
+ sysTitle: {
1217
+ name: "系统商品名称",
1218
+ width: 150
1219
+ },
1220
+ shortTitle: {
1221
+ name: "商品简称",
1222
+ width: 150
1223
+ },
1224
+ title: {
1225
+ name: "平台商品名称",
1226
+ width: 150
1227
+ },
1228
+ outerId: {
1229
+ name: "商家编码",
1230
+ width: 150
1231
+ },
1232
+ sysOuterId: {
1233
+ name: "系统商家编码",
1234
+ width: 150
1235
+ },
1236
+ itemSysId: {
1237
+ name: "系统商品ID",
1238
+ width: 150
1239
+ },
1240
+ skuSysId: {
1241
+ name: "系统规格ID",
1242
+ width: 150
1243
+ },
1244
+ realNum: {
1245
+ name: "实际补发数量",
1246
+ width: 150
1247
+ },
1248
+ desiredNum: {
1249
+ name: "应补发数量",
1250
+ width: 150
1251
+ },
1252
+ price: {
1253
+ name: "商品销售价",
1254
+ width: 150
1255
+ },
1256
+ payment: {
1257
+ name: "实付金额",
1258
+ width: 150
1259
+ },
1260
+ type: {
1261
+ name: "商品类型",
1262
+ width: 150
1263
+ },
1264
+ sysPicPath: {
1265
+ name: "商品图片",
1266
+ width: 100,
1267
+ component: BsHeaderPic
1268
+ }
1269
+ },
1270
+ moneyKey: "money"
1209
1271
  }
1210
1272
  };
1211
1273
  GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
@@ -1,6 +1,6 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
2
  import React from "react";
3
- import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
3
+ import { BsType, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
4
4
  import SystemOrderType from "../SystemOrderType";
5
5
  import CommonHeaderGoods from "../../CommonHeaderGood";
6
6
  declare class PublicReissue implements ComponentInterface {
@@ -17,9 +17,8 @@ declare class PublicReissue implements ComponentInterface {
17
17
  children: ComponentInterface[];
18
18
  dataType: ComponentInterface["dataType"];
19
19
  bsType: BsType;
20
- bsMemo: BsMemo;
21
20
  systemOrderNo: SystemOrderNo;
22
- systemOrderType: SystemOrderType;
21
+ systemOrderType?: SystemOrderType;
23
22
  goods: BsHeaderGood | CommonHeaderGoods;
24
23
  constructor(options: PickOption);
25
24
  renderClient: (record: any) => React.JSX.Element | null;
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import { PublicReissue as Reissue, erpFormValidator } from "@kmkf-fe-packages/basic-components";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
- import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
18
+ import { BsType, SystemOrderNo } from "../../BS/common/index";
19
19
  import SystemOrderType from "../SystemOrderType";
20
20
  import CommonHeaderGoods from "../../CommonHeaderGood";
21
21
  var typeMap = {
@@ -28,6 +28,7 @@ var typeMap = {
28
28
  errMsg: "请选择聚水潭补发商品",
29
29
  name: "聚水潭",
30
30
  compType: "补发",
31
+ hasSystemOrderType: true,
31
32
  validator: function validator(_rule, value, type) {
32
33
  if (!_rule.required) return Promise.resolve();
33
34
  var validatorFlag = erpFormValidator(_rule, value, type);
@@ -46,6 +47,25 @@ var typeMap = {
46
47
  errMsg: "请选择聚水潭退货商品",
47
48
  name: "聚水潭",
48
49
  compType: "退货",
50
+ hasSystemOrderType: true,
51
+ validator: function validator(_rule, value, type) {
52
+ if (!_rule.required) return Promise.resolve();
53
+ var validatorFlag = erpFormValidator(_rule, value, type);
54
+ if (validatorFlag) {
55
+ return validatorFlag;
56
+ }
57
+ return Promise.resolve();
58
+ }
59
+ },
60
+ KM_REISSUE_GOODS: {
61
+ key: "kmReissueGoods",
62
+ typeName: "kmReissueType",
63
+ remark: "kmReissueType_memo",
64
+ systemOrderNo: "kmSystemOrderNo",
65
+ systemOrderBillType: "kmSystemOrderBillType",
66
+ errMsg: "请选择快麦补发商品",
67
+ name: "快麦",
68
+ compType: "补发",
49
69
  validator: function validator(_rule, value, type) {
50
70
  if (!_rule.required) return Promise.resolve();
51
71
  var validatorFlag = erpFormValidator(_rule, value, type);
@@ -68,8 +88,6 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
68
88
  _typeMap$options$type8,
69
89
  _typeMap$options$type9,
70
90
  _typeMap$options$type10,
71
- _typeMap$options$type11,
72
- _typeMap$options$type12,
73
91
  _this$componentConfig6;
74
92
  _classCallCheck(this, PublicReissue);
75
93
  _defineProperty(this, "name", void 0);
@@ -85,13 +103,12 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
85
103
  _defineProperty(this, "children", void 0);
86
104
  _defineProperty(this, "dataType", void 0);
87
105
  _defineProperty(this, "bsType", void 0);
88
- _defineProperty(this, "bsMemo", void 0);
89
106
  _defineProperty(this, "systemOrderNo", void 0);
90
107
  _defineProperty(this, "systemOrderType", void 0);
91
108
  _defineProperty(this, "goods", void 0);
92
109
  _defineProperty(this, "renderClient", function (record) {
93
110
  var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
94
- return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
111
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.systemOrderNo.renderClient(record), _this.systemOrderType && _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
95
112
  id: _this.id,
96
113
  label: _this.name,
97
114
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
@@ -106,7 +123,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
106
123
  });
107
124
  _defineProperty(this, "renderLog", function (r) {
108
125
  var _r, _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5, _r2, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8, _this$componentConfig2;
109
- return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.compType, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
126
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] && _this.systemOrderType ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.compType, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
110
127
  list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)]) || [],
111
128
  showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
112
129
  type: _this.type
@@ -201,36 +218,32 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
201
218
  id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.systemOrderNo),
202
219
  name: "".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.name).concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.compType, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")
203
220
  }));
204
- this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
205
- id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.remark),
206
- name: "".concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.name).concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.compType, "\u5907\u6CE8")
207
- }));
208
- this.systemOrderType = new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
209
- id: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.systemOrderBillType),
210
- name: "".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
211
- }));
221
+ this.systemOrderType = (_typeMap$options$type7 = typeMap[options.type]) !== null && _typeMap$options$type7 !== void 0 && _typeMap$options$type7.hasSystemOrderType ? new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
222
+ id: "".concat(options.id, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.systemOrderBillType),
223
+ name: "".concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
224
+ })) : undefined;
212
225
  this.goods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
213
- id: "".concat(options.id, "_").concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.key),
226
+ id: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.key),
214
227
  name: "商品信息"
215
228
  }));
216
- this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.systemOrderType, this.goods];
229
+ this.children = [this.bsType, this.systemOrderNo, this.systemOrderType, this.goods].filter(Boolean);
217
230
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
218
231
  var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
219
232
  this.rules = [{
220
233
  required: isRequired,
221
234
  validator: function validator(_, value) {
222
- var _value, _typeMap$options$type13;
223
- if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : _typeMap$options$type13.key)]) !== null && _value !== void 0 && _value.length))) {
224
- var _typeMap$options$type14;
225
- return Promise.reject(new Error("".concat((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : _typeMap$options$type14.errMsg)));
235
+ var _value, _typeMap$options$type11;
236
+ if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.key)]) !== null && _value !== void 0 && _value.length))) {
237
+ var _typeMap$options$type12;
238
+ return Promise.reject(new Error("".concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.errMsg)));
226
239
  }
227
240
  return Promise.resolve();
228
241
  }
229
242
  }, {
230
243
  required: isRequired,
231
244
  validator: function validator(_rule, value) {
232
- var _typeMap$options$type15, _typeMap$options$type16;
233
- return ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : (_typeMap$options$type16 = _typeMap$options$type15.validator) === null || _typeMap$options$type16 === void 0 ? void 0 : _typeMap$options$type16.call(_typeMap$options$type15, _rule, value, options.type)) || function () {
245
+ var _typeMap$options$type13, _typeMap$options$type14;
246
+ return ((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : (_typeMap$options$type14 = _typeMap$options$type13.validator) === null || _typeMap$options$type14 === void 0 ? void 0 : _typeMap$options$type14.call(_typeMap$options$type13, _rule, value, options.type)) || function () {
234
247
  return Promise.resolve();
235
248
  };
236
249
  }
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare class ThirdItemSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -12,7 +12,7 @@ declare class ThirdItemSelect implements ComponentInterface {
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
15
+ dataType: ComponentInterface["dataType"];
16
16
  sortChildField: {
17
17
  name: string;
18
18
  key: string;
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  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); }
9
- import React from 'react';
9
+ import React from "react";
10
10
  import GetFormItem from "../GetFormItem";
11
11
  import ItemEncode from "./ItemEncode";
12
12
  import { GoodImage } from "../Common";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import { SYMBOL } from "../../constant";
16
16
  var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
17
17
  var _this = this,
@@ -33,12 +33,12 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
33
33
  _defineProperty(this, "getSortChildFields", function () {
34
34
  var _this$componentConfig, _this$componentConfig2;
35
35
  return [{
36
- name: '供应商编码',
36
+ name: "供应商编码",
37
37
  key: "".concat(_this.id, "_itemId"),
38
38
  dataType: "arrayObject",
39
39
  disabled: !((_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.enableItemId)
40
40
  }, {
41
- name: '供应商名称',
41
+ name: "供应商名称",
42
42
  key: "".concat(_this.id, "_supplierName"),
43
43
  dataType: "arrayObject",
44
44
  disabled: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableSupplierName)
@@ -77,10 +77,10 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
77
77
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")];
78
78
  });
79
79
  _defineProperty(this, "renderExport", function (value, record) {
80
- var _ref;
81
- return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
82
- return "\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || item.supplierItemOuterId || '', "\n\u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || '');
83
- });
80
+ var _ref, _ref$map;
81
+ return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : (_ref$map = _ref.map(function (item) {
82
+ return "\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || item.supplierItemOuterId || "", " \u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || "");
83
+ })) === null || _ref$map === void 0 ? void 0 : _ref$map.join(" ");
84
84
  });
85
85
  _defineProperty(this, "editRender", function (p) {
86
86
  var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2;
@@ -91,7 +91,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
91
91
  required: false,
92
92
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
93
93
  display: p === null || p === void 0 ? void 0 : p.display,
94
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
94
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
95
95
  component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
96
96
  maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
97
97
  type: 4,
@@ -109,11 +109,11 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
109
109
  // 过滤组件id
110
110
  name: item.name,
111
111
  // 过滤组件名称
112
- filterComponentType: 'Input',
112
+ filterComponentType: "Input",
113
113
  filterFn: function filterFn(value) {
114
114
  return function (i) {
115
115
  var _ref2;
116
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'itemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
116
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "itemList") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
117
117
  var _String, _String2;
118
118
  var id = item !== null && item !== void 0 && item.itemId ? (_String = String(item === null || item === void 0 ? void 0 : item.itemId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
119
119
  var name = item !== null && item !== void 0 && item.supplierName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplierName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
@@ -123,7 +123,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
123
123
  }
124
124
  };
125
125
  });
126
- this.name = options.name || '供应商编码/名称';
126
+ this.name = options.name || "供应商编码/名称";
127
127
  this.id = options.id;
128
128
  this.sortField = "".concat(options.id, "_itemList");
129
129
  this.formField = "".concat(options.id, "_itemList");
@@ -133,25 +133,25 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
133
133
  this.isCombinationComponent = false;
134
134
  this.canSort = false;
135
135
  this.children = [];
136
- this.dataType = 'array';
136
+ this.dataType = "array";
137
137
  this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
138
138
  required: true,
139
139
  validator: function validator(_, value) {
140
140
  var _this$componentConfig7, _this$componentConfig8;
141
141
  if (!value || !value.length) {
142
- return Promise.reject(new Error('请选择宝贝'));
142
+ return Promise.reject(new Error("请选择宝贝"));
143
143
  }
144
144
  var hasNotId = (value || []).some(function (item) {
145
145
  return !item.itemId && !item.supplierItemOuterId;
146
146
  });
147
147
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableItemId && hasNotId) {
148
- return Promise.reject(new Error('请输入供应商编码'));
148
+ return Promise.reject(new Error("请输入供应商编码"));
149
149
  }
150
150
  var hasNotName = (value || []).some(function (item) {
151
151
  return !item.supplierName;
152
152
  });
153
153
  if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.enableSupplierName && hasNotName) {
154
- return Promise.reject(new Error('请输入供应商名称'));
154
+ return Promise.reject(new Error("请输入供应商名称"));
155
155
  }
156
156
  return Promise.resolve();
157
157
  }
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, 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, AsyncSelect, WdtShopSelect } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BuyerNick | CommonSystemOrder | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | 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 | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect;
3
+ export declare const factory: (type: string, options: PickOption) => BuyerNick | ItemEnCode | GyReissue | JstSendGood | LogisticsInterception | MsgStatus | PublicReissueGoods | ThirdItemSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreInterception | 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 | WdtShopSelect | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReturn | AsyncSelect;
@@ -161,6 +161,7 @@ export var factory = function factory(type, options) {
161
161
  case "JST_GOODS":
162
162
  return new PublicGoods(options);
163
163
  case "JST_REISSUE_GOODS":
164
+ case "KM_REISSUE_GOODS":
164
165
  return new PublicReissueGoods(options);
165
166
  case "BS_E3_REISSUE_GOODS":
166
167
  return new BsE3Reissue(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.69",
3
+ "version": "2.0.71",
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.69",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.69",
24
+ "@kmkf-fe-packages/basic-components": "2.0.71",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.71",
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": "849c6b27a93834b71ca0c08e426b60e62a9085ef",
44
+ "gitHead": "d3bc7172b07c7e0bb641de84d3f696d7e4332096",
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;