@kmkf-fe-packages/services-components 2.2.44-beta.7 → 2.2.44-beta.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.
- package/dist/esm/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +52 -19
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +11 -10
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +2 -1
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +4 -2
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +43 -8
- package/dist/esm/components/Cascader/index.d.ts +8 -6
- package/dist/esm/components/Cascader/index.js +26 -22
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +3 -2
- package/dist/esm/components/CommonHeaderGood/index.js +14 -2
- package/dist/esm/components/CommonMultiStatus/index.js +73 -36
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
- package/dist/esm/components/Payment/index.d.ts +13 -12
- package/dist/esm/components/Payment/index.js +31 -11
- package/dist/esm/components/PicturePro/index.d.ts +9 -0
- package/dist/esm/components/PicturePro/index.js +17 -0
- package/dist/esm/components/PostIng/index.d.ts +1 -1
- package/dist/esm/components/Public/Goods/index.d.ts +9 -0
- package/dist/esm/components/Public/Goods/index.js +23 -2
- package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
- package/dist/esm/components/ReceiverAddress/index.js +41 -27
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +1 -0
- package/package.json +4 -4
|
@@ -133,6 +133,41 @@ var typeMap = {
|
|
|
133
133
|
idKey: "systemOrderId",
|
|
134
134
|
failValue: "失败",
|
|
135
135
|
dataType: "array_object"
|
|
136
|
+
},
|
|
137
|
+
JKY_WAREHOUSING_STATUS: {
|
|
138
|
+
options: [{
|
|
139
|
+
value: "0",
|
|
140
|
+
label: "未收货",
|
|
141
|
+
color: "#ff4d4f"
|
|
142
|
+
}, {
|
|
143
|
+
value: "1",
|
|
144
|
+
label: "部分收货",
|
|
145
|
+
color: "#e7780f"
|
|
146
|
+
}, {
|
|
147
|
+
value: "2",
|
|
148
|
+
label: "收货完成",
|
|
149
|
+
color: "#52c41a"
|
|
150
|
+
}, {
|
|
151
|
+
label: "收货完成-少收",
|
|
152
|
+
value: "3",
|
|
153
|
+
color: "#e7780f"
|
|
154
|
+
}, {
|
|
155
|
+
label: "收货完成-超收",
|
|
156
|
+
value: "4",
|
|
157
|
+
color: "#e7780f"
|
|
158
|
+
}, {
|
|
159
|
+
label: "无需收货",
|
|
160
|
+
value: "5",
|
|
161
|
+
color: "#52c41a"
|
|
162
|
+
}],
|
|
163
|
+
key: "jkyInStockStatusItemList",
|
|
164
|
+
code: "jkyInStockStatusList",
|
|
165
|
+
name: "商品入库状态(勿填)",
|
|
166
|
+
type: 2,
|
|
167
|
+
valueKey: "status",
|
|
168
|
+
idKey: "sourceTradeNo",
|
|
169
|
+
failValue: "失败",
|
|
170
|
+
dataType: "array_object"
|
|
136
171
|
}
|
|
137
172
|
};
|
|
138
173
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -158,7 +193,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
158
193
|
_defineProperty(this, "dataType", void 0);
|
|
159
194
|
_defineProperty(this, "isSingleValue", void 0);
|
|
160
195
|
_defineProperty(this, "renderClient", function (record) {
|
|
161
|
-
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
|
|
196
|
+
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
|
|
162
197
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
163
198
|
return !isNull(item);
|
|
164
199
|
}) : false;
|
|
@@ -167,16 +202,17 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
167
202
|
label: _this.name,
|
|
168
203
|
value: /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
169
204
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
205
|
+
idKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.idKey,
|
|
206
|
+
valueKey: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.valueKey,
|
|
207
|
+
failValue: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.failValue,
|
|
208
|
+
options: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.options,
|
|
173
209
|
isShowPopover: !_this.isSingleValue
|
|
174
210
|
})
|
|
175
211
|
}) : null;
|
|
176
212
|
});
|
|
177
213
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
178
|
-
var _typeMap$_this$
|
|
179
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
214
|
+
var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8, _typeMap$_this$type9;
|
|
215
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
|
|
180
216
|
//兼容多个商品
|
|
181
217
|
return /*#__PURE__*/React.createElement("span", {
|
|
182
218
|
onClick: function onClick(e) {
|
|
@@ -184,40 +220,41 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
184
220
|
}
|
|
185
221
|
}, /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
186
222
|
list: list,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
223
|
+
idKey: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.idKey,
|
|
224
|
+
valueKey: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.valueKey,
|
|
225
|
+
failValue: (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.failValue,
|
|
226
|
+
options: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.options,
|
|
190
227
|
isShowPopover: !_this.isSingleValue
|
|
191
228
|
}));
|
|
192
229
|
});
|
|
193
230
|
_defineProperty(this, "renderLog", function (r) {
|
|
194
|
-
var _typeMap$_this$
|
|
195
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
231
|
+
var _typeMap$_this$type10;
|
|
232
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
196
233
|
if (isNull(list)) return null;
|
|
197
234
|
return _this.renderPc(undefined, r);
|
|
198
235
|
});
|
|
199
236
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
200
|
-
var _typeMap$_this$
|
|
201
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
237
|
+
var _typeMap$_this$type11;
|
|
238
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.key)];
|
|
202
239
|
});
|
|
203
240
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
204
|
-
var _typeMap$_this$
|
|
205
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
241
|
+
var _typeMap$_this$type12;
|
|
242
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.key)];
|
|
206
243
|
return (list || []).map(function (item) {
|
|
207
|
-
var _typeMap$_this$
|
|
208
|
-
var currentOption = (_typeMap$_this$
|
|
209
|
-
var _typeMap$_this$
|
|
210
|
-
return item[(_typeMap$_this$
|
|
244
|
+
var _typeMap$_this$type13, _typeMap$_this$type14, _typeMap$_this$type15, _typeMap$_this$type18, _typeMap$_this$type19;
|
|
245
|
+
var currentOption = (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : (_typeMap$_this$type14 = _typeMap$_this$type13.options) === null || _typeMap$_this$type14 === void 0 ? void 0 : (_typeMap$_this$type15 = _typeMap$_this$type14.find) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.call(_typeMap$_this$type14, function (option) {
|
|
246
|
+
var _typeMap$_this$type16;
|
|
247
|
+
return item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey] === option.value;
|
|
211
248
|
});
|
|
212
249
|
if (_this.isSingleValue) {
|
|
213
|
-
var _typeMap$_this$
|
|
214
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
250
|
+
var _typeMap$_this$type17;
|
|
251
|
+
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || "";
|
|
215
252
|
}
|
|
216
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
253
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.valueKey]) || "");
|
|
217
254
|
}).join(",");
|
|
218
255
|
});
|
|
219
256
|
_defineProperty(this, "editRender", function (p) {
|
|
220
|
-
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$
|
|
257
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type20;
|
|
221
258
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
222
259
|
title: _this.name,
|
|
223
260
|
name: _this.id,
|
|
@@ -227,19 +264,19 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
227
264
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
228
265
|
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 : "",
|
|
229
266
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
230
|
-
type: (_typeMap$_this$
|
|
267
|
+
type: (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.type,
|
|
231
268
|
failValue: typeMap[_this.type].failValue
|
|
232
269
|
}))
|
|
233
270
|
});
|
|
234
271
|
});
|
|
235
272
|
_defineProperty(this, "filterConfig", function (item) {
|
|
236
|
-
var _typeMap$_this$
|
|
273
|
+
var _typeMap$_this$type21, _item$templateConfig;
|
|
237
274
|
return {
|
|
238
|
-
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
275
|
+
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
239
276
|
type: item.type,
|
|
240
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
277
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.code),
|
|
241
278
|
name: "".concat(_this.name),
|
|
242
|
-
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
279
|
+
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
243
280
|
props: {
|
|
244
281
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
245
282
|
fieldNames: {
|
|
@@ -250,11 +287,11 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
250
287
|
},
|
|
251
288
|
filterFn: function filterFn(value) {
|
|
252
289
|
return function (i) {
|
|
253
|
-
var _typeMap$_this$
|
|
254
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
290
|
+
var _typeMap$_this$type22;
|
|
291
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type22 = typeMap[_this.type]) === null || _typeMap$_this$type22 === void 0 ? void 0 : _typeMap$_this$type22.code), value);
|
|
255
292
|
};
|
|
256
293
|
},
|
|
257
|
-
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
294
|
+
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
258
295
|
if (value.type === "in") {
|
|
259
296
|
return value.keywords;
|
|
260
297
|
} else {
|
|
@@ -279,17 +316,17 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
279
316
|
required: true,
|
|
280
317
|
validator: function validator(_, value) {
|
|
281
318
|
var hasNo = (value || []).some(function (item) {
|
|
282
|
-
var _typeMap$_this$
|
|
283
|
-
return item[(_typeMap$_this$
|
|
319
|
+
var _typeMap$_this$type23;
|
|
320
|
+
return item[(_typeMap$_this$type23 = typeMap[_this.type]) === null || _typeMap$_this$type23 === void 0 ? void 0 : _typeMap$_this$type23.valueKey];
|
|
284
321
|
});
|
|
285
322
|
if (!hasNo) {
|
|
286
|
-
var _typeMap$_this$
|
|
287
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
323
|
+
var _typeMap$_this$type24;
|
|
324
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type24 = typeMap[_this.type]) === null || _typeMap$_this$type24 === void 0 ? void 0 : _typeMap$_this$type24.name)));
|
|
288
325
|
}
|
|
289
326
|
return Promise.resolve();
|
|
290
327
|
}
|
|
291
328
|
}] : [];
|
|
292
329
|
this.align = "left";
|
|
293
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS";
|
|
330
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS" || this.type === "JKY_WAREHOUSING_STATUS";
|
|
294
331
|
});
|
|
295
332
|
export default CommonMultiStatus;
|
|
@@ -113,6 +113,7 @@ function Logistics(options) {
|
|
|
113
113
|
name: _this.id,
|
|
114
114
|
rules: _this.rules,
|
|
115
115
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
116
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
116
117
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
117
118
|
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 : "",
|
|
118
119
|
component: /*#__PURE__*/React.createElement(LogisticsMoreInterception, _extends({}, _this.componentConfig, {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import AlipayNick from
|
|
4
|
-
import AlipayNo from
|
|
5
|
-
import AlipayTime from
|
|
6
|
-
import BuyerNick from
|
|
7
|
-
import PaymentAmount from
|
|
8
|
-
import PaymentStatus from
|
|
9
|
-
import PaymentTid from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import AlipayNick from './AlipayNick';
|
|
4
|
+
import AlipayNo from './AlipayNo';
|
|
5
|
+
import AlipayTime from './AlipayTime';
|
|
6
|
+
import BuyerNick from './BuyerNick';
|
|
7
|
+
import PaymentAmount from './PaymentAmount';
|
|
8
|
+
import PaymentStatus from './PaymentStatus';
|
|
9
|
+
import PaymentTid from './PaymentTid';
|
|
10
10
|
declare class Logistics implements ComponentInterface {
|
|
11
11
|
name: string;
|
|
12
12
|
id: string;
|
|
13
13
|
sortField: string;
|
|
14
14
|
type: string;
|
|
15
15
|
rules: any[];
|
|
16
|
-
componentConfig: ComponentInterface[
|
|
16
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
17
17
|
paymentTid: PaymentTid;
|
|
18
18
|
paymentStatus: PaymentStatus;
|
|
19
19
|
paymentAmount: PaymentAmount;
|
|
@@ -25,8 +25,9 @@ declare class Logistics implements ComponentInterface {
|
|
|
25
25
|
formField: string;
|
|
26
26
|
canSort: boolean;
|
|
27
27
|
children: ComponentInterface[];
|
|
28
|
-
dataType: ComponentInterface[
|
|
29
|
-
effects: ComponentInterface[
|
|
28
|
+
dataType: ComponentInterface['dataType'];
|
|
29
|
+
effects: ComponentInterface['effects'];
|
|
30
|
+
compoundConfig: ComponentInterface['compoundConfig'];
|
|
30
31
|
constructor(options: PickOption);
|
|
31
32
|
renderClient: (record: any, params: any) => React.JSX.Element;
|
|
32
33
|
renderPc: () => null;
|
|
@@ -8,8 +8,8 @@ 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
|
|
12
|
-
import { Payment as ApaasPayment } from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { Payment as ApaasPayment } from '@kmkf-fe-packages/basic-components';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import AlipayNick from "./AlipayNick";
|
|
15
15
|
import AlipayNo from "./AlipayNo";
|
|
@@ -40,6 +40,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
40
40
|
_defineProperty(this, "children", void 0);
|
|
41
41
|
_defineProperty(this, "dataType", void 0);
|
|
42
42
|
_defineProperty(this, "effects", void 0);
|
|
43
|
+
_defineProperty(this, "compoundConfig", void 0);
|
|
43
44
|
_defineProperty(this, "renderClient", function (record, params) {
|
|
44
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.alipayNick.renderClient(record), _this.paymentAmount.renderClient(record), _this.alipayNo.renderClient(record), _this.buyerNick.renderClient(record, params), _this.paymentTid.renderClient(record), _this.paymentStatus.renderClient(record), _this.payTime.renderClient(record));
|
|
45
46
|
});
|
|
@@ -104,32 +105,51 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
104
105
|
validator: function validator(_, value) {
|
|
105
106
|
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9;
|
|
106
107
|
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
|
|
107
|
-
return Promise.reject(new Error(
|
|
108
|
+
return Promise.reject(new Error('请输入打款金额'));
|
|
108
109
|
} else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
|
|
109
|
-
return Promise.reject(new Error(
|
|
110
|
+
return Promise.reject(new Error('打款金额最多2位小数'));
|
|
110
111
|
}
|
|
111
112
|
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
|
|
112
|
-
return Promise.reject(new Error(
|
|
113
|
+
return Promise.reject(new Error('请输入订单编号'));
|
|
113
114
|
} else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
|
|
114
|
-
return Promise.reject(new Error(
|
|
115
|
+
return Promise.reject(new Error('请输入正确的订单编号'));
|
|
115
116
|
}
|
|
116
117
|
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
|
|
117
|
-
return Promise.reject(new Error(
|
|
118
|
+
return Promise.reject(new Error('请输入支付宝名称'));
|
|
118
119
|
}
|
|
119
120
|
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
|
|
120
|
-
return Promise.reject(new Error(
|
|
121
|
+
return Promise.reject(new Error('请输入支付宝账号'));
|
|
121
122
|
} else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
|
|
122
|
-
return Promise.reject(new Error(
|
|
123
|
+
return Promise.reject(new Error('请输入正确的支付宝账号格式'));
|
|
123
124
|
}
|
|
124
125
|
//支付宝信息不能只填一个,否则不能打款
|
|
125
126
|
if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
|
|
126
127
|
if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
|
|
127
|
-
return Promise.reject(new Error(
|
|
128
|
+
return Promise.reject(new Error('支付宝姓名/账号都要填写'));
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
return Promise.resolve();
|
|
131
132
|
}
|
|
132
133
|
}];
|
|
133
|
-
this.dataType =
|
|
134
|
+
this.dataType = 'object';
|
|
135
|
+
this.compoundConfig = [{
|
|
136
|
+
name: "\u8BA2\u5355\u7F16\u53F7",
|
|
137
|
+
id: "".concat(options.id, "_enterprisePaymentTid")
|
|
138
|
+
}, {
|
|
139
|
+
name: "\u6253\u6B3E\u91D1\u989D",
|
|
140
|
+
id: "".concat(options.id, "_enterprisePaymentRefundFee")
|
|
141
|
+
}, {
|
|
142
|
+
name: "\u4E70\u5BB6\u6635\u79F0",
|
|
143
|
+
id: "".concat(options.id, "_enterprisePaymentBuyerNick")
|
|
144
|
+
}, {
|
|
145
|
+
name: "\u652F\u4ED8\u5B9D\u59D3\u540D",
|
|
146
|
+
id: "".concat(options.id, "_enterprisePaymentAlipayNick")
|
|
147
|
+
}, {
|
|
148
|
+
name: "\u652F\u4ED8\u5B9D\u8D26\u53F7",
|
|
149
|
+
id: "".concat(options.id, "_enterprisePaymentAlipayNo")
|
|
150
|
+
}, {
|
|
151
|
+
name: "\u6253\u6B3E\u72B6\u6001",
|
|
152
|
+
id: "".concat(options.id, "_enterprisePaymentStatus")
|
|
153
|
+
}];
|
|
134
154
|
});
|
|
135
155
|
export default Logistics;
|
|
@@ -18,8 +18,17 @@ declare class BasicPicturePro implements ComponentInterface {
|
|
|
18
18
|
children: ComponentInterface[];
|
|
19
19
|
dataType: ComponentInterface['dataType'];
|
|
20
20
|
currenEnv: ComponentInterface['platform'];
|
|
21
|
+
sortChildField: {
|
|
22
|
+
name: string;
|
|
23
|
+
key: string;
|
|
24
|
+
dataType: string;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}[];
|
|
27
|
+
exampleValue?: string;
|
|
28
|
+
standardDateType: ComponentInterface['standardDateType'];
|
|
21
29
|
constructor(options: PickOption);
|
|
22
30
|
formatPictures: (pictures: string) => string[];
|
|
31
|
+
getSortChildFields: () => any;
|
|
23
32
|
render: (value: Value) => React.JSX.Element | null;
|
|
24
33
|
renderPc: () => null;
|
|
25
34
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -36,11 +36,25 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
36
36
|
_defineProperty(this, "children", void 0);
|
|
37
37
|
_defineProperty(this, "dataType", void 0);
|
|
38
38
|
_defineProperty(this, "currenEnv", void 0);
|
|
39
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
40
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
41
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
39
42
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
40
43
|
pictures = pictures.replace(/[\[\]]/g, '');
|
|
41
44
|
pictures = pictures.replace(/\s/g, '');
|
|
42
45
|
return pictures ? pictures.split(',') : [];
|
|
43
46
|
});
|
|
47
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
48
|
+
return [{
|
|
49
|
+
name: '图片名称',
|
|
50
|
+
key: "".concat(_this.id, "_name"),
|
|
51
|
+
dataType: 'arrayObject'
|
|
52
|
+
}, {
|
|
53
|
+
name: '图片链接',
|
|
54
|
+
key: "".concat(_this.id, "_url"),
|
|
55
|
+
dataType: 'arrayObject'
|
|
56
|
+
}];
|
|
57
|
+
});
|
|
44
58
|
_defineProperty(this, "render", function (value) {
|
|
45
59
|
var _document;
|
|
46
60
|
if (!(value !== null && value !== void 0 && value.length)) {
|
|
@@ -176,5 +190,8 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
176
190
|
}))];
|
|
177
191
|
this.dataType = 'object';
|
|
178
192
|
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
193
|
+
this.sortChildField = this.getSortChildFields();
|
|
194
|
+
this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
|
|
195
|
+
this.standardDateType = 'Array';
|
|
179
196
|
});
|
|
180
197
|
export default BasicPicturePro;
|
|
@@ -31,7 +31,7 @@ declare class BasicPosting implements ComponentInterface {
|
|
|
31
31
|
sortColumns: SortColumnsField;
|
|
32
32
|
headerProvince: boolean;
|
|
33
33
|
constructor(options: PickOption);
|
|
34
|
-
getChildren: () => (
|
|
34
|
+
getChildren: () => (City | Detail | District | Province | ReceiverMobile | ReceiverName | undefined)[];
|
|
35
35
|
getSortColumns: (sortColumns: string | undefined) => SortColumnsField;
|
|
36
36
|
renderPc: (value: any, record: Record) => React.JSX.Element | null;
|
|
37
37
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -16,7 +16,16 @@ declare class PublicGoods implements ComponentInterface {
|
|
|
16
16
|
children: ComponentInterface[];
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
18
|
headers: CommonHeaderGoods;
|
|
19
|
+
exampleValue?: string;
|
|
20
|
+
standardDateType: ComponentInterface["standardDateType"];
|
|
21
|
+
sortChildField: {
|
|
22
|
+
name: string;
|
|
23
|
+
key: string;
|
|
24
|
+
dataType: string;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}[];
|
|
19
27
|
constructor(options: PickOption);
|
|
28
|
+
getSortChildFields: () => any;
|
|
20
29
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
30
|
renderPc: () => null;
|
|
22
31
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -15,6 +15,7 @@ import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { getColumnsMap } from "../../Common/constants/columnsBaseInfoMap";
|
|
18
19
|
import { SYMBOL } from "../../../constant";
|
|
19
20
|
var CONFIG_MAP = {
|
|
20
21
|
JST_GOODS: {
|
|
@@ -27,7 +28,8 @@ var CONFIG_MAP = {
|
|
|
27
28
|
},
|
|
28
29
|
JY_GOODS: {
|
|
29
30
|
name: "巨益",
|
|
30
|
-
key: "jyGoods"
|
|
31
|
+
key: "jyGoods",
|
|
32
|
+
exampleValue: '[{"gift":"","bfit":"","mallSkuId":"","specCode":"","sellTotal":0,"canEdit":false,"sellPrice":0,"mallProductName":"","oid":"","uuid":"","productName":"","skuName":"","canDelete":false,"divideOrderFee":0,"goodsName":"","mallSellingPrice":0,"productId":"","mallProductId":"","productCode":"","specName":"","mallSkuName":"","sellCount":0,"settlementPrice":0,"goodsCode":"","systemOrderNo":"","skuCode":""}]'
|
|
31
33
|
},
|
|
32
34
|
JKY_GOODS: {
|
|
33
35
|
name: "吉客云",
|
|
@@ -45,7 +47,8 @@ var CONFIG_MAP = {
|
|
|
45
47
|
var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
46
48
|
var _this = this,
|
|
47
49
|
_CONFIG_MAP$this$type,
|
|
48
|
-
_this$componentConfig6
|
|
50
|
+
_this$componentConfig6,
|
|
51
|
+
_CONFIG_MAP$this$type2;
|
|
49
52
|
_classCallCheck(this, PublicGoods);
|
|
50
53
|
_defineProperty(this, "name", void 0);
|
|
51
54
|
_defineProperty(this, "id", void 0);
|
|
@@ -60,6 +63,21 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
|
60
63
|
_defineProperty(this, "children", void 0);
|
|
61
64
|
_defineProperty(this, "dataType", void 0);
|
|
62
65
|
_defineProperty(this, "headers", void 0);
|
|
66
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
67
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
68
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
69
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
70
|
+
var Columns = getColumnsMap();
|
|
71
|
+
return Columns[_this.type].filter(function (item) {
|
|
72
|
+
return !["picUrl"].includes(item.dataIndex);
|
|
73
|
+
}).map(function (item) {
|
|
74
|
+
return {
|
|
75
|
+
name: item.title,
|
|
76
|
+
key: "".concat(_this.id, "_").concat(item.dataIndex),
|
|
77
|
+
dataType: "arrayObject"
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
});
|
|
63
81
|
_defineProperty(this, "renderClient", function (record) {
|
|
64
82
|
var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
|
|
65
83
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -150,5 +168,8 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
|
150
168
|
}
|
|
151
169
|
}] : [];
|
|
152
170
|
this.dataType = "object";
|
|
171
|
+
this.sortChildField = this.getSortChildFields();
|
|
172
|
+
this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
|
|
173
|
+
this.standardDateType = "Array";
|
|
153
174
|
});
|
|
154
175
|
export default PublicGoods;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { AddressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
4
|
declare type Value = {
|
|
5
5
|
address?: (string | number)[];
|
|
6
6
|
detail?: string;
|
|
@@ -11,14 +11,15 @@ declare class BasicInput implements ComponentInterface {
|
|
|
11
11
|
sortField: string;
|
|
12
12
|
type: string;
|
|
13
13
|
rules: any[];
|
|
14
|
-
componentConfig: ComponentInterface[
|
|
15
|
-
effects: ComponentInterface[
|
|
14
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
15
|
+
effects: ComponentInterface['effects'];
|
|
16
16
|
isCombinationComponent: boolean;
|
|
17
17
|
formField: string;
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
21
|
-
dataType: ComponentInterface[
|
|
21
|
+
dataType: ComponentInterface['dataType'];
|
|
22
|
+
compoundConfig: ComponentInterface['compoundConfig'];
|
|
22
23
|
constructor(options: PickOption);
|
|
23
24
|
render: (value: Value) => React.JSX.Element;
|
|
24
25
|
transTextToNumber: (value?: string) => string | number | undefined;
|