kmkf-work-order-service-component 0.0.1-alpha.10 → 0.0.1-alpha.12

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.
@@ -720,23 +720,43 @@ export var orderBack = /*#__PURE__*/function () {
720
720
  return prv;
721
721
  }, {}); //有打款组件返填订单编号
722
722
 
723
+ console.log('formValue', formValue);
723
724
  ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).forEach(function (item) {
724
725
  if (item.workOrderComponentType === 'ENTERPRISE_PAYMENT') {
725
726
  detailsValue["".concat(item.uniqueKey, "_enterprisePaymentTid")] = detail['tradeId'];
726
- detailsValue["".concat(item.uniqueKey, "_enterprisePaymentBuyerOpenUid")] = formValue[item.uniqueKey]['buyerOpenUid'];
727
+ detailsValue["".concat(item.uniqueKey, "_enterprisePaymentBuyerOpenUid")] = formValue[item.uniqueKey]['enterprisePaymentBuyerOpenUid'];
727
728
  }
728
729
 
729
730
  if (item.workOrderComponentType === 'BUYER_NICK_INPUT') {
730
731
  detailsValue["".concat(item.uniqueKey, "_buyerOpenUid")] = formValue[item.uniqueKey]['buyerOpenUid'];
731
732
  }
733
+
734
+ var GOOD_LIST = ['ITEM_ENCODE', 'ITEM_ID', 'ITEM_SELECT', 'ITEM_SELECT_THIRD'];
735
+
736
+ if (GOOD_LIST.includes(item.workOrderComponentType)) {
737
+ var itemList = detail['itemList'] || []; // let newList = itemList.map((t: any) => {
738
+ // const { numIid, outerId, picUrl, platform, price, title } = t
739
+ // let value = {
740
+ // numIid,
741
+ // outerId,
742
+ // picUrl,
743
+ // platform: platform.toLowerCase(),
744
+ // price,
745
+ // title
746
+ // };
747
+ // return value
748
+ // })
749
+
750
+ detailsValue["".concat(item.uniqueKey, "_itemList")] = JSON.stringify(itemList);
751
+ }
732
752
  });
733
753
  newData = calcWorkOrderList([{
734
754
  jsonMap: detailsValue
735
- }], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init'); // console.log('detailsValue++', formValue, newData[0]);
736
-
755
+ }], templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'init');
756
+ console.log('detailsValue++', detailsValue, newData[0]);
737
757
  form.setFieldsValue(_objectSpread({}, newData[0]));
738
758
 
739
- case 20:
759
+ case 22:
740
760
  case "end":
741
761
  return _context.stop();
742
762
  }
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  .orderItemLeftName {
35
- width: 115px;
35
+ // width: 115px;
36
36
  line-height: 16px;
37
37
  }
38
38
  }
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import './index.less';
2
3
  interface WorkOrderProps {
3
4
  platform: string;
4
5
  shopId?: string;
@@ -27,8 +27,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
27
  /*
28
28
  * @Author: wangzhenggui jianjia.wzg@raycloud.com
29
29
  * @Date: 2022-09-16 11:19:43
30
- * @LastEditors: litian
31
- * @LastEditTime: 2022-09-28 16:36:33
30
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
31
+ * @LastEditTime: 2022-10-08 13:35:45
32
32
  * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
33
33
  * @Description:
34
34
  *
@@ -53,8 +53,9 @@ import { Provider } from 'react-redux';
53
53
  import { transferWorkOrder } from "./model/servers/api";
54
54
  import get from 'lodash/get';
55
55
  import refreshImg from "./common/imgs/refresh.png";
56
- import emptyImg from "./common/imgs/empty.png";
57
- import styles from "./index.module.less";
56
+ import emptyImg from "./common/imgs/empty.png"; // import styles from './index.module.less';
57
+
58
+ import "./index.less";
58
59
  import { jsx as _jsx } from "react/jsx-runtime";
59
60
  import { jsxs as _jsxs } from "react/jsx-runtime";
60
61
  var Option = Select.Option;
@@ -107,17 +108,17 @@ var WorkOrder = function WorkOrder(props) {
107
108
 
108
109
  return /*#__PURE__*/_jsxs(Wrapper, {
109
110
  children: [/*#__PURE__*/_jsx("header", {
110
- className: styles.order_header,
111
+ className: "order_header",
111
112
  children: /*#__PURE__*/_jsxs("div", {
112
- className: styles.order_header_tabs,
113
+ className: "order_header_tabs",
113
114
  children: [/*#__PURE__*/_jsx("div", {
114
- className: "".concat(styles.order_header_tabs_button, " ").concat(tabActive === 'custom' ? styles.active : ''),
115
+ className: "order_header_tabs_button ".concat(tabActive === 'custom' ? "active" : ''),
115
116
  onClick: function onClick() {
116
117
  return setTabActive('custom');
117
118
  },
118
119
  children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
119
120
  }), /*#__PURE__*/_jsx("div", {
120
- className: "".concat(styles.order_header_tabs_button, " ").concat(styles.border_left, " ").concat(tabActive === 'payment' ? styles.active : ''),
121
+ className: "order_header_tabs_button border_left ".concat(tabActive === 'payment' ? 'active' : ''),
121
122
  onClick: function onClick() {
122
123
  return setTabActive('payment');
123
124
  },
@@ -227,11 +228,6 @@ var OrderList = function OrderList(tabActive) {
227
228
 
228
229
 
229
230
  var openCustomForm = function openCustomForm(id) {
230
- if (!platformInfo.buyerId) {
231
- message.error('请选择用户');
232
- return;
233
- }
234
-
235
231
  openCustomizeWOrkOrderModal({
236
232
  templateId: id,
237
233
  shopId: platformInfo.shopId + '',
@@ -308,14 +304,14 @@ var OrderList = function OrderList(tabActive) {
308
304
  }();
309
305
 
310
306
  return /*#__PURE__*/_jsxs("div", {
311
- className: styles.custom_box,
307
+ className: "custom_box",
312
308
  style: {
313
309
  display: tabActive === 'custom' ? 'block' : 'none'
314
310
  },
315
311
  children: [/*#__PURE__*/_jsxs("div", {
316
- className: styles.custom_box_header,
312
+ className: "custom_box_header",
317
313
  children: [/*#__PURE__*/_jsx(Cascader, {
318
- className: styles.custom_box_header_cascader,
314
+ className: "custom_box_header_cascader",
319
315
  options: groupAllList,
320
316
  placeholder: "\u8BF7\u8F93\u5165\u6A21\u7248\u540D\u79F0",
321
317
  showSearch: true,
@@ -327,15 +323,15 @@ var OrderList = function OrderList(tabActive) {
327
323
  label: item.label,
328
324
  key: item.value + '',
329
325
  children: /*#__PURE__*/_jsx("div", {
330
- className: styles.custom_temp_box,
326
+ className: "custom_temp_box",
331
327
  children: /*#__PURE__*/_jsx("div", {
332
- className: styles.custom_temp_list,
328
+ className: "custom_temp_list",
333
329
  children: /*#__PURE__*/_jsx(Space, {
334
330
  size: [8, 8],
335
331
  wrap: true,
336
332
  children: item.children.map(function (t) {
337
333
  return /*#__PURE__*/_jsx("div", {
338
- className: styles.custom_temp_list_button,
334
+ className: "custom_temp_list_button",
339
335
  onClick: function onClick() {
340
336
  return openCustomForm(t.value);
341
337
  },
@@ -352,11 +348,11 @@ var OrderList = function OrderList(tabActive) {
352
348
  }
353
349
  })]
354
350
  }), /*#__PURE__*/_jsxs("div", {
355
- className: styles.custom_box_search,
351
+ className: "custom_box_search",
356
352
  children: [/*#__PURE__*/_jsxs("div", {
357
- className: styles.custom_box_search_box,
353
+ className: "custom_box_search_box",
358
354
  children: [/*#__PURE__*/_jsx(Select, {
359
- className: styles.custom_box_search_date,
355
+ className: "custom_box_search_date",
360
356
  value: customSearch.filterDay,
361
357
  onChange: function onChange(val) {
362
358
  return upDateState('filterDay', val);
@@ -368,7 +364,7 @@ var OrderList = function OrderList(tabActive) {
368
364
  }, item.name);
369
365
  })
370
366
  }), /*#__PURE__*/_jsx(Cascader, {
371
- className: styles.custom_box_search_cascader,
367
+ className: "custom_box_search_cascader",
372
368
  options: groupAllList,
373
369
  showSearch: true,
374
370
  onChange: function onChange(val) {
@@ -377,7 +373,7 @@ var OrderList = function OrderList(tabActive) {
377
373
  value: customSearch.tempSelect,
378
374
  allowClear: false
379
375
  }), /*#__PURE__*/_jsx(Checkbox, {
380
- className: styles.custom_box_search_buyer,
376
+ className: "custom_box_search_buyer",
381
377
  checked: customSearch.isBuyer,
382
378
  onChange: function onChange(e) {
383
379
  return upDateState('isBuyer', e.target.checked);
@@ -385,7 +381,7 @@ var OrderList = function OrderList(tabActive) {
385
381
  children: "\u5F53\u524D\u4E70\u5BB6"
386
382
  })]
387
383
  }), /*#__PURE__*/_jsx("div", {
388
- className: styles.custom_box_search_refresh,
384
+ className: "custom_box_search_refresh",
389
385
  onClick: onSearch,
390
386
  children: /*#__PURE__*/_jsx("img", {
391
387
  src: refreshImg,
@@ -393,7 +389,7 @@ var OrderList = function OrderList(tabActive) {
393
389
  })
394
390
  })]
395
391
  }), /*#__PURE__*/_jsx("main", {
396
- className: styles.custom_box_main,
392
+ className: "custom_box_main",
397
393
  children: orderList.length ? orderList.map(function (item) {
398
394
  return ListOrderItem({
399
395
  item: item,
@@ -403,7 +399,7 @@ var OrderList = function OrderList(tabActive) {
403
399
  onTransfer: onTransfer
404
400
  });
405
401
  }) : /*#__PURE__*/_jsx("div", {
406
- className: styles.custom_box_main_empty,
402
+ className: "custom_box_main_empty",
407
403
  children: /*#__PURE__*/_jsxs("div", {
408
404
  children: [/*#__PURE__*/_jsx("img", {
409
405
  src: emptyImg,
@@ -414,7 +410,7 @@ var OrderList = function OrderList(tabActive) {
414
410
  })
415
411
  })
416
412
  }), /*#__PURE__*/_jsx("div", {
417
- className: styles.custom_box_page,
413
+ className: "custom_box_page",
418
414
  children: /*#__PURE__*/_jsx(Pagination, {
419
415
  showSizeChanger: false,
420
416
  showQuickJumper: true,
@@ -534,17 +530,17 @@ var PayOrderList = function PayOrderList(tabActive) {
534
530
  };
535
531
 
536
532
  return /*#__PURE__*/_jsxs("div", {
537
- className: styles.custom_box,
533
+ className: "custom_box",
538
534
  style: {
539
535
  display: tabActive === 'payment' ? 'block' : 'none'
540
536
  },
541
537
  children: [/*#__PURE__*/_jsx("div", {
542
- className: styles.custom_box_header,
538
+ className: "custom_box_header",
543
539
  children: /*#__PURE__*/_jsx(Space, {
544
540
  size: [8, 8],
545
541
  wrap: true,
546
542
  children: /*#__PURE__*/_jsx("span", {
547
- className: styles.custom_temp_list_button,
543
+ className: "custom_temp_list_button",
548
544
  onClick: function onClick() {
549
545
  var _shopList$find;
550
546
 
@@ -561,11 +557,11 @@ var PayOrderList = function PayOrderList(tabActive) {
561
557
  })
562
558
  })
563
559
  }), /*#__PURE__*/_jsxs("div", {
564
- className: "".concat(styles.custom_box_search, " ").concat(styles.pay_search),
560
+ className: "custom_box_search pay_search",
565
561
  children: [/*#__PURE__*/_jsxs("div", {
566
- className: "".concat(styles.custom_box_search_box, " ").concat(styles.pay_search_box),
562
+ className: "custom_box_search_box pay_search_box",
567
563
  children: [/*#__PURE__*/_jsxs(Select, {
568
- className: styles.custom_box_search_date,
564
+ className: "custom_box_search_date",
569
565
  value: paySearch.timeType,
570
566
  onChange: function onChange(val) {
571
567
  return upDateState('timeType', val);
@@ -581,7 +577,7 @@ var PayOrderList = function PayOrderList(tabActive) {
581
577
  children: "\u6253\u6B3E\u65F6\u95F4"
582
578
  })]
583
579
  }), /*#__PURE__*/_jsx(Select, {
584
- className: styles.custom_box_search_cascader,
580
+ className: "custom_box_search_cascader",
585
581
  value: paySearch.workPayStatus,
586
582
  onChange: function onChange(val) {
587
583
  return upDateState('workPayStatus', val);
@@ -593,7 +589,7 @@ var PayOrderList = function PayOrderList(tabActive) {
593
589
  }, item.value);
594
590
  })
595
591
  }), /*#__PURE__*/_jsx(Checkbox, {
596
- className: styles.custom_box_search_buyer,
592
+ className: "custom_box_search_buyer",
597
593
  checked: paySearch.isBuyer,
598
594
  onChange: function onChange(e) {
599
595
  return upDateState('isBuyer', e.target.checked);
@@ -608,7 +604,7 @@ var PayOrderList = function PayOrderList(tabActive) {
608
604
  }
609
605
  })]
610
606
  }), /*#__PURE__*/_jsx("div", {
611
- className: styles.custom_box_search_refresh,
607
+ className: "custom_box_search_refresh",
612
608
  onClick: function onClick() {
613
609
  return onSearch();
614
610
  },
@@ -618,7 +614,7 @@ var PayOrderList = function PayOrderList(tabActive) {
618
614
  })
619
615
  })]
620
616
  }), /*#__PURE__*/_jsx("main", {
621
- className: styles.payment_box_main,
617
+ className: "payment_box_main",
622
618
  children: payOrderList.length ? payOrderList.map(function (item) {
623
619
  return PayListOrderItem({
624
620
  record: item,
@@ -633,7 +629,7 @@ var PayOrderList = function PayOrderList(tabActive) {
633
629
  onLog: handleOpenLog
634
630
  });
635
631
  }) : /*#__PURE__*/_jsx("div", {
636
- className: styles.custom_box_main_empty,
632
+ className: "custom_box_main_empty",
637
633
  children: /*#__PURE__*/_jsxs("div", {
638
634
  children: [/*#__PURE__*/_jsx("img", {
639
635
  src: emptyImg,
@@ -644,7 +640,7 @@ var PayOrderList = function PayOrderList(tabActive) {
644
640
  })
645
641
  })
646
642
  }), /*#__PURE__*/_jsx("div", {
647
- className: styles.custom_box_page,
643
+ className: "custom_box_page",
648
644
  children: /*#__PURE__*/_jsx(Pagination, {
649
645
  showQuickJumper: true,
650
646
  showSizeChanger: false,
@@ -58,6 +58,7 @@
58
58
  height: 70px;
59
59
  overflow: auto;
60
60
  background-color: #fff;
61
+ padding: 4px;
61
62
 
62
63
  &:hover {
63
64
  height: 200px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.0.1-alpha.10",
3
+ "version": "0.0.1-alpha.12",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",