societyOrder.js
7.7 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_work = require("../../api/work.js");
if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_up_empty2 = common_vendor.resolveComponent("up-empty");
const _easycom_uni_pagination2 = common_vendor.resolveComponent("uni-pagination");
const _easycom_up_parse2 = common_vendor.resolveComponent("up-parse");
const _easycom_up_modal2 = common_vendor.resolveComponent("up-modal");
(_easycom_up_navbar2 + _easycom_up_empty2 + _easycom_uni_pagination2 + _easycom_up_parse2 + _easycom_up_modal2)();
}
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_uni_pagination = () => "../../uni_modules/uni-pagination/components/uni-pagination/uni-pagination.js";
const _easycom_up_parse = () => "../../uni_modules/uview-plus/components/u-parse/u-parse.js";
const _easycom_up_modal = () => "../../uni_modules/uview-plus/components/u-modal/u-modal.js";
if (!Math) {
(_easycom_up_navbar + navTop + wordInfo + operateList + carCard + _easycom_up_empty + _easycom_uni_pagination + _easycom_up_parse + _easycom_up_modal)();
}
const carCard = () => "../../components/carCard.js";
const navTop = () => "../../components/navTop.js";
const wordInfo = () => "../../components/wordInfo.js";
const operateList = () => "../../components/operateList.js";
const _sfc_main = {
__name: "societyOrder",
setup(__props) {
const List = common_vendor.ref([]);
const allTotal = common_vendor.ref(0);
const typeId = common_vendor.ref(0);
const showFeedback = common_vendor.ref(false);
const showDefeat = common_vendor.ref(false);
const feedbakcForm = common_vendor.ref({
policyNumber: "",
message: ""
});
const defeatForm = common_vendor.ref({
message: ""
});
const queryParams = common_vendor.reactive({
pageNum: 1,
pageSize: 10,
type: 0
});
const tipContent = common_vendor.ref("");
common_vendor.onLoad((options) => {
typeId.value = Number(options.type);
getList(typeId.value);
});
common_vendor.onPullDownRefresh(async () => {
queryParams.pageNum = 1;
List.value = [];
getList(typeId.value);
});
const getList = (id) => {
switch (id) {
case 0:
tipContent.value = "待处理";
api_work.queryMyList(queryParams).then((res) => {
List.value = res.data.rows || [];
allTotal.value = res.data.total;
common_vendor.index.stopPullDownRefresh();
});
break;
case 1:
tipContent.value = "已处理";
api_work.queryProcessedList(queryParams).then((res) => {
List.value = res.rows || [];
allTotal.value = res.total;
common_vendor.index.stopPullDownRefresh();
});
break;
case 2:
tipContent.value = "进行中";
api_work.queryOngoingList(queryParams).then((res) => {
List.value = res.rows || [];
allTotal.value = res.total;
common_vendor.index.stopPullDownRefresh();
});
break;
case 3:
tipContent.value = "已完结";
api_work.queryEndedList(queryParams).then((res) => {
List.value = res.rows || [];
allTotal.value = res.total;
common_vendor.index.stopPullDownRefresh();
});
break;
case 4:
tipContent.value = "已作废";
api_work.queryDeprecatedList(queryParams).then((res) => {
List.value = res.rows || [];
allTotal.value = res.total;
common_vendor.index.stopPullDownRefresh();
});
break;
}
};
const lookDetail = (id) => {
common_vendor.index.navigateTo({
url: `/pages/carDetail/carDetail?carInfoId=${id}`
});
};
const lookFeedback = (processInstanceId) => {
api_work.queryResult({ processInstanceId }).then((res) => {
var _a, _b;
feedbakcForm.value.policyNumber = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.policyNumber;
feedbakcForm.value.message = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.message;
showFeedback.value = true;
});
};
const lookRemark = (processInstanceId) => {
api_work.queryDefeatContent({ processInstanceId, type: 2 }).then((res) => {
var _a;
defeatForm.value.message = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.message;
showDefeat.value = true;
});
};
const changeList = (index) => {
queryParams.type = index;
getList(typeId.value);
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
placeholder: true,
leftIconColor: "#fff",
autoBack: true,
bgColor: "transparent"
}),
b: queryParams.type === 0 ? 1 : "",
c: common_vendor.o(($event) => changeList(0)),
d: queryParams.type === 1 ? 1 : "",
e: common_vendor.o(($event) => changeList(1)),
f: common_vendor.f(List.value, (carItem, k0, i0) => {
return common_vendor.e({
a: "c7e48d8e-2-" + i0 + "," + ("c7e48d8e-1-" + i0),
b: common_vendor.p({
carNum: carItem.licensePlateNumber
}),
c: "c7e48d8e-3-" + i0 + "," + ("c7e48d8e-1-" + i0),
d: common_vendor.p({
phone: carItem.phone,
userName: carItem.name,
company: carItem.sysDeptName
})
}, typeId.value === 0 ? {
e: common_vendor.o(getList, carItem.taskId),
f: "c7e48d8e-4-" + i0 + "," + ("c7e48d8e-1-" + i0),
g: common_vendor.p({
carInfo: carItem
})
} : {}, {
h: common_vendor.o(($event) => lookDetail(carItem.businessKey), carItem.taskId)
}, typeId.value === 3 ? {
i: common_vendor.o(($event) => lookFeedback(carItem.processInstanceId), carItem.taskId)
} : {}, typeId.value === 4 ? {
j: common_vendor.o(($event) => lookRemark(carItem.processInstanceId), carItem.taskId)
} : {}, {
k: carItem.taskId,
l: "c7e48d8e-1-" + i0,
m: common_vendor.p({
tipContent: tipContent.value,
carInfo: carItem
})
});
}),
g: typeId.value === 0,
h: typeId.value === 3,
i: typeId.value === 4,
j: common_vendor.p({
show: List.value.length == 0,
mode: "list",
text: "暂无待办事项"
}),
k: common_vendor.o(($event) => getList(typeId.value)),
l: common_vendor.o(($event) => queryParams.pageNum = $event),
m: common_vendor.p({
total: allTotal.value,
pageSize: queryParams.pageSize,
modelValue: queryParams.pageNum
}),
n: List.value.length > 0,
o: common_vendor.p({
content: feedbakcForm.value.message
}),
p: common_vendor.o(($event) => showFeedback.value = false),
q: common_vendor.p({
show: showFeedback.value,
title: "保单回馈"
}),
r: common_vendor.p({
content: defeatForm.value.message
}),
s: common_vendor.o(($event) => showDefeat.value = false),
t: common_vendor.p({
show: showDefeat.value,
title: "作废备注"
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c7e48d8e"]]);
wx.createPage(MiniProgramPage);