@kmkf-fe-packages/services-components 2.0.54-beta.46 → 2.0.54-beta.48
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.
|
@@ -143,6 +143,11 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
143
143
|
});
|
|
144
144
|
_defineProperty(this, "editRender", function (p) {
|
|
145
145
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
|
|
146
|
+
var onChange = function onChange(val, type) {
|
|
147
|
+
if (_this.type === "KM_REISSUE_GOODS" && type === "systemOrder") {
|
|
148
|
+
p === null || p === void 0 ? void 0 : p.onChange(val, "kmSystemOrder");
|
|
149
|
+
}
|
|
150
|
+
};
|
|
146
151
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
147
152
|
title: _this.name,
|
|
148
153
|
name: _this.id,
|
|
@@ -157,7 +162,8 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
157
162
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
158
163
|
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
159
164
|
width: "90%",
|
|
160
|
-
type: _this.type
|
|
165
|
+
type: _this.type,
|
|
166
|
+
onChange: onChange
|
|
161
167
|
}))
|
|
162
168
|
});
|
|
163
169
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class ThirdItemSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -12,7 +12,7 @@ declare class ThirdItemSelect implements ComponentInterface {
|
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
sortChildField: {
|
|
17
17
|
name: string;
|
|
18
18
|
key: string;
|
|
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
9
|
+
import React from "react";
|
|
10
10
|
import GetFormItem from "../GetFormItem";
|
|
11
11
|
import ItemEncode from "./ItemEncode";
|
|
12
12
|
import { GoodImage } from "../Common";
|
|
13
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
|
|
17
17
|
var _this = this,
|
|
@@ -33,12 +33,12 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
33
33
|
_defineProperty(this, "getSortChildFields", function () {
|
|
34
34
|
var _this$componentConfig, _this$componentConfig2;
|
|
35
35
|
return [{
|
|
36
|
-
name:
|
|
36
|
+
name: "供应商编码",
|
|
37
37
|
key: "".concat(_this.id, "_itemId"),
|
|
38
38
|
dataType: "arrayObject",
|
|
39
39
|
disabled: !((_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.enableItemId)
|
|
40
40
|
}, {
|
|
41
|
-
name:
|
|
41
|
+
name: "供应商名称",
|
|
42
42
|
key: "".concat(_this.id, "_supplierName"),
|
|
43
43
|
dataType: "arrayObject",
|
|
44
44
|
disabled: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableSupplierName)
|
|
@@ -77,10 +77,10 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
77
77
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")];
|
|
78
78
|
});
|
|
79
79
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
80
|
-
var _ref;
|
|
81
|
-
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
|
|
82
|
-
return "\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || item.supplierItemOuterId ||
|
|
83
|
-
});
|
|
80
|
+
var _ref, _ref$map;
|
|
81
|
+
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : (_ref$map = _ref.map(function (item) {
|
|
82
|
+
return "\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || item.supplierItemOuterId || "", " \u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || "");
|
|
83
|
+
})) === null || _ref$map === void 0 ? void 0 : _ref$map.join(" ");
|
|
84
84
|
});
|
|
85
85
|
_defineProperty(this, "editRender", function (p) {
|
|
86
86
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2;
|
|
@@ -91,7 +91,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
91
91
|
required: false,
|
|
92
92
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
93
93
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
94
|
-
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 :
|
|
94
|
+
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 : "",
|
|
95
95
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
96
96
|
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
97
97
|
type: 4,
|
|
@@ -109,11 +109,11 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
109
109
|
// 过滤组件id
|
|
110
110
|
name: item.name,
|
|
111
111
|
// 过滤组件名称
|
|
112
|
-
filterComponentType:
|
|
112
|
+
filterComponentType: "Input",
|
|
113
113
|
filterFn: function filterFn(value) {
|
|
114
114
|
return function (i) {
|
|
115
115
|
var _ref2;
|
|
116
|
-
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
116
|
+
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "itemList") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
117
117
|
var _String, _String2;
|
|
118
118
|
var id = item !== null && item !== void 0 && item.itemId ? (_String = String(item === null || item === void 0 ? void 0 : item.itemId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
119
119
|
var name = item !== null && item !== void 0 && item.supplierName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplierName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
|
|
@@ -123,7 +123,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
});
|
|
126
|
-
this.name = options.name ||
|
|
126
|
+
this.name = options.name || "供应商编码/名称";
|
|
127
127
|
this.id = options.id;
|
|
128
128
|
this.sortField = "".concat(options.id, "_itemList");
|
|
129
129
|
this.formField = "".concat(options.id, "_itemList");
|
|
@@ -133,25 +133,25 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
133
133
|
this.isCombinationComponent = false;
|
|
134
134
|
this.canSort = false;
|
|
135
135
|
this.children = [];
|
|
136
|
-
this.dataType =
|
|
136
|
+
this.dataType = "array";
|
|
137
137
|
this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
138
138
|
required: true,
|
|
139
139
|
validator: function validator(_, value) {
|
|
140
140
|
var _this$componentConfig7, _this$componentConfig8;
|
|
141
141
|
if (!value || !value.length) {
|
|
142
|
-
return Promise.reject(new Error(
|
|
142
|
+
return Promise.reject(new Error("请选择宝贝"));
|
|
143
143
|
}
|
|
144
144
|
var hasNotId = (value || []).some(function (item) {
|
|
145
145
|
return !item.itemId && !item.supplierItemOuterId;
|
|
146
146
|
});
|
|
147
147
|
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableItemId && hasNotId) {
|
|
148
|
-
return Promise.reject(new Error(
|
|
148
|
+
return Promise.reject(new Error("请输入供应商编码"));
|
|
149
149
|
}
|
|
150
150
|
var hasNotName = (value || []).some(function (item) {
|
|
151
151
|
return !item.supplierName;
|
|
152
152
|
});
|
|
153
153
|
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.enableSupplierName && hasNotName) {
|
|
154
|
-
return Promise.reject(new Error(
|
|
154
|
+
return Promise.reject(new Error("请输入供应商名称"));
|
|
155
155
|
}
|
|
156
156
|
return Promise.resolve();
|
|
157
157
|
}
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => PublicReissueGoods | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.54-beta.
|
|
3
|
+
"version": "2.0.54-beta.48",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.0.54-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.54-beta.48",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.48",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "fff15859c9922c74aa98692906c521d460ba51d0",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|