kmkf-work-order-service-component 0.4.11 → 0.4.13-alpha.1
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/FormRender/index.js +42 -7
- package/dist/esm/FormRender/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/Card/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +4 -4
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.js +40 -3
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RecordLog/index.js +2 -2
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RepeatWorkOrderListModal/index.d.ts +4 -0
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RepeatWorkOrderListModal/index.js +168 -0
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RepeatWorkOrderListModal/index.less +30 -0
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +9 -3
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js +62 -13
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.less +5 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/RepeatWorkOrderListModal/index.d.ts +4 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/RepeatWorkOrderListModal/index.js +49 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/RepeatWorkOrderListModal/index.less +21 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +4 -2
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.d.ts +3 -1
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.js +48 -10
- package/dist/esm/WorkOrder/components/Widget/index.d.ts +5 -1
- package/dist/esm/WorkOrder/components/Widget/index.js +16 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.d.ts +17 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.js +129 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.d.ts +14 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.js +121 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.d.ts +14 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.js +129 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.d.ts +14 -0
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.js +117 -0
- package/dist/esm/assets/repeat.png +0 -0
- package/dist/esm/common/utils/express.d.ts +1 -0
- package/dist/esm/common/utils/express.js +7 -1
- package/dist/esm/common/utils/tools.d.ts +5 -1
- package/dist/esm/common/utils/tools.js +431 -181
- package/dist/esm/model/customizeWorkOrder/index.d.ts +2 -2
- package/dist/esm/model/customizeWorkOrder/index.js +18 -5
- package/dist/esm/model/customizeWorkOrder/selector.d.ts +24 -0
- package/dist/esm/model/customizeWorkOrder/selector.js +6 -0
- package/dist/esm/model/customizeWorkOrder/types.d.ts +11 -0
- package/dist/esm/model/paymentWorkOrder/index.d.ts +1 -1
- package/dist/esm/model/paymentWorkOrder/index.js +16 -3
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +31 -0
- package/dist/esm/model/paymentWorkOrder/selector.js +6 -0
- package/dist/esm/model/paymentWorkOrder/types.d.ts +2 -0
- package/dist/esm/model/servers/api.d.ts +2 -0
- package/dist/esm/model/servers/api.js +16 -0
- package/dist/esm/model/workOrder.js +5 -4
- package/package.json +2 -2
@@ -0,0 +1,49 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Modal, message, Button } from 'antd';
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
4
|
+
import copy from 'copy-to-clipboard';
|
5
|
+
import { setRepeatModalVisible, setRepeatWorkOrderList } from "../../../../../model/paymentWorkOrder/index";
|
6
|
+
import { selectRepeatVisible, selectRepeatWorkOrderList } from "../../../../../model/paymentWorkOrder/selector";
|
7
|
+
import "./index.less";
|
8
|
+
|
9
|
+
var RepeatWorkOrderListModal = function RepeatWorkOrderListModal() {
|
10
|
+
var dispatch = useDispatch();
|
11
|
+
var visible = useSelector(selectRepeatVisible);
|
12
|
+
var repeatWorkOrderList = useSelector(selectRepeatWorkOrderList);
|
13
|
+
|
14
|
+
var handleCancel = function handleCancel() {
|
15
|
+
dispatch(setRepeatModalVisible(false));
|
16
|
+
dispatch(setRepeatWorkOrderList([]));
|
17
|
+
};
|
18
|
+
|
19
|
+
var copyHandle = function copyHandle(text) {
|
20
|
+
copy(text);
|
21
|
+
message.success('复制成功');
|
22
|
+
};
|
23
|
+
|
24
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
25
|
+
title: "\u91CD\u590D\u63D0\u4EA4\u5DE5\u5355\u7F16\u53F7",
|
26
|
+
visible: visible,
|
27
|
+
onCancel: handleCancel,
|
28
|
+
footer: null,
|
29
|
+
bodyStyle: {
|
30
|
+
maxHeight: '500px',
|
31
|
+
overflowY: 'auto'
|
32
|
+
}
|
33
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
34
|
+
className: "repeat-trade-id"
|
35
|
+
}, "\u8BA2\u5355\u53F7\u91CD\u590D"), /*#__PURE__*/React.createElement("ol", {
|
36
|
+
className: "repeat-workOrder"
|
37
|
+
}, repeatWorkOrderList === null || repeatWorkOrderList === void 0 ? void 0 : repeatWorkOrderList.map(function (item) {
|
38
|
+
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("span", {
|
39
|
+
className: "workOrderId"
|
40
|
+
}, item), /*#__PURE__*/React.createElement(Button, {
|
41
|
+
type: "link",
|
42
|
+
onClick: function onClick() {
|
43
|
+
return copyHandle(item);
|
44
|
+
}
|
45
|
+
}, "\u590D\u5236"));
|
46
|
+
}))));
|
47
|
+
};
|
48
|
+
|
49
|
+
export default RepeatWorkOrderListModal;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.repeat-trade-id {
|
2
|
+
font-weight: 600;
|
3
|
+
}
|
4
|
+
.repeat-workOrder {
|
5
|
+
padding-left: 16px;
|
6
|
+
li {
|
7
|
+
padding: 4px 0px;
|
8
|
+
list-style: decimal;
|
9
|
+
.workOrderId {
|
10
|
+
display: inline-flex;
|
11
|
+
width: 300px;
|
12
|
+
margin-right: 16px;
|
13
|
+
overflow: hidden;
|
14
|
+
white-space: nowrap;
|
15
|
+
text-overflow: ellipsis;
|
16
|
+
}
|
17
|
+
.text-repeat {
|
18
|
+
cursor: pointer;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -25,6 +25,7 @@ import RecordModal from "./components/LogModal";
|
|
25
25
|
import ExamineModal from "./components/ExamineModal";
|
26
26
|
import UnExamineModal from "./components/UnExamineModal";
|
27
27
|
import DeletePaymentWorkOrderModal from "./components/DeletePaymentWorkOrderModal";
|
28
|
+
import RepeatWorkOrderListModal from "./components/RepeatWorkOrderListModal";
|
28
29
|
import FlagPayModal from "./components/FlagPayModal";
|
29
30
|
import PaymentFormModal from "./components/PaymentFormModal";
|
30
31
|
import emptyImg from "../../../common/imgs/empty.png";
|
@@ -194,7 +195,7 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
194
195
|
placement: "topLeft",
|
195
196
|
title: "\u8BF7\u8F93\u5165\u5DE5\u5355\u7F16\u53F7"
|
196
197
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
197
|
-
name: "
|
198
|
+
name: "paymentMixUk"
|
198
199
|
}, /*#__PURE__*/React.createElement(Input, {
|
199
200
|
placeholder: "\u8BF7\u8F93\u5165\u5DE5\u5355\u7F16\u53F7"
|
200
201
|
})))))), /*#__PURE__*/React.createElement("div", {
|
@@ -255,6 +256,7 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
255
256
|
}), /*#__PURE__*/React.createElement("p", null, "\u6682\u65E0\u6570\u636E")))), /*#__PURE__*/React.createElement("div", {
|
256
257
|
className: "custom_box_page"
|
257
258
|
}, /*#__PURE__*/React.createElement(Pagination, {
|
259
|
+
size: "small",
|
258
260
|
showQuickJumper: true,
|
259
261
|
showSizeChanger: false,
|
260
262
|
showTotal: function showTotal(total) {
|
@@ -283,7 +285,7 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
283
285
|
|
284
286
|
onSearch();
|
285
287
|
}
|
286
|
-
}));
|
288
|
+
}), /*#__PURE__*/React.createElement(RepeatWorkOrderListModal, null));
|
287
289
|
};
|
288
290
|
|
289
291
|
export default PaymentWorkOrderList;
|
@@ -7,10 +7,12 @@ declare type getFormItemProps = {
|
|
7
7
|
component: JSX.Element | string | null;
|
8
8
|
};
|
9
9
|
export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
|
10
|
-
export declare const showImage: ({ item, type }: {
|
10
|
+
export declare const showImage: ({ item, type, index }: {
|
11
11
|
item: any;
|
12
12
|
type: string;
|
13
|
+
index: number;
|
13
14
|
}) => JSX.Element;
|
14
15
|
export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
|
15
16
|
export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
|
17
|
+
export declare const JstGoodImage: ({ list, type }: any) => any;
|
16
18
|
export {};
|
@@ -10,8 +10,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
10
10
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
12
|
|
13
|
-
import { Form, Button, Modal, Tooltip } from 'antd';
|
13
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover } from 'antd';
|
14
14
|
import React, { useState } from 'react';
|
15
|
+
import express from "../../../../common/utils/express";
|
15
16
|
import styles from "./index.module.less";
|
16
17
|
import defaultImg from "../../../../common/imgs/default-img.png";
|
17
18
|
export var getFormItem = function getFormItem(_ref) {
|
@@ -45,10 +46,12 @@ export var getFormItem = function getFormItem(_ref) {
|
|
45
46
|
|
46
47
|
export var showImage = function showImage(_ref2) {
|
47
48
|
var item = _ref2.item,
|
48
|
-
type = _ref2.type
|
49
|
+
type = _ref2.type,
|
50
|
+
index = _ref2.index;
|
49
51
|
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
50
52
|
return /*#__PURE__*/React.createElement("div", {
|
51
|
-
className: styles.goodImgBox
|
53
|
+
className: styles.goodImgBox,
|
54
|
+
key: index
|
52
55
|
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
53
56
|
target: "_blank",
|
54
57
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
@@ -74,10 +77,10 @@ export var showImage = function showImage(_ref2) {
|
|
74
77
|
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
75
78
|
title: '商品编码',
|
76
79
|
text: item.outerId
|
77
|
-
}), type === 'itemThird' && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
80
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
78
81
|
title: '供应商编码',
|
79
82
|
text: item.itemId || item.supplierItemOuterId
|
80
|
-
}), type === 'itemThird' && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
83
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
81
84
|
title: '供应商名称',
|
82
85
|
text: item.supplierName
|
83
86
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
@@ -92,7 +95,7 @@ var TextTool = function TextTool(_ref3) {
|
|
92
95
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
93
96
|
placement: "topLeft",
|
94
97
|
title: text
|
95
|
-
}, /*#__PURE__*/React.createElement("
|
98
|
+
}, /*#__PURE__*/React.createElement("div", {
|
96
99
|
style: {
|
97
100
|
overflow: 'hidden',
|
98
101
|
whiteSpace: 'nowrap',
|
@@ -160,10 +163,10 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
160
163
|
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
161
164
|
title: '商品编码',
|
162
165
|
text: i.outerId
|
163
|
-
}), type === 'itemThird' && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
166
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
164
167
|
title: '供应商编码',
|
165
168
|
text: i.itemId || i.supplierItemOuterId
|
166
|
-
}), type === 'itemThird' && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
169
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
167
170
|
title: '供应商名称',
|
168
171
|
text: i.supplierName
|
169
172
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
@@ -185,14 +188,49 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
185
188
|
style: {
|
186
189
|
display: type === 'itemSelect' ? 'flex' : 'block'
|
187
190
|
}
|
188
|
-
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item) {
|
191
|
+
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item, index) {
|
189
192
|
return showImage({
|
190
193
|
item: item,
|
191
|
-
type: type
|
194
|
+
type: type,
|
195
|
+
index: index
|
192
196
|
});
|
193
197
|
}), total > initShowTotal && /*#__PURE__*/React.createElement(ShowTotalImage, {
|
194
198
|
total: total,
|
195
199
|
allImage: list,
|
196
200
|
type: type
|
197
201
|
})) : null;
|
202
|
+
};
|
203
|
+
|
204
|
+
var content = function content(item, index) {
|
205
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
206
|
+
style: {
|
207
|
+
textAlign: 'center'
|
208
|
+
}
|
209
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
210
|
+
return /*#__PURE__*/React.createElement("div", {
|
211
|
+
key: index
|
212
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
213
|
+
width: 70,
|
214
|
+
src: t.picUrl,
|
215
|
+
preview: false
|
216
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
217
|
+
}));
|
218
|
+
};
|
219
|
+
|
220
|
+
export var JstGoodImage = function JstGoodImage(_ref6) {
|
221
|
+
var list = _ref6.list,
|
222
|
+
type = _ref6.type;
|
223
|
+
return list.length ? (list || []).map(function (item, index) {
|
224
|
+
var logisticsCompany = item.logisticsCompany;
|
225
|
+
var company = express.getExpressNameByCode(logisticsCompany);
|
226
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
227
|
+
content: content(item, index)
|
228
|
+
}, /*#__PURE__*/React.createElement("span", {
|
229
|
+
key: index,
|
230
|
+
style: {
|
231
|
+
color: '#1890ff',
|
232
|
+
cursor: 'pointer'
|
233
|
+
}
|
234
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyId) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendName, item.sendId].join('/') : item.sendId ? item.sendId : item.sendName) : null));
|
235
|
+
}) : null;
|
198
236
|
};
|
@@ -24,4 +24,8 @@ import Status from '../Widget/third/Status';
|
|
24
24
|
import Ordinary from '../Widget/third/Ordinary';
|
25
25
|
import ItemSelectThird from '../Widget/third/ItemSelect';
|
26
26
|
import Payment from '../Widget/third/Payment';
|
27
|
-
|
27
|
+
import JstLogistics from './jst/JstLogistics';
|
28
|
+
import JstItemSelect from './jst/JstItemSelect';
|
29
|
+
import JstSupply from './jst/JstSupply';
|
30
|
+
import JstSendGood from './jst/JstSendGood';
|
31
|
+
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment | JstLogistics | JstItemSelect | JstSupply | JstSendGood;
|
@@ -31,6 +31,10 @@ import Ordinary from "../Widget/third/Ordinary";
|
|
31
31
|
import ItemSelectThird from "../Widget/third/ItemSelect";
|
32
32
|
import Payment from "../Widget/third/Payment";
|
33
33
|
import SystemOrderNo from "../Widget/third/SystemOrderNo";
|
34
|
+
import JstLogistics from "./jst/JstLogistics";
|
35
|
+
import JstItemSelect from "./jst/JstItemSelect";
|
36
|
+
import JstSupply from "./jst/JstSupply";
|
37
|
+
import JstSendGood from "./jst/JstSendGood";
|
34
38
|
export var factory = function factory(type, options) {
|
35
39
|
switch (type) {
|
36
40
|
case 'INPUT':
|
@@ -141,6 +145,18 @@ export var factory = function factory(type, options) {
|
|
141
145
|
case 'UPDATE_DATETIME':
|
142
146
|
return new CommonDataTime(options);
|
143
147
|
|
148
|
+
case 'JST_LOGISTICS':
|
149
|
+
return new JstLogistics(options);
|
150
|
+
|
151
|
+
case 'JST_ITEM_SELECT_THIRD':
|
152
|
+
return new JstItemSelect(options);
|
153
|
+
|
154
|
+
case 'JST_SUPPLY':
|
155
|
+
return new JstSupply(options);
|
156
|
+
|
157
|
+
case 'JST_SEND_GOOD':
|
158
|
+
return new JstSendGood(options);
|
159
|
+
|
144
160
|
default:
|
145
161
|
return new BasicInput(options);
|
146
162
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicComponent from '../../BasicComponent';
|
3
|
+
declare class JstItemSelectThird extends BasicComponent {
|
4
|
+
constructor(options: any);
|
5
|
+
render: (value: any, record: any) => JSX.Element;
|
6
|
+
customRules: (config: {
|
7
|
+
enableItemId: any;
|
8
|
+
enableSupplierName: any;
|
9
|
+
}) => {
|
10
|
+
required: boolean;
|
11
|
+
validator: (_: any, value: any) => Promise<void>;
|
12
|
+
}[];
|
13
|
+
editRender: (value: any) => JSX.Element;
|
14
|
+
renderExport: (value: any, record: any) => any;
|
15
|
+
getColumns: () => any;
|
16
|
+
}
|
17
|
+
export default JstItemSelectThird;
|
@@ -0,0 +1,129 @@
|
|
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
|
+
|
3
|
+
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); }
|
4
|
+
|
5
|
+
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; }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
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, descriptor.key, descriptor); } }
|
10
|
+
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
12
|
+
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14
|
+
|
15
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
16
|
+
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
18
|
+
|
19
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
20
|
+
|
21
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
22
|
+
|
23
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
24
|
+
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
26
|
+
|
27
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
28
|
+
|
29
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
30
|
+
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
32
|
+
|
33
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
34
|
+
|
35
|
+
import React from 'react';
|
36
|
+
import BasicComponent from "../../BasicComponent";
|
37
|
+
import { getFormItem, GoodImage } from "../../common/formItemWrap";
|
38
|
+
import { JstItemList } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
39
|
+
|
40
|
+
var JstItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
|
41
|
+
_inherits(JstItemSelectThird, _BasicComponent);
|
42
|
+
|
43
|
+
var _super = _createSuper(JstItemSelectThird);
|
44
|
+
|
45
|
+
function JstItemSelectThird(options) {
|
46
|
+
var _thisSuper, _this;
|
47
|
+
|
48
|
+
_classCallCheck(this, JstItemSelectThird);
|
49
|
+
|
50
|
+
_this = _super.call(this, options);
|
51
|
+
|
52
|
+
_defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
|
53
|
+
//兼容多个商品
|
54
|
+
return /*#__PURE__*/React.createElement(GoodImage, {
|
55
|
+
list: value,
|
56
|
+
type: "jstItemThird"
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
_defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
|
61
|
+
return [{
|
62
|
+
required: true,
|
63
|
+
validator: function validator(_, value) {
|
64
|
+
if (!value || !value.length) {
|
65
|
+
return Promise.reject(new Error('请选择宝贝'));
|
66
|
+
}
|
67
|
+
|
68
|
+
var hasNotId = (value || []).some(function (item) {
|
69
|
+
return !item.itemId;
|
70
|
+
});
|
71
|
+
|
72
|
+
if (config.enableItemId && hasNotId) {
|
73
|
+
return Promise.reject(new Error('请输入供应商编码'));
|
74
|
+
}
|
75
|
+
|
76
|
+
var hasNotName = (value || []).some(function (item) {
|
77
|
+
return !item.supplierName;
|
78
|
+
});
|
79
|
+
|
80
|
+
if (config.enableSupplierName && hasNotName) {
|
81
|
+
return Promise.reject(new Error('请输入供应商名称'));
|
82
|
+
}
|
83
|
+
|
84
|
+
return Promise.resolve();
|
85
|
+
}
|
86
|
+
}];
|
87
|
+
});
|
88
|
+
|
89
|
+
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
90
|
+
var _assertThisInitialize, _assertThisInitialize2, _assertThisInitialize3;
|
91
|
+
|
92
|
+
return getFormItem(_objectSpread({
|
93
|
+
title: _this.name,
|
94
|
+
name: _this.id,
|
95
|
+
rules: (_assertThisInitialize = _assertThisInitialized(_this)) !== null && _assertThisInitialize !== void 0 && (_assertThisInitialize2 = _assertThisInitialize.componentConfig) !== null && _assertThisInitialize2 !== void 0 && _assertThisInitialize2.required ? _this.customRules((_assertThisInitialize3 = _assertThisInitialized(_this)) === null || _assertThisInitialize3 === void 0 ? void 0 : _assertThisInitialize3.componentConfig) : [],
|
96
|
+
required: false,
|
97
|
+
component: /*#__PURE__*/React.createElement(JstItemList, _extends({}, _this.componentConfig, {
|
98
|
+
width: "90%"
|
99
|
+
}))
|
100
|
+
}, value));
|
101
|
+
});
|
102
|
+
|
103
|
+
_defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
|
104
|
+
return value.map(function (item) {
|
105
|
+
return "jst\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || '', "\n jst\u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || '');
|
106
|
+
});
|
107
|
+
});
|
108
|
+
|
109
|
+
_defineProperty(_assertThisInitialized(_this), "getColumns", function () {
|
110
|
+
return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(JstItemSelectThird.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
|
111
|
+
renderExport: _this.renderExport
|
112
|
+
});
|
113
|
+
});
|
114
|
+
|
115
|
+
_this.name = 'jst供应商编码/名称';
|
116
|
+
_this.width = 340;
|
117
|
+
_this.canFilter = false;
|
118
|
+
_this.canGroup = false;
|
119
|
+
_this.canHidden = true;
|
120
|
+
_this.editable = true;
|
121
|
+
_this.dataType = 'string';
|
122
|
+
_this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
123
|
+
return _this;
|
124
|
+
}
|
125
|
+
|
126
|
+
return _createClass(JstItemSelectThird);
|
127
|
+
}(BasicComponent);
|
128
|
+
|
129
|
+
export default JstItemSelectThird;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicComponent from '../../BasicComponent';
|
3
|
+
declare class JstLogistics extends BasicComponent {
|
4
|
+
constructor(options: any);
|
5
|
+
render: (value: any, record: any) => JSX.Element;
|
6
|
+
customRules: () => {
|
7
|
+
required: boolean;
|
8
|
+
validator: (_: any, value: any) => Promise<void>;
|
9
|
+
}[];
|
10
|
+
editRender: (value: any) => JSX.Element;
|
11
|
+
renderExport: (value: any, record: any) => any;
|
12
|
+
getColumns: () => any;
|
13
|
+
}
|
14
|
+
export default JstLogistics;
|
@@ -0,0 +1,121 @@
|
|
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
|
+
|
3
|
+
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); }
|
4
|
+
|
5
|
+
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; }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
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, descriptor.key, descriptor); } }
|
10
|
+
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
12
|
+
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14
|
+
|
15
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
16
|
+
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
18
|
+
|
19
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
20
|
+
|
21
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
22
|
+
|
23
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
24
|
+
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
26
|
+
|
27
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
28
|
+
|
29
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
30
|
+
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
32
|
+
|
33
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
34
|
+
|
35
|
+
import React from 'react';
|
36
|
+
import BasicComponent from "../../BasicComponent";
|
37
|
+
import { getFormItem, JstGoodImage } from "../../common/formItemWrap";
|
38
|
+
import { JstGoods } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
39
|
+
import expressApi from "../../../../../common/utils/express";
|
40
|
+
|
41
|
+
var JstLogistics = /*#__PURE__*/function (_BasicComponent) {
|
42
|
+
_inherits(JstLogistics, _BasicComponent);
|
43
|
+
|
44
|
+
var _super = _createSuper(JstLogistics);
|
45
|
+
|
46
|
+
function JstLogistics(options) {
|
47
|
+
var _thisSuper, _this;
|
48
|
+
|
49
|
+
_classCallCheck(this, JstLogistics);
|
50
|
+
|
51
|
+
_this = _super.call(this, options);
|
52
|
+
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
|
54
|
+
//兼容多个商品
|
55
|
+
return /*#__PURE__*/React.createElement(JstGoodImage, {
|
56
|
+
list: value,
|
57
|
+
type: 1
|
58
|
+
});
|
59
|
+
});
|
60
|
+
|
61
|
+
_defineProperty(_assertThisInitialized(_this), "customRules", function () {
|
62
|
+
return [{
|
63
|
+
required: true,
|
64
|
+
validator: function validator(_, value) {
|
65
|
+
var hasNo = (value || []).some(function (item) {
|
66
|
+
return item.logisticsCompany && item.logisticsCode;
|
67
|
+
});
|
68
|
+
|
69
|
+
if (!hasNo) {
|
70
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u7269\u6D41\u4FE1\u606F"));
|
71
|
+
}
|
72
|
+
|
73
|
+
return Promise.resolve();
|
74
|
+
}
|
75
|
+
}];
|
76
|
+
});
|
77
|
+
|
78
|
+
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
79
|
+
var _assertThisInitialize, _assertThisInitialize2;
|
80
|
+
|
81
|
+
return getFormItem(_objectSpread({
|
82
|
+
title: _this.name,
|
83
|
+
name: _this.id,
|
84
|
+
rules: (_assertThisInitialize = _assertThisInitialized(_this)) !== null && _assertThisInitialize !== void 0 && (_assertThisInitialize2 = _assertThisInitialize.componentConfig) !== null && _assertThisInitialize2 !== void 0 && _assertThisInitialize2.required ? _this.customRules() : [],
|
85
|
+
required: false,
|
86
|
+
component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
|
87
|
+
type: 1
|
88
|
+
}))
|
89
|
+
}, value));
|
90
|
+
});
|
91
|
+
|
92
|
+
_defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
|
93
|
+
return value.map(function (item) {
|
94
|
+
return "jst\u7269\u6D41\u516C\u53F8:".concat(item.logisticsComponent || '', "\n jst\u7269\u6D41\u5355\u53F7:").concat(item.logisticsCode || '');
|
95
|
+
});
|
96
|
+
});
|
97
|
+
|
98
|
+
_defineProperty(_assertThisInitialized(_this), "getColumns", function () {
|
99
|
+
return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(JstLogistics.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
|
100
|
+
renderExport: _this.renderExport
|
101
|
+
});
|
102
|
+
});
|
103
|
+
|
104
|
+
_this.name = 'jst物流信息';
|
105
|
+
_this.width = 340;
|
106
|
+
_this.canFilter = false;
|
107
|
+
_this.canGroup = false;
|
108
|
+
_this.canHidden = true;
|
109
|
+
_this.editable = true;
|
110
|
+
_this.dataType = 'string';
|
111
|
+
_this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
112
|
+
_this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
113
|
+
options: expressApi.getData()
|
114
|
+
});
|
115
|
+
return _this;
|
116
|
+
}
|
117
|
+
|
118
|
+
return _createClass(JstLogistics);
|
119
|
+
}(BasicComponent);
|
120
|
+
|
121
|
+
export default JstLogistics;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicComponent from '../../BasicComponent';
|
3
|
+
declare class JstSendGood extends BasicComponent {
|
4
|
+
constructor(options: any);
|
5
|
+
render: (value: any, record: any) => JSX.Element;
|
6
|
+
customRules: (config: any) => {
|
7
|
+
required: boolean;
|
8
|
+
validator: (_: any, value: any) => Promise<void>;
|
9
|
+
}[];
|
10
|
+
editRender: (value: any) => JSX.Element;
|
11
|
+
renderExport: (value: any, record: any) => any;
|
12
|
+
getColumns: () => any;
|
13
|
+
}
|
14
|
+
export default JstSendGood;
|