kmkf-work-order-service-component 0.0.1-alpha.6 → 0.0.1-alpha.8
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 +20 -11
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +4 -2
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.module.less +9 -8
- package/dist/esm/WorkOrder/components/ListOrderItem/index.js +15 -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/TransferOrderModal/index.js +3 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +11 -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 +42 -32
- package/dist/esm/WorkOrder/model/servers/request.js +2 -19
- 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;
|
@@ -622,7 +622,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
622
622
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
623
623
|
var _shopList$find;
|
624
624
|
|
625
|
-
var order_no, form, shopId, shopList, templateDetail, shopSourceStr, _yield$orderDetail, data, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, productId, productCode, transField, finalResponse, formValue, detail, componentsParams, detailsValue,
|
625
|
+
var order_no, form, shopId, shopList, templateDetail, shopSourceStr, _yield$orderDetail, data, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, productId, productCode, transField, finalResponse, formValue, detail, componentsParams, detailsValue, newData;
|
626
626
|
|
627
627
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
628
628
|
while (1) {
|
@@ -716,19 +716,21 @@ export var orderBack = /*#__PURE__*/function () {
|
|
716
716
|
return prv;
|
717
717
|
}, {}); //有打款组件返填订单编号
|
718
718
|
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
detailsValue["".concat(enterprisePayment.uniqueKey, "_enterprisePaymentTid")] = detail['tradeId'];
|
725
|
-
}
|
719
|
+
((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).forEach(function (item) {
|
720
|
+
if (item.workOrderComponentType === 'ENTERPRISE_PAYMENT') {
|
721
|
+
detailsValue["".concat(item.uniqueKey, "_enterprisePaymentTid")] = detail['tradeId'];
|
722
|
+
detailsValue["".concat(item.uniqueKey, "_enterprisePaymentBuyerOpenUid")] = formValue[item.uniqueKey]['buyerOpenUid'];
|
723
|
+
}
|
726
724
|
|
725
|
+
if (item.workOrderComponentType === 'BUYER_NICK_INPUT') {
|
726
|
+
detailsValue["".concat(item.uniqueKey, "_buyerOpenUid")] = formValue[item.uniqueKey]['buyerOpenUid'];
|
727
|
+
}
|
728
|
+
});
|
727
729
|
newData = calcWorkOrderList([{
|
728
730
|
jsonMap: detailsValue
|
729
|
-
}], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
|
730
|
-
|
731
|
-
form.setFieldsValue(_objectSpread(
|
731
|
+
}], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
|
732
|
+
console.log('detailsValue++', formValue, newData[0]);
|
733
|
+
form.setFieldsValue(_objectSpread({}, newData[0]));
|
732
734
|
|
733
735
|
case 21:
|
734
736
|
case "end":
|
@@ -822,4 +824,11 @@ var getComponentsValue = function getComponentsValue() {
|
|
822
824
|
|
823
825
|
return prv;
|
824
826
|
}, {});
|
827
|
+
}; //图片压缩
|
828
|
+
|
829
|
+
|
830
|
+
export var imgResize = function imgResize(url) {
|
831
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
832
|
+
var h = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
|
833
|
+
return "".concat(url, "?x-oss-process=image/resize,h_").concat(h, ",w_").concat(w);
|
825
834
|
};
|
@@ -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,
|
@@ -32,8 +32,8 @@
|
|
32
32
|
|
33
33
|
.customizeFormModalClassName {
|
34
34
|
:global(.goods-uploaded-state) {
|
35
|
-
margin:
|
36
|
-
padding-left:
|
35
|
+
margin: 6px 0 5px 0;
|
36
|
+
padding-left: 7px;
|
37
37
|
font-size: 12px;
|
38
38
|
}
|
39
39
|
|
@@ -73,7 +73,8 @@
|
|
73
73
|
|
74
74
|
:global(.ant-form-item-label) {
|
75
75
|
position: relative;
|
76
|
-
max-width:
|
76
|
+
max-width: 72px;
|
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 18:57:14
|
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", {
|
@@ -261,6 +264,10 @@ function ListOrderItem(props) {
|
|
261
264
|
style: {
|
262
265
|
margin: '8px 0'
|
263
266
|
}
|
267
|
+
}), ItemView({
|
268
|
+
label: '店铺名称',
|
269
|
+
value: transData.shopName,
|
270
|
+
key: 'shopName'
|
264
271
|
}), componentDtoList.map(function (t) {
|
265
272
|
var instance = factory(t.workOrderComponentType, {
|
266
273
|
id: t.uniqueKey,
|
@@ -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)'
|
@@ -22,8 +22,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
* @Description:
|
23
23
|
* @Author: litian
|
24
24
|
* @Date: 2022-09-15 10:51:44
|
25
|
-
* @LastEditors:
|
26
|
-
* @LastEditTime: 2022-09-
|
25
|
+
* @LastEditors: litian
|
26
|
+
* @LastEditTime: 2022-09-28 13:55:39
|
27
27
|
*/
|
28
28
|
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
29
29
|
import { Modal, Form, Select } from 'antd';
|
@@ -117,6 +117,7 @@ var TransCustomerModal = function TransCustomerModal(props, ref) {
|
|
117
117
|
title: "\u8F6C\u4EA4\u5BA2\u670D",
|
118
118
|
centered: true,
|
119
119
|
visible: visible,
|
120
|
+
width: 400,
|
120
121
|
onCancel: closeModal,
|
121
122
|
onOk: handleTransCustomer,
|
122
123
|
children: /*#__PURE__*/_jsx(Form.Item, {
|
@@ -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-28 14:37:28
|
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,10 @@ 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
|
+
hostUrl: "https://kefu.kuaimai.com"
|
85
|
+
}))
|
79
86
|
}, value));
|
80
87
|
});
|
81
88
|
|
@@ -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,13 +28,13 @@ 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-28 15:07:36
|
32
32
|
* @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
|
33
33
|
* @Description:
|
34
34
|
*
|
35
35
|
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
36
36
|
*/
|
37
|
-
import React, { useState, useEffect, useRef } from 'react';
|
37
|
+
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
38
38
|
import Wrapper from "./components/Wrapper";
|
39
39
|
import { Tabs, Select, Pagination, Cascader, DatePicker, Space, Checkbox, message } from 'antd';
|
40
40
|
import { useAppSelector, useAppDispatch } from "./model/hooks";
|
@@ -78,32 +78,35 @@ var WorkOrder = function WorkOrder(props) {
|
|
78
78
|
tabActive = _useState2[0],
|
79
79
|
setTabActive = _useState2[1];
|
80
80
|
|
81
|
+
var propsValue = useCallback(function () {
|
82
|
+
return {
|
83
|
+
platform: platform,
|
84
|
+
shopId: shopId,
|
85
|
+
buyerNick: buyerNick,
|
86
|
+
buyerId: buyerId,
|
87
|
+
orderNo: orderNo
|
88
|
+
};
|
89
|
+
}, [platform, shopId, buyerNick, buyerId, orderNo]);
|
81
90
|
useEffect(function () {
|
82
|
-
|
83
|
-
|
84
|
-
} //存储平台信息
|
85
|
-
|
91
|
+
// console.log('shopid---====', shopId, platformInfo.shopId);
|
92
|
+
console.log('propsValue', propsValue()); //存储平台信息
|
86
93
|
|
87
94
|
dispatch({
|
88
95
|
type: 'global/setState',
|
89
96
|
payload: {
|
90
|
-
platformInfo: {
|
91
|
-
platform: platform,
|
92
|
-
shopId: shopId,
|
93
|
-
buyerNick: buyerNick,
|
94
|
-
buyerId: buyerId,
|
95
|
-
orderNo: orderNo
|
96
|
-
}
|
97
|
+
platformInfo: _objectSpread({}, propsValue())
|
97
98
|
}
|
98
99
|
});
|
99
|
-
}, [platform, shopId, buyerNick, buyerId, orderNo]);
|
100
|
-
useEffect(function () {
|
101
100
|
initHandle();
|
102
|
-
}, []);
|
101
|
+
}, [propsValue]); // useEffect(() => {
|
102
|
+
// initHandle();
|
103
|
+
// }, []);
|
103
104
|
|
104
105
|
var initHandle = function initHandle() {
|
105
106
|
dispatch(fetchQueryGroupCustomTemplate());
|
106
107
|
dispatch(fetchQueryCurrentCompanyUser());
|
108
|
+
dispatch(fetchQueryPaymentWorkOrderList());
|
109
|
+
dispatch(fetchQueryWorkOrder());
|
107
110
|
express.initData();
|
108
111
|
formatAddrData.initData();
|
109
112
|
};
|
@@ -185,12 +188,12 @@ var OrderList = function OrderList(tabActive) {
|
|
185
188
|
}, {
|
186
189
|
name: '近30天',
|
187
190
|
value: 29
|
188
|
-
}];
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
191
|
+
}]; // useEffect(() => {
|
192
|
+
// if (customSearch.tempSelect.length > 1) {
|
193
|
+
// onSearch();
|
194
|
+
// }
|
195
|
+
// }, [customSearch]);
|
196
|
+
//搜索
|
194
197
|
|
195
198
|
var onSearch = function onSearch() {
|
196
199
|
dispatch(fetchQueryWorkOrder());
|
@@ -284,10 +287,15 @@ var OrderList = function OrderList(tabActive) {
|
|
284
287
|
}]
|
285
288
|
}];
|
286
289
|
transferWorkOrder(params).then(function (res) {
|
287
|
-
var
|
290
|
+
var success = res.success;
|
291
|
+
|
292
|
+
if (success) {
|
293
|
+
var _transferRef$current;
|
288
294
|
|
289
|
-
|
290
|
-
|
295
|
+
transferRef === null || transferRef === void 0 ? void 0 : (_transferRef$current = transferRef.current) === null || _transferRef$current === void 0 ? void 0 : _transferRef$current.closeModal();
|
296
|
+
onSearch();
|
297
|
+
message.success('转交成功');
|
298
|
+
}
|
291
299
|
});
|
292
300
|
|
293
301
|
case 6:
|
@@ -321,7 +329,7 @@ var OrderList = function OrderList(tabActive) {
|
|
321
329
|
items: groupAllList.map(function (item) {
|
322
330
|
return {
|
323
331
|
label: item.label,
|
324
|
-
key: item.value,
|
332
|
+
key: item.value + '',
|
325
333
|
children: /*#__PURE__*/_jsx("div", {
|
326
334
|
className: styles.custom_temp_box,
|
327
335
|
children: /*#__PURE__*/_jsx("div", {
|
@@ -336,13 +344,16 @@ var OrderList = function OrderList(tabActive) {
|
|
336
344
|
return openCustomForm(t.value);
|
337
345
|
},
|
338
346
|
children: t.label
|
339
|
-
}, t.value);
|
347
|
+
}, item.value + t.value + '');
|
340
348
|
})
|
341
349
|
})
|
342
350
|
})
|
343
351
|
}, item.value)
|
344
352
|
};
|
345
|
-
})
|
353
|
+
}),
|
354
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
355
|
+
return triggerNode.parentNode;
|
356
|
+
}
|
346
357
|
})]
|
347
358
|
}), /*#__PURE__*/_jsxs("div", {
|
348
359
|
className: styles.custom_box_search,
|
@@ -480,10 +491,9 @@ var PayOrderList = function PayOrderList(tabActive) {
|
|
480
491
|
value: 'ALI_PAY_CLOSE',
|
481
492
|
label: '打款关闭',
|
482
493
|
color: 'rgba(156,156,156)'
|
483
|
-
}];
|
484
|
-
|
485
|
-
|
486
|
-
}, [paySearch]);
|
494
|
+
}]; // useEffect(() => {
|
495
|
+
// onSearch();
|
496
|
+
// }, [paySearch]);
|
487
497
|
|
488
498
|
var onSearch = function onSearch() {
|
489
499
|
dispatch(fetchQueryPaymentWorkOrderList());
|
@@ -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
|
|
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.8",
|
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.2",
|
41
41
|
"@reduxjs/toolkit": "^1.8.5",
|
42
42
|
"react-redux": "^7.2.8",
|
43
43
|
"store2": "^2.14.2",
|