|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
- <uni-navbar-lite :showLeft="true" title="工分复评">
|
|
|
+ <uni-navbar-lite :showLeft="true" title="工单复评">
|
|
|
<view class="back-icon" slot="left" @click="goBack">
|
|
|
- <text class="iconfont icon-back">工分复评</text>
|
|
|
+ <text class="iconfont icon-back">{{ orderType == '1' ? '维修工单复评' : '维保工单复评' }}</text>
|
|
|
</view>
|
|
|
</uni-navbar-lite>
|
|
|
|
|
|
<scroll-view class="container" :scroll-y="true">
|
|
|
<view class="header">
|
|
|
- <text class="title">工分复评</text>
|
|
|
+ <text class="title"></text>
|
|
|
</view>
|
|
|
|
|
|
<view class="form">
|
|
|
@@ -1057,7 +1057,7 @@ async function loadMaintenanceTypes() {
|
|
|
}
|
|
|
maintenanceTypeOptions.value = options
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
const msg = resultObj.get('msg') as string | null
|
|
|
console.error('加载检修类型失败:', msg ?? '未知错误')
|
|
|
}
|
|
|
@@ -1678,10 +1678,14 @@ async function submitReEvaluationForm(): Promise<void> {
|
|
|
console.log('验证结果:', isValid, '消息:', validationMsg);
|
|
|
if (!isValid) {
|
|
|
console.log('验证失败,显示错误:', validationMsg);
|
|
|
- uni.showToast({
|
|
|
- title: validationMsg,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
+
|
|
|
+ // 在iOS平台中,有时需要稍作延迟才能正确显示toast
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.showToast({
|
|
|
+ title: validationMsg,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }, 50);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1760,8 +1764,14 @@ async function submitReEvaluationForm(): Promise<void> {
|
|
|
}
|
|
|
} catch (error: any) {
|
|
|
console.error('提交复评失败:', error)
|
|
|
+ let msg: string | null = null
|
|
|
+ if (error instanceof Error) {
|
|
|
+ msg = error.message
|
|
|
+ } else if (error instanceof UTSJSONObject && error.get('message') != null) {
|
|
|
+ msg = error.get('message') as string | null
|
|
|
+ }
|
|
|
uni.showToast({
|
|
|
- title: '提交失败',
|
|
|
+ title: msg ?? '提交失败',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
} finally {
|