@kmkf-fe-packages/services-components 2.9.0-rc.0 → 2.9.1-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/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 +437 -0
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -3
- package/dist/esm/commonComponents/GlobalContext/index.js +61 -23
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +12 -9
- package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
- package/dist/esm/commonComponents/OperationLog/index.js +4 -4
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
- package/dist/esm/commonComponents/ShopList/index.js +3 -1
- package/dist/esm/components/BS/BsGoods/index.js +0 -1
- package/dist/esm/components/BS/BsLogistics/index.d.ts +2 -0
- package/dist/esm/components/BS/BsLogistics/index.js +50 -9
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +62 -9
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +9 -8
- package/dist/esm/components/BS/common/BsHeaderChild.js +16 -12
- package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
- package/dist/esm/components/BS/common/BsHeaderPic.js +17 -2
- package/dist/esm/components/BS/common/BsMemo.js +5 -1
- package/dist/esm/components/BS/common/BsType.js +5 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +5 -1
- package/dist/esm/components/BS/common/expressCode.js +6 -0
- package/dist/esm/components/BS/common/expressCompany.js +20 -1
- package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
- package/dist/esm/components/Cascader/index.d.ts +8 -6
- package/dist/esm/components/Cascader/index.js +26 -22
- package/dist/esm/components/Common/constants/bs.js +2 -2
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
- package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
- package/dist/esm/components/Common/constants/wdt.js +104 -0
- package/dist/esm/components/Common/index.d.ts +2 -2
- package/dist/esm/components/Common/index.js +45 -24
- package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
- package/dist/esm/components/CommonDataTime/index.js +2 -2
- package/dist/esm/components/CommonHeaderGood/index.js +1417 -110
- package/dist/esm/components/CommonInput/index.js +11 -3
- package/dist/esm/components/CommonMultiStatus/index.js +96 -36
- package/dist/esm/components/CommonSystemOrder/index.js +7 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/communication.js +0 -2
- package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
- package/dist/esm/components/ErpTradeId/index.js +7 -4
- package/dist/esm/components/File/index.d.ts +6 -6
- package/dist/esm/components/File/index.js +9 -10
- package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
- package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
- package/dist/esm/components/GY/GyGoods/index.js +5 -1
- package/dist/esm/components/GY/GyReissue/index.js +5 -1
- package/dist/esm/components/GY/GyReturn/index.js +5 -1
- package/dist/esm/components/Input/index.d.ts +4 -4
- package/dist/esm/components/Input/index.js +35 -31
- package/dist/esm/components/JST/JstSendGood/index.d.ts +10 -0
- package/dist/esm/components/JST/JstSendGood/index.js +66 -18
- package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
- package/dist/esm/components/KM/KmExchange/index.js +136 -0
- package/dist/esm/components/KmErpSendGood/index.js +1 -1
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +10 -0
- package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
- package/dist/esm/components/LogisticsInterception/index.d.ts +21 -0
- package/dist/esm/components/LogisticsInterception/index.js +30 -7
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
- package/dist/esm/components/OrderSubForm/index.d.ts +7 -0
- package/dist/esm/components/OrderSubForm/index.js +18 -1
- package/dist/esm/components/Payment/index.d.ts +13 -12
- package/dist/esm/components/Payment/index.js +31 -11
- package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +20 -20
- package/dist/esm/components/PicturePro/PictureName.js +1 -3
- package/dist/esm/components/PicturePro/index.d.ts +15 -6
- package/dist/esm/components/PicturePro/index.js +43 -28
- package/dist/esm/components/PostIng/index.d.ts +5 -0
- package/dist/esm/components/PostIng/index.js +42 -8
- package/dist/esm/components/Public/AsyncSelect/index.js +4 -7
- package/dist/esm/components/Public/Exchange/index.js +10 -23
- package/dist/esm/components/Public/Goods/index.d.ts +10 -8
- package/dist/esm/components/Public/Goods/index.js +46 -2
- package/dist/esm/components/Public/ReissueGoods/index.js +82 -6
- package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
- package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
- package/dist/esm/components/Public/SystemOrderType/index.js +2 -2
- package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
- package/dist/esm/components/ReceiverAddress/index.js +43 -30
- package/dist/esm/components/Reissue/Logistics/index.js +2 -2
- package/dist/esm/components/Remark/index.d.ts +18 -2
- package/dist/esm/components/Remark/index.js +37 -2
- package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
- package/dist/esm/components/ReturnLogistics/index.js +34 -17
- package/dist/esm/components/Select/index.d.ts +1 -0
- package/dist/esm/components/Select/index.js +18 -11
- package/dist/esm/components/ShopInput/index.d.ts +5 -5
- package/dist/esm/components/ShopInput/index.js +12 -9
- package/dist/esm/components/StatusSelect/index.js +22 -2
- package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
- package/dist/esm/components/SubForm/index.js +78 -6
- package/dist/esm/components/TradeId/index.d.ts +6 -5
- package/dist/esm/components/TradeId/index.js +31 -15
- package/dist/esm/components/WDT/WdtGoods/index.js +2 -1
- package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
- package/dist/esm/constant.js +3 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +41 -12
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/service/api.d.ts +3 -0
- package/dist/esm/service/api.js +42 -14
- package/dist/esm/service/request.js +1 -4
- package/dist/esm/type.d.ts +43 -3
- package/package.json +4 -4
- package/dist/esm/components/Common/constants/gy.d.ts +0 -3
- package/dist/esm/components/Common/constants/gy.js +0 -219
|
@@ -8,17 +8,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
-
import React from
|
|
12
|
-
import { ApaasUploadProAsync } from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ApaasUploadProAsync } from '@kmkf-fe-packages/basic-components';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import PictureName from "./PictureName";
|
|
16
16
|
import PictureUrl from "./PictureUrl";
|
|
17
|
-
import { isNull } from
|
|
17
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
18
|
import "./index.less";
|
|
19
|
-
import { Image, Tooltip, message } from
|
|
20
|
-
import { DownloadOutlined, CopyOutlined } from
|
|
21
|
-
import copy from
|
|
19
|
+
import { Image, Tooltip, message } from 'antd';
|
|
20
|
+
import { DownloadOutlined, CopyOutlined } from '@ant-design/icons';
|
|
21
|
+
import copy from 'copy-to-clipboard';
|
|
22
22
|
import { hostUrl } from "../../constant";
|
|
23
23
|
var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options) {
|
|
24
24
|
var _this = this,
|
|
@@ -36,10 +36,24 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
36
36
|
_defineProperty(this, "children", void 0);
|
|
37
37
|
_defineProperty(this, "dataType", void 0);
|
|
38
38
|
_defineProperty(this, "currenEnv", void 0);
|
|
39
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
40
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
41
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
39
42
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
40
|
-
pictures = pictures.replace(/[\[\]]/g,
|
|
41
|
-
pictures = pictures.replace(/\s/g,
|
|
42
|
-
return pictures ? pictures.split(
|
|
43
|
+
pictures = pictures.replace(/[\[\]]/g, '');
|
|
44
|
+
pictures = pictures.replace(/\s/g, '');
|
|
45
|
+
return pictures ? pictures.split(',') : [];
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
48
|
+
return [{
|
|
49
|
+
name: '图片名称',
|
|
50
|
+
key: "".concat(_this.id, "_name"),
|
|
51
|
+
dataType: 'arrayObject'
|
|
52
|
+
}, {
|
|
53
|
+
name: '图片链接',
|
|
54
|
+
key: "".concat(_this.id, "_url"),
|
|
55
|
+
dataType: 'arrayObject'
|
|
56
|
+
}];
|
|
43
57
|
});
|
|
44
58
|
_defineProperty(this, "render", function (value) {
|
|
45
59
|
var _document;
|
|
@@ -48,29 +62,29 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
48
62
|
}
|
|
49
63
|
var copyText = value.map(function (item) {
|
|
50
64
|
return item.name;
|
|
51
|
-
}).join(
|
|
65
|
+
}).join(',');
|
|
52
66
|
var onCopy = function onCopy() {
|
|
53
67
|
copy(copyText);
|
|
54
|
-
message.success(
|
|
68
|
+
message.success('图片名称复制成功');
|
|
55
69
|
};
|
|
56
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
71
|
className: "pictureProClient"
|
|
58
72
|
}, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
59
|
-
preview: _this.currenEnv ===
|
|
60
|
-
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById(
|
|
73
|
+
preview: _this.currenEnv === 'ks' ? {
|
|
74
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
|
|
61
75
|
} : true
|
|
62
76
|
}, value.map(function (item) {
|
|
63
77
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url, "?x-oss-process=image/resize,h_60,w_60");
|
|
64
78
|
var showImage = /^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url;
|
|
65
79
|
var downloadHandle = function downloadHandle() {
|
|
66
|
-
if (_this.currenEnv ===
|
|
80
|
+
if (_this.currenEnv === 'pc') {
|
|
67
81
|
try {
|
|
68
82
|
fetch("".concat(hostUrl, "/").concat(item.url)).then(function (res) {
|
|
69
83
|
return res.blob();
|
|
70
84
|
}).then(function (blob) {
|
|
71
|
-
var a = document.createElement(
|
|
85
|
+
var a = document.createElement('a');
|
|
72
86
|
document.body.appendChild(a);
|
|
73
|
-
a.style.display =
|
|
87
|
+
a.style.display = 'none';
|
|
74
88
|
var url = window.URL.createObjectURL(blob);
|
|
75
89
|
a.href = url;
|
|
76
90
|
a.download = item.name;
|
|
@@ -78,12 +92,10 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
78
92
|
document.body.removeChild(a);
|
|
79
93
|
window.URL.revokeObjectURL(url);
|
|
80
94
|
});
|
|
81
|
-
} catch (error) {
|
|
82
|
-
console.error(error);
|
|
83
|
-
}
|
|
95
|
+
} catch (error) {}
|
|
84
96
|
} else {
|
|
85
97
|
copy("".concat(hostUrl, "/").concat(item.url));
|
|
86
|
-
message.success(
|
|
98
|
+
message.success('图片链接复制成功');
|
|
87
99
|
}
|
|
88
100
|
};
|
|
89
101
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -96,15 +108,15 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
96
108
|
preview: {
|
|
97
109
|
src: showImage
|
|
98
110
|
},
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
111
|
+
width: '100%',
|
|
112
|
+
height: '100%'
|
|
101
113
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
102
114
|
title: item.name
|
|
103
115
|
}, /*#__PURE__*/React.createElement("div", {
|
|
104
116
|
className: "pictureProText"
|
|
105
117
|
}, item.name)), /*#__PURE__*/React.createElement("div", {
|
|
106
118
|
className: "pictureProOperate"
|
|
107
|
-
}, _this.currenEnv ===
|
|
119
|
+
}, _this.currenEnv === 'pc' ? /*#__PURE__*/React.createElement(DownloadOutlined, {
|
|
108
120
|
className: "downloadIcon",
|
|
109
121
|
onClick: downloadHandle
|
|
110
122
|
}) : /*#__PURE__*/React.createElement(CopyOutlined, {
|
|
@@ -142,9 +154,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
142
154
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
143
155
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
144
156
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
145
|
-
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 :
|
|
157
|
+
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 : '',
|
|
146
158
|
component: /*#__PURE__*/React.createElement(ApaasUploadProAsync, _extends({}, _this.componentConfig, {
|
|
147
|
-
uniqueKey:
|
|
159
|
+
uniqueKey: 'picturePro',
|
|
148
160
|
hostUrl: hostUrl,
|
|
149
161
|
platform: _this.currenEnv
|
|
150
162
|
}))
|
|
@@ -166,15 +178,18 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
166
178
|
this.isCombinationComponent = true;
|
|
167
179
|
this.canSort = true;
|
|
168
180
|
this.children = [new PictureName(_objectSpread(_objectSpread({}, options), {}, {
|
|
169
|
-
name:
|
|
181
|
+
name: '图片名称',
|
|
170
182
|
id: "".concat(options.id, "_pictureProList_name"),
|
|
171
183
|
width: 250
|
|
172
184
|
})), new PictureUrl(_objectSpread(_objectSpread({}, options), {}, {
|
|
173
|
-
name:
|
|
185
|
+
name: '图片详情',
|
|
174
186
|
id: "".concat(options.id, "_pictureProList_url"),
|
|
175
187
|
width: 200
|
|
176
188
|
}))];
|
|
177
|
-
this.dataType =
|
|
189
|
+
this.dataType = 'object';
|
|
178
190
|
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
191
|
+
this.sortChildField = this.getSortChildFields();
|
|
192
|
+
this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
|
|
193
|
+
this.standardDateType = 'Array';
|
|
179
194
|
});
|
|
180
195
|
export default BasicPicturePro;
|
|
@@ -7,6 +7,7 @@ import District from "../BS/BsPosting/components//District";
|
|
|
7
7
|
import Detail from "../BS/BsPosting/components//Detail";
|
|
8
8
|
import ReceiverName from "../BS/BsPosting/components//ReceiverName";
|
|
9
9
|
import ReceiverMobile from "../BS/BsPosting/components//ReceiverMobile";
|
|
10
|
+
declare type SortColumnsField = Array<string>;
|
|
10
11
|
declare class BasicPosting implements ComponentInterface {
|
|
11
12
|
name: string;
|
|
12
13
|
id: string;
|
|
@@ -27,7 +28,11 @@ declare class BasicPosting implements ComponentInterface {
|
|
|
27
28
|
receiverName: ReceiverName;
|
|
28
29
|
receiverMobile: ReceiverMobile;
|
|
29
30
|
isSplitColumns: boolean;
|
|
31
|
+
sortColumns: SortColumnsField;
|
|
32
|
+
headerProvince: boolean;
|
|
30
33
|
constructor(options: PickOption);
|
|
34
|
+
getChildren: () => (Province | City | District | Detail | ReceiverName | ReceiverMobile | undefined)[];
|
|
35
|
+
getSortColumns: (sortColumns: string | undefined) => SortColumnsField;
|
|
31
36
|
renderPc: (value: any, record: Record) => React.JSX.Element | null;
|
|
32
37
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
33
38
|
getComponentValue: (r: Record) => {
|
|
@@ -23,7 +23,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
|
|
|
23
23
|
import GetFormItem from "../GetFormItem";
|
|
24
24
|
import ItemView from "../../commonComponents/ItemView";
|
|
25
25
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
26
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
26
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
27
27
|
import Province from "../BS/BsPosting/components/Province";
|
|
28
28
|
import City from "../BS/BsPosting/components//City";
|
|
29
29
|
import District from "../BS/BsPosting/components//District";
|
|
@@ -35,6 +35,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
35
35
|
var _this = this,
|
|
36
36
|
_options$componentCon,
|
|
37
37
|
_options$componentCon2,
|
|
38
|
+
_this$componentConfig6,
|
|
38
39
|
_options$componentCon3;
|
|
39
40
|
_classCallCheck(this, BasicPosting);
|
|
40
41
|
_defineProperty(this, "name", void 0);
|
|
@@ -56,6 +57,26 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
56
57
|
_defineProperty(this, "receiverName", void 0);
|
|
57
58
|
_defineProperty(this, "receiverMobile", void 0);
|
|
58
59
|
_defineProperty(this, "isSplitColumns", void 0);
|
|
60
|
+
_defineProperty(this, "sortColumns", void 0);
|
|
61
|
+
_defineProperty(this, "headerProvince", void 0);
|
|
62
|
+
_defineProperty(this, "getChildren", function () {
|
|
63
|
+
var _this$sortColumns;
|
|
64
|
+
if (!_this.isSplitColumns) return [];
|
|
65
|
+
return (_this$sortColumns = _this.sortColumns) === null || _this$sortColumns === void 0 ? void 0 : _this$sortColumns.map(function (filed) {
|
|
66
|
+
if (filed === 'province') return _this.province;
|
|
67
|
+
if (filed === 'city') return _this.city;
|
|
68
|
+
if (filed === 'district') return _this.district;
|
|
69
|
+
if (filed === 'detail') return _this.detail;
|
|
70
|
+
if (filed === 'name') return _this.receiverName;
|
|
71
|
+
if (filed === 'mobile') return _this.receiverMobile;
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "getSortColumns", function (sortColumns) {
|
|
75
|
+
var _sortColumns$split;
|
|
76
|
+
var defaultSortColumn = ['province', 'city', 'district', 'detail', 'name', 'mobile'];
|
|
77
|
+
if (!sortColumns) return defaultSortColumn;
|
|
78
|
+
return (_sortColumns$split = sortColumns === null || sortColumns === void 0 ? void 0 : sortColumns.split(',')) !== null && _sortColumns$split !== void 0 ? _sortColumns$split : [];
|
|
79
|
+
});
|
|
59
80
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
60
81
|
var _ref;
|
|
61
82
|
if (_this.isSplitColumns) {
|
|
@@ -73,20 +94,26 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
73
94
|
var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
74
95
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
75
96
|
}).join("");
|
|
97
|
+
var text = _this.headerProvince ? "".concat(addressText).concat(detail, " ").concat(name, " ").concat(mobile) : "".concat(name, " ").concat(mobile, " ").concat(addressText).concat(detail);
|
|
98
|
+
var firstContent = _this.headerProvince ? "".concat(addressText).concat(detail) : "".concat(name, " ").concat(mobile);
|
|
99
|
+
var secondContent = _this.headerProvince ? "".concat(name, " ").concat(mobile) : "".concat(addressText).concat(detail);
|
|
76
100
|
return /*#__PURE__*/React.createElement(CopyText, {
|
|
77
|
-
text:
|
|
101
|
+
text: text,
|
|
78
102
|
showText: /*#__PURE__*/React.createElement("div", {
|
|
79
103
|
style: {
|
|
80
104
|
maxHeight: "100px",
|
|
81
105
|
overflowY: "auto"
|
|
82
106
|
}
|
|
83
|
-
},
|
|
107
|
+
}, firstContent, /*#__PURE__*/React.createElement("br", null), secondContent)
|
|
84
108
|
});
|
|
85
109
|
});
|
|
86
110
|
_defineProperty(this, "renderLog", function (r) {
|
|
87
111
|
var _ref2;
|
|
88
112
|
if (_this.isSplitColumns) {
|
|
89
|
-
|
|
113
|
+
var _this$children;
|
|
114
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (_this$children = _this.children) === null || _this$children === void 0 ? void 0 : _this$children.map(function (instance) {
|
|
115
|
+
return instance.renderLog(r);
|
|
116
|
+
}));
|
|
90
117
|
}
|
|
91
118
|
var _this$getComponentVal = _this.getComponentValue(r),
|
|
92
119
|
province = _this$getComponentVal.province,
|
|
@@ -101,7 +128,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
101
128
|
var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
|
|
102
129
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
103
130
|
}).join("");
|
|
104
|
-
|
|
131
|
+
var content = _this.headerProvince ? "".concat(addressText).concat(detail, " ").concat(name).concat(mobile) : "".concat(name).concat(mobile, " ").concat(addressText).concat(detail);
|
|
132
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, content);
|
|
105
133
|
});
|
|
106
134
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
107
135
|
if (_this.isSplitColumns) {
|
|
@@ -141,7 +169,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
141
169
|
var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
|
|
142
170
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
143
171
|
}).join("/");
|
|
144
|
-
|
|
172
|
+
var content = _this.headerProvince ? "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile) : "".concat(name, "/").concat(mobile, "/ ").concat(addressText, "/").concat(detail);
|
|
173
|
+
return content;
|
|
145
174
|
});
|
|
146
175
|
_defineProperty(this, "renderClient", function (record) {
|
|
147
176
|
var _ref4;
|
|
@@ -155,7 +184,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
155
184
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
156
185
|
}).join("");
|
|
157
186
|
var hasValue = addressText || detail || name || mobile;
|
|
158
|
-
var
|
|
187
|
+
var firstContent = _this.headerProvince ? [addressText, detail].join("/") : [name, mobile].join("/");
|
|
188
|
+
var secondContent = _this.headerProvince ? [name, mobile].join("/") : [addressText, detail].join("/");
|
|
189
|
+
var value = hasValue ? /*#__PURE__*/React.createElement("div", null, firstContent, /*#__PURE__*/React.createElement("br", null), secondContent) : null;
|
|
159
190
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
160
191
|
id: _this.id,
|
|
161
192
|
label: _this.name,
|
|
@@ -197,8 +228,11 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
197
228
|
bs: BsAddressData,
|
|
198
229
|
gy: GyAddressData,
|
|
199
230
|
wdt: WdtAddressData,
|
|
231
|
+
jst: JstAddressData,
|
|
200
232
|
workOrder: AddressData
|
|
201
233
|
}[showField] || AddressData).getInstance();
|
|
234
|
+
this.sortColumns = this.getSortColumns((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.sortColumns);
|
|
235
|
+
this.headerProvince = this.sortColumns[0] === 'province';
|
|
202
236
|
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
203
237
|
id: "".concat(options.id, "_postingProvince"),
|
|
204
238
|
name: "省",
|
|
@@ -229,7 +263,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
229
263
|
parentName: this.name,
|
|
230
264
|
name: "收件人电话"
|
|
231
265
|
}));
|
|
232
|
-
this.children = this.
|
|
266
|
+
this.children = this.getChildren();
|
|
233
267
|
this.rules = [].concat(_toConsumableArray(options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
|
|
234
268
|
validator: function validator(_, value) {
|
|
235
269
|
var _options$componentCon4, _value$postingAddress, _value$postingAddress2;
|
|
@@ -45,9 +45,7 @@ var typeMap = {
|
|
|
45
45
|
}
|
|
46
46
|
version = ((_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig$pl.wdt) === null || _companyUserConfig$pl2 === void 0 ? void 0 : _companyUserConfig$pl2.version) || "flagship";
|
|
47
47
|
}
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(error);
|
|
50
|
-
}
|
|
48
|
+
} catch (error) {}
|
|
51
49
|
if (version === "flagship") return 1;
|
|
52
50
|
},
|
|
53
51
|
handleOptions: function handleOptions(options) {
|
|
@@ -229,15 +227,14 @@ var AsyncSelect = /*#__PURE__*/function () {
|
|
|
229
227
|
componentConfig: this.componentConfig
|
|
230
228
|
});
|
|
231
229
|
}
|
|
232
|
-
_context.next =
|
|
230
|
+
_context.next = 13;
|
|
233
231
|
break;
|
|
234
232
|
case 11:
|
|
235
233
|
_context.prev = 11;
|
|
236
234
|
_context.t1 = _context["catch"](1);
|
|
237
|
-
|
|
238
|
-
case 14:
|
|
235
|
+
case 13:
|
|
239
236
|
return _context.abrupt("return", options);
|
|
240
|
-
case
|
|
237
|
+
case 14:
|
|
241
238
|
case "end":
|
|
242
239
|
return _context.stop();
|
|
243
240
|
}
|
|
@@ -17,6 +17,7 @@ import { SYMBOL } from "../../../constant";
|
|
|
17
17
|
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
18
|
import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
|
|
19
19
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
import { erpFormValidator } from "@kmkf-fe-packages/basic-components";
|
|
20
21
|
function toNum(value) {
|
|
21
22
|
if (typeof value === 'string') {
|
|
22
23
|
return value ? +value : void 0;
|
|
@@ -29,28 +30,11 @@ function toNum(value) {
|
|
|
29
30
|
var CONF_MAP = {
|
|
30
31
|
JST_EXCHANGE_GOODS: {
|
|
31
32
|
goodsKey: 'jstExchangeGoods',
|
|
32
|
-
validator: function validator(_rule, value) {
|
|
33
|
+
validator: function validator(_rule, value, type) {
|
|
33
34
|
if (!_rule.required) return Promise.resolve();
|
|
34
|
-
var
|
|
35
|
-
if (
|
|
36
|
-
|
|
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"));
|
|
35
|
+
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
36
|
+
if (validatorFlag) {
|
|
37
|
+
return validatorFlag;
|
|
54
38
|
}
|
|
55
39
|
return Promise.resolve();
|
|
56
40
|
}
|
|
@@ -164,8 +148,11 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
|
|
|
164
148
|
}
|
|
165
149
|
}, {
|
|
166
150
|
required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
|
|
167
|
-
validator:
|
|
168
|
-
|
|
151
|
+
validator: function validator(_rule, value) {
|
|
152
|
+
var _CONF_MAP$options$typ, _CONF_MAP$options$typ2;
|
|
153
|
+
return ((_CONF_MAP$options$typ = CONF_MAP[options.type]) === null || _CONF_MAP$options$typ === void 0 ? void 0 : (_CONF_MAP$options$typ2 = _CONF_MAP$options$typ.validator) === null || _CONF_MAP$options$typ2 === void 0 ? void 0 : _CONF_MAP$options$typ2.call(_CONF_MAP$options$typ, _rule, value, options.type, _this.componentConfig)) || function () {
|
|
154
|
+
return Promise.resolve();
|
|
155
|
+
};
|
|
169
156
|
}
|
|
170
157
|
}];
|
|
171
158
|
this.dataType = 'object';
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
-
declare const CONFIG_MAP:
|
|
5
|
-
JST_GOODS: {
|
|
6
|
-
key: string;
|
|
7
|
-
};
|
|
8
|
-
KM_GOODS: {
|
|
9
|
-
key: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
4
|
+
declare const CONFIG_MAP: Record;
|
|
12
5
|
declare class PublicGoods implements ComponentInterface {
|
|
13
6
|
name: string;
|
|
14
7
|
id: string;
|
|
@@ -23,7 +16,16 @@ declare class PublicGoods implements ComponentInterface {
|
|
|
23
16
|
children: ComponentInterface[];
|
|
24
17
|
dataType: ComponentInterface["dataType"];
|
|
25
18
|
headers: CommonHeaderGoods;
|
|
19
|
+
exampleValue?: string;
|
|
20
|
+
standardDateType: ComponentInterface["standardDateType"];
|
|
21
|
+
sortChildField: {
|
|
22
|
+
name: string;
|
|
23
|
+
key: string;
|
|
24
|
+
dataType: string;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}[];
|
|
26
27
|
constructor(options: PickOption);
|
|
28
|
+
getSortChildFields: () => any;
|
|
27
29
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
28
30
|
renderPc: () => null;
|
|
29
31
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -15,19 +15,44 @@ import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { getColumnsMap } from "../../Common/constants/columnsBaseInfoMap";
|
|
18
19
|
import { SYMBOL } from "../../../constant";
|
|
19
20
|
var CONFIG_MAP = {
|
|
20
21
|
JST_GOODS: {
|
|
22
|
+
name: "聚水潭",
|
|
21
23
|
key: "jstGoods"
|
|
22
24
|
},
|
|
23
25
|
KM_GOODS: {
|
|
26
|
+
name: "快麦ERP",
|
|
24
27
|
key: "kmGoods"
|
|
28
|
+
},
|
|
29
|
+
JY_GOODS: {
|
|
30
|
+
name: "巨益",
|
|
31
|
+
key: "jyGoods",
|
|
32
|
+
exampleValue: '[{"gift":"","bfit":"","mallSkuId":"","specCode":"","sellTotal":0,"canEdit":false,"sellPrice":0,"mallProductName":"","oid":"","uuid":"","productName":"","skuName":"","canDelete":false,"divideOrderFee":0,"goodsName":"","mallSellingPrice":0,"productId":"","mallProductId":"","productCode":"","specName":"","mallSkuName":"","sellCount":0,"settlementPrice":0,"goodsCode":"","systemOrderNo":"","skuCode":""}]'
|
|
33
|
+
},
|
|
34
|
+
JKY_GOODS: {
|
|
35
|
+
name: "吉客云",
|
|
36
|
+
key: "jkyGoods"
|
|
37
|
+
},
|
|
38
|
+
WDT_AFTERSALE_GOODS: {
|
|
39
|
+
name: "旺店通售后",
|
|
40
|
+
key: "wdtAftersaleGoods"
|
|
41
|
+
},
|
|
42
|
+
JST_AFTERSALE_GOODS: {
|
|
43
|
+
name: "jst售后",
|
|
44
|
+
key: "jstAftersaleGoods"
|
|
45
|
+
},
|
|
46
|
+
WLN_GOODS: {
|
|
47
|
+
name: "万里牛",
|
|
48
|
+
key: "wlnGoods"
|
|
25
49
|
}
|
|
26
50
|
};
|
|
27
51
|
var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
28
52
|
var _this = this,
|
|
29
53
|
_CONFIG_MAP$this$type,
|
|
30
|
-
_this$componentConfig6
|
|
54
|
+
_this$componentConfig6,
|
|
55
|
+
_CONFIG_MAP$this$type2;
|
|
31
56
|
_classCallCheck(this, PublicGoods);
|
|
32
57
|
_defineProperty(this, "name", void 0);
|
|
33
58
|
_defineProperty(this, "id", void 0);
|
|
@@ -42,6 +67,21 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
|
42
67
|
_defineProperty(this, "children", void 0);
|
|
43
68
|
_defineProperty(this, "dataType", void 0);
|
|
44
69
|
_defineProperty(this, "headers", void 0);
|
|
70
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
71
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
72
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
73
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
74
|
+
var Columns = getColumnsMap();
|
|
75
|
+
return Columns[_this.type].filter(function (item) {
|
|
76
|
+
return !["picUrl"].includes(item.dataIndex);
|
|
77
|
+
}).map(function (item) {
|
|
78
|
+
return {
|
|
79
|
+
name: item.title,
|
|
80
|
+
key: "".concat(_this.id, "_").concat(item.dataIndex),
|
|
81
|
+
dataType: "arrayObject"
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
});
|
|
45
85
|
_defineProperty(this, "renderClient", function (record) {
|
|
46
86
|
var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
|
|
47
87
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -125,11 +165,15 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
|
125
165
|
validator: function validator(_, value) {
|
|
126
166
|
var _value$key;
|
|
127
167
|
if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
|
|
128
|
-
|
|
168
|
+
var _CONFIG_MAP$_this$typ6;
|
|
169
|
+
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
|
|
129
170
|
}
|
|
130
171
|
return Promise.resolve();
|
|
131
172
|
}
|
|
132
173
|
}] : [];
|
|
133
174
|
this.dataType = "object";
|
|
175
|
+
this.sortChildField = this.getSortChildFields();
|
|
176
|
+
this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
|
|
177
|
+
this.standardDateType = "Array";
|
|
134
178
|
});
|
|
135
179
|
export default PublicGoods;
|
|
@@ -43,11 +43,11 @@ var typeMap = {
|
|
|
43
43
|
typeName: "jstReturnType",
|
|
44
44
|
remark: "jstReturnType_memo",
|
|
45
45
|
systemOrderNo: "jstSystemOrderNo",
|
|
46
|
-
systemOrderBillType: "jstSystemOrderBillType",
|
|
46
|
+
// systemOrderBillType: "jstSystemOrderBillType",
|
|
47
47
|
errMsg: "请选择聚水潭退货商品",
|
|
48
48
|
name: "聚水潭",
|
|
49
49
|
compType: "退货",
|
|
50
|
-
hasSystemOrderType:
|
|
50
|
+
hasSystemOrderType: false,
|
|
51
51
|
validator: function validator(_rule, value, type) {
|
|
52
52
|
if (!_rule.required) return Promise.resolve();
|
|
53
53
|
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
@@ -66,6 +66,78 @@ var typeMap = {
|
|
|
66
66
|
errMsg: "请选择快麦补发商品",
|
|
67
67
|
name: "快麦",
|
|
68
68
|
compType: "补发",
|
|
69
|
+
validator: function validator(_rule, value, type, componentConfig) {
|
|
70
|
+
if (!_rule.required) return Promise.resolve();
|
|
71
|
+
var validatorFlag = erpFormValidator(_rule, value, type, componentConfig);
|
|
72
|
+
if (validatorFlag) {
|
|
73
|
+
return validatorFlag;
|
|
74
|
+
}
|
|
75
|
+
return Promise.resolve();
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
KM_RETURN_GOODS: {
|
|
79
|
+
key: "kmReturnGoods",
|
|
80
|
+
typeName: "kmReturnType",
|
|
81
|
+
remark: "kmReturnType_memo",
|
|
82
|
+
systemOrderNo: "kmSystemOrderNo",
|
|
83
|
+
systemOrderBillType: "kmSystemOrderBillType",
|
|
84
|
+
errMsg: "请选择快麦退货商品",
|
|
85
|
+
name: "快麦",
|
|
86
|
+
compType: "退货",
|
|
87
|
+
validator: function validator(_rule, value, type) {
|
|
88
|
+
if (!_rule.required) return Promise.resolve();
|
|
89
|
+
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
90
|
+
if (validatorFlag) {
|
|
91
|
+
return validatorFlag;
|
|
92
|
+
}
|
|
93
|
+
return Promise.resolve();
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
JY_REISSUE_GOODS: {
|
|
97
|
+
key: "jyReissueGoods",
|
|
98
|
+
typeName: "jyReissueType",
|
|
99
|
+
remark: "jyReissueType_memo",
|
|
100
|
+
systemOrderNo: "jySystemOrderNo",
|
|
101
|
+
systemOrderBillType: "jySystemOrderBillType",
|
|
102
|
+
errMsg: "请选择巨益补发商品",
|
|
103
|
+
name: "巨益",
|
|
104
|
+
compType: "补发",
|
|
105
|
+
validator: function validator(_rule, value, type) {
|
|
106
|
+
if (!_rule.required) return Promise.resolve();
|
|
107
|
+
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
108
|
+
if (validatorFlag) {
|
|
109
|
+
return validatorFlag;
|
|
110
|
+
}
|
|
111
|
+
return Promise.resolve();
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
JKY_REISSUE_GOODS: {
|
|
115
|
+
key: "jkyReissueGoods",
|
|
116
|
+
typeName: "jkyReissueType",
|
|
117
|
+
remark: "jkyReissueType_memo",
|
|
118
|
+
systemOrderNo: "jkySystemOrderNo",
|
|
119
|
+
systemOrderBillType: "jkySystemOrderBillType",
|
|
120
|
+
errMsg: "请选择吉客云补发商品",
|
|
121
|
+
name: "吉客云",
|
|
122
|
+
compType: "补发",
|
|
123
|
+
validator: function validator(_rule, value, type) {
|
|
124
|
+
if (!_rule.required) return Promise.resolve();
|
|
125
|
+
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
126
|
+
if (validatorFlag) {
|
|
127
|
+
return validatorFlag;
|
|
128
|
+
}
|
|
129
|
+
return Promise.resolve();
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
WLN_REISSUE_GOODS: {
|
|
133
|
+
key: "wlnReissueGoods",
|
|
134
|
+
typeName: "wlnReissueType",
|
|
135
|
+
remark: "wlnReissueType_memo",
|
|
136
|
+
systemOrderNo: "wlnSystemOrderNo",
|
|
137
|
+
systemOrderBillType: "wlnSystemOrderBillType",
|
|
138
|
+
errMsg: "请选择万里牛补发商品",
|
|
139
|
+
name: "万里牛",
|
|
140
|
+
compType: "补发",
|
|
69
141
|
validator: function validator(_rule, value, type) {
|
|
70
142
|
if (!_rule.required) return Promise.resolve();
|
|
71
143
|
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
@@ -144,7 +216,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
144
216
|
_defineProperty(this, "editRender", function (p) {
|
|
145
217
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
|
|
146
218
|
var onChange = function onChange(val, type) {
|
|
147
|
-
if (_this.type
|
|
219
|
+
if (["KM_REISSUE_GOODS", "KM_RETURN_GOODS"].includes(_this.type) && type === "systemOrder") {
|
|
148
220
|
p === null || p === void 0 ? void 0 : p.onChange(val, "kmSystemOrder");
|
|
149
221
|
}
|
|
150
222
|
};
|
|
@@ -238,18 +310,22 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
238
310
|
this.rules = [{
|
|
239
311
|
required: isRequired,
|
|
240
312
|
validator: function validator(_, value) {
|
|
241
|
-
var _value, _typeMap$options$type11;
|
|
313
|
+
var _value, _typeMap$options$type11, _typeMap$options$type13;
|
|
242
314
|
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
243
315
|
var _typeMap$options$type12;
|
|
244
316
|
return Promise.reject(new Error("".concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.errMsg)));
|
|
245
317
|
}
|
|
318
|
+
// 快麦补发/退货商品需要校验系统单
|
|
319
|
+
if (isRequired && ["KM_REISSUE_GOODS", "KM_RETURN_GOODS"].includes(options.type) && (!value || !(value !== null && value !== void 0 && value["".concat((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : _typeMap$options$type13.systemOrderNo)]))) {
|
|
320
|
+
return Promise.reject(new Error(options.type === "KM_REISSUE_GOODS" ? "\u8BF7\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355" : "\u8BF7\u9009\u62E9\u9000\u8D27\u7CFB\u7EDF\u5355"));
|
|
321
|
+
}
|
|
246
322
|
return Promise.resolve();
|
|
247
323
|
}
|
|
248
324
|
}, {
|
|
249
325
|
required: isRequired,
|
|
250
326
|
validator: function validator(_rule, value) {
|
|
251
|
-
var _typeMap$options$
|
|
252
|
-
return ((_typeMap$options$
|
|
327
|
+
var _typeMap$options$type14, _typeMap$options$type15;
|
|
328
|
+
return ((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : (_typeMap$options$type15 = _typeMap$options$type14.validator) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.call(_typeMap$options$type14, _rule, value, options.type, _this.componentConfig)) || function () {
|
|
253
329
|
return Promise.resolve();
|
|
254
330
|
};
|
|
255
331
|
}
|