@kmkf-fe-packages/services-components 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,7 +141,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
141
141
  this.isCombinationComponent = true;
142
142
  this.canSort = false;
143
143
  this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
144
- id: "".concat(options.id, "_bsExchangeType_type"),
144
+ id: "".concat(options.id, "_bsExchangeType"),
145
145
  name: '换货类型'
146
146
  }));
147
147
  this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
@@ -117,7 +117,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
117
117
  this.isCombinationComponent = true;
118
118
  this.canSort = false;
119
119
  this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
120
- id: "".concat(options.id, "_bsReissueType_type"),
120
+ id: "".concat(options.id, "_bsReissueType"),
121
121
  name: '补发类型'
122
122
  }));
123
123
  this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
@@ -87,11 +87,11 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
87
87
  _defineProperty(this, "filterConfig", function (item) {
88
88
  var _item$config;
89
89
  var subKey = item.subKey;
90
- console.log('bsTypefilterConfig', item);
90
+ var id = _this.getParentId();
91
91
  return {
92
92
  searchDefaultConditions: SYMBOL.in,
93
93
  type: item.type,
94
- id: item.id,
94
+ id: _this.id,
95
95
  name: "".concat(item.name, "-\u7C7B\u578B"),
96
96
  filterComponentType: 'Cascader',
97
97
  props: {
@@ -16,6 +16,7 @@ declare class AlipayTime implements ComponentInterface {
16
16
  dataType: ComponentInterface['dataType'];
17
17
  format: ComponentInterface['format'];
18
18
  constructor(options: PickOption);
19
+ dateTimeTrans: (v: number | string) => string;
19
20
  renderClient: (record: Record) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => any;
21
22
  renderLog: (r: Record) => any;
@@ -29,11 +29,23 @@ var AlipayTime = /*#__PURE__*/_createClass(function AlipayTime(options) {
29
29
  _defineProperty(this, "children", void 0);
30
30
  _defineProperty(this, "dataType", void 0);
31
31
  _defineProperty(this, "format", void 0);
32
+ _defineProperty(this, "dateTimeTrans", function (v) {
33
+ if (typeof v === 'number') {
34
+ return moment(v).format('YYYY-MM-DD HH:mm:ss');
35
+ }
36
+ if (typeof v === 'string') {
37
+ if (/^\d+$/.test(v)) {
38
+ return moment(Number(v)).format('YYYY-MM-DD HH:mm:ss');
39
+ }
40
+ return v;
41
+ }
42
+ return v;
43
+ });
32
44
  _defineProperty(this, "renderClient", function (record) {
33
45
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
34
46
  id: _this.id,
35
47
  label: _this.name,
36
- value: record !== null && record !== void 0 && record[_this.id] ? moment(record === null || record === void 0 ? void 0 : record[_this.id]).format('YYYY-MM-DD HH:mm:ss') : '--'
48
+ value: record !== null && record !== void 0 && record[_this.id] ? _this.dateTimeTrans(record === null || record === void 0 ? void 0 : record[_this.id]) : '--'
37
49
  }) : null;
38
50
  });
39
51
  _defineProperty(this, "renderPc", function (value, record) {
@@ -56,7 +68,7 @@ var AlipayTime = /*#__PURE__*/_createClass(function AlipayTime(options) {
56
68
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
57
69
  });
58
70
  _defineProperty(this, "renderExport", function (value) {
59
- return value ? moment(value).format('YYYY-MM-DD HH:mm:ss') : null;
71
+ return value ? _this.dateTimeTrans(value) : null;
60
72
  });
61
73
  _defineProperty(this, "editRender", function (p) {
62
74
  var _this$componentConfig, _this$componentConfig2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
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.8.0",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.8.0"
29
+ "@kmkf-fe-packages/basic-components": "^0.8.1",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.1"
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": "cc6ccff667c191b641cc259b002a7e022fe7931c"
43
+ "gitHead": "777c7c18abab71322d1cad37e54cab6767589dd6"
44
44
  }