kmkf-work-order-service-component 0.1.3 → 0.1.5

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.
@@ -21,12 +21,12 @@ 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: wangzhenggui jianjia.wzg@raycloud.com
24
- * @LastEditTime: 2022-10-21 14:39:21
24
+ * @LastEditTime: 2022-10-25 11:26:29
25
25
  */
26
26
  import React from 'react';
27
27
  import { factory } from "../Widget";
28
28
  import { calcWorkOrderList } from "../../common/utils/tools";
29
- import { Modal, Divider, Popconfirm } from 'antd';
29
+ import { Modal, Divider } from 'antd';
30
30
  import moment from 'moment';
31
31
  import { dealWorkOrder } from "../../model/servers/api";
32
32
  import { isEmpty } from 'lodash';
@@ -215,6 +215,24 @@ function ListOrderItem(props) {
215
215
  });
216
216
  }
217
217
  });
218
+ };
219
+
220
+ var deleteHandle = function deleteHandle(record) {
221
+ Modal.confirm({
222
+ title: '删除工单',
223
+ icon: null,
224
+ content: /*#__PURE__*/_jsxs("div", {
225
+ children: [/*#__PURE__*/_jsx("span", {
226
+ className: styles.red,
227
+ children: "\u5220\u9664\u540E\u7684\u5DE5\u5355\u65E0\u6CD5\u6062\u590D"
228
+ }), "\uFF0C \u786E\u8BA4\u8981\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F"]
229
+ }),
230
+ okText: '确认',
231
+ cancelText: '取消',
232
+ onOk: function onOk() {
233
+ return onDelete(record);
234
+ }
235
+ });
218
236
  }; //转交
219
237
 
220
238
 
@@ -252,17 +270,12 @@ function ListOrderItem(props) {
252
270
  return onEdit(item);
253
271
  },
254
272
  children: "\u4FEE\u6539"
255
- }), /*#__PURE__*/_jsx(Popconfirm, {
256
- title: "\u5220\u9664\u5DE5\u5355\u540E\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F",
257
- onConfirm: function onConfirm() {
258
- return onDelete(item);
273
+ }), /*#__PURE__*/_jsx("span", {
274
+ className: styles.orderItemOperate,
275
+ onClick: function onClick() {
276
+ return deleteHandle(item);
259
277
  },
260
- okText: "\u786E\u5B9A",
261
- cancelText: "\u53D6\u6D88",
262
- children: /*#__PURE__*/_jsx("span", {
263
- className: styles.orderItemOperate,
264
- children: "\u5220\u9664"
265
- })
278
+ children: "\u5220\u9664"
266
279
  }), /*#__PURE__*/_jsx("span", {
267
280
  className: styles.orderItemOperate,
268
281
  onClick: function onClick() {
@@ -1,7 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import './index.less';
3
+ export declare enum PlatForm {
4
+ TB = "tb",
5
+ FXG = "fxg",
6
+ KS = "ks",
7
+ PDD = "pdd",
8
+ XIAOZHI = "xiaozhi"
9
+ }
3
10
  interface WorkOrderProps {
4
- platform: string;
11
+ platform?: PlatForm;
5
12
  shopId?: string;
6
13
  buyerNick?: string;
7
14
  buyerId?: string;
@@ -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: wangzhenggui jianjia.wzg@raycloud.com
31
- * @LastEditTime: 2022-10-21 14:47:07
31
+ * @LastEditTime: 2022-10-25 14:00:49
32
32
  * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
33
33
  * @Description:
34
34
  *
@@ -59,6 +59,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
59
59
  import { jsxs as _jsxs } from "react/jsx-runtime";
60
60
  var Option = Select.Option;
61
61
  var RangePicker = DatePicker.RangePicker;
62
+ export var PlatForm;
63
+
64
+ (function (PlatForm) {
65
+ PlatForm["TB"] = "tb";
66
+ PlatForm["FXG"] = "fxg";
67
+ PlatForm["KS"] = "ks";
68
+ PlatForm["PDD"] = "pdd";
69
+ PlatForm["XIAOZHI"] = "xiaozhi";
70
+ })(PlatForm || (PlatForm = {}));
62
71
 
63
72
  var WorkOrder = function WorkOrder(props) {
64
73
  var platform = props.platform,
@@ -97,10 +106,7 @@ var WorkOrder = function WorkOrder(props) {
97
106
  }
98
107
  }, [buyerId]);
99
108
  useEffect(function () {
100
- if (shopId != platformInfo.shopId) {
101
- initHandle();
102
- } //存储平台信息
103
-
109
+ initHandle(); //存储平台信息
104
110
 
105
111
  dispatch({
106
112
  type: 'global/setState',
@@ -114,7 +120,7 @@ var WorkOrder = function WorkOrder(props) {
114
120
  }
115
121
  }
116
122
  });
117
- }, [platform, shopId, buyerNick, buyerId, orderNo]);
123
+ }, []);
118
124
 
119
125
  var initHandle = function initHandle() {
120
126
  dispatch(fetchQueryGroupCustomTemplate());
@@ -456,9 +462,9 @@ var OrderList = function OrderList(_ref) {
456
462
  alt: ""
457
463
  })
458
464
  })]
459
- }), /*#__PURE__*/_jsx("main", {
465
+ }), /*#__PURE__*/_jsxs("main", {
460
466
  className: "custom_box_main",
461
- children: orderList.length ? orderList.map(function (item) {
467
+ children: [orderList.length ? orderList.map(function (item) {
462
468
  return /*#__PURE__*/_jsx(ListOrderItem, {
463
469
  item: item,
464
470
  onEdit: onEdit,
@@ -477,20 +483,20 @@ var OrderList = function OrderList(_ref) {
477
483
  children: "\u6682\u65E0\u6570\u636E"
478
484
  })]
479
485
  })
480
- })
481
- }), total > 0 && /*#__PURE__*/_jsx("div", {
482
- className: "custom_box_page",
483
- children: /*#__PURE__*/_jsx(Pagination, {
484
- showSizeChanger: false,
485
- showQuickJumper: true,
486
- showTotal: function showTotal(total) {
487
- return "\u5171".concat(total, "\u6761");
488
- },
489
- current: customSearch.pageNo,
490
- pageSize: customSearch.pageSize,
491
- total: total,
492
- onChange: onChangePage
493
- })
486
+ }), total > 0 && /*#__PURE__*/_jsx("div", {
487
+ className: "custom_box_page",
488
+ children: /*#__PURE__*/_jsx(Pagination, {
489
+ showSizeChanger: false,
490
+ showQuickJumper: true,
491
+ showTotal: function showTotal(total) {
492
+ return "\u5171".concat(total, "\u6761");
493
+ },
494
+ current: customSearch.pageNo,
495
+ pageSize: customSearch.pageSize,
496
+ total: total,
497
+ onChange: onChangePage
498
+ })
499
+ })]
494
500
  }), /*#__PURE__*/_jsx(RecordLog, {
495
501
  ref: recordLogRef
496
502
  }), /*#__PURE__*/_jsx(TransferOrderModal, {
@@ -712,9 +718,9 @@ var PayOrderList = function PayOrderList(_ref5) {
712
718
  alt: ""
713
719
  })
714
720
  })]
715
- }), /*#__PURE__*/_jsx("div", {
721
+ }), /*#__PURE__*/_jsxs("div", {
716
722
  className: "payment_box_main",
717
- children: payOrderList.length ? payOrderList.map(function (item) {
723
+ children: [payOrderList.length ? payOrderList.map(function (item) {
718
724
  return /*#__PURE__*/_jsx(PayListOrderItem, {
719
725
  record: item,
720
726
  onRefresh: onSearch,
@@ -735,20 +741,20 @@ var PayOrderList = function PayOrderList(_ref5) {
735
741
  children: "\u6682\u65E0\u6570\u636E"
736
742
  })]
737
743
  })
738
- })
739
- }), /*#__PURE__*/_jsx("div", {
740
- className: "custom_box_page",
741
- children: /*#__PURE__*/_jsx(Pagination, {
742
- showQuickJumper: true,
743
- showSizeChanger: false,
744
- showTotal: function showTotal(total) {
745
- return "\u5171".concat(total, "\u6761");
746
- },
747
- current: paySearch.pageNo,
748
- pageSize: paySearch.pageSize,
749
- total: total,
750
- onChange: onChangePage
751
- })
744
+ }), /*#__PURE__*/_jsx("div", {
745
+ className: "custom_box_page",
746
+ children: /*#__PURE__*/_jsx(Pagination, {
747
+ showQuickJumper: true,
748
+ showSizeChanger: false,
749
+ showTotal: function showTotal(total) {
750
+ return "\u5171".concat(total, "\u6761");
751
+ },
752
+ current: paySearch.pageNo,
753
+ pageSize: paySearch.pageSize,
754
+ total: total,
755
+ onChange: onChangePage
756
+ })
757
+ })]
752
758
  }), /*#__PURE__*/_jsx(RecordModal, {
753
759
  ref: logRef
754
760
  }), /*#__PURE__*/_jsx(PayOrderModal, {
@@ -1,6 +1,3 @@
1
- .order_container {
2
- padding-bottom: 40px;
3
- }
4
1
  .order_header {
5
2
  padding: 16px 16px 0 16px;
6
3
 
@@ -62,6 +59,7 @@
62
59
  padding: 4px;
63
60
  overflow: auto;
64
61
  background-color: #fff;
62
+
65
63
  &:hover {
66
64
  height: 200px;
67
65
  box-shadow: 3px 3px 5px #eee;
@@ -140,7 +138,7 @@
140
138
  }
141
139
 
142
140
  .custom_box_main {
143
- height: calc(100% - 273px);
141
+ height: calc(100vh - 273px);
144
142
  overflow: auto;
145
143
  background-color: #fafafa;
146
144
  }
@@ -162,8 +160,6 @@
162
160
  }
163
161
 
164
162
  .custom_box_page {
165
- position: fixed;
166
- bottom: 0px;
167
163
  display: flex;
168
164
  justify-content: flex-end;
169
165
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",