kmkf-work-order-service-component 0.0.1-alpha.5 → 0.0.1-alpha.7
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/common/utils/tools.d.ts +1 -0
- package/dist/esm/WorkOrder/common/utils/tools.js +11 -4
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +4 -2
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.module.less +6 -5
- package/dist/esm/WorkOrder/components/ListOrderItem/index.js +11 -8
- package/dist/esm/WorkOrder/components/ListOrderItem/index.module.less +13 -5
- package/dist/esm/WorkOrder/components/PayListOrderItem/index.js +9 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +10 -4
- package/dist/esm/WorkOrder/components/Widget/electricity/EItemEncode/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/EItemId/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/EItemSelect/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/third/ItemSelect/index.js +2 -2
- package/dist/esm/WorkOrder/index.js +1 -1
- package/dist/esm/WorkOrder/model/servers/request.js +5 -22
- package/package.json +2 -2
@@ -61,3 +61,4 @@ export interface WorkOrderDetail {
|
|
61
61
|
export declare const formatPictures: (pictures: any) => any;
|
62
62
|
export declare const calcWorkOrderList: (source: Partial<WorkOrderDetail>[], templateColumns: TemplateColumnConfig[], type?: string) => any[];
|
63
63
|
export declare const orderBack: ({ order_no, form, shopId, shopList, templateDetail }: any) => Promise<void>;
|
64
|
+
export declare const imgResize: (url: string, w?: number, h?: number) => string;
|
@@ -726,11 +726,11 @@ export var orderBack = /*#__PURE__*/function () {
|
|
726
726
|
|
727
727
|
newData = calcWorkOrderList([{
|
728
728
|
jsonMap: detailsValue
|
729
|
-
}], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
|
729
|
+
}], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
|
730
|
+
console.log('detailsValue=========', formValue, newData[0]);
|
731
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, newData[0]), formValue));
|
730
732
|
|
731
|
-
|
732
|
-
|
733
|
-
case 21:
|
733
|
+
case 22:
|
734
734
|
case "end":
|
735
735
|
return _context.stop();
|
736
736
|
}
|
@@ -822,4 +822,11 @@ var getComponentsValue = function getComponentsValue() {
|
|
822
822
|
|
823
823
|
return prv;
|
824
824
|
}, {});
|
825
|
+
}; //图片压缩
|
826
|
+
|
827
|
+
|
828
|
+
export var imgResize = function imgResize(url) {
|
829
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
830
|
+
var h = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
|
831
|
+
return "".concat(url, "?x-oss-process=image/resize,h_").concat(h, ",w_").concat(w);
|
825
832
|
};
|
@@ -329,6 +329,8 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
329
329
|
} else {
|
330
330
|
//获取一些默认数据
|
331
331
|
jsonMap = _templateDetail === null || _templateDetail === void 0 ? void 0 : (_templateDetail$data2 = _templateDetail.data) === null || _templateDetail$data2 === void 0 ? void 0 : _templateDetail$data2.componentDtoList.reduce(function (prv, next) {
|
332
|
+
console.log(next, next.workOrderComponentType);
|
333
|
+
|
332
334
|
if (next.workOrderComponentType === 'BUYER_NICK_INPUT') {
|
333
335
|
prv["".concat(next.uniqueKey, "_buyerOpenUid")] = buyerId;
|
334
336
|
}
|
@@ -338,7 +340,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
338
340
|
}
|
339
341
|
|
340
342
|
return prv;
|
341
|
-
});
|
343
|
+
}, {});
|
342
344
|
_transData = calcWorkOrderList([{
|
343
345
|
jsonMap: jsonMap
|
344
346
|
}], _templateDetail === null || _templateDetail === void 0 ? void 0 : (_templateDetail$data3 = _templateDetail.data) === null || _templateDetail$data3 === void 0 ? void 0 : _templateDetail$data3.componentDtoList, 'init');
|
@@ -451,7 +453,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
451
453
|
};
|
452
454
|
|
453
455
|
return /*#__PURE__*/_jsx(Drawer, {
|
454
|
-
title:
|
456
|
+
title: (templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.name) || '工单录入',
|
455
457
|
width: '100%',
|
456
458
|
open: visible,
|
457
459
|
onClose: closeModal,
|
@@ -74,6 +74,7 @@
|
|
74
74
|
:global(.ant-form-item-label) {
|
75
75
|
position: relative;
|
76
76
|
max-width: 30%;
|
77
|
+
overflow: initial;
|
77
78
|
color: rgba(0, 0, 0, 0.55);
|
78
79
|
// font-weight: bold;
|
79
80
|
font-size: 14px;
|
@@ -86,11 +87,11 @@
|
|
86
87
|
text-align: left;
|
87
88
|
// font-family: 'PingFangSC-Semibold';
|
88
89
|
|
89
|
-
&[title='处理客服'] {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
}
|
90
|
+
// &[title='处理客服'] {
|
91
|
+
// padding-left: 0;
|
92
|
+
// font-weight: lighter;
|
93
|
+
// font-family: 'PingFangSC-Regular';
|
94
|
+
// }
|
94
95
|
}
|
95
96
|
|
96
97
|
:global(.label-title--index) {
|
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
* @Author: litian
|
22
22
|
* @Date: 2022-09-07 17:04:02
|
23
23
|
* @LastEditors: litian
|
24
|
-
* @LastEditTime: 2022-09-
|
24
|
+
* @LastEditTime: 2022-09-27 16:01:53
|
25
25
|
*/
|
26
26
|
import React from 'react';
|
27
27
|
import { factory } from "../Widget";
|
@@ -184,17 +184,20 @@ function ListOrderItem(props) {
|
|
184
184
|
var showEditorBtn = isAfterSalePayment(componentDtoList);
|
185
185
|
return /*#__PURE__*/_jsxs("div", {
|
186
186
|
className: styles.orderItem,
|
187
|
-
children: [/*#__PURE__*/
|
187
|
+
children: [/*#__PURE__*/_jsx("div", {
|
188
188
|
className: styles.orderItemLeft,
|
189
|
-
children:
|
189
|
+
children: /*#__PURE__*/_jsxs("div", {
|
190
190
|
className: styles.orderItemType,
|
191
191
|
children: [/*#__PURE__*/_jsx("div", {
|
192
192
|
className: styles.orderItemLeftIcon
|
193
|
-
}),
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
193
|
+
}), /*#__PURE__*/_jsxs("div", {
|
194
|
+
className: styles.orderItemLeftName,
|
195
|
+
children: [templateDetailDto ? templateDetailDto.name : '', showMsg.length > 1 && /*#__PURE__*/_jsx("div", {
|
196
|
+
className: "".concat(styles.orderItemStatus, " ").concat(showMsg.includes('已') ? styles.done : styles.undo),
|
197
|
+
children: showMsg
|
198
|
+
})]
|
199
|
+
})]
|
200
|
+
})
|
198
201
|
}), /*#__PURE__*/_jsxs("div", {
|
199
202
|
className: styles.orderItemRight,
|
200
203
|
children: [hasStatus ? /*#__PURE__*/_jsx("div", {
|
@@ -30,16 +30,23 @@
|
|
30
30
|
margin-right: 8px;
|
31
31
|
background: #1966ff;
|
32
32
|
}
|
33
|
+
|
34
|
+
.orderItemLeftName {
|
35
|
+
width: 115px;
|
36
|
+
line-height: 16px;
|
37
|
+
}
|
33
38
|
}
|
34
39
|
|
35
40
|
.orderItemStatus {
|
36
|
-
display:
|
37
|
-
align-items: center;
|
38
|
-
justify-content: center;
|
41
|
+
display: inline-block;
|
39
42
|
box-sizing: border-box;
|
40
43
|
height: 24px;
|
41
|
-
margin-left: 12px;
|
42
44
|
padding: 0px 4px;
|
45
|
+
line-height: 23px;
|
46
|
+
white-space: nowrap;
|
47
|
+
// align-items: center;
|
48
|
+
// justify-content: center;
|
49
|
+
text-align: center;
|
43
50
|
border-radius: 2px;
|
44
51
|
}
|
45
52
|
|
@@ -67,9 +74,10 @@
|
|
67
74
|
align-items: center;
|
68
75
|
justify-content: center;
|
69
76
|
box-sizing: border-box;
|
70
|
-
width: 48px;
|
71
77
|
height: 24px;
|
72
78
|
margin: 0 4px;
|
79
|
+
// width: 48px;
|
80
|
+
padding: 0 8px;
|
73
81
|
color: #1966ff;
|
74
82
|
font-weight: normal;
|
75
83
|
white-space: nowrap;
|
@@ -64,6 +64,10 @@ var PAY_STATUS = [{
|
|
64
64
|
label: '打款关闭',
|
65
65
|
color: 'rgba(156,156,156)'
|
66
66
|
}];
|
67
|
+
var PAY_STATUS_ICON = {
|
68
|
+
WAITING_EXAMINE: '#FF4050',
|
69
|
+
EXAMINED: '#43BF0A'
|
70
|
+
};
|
67
71
|
|
68
72
|
function PayListOrderItem(props) {
|
69
73
|
var _props$record = props.record,
|
@@ -314,7 +318,7 @@ function PayListOrderItem(props) {
|
|
314
318
|
content: /*#__PURE__*/_jsxs("div", {
|
315
319
|
children: [/*#__PURE__*/_jsx("span", {
|
316
320
|
className: styles.red,
|
317
|
-
children: "\u53D6\u6D88\u5BA1\u6838\u540E\uFF0C\u5DE5\u5355\u72B6\u6001\u53D8\u66F4\u4E3A\u672A\u6253\u6B3E\u72B6\u6001
|
321
|
+
children: "\u53D6\u6D88\u5BA1\u6838\u540E\uFF0C\u5DE5\u5355\u72B6\u6001\u53D8\u66F4\u4E3A\u672A\u6253\u6B3E\u72B6\u6001"
|
318
322
|
}), "\uFF0C \u4F60\u8FD8\u8981\u7EE7\u7EED\u5417\uFF1F"]
|
319
323
|
}),
|
320
324
|
okText: '确认',
|
@@ -409,7 +413,10 @@ function PayListOrderItem(props) {
|
|
409
413
|
children: /*#__PURE__*/_jsxs("div", {
|
410
414
|
className: styles.orderItemType,
|
411
415
|
children: [/*#__PURE__*/_jsx("div", {
|
412
|
-
className: styles.orderItemLeftIcon
|
416
|
+
className: styles.orderItemLeftIcon,
|
417
|
+
style: {
|
418
|
+
backgroundColor: PAY_STATUS_ICON[workPayStatus] ? PAY_STATUS_ICON[workPayStatus] : '#1966FF'
|
419
|
+
}
|
413
420
|
}), /*#__PURE__*/_jsx("span", {
|
414
421
|
style: {
|
415
422
|
color: getColor(workPayStatus) || 'rgba(156,156,156)'
|
@@ -31,13 +31,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
31
31
|
* @Author: litian
|
32
32
|
* @Date: 2022-09-07 17:58:35
|
33
33
|
* @LastEditors: litian
|
34
|
-
* @LastEditTime: 2022-09-
|
34
|
+
* @LastEditTime: 2022-09-27 16:17:25
|
35
35
|
*/
|
36
36
|
import React from 'react';
|
37
37
|
import BasicComponent from "../../BasicComponent";
|
38
38
|
import { getFormItem } from "../../common/formItemWrap";
|
39
|
-
import {
|
39
|
+
import { ApaasUploadAsync } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
|
40
40
|
import { Image } from 'antd';
|
41
|
+
import { imgResize } from "../../../../common/utils/tools";
|
41
42
|
import { jsx as _jsx } from "react/jsx-runtime";
|
42
43
|
|
43
44
|
var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
@@ -61,7 +62,10 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
|
61
62
|
},
|
62
63
|
children: /*#__PURE__*/_jsx(Image, {
|
63
64
|
width: 32,
|
64
|
-
src: pic
|
65
|
+
src: imgResize(pic || ''),
|
66
|
+
preview: {
|
67
|
+
src: pic
|
68
|
+
}
|
65
69
|
})
|
66
70
|
});
|
67
71
|
});
|
@@ -75,7 +79,9 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
|
75
79
|
name: _this.id,
|
76
80
|
rules: [],
|
77
81
|
required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
|
78
|
-
component: /*#__PURE__*/_jsx(
|
82
|
+
component: /*#__PURE__*/_jsx(ApaasUploadAsync, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
83
|
+
uniqueKey: _this.id
|
84
|
+
}))
|
79
85
|
}, value));
|
80
86
|
});
|
81
87
|
|
@@ -35,7 +35,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
35
35
|
* @Author: litian
|
36
36
|
* @Date: 2022-08-15 14:37:33
|
37
37
|
* @LastEditors: litian
|
38
|
-
* @LastEditTime: 2022-09-
|
38
|
+
* @LastEditTime: 2022-09-27 10:55:47
|
39
39
|
*/
|
40
40
|
import React from 'react';
|
41
41
|
import BasicComponent from "../../BasicComponent";
|
@@ -95,7 +95,7 @@ var EItemSelect = /*#__PURE__*/function (_BasicComponent) {
|
|
95
95
|
component: /*#__PURE__*/_jsx(ItemEncode, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
96
96
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
97
97
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
98
|
-
width: "
|
98
|
+
width: "90%"
|
99
99
|
}))
|
100
100
|
}, value));
|
101
101
|
});
|
@@ -35,7 +35,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
35
35
|
* @Author: litian
|
36
36
|
* @Date: 2022-08-15 14:37:33
|
37
37
|
* @LastEditors: litian
|
38
|
-
* @LastEditTime: 2022-09-
|
38
|
+
* @LastEditTime: 2022-09-27 16:15:00
|
39
39
|
*/
|
40
40
|
import React from 'react';
|
41
41
|
import BasicComponent from "../../BasicComponent";
|
@@ -95,7 +95,7 @@ var EItemId = /*#__PURE__*/function (_BasicComponent) {
|
|
95
95
|
component: /*#__PURE__*/_jsx(ItemId, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
96
96
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
97
97
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
98
|
-
width: "
|
98
|
+
width: "90%"
|
99
99
|
}))
|
100
100
|
}, value));
|
101
101
|
});
|
@@ -35,7 +35,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
35
35
|
* @Author: litian
|
36
36
|
* @Date: 2022-08-15 14:37:33
|
37
37
|
* @LastEditors: litian
|
38
|
-
* @LastEditTime: 2022-09-
|
38
|
+
* @LastEditTime: 2022-09-27 10:55:53
|
39
39
|
*/
|
40
40
|
import React from 'react';
|
41
41
|
import BasicComponent from "../../BasicComponent";
|
@@ -72,7 +72,7 @@ var EItemSelect = /*#__PURE__*/function (_BasicComponent) {
|
|
72
72
|
component: /*#__PURE__*/_jsx(ItemSelect, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
73
73
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
74
74
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
75
|
-
width: "
|
75
|
+
width: "90%"
|
76
76
|
}))
|
77
77
|
}, value));
|
78
78
|
});
|
@@ -35,7 +35,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
35
35
|
* @Author: litian
|
36
36
|
* @Date: 2022-08-15 14:37:33
|
37
37
|
* @LastEditors: litian
|
38
|
-
* @LastEditTime: 2022-09-
|
38
|
+
* @LastEditTime: 2022-09-27 10:56:05
|
39
39
|
*/
|
40
40
|
import React from 'react';
|
41
41
|
import BasicComponent from "../../BasicComponent";
|
@@ -104,7 +104,7 @@ var ItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
|
|
104
104
|
type: 4,
|
105
105
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
106
106
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
107
|
-
width: "
|
107
|
+
width: "90%"
|
108
108
|
}))
|
109
109
|
}, value));
|
110
110
|
});
|
@@ -28,7 +28,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
29
29
|
* @Date: 2022-09-16 11:19:43
|
30
30
|
* @LastEditors: litian
|
31
|
-
* @LastEditTime: 2022-09-
|
31
|
+
* @LastEditTime: 2022-09-27 09:54:27
|
32
32
|
* @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
|
33
33
|
* @Description:
|
34
34
|
*
|
@@ -9,7 +9,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
9
9
|
* @Author: litian
|
10
10
|
* @Date: 2022-09-06 09:29:34
|
11
11
|
* @LastEditors: litian
|
12
|
-
* @LastEditTime: 2022-09-
|
12
|
+
* @LastEditTime: 2022-09-27 15:46:05
|
13
13
|
*/
|
14
14
|
import { extend } from 'umi-request';
|
15
15
|
import { message } from 'antd';
|
@@ -20,24 +20,7 @@ var requestApi = function requestApi(_ref) {
|
|
20
20
|
data = _ref.data,
|
21
21
|
_ref$headers = _ref.headers,
|
22
22
|
headers = _ref$headers === void 0 ? {} : _ref$headers;
|
23
|
-
var request = extend({});
|
24
|
-
// const host = localStorage.getItem('kmkf_kmgd_host') || '';
|
25
|
-
// const cookies: any = localStorage.getItem('kmkf_kmgd_cookie') ? localStorage.getItem('kmkf_kmgd_cookie')?.split(':') : []
|
26
|
-
// let headers: any = {
|
27
|
-
// ...options.headers,
|
28
|
-
// }
|
29
|
-
// if (cookies.length) {
|
30
|
-
// headers[cookies[0]] = cookies[1]
|
31
|
-
// }
|
32
|
-
// return {
|
33
|
-
// url: host + url,
|
34
|
-
// options: {
|
35
|
-
// ...options,
|
36
|
-
// headers
|
37
|
-
// },
|
38
|
-
// }
|
39
|
-
// })
|
40
|
-
|
23
|
+
var request = extend({});
|
41
24
|
return new Promise(function (resolve, reject) {
|
42
25
|
var _localStorage$getItem;
|
43
26
|
|
@@ -46,8 +29,8 @@ var requestApi = function requestApi(_ref) {
|
|
46
29
|
headers: _objectSpread({
|
47
30
|
'Content-type': 'application/json;charset=UTF-8'
|
48
31
|
}, headers)
|
49
|
-
};
|
50
|
-
|
32
|
+
}; // const host = localStorage.getItem('kmkf_kmgd_host') || '';
|
33
|
+
|
51
34
|
var cookies = localStorage.getItem('kmkf_kmgd_cookie') ? (_localStorage$getItem = localStorage.getItem('kmkf_kmgd_cookie')) === null || _localStorage$getItem === void 0 ? void 0 : _localStorage$getItem.split(':') : [];
|
52
35
|
|
53
36
|
if (cookies) {
|
@@ -60,7 +43,7 @@ var requestApi = function requestApi(_ref) {
|
|
60
43
|
params.data = data;
|
61
44
|
}
|
62
45
|
|
63
|
-
request(
|
46
|
+
request(url, params).then(function (res) {
|
64
47
|
if (res.result === 100 || res.success) {
|
65
48
|
resolve(res);
|
66
49
|
} else {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "kmkf-work-order-service-component",
|
3
|
-
"version": "0.0.1-alpha.
|
3
|
+
"version": "0.0.1-alpha.7",
|
4
4
|
"scripts": {
|
5
5
|
"start": "dumi dev",
|
6
6
|
"docs:build": "dumi build",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"react-dom": "^17.0.2"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.
|
40
|
+
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.21-alpha.1",
|
41
41
|
"@reduxjs/toolkit": "^1.8.5",
|
42
42
|
"react-redux": "^7.2.8",
|
43
43
|
"store2": "^2.14.2",
|