kmkf-work-order-service-component 0.2.1 → 0.2.2-alpha.2
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/WorkOrder/components/CustomizeFormModal/index.js +7 -1
- package/dist/esm/WorkOrder/components/CustomizeFormModal/wrap.d.ts +2 -2
- package/dist/esm/WorkOrder/components/CustomizeFormModal/wrap.js +4 -4
- package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +0 -8
- package/dist/esm/WorkOrder/components/Widget/electricity/EBuyerNick/index.d.ts +1 -6
- package/dist/esm/WorkOrder/components/Widget/electricity/EBuyerNick/index.js +9 -38
- package/dist/esm/WorkOrder/components/Widget/third/Payment/index.d.ts +0 -2
- package/dist/esm/WorkOrder/components/Widget/third/Payment/index.js +4 -24
- package/package.json +2 -2
@@ -42,6 +42,7 @@ import 'moment/locale/zh-cn';
|
|
42
42
|
import { calcWorkOrderList, submitDataTransOldFormat, orderBack } from "../../../common/utils/tools";
|
43
43
|
import { factory } from "../Widget";
|
44
44
|
import { queryTemplateDetail, addWorkOrder, queryWorkOrderDetail, updateWorkOrder } from "../../../model/servers/api";
|
45
|
+
import { useAppSelector } from "../../../model/hooks";
|
45
46
|
import styles from "./index.module.less";
|
46
47
|
import "./index.less";
|
47
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -91,6 +92,10 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
91
92
|
setCurrentShopId = _useState14[1]; // 有些组件对于shopId有依赖
|
92
93
|
|
93
94
|
|
95
|
+
var platformInfo = useAppSelector(function (state) {
|
96
|
+
return state.global.platformInfo;
|
97
|
+
});
|
98
|
+
|
94
99
|
var _Form$useForm = Form.useForm(),
|
95
100
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
96
101
|
form = _Form$useForm2[0];
|
@@ -181,7 +186,8 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
181
186
|
workOrderComponentVos: [],
|
182
187
|
accessToken: get(find(shopList, function (s) {
|
183
188
|
return s.shopId === currentShopId;
|
184
|
-
}), 'accessToken', '')
|
189
|
+
}), 'accessToken', ''),
|
190
|
+
source: platformInfo.platform
|
185
191
|
};
|
186
192
|
_params.workOrderComponentVos = submitDataTransOldFormat(data, templateDetail, !!workOrderId, workOrderDetail, _params);
|
187
193
|
hasEnterPrisePayment = some(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, function (item) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
declare const
|
1
|
+
declare const openCustomizeWorkOrder: (prefixParams: {
|
2
2
|
shopList?: [] | undefined;
|
3
3
|
onSuccess?: ((val?: any) => void) | undefined;
|
4
4
|
}) => (params: any) => void;
|
5
|
-
export default
|
5
|
+
export default openCustomizeWorkOrder;
|
@@ -7,8 +7,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
7
7
|
/*
|
8
8
|
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
9
9
|
* @Date: 2022-09-13 14:30:28
|
10
|
-
* @LastEditors:
|
11
|
-
* @LastEditTime: 2022-
|
10
|
+
* @LastEditors: litian
|
11
|
+
* @LastEditTime: 2022-12-01 16:30:15
|
12
12
|
* @FilePath: /kmkf-work-order-service-component/src/WorkOrder/components/CustomizeFormModal/wrap.tsx
|
13
13
|
* @Description:
|
14
14
|
*
|
@@ -19,7 +19,7 @@ import { render as reactRender, unmount as reactUnmount } from 'rc-util/lib/Reac
|
|
19
19
|
import CustomizeFormModal from "./index";
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
21
21
|
|
22
|
-
var
|
22
|
+
var openCustomizeWorkOrder = function openCustomizeWorkOrder(prefixParams) {
|
23
23
|
return function (params) {
|
24
24
|
var container = document.createDocumentFragment();
|
25
25
|
var ref = /*#__PURE__*/createRef();
|
@@ -50,4 +50,4 @@ var openCustomizeWOrkOrder = function openCustomizeWOrkOrder(prefixParams) {
|
|
50
50
|
};
|
51
51
|
};
|
52
52
|
|
53
|
-
export default
|
53
|
+
export default openCustomizeWorkOrder;
|
@@ -334,14 +334,6 @@ function ModifyModal(props, ref) {
|
|
334
334
|
message: '请输入买家昵称'
|
335
335
|
}],
|
336
336
|
children: /*#__PURE__*/_jsx(Input, {})
|
337
|
-
}), /*#__PURE__*/_jsx(Form.Item, {
|
338
|
-
label: "\u4E70\u5BB6\u6635\u79F0id",
|
339
|
-
name: "buyerOpenUid",
|
340
|
-
rules: [{
|
341
|
-
required: true,
|
342
|
-
message: '请输入买家昵称id'
|
343
|
-
}],
|
344
|
-
children: /*#__PURE__*/_jsx(Input, {})
|
345
337
|
}), /*#__PURE__*/_jsx(Form.Item, {
|
346
338
|
label: "\u8BA2\u5355\u7F16\u53F7",
|
347
339
|
name: "tid",
|
@@ -1,10 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import BasicComponent from '../../BasicComponent';
|
3
|
-
import EBuyerName from '../EBuyerName';
|
4
|
-
import EBuyerOpenUid from '../EBuyerOpenUid';
|
5
3
|
declare class EBuyerNick extends BasicComponent {
|
6
|
-
buyerNick: EBuyerName;
|
7
|
-
buyerOpenUid: EBuyerOpenUid;
|
8
4
|
constructor(options: any);
|
9
5
|
customRules: (config: any) => {
|
10
6
|
validator: (_: any, value: {
|
@@ -12,8 +8,7 @@ declare class EBuyerNick extends BasicComponent {
|
|
12
8
|
buyerOpenUid: any;
|
13
9
|
}) => Promise<void>;
|
14
10
|
}[];
|
15
|
-
render: () =>
|
11
|
+
render: (value: any, record: any) => JSX.Element;
|
16
12
|
editRender: (value: any) => JSX.Element;
|
17
|
-
getColumns: () => any;
|
18
13
|
}
|
19
14
|
export default EBuyerNick;
|
@@ -31,13 +31,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
31
31
|
* @Author: litian
|
32
32
|
* @Date: 2022-06-30 17:30:05
|
33
33
|
* @LastEditors: litian
|
34
|
-
* @LastEditTime: 2022-
|
34
|
+
* @LastEditTime: 2022-11-30 14:34:16
|
35
35
|
*/
|
36
36
|
import React from 'react';
|
37
37
|
import { BuyerNick } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
38
38
|
import BasicComponent from "../../BasicComponent";
|
39
|
-
import EBuyerName from "../EBuyerName";
|
40
|
-
import EBuyerOpenUid from "../EBuyerOpenUid";
|
41
39
|
import { getFormItem } from "../../common/formItemWrap";
|
42
40
|
import { jsx as _jsx } from "react/jsx-runtime";
|
43
41
|
|
@@ -55,10 +53,6 @@ var EBuyerNick = /*#__PURE__*/function (_BasicComponent) {
|
|
55
53
|
|
56
54
|
_this = _super.call(this, options);
|
57
55
|
|
58
|
-
_defineProperty(_assertThisInitialized(_this), "buyerNick", void 0);
|
59
|
-
|
60
|
-
_defineProperty(_assertThisInitialized(_this), "buyerOpenUid", void 0);
|
61
|
-
|
62
56
|
_defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
|
63
57
|
return [{
|
64
58
|
validator: function validator(_, value) {
|
@@ -66,53 +60,30 @@ var EBuyerNick = /*#__PURE__*/function (_BasicComponent) {
|
|
66
60
|
return Promise.reject(new Error('请输入买家旺旺'));
|
67
61
|
}
|
68
62
|
|
69
|
-
var _this$componentConfig = _this.componentConfig,
|
70
|
-
shopList = _this$componentConfig.shopList,
|
71
|
-
shopId = _this$componentConfig.shopId;
|
72
|
-
var isTaoBao = shopList.some(function (item) {
|
73
|
-
return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
|
74
|
-
});
|
75
|
-
|
76
|
-
if (isTaoBao && !(value !== null && value !== void 0 && value.buyerOpenUid)) {
|
77
|
-
return Promise.reject(new Error('请输入买家旺旺id'));
|
78
|
-
}
|
79
|
-
|
80
63
|
return Promise.resolve();
|
81
64
|
}
|
82
65
|
}];
|
83
66
|
});
|
84
67
|
|
85
|
-
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
86
|
-
return
|
68
|
+
_defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
|
69
|
+
return /*#__PURE__*/_jsx("span", {
|
70
|
+
children: value === null || value === void 0 ? void 0 : value.buyerNick
|
71
|
+
});
|
87
72
|
});
|
88
73
|
|
89
74
|
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
90
|
-
var _this$
|
75
|
+
var _this$componentConfig, _this$componentConfig2;
|
91
76
|
|
92
77
|
return getFormItem(_objectSpread({
|
93
78
|
title: _this.name,
|
94
79
|
name: _this.id,
|
95
|
-
rules: (_this$
|
96
|
-
required: (_this$
|
80
|
+
rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules(_this.componentConfig) : [],
|
81
|
+
required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
|
97
82
|
component: /*#__PURE__*/_jsx(BuyerNick, _objectSpread({}, _this.componentConfig))
|
98
83
|
}, value));
|
99
84
|
});
|
100
85
|
|
101
|
-
|
102
|
-
return {
|
103
|
-
title: _this.name,
|
104
|
-
children: [_this.buyerNick.getColumns(), _this.buyerOpenUid.getColumns()],
|
105
|
-
canHidden: _this.canHidden,
|
106
|
-
dataIndex: _this.id
|
107
|
-
};
|
108
|
-
});
|
109
|
-
|
110
|
-
_this.buyerNick = new EBuyerName(_objectSpread(_objectSpread({}, options), {}, {
|
111
|
-
name: '买家旺旺'
|
112
|
-
}));
|
113
|
-
_this.buyerOpenUid = new EBuyerOpenUid(_objectSpread(_objectSpread({}, options), {}, {
|
114
|
-
name: '买家旺旺id'
|
115
|
-
}));
|
86
|
+
_this.canFilter = true;
|
116
87
|
_this.canHidden = true;
|
117
88
|
_this.effects = options.effects;
|
118
89
|
_this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
@@ -4,7 +4,6 @@ import AlipayNick from './AlipayNick';
|
|
4
4
|
import PaymentStatus from './PaymentStatus';
|
5
5
|
import PaymentAmount from './PaymentAmount';
|
6
6
|
import BuyerNick from './BuyerNick';
|
7
|
-
import BuyerOpenUid from './BuyerOpenUid';
|
8
7
|
import PaymentTid from './PaymentTid';
|
9
8
|
import AlipayNo from './AlipayNo';
|
10
9
|
import PayTime from './PayTime';
|
@@ -13,7 +12,6 @@ declare class Payment extends BasicComponent {
|
|
13
12
|
paymentStatus: PaymentStatus;
|
14
13
|
paymentAmount: PaymentAmount;
|
15
14
|
buyerNick: BuyerNick;
|
16
|
-
buyerOpenUid: BuyerOpenUid;
|
17
15
|
paymentTid: PaymentTid;
|
18
16
|
alipayNo: AlipayNo;
|
19
17
|
payTime: PayTime;
|
@@ -40,7 +40,6 @@ import AlipayNick from "./AlipayNick";
|
|
40
40
|
import PaymentStatus from "./PaymentStatus";
|
41
41
|
import PaymentAmount from "./PaymentAmount";
|
42
42
|
import BuyerNick from "./BuyerNick";
|
43
|
-
import BuyerOpenUid from "./BuyerOpenUid";
|
44
43
|
import PaymentTid from "./PaymentTid";
|
45
44
|
import AlipayNo from "./AlipayNo";
|
46
45
|
import PayTime from "./PayTime";
|
@@ -69,8 +68,6 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
69
68
|
|
70
69
|
_defineProperty(_assertThisInitialized(_this), "buyerNick", void 0);
|
71
70
|
|
72
|
-
_defineProperty(_assertThisInitialized(_this), "buyerOpenUid", void 0);
|
73
|
-
|
74
71
|
_defineProperty(_assertThisInitialized(_this), "paymentTid", void 0);
|
75
72
|
|
76
73
|
_defineProperty(_assertThisInitialized(_this), "alipayNo", void 0);
|
@@ -88,21 +85,6 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
88
85
|
return Promise.reject(new Error('打款金额最多2位小数'));
|
89
86
|
}
|
90
87
|
|
91
|
-
if (config.required && !(value !== null && value !== void 0 && value.enterprisePaymentBuyerNick)) {
|
92
|
-
return Promise.reject(new Error('请输入买家昵称'));
|
93
|
-
}
|
94
|
-
|
95
|
-
var _this$componentConfig = _this.componentConfig,
|
96
|
-
shopList = _this$componentConfig.shopList,
|
97
|
-
shopId = _this$componentConfig.shopId;
|
98
|
-
var isTaoBao = shopList.some(function (item) {
|
99
|
-
return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
|
100
|
-
});
|
101
|
-
|
102
|
-
if (config.required && isTaoBao && !(value !== null && value !== void 0 && value.enterprisePaymentBuyerOpenUid)) {
|
103
|
-
return Promise.reject(new Error('请输入买家昵称id'));
|
104
|
-
}
|
105
|
-
|
106
88
|
if (config.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
|
107
89
|
return Promise.reject(new Error('请输入订单编号'));
|
108
90
|
} else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
|
@@ -129,13 +111,13 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
129
111
|
});
|
130
112
|
|
131
113
|
_defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
|
132
|
-
var _this$
|
114
|
+
var _this$componentConfig;
|
133
115
|
|
134
116
|
return getFormItem(_objectSpread({
|
135
117
|
title: _this.name,
|
136
118
|
name: _this.id,
|
137
119
|
rules: _this.customRules(_this.componentConfig),
|
138
|
-
required: (_this$
|
120
|
+
required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
|
139
121
|
component: /*#__PURE__*/_jsx(ApaasPayment, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
140
122
|
onSearch: function onSearch(e) {
|
141
123
|
return _this.changeHandle(e.target.value);
|
@@ -147,7 +129,8 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
147
129
|
_defineProperty(_assertThisInitialized(_this), "getColumns", function () {
|
148
130
|
return {
|
149
131
|
title: _this.name,
|
150
|
-
children: [_this.paymentTid.getColumns(), _this.paymentStatus.getColumns(), _this.paymentAmount.getColumns(), _this.buyerNick.getColumns(),
|
132
|
+
children: [_this.paymentTid.getColumns(), _this.paymentStatus.getColumns(), _this.paymentAmount.getColumns(), _this.buyerNick.getColumns(), // this.buyerOpenUid.getColumns(),
|
133
|
+
_this.alipayNick.getColumns(), _this.alipayNo.getColumns(), _this.payTime.getColumns()],
|
151
134
|
canHidden: _this.canHidden,
|
152
135
|
dataIndex: _this.id
|
153
136
|
};
|
@@ -162,9 +145,6 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
|
|
162
145
|
_this.buyerNick = new BuyerNick(_objectSpread(_objectSpread({}, options), {}, {
|
163
146
|
name: '买家昵称'
|
164
147
|
}));
|
165
|
-
_this.buyerOpenUid = new BuyerOpenUid(_objectSpread(_objectSpread({}, options), {}, {
|
166
|
-
name: '买家昵称id'
|
167
|
-
}));
|
168
148
|
_this.paymentTid = new PaymentTid(_objectSpread(_objectSpread({}, options), {}, {
|
169
149
|
name: '订单编号'
|
170
150
|
}));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "kmkf-work-order-service-component",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.2-alpha.2",
|
4
4
|
"scripts": {
|
5
5
|
"start": "dumi dev",
|
6
6
|
"docs:build": "dumi build",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
41
|
"@ant-design/icons": "^4.7.0",
|
42
|
-
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.
|
42
|
+
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.28-alpha.3",
|
43
43
|
"@reduxjs/toolkit": "^1.8.5",
|
44
44
|
"js-md5": "^0.7.3",
|
45
45
|
"react-redux": "^7.2.8",
|