kmkf-work-order-service-component 0.0.1-alpha.7 → 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.js +13 -11
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.module.less +3 -3
- package/dist/esm/WorkOrder/components/ListOrderItem/index.js +5 -1
- package/dist/esm/WorkOrder/components/TransferOrderModal/index.js +3 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +3 -2
- package/dist/esm/WorkOrder/index.js +42 -32
- package/package.json +2 -2
@@ -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,21 +716,23 @@ 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
731
|
}], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
|
730
|
-
console.log('detailsValue
|
731
|
-
form.setFieldsValue(_objectSpread(
|
732
|
+
console.log('detailsValue++', formValue, newData[0]);
|
733
|
+
form.setFieldsValue(_objectSpread({}, newData[0]));
|
732
734
|
|
733
|
-
case
|
735
|
+
case 21:
|
734
736
|
case "end":
|
735
737
|
return _context.stop();
|
736
738
|
}
|
@@ -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,7 @@
|
|
73
73
|
|
74
74
|
:global(.ant-form-item-label) {
|
75
75
|
position: relative;
|
76
|
-
max-width:
|
76
|
+
max-width: 72px;
|
77
77
|
overflow: initial;
|
78
78
|
color: rgba(0, 0, 0, 0.55);
|
79
79
|
// font-weight: bold;
|
@@ -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-27
|
24
|
+
* @LastEditTime: 2022-09-27 18:57:14
|
25
25
|
*/
|
26
26
|
import React from 'react';
|
27
27
|
import { factory } from "../Widget";
|
@@ -264,6 +264,10 @@ function ListOrderItem(props) {
|
|
264
264
|
style: {
|
265
265
|
margin: '8px 0'
|
266
266
|
}
|
267
|
+
}), ItemView({
|
268
|
+
label: '店铺名称',
|
269
|
+
value: transData.shopName,
|
270
|
+
key: 'shopName'
|
267
271
|
}), componentDtoList.map(function (t) {
|
268
272
|
var instance = factory(t.workOrderComponentType, {
|
269
273
|
id: t.uniqueKey,
|
@@ -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,7 +31,7 @@ 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";
|
@@ -80,7 +80,8 @@ var BasicPicture = /*#__PURE__*/function (_BasicComponent) {
|
|
80
80
|
rules: [],
|
81
81
|
required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
|
82
82
|
component: /*#__PURE__*/_jsx(ApaasUploadAsync, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
83
|
-
uniqueKey: _this.id
|
83
|
+
uniqueKey: _this.id,
|
84
|
+
hostUrl: "https://kefu.kuaimai.com"
|
84
85
|
}))
|
85
86
|
}, value));
|
86
87
|
});
|
@@ -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());
|
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.21-alpha.
|
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",
|