@kmkf-fe-packages/services-components 2.0.12-beta.25 → 2.0.12-beta.27
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/BS/common/BsMemo.js +2 -1
- package/dist/esm/components/BS/common/BsType.js +2 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
- package/dist/esm/components/CommonHeaderGood/index.js +104 -0
- package/dist/esm/components/Public/Exchange/index.d.ts +42 -0
- package/dist/esm/components/Public/Exchange/index.js +173 -0
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +1 -1
- package/dist/esm/components/Public/ReissueGoods/index.js +69 -30
- package/dist/esm/components/Public/SystemOrderType/index.js +2 -1
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +5 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/service/api.d.ts +1 -1
- package/package.json +4 -4
|
@@ -22,7 +22,8 @@ var componentType = {
|
|
|
22
22
|
WDT_RETURN_GOODS: "wdtReturnType",
|
|
23
23
|
BS_E3_REISSUE_GOODS: "bsE3ReissueType",
|
|
24
24
|
GY_REISSUE_GOODS: "gyReissueType",
|
|
25
|
-
JST_REISSUE_GOODS: "jstReissueType"
|
|
25
|
+
JST_REISSUE_GOODS: "jstReissueType",
|
|
26
|
+
JST_RETURN_GOODS: "jstReturnType"
|
|
26
27
|
};
|
|
27
28
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
28
29
|
var _this = this;
|
|
@@ -23,7 +23,8 @@ var componentType = {
|
|
|
23
23
|
WDT_RETURN_GOODS: "wdtReturnType",
|
|
24
24
|
BS_E3_REISSUE_GOODS: "bsE3ReissueType",
|
|
25
25
|
GY_REISSUE_GOODS: "gyReissueType",
|
|
26
|
-
JST_REISSUE_GOODS: "jstReissueType"
|
|
26
|
+
JST_REISSUE_GOODS: "jstReissueType",
|
|
27
|
+
JST_RETURN_GOODS: "jstReturnType"
|
|
27
28
|
};
|
|
28
29
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
29
30
|
var _this = this;
|
|
@@ -18,7 +18,8 @@ var componentType = {
|
|
|
18
18
|
WDT_REISSUE_GOODS: "wdtSystemOrderNo",
|
|
19
19
|
BS_E3_REISSUE_GOODS: "bsE3SystemOrderNo",
|
|
20
20
|
GY_REISSUE_GOODS: "gySystemOrderNo",
|
|
21
|
-
JST_REISSUE_GOODS: "jstSystemOrderNo"
|
|
21
|
+
JST_REISSUE_GOODS: "jstSystemOrderNo",
|
|
22
|
+
JST_RETURN_GOODS: "jstSystemOrderNo"
|
|
22
23
|
};
|
|
23
24
|
var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
|
|
24
25
|
var _this = this;
|
|
@@ -860,6 +860,110 @@ var GoodHeaderMap = {
|
|
|
860
860
|
remark: "备注"
|
|
861
861
|
},
|
|
862
862
|
moneyKey: "salePrice"
|
|
863
|
+
},
|
|
864
|
+
JST_RETURN_GOODS: {
|
|
865
|
+
headerMap: {
|
|
866
|
+
name: "商品名称",
|
|
867
|
+
skuId: "商品编码",
|
|
868
|
+
iId: "款式编码",
|
|
869
|
+
pic: {
|
|
870
|
+
component: BsHeaderPic,
|
|
871
|
+
name: '商品图片'
|
|
872
|
+
},
|
|
873
|
+
propertiesValue: "规格值",
|
|
874
|
+
saleBasePrice: {
|
|
875
|
+
name: "原价",
|
|
876
|
+
transformValue: function transformValue(price) {
|
|
877
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
878
|
+
},
|
|
879
|
+
renderExport: function renderExport(price) {
|
|
880
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
salePrice: {
|
|
884
|
+
name: "单价",
|
|
885
|
+
transformValue: function transformValue(price) {
|
|
886
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
887
|
+
},
|
|
888
|
+
renderExport: function renderExport(price) {
|
|
889
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
qty: "数量",
|
|
893
|
+
saleAmount: {
|
|
894
|
+
name: "总金额",
|
|
895
|
+
transformValue: function transformValue(val, record, parentName) {
|
|
896
|
+
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
897
|
+
},
|
|
898
|
+
renderExport: function renderExport(val, record, parentName) {
|
|
899
|
+
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
batchId: "批次号",
|
|
903
|
+
isGift: {
|
|
904
|
+
name: "是否赠品",
|
|
905
|
+
transformValue: function transformValue(val) {
|
|
906
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
907
|
+
},
|
|
908
|
+
renderExport: function renderExport(val) {
|
|
909
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
remark: "备注",
|
|
913
|
+
outerOiId: "子订单号"
|
|
914
|
+
},
|
|
915
|
+
moneyKey: "salePrice"
|
|
916
|
+
},
|
|
917
|
+
JST_EXCHANGE_GOODS: {
|
|
918
|
+
headerMap: {
|
|
919
|
+
name: "商品名称",
|
|
920
|
+
skuId: "商品编码",
|
|
921
|
+
iId: "款式编码",
|
|
922
|
+
pic: {
|
|
923
|
+
component: BsHeaderPic,
|
|
924
|
+
name: '商品图片'
|
|
925
|
+
},
|
|
926
|
+
propertiesValue: "规格值",
|
|
927
|
+
saleBasePrice: {
|
|
928
|
+
name: "原价",
|
|
929
|
+
transformValue: function transformValue(price) {
|
|
930
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
931
|
+
},
|
|
932
|
+
renderExport: function renderExport(price) {
|
|
933
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
salePrice: {
|
|
937
|
+
name: "单价",
|
|
938
|
+
transformValue: function transformValue(price) {
|
|
939
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
940
|
+
},
|
|
941
|
+
renderExport: function renderExport(price) {
|
|
942
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
qty: "数量",
|
|
946
|
+
saleAmount: {
|
|
947
|
+
name: "总金额",
|
|
948
|
+
transformValue: function transformValue(val, record, parentName) {
|
|
949
|
+
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
950
|
+
},
|
|
951
|
+
renderExport: function renderExport(val, record, parentName) {
|
|
952
|
+
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
isGift: {
|
|
956
|
+
name: "是否赠品",
|
|
957
|
+
transformValue: function transformValue(val) {
|
|
958
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
959
|
+
},
|
|
960
|
+
renderExport: function renderExport(val) {
|
|
961
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
remark: "备注"
|
|
965
|
+
},
|
|
966
|
+
moneyKey: "salePrice"
|
|
863
967
|
}
|
|
864
968
|
};
|
|
865
969
|
GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
import { type FormInstance } from "antd";
|
|
5
|
+
declare type ConfigType = {
|
|
6
|
+
goodsKey: string;
|
|
7
|
+
validator: any;
|
|
8
|
+
};
|
|
9
|
+
declare class Exchange implements ComponentInterface {
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
sortField: string;
|
|
13
|
+
type: string;
|
|
14
|
+
rules: any[];
|
|
15
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
+
effects: ComponentInterface["effects"];
|
|
17
|
+
isCombinationComponent: boolean;
|
|
18
|
+
formField: string;
|
|
19
|
+
canSort: boolean;
|
|
20
|
+
children: ComponentInterface[];
|
|
21
|
+
dataType: ComponentInterface["dataType"];
|
|
22
|
+
returnGoods: CommonHeaderGoods;
|
|
23
|
+
config: ConfigType;
|
|
24
|
+
form?: FormInstance;
|
|
25
|
+
constructor(options: PickOption);
|
|
26
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
|
+
renderPc: () => null;
|
|
28
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
29
|
+
getComponentValue: (r: Record) => {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
};
|
|
32
|
+
renderExport: (value: any, record: any) => null;
|
|
33
|
+
editRender: (p: any) => React.JSX.Element;
|
|
34
|
+
filterConfig: (item: ColumnConfig) => {
|
|
35
|
+
searchDefaultConditions: "like";
|
|
36
|
+
type: string;
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
filterComponentType: "Input";
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
export default Exchange;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 "react";
|
|
12
|
+
import GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { SYMBOL } from "../../../constant";
|
|
17
|
+
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
|
+
import { CommonExchangeGoods } from "@kmkf-fe-packages/basic-components";
|
|
19
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
function toNum(value) {
|
|
21
|
+
if (typeof value === "string") {
|
|
22
|
+
return value ? +value : void 0;
|
|
23
|
+
}
|
|
24
|
+
if (typeof value === "number") {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
return void 0;
|
|
28
|
+
}
|
|
29
|
+
var CONF_MAP = {
|
|
30
|
+
JST_EXCHANGE_GOODS: {
|
|
31
|
+
goodsKey: 'jstExchangeGoods',
|
|
32
|
+
validator: function validator(_rule, value) {
|
|
33
|
+
if (!_rule.required) return Promise.resolve();
|
|
34
|
+
var goodsName = "";
|
|
35
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
36
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
37
|
+
var res = typeof qty === "number" ? qty < 1 : true;
|
|
38
|
+
if (res) {
|
|
39
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
40
|
+
}
|
|
41
|
+
return res;
|
|
42
|
+
})) {
|
|
43
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
44
|
+
}
|
|
45
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
46
|
+
var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
47
|
+
var res = typeof v === "number" ? v < 0 : true;
|
|
48
|
+
if (res) {
|
|
49
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
50
|
+
}
|
|
51
|
+
return res;
|
|
52
|
+
})) {
|
|
53
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
54
|
+
}
|
|
55
|
+
return Promise.resolve();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
|
|
60
|
+
var _this = this,
|
|
61
|
+
_options$effects,
|
|
62
|
+
_this$componentConfig6,
|
|
63
|
+
_this$componentConfig8;
|
|
64
|
+
_classCallCheck(this, Exchange);
|
|
65
|
+
_defineProperty(this, "name", void 0);
|
|
66
|
+
_defineProperty(this, "id", void 0);
|
|
67
|
+
_defineProperty(this, "sortField", void 0);
|
|
68
|
+
_defineProperty(this, "type", void 0);
|
|
69
|
+
_defineProperty(this, "rules", void 0);
|
|
70
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
71
|
+
_defineProperty(this, "effects", void 0);
|
|
72
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
73
|
+
_defineProperty(this, "formField", void 0);
|
|
74
|
+
_defineProperty(this, "canSort", void 0);
|
|
75
|
+
_defineProperty(this, "children", void 0);
|
|
76
|
+
_defineProperty(this, "dataType", void 0);
|
|
77
|
+
_defineProperty(this, "returnGoods", void 0);
|
|
78
|
+
_defineProperty(this, "config", void 0);
|
|
79
|
+
_defineProperty(this, "form", void 0);
|
|
80
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
81
|
+
var _this$componentConfig;
|
|
82
|
+
var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || "[]");
|
|
83
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
84
|
+
id: "".concat(_this.id, "-out"),
|
|
85
|
+
label: "".concat(_this.name, "-\u6362\u51FA"),
|
|
86
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
87
|
+
type: _this.type,
|
|
88
|
+
list: exchangeGoods || [],
|
|
89
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
90
|
+
})
|
|
91
|
+
})) : null;
|
|
92
|
+
});
|
|
93
|
+
_defineProperty(this, "renderPc", function () {
|
|
94
|
+
return null;
|
|
95
|
+
});
|
|
96
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
97
|
+
var _r, _this$componentConfig2;
|
|
98
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat(_this.config.goodsKey)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
99
|
+
type: _this.type,
|
|
100
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || [],
|
|
101
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
102
|
+
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
103
|
+
});
|
|
104
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
105
|
+
return _defineProperty({}, _this.config.goodsKey, r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.config.goodsKey)]);
|
|
106
|
+
});
|
|
107
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
108
|
+
return null;
|
|
109
|
+
});
|
|
110
|
+
_defineProperty(this, "editRender", function (p) {
|
|
111
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
|
|
112
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
113
|
+
title: _this.name,
|
|
114
|
+
name: _this.id,
|
|
115
|
+
rules: _this.rules,
|
|
116
|
+
required: false,
|
|
117
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
118
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
119
|
+
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 : '',
|
|
120
|
+
component: /*#__PURE__*/React.createElement(CommonExchangeGoods, _extends({}, _this.componentConfig, {
|
|
121
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
122
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
123
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
124
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
125
|
+
width: "90%",
|
|
126
|
+
type: _this.type,
|
|
127
|
+
form: _this.form
|
|
128
|
+
}))
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
132
|
+
return [{
|
|
133
|
+
searchDefaultConditions: SYMBOL.like,
|
|
134
|
+
type: item.type,
|
|
135
|
+
id: "".concat(item.id, "_").concat(_this.config.goodsKey),
|
|
136
|
+
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
137
|
+
filterComponentType: "Input"
|
|
138
|
+
}];
|
|
139
|
+
});
|
|
140
|
+
this.name = options.name;
|
|
141
|
+
this.id = options.id;
|
|
142
|
+
this.sortField = "".concat(options.id);
|
|
143
|
+
this.formField = "".concat(options.id);
|
|
144
|
+
this.type = options.type;
|
|
145
|
+
this.config = CONF_MAP[this.type];
|
|
146
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
147
|
+
this.isCombinationComponent = true;
|
|
148
|
+
this.canSort = false;
|
|
149
|
+
this.form = (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.form;
|
|
150
|
+
this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
151
|
+
id: "".concat(options.id, "_").concat(this.config.goodsKey),
|
|
152
|
+
name: "商品信息"
|
|
153
|
+
}));
|
|
154
|
+
this.children = [this.returnGoods];
|
|
155
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
156
|
+
this.rules = [{
|
|
157
|
+
required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
|
|
158
|
+
validator: function validator(_, value) {
|
|
159
|
+
var _this$componentConfig7, _value$_this$config$g;
|
|
160
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && (_value$_this$config$g = value[_this.config.goodsKey]) !== null && _value$_this$config$g !== void 0 && _value$_this$config$g.length)) {
|
|
161
|
+
return Promise.reject(new Error("请选择换货商品"));
|
|
162
|
+
}
|
|
163
|
+
return Promise.resolve();
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
|
|
167
|
+
validator: this.config.validator || function () {
|
|
168
|
+
return Promise.resolve();
|
|
169
|
+
}
|
|
170
|
+
}];
|
|
171
|
+
this.dataType = "object";
|
|
172
|
+
});
|
|
173
|
+
export default Exchange;
|
|
@@ -20,7 +20,7 @@ declare class PublicReissue implements ComponentInterface {
|
|
|
20
20
|
bsMemo: BsMemo;
|
|
21
21
|
systemOrderNo: SystemOrderNo;
|
|
22
22
|
systemOrderType: SystemOrderType;
|
|
23
|
-
|
|
23
|
+
goods: BsHeaderGood | CommonHeaderGoods;
|
|
24
24
|
constructor(options: PickOption);
|
|
25
25
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
26
26
|
renderPc: () => null;
|
|
@@ -36,6 +36,7 @@ var typeMap = {
|
|
|
36
36
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
37
37
|
errMsg: "请选择聚水潭补发商品",
|
|
38
38
|
name: "聚水潭",
|
|
39
|
+
compType: '补发',
|
|
39
40
|
validator: function validator(_rule, value) {
|
|
40
41
|
if (!_rule.required) return Promise.resolve();
|
|
41
42
|
var goodsName = "";
|
|
@@ -61,6 +62,41 @@ var typeMap = {
|
|
|
61
62
|
}
|
|
62
63
|
return Promise.resolve();
|
|
63
64
|
}
|
|
65
|
+
},
|
|
66
|
+
JST_RETURN_GOODS: {
|
|
67
|
+
key: "jstReturnGoods",
|
|
68
|
+
typeName: "jstReturnType",
|
|
69
|
+
remark: "jstReturnType_memo",
|
|
70
|
+
systemOrderNo: "jstSystemOrderNo",
|
|
71
|
+
systemOrderBillType: 'jstSystemOrderBillType',
|
|
72
|
+
errMsg: "请选择聚水潭退货商品",
|
|
73
|
+
name: "聚水潭",
|
|
74
|
+
compType: '退货',
|
|
75
|
+
validator: function validator(_rule, value) {
|
|
76
|
+
if (!_rule.required) return Promise.resolve();
|
|
77
|
+
var goodsName = "";
|
|
78
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
79
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
80
|
+
var res = typeof qty === "number" ? qty < 1 : true;
|
|
81
|
+
if (res) {
|
|
82
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
83
|
+
}
|
|
84
|
+
return res;
|
|
85
|
+
})) {
|
|
86
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
87
|
+
}
|
|
88
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
89
|
+
var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
90
|
+
var res = typeof v === "number" ? v < 0 : true;
|
|
91
|
+
if (res) {
|
|
92
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
93
|
+
}
|
|
94
|
+
return res;
|
|
95
|
+
})) {
|
|
96
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
97
|
+
}
|
|
98
|
+
return Promise.resolve();
|
|
99
|
+
}
|
|
64
100
|
}
|
|
65
101
|
};
|
|
66
102
|
var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
@@ -74,8 +110,11 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
74
110
|
_typeMap$options$type7,
|
|
75
111
|
_typeMap$options$type8,
|
|
76
112
|
_typeMap$options$type9,
|
|
113
|
+
_typeMap$options$type10,
|
|
114
|
+
_typeMap$options$type11,
|
|
115
|
+
_typeMap$options$type12,
|
|
77
116
|
_this$componentConfig6,
|
|
78
|
-
_typeMap$options$
|
|
117
|
+
_typeMap$options$type15;
|
|
79
118
|
_classCallCheck(this, PublicReissue);
|
|
80
119
|
_defineProperty(this, "name", void 0);
|
|
81
120
|
_defineProperty(this, "id", void 0);
|
|
@@ -93,7 +132,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
93
132
|
_defineProperty(this, "bsMemo", void 0);
|
|
94
133
|
_defineProperty(this, "systemOrderNo", void 0);
|
|
95
134
|
_defineProperty(this, "systemOrderType", void 0);
|
|
96
|
-
_defineProperty(this, "
|
|
135
|
+
_defineProperty(this, "goods", void 0);
|
|
97
136
|
_defineProperty(this, "renderClient", function (record) {
|
|
98
137
|
var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
|
|
99
138
|
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), _this.systemOrderNo.renderClient(record), _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -110,20 +149,20 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
110
149
|
return null;
|
|
111
150
|
});
|
|
112
151
|
_defineProperty(this, "renderLog", function (r) {
|
|
113
|
-
var _r, _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5, _r2, _typeMap$_this$type6, _typeMap$_this$type7, _this$componentConfig2;
|
|
114
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\
|
|
115
|
-
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
152
|
+
var _r, _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5, _r2, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8, _this$componentConfig2;
|
|
153
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.compType, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
154
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)]) || [],
|
|
116
155
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
|
|
117
156
|
type: _this.type
|
|
118
157
|
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
119
158
|
});
|
|
120
159
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
121
|
-
var _typeMap$_this$
|
|
160
|
+
var _typeMap$_this$type9, _typeMap$_this$type10, _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type14, _typeMap$_this$type15, _typeMap$_this$type16;
|
|
122
161
|
var obj = {};
|
|
123
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
124
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
125
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
126
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
162
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.typeName)] = 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.typeName)];
|
|
163
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.key)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.key)];
|
|
164
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.systemOrderNo)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.systemOrderNo)];
|
|
165
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.systemOrderBillType)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.systemOrderBillType)];
|
|
127
166
|
return obj;
|
|
128
167
|
});
|
|
129
168
|
_defineProperty(this, "renderExport", function () {
|
|
@@ -150,12 +189,12 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
150
189
|
});
|
|
151
190
|
});
|
|
152
191
|
_defineProperty(this, "filterConfig", function (item) {
|
|
153
|
-
var _item$templateConfig;
|
|
192
|
+
var _typeMap$_this$type17, _item$templateConfig, _typeMap$_this$type19;
|
|
154
193
|
return [{
|
|
155
194
|
searchDefaultConditions: SYMBOL.in,
|
|
156
195
|
type: item.type,
|
|
157
196
|
id: "".concat(item.id, "_").concat(typeMap[_this.type].typeName),
|
|
158
|
-
name: "".concat(item.name, "
|
|
197
|
+
name: "".concat(item.name, "-").concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.compType, "\u7C7B\u578B"),
|
|
159
198
|
filterComponentType: "Cascader",
|
|
160
199
|
props: {
|
|
161
200
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
@@ -172,15 +211,15 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
172
211
|
},
|
|
173
212
|
filterFn: function filterFn(value) {
|
|
174
213
|
return function (i) {
|
|
175
|
-
var _typeMap$_this$
|
|
176
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$
|
|
214
|
+
var _typeMap$_this$type18;
|
|
215
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.typeName)), value);
|
|
177
216
|
};
|
|
178
217
|
}
|
|
179
218
|
}, {
|
|
180
219
|
searchDefaultConditions: SYMBOL.like,
|
|
181
220
|
type: item.type,
|
|
182
221
|
id: "".concat(item.id, "_").concat(typeMap[_this.type].systemOrderNo),
|
|
183
|
-
name: "".concat(item.name, "
|
|
222
|
+
name: "".concat(item.name, "-").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.compType, "\u7CFB\u7EDF\u8BA2\u5355\u53F7"),
|
|
184
223
|
filterComponentType: "Input"
|
|
185
224
|
}, {
|
|
186
225
|
searchDefaultConditions: SYMBOL.like,
|
|
@@ -200,40 +239,40 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
200
239
|
this.canSort = false;
|
|
201
240
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
202
241
|
id: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.typeName),
|
|
203
|
-
name: "".concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.name, "\
|
|
242
|
+
name: "".concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.name).concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.compType, "\u7C7B\u578B")
|
|
204
243
|
}));
|
|
205
244
|
this.systemOrderNo = new SystemOrderNo(_objectSpread(_objectSpread({}, options), {}, {
|
|
206
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
207
|
-
name: "".concat((_typeMap$options$
|
|
245
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.systemOrderNo),
|
|
246
|
+
name: "".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.name).concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.compType, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")
|
|
208
247
|
}));
|
|
209
248
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
210
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
211
|
-
name: "".concat((_typeMap$options$
|
|
249
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.remark),
|
|
250
|
+
name: "".concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.name).concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.compType, "\u5907\u6CE8")
|
|
212
251
|
}));
|
|
213
252
|
this.systemOrderType = new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
|
|
214
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
215
|
-
name: "".concat((_typeMap$options$
|
|
253
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.systemOrderBillType),
|
|
254
|
+
name: "".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
|
|
216
255
|
}));
|
|
217
|
-
this.
|
|
218
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
256
|
+
this.goods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
257
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.key),
|
|
219
258
|
name: "商品信息"
|
|
220
259
|
}));
|
|
221
|
-
this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.systemOrderType, this.
|
|
260
|
+
this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.systemOrderType, this.goods];
|
|
222
261
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
223
262
|
var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
|
|
224
263
|
this.rules = [{
|
|
225
264
|
required: isRequired,
|
|
226
265
|
validator: function validator(_, value) {
|
|
227
|
-
var _value, _typeMap$options$
|
|
228
|
-
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$
|
|
229
|
-
var _typeMap$options$
|
|
230
|
-
return Promise.reject(new Error("".concat((_typeMap$options$
|
|
266
|
+
var _value, _typeMap$options$type13;
|
|
267
|
+
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : _typeMap$options$type13.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
268
|
+
var _typeMap$options$type14;
|
|
269
|
+
return Promise.reject(new Error("".concat((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : _typeMap$options$type14.errMsg)));
|
|
231
270
|
}
|
|
232
271
|
return Promise.resolve();
|
|
233
272
|
}
|
|
234
273
|
}, {
|
|
235
274
|
required: isRequired,
|
|
236
|
-
validator: ((_typeMap$options$
|
|
275
|
+
validator: ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.validator) || function () {
|
|
237
276
|
return Promise.resolve();
|
|
238
277
|
}
|
|
239
278
|
}];
|
|
@@ -15,7 +15,8 @@ import React from "react";
|
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
var componentType = {
|
|
18
|
-
JST_REISSUE_GOODS: "jstSystemOrderBillType"
|
|
18
|
+
JST_REISSUE_GOODS: "jstSystemOrderBillType",
|
|
19
|
+
JST_RETURN_GOODS: "jstSystemOrderBillType"
|
|
19
20
|
};
|
|
20
21
|
var SystemOrderType = /*#__PURE__*/_createClass(function SystemOrderType(options) {
|
|
21
22
|
var _this = this;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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, GyGoods, BsE3Reissue, MemberLevel } from "./index";
|
|
1
|
+
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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 } 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) => GyReissue | JstSendGood | Label | MsgStatus | PublicExchange | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicPicture | 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 | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | 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 | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | MemberLevel | AfterSalesOrderId | GyGoods;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, ErpTradeId, 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,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, GyGoods, BsE3Reissue, MemberLevel } from "./index";
|
|
3
|
+
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 } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -163,6 +163,8 @@ export var factory = function factory(type, options) {
|
|
|
163
163
|
return new BsExchange(options);
|
|
164
164
|
case "WDT_EXCHANGE_GOODS":
|
|
165
165
|
return new WdtExchange(options);
|
|
166
|
+
case "JST_EXCHANGE_GOODS":
|
|
167
|
+
return new PublicExchange(options);
|
|
166
168
|
case "BS_REISSUE_GOODS":
|
|
167
169
|
return new BsReissue(options);
|
|
168
170
|
case "WDT_REISSUE_GOODS":
|
|
@@ -173,6 +175,8 @@ export var factory = function factory(type, options) {
|
|
|
173
175
|
return new BsReturn(options);
|
|
174
176
|
case "WDT_RETURN_GOODS":
|
|
175
177
|
return new WdtReturn(options);
|
|
178
|
+
case "JST_RETURN_GOODS":
|
|
179
|
+
return new PublicReissueGoods(options);
|
|
176
180
|
case "REISSUE_TRADE_ID":
|
|
177
181
|
case "ERP_AFTER_SALE_TRADE_ID":
|
|
178
182
|
case "BS_DELIVERY_NO":
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { default as BsGoods } from "./components/BS/BsGoods";
|
|
|
43
43
|
export { default as BsE3Goods } from "./components/BsE3/BsGoods";
|
|
44
44
|
export { default as PublicGoods } from "./components/Public/Goods";
|
|
45
45
|
export { default as PublicReissueGoods } from "./components/Public/ReissueGoods";
|
|
46
|
+
export { default as PublicExchange } from "./components/Public/Exchange";
|
|
46
47
|
export { default as BsE3Reissue } from "./components/BsE3/BsReissueE3";
|
|
47
48
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
48
49
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
package/dist/esm/index.js
CHANGED
|
@@ -43,6 +43,7 @@ export { default as BsGoods } from "./components/BS/BsGoods";
|
|
|
43
43
|
export { default as BsE3Goods } from "./components/BsE3/BsGoods";
|
|
44
44
|
export { default as PublicGoods } from "./components/Public/Goods";
|
|
45
45
|
export { default as PublicReissueGoods } from "./components/Public/ReissueGoods";
|
|
46
|
+
export { default as PublicExchange } from "./components/Public/Exchange";
|
|
46
47
|
export { default as BsE3Reissue } from "./components/BsE3/BsReissueE3";
|
|
47
48
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
48
49
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
|
@@ -10,7 +10,7 @@ export declare const queryWdtLogisticsCompany: () => Promise<void>;
|
|
|
10
10
|
export declare const queryBsE3LogisticsCompany: () => Promise<void>;
|
|
11
11
|
export declare const queryJSTLogisticsCompany: () => Promise<void>;
|
|
12
12
|
export declare const queryWLNLogisticsCompany: () => Promise<void>;
|
|
13
|
-
export declare const queryKMLogisticsCompany: () =>
|
|
13
|
+
export declare const queryKMLogisticsCompany: () => Promise<void>;
|
|
14
14
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
15
15
|
export declare const queryLabel: () => Promise<any>;
|
|
16
16
|
export declare const queryWorkOrderDetail: (data: any) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.12-beta.
|
|
3
|
+
"version": "2.0.12-beta.27",
|
|
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.12-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.12-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.12-beta.27",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.12-beta.26",
|
|
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": "20219f2b81a8def1bdbf67444d75d8dab0fa7567",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|