kmkf-work-order-service-component 0.4.0-alpha.20 → 0.4.0-alpha.21

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.
@@ -45,7 +45,7 @@ function CustomizeWorkOrderCard(props) {
45
45
  var dispatch = useAppDispatch();
46
46
  var componentDtoList = useAppSelector(selectorAllTemplateList);
47
47
  var filterComponentDtoList = componentDtoList.filter(function (i) {
48
- return !['TEMPLATE_ID_INPUT', 'FLOW_STATUS_SELECT', 'HANDLER_INPUT', 'COMPLETED_USER_INPUT'].includes(i.workOrderComponentType);
48
+ return !['WORK_ORDER_ID_INPUT', 'TEMPLATE_ID_INPUT', 'FLOW_STATUS_SELECT', 'HANDLER_INPUT', 'COMPLETED_USER_INPUT'].includes(i.workOrderComponentType);
49
49
  });
50
50
 
51
51
  var _calcWorkOrderList = calcWorkOrderList([_objectSpread({}, item)], filterComponentDtoList),
@@ -188,7 +188,10 @@ function CustomizeWorkOrderCard(props) {
188
188
  value: item === null || item === void 0 ? void 0 : (_item$handlerList = item.handlerList) === null || _item$handlerList === void 0 ? void 0 : (_item$handlerList$map = _item$handlerList.map(function (i) {
189
189
  return i.account;
190
190
  })) === null || _item$handlerList$map === void 0 ? void 0 : _item$handlerList$map.join('、')
191
- }, "handleList"), /*#__PURE__*/_jsx(Divider, {
191
+ }, "handleList"), /*#__PURE__*/_jsx(ItemView, {
192
+ label: "\u5DE5\u5355\u7F16\u53F7",
193
+ value: transData.id
194
+ }, "id"), /*#__PURE__*/_jsx(Divider, {
192
195
  dashed: true,
193
196
  style: {
194
197
  margin: '8px 0'
@@ -2,6 +2,7 @@
2
2
  import './index.less';
3
3
  declare type OrderListProps = {
4
4
  tabActive: string;
5
+ shopId?: string | number;
5
6
  };
6
- declare const CustomizeWorkOrderList: ({ tabActive }: OrderListProps) => JSX.Element;
7
+ declare const CustomizeWorkOrderList: ({ tabActive, shopId }: OrderListProps) => JSX.Element;
7
8
  export default CustomizeWorkOrderList;
@@ -74,8 +74,12 @@ var URL_MAPPING = {
74
74
 
75
75
  var getTableData = function getTableData(_ref) {
76
76
  var checkedBuyerId = _ref.checkedBuyerId,
77
- buyerId = _ref.buyerId;
77
+ buyerId = _ref.buyerId,
78
+ shopList = _ref.shopList,
79
+ shopId = _ref.shopId;
78
80
  return function (_ref2, formData) {
81
+ var _shopList$find;
82
+
79
83
  var current = _ref2.current,
80
84
  pageSize = _ref2.pageSize;
81
85
  var time = formData.time,
@@ -85,8 +89,8 @@ var getTableData = function getTableData(_ref) {
85
89
  var params = _objectSpread({}, formData);
86
90
 
87
91
  if ((time === null || time === void 0 ? void 0 : time.length) > 1) {
88
- params.createdStartTime = moment(time[0]).format('YYYY-MM-DD');
89
- params.createdEndTime = moment(time[1]).format('YYYY-MM-DD');
92
+ params.createdStartTime = time[0] ? moment(time[0]).format('x') : undefined;
93
+ params.createdEndTime = time[1] ? moment(new Date(time[1]).getTime() + 24 * 60 * 60 * 1000 - 1000).format('x') : undefined;
90
94
  }
91
95
 
92
96
  if ((templateIdList === null || templateIdList === void 0 ? void 0 : templateIdList.length) > 0) {
@@ -99,6 +103,14 @@ var getTableData = function getTableData(_ref) {
99
103
 
100
104
  delete params.time; // time是moment类型的,监控上报的时侯,格式化报错了
101
105
 
106
+ var shopUniqueKey = (_shopList$find = shopList.find(function (item) {
107
+ return item.shopId === shopId;
108
+ })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.uniqueKey;
109
+
110
+ if (shopUniqueKey) {
111
+ params.shopUniqueKeyList = [shopUniqueKey];
112
+ }
113
+
102
114
  return queryAllWorkOrderList(URL_MAPPING[type], _objectSpread(_objectSpread({}, params), {}, {
103
115
  pageSize: pageSize,
104
116
  pageNo: current
@@ -115,7 +127,8 @@ var getTableData = function getTableData(_ref) {
115
127
 
116
128
 
117
129
  var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref3) {
118
- var tabActive = _ref3.tabActive;
130
+ var tabActive = _ref3.tabActive,
131
+ shopId = _ref3.shopId;
119
132
  var dispatch = useAppDispatch();
120
133
 
121
134
  var _useState = useState(true),
@@ -163,7 +176,9 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref3) {
163
176
 
164
177
  var callBackGetTableData = useCallback(getTableData({
165
178
  checkedBuyerId: currentBuyerChecked,
166
- buyerId: buyerId
179
+ buyerId: buyerId,
180
+ shopList: shopList,
181
+ shopId: shopId
167
182
  }), [currentBuyerChecked, buyerId]);
168
183
 
169
184
  var _useAntdTable = useAntdTable(callBackGetTableData, {
@@ -228,7 +243,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref3) {
228
243
  })
229
244
  })
230
245
  }), /*#__PURE__*/_jsx(Col, {
231
- span: 24,
246
+ span: 16,
232
247
  children: /*#__PURE__*/_jsx("div", {
233
248
  id: "templateCascader",
234
249
  className: "templateCascader",
@@ -246,7 +261,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref3) {
246
261
  })
247
262
  })
248
263
  }), /*#__PURE__*/_jsx(Col, {
249
- span: 12,
264
+ span: 8,
250
265
  children: /*#__PURE__*/_jsx(Form.Item, {
251
266
  name: "workOrderId",
252
267
  children: /*#__PURE__*/_jsx(Input, {
@@ -320,7 +335,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref3) {
320
335
  type: "primary",
321
336
  size: "small",
322
337
  onClick: handleClick,
323
- children: "\u65B0\u5EFA\u5DE5\u5355"
338
+ children: "+\u65B0\u5EFA\u5DE5\u5355"
324
339
  })]
325
340
  }), searchForm, /*#__PURE__*/_jsx("main", {
326
341
  className: "custom_box_main custom_box_main_".concat(platform),
@@ -1,5 +1,12 @@
1
1
  .custom_box {
2
2
  // height: calc(100% - 58px);
3
+ :global(.ant-row) {
4
+ margin: 0 !important;
5
+ }
6
+
7
+ :global(.ant-col) {
8
+ padding: 0 !important;
9
+ }
3
10
  .top-tip {
4
11
  display: flex;
5
12
  flex-direction: row;
@@ -149,6 +156,7 @@
149
156
  flex-direction: row;
150
157
  align-items: center;
151
158
  justify-content: space-between;
159
+ margin-bottom: 4px;
152
160
  }
153
161
  .action_collapse {
154
162
  padding-left: 8px;
@@ -4,8 +4,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
- import React, { useEffect } from 'react';
8
- import { Select, Pagination, DatePicker, Space, Checkbox, message } from 'antd';
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
+
15
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
16
+
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+
19
+ import React, { useEffect, useState } from 'react';
20
+ import { Select, Pagination, DatePicker, Checkbox, message, Input, Form, Row, Col, Button } from 'antd';
9
21
  import { useAppSelector, useAppDispatch } from "../../../model/hooks";
10
22
  import { fetchQueryPaymentWorkOrderList } from "../../../model/workOrder";
11
23
  import PaymentWorkOrderCard from "./components/PaymentWorkOrderCard";
@@ -15,7 +27,6 @@ import UnExamineModal from "./components/UnExamineModal";
15
27
  import DeletePaymentWorkOrderModal from "./components/DeletePaymentWorkOrderModal";
16
28
  import FlagPayModal from "./components/FlagPayModal";
17
29
  import PaymentFormModal from "./components/PaymentFormModal";
18
- import refreshImg from "../../../common/imgs/refresh.png";
19
30
  import emptyImg from "../../../common/imgs/empty.png";
20
31
  import { PAY_STATUS } from "../../../common/constant";
21
32
  import { setPaymentFormModalVisible, setCurrentPaymentRecord } from "../../../model/paymentWorkOrder";
@@ -28,8 +39,6 @@ var RangePicker = DatePicker.RangePicker;
28
39
 
29
40
  //打款工单列表
30
41
  var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
31
- var _paySearch$time;
32
-
33
42
  var tabActive = _ref.tabActive;
34
43
  var dispatch = useAppDispatch();
35
44
  var payOrderList = useAppSelector(function (state) {
@@ -52,9 +61,19 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
52
61
  var buyerNick = platformInfo.buyerNick,
53
62
  buyerId = platformInfo.buyerId,
54
63
  platform = platformInfo.platform;
64
+
65
+ var _useState = useState(true),
66
+ _useState2 = _slicedToArray(_useState, 2),
67
+ open = _useState2[0],
68
+ setOpen = _useState2[1];
69
+
70
+ var _Form$useForm = Form.useForm(),
71
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
72
+ form = _Form$useForm2[0];
73
+
55
74
  useEffect(function () {
56
75
  setTimeout(onSearch, 0); // TODO: 让请求在下一个任务中执行,前一个任务获取不到redux中的数据
57
- }, [paySearch, buyerNick, buyerId]);
76
+ }, [buyerNick, buyerId]);
58
77
 
59
78
  var onSearch = function onSearch() {
60
79
  dispatch(fetchQueryPaymentWorkOrderList());
@@ -101,55 +120,100 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
101
120
  });
102
121
  };
103
122
 
104
- return /*#__PURE__*/_jsxs("div", {
105
- className: "custom_box",
106
- style: {
107
- display: tabActive === 'payment' ? 'block' : 'none'
108
- },
109
- children: [/*#__PURE__*/_jsx("div", {
110
- className: "custom_box_header",
111
- children: /*#__PURE__*/_jsx(Space, {
112
- size: [8, 8],
113
- wrap: true,
114
- children: /*#__PURE__*/_jsx("span", {
115
- className: "custom_temp_list_button",
116
- onClick: handleAddPaymentWorkOrder,
117
- children: "\u6253\u6B3E\u5DE5\u5355"
118
- })
123
+ var resetHandle = function resetHandle() {
124
+ dispatch({
125
+ type: 'workOrder/setState',
126
+ payload: {
127
+ paySearch: {
128
+ pageNo: 1,
129
+ pageSize: 20,
130
+ time: [moment().subtract(31, 'day').startOf('day'), moment().endOf('day')],
131
+ workPayStatus: '',
132
+ tid: '',
133
+ paymentOrderKey: '',
134
+ isBuyer: false
135
+ }
136
+ }
137
+ });
138
+ form.setFieldsValue({
139
+ time: [moment().subtract(31, 'day').startOf('day'), moment().endOf('day')],
140
+ workPayStatus: '',
141
+ tid: '',
142
+ paymentOrderKey: ''
143
+ });
144
+ };
145
+
146
+ var onFieldsChange = function onFieldsChange(changedFields, allFields) {
147
+ var _changedFields$ = changedFields[0],
148
+ name = _changedFields$.name,
149
+ value = _changedFields$.value;
150
+ upDateState(name[0], value);
151
+ };
152
+
153
+ var searchForm = /*#__PURE__*/_jsxs("div", {
154
+ children: [/*#__PURE__*/_jsx(Form, {
155
+ form: form,
156
+ className: "customizeSearch ".concat(open ? 'open' : 'close'),
157
+ initialValues: paySearch,
158
+ onFieldsChange: onFieldsChange,
159
+ children: /*#__PURE__*/_jsxs(Row, {
160
+ gutter: 24,
161
+ children: [/*#__PURE__*/_jsx(Col, {
162
+ span: 24,
163
+ children: /*#__PURE__*/_jsx(Form.Item, {
164
+ name: "time",
165
+ label: "\u63D0\u4EA4\u65F6\u95F4",
166
+ children: /*#__PURE__*/_jsx(RangePicker, {
167
+ placeholder: ['开始提交时间', '结束提交时间']
168
+ })
169
+ })
170
+ }), /*#__PURE__*/_jsx(Col, {
171
+ span: 8,
172
+ children: /*#__PURE__*/_jsx(Form.Item, {
173
+ name: "workPayStatus",
174
+ children: /*#__PURE__*/_jsx(Select, {
175
+ children: PAY_STATUS.map(function (item) {
176
+ return /*#__PURE__*/_jsx(Select.Option, {
177
+ value: item.value,
178
+ children: item.label
179
+ }, item.value);
180
+ })
181
+ })
182
+ })
183
+ }), /*#__PURE__*/_jsx(Col, {
184
+ span: 8,
185
+ children: /*#__PURE__*/_jsx(Form.Item, {
186
+ name: "tid",
187
+ children: /*#__PURE__*/_jsx(Input, {
188
+ placeholder: "\u8BF7\u8F93\u5165\u8BA2\u5355\u7F16\u53F7"
189
+ })
190
+ })
191
+ }), /*#__PURE__*/_jsx(Col, {
192
+ span: 8,
193
+ children: /*#__PURE__*/_jsx(Form.Item, {
194
+ name: "paymentOrderKey",
195
+ children: /*#__PURE__*/_jsx(Input, {
196
+ placeholder: "\u8BF7\u8F93\u5165\u5DE5\u5355\u7F16\u53F7"
197
+ })
198
+ })
199
+ })]
119
200
  })
120
201
  }), /*#__PURE__*/_jsxs("div", {
121
- className: "custom_box_search pay_search",
122
- children: [/*#__PURE__*/_jsxs("div", {
123
- className: "custom_box_search_box pay_search_box",
124
- children: [/*#__PURE__*/_jsxs(Select, {
125
- className: "custom_box_search_date",
126
- value: paySearch.timeType,
127
- onChange: function onChange(val) {
128
- return upDateState('timeType', val);
129
- },
130
- children: [/*#__PURE__*/_jsx(Select.Option, {
131
- value: "submitTime",
132
- children: "\u63D0\u4EA4\u65F6\u95F4"
133
- }), /*#__PURE__*/_jsx(Select.Option, {
134
- value: "auditTime",
135
- children: "\u5BA1\u6838\u65F6\u95F4"
136
- }), /*#__PURE__*/_jsx(Select.Option, {
137
- value: "playWithTime",
138
- children: "\u6253\u6B3E\u65F6\u95F4"
139
- })]
140
- }), /*#__PURE__*/_jsx(Select, {
141
- className: "custom_box_search_cascader",
142
- value: paySearch.workPayStatus,
143
- onChange: function onChange(val) {
144
- return upDateState('workPayStatus', val);
202
+ className: "bottom-actions",
203
+ children: [/*#__PURE__*/_jsxs("span", {
204
+ children: [/*#__PURE__*/_jsx(Button, {
205
+ type: "primary",
206
+ onClick: onSearch,
207
+ children: "\u67E5\u8BE2"
208
+ }), /*#__PURE__*/_jsx(Button, {
209
+ onClick: resetHandle,
210
+ style: {
211
+ marginLeft: 16
145
212
  },
146
- children: PAY_STATUS.map(function (item) {
147
- return /*#__PURE__*/_jsx(Select.Option, {
148
- value: item.value,
149
- children: item.label
150
- }, item.value);
151
- })
152
- }), /*#__PURE__*/_jsx(Checkbox, {
213
+ children: "\u91CD\u7F6E"
214
+ })]
215
+ }), /*#__PURE__*/_jsxs("span", {
216
+ children: [/*#__PURE__*/_jsx(Checkbox, {
153
217
  className: "custom_box_search_buyer",
154
218
  checked: paySearch.isBuyer,
155
219
  onChange: function onChange(e) {
@@ -160,29 +224,38 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
160
224
  upDateState('isBuyer', e.target.checked);
161
225
  },
162
226
  children: "\u5F53\u524D\u4E70\u5BB6"
163
- }), /*#__PURE__*/_jsx(RangePicker, {
164
- allowClear: false,
165
- value: (_paySearch$time = paySearch.time) === null || _paySearch$time === void 0 ? void 0 : _paySearch$time.map(function (item) {
166
- return moment(item);
167
- }),
168
- showTime: true,
169
- onChange: function onChange(dates) {
170
- return upDateState('time', dates.map(function (item) {
171
- return item.format('YYYY-MM-DD HH:mm:ss');
172
- }));
173
- }
227
+ }), /*#__PURE__*/_jsx("span", {
228
+ className: "action_collapse",
229
+ onClick: function onClick() {
230
+ return setOpen(function (v) {
231
+ return !v;
232
+ });
233
+ },
234
+ children: open ? '收起' : '展开'
174
235
  })]
175
- }), /*#__PURE__*/_jsx("div", {
176
- className: "custom_box_search_refresh",
177
- onClick: function onClick() {
178
- return onSearch();
236
+ })]
237
+ })]
238
+ });
239
+
240
+ return /*#__PURE__*/_jsxs("div", {
241
+ className: "custom_box",
242
+ style: {
243
+ display: tabActive === 'payment' ? 'block' : 'none'
244
+ },
245
+ children: [/*#__PURE__*/_jsxs("div", {
246
+ className: "bottom-actions",
247
+ children: [/*#__PURE__*/_jsx("div", {
248
+ children: "\u9ED8\u8BA4\u6700\u8FD130\u5929\u7684\u5168\u90E8\u5DE5\u5355"
249
+ }), /*#__PURE__*/_jsx(Button, {
250
+ type: "primary",
251
+ size: "small",
252
+ style: {
253
+ float: 'right'
179
254
  },
180
- children: /*#__PURE__*/_jsx("img", {
181
- src: refreshImg,
182
- alt: ""
183
- })
255
+ onClick: handleAddPaymentWorkOrder,
256
+ children: "+\u65B0\u5EFA\u5DE5\u5355"
184
257
  })]
185
- }), /*#__PURE__*/_jsx("div", {
258
+ }), searchForm, /*#__PURE__*/_jsx("div", {
186
259
  className: "payment_box_main payment_box_main_".concat(platform),
187
260
  children: payOrderList.length ? payOrderList.map(function (item) {
188
261
  return /*#__PURE__*/_jsx(PaymentWorkOrderCard, {
@@ -1,6 +1,4 @@
1
1
  .custom_box {
2
- // height: calc(100% - 58px);
3
-
4
2
  .custom_box_header {
5
3
  padding: 0 16px 16px 16px;
6
4
  border-bottom: 1px solid #f2f2f2;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import 'moment/locale/zh-cn';
2
3
  import { PlatForm } from './types';
3
4
  import './index.less';
4
5
  interface WorkOrderProps {
@@ -27,7 +27,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
27
  * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
28
28
  */
29
29
  import React, { useState, useEffect, useLayoutEffect, useMemo } from 'react';
30
- import { Spin } from 'antd';
30
+ import { Spin, ConfigProvider } from 'antd';
31
31
  import { Provider } from 'react-redux';
32
32
  import { useAppSelector, useAppDispatch } from "../model/hooks";
33
33
  import { fetchQueryGroupCustomTemplate, fetchQueryCurrentCompanyUser } from "../model/workOrder";
@@ -38,6 +38,8 @@ import store from "../model/store";
38
38
  import OrderList from "./components/CustomizeWorkOrderList";
39
39
  import Reminder from "./components/Reminder";
40
40
  import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
41
+ import zhCN from 'antd/es/locale/zh_CN';
42
+ import 'moment/locale/zh-cn';
41
43
  import { PlatForm } from "./types";
42
44
  import "./index.less";
43
45
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -61,7 +63,7 @@ var WorkOrder = function WorkOrder(props) {
61
63
  return state.workOrder.userInfo.shopList;
62
64
  });
63
65
 
64
- var _useState = useState('custom'),
66
+ var _useState = useState('payment'),
65
67
  _useState2 = _slicedToArray(_useState, 2),
66
68
  tabActive = _useState2[0],
67
69
  setTabActive = _useState2[1];
@@ -146,21 +148,22 @@ var WorkOrder = function WorkOrder(props) {
146
148
  children: /*#__PURE__*/_jsxs("div", {
147
149
  className: "order_header_tabs",
148
150
  children: [/*#__PURE__*/_jsx("div", {
149
- className: "order_header_tabs_button ".concat(tabActive === 'custom' ? 'active' : ''),
150
- onClick: function onClick() {
151
- return setTabActive('custom');
152
- },
153
- children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
154
- }), /*#__PURE__*/_jsx("div", {
155
151
  className: "order_header_tabs_button border_left ".concat(tabActive === 'payment' ? 'active' : ''),
156
152
  onClick: function onClick() {
157
153
  return setTabActive('payment');
158
154
  },
159
155
  children: "\u6253\u6B3E\u5DE5\u5355"
156
+ }), /*#__PURE__*/_jsx("div", {
157
+ className: "order_header_tabs_button ".concat(tabActive === 'custom' ? 'active' : ''),
158
+ onClick: function onClick() {
159
+ return setTabActive('custom');
160
+ },
161
+ children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
160
162
  })]
161
163
  })
162
164
  }), /*#__PURE__*/_jsx(OrderList, {
163
- tabActive: tabActive
165
+ tabActive: tabActive,
166
+ shopId: shopId
164
167
  }), /*#__PURE__*/_jsx(PaymentWorkOrderList, {
165
168
  tabActive: tabActive
166
169
  })]
@@ -174,7 +177,10 @@ var WorkOrder = function WorkOrder(props) {
174
177
  var ProviderWrap = function ProviderWrap(props) {
175
178
  return /*#__PURE__*/_jsx(Provider, {
176
179
  store: store,
177
- children: /*#__PURE__*/_jsx(WorkOrder, _objectSpread({}, props))
180
+ children: /*#__PURE__*/_jsx(ConfigProvider, {
181
+ locale: zhCN,
182
+ children: /*#__PURE__*/_jsx(WorkOrder, _objectSpread({}, props))
183
+ })
178
184
  });
179
185
  };
180
186
 
@@ -1,6 +1,7 @@
1
+ .order_container {
2
+ padding: 0 8px;
3
+ }
1
4
  .order_header {
2
- padding: 0 16px;
3
-
4
5
  .order_header_tabs {
5
6
  display: flex;
6
7
  align-items: center;
@@ -25,7 +26,8 @@
25
26
  }
26
27
 
27
28
  &.active {
28
- color: #1966ff;
29
+ color: #fff;
30
+ background-color: #1966ff;
29
31
  }
30
32
  }
31
33
  }
@@ -28,6 +28,7 @@ export declare const submitDataTransOldFormat: (nowData: {
28
28
  workOrderUpdateKeyVos: {
29
29
  type: string;
30
30
  isFlag: any;
31
+ tid: string;
31
32
  };
32
33
  buyerOpenUid: any;
33
34
  }) => any;
@@ -51,8 +51,7 @@ export var isNull = function isNull(value) {
51
51
  return isEmpty(value);
52
52
  };
53
53
  var workTypeKeys = {
54
- TRADE_ID_INPUT: 'tradeId',
55
- //订单号
54
+ // TRADE_ID_INPUT: 'tradeId', //订单号
56
55
  // BUYER_NICK_INPUT: 'buyerNick', //买家旺旺
57
56
  SHOP_NAME_INPUT: 'shopName',
58
57
  //店铺名称
@@ -159,6 +158,16 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
159
158
  content: get(nowData, "".concat(item.uniqueKey), ''),
160
159
  name: item.name
161
160
  });
161
+ } else if (item.workOrderComponentType === 'TRADE_ID_INPUT') {
162
+ contentVoList.push({
163
+ uniqueKey: "".concat(item.uniqueKey, "_tradeId"),
164
+ content: get(nowData, "".concat(item.uniqueKey), ''),
165
+ name: item.name
166
+ });
167
+
168
+ if (updateFlag) {
169
+ params.workOrderUpdateKeyVos.tid = get(nowData, "".concat(item.uniqueKey), '');
170
+ }
162
171
  } else if (item.workOrderComponentType === 'RATE') {
163
172
  contentVoList.push({
164
173
  uniqueKey: "".concat(item.uniqueKey, "_rate"),
@@ -6,18 +6,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
 
9
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
-
11
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
-
13
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
-
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
-
17
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
-
19
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
-
21
9
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
22
10
 
23
11
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -66,9 +54,10 @@ var initialState = {
66
54
  //打款工单搜索条件
67
55
  pageNo: 1,
68
56
  pageSize: 20,
69
- time: [moment().subtract(31, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'), moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')],
57
+ time: [moment().subtract(30, 'day').startOf('day'), moment().endOf('day')],
70
58
  workPayStatus: '',
71
- timeType: 'submitTime',
59
+ tid: '',
60
+ paymentOrderKey: '',
72
61
  isBuyer: false
73
62
  },
74
63
  templateDetails: {} //打开的模版
@@ -173,30 +162,26 @@ export var fetchQueryWorkOrder = createAsyncThunk('workOrder/queryWorkOrder', /*
173
162
 
174
163
  export var fetchQueryPaymentWorkOrderList = createAsyncThunk('workOrder/queryPaymentWorkOrderList', /*#__PURE__*/function () {
175
164
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_, action) {
176
- var _action$getState2, paySearch, global, timeType, _paySearch$time, start, end, workPayStatus, pageNo, pageSize, isBuyer, params, _yield$queryPaymentWo, data;
165
+ var _action$getState2, paySearch, global, _paySearch$tid, tid, _paySearch$paymentOrd, paymentOrderKey, time, workPayStatus, pageNo, pageSize, isBuyer, params, _yield$queryPaymentWo, data;
177
166
 
178
167
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
179
168
  while (1) {
180
169
  switch (_context4.prev = _context4.next) {
181
170
  case 0:
182
171
  _action$getState2 = action.getState(), paySearch = _action$getState2.workOrder.paySearch, global = _action$getState2.global;
183
- timeType = paySearch.timeType, _paySearch$time = _slicedToArray(paySearch.time, 2), start = _paySearch$time[0], end = _paySearch$time[1], workPayStatus = paySearch.workPayStatus, pageNo = paySearch.pageNo, pageSize = paySearch.pageSize, isBuyer = paySearch.isBuyer;
172
+ _paySearch$tid = paySearch.tid, tid = _paySearch$tid === void 0 ? undefined : _paySearch$tid, _paySearch$paymentOrd = paySearch.paymentOrderKey, paymentOrderKey = _paySearch$paymentOrd === void 0 ? undefined : _paySearch$paymentOrd, time = paySearch.time, workPayStatus = paySearch.workPayStatus, pageNo = paySearch.pageNo, pageSize = paySearch.pageSize, isBuyer = paySearch.isBuyer;
184
173
  params = {
185
174
  workPayStatus: workPayStatus,
186
175
  pageNo: pageNo,
187
176
  pageSize: pageSize,
188
177
  shopId: global.platformInfo.shopId
189
178
  };
179
+ tid && (params.tid = tid);
180
+ paymentOrderKey && (params.paymentOrderKey = paymentOrderKey);
190
181
 
191
- if (timeType === 'submitTime') {
192
- params.operateStartTime = start;
193
- params.operateEndTime = end;
194
- } else if (timeType === 'auditTime') {
195
- params.auditorStartTime = start;
196
- params.auditorEndTime = end;
197
- } else {
198
- params.workPayStartTime = start;
199
- params.workPayEndTime = end;
182
+ if (time.length) {
183
+ params.operateStartTime = moment(time[0]).format('YYYY-MM-DD HH:mm:ss');
184
+ params.operateEndTime = moment(new Date(time[1]).getTime() + 24 * 60 * 60 * 1000 - 1000).format('YYYY-MM-DD HH:mm:ss');
200
185
  }
201
186
 
202
187
  if (isBuyer) {
@@ -204,15 +189,15 @@ export var fetchQueryPaymentWorkOrderList = createAsyncThunk('workOrder/queryPay
204
189
  params.buyerOpenUid = global.platformInfo.buyerId;
205
190
  }
206
191
 
207
- _context4.next = 7;
192
+ _context4.next = 9;
208
193
  return queryPaymentWorkOrderList(params);
209
194
 
210
- case 7:
195
+ case 9:
211
196
  _yield$queryPaymentWo = _context4.sent;
212
197
  data = _yield$queryPaymentWo.data;
213
198
  return _context4.abrupt("return", data);
214
199
 
215
- case 10:
200
+ case 12:
216
201
  case "end":
217
202
  return _context4.stop();
218
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.4.0-alpha.20",
3
+ "version": "0.4.0-alpha.21",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",