lanan-repair-app/components/applyCard.vue

133 lines
2.8 KiB
Vue
Raw Normal View History

2024-10-21 22:12:39 +08:00
<template>
2024-10-22 18:29:31 +08:00
<view class="orderCard" @click="viewDetail">
2024-10-21 22:12:39 +08:00
<view class="title">
2024-10-22 18:29:31 +08:00
{{ order.licenseNumber }} 的配件申请
2024-10-21 22:12:39 +08:00
</view>
<view class="desc">
2024-10-22 18:29:31 +08:00
申请时间{{formatTimestamp(order.createTime)}}
2024-10-21 22:12:39 +08:00
</view>
2024-10-22 18:29:31 +08:00
<view class="message red" v-if="order.status=='05'">
<view class="remark">
2024-10-21 22:12:39 +08:00
原因{{ order.remark }}
</view>
</view>
2024-10-22 18:29:31 +08:00
<image v-if="order.status=='05'" class="stateImg" src="@/pages-repair/static/weitongguo.png" ></image>
<image v-if="order.status=='01'" class="stateImg" src="@/pages-repair/static/daishenhe.png" ></image>
<image v-if="order.status=='02'" class="stateImg" src="@/pages-repair/static/yitongguo.png" ></image>
2024-10-21 22:12:39 +08:00
</view>
</template>
<script>
import {
getUserInfo,
getStrData
} from '@/utils/auth';
2024-10-22 18:29:31 +08:00
import {formatTimestamp,getOrderStatusText,builderOrder,saveTicketsRecords} from "@/utils/utils";
2024-10-21 22:12:39 +08:00
import request from '@/utils/request';
export default {
name: "orderCard",
props: {
order: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
}
},
mounted(){
let userInfo = getUserInfo()
if(userInfo.roleCodes.includes("service_advisor") || userInfo.roleCodes.includes("general_inspection") || (userInfo.roleCodes.includes("repair_staff") && getStrData("ifLeader"))){
//服务顾问、总检、维修班组长可以派工
this.roleCanPg = true
}
if(userInfo.roleCodes.includes("service_advisor")){
//服务顾问可以告知取车
this.roleCanQc = true
}
if(userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId==userInfo.id){
//维修工角色,并且指派处理的人就是当前用户可以接单
this.roleCanJd = true
}
},
onLoad(){
},
methods: {
2024-10-22 18:29:31 +08:00
formatTimestamp(value){
return formatTimestamp(value)
},
2024-10-21 22:12:39 +08:00
getFlagColor(flag) {
if (flag == 1) {
return '#E8A321'
} else if (flag === 2) {
return '#999'
}
},
2024-10-22 18:29:31 +08:00
viewDetail(){
this.$emit("childEvent",this.order)
}
2024-10-21 22:12:39 +08:00
}
}
</script>
<style lang="less" scoped>
.message{
padding: 2px 0;
font-size: 15px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
.icon{
width: 28rpx;
height: 28rpx;
margin-left: 10px;
margin-right: 10px;
}
.goto{
font-size: 30px;
margin-right: 10px;
}
}
.red{
background: #FFEFEF;
color: #F92C2C;
}
.orderCard {
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 10px;
margin: 10px 0;
position: relative;
.title {
font-weight: 600;
font-size: 30rpx;
color: #333333;
margin-left: 5px;
2024-10-22 18:29:31 +08:00
}
2024-10-21 22:12:39 +08:00
.desc{
font-size: 28rpx;
color: #858BA0
}
.remark{
margin: 8px;
}
.stateImg{
width: 50px;
height: 50px;
display: block;
right: 0;
top: 0;
position: absolute;
}
}
</style>