|
@@ -561,7 +561,7 @@ export default {
|
|
|
try {
|
|
try {
|
|
|
const res = await listAllService()
|
|
const res = await listAllService()
|
|
|
this.serviceList = res.data || []
|
|
this.serviceList = res.data || []
|
|
|
- } catch (err) { console.error('获取服务类型失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取服务类型失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
loadServiceDetail(serviceId) {
|
|
loadServiceDetail(serviceId) {
|
|
|
const serviceInfo = (this.serviceList || []).find(s => s.id === serviceId)
|
|
const serviceInfo = (this.serviceList || []).find(s => s.id === serviceId)
|
|
@@ -610,7 +610,7 @@ export default {
|
|
|
this.currentStep = stepIndex >= 0 ? stepIndex + 1 : Number(latestStep)
|
|
this.currentStep = stepIndex >= 0 ? stepIndex + 1 : Number(latestStep)
|
|
|
} else { this.currentStep = 0 }
|
|
} else { this.currentStep = 0 }
|
|
|
this.updateCurrentClockIn()
|
|
this.updateCurrentClockIn()
|
|
|
- } catch (err) { console.error('获取订单日志失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取订单日志失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
updateCurrentClockIn() {
|
|
updateCurrentClockIn() {
|
|
|
this.currentClockIn = this.currentStep < this.clockInSteps.length ? this.clockInSteps[this.currentStep] : null
|
|
this.currentClockIn = this.currentStep < this.clockInSteps.length ? this.clockInSteps[this.currentStep] : null
|
|
@@ -622,7 +622,7 @@ export default {
|
|
|
this.orderStatus = order.status || 2
|
|
this.orderStatus = order.status || 2
|
|
|
this.orderDetail = {
|
|
this.orderDetail = {
|
|
|
type: this.orderType,
|
|
type: this.orderType,
|
|
|
- fulfillmentCommission: (order.price / 100).toFixed(2),
|
|
|
|
|
|
|
+ fulfillmentCommission: (order.fulfillmentCommission / 100).toFixed(2),
|
|
|
timeLabel: isRoundTrip ? '取货时间' : '服务时间',
|
|
timeLabel: isRoundTrip ? '取货时间' : '服务时间',
|
|
|
time: order.serviceTime || '',
|
|
time: order.serviceTime || '',
|
|
|
petAvatar: '/static/dog.png',
|
|
petAvatar: '/static/dog.png',
|
|
@@ -659,7 +659,7 @@ export default {
|
|
|
this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed
|
|
this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed
|
|
|
this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName
|
|
this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName
|
|
|
}
|
|
}
|
|
|
- } catch (err) { console.error('获取宠物档案失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取宠物档案失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
async loadAnomalyList() {
|
|
async loadAnomalyList() {
|
|
|
if (!this.orderId) return
|
|
if (!this.orderId) return
|
|
@@ -670,13 +670,13 @@ export default {
|
|
|
const dict = this.anomalyTypeDict.find(d => d.value === item.type)
|
|
const dict = this.anomalyTypeDict.find(d => d.value === item.type)
|
|
|
return { ...item, typeLabel: dict ? dict.label : item.type, photoUrls: item.photoUrls || [] }
|
|
return { ...item, typeLabel: dict ? dict.label : item.type, photoUrls: item.photoUrls || [] }
|
|
|
})
|
|
})
|
|
|
- } catch (err) { console.error('获取异常列表失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取异常列表失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
async loadAnomalyTypeDict() {
|
|
async loadAnomalyTypeDict() {
|
|
|
try {
|
|
try {
|
|
|
const res = await getDictDataByType('flf_anamaly_type')
|
|
const res = await getDictDataByType('flf_anamaly_type')
|
|
|
this.anomalyTypeDict = res.data.map(item => ({ label: item.dictLabel, value: item.dictValue }))
|
|
this.anomalyTypeDict = res.data.map(item => ({ label: item.dictLabel, value: item.dictValue }))
|
|
|
- } catch (err) { console.error('获取异常字典失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取异常字典失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
openAnomalyModal() { this.showAnomalyModal = true; this.loadAnomalyList() },
|
|
openAnomalyModal() { this.showAnomalyModal = true; this.loadAnomalyList() },
|
|
|
closeAnomalyModal() { this.showAnomalyModal = false },
|
|
closeAnomalyModal() { this.showAnomalyModal = false },
|
|
@@ -717,7 +717,7 @@ export default {
|
|
|
this.currentPetInfo.petLogs = logs.map(item => ({
|
|
this.currentPetInfo.petLogs = logs.map(item => ({
|
|
|
date: item.createTime || '', content: item.content || '', recorder: item.operatorName || '未知'
|
|
date: item.createTime || '', content: item.content || '', recorder: item.operatorName || '未知'
|
|
|
}))
|
|
}))
|
|
|
- } catch (err) { console.error('获取宠物备注列表失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { console.error('获取宠物备注列表失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
closePetProfile() { this.showPetModal = false },
|
|
closePetProfile() { this.showPetModal = false },
|
|
|
openPetRemarkInput() { this.petRemarkText = ''; this.showPetRemarkInput = true },
|
|
openPetRemarkInput() { this.petRemarkText = ''; this.showPetRemarkInput = true },
|
|
@@ -730,7 +730,7 @@ export default {
|
|
|
await apiSubmitPetRemark({ petId: this.petId, content: this.petRemarkText });
|
|
await apiSubmitPetRemark({ petId: this.petId, content: this.petRemarkText });
|
|
|
uni.hideLoading(); uni.showToast({ title: '备注已添加', icon: 'success' });
|
|
uni.hideLoading(); uni.showToast({ title: '备注已添加', icon: 'success' });
|
|
|
this.closePetRemarkInput(); this.loadPetChangeLogs(this.petId);
|
|
this.closePetRemarkInput(); this.loadPetChangeLogs(this.petId);
|
|
|
- } catch (err) { uni.hideLoading(); console.error('提交宠物备注失败:', err) }
|
|
|
|
|
|
|
+ } catch (err) { uni.hideLoading(); console.error('提交宠物备注失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
|
|
|
},
|
|
},
|
|
|
goToAnomaly() {
|
|
goToAnomaly() {
|
|
|
uni.navigateTo({ url: '/pages/orders/anomaly/index?orderId=' + (this.orderId || '') });
|
|
uni.navigateTo({ url: '/pages/orders/anomaly/index?orderId=' + (this.orderId || '') });
|
|
@@ -775,7 +775,7 @@ export default {
|
|
|
uni.showLoading({ title: '获取当前位置...', mask: true });
|
|
uni.showLoading({ title: '获取当前位置...', mask: true });
|
|
|
reportGps(true).then(res => {
|
|
reportGps(true).then(res => {
|
|
|
uni.hideLoading(); navigateTo(res.latitude, res.longitude, name, address);
|
|
uni.hideLoading(); navigateTo(res.latitude, res.longitude, name, address);
|
|
|
- }).catch(err => { uni.hideLoading(); console.error('获取地理位置失败:', err) });
|
|
|
|
|
|
|
+ }).catch(err => { uni.hideLoading(); console.error('获取地理位置失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
openUploadModal() { this.modalMediaList = []; this.modalRemark = ''; this.showUploadModal = true },
|
|
openUploadModal() { this.modalMediaList = []; this.modalRemark = ''; this.showUploadModal = true },
|