@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.46 → 2.2.31-beta.47
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/FlowTemplateDetailV2/components/AutoTaskDetail/index.d.ts +3 -1
- package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +16 -8
- package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +2 -1
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +2 -1
- package/dist/esm/LBOrderDetail/detail/OrderInfo.d.ts +17 -0
- package/dist/esm/LBOrderDetail/detail/OrderInfo.js +529 -0
- package/dist/esm/LBOrderDetail/detail/ServiceProgress.d.ts +11 -0
- package/dist/esm/LBOrderDetail/detail/ServiceProgress.js +437 -0
- package/dist/esm/LBOrderDetail/detail/index.d.ts +12 -0
- package/dist/esm/LBOrderDetail/detail/index.js +45 -0
- package/dist/esm/LBOrderDetail/detail/index.module.less +63 -0
- package/dist/esm/LBOrderDetail/detail/services.d.ts +3 -0
- package/dist/esm/LBOrderDetail/detail/services.js +19 -0
- package/dist/esm/LBOrderDetail/detail/types.d.ts +361 -0
- package/dist/esm/LBOrderDetail/detail/types.js +1 -0
- package/dist/esm/LBOrderDetail/index.d.ts +14 -0
- package/dist/esm/LBOrderDetail/index.js +62 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/model/logicFlow/selector.d.ts +3 -0
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +9 -0
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +5 -0
- package/dist/esm/model/types/login.d.ts +1 -0
- package/package.json +5 -5
- package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +0 -899
- package/dist/esm/common/utils/dist/tools.js +0 -1326
- package/dist/esm/common/utils/dist/transformWorkOrderData.js +0 -965
- package/dist/esm/model/customizeWorkOrder/dist/api.js +0 -48
- package/dist/esm/model/customizeWorkOrder/dist/index.js +0 -370
- package/dist/esm/model/customizeWorkOrder/dist/selector.js +0 -63
- package/dist/esm/model/customizeWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/dist/global.js +0 -44
- package/dist/esm/model/dist/hooks.js +0 -15
- package/dist/esm/model/dist/login.js +0 -245
- package/dist/esm/model/dist/store.js +0 -30
- package/dist/esm/model/dist/userData.js +0 -41
- package/dist/esm/model/dist/workOrder.js +0 -329
- package/dist/esm/model/flowTemplateDetail/dist/api.js +0 -192
- package/dist/esm/model/flowTemplateDetail/dist/types.js +0 -48
- package/dist/esm/model/logicFlow/dist/api.js +0 -14
- package/dist/esm/model/logicFlow/dist/index.js +0 -235
- package/dist/esm/model/logicFlow/dist/selector.js +0 -18
- package/dist/esm/model/logicFlow/dist/types.js +0 -3
- package/dist/esm/model/paymentWorkOrder/dist/index.js +0 -77
- package/dist/esm/model/paymentWorkOrder/dist/selector.js +0 -36
- package/dist/esm/model/paymentWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/servers/dist/api.js +0 -545
- package/dist/esm/model/servers/dist/request.js +0 -63
- package/dist/esm/model/singleShopWorkOrder/dist/index.js +0 -216
- package/dist/esm/model/singleShopWorkOrder/dist/selector.js +0 -24
- package/dist/esm/model/singleShopWorkOrder/dist/types.js +0 -3
- package/dist/esm/model/types/dist/login.js +0 -3
- package/dist/esm/model/types/dist/singleWorkOrder.js +0 -3
- package/dist/esm/model/types/dist/workOrder.js +0 -3
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
4
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
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); }
|
|
8
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
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; }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { Timeline, message } from 'antd';
|
|
13
|
+
import moment from 'moment';
|
|
14
|
+
import styles from "./index.module.less";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
import { queryInstallationRepairServiceProgress } from "./services";
|
|
17
|
+
import { renderTime, renderImages } from "./OrderInfo";
|
|
18
|
+
var renderDetailItem = function renderDetailItem(record, item, effects) {
|
|
19
|
+
var isTable = 'children' in item && item.children;
|
|
20
|
+
var value = record.data[item.dataIndex];
|
|
21
|
+
if (isNull(value)) return;
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: isTable ? styles.detailItemTable : styles.detailItem,
|
|
24
|
+
key: item.dataIndex
|
|
25
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
26
|
+
className: styles.detailItemTitle
|
|
27
|
+
}, item.title, "\uFF1A"), /*#__PURE__*/React.createElement("span", null, 'render' in item && item.render ? item.render(value, record, item, effects) : value));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// 不同 serviceProgress 对应的配置,利用 satisfies 做强类型约束
|
|
31
|
+
var serviceProgressDetailConfig = {
|
|
32
|
+
2: [[{
|
|
33
|
+
title: '师傅姓名',
|
|
34
|
+
dataIndex: 'workerName'
|
|
35
|
+
}, {
|
|
36
|
+
title: '师傅接单时间',
|
|
37
|
+
dataIndex: 'time',
|
|
38
|
+
render: renderTime
|
|
39
|
+
}]],
|
|
40
|
+
3: [[{
|
|
41
|
+
title: '师傅姓名',
|
|
42
|
+
dataIndex: 'workerName'
|
|
43
|
+
}, {
|
|
44
|
+
title: '师傅物流签收时间',
|
|
45
|
+
dataIndex: 'time',
|
|
46
|
+
render: renderTime
|
|
47
|
+
}]],
|
|
48
|
+
4: [[{
|
|
49
|
+
title: '师傅姓名',
|
|
50
|
+
dataIndex: 'workerName'
|
|
51
|
+
}, {
|
|
52
|
+
title: '师傅预约操作时间',
|
|
53
|
+
dataIndex: 'time',
|
|
54
|
+
render: renderTime
|
|
55
|
+
}], [{
|
|
56
|
+
title: '操作类型',
|
|
57
|
+
dataIndex: 'operateType'
|
|
58
|
+
}, {
|
|
59
|
+
title: '预约开始时间',
|
|
60
|
+
dataIndex: 'appointTimeStart',
|
|
61
|
+
render: renderTime
|
|
62
|
+
}], {
|
|
63
|
+
title: '预约结束时间',
|
|
64
|
+
dataIndex: 'appointTimeEnd',
|
|
65
|
+
render: renderTime
|
|
66
|
+
}],
|
|
67
|
+
5: [[{
|
|
68
|
+
title: '师傅姓名',
|
|
69
|
+
dataIndex: 'workerName'
|
|
70
|
+
}, {
|
|
71
|
+
title: '师傅预约操作时间',
|
|
72
|
+
dataIndex: 'time',
|
|
73
|
+
render: renderTime
|
|
74
|
+
}], {
|
|
75
|
+
title: '师傅打卡方式',
|
|
76
|
+
dataIndex: 'clockInType'
|
|
77
|
+
}],
|
|
78
|
+
6: [[{
|
|
79
|
+
title: '师傅姓名',
|
|
80
|
+
dataIndex: 'workerName'
|
|
81
|
+
}, {
|
|
82
|
+
title: '师傅预约操作时间',
|
|
83
|
+
dataIndex: 'time',
|
|
84
|
+
render: renderTime
|
|
85
|
+
}], [{
|
|
86
|
+
title: '师傅完工图',
|
|
87
|
+
dataIndex: 'image1',
|
|
88
|
+
render: renderImages
|
|
89
|
+
}, {
|
|
90
|
+
title: '师傅完工签收单',
|
|
91
|
+
dataIndex: 'image2',
|
|
92
|
+
render: renderImages
|
|
93
|
+
}], {
|
|
94
|
+
title: '师傅完工好评图',
|
|
95
|
+
dataIndex: 'image3',
|
|
96
|
+
render: renderImages
|
|
97
|
+
}],
|
|
98
|
+
7: [[{
|
|
99
|
+
title: '师傅姓名',
|
|
100
|
+
dataIndex: 'workerName'
|
|
101
|
+
}, {
|
|
102
|
+
title: '验收时间',
|
|
103
|
+
dataIndex: 'time',
|
|
104
|
+
render: renderTime
|
|
105
|
+
}]],
|
|
106
|
+
8: [[{
|
|
107
|
+
title: '师傅操作时间',
|
|
108
|
+
dataIndex: 'time',
|
|
109
|
+
render: renderTime
|
|
110
|
+
}, {
|
|
111
|
+
title: '异常预约类型',
|
|
112
|
+
dataIndex: 'abnormalAppointType'
|
|
113
|
+
}], {
|
|
114
|
+
title: '异常预约描述',
|
|
115
|
+
dataIndex: 'abnormalAppointDesc'
|
|
116
|
+
}],
|
|
117
|
+
9: [[{
|
|
118
|
+
title: '师傅挂起时间',
|
|
119
|
+
dataIndex: 'time',
|
|
120
|
+
render: renderTime
|
|
121
|
+
}, {
|
|
122
|
+
title: '挂起原因类型',
|
|
123
|
+
dataIndex: 'suspendReasonType'
|
|
124
|
+
}], {
|
|
125
|
+
title: '挂起描述',
|
|
126
|
+
dataIndex: 'suspendReasonDesc'
|
|
127
|
+
}],
|
|
128
|
+
10: [{
|
|
129
|
+
title: '师傅取消挂起时间',
|
|
130
|
+
dataIndex: 'time',
|
|
131
|
+
render: renderTime
|
|
132
|
+
}],
|
|
133
|
+
11: [[{
|
|
134
|
+
title: '工单编号',
|
|
135
|
+
dataIndex: 'orderSn'
|
|
136
|
+
}, {
|
|
137
|
+
title: '申请时间',
|
|
138
|
+
dataIndex: 'time',
|
|
139
|
+
render: renderTime
|
|
140
|
+
}], [{
|
|
141
|
+
title: '增加费用类型',
|
|
142
|
+
dataIndex: 'increaseFeeType'
|
|
143
|
+
}, {
|
|
144
|
+
title: '申请金额',
|
|
145
|
+
dataIndex: 'applyAmount'
|
|
146
|
+
}], {
|
|
147
|
+
title: '师傅描述',
|
|
148
|
+
dataIndex: 'workerDesc'
|
|
149
|
+
}, {
|
|
150
|
+
title: '图片证明',
|
|
151
|
+
dataIndex: 'image',
|
|
152
|
+
render: renderImages
|
|
153
|
+
}],
|
|
154
|
+
12: [[{
|
|
155
|
+
title: '工单编号',
|
|
156
|
+
dataIndex: 'orderSn'
|
|
157
|
+
}, {
|
|
158
|
+
title: '操作时间',
|
|
159
|
+
dataIndex: 'time',
|
|
160
|
+
render: renderTime
|
|
161
|
+
}], [{
|
|
162
|
+
title: '增加费用类型',
|
|
163
|
+
dataIndex: 'increaseFeeType'
|
|
164
|
+
}, {
|
|
165
|
+
title: '申请金额',
|
|
166
|
+
dataIndex: 'applyAmount'
|
|
167
|
+
}], {
|
|
168
|
+
title: '师傅描述',
|
|
169
|
+
dataIndex: 'workerDesc'
|
|
170
|
+
}, {
|
|
171
|
+
title: '图片证明',
|
|
172
|
+
dataIndex: 'image',
|
|
173
|
+
render: renderImages
|
|
174
|
+
}],
|
|
175
|
+
13: [[{
|
|
176
|
+
title: '工单编号',
|
|
177
|
+
dataIndex: 'orderSn'
|
|
178
|
+
}, {
|
|
179
|
+
title: '申请时间',
|
|
180
|
+
dataIndex: 'time',
|
|
181
|
+
render: renderTime
|
|
182
|
+
}], [{
|
|
183
|
+
title: '申请金额',
|
|
184
|
+
dataIndex: 'applyAmount'
|
|
185
|
+
}, {
|
|
186
|
+
title: '师傅描述',
|
|
187
|
+
dataIndex: 'workerDesc'
|
|
188
|
+
}]],
|
|
189
|
+
14: [[{
|
|
190
|
+
title: '工单编号',
|
|
191
|
+
dataIndex: 'orderSn'
|
|
192
|
+
}, {
|
|
193
|
+
title: '操作时间',
|
|
194
|
+
dataIndex: 'time',
|
|
195
|
+
render: renderTime
|
|
196
|
+
}], [{
|
|
197
|
+
title: '申请金额',
|
|
198
|
+
dataIndex: 'applyAmount'
|
|
199
|
+
}, {
|
|
200
|
+
title: '师傅描述',
|
|
201
|
+
dataIndex: 'workerDesc'
|
|
202
|
+
}]],
|
|
203
|
+
15: [[{
|
|
204
|
+
title: '工单编号',
|
|
205
|
+
dataIndex: 'orderSn'
|
|
206
|
+
}, {
|
|
207
|
+
title: '操作时间',
|
|
208
|
+
dataIndex: 'time',
|
|
209
|
+
render: renderTime
|
|
210
|
+
}], [{
|
|
211
|
+
title: '操作者',
|
|
212
|
+
dataIndex: 'operator'
|
|
213
|
+
}, {
|
|
214
|
+
title: '投诉问题',
|
|
215
|
+
dataIndex: 'complaintQuestion'
|
|
216
|
+
}], {
|
|
217
|
+
title: '问题描述',
|
|
218
|
+
dataIndex: 'workerDesc'
|
|
219
|
+
}, {
|
|
220
|
+
title: '图片证明',
|
|
221
|
+
dataIndex: 'image',
|
|
222
|
+
render: renderImages
|
|
223
|
+
}],
|
|
224
|
+
16: [[{
|
|
225
|
+
title: '工单编号',
|
|
226
|
+
dataIndex: 'orderSn'
|
|
227
|
+
}, {
|
|
228
|
+
title: '操作时间',
|
|
229
|
+
dataIndex: 'time',
|
|
230
|
+
render: renderTime
|
|
231
|
+
}], [{
|
|
232
|
+
title: '操作者',
|
|
233
|
+
dataIndex: 'operator'
|
|
234
|
+
}, {
|
|
235
|
+
title: '投诉问题',
|
|
236
|
+
dataIndex: 'complaintQuestion'
|
|
237
|
+
}], {
|
|
238
|
+
title: '问题描述',
|
|
239
|
+
dataIndex: 'workerDesc'
|
|
240
|
+
}, {
|
|
241
|
+
title: '图片证明',
|
|
242
|
+
dataIndex: 'image',
|
|
243
|
+
render: renderImages
|
|
244
|
+
}],
|
|
245
|
+
17: [[{
|
|
246
|
+
title: '工单编号',
|
|
247
|
+
dataIndex: 'orderSn'
|
|
248
|
+
}, {
|
|
249
|
+
title: '处理时间',
|
|
250
|
+
dataIndex: 'time',
|
|
251
|
+
render: renderTime
|
|
252
|
+
}], [{
|
|
253
|
+
title: '处理结果',
|
|
254
|
+
dataIndex: 'handleResult',
|
|
255
|
+
render: function render(value) {
|
|
256
|
+
return value === 1 ? '同意' : value === 2 ? '不同意' : value;
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
title: '费用承担方',
|
|
260
|
+
dataIndex: 'feeBearer'
|
|
261
|
+
}], {
|
|
262
|
+
title: '承担金额',
|
|
263
|
+
dataIndex: 'bearAmount'
|
|
264
|
+
}, {
|
|
265
|
+
title: '图片证明',
|
|
266
|
+
dataIndex: 'image',
|
|
267
|
+
render: renderImages
|
|
268
|
+
}],
|
|
269
|
+
18: [[{
|
|
270
|
+
title: '工单编号',
|
|
271
|
+
dataIndex: 'orderSn'
|
|
272
|
+
}, {
|
|
273
|
+
title: '处理时间',
|
|
274
|
+
dataIndex: 'time',
|
|
275
|
+
render: renderTime
|
|
276
|
+
}], [{
|
|
277
|
+
title: '处理结果',
|
|
278
|
+
dataIndex: 'handleResult',
|
|
279
|
+
render: function render(value) {
|
|
280
|
+
return value === 1 ? '同意' : value === 2 ? '不同意' : value;
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
title: '承担金额',
|
|
284
|
+
dataIndex: 'bearAmount'
|
|
285
|
+
}], {
|
|
286
|
+
title: '图片证明',
|
|
287
|
+
dataIndex: 'image',
|
|
288
|
+
render: renderImages
|
|
289
|
+
}],
|
|
290
|
+
20: [[{
|
|
291
|
+
title: '工单编号',
|
|
292
|
+
dataIndex: 'orderSn'
|
|
293
|
+
}, {
|
|
294
|
+
title: '审核时间',
|
|
295
|
+
dataIndex: 'time',
|
|
296
|
+
render: renderTime
|
|
297
|
+
}], [{
|
|
298
|
+
title: '审核结果',
|
|
299
|
+
dataIndex: 'auditResult',
|
|
300
|
+
render: function render(value) {
|
|
301
|
+
return value === 1 ? '通过' : value === 2 ? '未通过' : value;
|
|
302
|
+
}
|
|
303
|
+
}, {
|
|
304
|
+
title: '异常金额',
|
|
305
|
+
dataIndex: 'abnormalAmount'
|
|
306
|
+
}]],
|
|
307
|
+
21: [[{
|
|
308
|
+
title: '工单编号',
|
|
309
|
+
dataIndex: 'orderSn'
|
|
310
|
+
}, {
|
|
311
|
+
title: '操作时间',
|
|
312
|
+
dataIndex: 'time',
|
|
313
|
+
render: renderTime
|
|
314
|
+
}], [{
|
|
315
|
+
title: '判定结果',
|
|
316
|
+
dataIndex: 'judgeResult',
|
|
317
|
+
render: function render(value) {
|
|
318
|
+
return value === 1 ? '同意' : value === 2 ? '不同意' : value;
|
|
319
|
+
}
|
|
320
|
+
}, {
|
|
321
|
+
title: '是否赔偿',
|
|
322
|
+
dataIndex: 'isCompensate',
|
|
323
|
+
render: function render(value) {
|
|
324
|
+
return value === 1 ? '赔偿' : value === 2 ? '不赔偿' : value;
|
|
325
|
+
}
|
|
326
|
+
}], [{
|
|
327
|
+
title: '赔偿金额',
|
|
328
|
+
dataIndex: 'compensateAmount'
|
|
329
|
+
}, {
|
|
330
|
+
title: '赔偿方式',
|
|
331
|
+
dataIndex: 'compensateWay'
|
|
332
|
+
}], [{
|
|
333
|
+
title: '打款方式',
|
|
334
|
+
dataIndex: 'payWay',
|
|
335
|
+
render: function render(value) {
|
|
336
|
+
return value === 0 ? '赔付到用户钱包' : value === 1 ? '财务线下打款给用户' : value;
|
|
337
|
+
}
|
|
338
|
+
}, {
|
|
339
|
+
title: '账户类型',
|
|
340
|
+
dataIndex: 'accountType',
|
|
341
|
+
render: function render(value) {
|
|
342
|
+
return value === 0 ? '钱包' : value === 1 ? '支付宝' : value === 2 ? '微信' : value === 3 ? '银行卡' : value;
|
|
343
|
+
}
|
|
344
|
+
}], [{
|
|
345
|
+
title: '账户名',
|
|
346
|
+
dataIndex: 'accountName'
|
|
347
|
+
}, {
|
|
348
|
+
title: '账户',
|
|
349
|
+
dataIndex: 'account'
|
|
350
|
+
}], {
|
|
351
|
+
title: '师傅说明',
|
|
352
|
+
dataIndex: 'workerRemark'
|
|
353
|
+
}, {
|
|
354
|
+
title: '客服处理说明',
|
|
355
|
+
dataIndex: 'processRemark'
|
|
356
|
+
}, {
|
|
357
|
+
title: '图片证明',
|
|
358
|
+
dataIndex: 'image',
|
|
359
|
+
render: renderImages
|
|
360
|
+
}]
|
|
361
|
+
};
|
|
362
|
+
var getServiceProgressList = function getServiceProgressList(serviceProgress, singleColumn) {
|
|
363
|
+
var _serviceProgressDetai;
|
|
364
|
+
var list = (_serviceProgressDetai = serviceProgressDetailConfig[serviceProgress]) !== null && _serviceProgressDetai !== void 0 ? _serviceProgressDetai : [];
|
|
365
|
+
if (singleColumn) {
|
|
366
|
+
var newList = [];
|
|
367
|
+
list.forEach(function (item) {
|
|
368
|
+
if (Array.isArray(item)) {
|
|
369
|
+
newList.push.apply(newList, _toConsumableArray(item));
|
|
370
|
+
} else {
|
|
371
|
+
newList.push(item);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
return newList;
|
|
375
|
+
}
|
|
376
|
+
return list;
|
|
377
|
+
};
|
|
378
|
+
var ProgressContent = function ProgressContent(_ref) {
|
|
379
|
+
var detail = _ref.detail,
|
|
380
|
+
shopList = _ref.shopList,
|
|
381
|
+
singleColumn = _ref.singleColumn;
|
|
382
|
+
var list = getServiceProgressList(detail.serviceProgress, singleColumn);
|
|
383
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
384
|
+
className: styles.progressContent
|
|
385
|
+
}, /*#__PURE__*/React.createElement("div", null, list.map(function (listItem) {
|
|
386
|
+
if (Array.isArray(listItem)) {
|
|
387
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
388
|
+
className: styles.serviceProgressList
|
|
389
|
+
}, listItem.map(function (item) {
|
|
390
|
+
return renderDetailItem(detail, item, {
|
|
391
|
+
shopList: shopList
|
|
392
|
+
});
|
|
393
|
+
}));
|
|
394
|
+
} else {
|
|
395
|
+
return renderDetailItem(detail, listItem, {
|
|
396
|
+
shopList: shopList
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
})));
|
|
400
|
+
};
|
|
401
|
+
ProgressContent.displayName = 'ProgressContent';
|
|
402
|
+
var ServiceProgress = function ServiceProgress(props) {
|
|
403
|
+
var _React$useState = React.useState([]),
|
|
404
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
405
|
+
serviceProgressList = _React$useState2[0],
|
|
406
|
+
setServiceProgressList = _React$useState2[1];
|
|
407
|
+
React.useEffect(function () {
|
|
408
|
+
if (props.id) {
|
|
409
|
+
queryInstallationRepairServiceProgress(props.id).then(function (res) {
|
|
410
|
+
console.log("\uD83D\uDE80 ~ ServiceProgress.tsx:51 ~ ServiceProgress ~ res:", res);
|
|
411
|
+
if (res.data) {
|
|
412
|
+
setServiceProgressList(res.data);
|
|
413
|
+
} else {
|
|
414
|
+
message.error('服务进度为空');
|
|
415
|
+
setServiceProgressList([]);
|
|
416
|
+
}
|
|
417
|
+
}).catch(console.log);
|
|
418
|
+
}
|
|
419
|
+
}, [props.id]);
|
|
420
|
+
return /*#__PURE__*/React.createElement(Timeline, {
|
|
421
|
+
style: {
|
|
422
|
+
paddingTop: '4px'
|
|
423
|
+
}
|
|
424
|
+
}, serviceProgressList.map(function (item, index) {
|
|
425
|
+
return /*#__PURE__*/React.createElement(Timeline.Item, {
|
|
426
|
+
key: "".concat(item.serviceProgress, "-").concat(item.pushId, "-").concat(index)
|
|
427
|
+
}, /*#__PURE__*/React.createElement("div", null, moment(item.operateTime).format('YYYY-MM-DD HH:mm:ss'), /*#__PURE__*/React.createElement("span", {
|
|
428
|
+
className: styles.typeMsg
|
|
429
|
+
}, item.serviceProgressDesc)), /*#__PURE__*/React.createElement(ProgressContent, {
|
|
430
|
+
singleColumn: props.contentWidth < 800,
|
|
431
|
+
detail: item,
|
|
432
|
+
shopList: props.shopList
|
|
433
|
+
}));
|
|
434
|
+
}));
|
|
435
|
+
};
|
|
436
|
+
ServiceProgress.displayName = 'ServiceProgress';
|
|
437
|
+
export default ServiceProgress;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Shop } from '../../model/types/login';
|
|
3
|
+
declare function LBOrderDetail(props: {
|
|
4
|
+
contentWidth: number;
|
|
5
|
+
id: string;
|
|
6
|
+
shopList: Shop[];
|
|
7
|
+
activeKey?: 'orderInfo' | 'serviceProgress';
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare namespace LBOrderDetail {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export default LBOrderDetail;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Tabs } from 'antd';
|
|
9
|
+
import styles from "./index.module.less";
|
|
10
|
+
import { useState } from 'react';
|
|
11
|
+
import ServiceProgress from "./ServiceProgress";
|
|
12
|
+
import OrderInfo from "./OrderInfo";
|
|
13
|
+
function LBOrderDetail(props) {
|
|
14
|
+
var _useState = useState(props.activeKey || 'orderInfo'),
|
|
15
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16
|
+
activeKey = _useState2[0],
|
|
17
|
+
setActiveKey = _useState2[1];
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: styles.containerBox
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
21
|
+
size: "small",
|
|
22
|
+
activeKey: activeKey,
|
|
23
|
+
onChange: function onChange(key) {
|
|
24
|
+
return setActiveKey(key);
|
|
25
|
+
},
|
|
26
|
+
className: styles.tabs
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
28
|
+
tab: "\u8BA2\u5355\u4FE1\u606F",
|
|
29
|
+
key: "orderInfo"
|
|
30
|
+
}), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
31
|
+
tab: "\u670D\u52A1\u8FDB\u5EA6",
|
|
32
|
+
key: "serviceProgress"
|
|
33
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: styles.content
|
|
35
|
+
}, activeKey === 'serviceProgress' && /*#__PURE__*/React.createElement(ServiceProgress, {
|
|
36
|
+
contentWidth: props.contentWidth,
|
|
37
|
+
id: props.id,
|
|
38
|
+
shopList: props.shopList
|
|
39
|
+
}), activeKey === 'orderInfo' && /*#__PURE__*/React.createElement(OrderInfo, {
|
|
40
|
+
id: props.id,
|
|
41
|
+
shopList: props.shopList
|
|
42
|
+
})));
|
|
43
|
+
}
|
|
44
|
+
LBOrderDetail.displayName = 'LBOrderDetail';
|
|
45
|
+
export default LBOrderDetail;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.tabs {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
z-index: 10;
|
|
7
|
+
:global(.ant-tabs-tab:first-child) {
|
|
8
|
+
margin-left: 12px;
|
|
9
|
+
}
|
|
10
|
+
&:global(.ant-tabs-top .ant-tabs-nav) {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow: auto;
|
|
18
|
+
padding: 0 12px 12px 12px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.containerBox {
|
|
22
|
+
position: relative;
|
|
23
|
+
padding-top: 50px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.detailItemTable {
|
|
28
|
+
padding: 6px 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.detailItem {
|
|
32
|
+
padding: 6px 0;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: top;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.detailItemTitle {
|
|
38
|
+
color: #999;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
flex-grow: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.typeMsg {
|
|
44
|
+
margin-left: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.progressContent {
|
|
48
|
+
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
49
|
+
padding: 12px;
|
|
50
|
+
border-radius: 6px;
|
|
51
|
+
background-color: #fff;
|
|
52
|
+
margin-top: 12px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
.serviceProgressList {
|
|
57
|
+
display: flex;
|
|
58
|
+
> div {
|
|
59
|
+
flex-basis: 50%;
|
|
60
|
+
flex-grow: 0;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DetailType, ServiceProgressListType } from './types';
|
|
2
|
+
export declare const queryInstallationRepairDetail: (id: string) => Promise<import("../../model/servers/request").serverProps<DetailType>>;
|
|
3
|
+
export declare const queryInstallationRepairServiceProgress: (id: string) => Promise<import("../../model/servers/request").serverProps<ServiceProgressListType>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import request from "../../model/servers/request";
|
|
2
|
+
export var queryInstallationRepairDetail = function queryInstallationRepairDetail(id) {
|
|
3
|
+
return request({
|
|
4
|
+
url: '/qy/installation-repair/detail',
|
|
5
|
+
method: 'post',
|
|
6
|
+
data: {
|
|
7
|
+
id: id
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export var queryInstallationRepairServiceProgress = function queryInstallationRepairServiceProgress(id) {
|
|
12
|
+
return request({
|
|
13
|
+
url: '/qy/installation-repair/serviceProgress',
|
|
14
|
+
method: 'post',
|
|
15
|
+
data: {
|
|
16
|
+
id: id
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|