From 06a17c236d4cb9b8da75fce43af938cb7ea510bf Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期一, 15 十二月 2025 09:50:12 +0800
Subject: [PATCH] feat: 优化企业微信判断,优化gps分断处理
---
ruoyi-ui/src/views/task/detail/index.vue | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 103 insertions(+), 1 deletions(-)
diff --git a/ruoyi-ui/src/views/task/detail/index.vue b/ruoyi-ui/src/views/task/detail/index.vue
index 90d608e..801568c 100644
--- a/ruoyi-ui/src/views/task/detail/index.vue
+++ b/ruoyi-ui/src/views/task/detail/index.vue
@@ -28,12 +28,62 @@
<!-- GPS閲岀▼缁熻缁勪欢 -->
<task-mileage-detail v-if="taskInfo.taskId" :task-id="taskInfo.taskId" />
+
+ <!-- 鏀粯淇℃伅鍗$墖 -->
+ <el-card v-if="showPaymentInfo && paymentInfo" class="box-card" style="margin-top: 20px;" shadow="hover">
+ <div slot="header" class="clearfix">
+ <span><i class="el-icon-wallet"></i> 鏀粯淇℃伅</span>
+ </div>
+
+ <el-descriptions :column="2" border>
+ <el-descriptions-item label="鎴愪氦浠�">楼{{ paymentInfo.transferPrice || 0 }}</el-descriptions-item>
+ <el-descriptions-item label="闄勫姞璐圭敤">楼{{ paymentInfo.additionalAmount || 0 }}</el-descriptions-item>
+ <el-descriptions-item label="鎬婚噾棰�">
+ <span style="color: #e54d42; font-weight: bold; font-size: 16px;">楼{{ paymentInfo.totalAmount || 0 }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="鏀粯鐘舵��" v-if="paymentInfo.latestPayment">
+ <el-tag :type="getPaymentStatusType(paymentInfo.latestPayment.payStatus)">
+ {{ getPaymentStatusText(paymentInfo.latestPayment.payStatus) }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="鏀粯鐘舵��" v-else>
+ <el-tag type="info">鏈敮浠�</el-tag>
+ </el-descriptions-item>
+ <template v-if="paymentInfo.latestPayment">
+ <el-descriptions-item label="鏀粯鏂瑰紡">{{ getPaymentMethodText(paymentInfo.latestPayment.paymentMethod) }}</el-descriptions-item>
+ <el-descriptions-item label="缁撶畻閲戦">楼{{ paymentInfo.latestPayment.settlementAmount }}</el-descriptions-item>
+ <el-descriptions-item label="浜ゆ槗鍙�" v-if="paymentInfo.latestPayment.tradeNo">{{ paymentInfo.latestPayment.tradeNo }}</el-descriptions-item>
+ <el-descriptions-item label="鏀粯鏃堕棿" v-if="paymentInfo.latestPayment.payTime">{{ paymentInfo.latestPayment.payTime }}</el-descriptions-item>
+ </template>
+ </el-descriptions>
+
+ <!-- 闄勫姞璐圭敤鏄庣粏 -->
+ <div v-if="paymentInfo.additionalFees && paymentInfo.additionalFees.length > 0" style="margin-top: 20px;">
+ <el-divider content-position="left">闄勫姞璐圭敤鏄庣粏</el-divider>
+ <el-table :data="paymentInfo.additionalFees" border style="width: 100%">
+ <el-table-column prop="feeName" label="璐圭敤鍚嶇О" width="150" />
+ <el-table-column prop="unitAmount" label="鍗曚环" width="100">
+ <template slot-scope="scope">
+ 楼{{ scope.row.unitAmount }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="quantity" label="鏁伴噺" width="80" />
+ <el-table-column prop="totalAmount" label="灏忚" width="100">
+ <template slot-scope="scope">
+ 楼{{ scope.row.totalAmount }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip />
+ </el-table>
+ </div>
+ </el-card>
</div>
</template>
<script>
import TaskMileageDetail from '@/components/TaskMileageDetail'
import { getTask } from '@/api/task'
+import { getPaymentInfo } from '@/api/task'
export default {
name: 'TaskDetail',
@@ -46,6 +96,7 @@
taskId: null,
taskCode: '',
taskStatus: '',
+ taskType: '',
vehicleNo: '',
assigneeName: '',
plannedStartTime: '',
@@ -54,13 +105,16 @@
actualEndTime: '',
departureAddress: '',
destinationAddress: ''
- }
+ },
+ paymentInfo: null,
+ showPaymentInfo: false
}
},
created() {
const taskId = this.$route.params && this.$route.params.taskId
if (taskId) {
this.loadTaskInfo(taskId)
+ this.loadPaymentInfo(taskId)
}
},
methods: {
@@ -68,6 +122,19 @@
loadTaskInfo(taskId) {
getTask(taskId).then(response => {
this.taskInfo = response.data
+ // 鍙湁杞繍浠诲姟鎵嶆樉绀烘敮浠樹俊鎭�
+ this.showPaymentInfo = this.taskInfo.taskType === 'EMERGENCY_TRANSFER'
+ })
+ },
+
+ /** 鍔犺浇鏀粯淇℃伅 */
+ loadPaymentInfo(taskId) {
+ getPaymentInfo(taskId).then(response => {
+ if (response.code === 200) {
+ this.paymentInfo = response.data
+ }
+ }).catch(error => {
+ console.error('鍔犺浇鏀粯淇℃伅澶辫触:', error)
})
},
@@ -100,6 +167,41 @@
'CANCELLED': '宸插彇娑�'
}
return statusMap[status] || status
+ },
+
+ /** 鑾峰彇鏀粯鐘舵�佺被鍨� */
+ getPaymentStatusType(status) {
+ const typeMap = {
+ 'UNPAID': 'info',
+ 'PENDING': 'warning',
+ 'PAID': 'success',
+ 'FAILED': 'danger',
+ 'REFUNDED': 'info'
+ }
+ return typeMap[status] || 'info'
+ },
+
+ /** 鑾峰彇鏀粯鐘舵�佹枃鏈� */
+ getPaymentStatusText(status) {
+ const textMap = {
+ 'UNPAID': '鏈敮浠�',
+ 'PENDING': '鏀粯涓�',
+ 'PAID': '宸叉敮浠�',
+ 'FAILED': '鏀粯澶辫触',
+ 'REFUNDED': '宸查��娆�'
+ }
+ return textMap[status] || status
+ },
+
+ /** 鑾峰彇鏀粯鏂瑰紡鏂囨湰 */
+ getPaymentMethodText(method) {
+ const methodMap = {
+ 'CASH': '鐜伴噾鏀粯',
+ 'ON_ACCOUNT': '鎸傝处鏀粯',
+ 'WECHAT': '寰俊鏀粯',
+ 'ALIPAY': '鏀粯瀹濇敮浠�'
+ }
+ return methodMap[method] || method
}
}
}
--
Gitblit v1.9.1