operateList.js
8.6 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
"use strict";
const common_vendor = require("../common/vendor.js");
const api_work = require("../api/work.js");
const store_modules_user = require("../store/modules/user.js");
if (!Array) {
const _easycom_up_parse2 = common_vendor.resolveComponent("up-parse");
const _easycom_up_modal2 = common_vendor.resolveComponent("up-modal");
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
(_easycom_up_parse2 + _easycom_up_modal2 + _easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_radio2 + _easycom_up_radio_group2)();
}
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";
const _easycom_up_textarea = () => "../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
const _easycom_up_input = () => "../uni_modules/uview-plus/components/u-input/u-input.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";
if (!Math) {
(_easycom_up_parse + _easycom_up_modal + _easycom_up_textarea + _easycom_up_input + _easycom_up_radio + _easycom_up_radio_group)();
}
const _sfc_main = {
__name: "operateList",
props: {
carInfo: {
type: Object,
require: true
}
},
emits: ["refreshList"],
setup(__props, { emit: __emit }) {
const props = __props;
const userStore = store_modules_user.useUserStore();
const emit = __emit;
const deptOptions = common_vendor.ref([]);
const companyQueryParams = common_vendor.reactive({
deptName: void 0,
status: void 0
});
const deptId = common_vendor.ref(0);
const current = common_vendor.ref(9);
const showIssue = common_vendor.ref(false);
const IssueMessage = common_vendor.ref("");
const showReturn = common_vendor.ref(false);
const returnContent = common_vendor.ref("");
const showDefeat = common_vendor.ref(false);
const DefeatContent = common_vendor.ref("");
const showCompany = common_vendor.ref(false);
const assessor = common_vendor.ref(false);
const handleSuccess = () => {
current.value = 0;
common_vendor.index.showModal({
title: "提示",
content: "是否通过",
success: function(res) {
if (res.confirm) {
api_work.disposeUser({ associationapprove: "0", associationapprovetype: "0", deptid: userStore.transferDeptId }, props.carInfo.taskId).then((res2) => {
common_vendor.index.$u.toast("保单已通过");
emit("refreshList");
});
} else if (res.cancel) {
console.log("用户点击取消");
}
}
});
};
const handleReturn = () => {
current.value = 1;
showReturn.value = true;
};
const handleInvalid = () => {
current.value = 4;
showDefeat.value = true;
};
const lookReason = async () => {
current.value = 3;
const { data } = await api_work.queryDefeatContent({
processInstanceId: props.carInfo.processInstanceId,
type: 0
});
IssueMessage.value = data.message;
showIssue.value = true;
};
const handleUpdate = () => {
current.value = 2;
assessor.value = true;
const id = props.carInfo.businessKey;
common_vendor.index.navigateTo({
url: `/pages/carDetail/carDetail?carInfoId=${id}&roleId=1`
});
};
const handleCirculation = () => {
current.value = 5;
getDeptList();
showCompany.value = true;
};
const getDeptList = () => {
api_work.listDept(companyQueryParams).then((response) => {
deptOptions.value = response.data.filter((item) => item.parentId === 100);
});
};
const sunmitDeprecated = () => {
const data = {
associationapprove: "2",
comment: DefeatContent.value
};
const taskId = props.carInfo.taskId;
api_work.disposeUser(data, taskId).then((res) => {
emit("refreshList");
common_vendor.index.$u.toast("保单已作废");
showDefeat.value = false;
});
};
const sunmitReturn = () => {
const data = {
associationapprove: "1",
comment: returnContent.value
};
const taskId = props.carInfo.taskId;
api_work.disposeUser(data, taskId).then((res) => {
emit("refreshList");
common_vendor.index.$u.toast("保单退回");
showReturn.value = false;
});
};
const submitForm = () => {
const data = {
associationapprove: "0",
associationapprovetype: "1",
deptid: deptId.value.toString()
};
const taskId = props.carInfo.taskId;
api_work.disposeUser(data, taskId).then((res) => {
showCompany.value = false;
emit("refreshList");
common_vendor.index.$u.toast("保单已分配成功");
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: __props.carInfo.policyStatus != "问题件" && assessor.value
}, __props.carInfo.policyStatus != "问题件" && assessor.value ? {
b: current.value === 0 ? 1 : "",
c: common_vendor.o(handleSuccess)
} : {}, {
d: __props.carInfo.policyStatus != "问题件" && assessor.value
}, __props.carInfo.policyStatus != "问题件" && assessor.value ? {
e: current.value === 1 ? 1 : "",
f: common_vendor.o(handleReturn)
} : {}, {
g: __props.carInfo.policyStatus != "问题件"
}, __props.carInfo.policyStatus != "问题件" ? {
h: current.value === 2 ? 1 : "",
i: common_vendor.o(handleUpdate)
} : {}, {
j: __props.carInfo.policyStatus == "问题件"
}, __props.carInfo.policyStatus == "问题件" ? {
k: current.value === 3 ? 1 : "",
l: common_vendor.o(lookReason)
} : {}, {
m: current.value === 4 ? 1 : "",
n: common_vendor.o(handleInvalid),
o: current.value === 5 ? 1 : "",
p: common_vendor.o(handleCirculation),
q: common_vendor.p({
content: IssueMessage.value
}),
r: common_vendor.o(($event) => showIssue.value = false),
s: common_vendor.p({
show: showIssue.value,
title: "作废备注"
}),
t: common_vendor.o(($event) => DefeatContent.value = $event),
v: common_vendor.p({
placeholder: "请输入内容",
modelValue: DefeatContent.value
}),
w: common_vendor.o(sunmitDeprecated),
x: common_vendor.o(($event) => showDefeat.value = false),
y: common_vendor.p({
show: showDefeat.value,
showCancelButton: true,
title: "填写作废内容"
}),
z: common_vendor.o(($event) => returnContent.value = $event),
A: common_vendor.p({
placeholder: "请输入内容",
modelValue: returnContent.value
}),
B: common_vendor.o(sunmitReturn),
C: common_vendor.o(($event) => showReturn.value = false),
D: common_vendor.p({
show: showReturn.value,
showCancelButton: true,
title: "填写退回内容"
}),
E: common_vendor.o(($event) => companyQueryParams.deptName = $event),
F: common_vendor.p({
placeholder: "请输入承保公司名称",
prefixIcon: "search",
modelValue: companyQueryParams.deptName
}),
G: common_vendor.o(getDeptList),
H: common_vendor.f(deptOptions.value, (item, index, i0) => {
return {
a: index,
b: "3d588709-9-" + i0 + ",3d588709-8",
c: common_vendor.p({
label: item.deptName,
name: item.deptId
})
};
}),
I: common_vendor.o(($event) => deptId.value = $event),
J: common_vendor.p({
placement: "column",
modelValue: deptId.value
}),
K: common_vendor.o(submitForm),
L: common_vendor.o(($event) => showCompany.value = false),
M: common_vendor.o(($event) => showCompany.value = false),
N: common_vendor.p({
show: showCompany.value,
showCancelButton: true,
closeOnClickOverlay: true,
title: "选择分配项"
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3d588709"]]);
wx.createComponent(Component);