companyHome.js
12.4 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
"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_empty2 = common_vendor.resolveComponent("up-empty");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item");
const _easycom_up_form2 = common_vendor.resolveComponent("up-form");
const _easycom_up_modal2 = common_vendor.resolveComponent("up-modal");
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_empty2 + _easycom_up_input2 + _easycom_up_form_item2 + _easycom_up_form2 + _easycom_up_modal2 + _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_empty = () => "../../uni_modules/uview-plus/components/u-empty/u-empty.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_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_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 + navTop + wordInfo + centerLine + carCard + _easycom_up_empty + ownerInfo + _easycom_up_input + _easycom_up_form_item + _easycom_up_form + _easycom_up_modal + _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 ownerInfo = () => "../../components/ownerInfo.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 transferForm = common_vendor.ref({
username: "",
taskId: ""
});
const transferOptions = common_vendor.reactive([]);
const showFeedback = common_vendor.ref(false);
const showSharing = common_vendor.ref(false);
const FeedbackForm = common_vendor.ref({
policystatus: "2",
message: "",
policynumber: ""
});
const queryParams = common_vendor.reactive({
pageNum: 1,
pageSize: 20
});
const continueQueryParams = common_vendor.reactive({
pageNum: 1,
pageSize: 20,
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) {
getProcessedList();
} else {
getEndedList();
}
};
const getList = async () => {
const { data } = await api_work.queryMyList(queryParams);
List.value = data.rows;
useTabbar.companyTotal = data.total;
};
const getProcessedList = async () => {
const { rows, total } = await api_work.queryContinueList(continueQueryParams);
ProcessedList.value = rows;
useTabbar.companyTotal = total;
};
const getEndedList = async () => {
const { rows, total } = await api_work.queryEndedList(queryParams);
EndedList.value = rows;
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) => {
const data = {
policystatus: "1"
};
api_work.disposeUser(data, FeedbackForm.value.taskId).then((res) => {
showFeedback.value = false;
getList();
});
};
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 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 goCarDetail = () => {
common_vendor.index.navigateTo({
url: "/pages/ownerDetail/ownerDetail"
});
};
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.f(List.value, (carItem, k0, i0) => {
return {
a: "6dff5f6e-2-" + i0 + "," + ("6dff5f6e-1-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-3-" + i0 + "," + ("6dff5f6e-1-" + i0),
d: common_vendor.p({
phone: carItem.phone,
userName: carItem.name,
company: carItem.sysDeptName
}),
e: common_vendor.o(($event) => handleContinue(carItem.taskId), carItem.taskId),
f: common_vendor.o(($event) => handleSharing(carItem.taskId), carItem.taskId),
g: "6dff5f6e-4-" + i0 + "," + ("6dff5f6e-1-" + i0),
h: carItem.taskId,
i: "6dff5f6e-1-" + i0,
j: common_vendor.p({
tipContent: carItem.orderProgress,
carInfo: carItem
})
};
}),
i: common_vendor.p({
leftContent: "承接",
rightContent: "转办"
}),
j: common_vendor.p({
show: List.value.length == 0,
mode: "list",
text: "暂无待办事项"
}),
k: common_vendor.f(ProcessedList.value, (carItem, index, i0) => {
return {
a: "6dff5f6e-7-" + i0 + "," + ("6dff5f6e-6-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-8-" + i0 + "," + ("6dff5f6e-6-" + 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-9-" + i0 + "," + ("6dff5f6e-6-" + i0),
h: index,
i: "6dff5f6e-6-" + i0,
j: common_vendor.p({
tipContent: "查看详情",
carInfo: carItem
})
};
}),
l: common_vendor.p({
leftContent: "承接回馈",
rightContent: "疑难件"
}),
m: common_vendor.p({
show: ProcessedList.value.length == 0,
mode: "list",
text: "暂无数据"
}),
n: common_vendor.f(EndedList.value, (carItem, index, i0) => {
return {
a: "6dff5f6e-12-" + i0 + "," + ("6dff5f6e-11-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "6dff5f6e-13-" + i0 + "," + ("6dff5f6e-11-" + i0),
d: common_vendor.p({
carInfo: carItem
}),
e: common_vendor.o(goCarDetail, index),
f: index,
g: "6dff5f6e-11-" + i0,
h: common_vendor.p({
tipContent: carItem.policyStatus,
carInfo: carItem
})
};
}),
o: common_vendor.p({
show: EndedList.value.length == 0,
mode: "list",
text: "暂无数据"
}),
p: expertActive.value,
q: common_vendor.o(toggleSwiper),
r: common_vendor.o(($event) => FeedbackForm.value.policynumber = $event),
s: common_vendor.p({
modelValue: FeedbackForm.value.policynumber
}),
t: common_vendor.p({
label: "承保单号",
prop: "name"
}),
v: FeedbackForm.value.message,
w: common_vendor.p({
label: "回馈内容",
prop: "name"
}),
x: common_vendor.p({
model: FeedbackForm.value
}),
y: common_vendor.o(submitFeedback),
z: common_vendor.o(($event) => showFeedback.value = false),
A: common_vendor.p({
show: showFeedback.value,
title: "填写回馈及单号"
}),
B: common_vendor.f(transferOptions, (item, index, i0) => {
return {
a: index,
b: "6dff5f6e-22-" + i0 + ",6dff5f6e-21",
c: common_vendor.p({
label: item.userName,
name: item.userName
})
};
}),
C: common_vendor.o(($event) => transferForm.value.username = $event),
D: common_vendor.p({
modelValue: transferForm.value.username
}),
E: common_vendor.o(submitSharing),
F: common_vendor.o(($event) => showSharing.value = false),
G: common_vendor.p({
show: showSharing.value,
title: "选择转办人员"
}),
H: common_vendor.p({
text: "主页",
icon: "home",
badge: common_vendor.unref(useTabbar).companyTotal
}),
I: common_assets._imports_0$1,
J: common_assets._imports_1$1,
K: common_vendor.o(goRouter),
L: common_vendor.p({
text: "我的",
icon: "account"
}),
M: 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);