companyHome.js
19.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_work = require("../../api/work.js");
const store_modules_tabbar = require("../../store/modules/tabbar.js");
if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_up_empty2 = common_vendor.resolveComponent("up-empty");
const _easycom_uni_pagination2 = common_vendor.resolveComponent("uni-pagination");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item");
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
const _easycom_up_form2 = common_vendor.resolveComponent("up-form");
const _easycom_up_modal2 = common_vendor.resolveComponent("up-modal");
const _easycom_up_parse2 = common_vendor.resolveComponent("up-parse");
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
const _easycom_up_tabbar_item2 = common_vendor.resolveComponent("up-tabbar-item");
const _easycom_up_tabbar2 = common_vendor.resolveComponent("up-tabbar");
(_easycom_up_navbar2 + _easycom_up_icon2 + _easycom_up_empty2 + _easycom_uni_pagination2 + _easycom_up_input2 + _easycom_up_form_item2 + _easycom_up_textarea2 + _easycom_up_form2 + _easycom_up_modal2 + _easycom_up_parse2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_tabbar_item2 + _easycom_up_tabbar2)();
}
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up_empty = () => "../../uni_modules/uview-plus/components/u-empty/u-empty.js";
const _easycom_uni_pagination = () => "../../uni_modules/uni-pagination/components/uni-pagination/uni-pagination.js";
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_up_form_item = () => "../../uni_modules/uview-plus/components/u-form-item/u-form-item.js";
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
const _easycom_up_form = () => "../../uni_modules/uview-plus/components/u-form/u-form.js";
const _easycom_up_modal = () => "../../uni_modules/uview-plus/components/u-modal/u-modal.js";
const _easycom_up_parse = () => "../../uni_modules/uview-plus/components/u-parse/u-parse.js";
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_up_tabbar_item = () => "../../uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js";
const _easycom_up_tabbar = () => "../../uni_modules/uview-plus/components/u-tabbar/u-tabbar.js";
if (!Math) {
(_easycom_up_navbar + _easycom_up_icon + navTop + wordInfo + centerLine + carCard + _easycom_up_empty + _easycom_uni_pagination + _easycom_up_input + _easycom_up_form_item + _easycom_up_textarea + _easycom_up_form + _easycom_up_modal + _easycom_up_parse + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_tabbar_item + _easycom_up_tabbar)();
}
const carCard = () => "../../components/carCard.js";
const centerLine = () => "../../components/centerLine.js";
const wordInfo = () => "../../components/wordInfo.js";
const navTop = () => "../../components/navTop.js";
const _sfc_main = {
__name: "companyHome",
setup(__props) {
const useTabbar = store_modules_tabbar.useTabbarStore();
const List = common_vendor.ref([]);
const ProcessedList = common_vendor.ref([]);
const EndedList = common_vendor.ref([]);
const expertActive = common_vendor.ref(0);
const allTotal = common_vendor.ref(0);
const showType = common_vendor.ref(false);
const transferForm = common_vendor.ref({
username: "",
taskId: ""
});
const transferOptions = common_vendor.ref([]);
const showQuestion = common_vendor.ref(false);
const QuestionForm = common_vendor.ref({});
const showFeedback = common_vendor.ref(false);
const showSharing = common_vendor.ref(false);
const showRemark = common_vendor.ref(false);
const remarkForm = common_vendor.ref({
message: "",
commercialInsurancePolicyNumber: "",
strongInsurancePolicyNumber: ""
});
const FeedbackForm = common_vendor.ref({
policystatus: "2",
message: "",
commercialInsurancePolicyNumber: "",
strongInsurancePolicyNumber: ""
});
const queryParams = common_vendor.reactive({
pageNum: 1,
pageSize: 10,
type: 0
});
common_vendor.reactive({
pageNum: 1,
pageSize: 10,
orderprogress: 1,
policystatus: 0
});
const toggleSwiper = (event) => {
var _a, _b, _c;
expertActive.value = (_a = event.detail) == null ? void 0 : _a.current;
if (((_b = event.detail) == null ? void 0 : _b.current) === 0) {
getList();
} else if (((_c = event.detail) == null ? void 0 : _c.current) === 1) {
getOngoingList();
} else {
getEndedList();
}
};
const changeList = (index) => {
queryParams.type = index;
showType.value = false;
expertActive.value = 0;
getList();
};
const getList = async () => {
const { data } = await api_work.queryMyList(queryParams);
List.value = data.rows || [];
allTotal.value = data.total;
useTabbar.companyTotal = data.total;
};
const getOngoingList = async () => {
const { rows, total } = await api_work.queryOngoingList(queryParams);
ProcessedList.value = rows || [];
allTotal.value = total;
useTabbar.companyTotal = total;
};
const getEndedList = async () => {
const { rows, total } = await api_work.queryEndedList(queryParams);
EndedList.value = rows || [];
allTotal.value = total;
useTabbar.companyTotal = total;
};
const handleContinue = (taskId) => {
common_vendor.index.showModal({
content: "是否要承接该保单",
success: function(res) {
if (res.confirm) {
api_work.disposeUser({}, taskId).then((res2) => {
common_vendor.index.$u.toast("承接成功");
getList();
});
} else if (res.cancel) {
common_vendor.index.$u.toast("已取消");
}
}
});
};
const handleSharing = async (taskId) => {
const { data } = await api_work.getUserList();
transferForm.value.taskId = taskId;
transferOptions.value = data;
showSharing.value = true;
};
const handleFeedback = (taskId) => {
FeedbackForm.value.taskId = taskId;
showFeedback.value = true;
};
const handleTroubleshooting = (taskId) => {
QuestionForm.value.taskId = taskId;
showQuestion.value = true;
};
const submitFeedback = () => {
const data = {
policystatus: "2",
message: FeedbackForm.value.message,
policynumber: FeedbackForm.value.policynumber
};
api_work.disposeUser(data, FeedbackForm.value.taskId).then((res) => {
showFeedback.value = false;
getList();
proxy.$modal.msgSuccess("回馈成功");
});
};
const submitQuestion = () => {
const data = {
policystatus: "1",
comment: QuestionForm.value.message
};
api_work.disposeUser(data, QuestionForm.value.taskId).then((res) => {
showQuestion.value = false;
getList();
});
};
common_vendor.onPullDownRefresh(async () => {
queryParams.pageNum = 1;
List.value = [];
ProcessedList.value = [];
EndedList.value = [];
await getList();
common_vendor.index.stopPullDownRefresh();
});
const submitSharing = () => {
const data = {
username: transferForm.value.username
};
const taskId = transferForm.value.taskId;
api_work.transfer(data, taskId).then((res) => {
showSharing.value = false;
getList();
proxy.$modal.msgSuccess("保单已分配成功");
});
};
const goRouter = (index) => {
useTabbar.employeeCurrent = index;
common_vendor.index.redirectTo({
url: "/pages/companyMy/companyMy"
});
};
const lookRemark = (processInstanceId) => {
api_work.queryResult({ processInstanceId }).then((res) => {
var _a, _b, _c;
remarkForm.value.strongInsurancePolicyNumber = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.strongInsurancePolicyNumber;
remarkForm.value.commercialInsurancePolicyNumber = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.commercialInsurancePolicyNumber;
remarkForm.value.message = (_c = res == null ? void 0 : res.data) == null ? void 0 : _c.message;
showRemark.value = true;
});
};
getList();
return (_ctx, _cache) => {
return {
a: common_vendor.p({
placeholder: true,
leftIconSize: 0,
bgColor: "transparent"
}),
b: expertActive.value === 0 ? 1 : "",
c: common_vendor.o(($event) => expertActive.value = 0),
d: expertActive.value === 1 ? 1 : "",
e: common_vendor.o(($event) => expertActive.value = 1),
f: expertActive.value === 2 ? 1 : "",
g: common_vendor.o(($event) => expertActive.value = 2),
h: common_vendor.o(($event) => showType.value = !showType.value),
i: common_vendor.p({
name: "list",
color: "#333",
size: "28"
}),
j: queryParams.type === 0 ? 1 : "",
k: common_vendor.o(($event) => changeList(0)),
l: queryParams.type === 1 ? 1 : "",
m: common_vendor.o(($event) => changeList(1)),
n: showType.value,
o: common_vendor.f(List.value, (carItem, k0, i0) => {
return common_vendor.e({
a: "6dff5f6e-3-" + i0 + "," + ("6dff5f6e-2-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-4-" + i0 + "," + ("6dff5f6e-2-" + i0),
d: common_vendor.p({
phone: carItem.phone,
userName: carItem.name,
company: carItem.sysDeptName
}),
e: carItem.orderProgress === "已承接"
}, carItem.orderProgress === "已承接" ? {
f: common_vendor.o(($event) => handleFeedback(carItem.taskId), carItem.taskId),
g: common_vendor.o(($event) => handleTroubleshooting(carItem.taskId), carItem.taskId),
h: "6dff5f6e-5-" + i0 + "," + ("6dff5f6e-2-" + i0),
i: common_vendor.p({
leftContent: "承接回馈",
rightContent: "问题件"
})
} : {
j: common_vendor.o(($event) => handleContinue(carItem.taskId), carItem.taskId),
k: common_vendor.o(($event) => handleSharing(carItem.taskId), carItem.taskId),
l: "6dff5f6e-6-" + i0 + "," + ("6dff5f6e-2-" + i0),
m: common_vendor.p({
leftContent: "承接",
rightContent: "转办"
})
}, {
n: carItem.taskId,
o: "6dff5f6e-2-" + i0,
p: common_vendor.p({
tipContent: carItem.orderProgress,
carInfo: carItem
})
});
}),
p: common_vendor.p({
show: List.value.length == 0,
mode: "list",
text: "暂无待办事项"
}),
q: common_vendor.o(getList),
r: common_vendor.o(($event) => queryParams.pageNum = $event),
s: common_vendor.p({
total: allTotal.value,
pageSize: queryParams.pageSize,
modelValue: queryParams.pageNum
}),
t: List.value.length > 0,
v: common_vendor.f(ProcessedList.value, (carItem, index, i0) => {
return {
a: "6dff5f6e-10-" + i0 + "," + ("6dff5f6e-9-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-11-" + i0 + "," + ("6dff5f6e-9-" + i0),
d: common_vendor.p({
phone: carItem.phone,
userName: carItem.name,
company: carItem.sysDeptName
}),
e: common_vendor.o(($event) => handleFeedback(carItem.taskId), index),
f: common_vendor.o(($event) => handleTroubleshooting(carItem.taskId), index),
g: "6dff5f6e-12-" + i0 + "," + ("6dff5f6e-9-" + i0),
h: index,
i: "6dff5f6e-9-" + i0,
j: common_vendor.p({
tipContent: "查看详情",
carInfo: carItem
})
};
}),
w: common_vendor.p({
leftContent: "承接回馈",
rightContent: "问题件"
}),
x: common_vendor.p({
show: ProcessedList.value.length == 0,
mode: "list",
text: "暂无数据"
}),
y: common_vendor.o(getOngoingList),
z: common_vendor.o(($event) => queryParams.pageNum = $event),
A: common_vendor.p({
total: allTotal.value,
pageSize: queryParams.pageSize,
modelValue: queryParams.pageNum
}),
B: ProcessedList.value.length > 0,
C: common_vendor.f(EndedList.value, (carItem, index, i0) => {
return {
a: "6dff5f6e-16-" + i0 + "," + ("6dff5f6e-15-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-17-" + i0 + "," + ("6dff5f6e-15-" + i0),
d: common_vendor.p({
phone: carItem.phone,
userName: carItem.name,
company: carItem.sysDeptName
}),
e: common_vendor.o(($event) => lookRemark(carItem.processInstanceId), index),
f: index,
g: "6dff5f6e-15-" + i0,
h: common_vendor.p({
tipContent: carItem.policyStatus,
carInfo: carItem
})
};
}),
D: common_vendor.p({
show: EndedList.value.length == 0,
mode: "list",
text: "暂无数据"
}),
E: common_vendor.o(getEndedList),
F: common_vendor.o(($event) => queryParams.pageNum = $event),
G: common_vendor.p({
total: allTotal.value,
pageSize: queryParams.pageSize,
modelValue: queryParams.pageNum
}),
H: EndedList.value.length > 0,
I: expertActive.value,
J: common_vendor.o(toggleSwiper),
K: common_vendor.o(($event) => FeedbackForm.value.commercialInsurancePolicyNumber = $event),
L: common_vendor.p({
modelValue: FeedbackForm.value.commercialInsurancePolicyNumber
}),
M: common_vendor.p({
label: "商险单号",
prop: "commercialInsurancePolicyNumber"
}),
N: common_vendor.o(($event) => FeedbackForm.value.strongInsurancePolicyNumber = $event),
O: common_vendor.p({
modelValue: FeedbackForm.value.strongInsurancePolicyNumber
}),
P: common_vendor.p({
label: "强险单号",
prop: "strongInsurancePolicyNumber"
}),
Q: common_vendor.o(($event) => FeedbackForm.value.message = $event),
R: common_vendor.p({
placeholder: "请输入内容",
modelValue: FeedbackForm.value.message
}),
S: common_vendor.p({
label: "回馈内容",
prop: "name"
}),
T: common_vendor.p({
model: FeedbackForm.value,
labelWidth: "80"
}),
U: common_vendor.o(submitFeedback),
V: common_vendor.o(($event) => showFeedback.value = false),
W: common_vendor.p({
show: showFeedback.value,
showCancelButton: true,
title: "填写回馈及单号"
}),
X: common_vendor.o(($event) => QuestionForm.value.message = $event),
Y: common_vendor.p({
placeholder: "请输入内容",
modelValue: QuestionForm.value.message
}),
Z: common_vendor.o(submitQuestion),
aa: common_vendor.o(($event) => showQuestion.value = false),
ab: common_vendor.p({
show: showQuestion.value,
showCancelButton: true,
title: "问题件回馈"
}),
ac: common_vendor.o(($event) => remarkForm.value.commercialInsurancePolicyNumber = $event),
ad: common_vendor.p({
border: "none",
disabled: true,
disabledColor: "#fff",
modelValue: remarkForm.value.commercialInsurancePolicyNumber
}),
ae: common_vendor.p({
label: "商险单号",
prop: "commercialInsurancePolicyNumber"
}),
af: common_vendor.o(($event) => remarkForm.value.strongInsurancePolicyNumber = $event),
ag: common_vendor.p({
border: "none",
disabled: true,
disabledColor: "#fff",
modelValue: remarkForm.value.strongInsurancePolicyNumber
}),
ah: common_vendor.p({
label: "强险单号",
prop: "strongInsurancePolicyNumber"
}),
ai: common_vendor.p({
content: remarkForm.value.message
}),
aj: common_vendor.p({
label: "回馈内容",
prop: "name"
}),
ak: common_vendor.p({
model: remarkForm.value,
labelWidth: "80"
}),
al: common_vendor.o(($event) => showRemark.value = false),
am: common_vendor.p({
show: showRemark.value,
title: "回馈内容"
}),
an: common_vendor.f(transferOptions.value, (item, index, i0) => {
return {
a: index,
b: "6dff5f6e-40-" + i0 + ",6dff5f6e-39",
c: common_vendor.p({
label: item.nickName,
name: item.userName
})
};
}),
ao: common_vendor.o(($event) => transferForm.value.username = $event),
ap: common_vendor.p({
modelValue: transferForm.value.username
}),
aq: common_vendor.o(submitSharing),
ar: common_vendor.o(($event) => showSharing.value = false),
as: common_vendor.p({
show: showSharing.value,
showCancelButton: true,
title: "选择转办人员"
}),
at: common_vendor.p({
text: "主页",
icon: "home",
badge: common_vendor.unref(useTabbar).companyTotal
}),
av: common_assets._imports_0$4,
aw: common_assets._imports_1$2,
ax: common_vendor.o(goRouter),
ay: common_vendor.p({
text: "我的",
icon: "account"
}),
az: common_vendor.p({
value: common_vendor.unref(useTabbar).employeeCurrent,
activeColor: "#3680FE",
inactiveColor: "#707070"
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6dff5f6e"]]);
wx.createPage(MiniProgramPage);