@kmkf-fe-packages/services-components 0.7.15-alpha.80 → 0.7.15-alpha.81

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.
@@ -10,7 +10,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
10
10
  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); }
11
11
  import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
- import { BsGoodsTable, BsExchangeList } from "../../Common";
13
+ import { BsGoodsTable } from "../../Common";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { BsExchange as Exchange } from "@kmkf-fe-packages/basic-components";
@@ -163,23 +163,25 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
163
163
  _defineProperty(this, "swapOutGoods", void 0);
164
164
  _defineProperty(this, "giftGoods", void 0);
165
165
  _defineProperty(this, "renderClient", function (record) {
166
- var _record, _record$bsExchangeTyp, _this$componentConfig, _record2, _record2$bsExchangeTy, _this$componentConfig2, _record3, _record3$bsExchangeTy, _this$componentConfig3;
167
- 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), ["1", "3"].includes(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : (_record$bsExchangeTyp = _record.bsExchangeType) === null || _record$bsExchangeTyp === void 0 ? void 0 : _record$bsExchangeTyp[0]) ? /*#__PURE__*/React.createElement(ItemView, {
166
+ var _this$componentConfig, _this$componentConfig2, _record, _record$bsExchangeTyp, _this$componentConfig3;
167
+ var bsExchangeReturnGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeReturnGoods")]) || "[]");
168
+ var bsExchangeSwapOutGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeSwapOutGoods")]) || "[]");
169
+ 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), /*#__PURE__*/React.createElement(ItemView, {
168
170
  id: _this.id,
169
- label: "".concat(_this.name),
171
+ label: "".concat(_this.name, "-\u9000\u56DE"),
170
172
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
171
- list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeReturnGoods) || [],
173
+ list: bsExchangeReturnGoods || [],
172
174
  showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
173
175
  })
174
- }) : null, ["2", "4"].includes(record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : (_record2$bsExchangeTy = _record2.bsExchangeType) === null || _record2$bsExchangeTy === void 0 ? void 0 : _record2$bsExchangeTy[0]) ? /*#__PURE__*/React.createElement(ItemView, {
175
- id: _this.id,
176
- label: "".concat(_this.name),
177
- value: /*#__PURE__*/React.createElement(BsExchangeList, {
178
- list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeSwapOutGoods) || [],
176
+ }), /*#__PURE__*/React.createElement(ItemView, {
177
+ id: "".concat(_this.id, "-out"),
178
+ label: "".concat(_this.name, "-\u6362\u51FA"),
179
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
180
+ list: bsExchangeSwapOutGoods || [],
179
181
  showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
180
182
  })
181
- }) : null, ["3", "4"].includes(record === null || record === void 0 ? void 0 : (_record3 = record["".concat(_this.id)]) === null || _record3 === void 0 ? void 0 : (_record3$bsExchangeTy = _record3.bsExchangeType) === null || _record3$bsExchangeTy === void 0 ? void 0 : _record3$bsExchangeTy[0]) ? /*#__PURE__*/React.createElement(ItemView, {
182
- id: _this.id,
183
+ }), ["3", "4"].includes(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : (_record$bsExchangeTyp = _record.bsExchangeType) === null || _record$bsExchangeTyp === void 0 ? void 0 : _record$bsExchangeTyp[0]) && record !== null && record !== void 0 && record["".concat(_this.id)].bsExchangeGiftGoods.length ? /*#__PURE__*/React.createElement(ItemView, {
184
+ id: "".concat(_this.id, "-gift"),
183
185
  label: "".concat(_this.name, "-\u8D60\u54C1"),
184
186
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
185
187
  list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeGiftGoods) || [],
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
- import React from 'react';
3
- import { BsType, BsMemo, BsHeaderGood } from '../common/index';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import { BsType, BsMemo, BsHeaderGood } from "../common/index";
4
4
  declare class BsReissue implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface['componentConfig'];
11
- effects: ComponentInterface['effects'];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ effects: ComponentInterface["effects"];
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
- dataType: ComponentInterface['dataType'];
16
+ dataType: ComponentInterface["dataType"];
17
17
  bsType: BsType;
18
18
  bsMemo: BsMemo;
19
19
  reissueGoods: BsHeaderGood;
@@ -8,54 +8,54 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
11
+ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
- import { BsReissue as Reissue } from '@kmkf-fe-packages/basic-components';
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common";
18
18
  import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType, BsHeaderGood } from "../common/index";
19
19
  var childHeaderMap = {
20
20
  pic: {
21
21
  component: BsHeaderPic,
22
- name: '图片',
23
- key: 'pic'
22
+ name: "图片",
23
+ key: "pic"
24
24
  },
25
25
  name: {
26
26
  component: BsHeaderName,
27
- name: '名称',
28
- key: 'name'
27
+ name: "名称",
28
+ key: "name"
29
29
  },
30
30
  code: {
31
31
  component: BsHeaderCode,
32
- name: '编码',
33
- key: 'code'
32
+ name: "编码",
33
+ key: "code"
34
34
  },
35
35
  sku: {
36
36
  component: BsHeaderSku,
37
- name: 'sku编码',
38
- key: 'sku'
37
+ name: "sku编码",
38
+ key: "sku"
39
39
  },
40
40
  money: {
41
41
  component: BsHeaderMoney,
42
- name: '实付金额',
43
- key: 'money'
42
+ name: "实付金额",
43
+ key: "money"
44
44
  },
45
45
  number: {
46
46
  component: BsHeaderNumber,
47
- name: '数量',
48
- key: 'number'
47
+ name: "数量",
48
+ key: "number"
49
49
  },
50
50
  share: {
51
51
  component: BsHeaderShare,
52
- name: '分摊价',
53
- key: 'share'
52
+ name: "分摊价",
53
+ key: "share"
54
54
  },
55
55
  type: {
56
56
  component: BsHeaderType,
57
- name: '赠品类型',
58
- key: 'giftType'
57
+ name: "赠品类型",
58
+ key: "giftType"
59
59
  }
60
60
  };
61
61
  var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
@@ -79,15 +79,15 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
79
79
  _defineProperty(this, "reissueGoods", void 0);
80
80
  _defineProperty(this, "renderClient", function (record) {
81
81
  var _this$componentConfig;
82
- console.log('bsreissue', record);
83
- 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), /*#__PURE__*/React.createElement(ItemView, {
82
+ console.log("bsreissue", record);
83
+ 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), record !== null && record !== void 0 && record["".concat(_this.id)].bsReissueGoods.length ? /*#__PURE__*/React.createElement(ItemView, {
84
84
  id: _this.id,
85
85
  label: _this.name,
86
86
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
87
87
  list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsReissueGoods) || [],
88
88
  showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
89
89
  })
90
- })) : null;
90
+ }) : null) : null;
91
91
  });
92
92
  _defineProperty(this, "renderPc", function () {
93
93
  return null;
@@ -124,13 +124,13 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
124
124
  type: item.type,
125
125
  id: "".concat(item.id, "_bsReissueType"),
126
126
  name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
127
- filterComponentType: 'Cascader',
127
+ filterComponentType: "Cascader",
128
128
  props: {
129
129
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
130
130
  fieldNames: {
131
- label: 'label',
132
- value: 'value',
133
- children: 'children'
131
+ label: "label",
132
+ value: "value",
133
+ children: "children"
134
134
  }
135
135
  },
136
136
  formatFilterValue: function formatFilterValue(val) {
@@ -148,7 +148,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
148
148
  type: item.type,
149
149
  id: "".concat(item.id, "_bsReissueGoods"),
150
150
  name: "".concat(_this.name),
151
- filterComponentType: 'Input'
151
+ filterComponentType: "Input"
152
152
  }];
153
153
  });
154
154
  this.name = options.name;
@@ -161,15 +161,15 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
161
161
  this.canSort = false;
162
162
  this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
163
163
  id: "".concat(options.id, "_bsReissueType_type"),
164
- name: '补发类型'
164
+ name: "补发类型"
165
165
  }));
166
166
  this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
167
167
  id: "".concat(options.id, "_bsReissueType_memo"),
168
- name: '补发备注'
168
+ name: "补发备注"
169
169
  }));
170
170
  this.reissueGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
171
171
  id: "".concat(options.id, "_bsReissueGoods"),
172
- name: '商品信息'
172
+ name: "商品信息"
173
173
  }));
174
174
  this.children = [this.bsType, this.bsMemo, this.reissueGoods
175
175
  // ...(options?.componentConfig?.showHeader || []).reduce(
@@ -195,11 +195,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
195
195
  validator: function validator(_, value) {
196
196
  var _value$bsReissueGoods;
197
197
  if (!value || !(value !== null && value !== void 0 && (_value$bsReissueGoods = value.bsReissueGoods) !== null && _value$bsReissueGoods !== void 0 && _value$bsReissueGoods.length)) {
198
- return Promise.reject(new Error('请选择bs补发商品'));
198
+ return Promise.reject(new Error("请选择bs补发商品"));
199
199
  }
200
200
  return Promise.resolve();
201
201
  }
202
202
  }] : [];
203
- this.dataType = 'object';
203
+ this.dataType = "object";
204
204
  });
205
205
  export default BsReissue;
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsExchange | BasicFile | JstLogistics | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsReissue | BuyerNick | BasicCascader | BasicCheckbox | CommonDataTime | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowStatusSelect | FlowWorkOrderId | BasicGrade | Handler | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsTrajectory | BasicMultSelect | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WorkOrderId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.80",
3
+ "version": "0.7.15-alpha.81",
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.80",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.80"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.81",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.81"
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": "e6ac39ff8747f20ae01cfe55783171f7eafb6143"
43
+ "gitHead": "c37ab9de56ecb7357a7a3aa21d9e1cf66931e8ca"
44
44
  }