@kmkf-fe-packages/services-components 2.2.3 → 2.2.5-beta.0
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/README.md +1 -1
- package/dist/esm/Hooks/index.d.ts +2 -0
- package/dist/esm/Hooks/index.js +2 -0
- package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
- package/dist/esm/Hooks/useColumnsConfig.js +243 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.js +441 -0
- package/dist/esm/components/BS/BsLogistics/index.d.ts +5 -2
- package/dist/esm/components/BS/BsLogistics/index.js +19 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +3 -2
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +8 -8
- package/dist/esm/components/BS/common/BsHeaderPic.js +4 -9
- package/dist/esm/components/BS/common/expressCode.d.ts +4 -1
- package/dist/esm/components/BS/common/expressCode.js +14 -6
- package/dist/esm/components/BS/common/expressCompany.d.ts +5 -2
- package/dist/esm/components/BS/common/expressCompany.js +14 -4
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +4 -2
- package/dist/esm/components/Common/img/ai.png +0 -0
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +15 -8
- package/dist/esm/components/CommonHeaderGood/index.js +230 -4
- package/dist/esm/components/FlowTag/index.js +10 -2
- package/dist/esm/components/GY/GyGoods/index.js +2 -0
- package/dist/esm/components/GY/GyReissue/index.js +2 -0
- package/dist/esm/components/GY/GyReturn/index.js +2 -0
- package/dist/esm/components/JST/JstSendGood/index.js +9 -1
- package/dist/esm/components/KmErpSendGood/index.js +1 -1
- package/dist/esm/components/MsgStatus/index.js +6 -1
- package/dist/esm/components/OrderSubForm/index.d.ts +49 -0
- package/dist/esm/components/OrderSubForm/index.js +268 -0
- package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
- package/dist/esm/components/Payment/PaymentAmount.js +0 -4
- package/dist/esm/components/Public/Goods/index.d.ts +3 -0
- package/dist/esm/components/Public/Goods/index.js +3 -0
- package/dist/esm/components/SKX/SkxGoods/index.js +4 -0
- package/dist/esm/components/SKX/SkxIdInputSelect/index.js +7 -6
- package/dist/esm/components/Select/index.js +3 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +13 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/type.d.ts +37 -0
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
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
|
+
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
import { DEFAULT_FIELD_TYPE_LIST, servers, TEMPLATE_ID } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
|
+
import { useEffect, useState } from "react";
|
|
19
|
+
import ShopList from "../commonComponents/ShopList";
|
|
20
|
+
import { factory } from "../factory";
|
|
21
|
+
import { useColumnsConfig } from "./useColumnsConfig";
|
|
22
|
+
var toArray = function toArray(data) {
|
|
23
|
+
if (Array.isArray(data)) return data;
|
|
24
|
+
if (data && _typeof(data) === "object") return [data];
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
var stringToNumber = function stringToNumber(str) {
|
|
28
|
+
if (typeof str === 'number') return str;
|
|
29
|
+
// 检查输入是否为字符串类型
|
|
30
|
+
if (typeof str !== "string") return null;
|
|
31
|
+
|
|
32
|
+
// 去除首尾空白字符
|
|
33
|
+
str = str.trim();
|
|
34
|
+
|
|
35
|
+
// 检查是否为空字符串
|
|
36
|
+
if (str === "") {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
var num = Number(str);
|
|
40
|
+
if (isNaN(num)) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return num;
|
|
44
|
+
};
|
|
45
|
+
var getShopList = function getShopList() {
|
|
46
|
+
return servers.singletonWrap(function () {
|
|
47
|
+
return servers.queryShopList();
|
|
48
|
+
}, {
|
|
49
|
+
name: "getShopList",
|
|
50
|
+
key: "getShopList",
|
|
51
|
+
cacheTime: 1000 * 60 * 3
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
var queryCompanyUserSimpleInfoList = function queryCompanyUserSimpleInfoList() {
|
|
55
|
+
return servers.singletonWrap(function () {
|
|
56
|
+
return servers.queryCompanyUserSimpleInfoList();
|
|
57
|
+
}, {
|
|
58
|
+
name: "queryCompanyUserSimpleInfoList",
|
|
59
|
+
key: "queryCompanyUserSimpleInfoList",
|
|
60
|
+
cacheTime: 1000 * 60 * 3
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
var getPublishFlowDetail = function getPublishFlowDetail(flowTemplateKey) {
|
|
64
|
+
return servers.singletonWrap(function () {
|
|
65
|
+
return servers.getPublishFlowDetail(flowTemplateKey);
|
|
66
|
+
}, {
|
|
67
|
+
name: "getPublishFlowDetail",
|
|
68
|
+
key: flowTemplateKey,
|
|
69
|
+
cacheTime: 1000 * 10
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
var getGroupList = function getGroupList() {
|
|
73
|
+
return servers.singletonWrap(function () {
|
|
74
|
+
return servers.getGroupList();
|
|
75
|
+
}, {
|
|
76
|
+
name: "getGroupList",
|
|
77
|
+
key: "getGroupList",
|
|
78
|
+
cacheTime: 1000 * 60 * 3
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
var queryColumnsConfig = function queryColumnsConfig(params) {
|
|
82
|
+
return servers.singletonWrap(function () {
|
|
83
|
+
return servers.queryColumnsConfig(_objectSpread({
|
|
84
|
+
isGroupNode: false
|
|
85
|
+
}, params));
|
|
86
|
+
}, {
|
|
87
|
+
name: "queryColumnsConfig",
|
|
88
|
+
key: "".concat(params.flowTemplateKey, "_").concat(params.nodeId, "_").concat(params.templateId),
|
|
89
|
+
cacheTime: 1000 * 10
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var sortArr = function sortArr(arr) {
|
|
93
|
+
return arr.sort(function (_ref, _ref2) {
|
|
94
|
+
var a = _ref.index;
|
|
95
|
+
var b = _ref2.index;
|
|
96
|
+
// 检查 a 和 b 是否为数字
|
|
97
|
+
var aIsNum = typeof a === "number" && !isNaN(a);
|
|
98
|
+
var bIsNum = typeof b === "number" && !isNaN(b);
|
|
99
|
+
if (aIsNum && bIsNum) {
|
|
100
|
+
// 都是数字,按数值大小排序
|
|
101
|
+
return a - b;
|
|
102
|
+
} else if (aIsNum) {
|
|
103
|
+
// a 是数字,b 不是,a 排在前面
|
|
104
|
+
return -1;
|
|
105
|
+
} else if (bIsNum) {
|
|
106
|
+
// b 是数字,a 不是,b 排在前面
|
|
107
|
+
return 1;
|
|
108
|
+
} else {
|
|
109
|
+
// 都不是数字,保持相对顺序(或都排最后)
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
var findIndex = function findIndex(field, dataFilterConfig) {
|
|
115
|
+
var smallest = Number.MAX_VALUE;
|
|
116
|
+
if (dataFilterConfig) {
|
|
117
|
+
field.children.forEach(function (child) {
|
|
118
|
+
var _child$children, _dataFilterConfig;
|
|
119
|
+
var key = child.dataIndex || child.formField;
|
|
120
|
+
var index = (_child$children = child.children) !== null && _child$children !== void 0 && _child$children.length ? findIndex(child, dataFilterConfig) : (_dataFilterConfig = dataFilterConfig[key]) === null || _dataFilterConfig === void 0 ? void 0 : _dataFilterConfig.index;
|
|
121
|
+
if (typeof index === "number" && index < smallest) {
|
|
122
|
+
smallest = index;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return smallest < Number.MAX_VALUE ? smallest : void 0;
|
|
127
|
+
};
|
|
128
|
+
var filterTableColumn = function filterTableColumn(cols, dataFilterConfig) {
|
|
129
|
+
return cols.filter(function (col) {
|
|
130
|
+
var _col$children;
|
|
131
|
+
if ((_col$children = col.children) !== null && _col$children !== void 0 && _col$children.length) {
|
|
132
|
+
var _col$children2;
|
|
133
|
+
// 如果是复合组件
|
|
134
|
+
col.children = filterTableColumn(col.children, dataFilterConfig);
|
|
135
|
+
return (_col$children2 = col.children) === null || _col$children2 === void 0 ? void 0 : _col$children2.length;
|
|
136
|
+
} else {
|
|
137
|
+
var _dataFilterConfig2;
|
|
138
|
+
var _key = col.formField || col.dataIndex;
|
|
139
|
+
return dataFilterConfig === null || dataFilterConfig === void 0 ? void 0 : (_dataFilterConfig2 = dataFilterConfig[_key]) === null || _dataFilterConfig2 === void 0 ? void 0 : _dataFilterConfig2.isShow;
|
|
140
|
+
// return true;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
146
|
+
var _goodsSource$sourceSe, _goodsSource$sourceSe2, _goodsSource$sourceSe3;
|
|
147
|
+
var _useState = useState([]),
|
|
148
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
149
|
+
filterItems = _useState2[0],
|
|
150
|
+
setFilterItems = _useState2[1];
|
|
151
|
+
var _useState3 = useState([]),
|
|
152
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
153
|
+
allTableColumns = _useState4[0],
|
|
154
|
+
setAllTableColumns = _useState4[1];
|
|
155
|
+
var _useState5 = useState(),
|
|
156
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
157
|
+
flowTemplateKey = _useState6[0],
|
|
158
|
+
setFlowTemplateKey = _useState6[1];
|
|
159
|
+
var _useState7 = useState(),
|
|
160
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
161
|
+
flowNodeId = _useState8[0],
|
|
162
|
+
setFlowNodeId = _useState8[1];
|
|
163
|
+
var _useState9 = useState(),
|
|
164
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
165
|
+
templateKey = _useState10[0],
|
|
166
|
+
setTemplateKey = _useState10[1];
|
|
167
|
+
var _useState11 = useState(),
|
|
168
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
169
|
+
shopList = _useState12[0],
|
|
170
|
+
setShopList = _useState12[1];
|
|
171
|
+
var _useState13 = useState(),
|
|
172
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
173
|
+
userList = _useState14[0],
|
|
174
|
+
setUserList = _useState14[1];
|
|
175
|
+
var _useState15 = useState(),
|
|
176
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
177
|
+
groupList = _useState16[0],
|
|
178
|
+
setGroupList = _useState16[1];
|
|
179
|
+
// 表格展示列头
|
|
180
|
+
var _useState17 = useState([]),
|
|
181
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
182
|
+
tableColumns = _useState18[0],
|
|
183
|
+
setTableColumns = _useState18[1];
|
|
184
|
+
// console.log(`**** 数据源配置:`, { goodsSource, filterItems });
|
|
185
|
+
|
|
186
|
+
var queryComponentsConfig = {
|
|
187
|
+
filterType: {
|
|
188
|
+
every: 0,
|
|
189
|
+
some: 1
|
|
190
|
+
}[(goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe = goodsSource.sourceSettings) === null || _goodsSource$sourceSe === void 0 ? void 0 : _goodsSource$sourceSe.filterMode) || "every"],
|
|
191
|
+
preQueryComponents: goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe2 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe2 === void 0 ? void 0 : (_goodsSource$sourceSe3 = _goodsSource$sourceSe2.filterRules) === null || _goodsSource$sourceSe3 === void 0 ? void 0 : _goodsSource$sourceSe3.map(function (rule) {
|
|
192
|
+
var _rule$leftValue, _rule$leftValue$split;
|
|
193
|
+
var key = (_rule$leftValue = rule.leftValue) === null || _rule$leftValue === void 0 ? void 0 : (_rule$leftValue$split = _rule$leftValue.split(".")[2]) === null || _rule$leftValue$split === void 0 ? void 0 : _rule$leftValue$split.replace(/#$/, "");
|
|
194
|
+
if (key === 'flowCreator') {
|
|
195
|
+
var _rule$rightValue, _rule$rightValue2;
|
|
196
|
+
var value = new Set();
|
|
197
|
+
(((_rule$rightValue = rule.rightValue) === null || _rule$rightValue === void 0 ? void 0 : _rule$rightValue.staffIds) || []).map(function (userKey) {
|
|
198
|
+
var user = userList === null || userList === void 0 ? void 0 : userList.find(function (item) {
|
|
199
|
+
return item.value === userKey;
|
|
200
|
+
});
|
|
201
|
+
if (user !== null && user !== void 0 && user.label) {
|
|
202
|
+
value.add(user.label);
|
|
203
|
+
} else {
|
|
204
|
+
value.add(userKey);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
(((_rule$rightValue2 = rule.rightValue) === null || _rule$rightValue2 === void 0 ? void 0 : _rule$rightValue2.groupIds) || []).forEach(function (groupId) {
|
|
208
|
+
var _group$relationUserLi;
|
|
209
|
+
var group = groupList === null || groupList === void 0 ? void 0 : groupList.find(function (item) {
|
|
210
|
+
return item.value === groupId;
|
|
211
|
+
});
|
|
212
|
+
group === null || group === void 0 ? void 0 : (_group$relationUserLi = group.relationUserList) === null || _group$relationUserLi === void 0 ? void 0 : _group$relationUserLi.map(function (item) {
|
|
213
|
+
value.add(item.userName);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
return {
|
|
217
|
+
key: key,
|
|
218
|
+
symbol: rule.compareSymbol,
|
|
219
|
+
value: _toConsumableArray(value)
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
key: key === 'shopName' ? 'shopNameList' : key,
|
|
224
|
+
symbol: rule.compareSymbol,
|
|
225
|
+
value: rule.rightValue
|
|
226
|
+
};
|
|
227
|
+
})
|
|
228
|
+
};
|
|
229
|
+
var _useColumnsConfig = useColumnsConfig({}),
|
|
230
|
+
tableColumnConfig = _useColumnsConfig.tableColumnConfig;
|
|
231
|
+
var workOrderDataToGoods = function workOrderDataToGoods(data, erp) {
|
|
232
|
+
var _goodsSource$sourceSe4;
|
|
233
|
+
// gy商品 接口返回,和选中的 都是这个
|
|
234
|
+
// brandName: "小白熊"
|
|
235
|
+
// brandNo: "BRD01"
|
|
236
|
+
// categoryName: "03母乳保存"
|
|
237
|
+
// categoryType: "18"
|
|
238
|
+
// companyKey: "SZF4ZGWZSNW6PYXMCIFEWBXT"
|
|
239
|
+
// costPrice: "13.1802"
|
|
240
|
+
// goodId: "535367779990"
|
|
241
|
+
// goodName: "母乳收集器(2只装)"
|
|
242
|
+
// goodNo: "XCP.01.03.20001"
|
|
243
|
+
// goodPicUrl: ""
|
|
244
|
+
// goodShortName: "08395"
|
|
245
|
+
// id: 162457
|
|
246
|
+
// isGift: false
|
|
247
|
+
// isSkuItem: true
|
|
248
|
+
// isVirtual: false
|
|
249
|
+
// platform: "GY_ERP"
|
|
250
|
+
// retailPrice: "59.0"
|
|
251
|
+
// specBarcode: "6951406983951"
|
|
252
|
+
// specId: "535367763578"
|
|
253
|
+
// specName: "2入装"
|
|
254
|
+
// specNo: "XCP.01.03.20001"
|
|
255
|
+
|
|
256
|
+
// 配置的值 keyMap
|
|
257
|
+
// amount: "adidBRdsfi"
|
|
258
|
+
// amountAfter: "qzBjJj8sfi"
|
|
259
|
+
// cancel: "qzBjJj8sfi"
|
|
260
|
+
// discountFee: "qzBjJj8sfi"
|
|
261
|
+
// goodName: "qzBjJj8sfi"
|
|
262
|
+
// goodNo: "Q8ZZHLWlki"
|
|
263
|
+
// goodShortName: "adidBRdsfi"
|
|
264
|
+
// isGift: "qzBjJj8sfi"
|
|
265
|
+
// originAmount: "qzBjJj8sfi"
|
|
266
|
+
// originPrice: "qzBjJj8sfi"
|
|
267
|
+
// price: "qzBjJj8sfi"
|
|
268
|
+
// qty: "qzBjJj8sfi"
|
|
269
|
+
// skuNote: "qzBjJj8sfi"
|
|
270
|
+
// specName: "qzBjJj8sfi"
|
|
271
|
+
// specNo: "qzBjJj8sfi"
|
|
272
|
+
// console.log("*** 商品 数据转换", {
|
|
273
|
+
// data,
|
|
274
|
+
// erp,
|
|
275
|
+
// keyMap: goodsSource?.sourceSettings.keyMap,
|
|
276
|
+
// });
|
|
277
|
+
var goods = {};
|
|
278
|
+
var keyMap = (goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe4 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe4 === void 0 ? void 0 : _goodsSource$sourceSe4.keyMap) || {};
|
|
279
|
+
var ids = _toConsumableArray(new Set(Object.values(keyMap)));
|
|
280
|
+
var fieldMap = new Map();
|
|
281
|
+
ids.forEach(function (id) {
|
|
282
|
+
var field = allTableColumns.find(function (column) {
|
|
283
|
+
return column.id === id;
|
|
284
|
+
});
|
|
285
|
+
if (field) {
|
|
286
|
+
fieldMap.set(id, field);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
// console.log(`🚀 ~ 组件 ids:`, ids, allTableColumns, fieldMap);
|
|
290
|
+
Object.entries(keyMap).forEach(function (_ref3) {
|
|
291
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
292
|
+
key = _ref4[0],
|
|
293
|
+
id = _ref4[1];
|
|
294
|
+
var field = fieldMap.get(id);
|
|
295
|
+
if (!field) return;
|
|
296
|
+
// PS: 当前只有输入框/多行文本框/单选/下拉单选 所以不用考虑复合组件
|
|
297
|
+
var fillValue = field.formField ? data[field.formField] : void 0;
|
|
298
|
+
if (field.type === "RADIO" && data["".concat(field.id, "_radioOther")]) {
|
|
299
|
+
fillValue = data["".concat(field.id, "_radioOther")];
|
|
300
|
+
}
|
|
301
|
+
if (["isGift", "cancel"].includes(key)) {
|
|
302
|
+
fillValue = fillValue === "是" ? 1 : fillValue === "否" ? 0 : void 0;
|
|
303
|
+
}
|
|
304
|
+
goods[key] = ["qty", "price", "amount", "originPrice", "originAmount", "discountFee", "amountAfter"].includes(key) ? stringToNumber(fillValue) : fillValue;
|
|
305
|
+
});
|
|
306
|
+
goods.id = data.id;
|
|
307
|
+
// console.log("***** 转换之后的 values", goods);
|
|
308
|
+
return goods;
|
|
309
|
+
};
|
|
310
|
+
useEffect(function () {
|
|
311
|
+
getShopList().then(function (_ref5) {
|
|
312
|
+
var data = _ref5.data;
|
|
313
|
+
setShopList(data);
|
|
314
|
+
}).catch(console.warn);
|
|
315
|
+
queryCompanyUserSimpleInfoList().then(function (_ref6) {
|
|
316
|
+
var data = _ref6.data;
|
|
317
|
+
setUserList((data || []).map(function (_ref7) {
|
|
318
|
+
var account = _ref7.account,
|
|
319
|
+
userKey = _ref7.userKey;
|
|
320
|
+
return {
|
|
321
|
+
label: account,
|
|
322
|
+
value: userKey
|
|
323
|
+
};
|
|
324
|
+
}));
|
|
325
|
+
}).catch(console.warn);
|
|
326
|
+
getGroupList().then(function (_ref8) {
|
|
327
|
+
var data = _ref8.data;
|
|
328
|
+
setGroupList((data || []).map(function (_ref9) {
|
|
329
|
+
var groupUniqueKey = _ref9.groupUniqueKey,
|
|
330
|
+
groupName = _ref9.groupName,
|
|
331
|
+
relationUserList = _ref9.relationUserList;
|
|
332
|
+
return {
|
|
333
|
+
label: groupName,
|
|
334
|
+
value: groupUniqueKey,
|
|
335
|
+
relationUserList: relationUserList
|
|
336
|
+
};
|
|
337
|
+
}));
|
|
338
|
+
}).catch(console.warn);
|
|
339
|
+
|
|
340
|
+
// return () => {
|
|
341
|
+
// setShopList(void 0);
|
|
342
|
+
// setUserList(void 0);
|
|
343
|
+
// setGroupList(void 0);
|
|
344
|
+
// };
|
|
345
|
+
}, []);
|
|
346
|
+
useEffect(function () {
|
|
347
|
+
var _goodsSource$sourceSe5;
|
|
348
|
+
var _ref10 = (goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe5 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe5 === void 0 ? void 0 : _goodsSource$sourceSe5.workOrder) || {},
|
|
349
|
+
flowTemplateKey = _ref10.flowTemplateKey,
|
|
350
|
+
nodeId = _ref10.nodeId;
|
|
351
|
+
if ((goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.source) === "workOrder" && flowTemplateKey && nodeId && shopList && userList && groupList) {
|
|
352
|
+
setFilterItems([]);
|
|
353
|
+
setAllTableColumns([]);
|
|
354
|
+
setTemplateKey(undefined);
|
|
355
|
+
setTableColumns([]);
|
|
356
|
+
setFlowTemplateKey(flowTemplateKey);
|
|
357
|
+
setFlowNodeId(nodeId);
|
|
358
|
+
getPublishFlowDetail(flowTemplateKey).then(function (_ref11) {
|
|
359
|
+
var _data$flowConfig, _data$flowConfig$node, _currentNodeInfo$rela;
|
|
360
|
+
var data = _ref11.data;
|
|
361
|
+
var currentNodeInfo = data === null || data === void 0 ? void 0 : (_data$flowConfig = data.flowConfig) === null || _data$flowConfig === void 0 ? void 0 : (_data$flowConfig$node = _data$flowConfig.nodes) === null || _data$flowConfig$node === void 0 ? void 0 : _data$flowConfig$node.find(function (node) {
|
|
362
|
+
return node.id === nodeId;
|
|
363
|
+
});
|
|
364
|
+
var workOrderTemplateId = currentNodeInfo === null || currentNodeInfo === void 0 ? void 0 : (_currentNodeInfo$rela = currentNodeInfo.relationEvent) === null || _currentNodeInfo$rela === void 0 ? void 0 : _currentNodeInfo$rela.workOrderTemplateId;
|
|
365
|
+
// console.log("**** in 获取到流程数据", {
|
|
366
|
+
// data,
|
|
367
|
+
// currentNodeInfo,
|
|
368
|
+
// workOrderTemplateId,
|
|
369
|
+
// });
|
|
370
|
+
if (workOrderTemplateId) {
|
|
371
|
+
queryColumnsConfig({
|
|
372
|
+
flowTemplateKey: flowTemplateKey,
|
|
373
|
+
nodeId: nodeId,
|
|
374
|
+
templateId: workOrderTemplateId
|
|
375
|
+
}).then(function (_ref12) {
|
|
376
|
+
var _data$fixedColumns, _goodsSource$sourceSe13;
|
|
377
|
+
var data = _ref12.data;
|
|
378
|
+
var columnsList = data === null || data === void 0 ? void 0 : (_data$fixedColumns = data.fixedColumns) === null || _data$fixedColumns === void 0 ? void 0 : _data$fixedColumns.concat(data === null || data === void 0 ? void 0 : data.nonFixedColumns);
|
|
379
|
+
var newFilterItems = [];
|
|
380
|
+
columnsList === null || columnsList === void 0 ? void 0 : columnsList.forEach(function (l) {
|
|
381
|
+
var instance = factory(l.type, {
|
|
382
|
+
id: l.id,
|
|
383
|
+
name: l.name,
|
|
384
|
+
type: l.type,
|
|
385
|
+
componentConfig: _objectSpread(_objectSpread({}, l === null || l === void 0 ? void 0 : l.config), l === null || l === void 0 ? void 0 : l.templateConfig),
|
|
386
|
+
renderExport: function renderExport() {
|
|
387
|
+
return null;
|
|
388
|
+
},
|
|
389
|
+
effects: {
|
|
390
|
+
shopList: shopList,
|
|
391
|
+
userList: userList,
|
|
392
|
+
groupList: groupList
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
var filterConfigList = toArray(instance === null || instance === void 0 ? void 0 : instance.filterConfig(l)).filter(function (item) {
|
|
396
|
+
var _goodsSource$sourceSe6, _goodsSource$sourceSe7;
|
|
397
|
+
return ((_goodsSource$sourceSe6 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe6 === void 0 ? void 0 : (_goodsSource$sourceSe7 = _goodsSource$sourceSe6.dataFilterConfig[item.formField || item.id]) === null || _goodsSource$sourceSe7 === void 0 ? void 0 : _goodsSource$sourceSe7.isFilter) && !(DEFAULT_FIELD_TYPE_LIST.includes(item.type) || item.type === TEMPLATE_ID);
|
|
398
|
+
});
|
|
399
|
+
newFilterItems = newFilterItems.concat(filterConfigList.map(function (item) {
|
|
400
|
+
var _goodsSource$sourceSe8, _goodsSource$sourceSe9;
|
|
401
|
+
item.index = (_goodsSource$sourceSe8 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe8 === void 0 ? void 0 : (_goodsSource$sourceSe9 = _goodsSource$sourceSe8.dataFilterConfig[item.formField || item.id]) === null || _goodsSource$sourceSe9 === void 0 ? void 0 : _goodsSource$sourceSe9.index;
|
|
402
|
+
return item;
|
|
403
|
+
}));
|
|
404
|
+
});
|
|
405
|
+
var allTableColumns = sortArr(columnsList.reduce(tableColumnConfig, []).map(function (item) {
|
|
406
|
+
var _item$children, _goodsSource$sourceSe10, _goodsSource$sourceSe11, _goodsSource$sourceSe12;
|
|
407
|
+
var _index = (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? findIndex(item, (_goodsSource$sourceSe10 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe10 === void 0 ? void 0 : _goodsSource$sourceSe10.dataFilterConfig) : (_goodsSource$sourceSe11 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe11 === void 0 ? void 0 : (_goodsSource$sourceSe12 = _goodsSource$sourceSe11.dataFilterConfig[item.sortField]) === null || _goodsSource$sourceSe12 === void 0 ? void 0 : _goodsSource$sourceSe12.index;
|
|
408
|
+
item.index = _index;
|
|
409
|
+
return item;
|
|
410
|
+
}));
|
|
411
|
+
var newTableColumns = filterTableColumn(allTableColumns, (_goodsSource$sourceSe13 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe13 === void 0 ? void 0 : _goodsSource$sourceSe13.dataFilterConfig);
|
|
412
|
+
setTableColumns(newTableColumns);
|
|
413
|
+
setFilterItems(sortArr(newFilterItems));
|
|
414
|
+
setAllTableColumns(allTableColumns);
|
|
415
|
+
setTemplateKey(workOrderTemplateId);
|
|
416
|
+
// console.log("**** in 获取到表头信息", {
|
|
417
|
+
// newTableColumns,
|
|
418
|
+
// data,
|
|
419
|
+
// newFilterItems,
|
|
420
|
+
// allTableColumns,
|
|
421
|
+
// });
|
|
422
|
+
}).catch(function (error) {
|
|
423
|
+
console.log("**** 获取表头信息 error", error);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}).catch(function (error) {
|
|
427
|
+
console.log("**** in 获取流程数据 error", error);
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}, [shopList, userList, groupList]);
|
|
431
|
+
return {
|
|
432
|
+
flowTemplateKey: flowTemplateKey,
|
|
433
|
+
flowNodeId: flowNodeId,
|
|
434
|
+
templateKey: templateKey,
|
|
435
|
+
filterItems: filterItems,
|
|
436
|
+
tableColumns: tableColumns,
|
|
437
|
+
ShopList: ShopList,
|
|
438
|
+
workOrderDataToGoods: workOrderDataToGoods,
|
|
439
|
+
queryComponentsConfig: queryComponentsConfig
|
|
440
|
+
};
|
|
441
|
+
};
|
|
@@ -34,18 +34,21 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
34
34
|
renderExport: () => null;
|
|
35
35
|
editRender: (p: any) => React.JSX.Element;
|
|
36
36
|
filterConfig: (item: ColumnConfig) => ({
|
|
37
|
+
searchDefaultConditions: "in";
|
|
37
38
|
filterComponentType: "MultipleSelect";
|
|
38
39
|
props: {
|
|
39
40
|
options: any[];
|
|
40
41
|
filterOptions?: undefined;
|
|
41
42
|
};
|
|
42
43
|
filterFn: (value: string) => (i: Record) => any;
|
|
43
|
-
searchDefaultConditions: "in";
|
|
44
44
|
type: string;
|
|
45
45
|
id: string;
|
|
46
46
|
name: string;
|
|
47
47
|
} | {
|
|
48
|
-
searchDefaultConditions:
|
|
48
|
+
searchDefaultConditions: {
|
|
49
|
+
in: "in";
|
|
50
|
+
anylike: "anylike";
|
|
51
|
+
};
|
|
49
52
|
type: string;
|
|
50
53
|
id: string;
|
|
51
54
|
name: string;
|
|
@@ -82,6 +82,14 @@ var typeMap = {
|
|
|
82
82
|
companyDataType: "arrayObject",
|
|
83
83
|
companyCodeType: "arrayObject"
|
|
84
84
|
},
|
|
85
|
+
JY_LOGISTICS: {
|
|
86
|
+
key: "jyLogisticsList",
|
|
87
|
+
name: "巨益",
|
|
88
|
+
company: "jyLogisticsCompany",
|
|
89
|
+
code: "jyLogisticsCode",
|
|
90
|
+
platformType: "jy",
|
|
91
|
+
companyDataType: "arrayObject"
|
|
92
|
+
},
|
|
85
93
|
SKX_LOGISTICS: {
|
|
86
94
|
key: "skxLogisticsList",
|
|
87
95
|
name: "斯凯奇",
|
|
@@ -91,6 +99,16 @@ var typeMap = {
|
|
|
91
99
|
companyDataType: "like",
|
|
92
100
|
companyCodeType: "like",
|
|
93
101
|
logisticsCompanyFormType: "input"
|
|
102
|
+
},
|
|
103
|
+
SKX_RETURN_LOGISTICS: {
|
|
104
|
+
key: "skxReturnLogistics",
|
|
105
|
+
name: "斯凯奇退货",
|
|
106
|
+
company: "skxReturnLogisticsCompany",
|
|
107
|
+
code: "skxReturnLogisticsCode",
|
|
108
|
+
platformType: "skx",
|
|
109
|
+
companyDataType: "like",
|
|
110
|
+
companyCodeType: "like",
|
|
111
|
+
logisticsCompanyFormType: "input"
|
|
94
112
|
}
|
|
95
113
|
};
|
|
96
114
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
@@ -157,6 +175,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
157
175
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
158
176
|
var _typeMap$_this$type2, _typeMap$_this$type3;
|
|
159
177
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
|
|
178
|
+
console.log("\uD83D\uDE80 ~ index.tsx:234 ~ list:", list);
|
|
160
179
|
//兼容多个商品
|
|
161
180
|
return /*#__PURE__*/React.createElement("span", {
|
|
162
181
|
onClick: function onClick(e) {
|
|
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { isNull, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { BsSystemOrderTable } from "../../Common";
|
|
17
17
|
import { BsHeaderChild } from "../common/index";
|
|
@@ -23,7 +23,8 @@ var typeMap = {
|
|
|
23
23
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG,
|
|
24
24
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG,
|
|
25
25
|
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG,
|
|
26
|
-
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG
|
|
26
|
+
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG,
|
|
27
|
+
JY_SYSTEM_ORDER: JY_SYSTEM_ORDER_CONFIG
|
|
27
28
|
};
|
|
28
29
|
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
29
30
|
var _this = this,
|
|
@@ -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 BsHeaderChild 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
|
parentName?: string;
|
|
17
17
|
transformValue: (val: any, record?: any, parentName?: string) => any;
|
|
18
18
|
export: (val: any, record?: any, parentName?: string) => any;
|
|
@@ -11,9 +11,9 @@ 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 BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
18
18
|
var _this = this;
|
|
19
19
|
_classCallCheck(this, BsHeaderChild);
|
|
@@ -37,7 +37,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
37
37
|
return val;
|
|
38
38
|
});
|
|
39
39
|
_defineProperty(this, "getParentId", function () {
|
|
40
|
-
var _this$id$split = _this.id.split(
|
|
40
|
+
var _this$id$split = _this.id.split("_"),
|
|
41
41
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
42
42
|
key = _this$id$split2[0],
|
|
43
43
|
name = _this$id$split2[1],
|
|
@@ -53,7 +53,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
53
53
|
});
|
|
54
54
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
55
55
|
var _this$getComponentVal;
|
|
56
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
56
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
57
57
|
});
|
|
58
58
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
59
|
var id = _this.getParentId();
|
|
@@ -68,8 +68,8 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
68
68
|
});
|
|
69
69
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
70
70
|
var _this$getComponentExp;
|
|
71
|
-
var val = (_this$getComponentExp = _this.getComponentExport(record)) !== null && _this$getComponentExp !== void 0 ? _this$getComponentExp :
|
|
72
|
-
return typeof val ===
|
|
71
|
+
var val = (_this$getComponentExp = _this.getComponentExport(record)) !== null && _this$getComponentExp !== void 0 ? _this$getComponentExp : "--";
|
|
72
|
+
return typeof val === "number" ? val + "" : val;
|
|
73
73
|
});
|
|
74
74
|
_defineProperty(this, "editRender", function () {
|
|
75
75
|
return null;
|
|
@@ -86,11 +86,11 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
86
86
|
this.parentName = options.parentName;
|
|
87
87
|
}
|
|
88
88
|
this.componentConfig = options.componentConfig;
|
|
89
|
-
this.align =
|
|
89
|
+
this.align = "left";
|
|
90
90
|
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
91
91
|
this.isCombinationComponent = false;
|
|
92
92
|
this.canSort = false;
|
|
93
|
-
this.dataType =
|
|
93
|
+
this.dataType = "string";
|
|
94
94
|
this.children = [];
|
|
95
95
|
if (options.transformValue) {
|
|
96
96
|
this.transformValue = options.transformValue;
|
|
@@ -12,8 +12,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
14
|
import React from "react";
|
|
15
|
-
import { Image } from "antd";
|
|
16
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { BsGoodPic } from "../../Common";
|
|
17
17
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
19
19
|
var _this = this;
|
|
@@ -46,14 +46,9 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
|
46
46
|
}) : null;
|
|
47
47
|
});
|
|
48
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
54
|
-
width: 60,
|
|
55
|
-
src: _this.getComponentValue(record)
|
|
56
|
-
}));
|
|
49
|
+
var picValue = _this.getComponentValue(record);
|
|
50
|
+
var imgList = picValue ? picValue === null || picValue === void 0 ? void 0 : picValue.split(",") : [];
|
|
51
|
+
return BsGoodPic(imgList);
|
|
57
52
|
});
|
|
58
53
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
54
|
var id = _this.getParentId();
|
|
@@ -26,7 +26,10 @@ declare class ExpressCode implements ComponentInterface {
|
|
|
26
26
|
renderExport: (value: string, record: Record) => any;
|
|
27
27
|
editRender: () => null;
|
|
28
28
|
filterConfig: (item: ColumnConfig) => {
|
|
29
|
-
searchDefaultConditions:
|
|
29
|
+
searchDefaultConditions: {
|
|
30
|
+
in: "in";
|
|
31
|
+
anylike: "anylike";
|
|
32
|
+
};
|
|
30
33
|
type: string;
|
|
31
34
|
id: string;
|
|
32
35
|
name: string;
|