kmkf-work-order-service-component 0.0.1-alpha.7 → 0.0.1-alpha.9

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.
@@ -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, enterprisePayment, newData;
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
- enterprisePayment = ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.children) || []).find(function (item) {
720
- return item.type === 'ENTERPRISE_PAYMENT';
721
- });
722
-
723
- if (enterprisePayment) {
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=========', formValue, newData[0]);
731
- form.setFieldsValue(_objectSpread(_objectSpread({}, newData[0]), formValue));
732
+ console.log('detailsValue++', formValue, newData[0]);
733
+ form.setFieldsValue(_objectSpread({}, newData[0]));
732
734
 
733
- case 22:
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: -5px 0 5px 0;
36
- padding-left: 23px;
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: 30%;
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 16:01:53
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: wangzhenggui jianjia.wzg@raycloud.com
26
- * @LastEditTime: 2022-09-16 13:37:53
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-27 16:17:25
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,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-27 09:54:27
31
+ * @LastEditTime: 2022-09-28 16:36:33
32
32
  * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
33
33
  * @Description:
34
34
  *
@@ -79,7 +79,7 @@ var WorkOrder = function WorkOrder(props) {
79
79
  setTabActive = _useState2[1];
80
80
 
81
81
  useEffect(function () {
82
- if (shopId !== platformInfo.shopId) {
82
+ if (shopId != platformInfo.shopId) {
83
83
  initHandle();
84
84
  } //存储平台信息
85
85
 
@@ -97,9 +97,6 @@ var WorkOrder = function WorkOrder(props) {
97
97
  }
98
98
  });
99
99
  }, [platform, shopId, buyerNick, buyerId, orderNo]);
100
- useEffect(function () {
101
- initHandle();
102
- }, []);
103
100
 
104
101
  var initHandle = function initHandle() {
105
102
  dispatch(fetchQueryGroupCustomTemplate());
@@ -152,6 +149,8 @@ var OrderList = function OrderList(tabActive) {
152
149
  var platformInfo = useAppSelector(function (state) {
153
150
  return state.global.platformInfo;
154
151
  });
152
+ var buyerNick = platformInfo.buyerNick,
153
+ buyerId = platformInfo.buyerId;
155
154
  var isFirst = useRef(false);
156
155
  var openCustomizeWOrkOrderModal = openCustomizeWOrkOrder({
157
156
  shopList: shopList,
@@ -190,7 +189,7 @@ var OrderList = function OrderList(tabActive) {
190
189
  if (customSearch.tempSelect.length > 1) {
191
190
  onSearch();
192
191
  }
193
- }, [customSearch]); //搜索
192
+ }, [customSearch, buyerNick, buyerId]); //搜索
194
193
 
195
194
  var onSearch = function onSearch() {
196
195
  dispatch(fetchQueryWorkOrder());
@@ -284,10 +283,15 @@ var OrderList = function OrderList(tabActive) {
284
283
  }]
285
284
  }];
286
285
  transferWorkOrder(params).then(function (res) {
287
- var _transferRef$current;
286
+ var success = res.success;
287
+
288
+ if (success) {
289
+ var _transferRef$current;
288
290
 
289
- transferRef === null || transferRef === void 0 ? void 0 : (_transferRef$current = transferRef.current) === null || _transferRef$current === void 0 ? void 0 : _transferRef$current.closeModal();
290
- onSearch();
291
+ transferRef === null || transferRef === void 0 ? void 0 : (_transferRef$current = transferRef.current) === null || _transferRef$current === void 0 ? void 0 : _transferRef$current.closeModal();
292
+ onSearch();
293
+ message.success('转交成功');
294
+ }
291
295
  });
292
296
 
293
297
  case 6:
@@ -321,7 +325,7 @@ var OrderList = function OrderList(tabActive) {
321
325
  items: groupAllList.map(function (item) {
322
326
  return {
323
327
  label: item.label,
324
- key: item.value,
328
+ key: item.value + '',
325
329
  children: /*#__PURE__*/_jsx("div", {
326
330
  className: styles.custom_temp_box,
327
331
  children: /*#__PURE__*/_jsx("div", {
@@ -336,13 +340,16 @@ var OrderList = function OrderList(tabActive) {
336
340
  return openCustomForm(t.value);
337
341
  },
338
342
  children: t.label
339
- }, t.value);
343
+ }, item.value + t.value + '');
340
344
  })
341
345
  })
342
346
  })
343
347
  }, item.value)
344
348
  };
345
- })
349
+ }),
350
+ getPopupContainer: function getPopupContainer(triggerNode) {
351
+ return triggerNode.parentNode;
352
+ }
346
353
  })]
347
354
  }), /*#__PURE__*/_jsxs("div", {
348
355
  className: styles.custom_box_search,
@@ -448,6 +455,8 @@ var PayOrderList = function PayOrderList(tabActive) {
448
455
  var shopList = useAppSelector(function (state) {
449
456
  return state.workOrder.userInfo.shopList;
450
457
  });
458
+ var buyerNick = platformInfo.buyerNick,
459
+ buyerId = platformInfo.buyerId;
451
460
  var logRef = useRef();
452
461
  var PAY_STATUS = [{
453
462
  value: '',
@@ -483,7 +492,7 @@ var PayOrderList = function PayOrderList(tabActive) {
483
492
  }];
484
493
  useEffect(function () {
485
494
  onSearch();
486
- }, [paySearch]);
495
+ }, [paySearch, buyerNick, buyerId]);
487
496
 
488
497
  var onSearch = function onSearch() {
489
498
  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.7",
3
+ "version": "0.0.1-alpha.9",
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.1",
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",