工单详情
This commit is contained in:
parent
8b67ac8731
commit
93402088cd
|
|
@ -1,5 +1,5 @@
|
||||||
import { get, post, put, del } from '../utils/request';
|
import { get, post, put, del } from '../utils/request';
|
||||||
|
|
||||||
export const ticketPoolList = (data : any = {}) => get('v1/ticket/pool/list', data);
|
export const ticketPoolList = (data : any = {}) => get('v1/ticket/pool/list', data);
|
||||||
|
export const ticketPoolInfo = (data : any = {}) => get('v1/ticket/pool/info', data);
|
||||||
// export const bannerList = (data : any = {}) => get('v2/banner/list', data);
|
// export const bannerList = (data : any = {}) => get('v2/banner/list', data);
|
||||||
|
|
@ -22,14 +22,14 @@
|
||||||
<view class="li-mb-20">
|
<view class="li-mb-20">
|
||||||
<view class="li-flex li-items-center li-text-#5f5f5f li-pl-20 li-pt-20 li-text-28 li-mb-12">
|
<view class="li-flex li-items-center li-text-#5f5f5f li-pl-20 li-pt-20 li-text-28 li-mb-12">
|
||||||
<text class="ri-todo-line li-mr-3"></text>
|
<text class="ri-todo-line li-mr-3"></text>
|
||||||
<text>JD2424234324325</text>
|
<text>{{ticketInfo.ticket_no}}</text>
|
||||||
<text class="ri-file-copy-line li-text-#009aff li-ml-15"></text>
|
<text class="ri-file-copy-line li-text-#009aff li-ml-15"></text>
|
||||||
</view>
|
</view>
|
||||||
<text class="li-pl-20 li-text-28 li-text-#5f5f5f">创建时间: 2025-07-09</text>
|
<text class="li-pl-20 li-text-28 li-text-#5f5f5f">创建时间: {{ticketInfo.create_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-text-28 !li-rd-bl-50 li-px-40 li-py-6"
|
<view class="li-text-28 !li-rd-bl-50 li-px-40 li-py-6"
|
||||||
:style="{ color: getStatusColor(1), backgroundColor: getStatusBgColor(1) }">
|
:style="{ color: getStatusColor(ticketInfo.status), backgroundColor: getStatusBgColor(ticketInfo.status) }">
|
||||||
{{getStatusText(1)}}
|
{{getStatusText(ticketInfo.status)}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-flex li-items-start li-pt-20 li-pl-20">
|
<view class="li-flex li-items-start li-pt-20 li-pl-20">
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
<!-- <text class="ri-close-circle-fill li-text-#ff0000"></text> -->
|
<!-- <text class="ri-close-circle-fill li-text-#ff0000"></text> -->
|
||||||
<text class="ri-error-warning-fill li-text-#ff9d00 li-mr-12 li-text-40 li-pt-2"></text>
|
<text class="ri-error-warning-fill li-text-#ff9d00 li-mr-12 li-text-40 li-pt-2"></text>
|
||||||
<view class="li-flex li-flex-col">
|
<view class="li-flex li-flex-col">
|
||||||
<text class="li-text-32">{{getStatusText(1)}}</text>
|
<text class="li-text-32">{{getStatusText(ticketInfo.status)}}</text>
|
||||||
<text class="li-text-28">工单待处理,点击按钮确认接单</text>
|
<text class="li-text-28">工单待处理,点击按钮确认接单</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||||
<text class="li-w-150 li-text-#9a9a9a">业主姓名</text>
|
<text class="li-w-150 li-text-#9a9a9a">业主姓名</text>
|
||||||
<text class="li-w-400 li-single-line li-text-right">邓大仙儿</text>
|
<text class="li-w-400 li-single-line li-text-right">{{ticketInfo.order.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||||
|
|
@ -58,19 +58,41 @@
|
||||||
<!-- 右侧内容 -->
|
<!-- 右侧内容 -->
|
||||||
<view class="li-flex li-items-center">
|
<view class="li-flex li-items-center">
|
||||||
<text class="ri-phone-line li-text-#009aff li-mr-6"></text>
|
<text class="ri-phone-line li-text-#009aff li-mr-6"></text>
|
||||||
<text>177****4485</text>
|
<text>{{ticketInfo.order.mobile}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">上门地址</text>
|
||||||
|
<text class="li-w-400 li-two-line li-text-right">{{ticketInfo.order.region_name}}{{ticketInfo.order.cell_name}}{{ticketInfo.order.house_name}}{{ticketInfo.order.address}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">预约时间</text>
|
||||||
|
<text class="li-w-400 li-two-line li-text-right">{{ticketInfo.order.appoint_date}} {{ticketInfo.order.appoint_time}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">建筑面积</text>
|
||||||
|
<text class="li-w-400 li-two-line li-text-right">{{ticketInfo.order.building_area}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">订单状态</text>
|
||||||
|
<text v-if="ticketInfo.order.status == 0" class="li-w-400 li-two-line li-text-right">已提交</text>
|
||||||
|
<text v-if="ticketInfo.order.status == 1" class="li-w-400 li-two-line li-text-right">已完成</text>
|
||||||
|
<text v-if="ticketInfo.order.status == 2" class="li-w-400 li-two-line li-text-right">已取消</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">上传照片</text>
|
||||||
|
<text class="li-w-400 li-two-line li-text-right">{{ticketInfo.order.images}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F2'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
<text class="li-w-150 li-text-#9a9a9a">配送地址</text>
|
<text class="li-w-150 li-text-#9a9a9a">配送地址</text>
|
||||||
<text class="li-w-400 li-two-line li-text-right">中金北区17号楼一单元201室号</text>
|
<text class="li-w-400 li-two-line li-text-right">中金北区17号楼一单元201室号</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
<view v-if="ticketInfo.type =='F2'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
<text class="li-w-150 li-text-#9a9a9a">商品备注</text>
|
<text class="li-w-150 li-text-#9a9a9a">商品备注</text>
|
||||||
<text class="li-w-400 li-two-line li-text-right">放在门口即可</text>
|
<text class="li-w-400 li-two-line li-text-right">放在门口即可</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
<view v-if="ticketInfo.type =='F3'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
<text class="li-w-150 li-text-#9a9a9a">商品信息</text>
|
<text class="li-w-150 li-text-#9a9a9a">商品信息</text>
|
||||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||||
<text class="li-two-line li-text-right">燕京 8度U8 500ML*12瓶/箱*2 送燕京9度菊花听500ML*12听</text>
|
<text class="li-two-line li-text-right">燕京 8度U8 500ML*12瓶/箱*2 送燕京9度菊花听500ML*12听</text>
|
||||||
|
|
@ -88,6 +110,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="ticketInfo.type =='F4'" class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||||
|
<text class="li-w-150 li-text-#9a9a9a">订单备注</text>
|
||||||
|
<text class="li-w-400 li-two-line li-text-right">{{ticketInfo.order.remark}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-w-85% li-mx-auto li-mt-90">
|
<view class="li-w-85% li-mx-auto li-mt-90">
|
||||||
|
|
@ -100,6 +126,7 @@
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { useNavigation } from '@/hooks/useNavigation'
|
import { useNavigation } from '@/hooks/useNavigation'
|
||||||
|
import {ticketPoolInfo} from '@/api/ticket'
|
||||||
// 使用导航 composable
|
// 使用导航 composable
|
||||||
const {
|
const {
|
||||||
hasMultiplePages, // 是否有多个页面在路由栈中
|
hasMultiplePages, // 是否有多个页面在路由栈中
|
||||||
|
|
@ -113,10 +140,10 @@
|
||||||
// 状态颜色配置
|
// 状态颜色配置
|
||||||
const getStatusColor = (status : number) => {
|
const getStatusColor = (status : number) => {
|
||||||
const colorMap = {
|
const colorMap = {
|
||||||
1: '#ff9d00', // 待配送
|
0: '#ff9d00', // 待配送
|
||||||
|
1: '#37A5FF', // 未入库
|
||||||
2: '#00b42a', // 已完成
|
2: '#00b42a', // 已完成
|
||||||
3: '#37A5FF', // 未入库
|
3: '#F42429' // 已取消
|
||||||
4: '#F42429' // 已取消
|
|
||||||
}
|
}
|
||||||
return colorMap[status] || '#666666'
|
return colorMap[status] || '#666666'
|
||||||
}
|
}
|
||||||
|
|
@ -124,10 +151,10 @@
|
||||||
// 状态背景色配置
|
// 状态背景色配置
|
||||||
const getStatusBgColor = (status : number) => {
|
const getStatusBgColor = (status : number) => {
|
||||||
const bgColorMap = {
|
const bgColorMap = {
|
||||||
1: '#fff6e9', // 待配送
|
0: '#fff6e9', // 待配送
|
||||||
|
1: '#e8f4ff', // 未入库
|
||||||
2: '#e8ffea', // 已完成
|
2: '#e8ffea', // 已完成
|
||||||
3: '#e8f4ff', // 未入库
|
3: '#ffe8e8' // 已取消
|
||||||
4: '#ffe8e8' // 已取消
|
|
||||||
}
|
}
|
||||||
return bgColorMap[status] || '#f5f5f5'
|
return bgColorMap[status] || '#f5f5f5'
|
||||||
}
|
}
|
||||||
|
|
@ -135,15 +162,15 @@
|
||||||
// 状态文字配置
|
// 状态文字配置
|
||||||
const getStatusText = (status : number) => {
|
const getStatusText = (status : number) => {
|
||||||
const textMap = {
|
const textMap = {
|
||||||
1: '待配送',
|
0: '待接单',
|
||||||
|
1: '已派单',
|
||||||
2: '已完成',
|
2: '已完成',
|
||||||
3: '未入库',
|
3: '已取消'
|
||||||
4: '已取消'
|
|
||||||
}
|
}
|
||||||
return textMap[status] || '未知状态'
|
return textMap[status] || '未知状态'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ticketInfo = ref()
|
||||||
|
|
||||||
const toPages = (item : any) => {
|
const toPages = (item : any) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
|
|
@ -167,6 +194,15 @@
|
||||||
const handleAction = (action : string) => {
|
const handleAction = (action : string) => {
|
||||||
console.log(action);
|
console.log(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad((q)=>{
|
||||||
|
loadInfo(q.ticket_id)
|
||||||
|
})
|
||||||
|
|
||||||
|
const loadInfo = async (ticket_id: any) => {
|
||||||
|
const res = await ticketPoolInfo({ticket_id: ticket_id})
|
||||||
|
ticketInfo.value = res.data
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
<view v-if="item.type == 'F4'" class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
||||||
|
<text class="li-text-#9a9a9a">预约时间</text>
|
||||||
|
<text>{{item.order.appoint_date}} {{item.order.appoint_time}}</text>
|
||||||
|
</view>
|
||||||
<view class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
<view class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
||||||
<text class="li-text-#9a9a9a">上门地址</text>
|
<text class="li-text-#9a9a9a">上门地址</text>
|
||||||
<text>{{item.order.region_name}}{{item.order.cell_name}}{{item.order.house_name}}{{item.order.address}}</text>
|
<text>{{item.order.region_name}}{{item.order.cell_name}}{{item.order.house_name}}{{item.order.address}}</text>
|
||||||
|
|
@ -39,6 +43,10 @@
|
||||||
<text class="li-text-#9a9a9a">联系方式</text>
|
<text class="li-text-#9a9a9a">联系方式</text>
|
||||||
<text>{{item.order.mobile}}</text>
|
<text>{{item.order.mobile}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
||||||
|
<text class="li-text-#9a9a9a">创建时间</text>
|
||||||
|
<text>{{item.create_time}}</text>
|
||||||
|
</view>
|
||||||
<view v-if="item.type==2" class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
<view v-if="item.type==2" class="li-flex li-items-center li-justify-between li-text-26 li-mt-20">
|
||||||
<text class="li-text-#9a9a9a">维修类型</text>
|
<text class="li-text-#9a9a9a">维修类型</text>
|
||||||
<wd-tag custom-class="space" v-if="item.RepairType==1" color="#0083ff"
|
<wd-tag custom-class="space" v-if="item.RepairType==1" color="#0083ff"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue