@kmkf-fe-packages/services-components 0.7.15-alpha.55 → 0.7.15-alpha.57
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.
- package/dist/esm/components/ActualPayment/index.js +4 -1
- package/dist/esm/components/BS/BsExchange/index.js +3 -5
- package/dist/esm/components/BS/BsReissue/index.d.ts +6 -6
- package/dist/esm/components/BS/BsReissue/index.js +27 -27
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +15 -15
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +12 -12
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +90 -87
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -162,7 +162,10 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
162
162
|
this.rules = options.type === "ACTUAL_PAYMENT" ? [{
|
|
163
163
|
pattern: /^\d+(\.\d{1,2})?$/,
|
|
164
164
|
message: "字段为正数或最多两位小数"
|
|
165
|
-
}] : [
|
|
165
|
+
}] : [{
|
|
166
|
+
pattern: /^(([0-9]*(\.[0-9]{1,})$)|([0-9]+$))/,
|
|
167
|
+
message: "请输入数字"
|
|
168
|
+
}];
|
|
166
169
|
this.dataMap = {
|
|
167
170
|
ACTUAL_PAYMENT: "actualPayment",
|
|
168
171
|
BS_NET_RECEIPTS: "bsNetReceipts",
|
|
@@ -152,8 +152,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
152
152
|
var _this = this,
|
|
153
153
|
_options$componentCon,
|
|
154
154
|
_options$componentCon2,
|
|
155
|
-
_options$componentCon3
|
|
156
|
-
_this$componentConfig5;
|
|
155
|
+
_options$componentCon3;
|
|
157
156
|
_classCallCheck(this, BsExchange);
|
|
158
157
|
_defineProperty(this, "name", void 0);
|
|
159
158
|
_defineProperty(this, "id", void 0);
|
|
@@ -301,10 +300,9 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
301
300
|
}, [])));
|
|
302
301
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
303
302
|
this.rules = [{
|
|
304
|
-
required: (_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required,
|
|
305
303
|
validator: function validator(_, value) {
|
|
306
|
-
var _value$bsExchangeRetu;
|
|
307
|
-
if (
|
|
304
|
+
var _this$componentConfig5, _value$bsExchangeRetu;
|
|
305
|
+
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
308
306
|
return Promise.reject(new Error("请选择bs换货商品"));
|
|
309
307
|
}
|
|
310
308
|
return Promise.resolve();
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsType, BsMemo } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType, BsMemo } 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[
|
|
11
|
-
effects: ComponentInterface[
|
|
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[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
17
|
bsType: BsType;
|
|
18
18
|
bsMemo: BsMemo;
|
|
19
19
|
constructor(options: PickOption);
|
|
@@ -14,54 +14,54 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
14
14
|
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; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
16
|
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); }
|
|
17
|
-
import React from
|
|
17
|
+
import React from "react";
|
|
18
18
|
import GetFormItem from "../../GetFormItem";
|
|
19
19
|
import ItemView from "../../../commonComponents/ItemView";
|
|
20
|
-
import { isNull, filterFn as _filterFn } from
|
|
21
|
-
import { BsReissue as Reissue } from
|
|
20
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
21
|
+
import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
22
22
|
import { SYMBOL } from "../../../constant";
|
|
23
23
|
import { BsGoodsTable } from "../../Common";
|
|
24
24
|
import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
25
25
|
var childHeaderMap = {
|
|
26
26
|
pic: {
|
|
27
27
|
component: BsHeaderPic,
|
|
28
|
-
name:
|
|
29
|
-
key:
|
|
28
|
+
name: "图片",
|
|
29
|
+
key: "pic"
|
|
30
30
|
},
|
|
31
31
|
name: {
|
|
32
32
|
component: BsHeaderName,
|
|
33
|
-
name:
|
|
34
|
-
key:
|
|
33
|
+
name: "名称",
|
|
34
|
+
key: "name"
|
|
35
35
|
},
|
|
36
36
|
code: {
|
|
37
37
|
component: BsHeaderCode,
|
|
38
|
-
name:
|
|
39
|
-
key:
|
|
38
|
+
name: "编码",
|
|
39
|
+
key: "code"
|
|
40
40
|
},
|
|
41
41
|
sku: {
|
|
42
42
|
component: BsHeaderSku,
|
|
43
|
-
name:
|
|
44
|
-
key:
|
|
43
|
+
name: "sku编码",
|
|
44
|
+
key: "sku"
|
|
45
45
|
},
|
|
46
46
|
money: {
|
|
47
47
|
component: BsHeaderMoney,
|
|
48
|
-
name:
|
|
49
|
-
key:
|
|
48
|
+
name: "实付金额",
|
|
49
|
+
key: "money"
|
|
50
50
|
},
|
|
51
51
|
number: {
|
|
52
52
|
component: BsHeaderNumber,
|
|
53
|
-
name:
|
|
54
|
-
key:
|
|
53
|
+
name: "数量",
|
|
54
|
+
key: "number"
|
|
55
55
|
},
|
|
56
56
|
share: {
|
|
57
57
|
component: BsHeaderShare,
|
|
58
|
-
name:
|
|
59
|
-
key:
|
|
58
|
+
name: "分摊价",
|
|
59
|
+
key: "share"
|
|
60
60
|
},
|
|
61
61
|
type: {
|
|
62
62
|
component: BsHeaderType,
|
|
63
|
-
name:
|
|
64
|
-
key:
|
|
63
|
+
name: "赠品类型",
|
|
64
|
+
key: "giftType"
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
@@ -85,7 +85,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
85
85
|
_defineProperty(this, "bsMemo", void 0);
|
|
86
86
|
_defineProperty(this, "renderClient", function (record) {
|
|
87
87
|
var _this$componentConfig;
|
|
88
|
-
console.log(
|
|
88
|
+
console.log("bsreissue", record);
|
|
89
89
|
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, {
|
|
90
90
|
id: _this.id,
|
|
91
91
|
label: _this.name,
|
|
@@ -129,8 +129,8 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
129
129
|
searchDefaultConditions: SYMBOL.eq,
|
|
130
130
|
type: item.type,
|
|
131
131
|
id: "".concat(item.id, "_bsReissueType"),
|
|
132
|
-
name: "".concat(item.name, "-\
|
|
133
|
-
filterComponentType:
|
|
132
|
+
name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
|
|
133
|
+
filterComponentType: "Cascader",
|
|
134
134
|
props: {
|
|
135
135
|
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
136
136
|
},
|
|
@@ -144,7 +144,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
144
144
|
type: item.type,
|
|
145
145
|
id: "".concat(item.id, "_bsReissueGoods"),
|
|
146
146
|
name: "".concat(_this.name),
|
|
147
|
-
filterComponentType:
|
|
147
|
+
filterComponentType: "Input"
|
|
148
148
|
}];
|
|
149
149
|
});
|
|
150
150
|
this.name = options.name;
|
|
@@ -157,11 +157,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
157
157
|
this.canSort = false;
|
|
158
158
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
159
159
|
id: "".concat(options.id, "_bsReissueType_type"),
|
|
160
|
-
name:
|
|
160
|
+
name: "补发类型"
|
|
161
161
|
}));
|
|
162
162
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
163
163
|
id: "".concat(options.id, "_bsReissueType_memo"),
|
|
164
|
-
name:
|
|
164
|
+
name: "补发备注"
|
|
165
165
|
}));
|
|
166
166
|
this.children = [this.bsType, this.bsMemo].concat(_toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
|
|
167
167
|
if (childHeaderMap[next]) {
|
|
@@ -178,11 +178,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
178
178
|
validator: function validator(_, value) {
|
|
179
179
|
var _value$bsReissueGoods;
|
|
180
180
|
if (!value || !(value !== null && value !== void 0 && (_value$bsReissueGoods = value.bsReissueGoods) !== null && _value$bsReissueGoods !== void 0 && _value$bsReissueGoods.length)) {
|
|
181
|
-
return Promise.reject(new Error(
|
|
181
|
+
return Promise.reject(new Error("请选择bs补发商品"));
|
|
182
182
|
}
|
|
183
183
|
return Promise.resolve();
|
|
184
184
|
}
|
|
185
185
|
}] : [];
|
|
186
|
-
this.dataType =
|
|
186
|
+
this.dataType = "object";
|
|
187
187
|
});
|
|
188
188
|
export default BsReissue;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsMemo implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (r: any) => React.JSX.Element | null;
|
|
@@ -11,12 +11,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
17
|
var componentType = {
|
|
18
|
-
BS_EXCHANGE_GOODS:
|
|
19
|
-
BS_REISSUE_GOODS:
|
|
18
|
+
BS_EXCHANGE_GOODS: 'bsExchangeType',
|
|
19
|
+
BS_REISSUE_GOODS: 'bsReissueType'
|
|
20
20
|
};
|
|
21
21
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
22
22
|
var _this = this;
|
|
@@ -34,7 +34,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
34
34
|
_defineProperty(this, "children", void 0);
|
|
35
35
|
_defineProperty(this, "dataType", void 0);
|
|
36
36
|
_defineProperty(this, "getParentId", function () {
|
|
37
|
-
var _this$id$split = _this.id.split(
|
|
37
|
+
var _this$id$split = _this.id.split('_'),
|
|
38
38
|
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
39
39
|
key = _this$id$split2[0],
|
|
40
40
|
name = _this$id$split2[1];
|
|
@@ -42,14 +42,14 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
42
42
|
});
|
|
43
43
|
_defineProperty(this, "renderClient", function (r) {
|
|
44
44
|
var _r$key$componentType$, _r$key, _r$key$componentType$2, _r$key2, _r$key2$componentType, _find, _this$componentConfig, _find2;
|
|
45
|
-
var _this$getParentId$spl = _this.getParentId().split(
|
|
45
|
+
var _this$getParentId$spl = _this.getParentId().split('_'),
|
|
46
46
|
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
47
47
|
key = _this$getParentId$spl2[0];
|
|
48
48
|
if (!(r !== null && r !== void 0 && (_r$key$componentType$ = r[key][componentType[_this.type]]) !== null && _r$key$componentType$ !== void 0 && _r$key$componentType$.length)) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
var type = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : (_r$key$componentType$2 = _r$key[componentType[_this.type]]) === null || _r$key$componentType$2 === void 0 ? void 0 : _r$key$componentType$2[0] :
|
|
52
|
-
var memo = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : (_r$key2$componentType = _r$key2[componentType[_this.type]]) === null || _r$key2$componentType === void 0 ? void 0 : _r$key2$componentType[1] :
|
|
51
|
+
var type = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : (_r$key$componentType$2 = _r$key[componentType[_this.type]]) === null || _r$key$componentType$2 === void 0 ? void 0 : _r$key$componentType$2[0] : '';
|
|
52
|
+
var memo = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : (_r$key2$componentType = _r$key2[componentType[_this.type]]) === null || _r$key2$componentType === void 0 ? void 0 : _r$key2$componentType[1] : '';
|
|
53
53
|
var children = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
|
|
54
54
|
return item.value === type;
|
|
55
55
|
})) === null || _find === void 0 ? void 0 : _find.children;
|
|
@@ -64,7 +64,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
64
64
|
});
|
|
65
65
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
66
66
|
var _this$getComponentVal;
|
|
67
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
67
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
68
68
|
});
|
|
69
69
|
_defineProperty(this, "renderLog", function (r) {
|
|
70
70
|
var id = _this.getParentId();
|
|
@@ -72,10 +72,10 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
72
72
|
return _this.renderPc(undefined, r);
|
|
73
73
|
});
|
|
74
74
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
75
|
-
var
|
|
75
|
+
var _r$id, _r$id2, _find3, _this$componentConfig2, _find4;
|
|
76
76
|
var id = _this.getParentId();
|
|
77
|
-
var type = r !== null && r !== void 0 && r[id] ?
|
|
78
|
-
var memo = r !== null && r !== void 0 && r[
|
|
77
|
+
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] : '';
|
|
78
|
+
var memo = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id2 = r[id]) === null || _r$id2 === void 0 ? void 0 : _r$id2[1] : '';
|
|
79
79
|
var children = (_find3 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
80
80
|
return item.value === type;
|
|
81
81
|
})) === null || _find3 === void 0 ? void 0 : _find3.children;
|
|
@@ -86,7 +86,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
86
86
|
});
|
|
87
87
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
88
88
|
var _this$getComponentVal2;
|
|
89
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
89
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
90
90
|
});
|
|
91
91
|
_defineProperty(this, "editRender", function () {
|
|
92
92
|
return null;
|
|
@@ -100,11 +100,11 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
100
100
|
this.formField = options.id;
|
|
101
101
|
this.type = options.type;
|
|
102
102
|
this.componentConfig = options.componentConfig;
|
|
103
|
-
this.align =
|
|
103
|
+
this.align = 'left';
|
|
104
104
|
this.width = 200;
|
|
105
105
|
this.isCombinationComponent = false;
|
|
106
106
|
this.canSort = false;
|
|
107
|
-
this.dataType =
|
|
107
|
+
this.dataType = 'string';
|
|
108
108
|
this.children = [];
|
|
109
109
|
});
|
|
110
110
|
export default BsMemo;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsType implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,13 +11,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull, filterFn as _filterFn } from
|
|
16
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
17
|
import { SYMBOL } from "../../../constant";
|
|
18
18
|
var componentType = {
|
|
19
|
-
BS_EXCHANGE_GOODS:
|
|
20
|
-
BS_REISSUE_GOODS:
|
|
19
|
+
BS_EXCHANGE_GOODS: 'bsExchangeType',
|
|
20
|
+
BS_REISSUE_GOODS: 'bsReissueType'
|
|
21
21
|
};
|
|
22
22
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
23
23
|
var _this = this;
|
|
@@ -35,7 +35,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
35
35
|
_defineProperty(this, "children", void 0);
|
|
36
36
|
_defineProperty(this, "dataType", void 0);
|
|
37
37
|
_defineProperty(this, "getParentId", function () {
|
|
38
|
-
var _this$id$split = _this.id.split(
|
|
38
|
+
var _this$id$split = _this.id.split('_'),
|
|
39
39
|
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
40
40
|
key = _this$id$split2[0],
|
|
41
41
|
name = _this$id$split2[1];
|
|
@@ -43,7 +43,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "renderClient", function (record) {
|
|
45
45
|
var _record$key$component, _find, _this$componentConfig;
|
|
46
|
-
var _this$getParentId$spl = _this.getParentId().split(
|
|
46
|
+
var _this$getParentId$spl = _this.getParentId().split('_'),
|
|
47
47
|
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
48
48
|
key = _this$getParentId$spl2[0];
|
|
49
49
|
if (!(record !== null && record !== void 0 && (_record$key$component = record[key][componentType[_this.type]]) !== null && _record$key$component !== void 0 && _record$key$component.length)) {
|
|
@@ -61,7 +61,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
61
61
|
});
|
|
62
62
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
63
63
|
var _this$getComponentVal;
|
|
64
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
64
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
65
65
|
});
|
|
66
66
|
_defineProperty(this, "renderLog", function (r) {
|
|
67
67
|
var id = _this.getParentId();
|
|
@@ -71,7 +71,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
71
71
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
72
72
|
var _r$id, _find2, _this$componentConfig2;
|
|
73
73
|
var id = _this.getParentId();
|
|
74
|
-
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] :
|
|
74
|
+
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] : '';
|
|
75
75
|
var text = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
76
76
|
return item.value === type;
|
|
77
77
|
})) === null || _find2 === void 0 ? void 0 : _find2.label;
|
|
@@ -79,7 +79,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
79
79
|
});
|
|
80
80
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
81
81
|
var _this$getComponentVal2;
|
|
82
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
82
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
83
83
|
});
|
|
84
84
|
_defineProperty(this, "editRender", function () {
|
|
85
85
|
return null;
|
|
@@ -92,7 +92,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
92
92
|
type: item.type,
|
|
93
93
|
id: item.id,
|
|
94
94
|
name: "".concat(item.name, "-\u7C7B\u578B"),
|
|
95
|
-
filterComponentType:
|
|
95
|
+
filterComponentType: 'Cascader',
|
|
96
96
|
props: {
|
|
97
97
|
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
98
98
|
},
|
|
@@ -109,11 +109,11 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
109
109
|
this.formField = options.id;
|
|
110
110
|
this.type = options.type;
|
|
111
111
|
this.componentConfig = options.componentConfig;
|
|
112
|
-
this.align =
|
|
112
|
+
this.align = 'left';
|
|
113
113
|
this.width = 200;
|
|
114
114
|
this.isCombinationComponent = false;
|
|
115
115
|
this.canSort = false;
|
|
116
|
-
this.dataType =
|
|
116
|
+
this.dataType = 'string';
|
|
117
117
|
this.children = [];
|
|
118
118
|
});
|
|
119
119
|
export default BsType;
|
|
@@ -8,9 +8,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
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
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table } from
|
|
12
|
-
import React, { useState, useMemo } from
|
|
13
|
-
import { ExpressData } from
|
|
11
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table } from 'antd';
|
|
12
|
+
import React, { useState, useMemo } from 'react';
|
|
13
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import styles from "./index.module.less";
|
|
15
15
|
import defaultImg from "./img/default-img.png";
|
|
16
16
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -30,7 +30,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
30
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
31
31
|
className: "form-item--wrap",
|
|
32
32
|
style: {
|
|
33
|
-
position:
|
|
33
|
+
position: 'relative'
|
|
34
34
|
}
|
|
35
35
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
36
36
|
name: name,
|
|
@@ -44,43 +44,43 @@ export var showImage = function showImage(_ref2) {
|
|
|
44
44
|
var item = _ref2.item,
|
|
45
45
|
type = _ref2.type,
|
|
46
46
|
index = _ref2.index;
|
|
47
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
47
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: styles.goodImgBox,
|
|
50
50
|
key: index
|
|
51
|
-
}, (item === null || item === void 0 ? void 0 : item.platform) ===
|
|
51
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
52
52
|
target: "_blank",
|
|
53
53
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
54
54
|
}, /*#__PURE__*/React.createElement("img", {
|
|
55
55
|
style: {
|
|
56
|
-
width:
|
|
57
|
-
height:
|
|
58
|
-
objectFit:
|
|
56
|
+
width: '40px',
|
|
57
|
+
height: '40px',
|
|
58
|
+
objectFit: 'contain'
|
|
59
59
|
},
|
|
60
60
|
src: picUrl
|
|
61
61
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
62
62
|
style: {
|
|
63
|
-
width:
|
|
64
|
-
height:
|
|
65
|
-
objectFit:
|
|
63
|
+
width: '40px',
|
|
64
|
+
height: '40px',
|
|
65
|
+
objectFit: 'contain'
|
|
66
66
|
},
|
|
67
67
|
src: picUrl
|
|
68
68
|
}), /*#__PURE__*/React.createElement("div", {
|
|
69
69
|
className: styles.options
|
|
70
|
-
}, type ===
|
|
71
|
-
title:
|
|
70
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
71
|
+
title: '商品id',
|
|
72
72
|
text: item.numIid
|
|
73
|
-
}), type ===
|
|
74
|
-
title:
|
|
73
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
74
|
+
title: '商品编码',
|
|
75
75
|
text: item.outerId
|
|
76
|
-
}), (type ===
|
|
77
|
-
title:
|
|
76
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
77
|
+
title: '供应商编码',
|
|
78
78
|
text: item.itemId || item.supplierItemOuterId
|
|
79
|
-
}), (type ===
|
|
80
|
-
title:
|
|
79
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
80
|
+
title: '供应商名称',
|
|
81
81
|
text: item.supplierName
|
|
82
82
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
83
|
-
title:
|
|
83
|
+
title: '规格',
|
|
84
84
|
text: item.propertiesName
|
|
85
85
|
})));
|
|
86
86
|
};
|
|
@@ -93,9 +93,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
93
93
|
title: text
|
|
94
94
|
}, /*#__PURE__*/React.createElement("div", {
|
|
95
95
|
style: {
|
|
96
|
-
overflow:
|
|
97
|
-
whiteSpace:
|
|
98
|
-
textOverflow:
|
|
96
|
+
overflow: 'hidden',
|
|
97
|
+
whiteSpace: 'nowrap',
|
|
98
|
+
textOverflow: 'ellipsis'
|
|
99
99
|
}
|
|
100
100
|
}, title, ":", text));
|
|
101
101
|
};
|
|
@@ -123,47 +123,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
123
123
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
124
124
|
}, /*#__PURE__*/React.createElement("div", {
|
|
125
125
|
style: {
|
|
126
|
-
display:
|
|
127
|
-
flexWrap:
|
|
126
|
+
display: 'flex',
|
|
127
|
+
flexWrap: 'wrap'
|
|
128
128
|
}
|
|
129
129
|
}, allImage.map(function (i, index) {
|
|
130
130
|
return /*#__PURE__*/React.createElement("div", {
|
|
131
131
|
style: {
|
|
132
|
-
width:
|
|
132
|
+
width: '50%'
|
|
133
133
|
},
|
|
134
134
|
key: index
|
|
135
135
|
}, /*#__PURE__*/React.createElement("a", {
|
|
136
136
|
href: i.link,
|
|
137
137
|
target: "__blank",
|
|
138
138
|
style: {
|
|
139
|
-
marginRight:
|
|
140
|
-
marginTop:
|
|
141
|
-
padding:
|
|
142
|
-
border:
|
|
143
|
-
display:
|
|
139
|
+
marginRight: '12px',
|
|
140
|
+
marginTop: '8px',
|
|
141
|
+
padding: '2px',
|
|
142
|
+
border: '1px dashed #ccc',
|
|
143
|
+
display: 'inline-block'
|
|
144
144
|
}
|
|
145
145
|
}, /*#__PURE__*/React.createElement("img", {
|
|
146
146
|
alt: "",
|
|
147
147
|
src: i.picUrl || defaultImg,
|
|
148
148
|
style: {
|
|
149
|
-
width:
|
|
150
|
-
height:
|
|
151
|
-
objectFit:
|
|
149
|
+
width: '72px',
|
|
150
|
+
height: '72px',
|
|
151
|
+
objectFit: 'contain'
|
|
152
152
|
}
|
|
153
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
154
|
-
title:
|
|
153
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
154
|
+
title: '商品id',
|
|
155
155
|
text: i.numIid
|
|
156
|
-
}), type ===
|
|
157
|
-
title:
|
|
156
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
157
|
+
title: '商品编码',
|
|
158
158
|
text: i.outerId
|
|
159
|
-
}), (type ===
|
|
160
|
-
title:
|
|
159
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
160
|
+
title: '供应商编码',
|
|
161
161
|
text: i.itemId || i.supplierItemOuterId
|
|
162
|
-
}), (type ===
|
|
163
|
-
title:
|
|
162
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
163
|
+
title: '供应商名称',
|
|
164
164
|
text: i.supplierName
|
|
165
165
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
166
|
-
title:
|
|
166
|
+
title: '规格',
|
|
167
167
|
text: i.propertiesName
|
|
168
168
|
})));
|
|
169
169
|
}))));
|
|
@@ -173,12 +173,12 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
173
173
|
var _list$slice;
|
|
174
174
|
var list = _ref5.list,
|
|
175
175
|
_ref5$type = _ref5.type,
|
|
176
|
-
type = _ref5$type === void 0 ?
|
|
176
|
+
type = _ref5$type === void 0 ? '' : _ref5$type;
|
|
177
177
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
178
178
|
var initShowTotal = 3;
|
|
179
179
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
180
180
|
style: {
|
|
181
|
-
display: type ===
|
|
181
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
182
182
|
}
|
|
183
183
|
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item, index) {
|
|
184
184
|
return showImage({
|
|
@@ -195,7 +195,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
195
195
|
var content = function content(item, index) {
|
|
196
196
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
197
197
|
style: {
|
|
198
|
-
textAlign:
|
|
198
|
+
textAlign: 'center'
|
|
199
199
|
}
|
|
200
200
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
201
201
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -215,14 +215,17 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
215
215
|
var logisticsCompany = item.logisticsCompany;
|
|
216
216
|
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
217
217
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
218
|
-
content: content(item, index)
|
|
218
|
+
content: content(item, index),
|
|
219
|
+
overlayStyle: {
|
|
220
|
+
zIndex: 1080
|
|
221
|
+
}
|
|
219
222
|
}, /*#__PURE__*/React.createElement("span", {
|
|
220
223
|
key: index,
|
|
221
224
|
style: {
|
|
222
|
-
color:
|
|
223
|
-
cursor:
|
|
225
|
+
color: '#1890ff',
|
|
226
|
+
cursor: 'pointer'
|
|
224
227
|
}
|
|
225
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join(
|
|
228
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join('/') : item.sendId ? item.sendId : item.sendName) : null));
|
|
226
229
|
}) : null;
|
|
227
230
|
};
|
|
228
231
|
//bs商品展示 todo
|
|
@@ -231,22 +234,22 @@ export var BsGoodImage = function BsGoodImage(_ref7) {
|
|
|
231
234
|
index = _ref7.index;
|
|
232
235
|
var picUrl = item.picUrl || defaultImg;
|
|
233
236
|
var keyMap = {
|
|
234
|
-
name:
|
|
235
|
-
code:
|
|
236
|
-
skuId:
|
|
237
|
-
money:
|
|
238
|
-
number:
|
|
239
|
-
share:
|
|
240
|
-
type:
|
|
237
|
+
name: 'bs名称',
|
|
238
|
+
code: 'bs编码',
|
|
239
|
+
skuId: 'bssku编码',
|
|
240
|
+
money: 'bs实付金额',
|
|
241
|
+
number: 'bs数量',
|
|
242
|
+
share: 'bs分摊价',
|
|
243
|
+
type: 'bs赠品类型'
|
|
241
244
|
};
|
|
242
245
|
return /*#__PURE__*/React.createElement("div", {
|
|
243
246
|
className: styles.goodImgBox,
|
|
244
247
|
key: index
|
|
245
248
|
}, /*#__PURE__*/React.createElement("img", {
|
|
246
249
|
style: {
|
|
247
|
-
width:
|
|
248
|
-
height:
|
|
249
|
-
objectFit:
|
|
250
|
+
width: '40px',
|
|
251
|
+
height: '40px',
|
|
252
|
+
objectFit: 'contain'
|
|
250
253
|
},
|
|
251
254
|
src: picUrl
|
|
252
255
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -268,11 +271,11 @@ export var BsExchangeList = function BsExchangeList(_ref8) {
|
|
|
268
271
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
269
272
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
270
273
|
showHeader: showHeader,
|
|
271
|
-
text:
|
|
274
|
+
text: '退回'
|
|
272
275
|
}), BsGoodsTable({
|
|
273
276
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
274
277
|
showHeader: showHeader,
|
|
275
|
-
text:
|
|
278
|
+
text: '换出'
|
|
276
279
|
}));
|
|
277
280
|
}));
|
|
278
281
|
};
|
|
@@ -289,14 +292,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
289
292
|
var list = _ref9.list,
|
|
290
293
|
showHeader = _ref9.showHeader,
|
|
291
294
|
_ref9$text = _ref9.text,
|
|
292
|
-
text = _ref9$text === void 0 ?
|
|
295
|
+
text = _ref9$text === void 0 ? '' : _ref9$text;
|
|
293
296
|
//商品信息
|
|
294
297
|
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
295
|
-
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
298
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
296
299
|
return [{
|
|
297
|
-
dataIndex:
|
|
300
|
+
dataIndex: 'pic',
|
|
298
301
|
title: "\u56FE\u7247",
|
|
299
|
-
align:
|
|
302
|
+
align: 'center',
|
|
300
303
|
ellipsis: true,
|
|
301
304
|
width: 100,
|
|
302
305
|
render: function render(val) {
|
|
@@ -306,57 +309,57 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
306
309
|
});
|
|
307
310
|
}
|
|
308
311
|
}, {
|
|
309
|
-
dataIndex:
|
|
312
|
+
dataIndex: 'name',
|
|
310
313
|
title: "".concat(text, "\u540D\u79F0"),
|
|
311
|
-
align:
|
|
314
|
+
align: 'center',
|
|
312
315
|
ellipsis: true,
|
|
313
316
|
width: 100
|
|
314
317
|
}, {
|
|
315
|
-
dataIndex:
|
|
318
|
+
dataIndex: 'code',
|
|
316
319
|
title: "".concat(text, "\u7F16\u7801"),
|
|
317
|
-
align:
|
|
320
|
+
align: 'center',
|
|
318
321
|
ellipsis: true,
|
|
319
322
|
width: 100
|
|
320
323
|
}, {
|
|
321
|
-
dataIndex:
|
|
324
|
+
dataIndex: 'sku',
|
|
322
325
|
title: "".concat(text, "sku\u7F16\u7801"),
|
|
323
|
-
align:
|
|
326
|
+
align: 'center',
|
|
324
327
|
ellipsis: true,
|
|
325
328
|
width: 100
|
|
326
329
|
}, {
|
|
327
|
-
dataIndex:
|
|
330
|
+
dataIndex: 'money',
|
|
328
331
|
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
329
|
-
align:
|
|
332
|
+
align: 'center',
|
|
330
333
|
ellipsis: true,
|
|
331
334
|
width: 100
|
|
332
335
|
}, {
|
|
333
|
-
dataIndex:
|
|
336
|
+
dataIndex: 'number',
|
|
334
337
|
title: "".concat(text, "\u6570\u91CF"),
|
|
335
|
-
align:
|
|
338
|
+
align: 'center',
|
|
336
339
|
ellipsis: true,
|
|
337
340
|
width: 100,
|
|
338
341
|
render: function render(val, record, index) {
|
|
339
342
|
return /*#__PURE__*/React.createElement("span", null, val);
|
|
340
343
|
}
|
|
341
344
|
}, {
|
|
342
|
-
dataIndex:
|
|
345
|
+
dataIndex: 'share',
|
|
343
346
|
title: "\u5206\u644A\u4EF7",
|
|
344
|
-
align:
|
|
347
|
+
align: 'center',
|
|
345
348
|
ellipsis: true,
|
|
346
349
|
width: 70
|
|
347
350
|
}, {
|
|
348
|
-
dataIndex:
|
|
351
|
+
dataIndex: 'type',
|
|
349
352
|
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
350
|
-
align:
|
|
353
|
+
align: 'center',
|
|
351
354
|
ellipsis: true,
|
|
352
355
|
width: 100
|
|
353
356
|
}];
|
|
354
357
|
};
|
|
355
358
|
var newColumns = useMemo(function () {
|
|
356
359
|
var columnList = [{
|
|
357
|
-
dataIndex:
|
|
358
|
-
title:
|
|
359
|
-
align:
|
|
360
|
+
dataIndex: '',
|
|
361
|
+
title: '序号',
|
|
362
|
+
align: 'center',
|
|
360
363
|
ellipsis: true,
|
|
361
364
|
width: 50,
|
|
362
365
|
render: function render(val, record, index) {
|
|
@@ -370,14 +373,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
370
373
|
return /*#__PURE__*/React.createElement(Table, {
|
|
371
374
|
columns: newColumns,
|
|
372
375
|
dataSource: list,
|
|
373
|
-
rowKey:
|
|
376
|
+
rowKey: 'id',
|
|
374
377
|
size: "small",
|
|
375
378
|
pagination: false,
|
|
376
379
|
scroll: {
|
|
377
|
-
x:
|
|
380
|
+
x: '100%'
|
|
378
381
|
},
|
|
379
382
|
locale: {
|
|
380
|
-
emptyText:
|
|
383
|
+
emptyText: '暂无数据'
|
|
381
384
|
}
|
|
382
385
|
});
|
|
383
386
|
};
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -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) => ActualPayment |
|
|
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.
|
|
3
|
+
"version": "0.7.15-alpha.57",
|
|
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.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.57",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.57"
|
|
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": "
|
|
43
|
+
"gitHead": "f99147791d4b1ab930c7fbc4a401cd9ce49a19e2"
|
|
44
44
|
}
|