vue3-element-plus-app-chu 0.0.29 → 0.0.30
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/package.json
CHANGED
|
@@ -207,7 +207,7 @@ const loadFlowList = async () => {
|
|
|
207
207
|
flowQueryError.value = ''
|
|
208
208
|
try {
|
|
209
209
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
210
|
-
const response = await API.queryFlowApi({ ...query, pageIndex, pageSize })
|
|
210
|
+
const response = await API.queryFlowApi({ ...query, pageIndex, pageSize }) as any
|
|
211
211
|
if (disposed || currentId !== flowRequestId) return
|
|
212
212
|
const page = readPage(ensureSuccess(response), pageIndex, pageSize)
|
|
213
213
|
if (pageIndex > page.lastPage) {
|
|
@@ -292,7 +292,7 @@ const checkRealtimeFlow = async () => {
|
|
|
292
292
|
if (disposed || realtimeChecking.value) return
|
|
293
293
|
realtimeChecking.value = true
|
|
294
294
|
try {
|
|
295
|
-
const response = await API.queryFlowApi({ pageIndex: 1, pageSize: 1 })
|
|
295
|
+
const response = await API.queryFlowApi({ pageIndex: 1, pageSize: 1 }) as any
|
|
296
296
|
if (disposed) return
|
|
297
297
|
if (response?.head?.retCode !== '00000') {
|
|
298
298
|
throw new Error(response?.head?.retMsg?.trim() || '实时查询流水失败')
|
|
@@ -181,7 +181,7 @@ const validateForm = (values: ForecastFormValues, mode: 'create' | 'edit' = 'cre
|
|
|
181
181
|
/** 读取详情并与列表记录合并:详情没有的字段由同一条列表记录补充。 */
|
|
182
182
|
const fetchDetail = async (row: ForecastRow): Promise<ForecastDetail> => {
|
|
183
183
|
if (!row.predRefNo?.trim()) throw new Error('预报流水号缺失,无法读取详情')
|
|
184
|
-
const body = ensureSuccess<any>(await API.getDetailApi({ predRefNo: row.predRefNo }), '读取预报详情失败')
|
|
184
|
+
const body = ensureSuccess<any>(await API.getDetailApi({ predRefNo: row.predRefNo }) as any, '读取预报详情失败')
|
|
185
185
|
if (!body || !Object.keys(body).length) throw new Error('服务端未返回预报详情')
|
|
186
186
|
if (body.predRefNo && body.predRefNo !== row.predRefNo) throw new Error('返回的预报流水号与当前记录不一致')
|
|
187
187
|
const definedBody = Object.fromEntries(Object.entries(body).filter(([, value]) => value !== undefined && value !== null))
|
|
@@ -291,7 +291,7 @@ const loadList = async () => {
|
|
|
291
291
|
clearListSelection()
|
|
292
292
|
try {
|
|
293
293
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
294
|
-
const response = await API.queryListApi({ ...query, opType: 'query', pageIndex, pageSize })
|
|
294
|
+
const response = await API.queryListApi({ ...query, opType: 'query', pageIndex, pageSize }) as any
|
|
295
295
|
if (disposed || currentId !== listRequestId) return
|
|
296
296
|
const page = readPage(ensureSuccess(response, '预报查询失败'))
|
|
297
297
|
const lastPage = Math.max(1, Math.ceil(page.total / pageSize))
|
|
@@ -380,7 +380,7 @@ async function deleteRecords(records: ForecastRow[]) {
|
|
|
380
380
|
buttonSize: listTableSettings.value.size,
|
|
381
381
|
})
|
|
382
382
|
if (disposed) return
|
|
383
|
-
ensureSuccess(await API.deleteApi(references), '删除预报失败')
|
|
383
|
+
ensureSuccess(await API.deleteApi(references) as any, '删除预报失败')
|
|
384
384
|
if (disposed) return
|
|
385
385
|
ElMessage.success('删除请求已处理')
|
|
386
386
|
await loadList()
|
|
@@ -587,7 +587,7 @@ const submit = async () => {
|
|
|
587
587
|
if (key !== 'custRefSeq' && value?.trim()) Object.assign(body, { [key]: value.trim() })
|
|
588
588
|
}
|
|
589
589
|
if (body.predAmt) body.predAmt = normalizeAmount(body.predAmt)
|
|
590
|
-
ensureSuccess(await API.addApi(body), '新增预报失败')
|
|
590
|
+
ensureSuccess(await API.addApi(body) as any, '新增预报失败')
|
|
591
591
|
} else {
|
|
592
592
|
if (!editorPredRefNo.value) throw new Error('预报流水号缺失,无法修改')
|
|
593
593
|
const body: ForecastEditBody = { predRefSeq: editorPredRefNo.value }
|
|
@@ -600,7 +600,7 @@ const submit = async () => {
|
|
|
600
600
|
body.custRefSeq = customerReference
|
|
601
601
|
}
|
|
602
602
|
if (body.predAmt) body.predAmt = normalizeAmount(body.predAmt)
|
|
603
|
-
ensureSuccess(await API.editApi(body), '修改预报失败')
|
|
603
|
+
ensureSuccess(await API.editApi(body) as any, '修改预报失败')
|
|
604
604
|
}
|
|
605
605
|
if (disposed) return
|
|
606
606
|
ElMessage.success(editorMode.value === 'create' ? '新增请求已处理' : '修改请求已处理')
|
|
@@ -275,7 +275,7 @@ const loadList = async () => {
|
|
|
275
275
|
try {
|
|
276
276
|
// head 为公共响应头,body 为包含明细列表的业务数据;
|
|
277
277
|
// body 内的 totalCount、totalPage 供服务端分页时使用,当前接按返回的完整列表本地分页。
|
|
278
|
-
const { head, body } = await API.queryListApi(appliedQuery)
|
|
278
|
+
const { head, body } = await API.queryListApi(appliedQuery) as any
|
|
279
279
|
if (currentRequestId !== requestId) return
|
|
280
280
|
if (head?.retCode !== '00000') {
|
|
281
281
|
throw new Error(head?.retMsg || '查询失败')
|
|
@@ -111,7 +111,7 @@ const loadList = async () => {
|
|
|
111
111
|
clearSelection()
|
|
112
112
|
try {
|
|
113
113
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
114
|
-
const response = await API.queryListApi(params)
|
|
114
|
+
const response = await API.queryListApi(params) as any
|
|
115
115
|
if (disposed || requestId !== listRequestId) return
|
|
116
116
|
const body: ParameterListBody | null = ensureSuccess(response, '参数查询失败')
|
|
117
117
|
if (!body || !Array.isArray(body.resultList)) throw new Error('查询结果缺少参数列表')
|
|
@@ -207,14 +207,14 @@ const submitParameter = async () => {
|
|
|
207
207
|
pendingMutation.value = mode
|
|
208
208
|
try {
|
|
209
209
|
const response = mode === 'create'
|
|
210
|
-
? await API.addApi({ ...values, paraName: values.paraName.trim() })
|
|
210
|
+
? await API.addApi({ ...values, paraName: values.paraName.trim() }) as any
|
|
211
211
|
: await API.editApi({
|
|
212
212
|
paraName: dialogSource.value!.paraName!,
|
|
213
213
|
paraType: values.paraType,
|
|
214
214
|
paraValue: values.paraValue,
|
|
215
215
|
paraDesc: values.paraDesc,
|
|
216
216
|
remark: values.remark,
|
|
217
|
-
})
|
|
217
|
+
}) as any
|
|
218
218
|
if (disposed) return
|
|
219
219
|
ensureSuccess(response, mode === 'create' ? '新增参数失败' : '修改参数失败')
|
|
220
220
|
ElMessage.success(response.head.retMsg?.trim() || (mode === 'create' ? '新增请求成功' : '修改请求成功'))
|
|
@@ -246,7 +246,7 @@ const submitDelete = async () => {
|
|
|
246
246
|
pendingMutation.value = 'delete'
|
|
247
247
|
deleteError.value = ''
|
|
248
248
|
try {
|
|
249
|
-
const response = await API.deleteApi(deleteNames.value)
|
|
249
|
+
const response = await API.deleteApi(deleteNames.value) as any
|
|
250
250
|
if (disposed) return
|
|
251
251
|
ensureSuccess(response, '删除参数失败')
|
|
252
252
|
ElMessage.success(response.head.retMsg?.trim() || '删除请求成功')
|
|
@@ -227,7 +227,7 @@ const submitWriteOff = async () => {
|
|
|
227
227
|
}))
|
|
228
228
|
mutation.value = 'writeOff'
|
|
229
229
|
try {
|
|
230
|
-
ensureSuccess(await API.writeOffApi(tranList.length ? { predList, tranList } : { predList }), '核销提交失败')
|
|
230
|
+
ensureSuccess(await API.writeOffApi(tranList.length ? { predList, tranList } : { predList }) as any, '核销提交失败')
|
|
231
231
|
ElMessage.success('核销请求已提交')
|
|
232
232
|
writeOffVisible.value = false
|
|
233
233
|
await refreshBoth()
|
|
@@ -288,7 +288,7 @@ const cancelWriteOff = async () => {
|
|
|
288
288
|
const payload = predList.length && tranList.length
|
|
289
289
|
? { predList, tranList }
|
|
290
290
|
: predList.length ? { predList } : { tranList }
|
|
291
|
-
ensureSuccess(await API.cancelWriteOffApi(payload), '撤销核销提交失败')
|
|
291
|
+
ensureSuccess(await API.cancelWriteOffApi(payload) as any, '撤销核销提交失败')
|
|
292
292
|
ElMessage.success('撤销核销请求已提交')
|
|
293
293
|
await refreshBoth()
|
|
294
294
|
} catch (error) {
|
|
@@ -406,7 +406,7 @@ const loadForecastList = async () => {
|
|
|
406
406
|
forecastTableRef.value?.getElTable()?.clearSelection()
|
|
407
407
|
try {
|
|
408
408
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
409
|
-
const response = await API.queryForecastApi({ ...query, pageIndex, pageSize })
|
|
409
|
+
const response = await API.queryForecastApi({ ...query, pageIndex, pageSize }) as any
|
|
410
410
|
if (disposed || currentId !== forecastRequestId) return
|
|
411
411
|
const page = readPage<any>(ensureSuccess<any>(response, '核销预报查询失败'), '查询结果缺少预报列表,请联系服务端确认返回数据')
|
|
412
412
|
const lastPage = Math.max(1, Math.ceil(page.total / pageSize))
|
|
@@ -503,7 +503,7 @@ const submitEdit = async () => {
|
|
|
503
503
|
predAmt: editForm.value.predAmt,
|
|
504
504
|
beforeVerifyAmt: editForm.value.beforeVerifyAmt,
|
|
505
505
|
verifyAmt: amount,
|
|
506
|
-
}), '修改提交失败')
|
|
506
|
+
}) as any, '修改提交失败')
|
|
507
507
|
if (disposed) return
|
|
508
508
|
ElMessage.success('修改请求已提交')
|
|
509
509
|
editVisible.value = false
|
|
@@ -614,7 +614,7 @@ const loadFlowList = async () => {
|
|
|
614
614
|
flowTableRef.value?.getElTable()?.clearSelection()
|
|
615
615
|
try {
|
|
616
616
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
617
|
-
const response = await API.queryFlowApi({ ...query, pageIndex, pageSize })
|
|
617
|
+
const response = await API.queryFlowApi({ ...query, pageIndex, pageSize }) as any
|
|
618
618
|
if (disposed || currentId !== flowRequestId) return
|
|
619
619
|
const page = readPage<any>(ensureSuccess<any>(response, '核销流水查询失败'), '查询结果缺少流水列表,请联系服务端确认返回数据')
|
|
620
620
|
const lastPage = Math.max(1, Math.ceil(page.total / pageSize))
|