Commit 6b69c2dc by zhangxw

fix(venus-usedcar-quality): 线索录入/详情

1 parent c59498b0
Pipeline #219 for 6b69c2dc failed in 0 seconds
......@@ -22,15 +22,36 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
SelectDatePicker: typeof import('./components/CustomizeForm/selectDatePicker.vue')['default']
SelectDropdown: typeof import('./components/CustomizeForm/selectDropdown.vue')['default']
VanActionSheet: typeof import('vant/es')['ActionSheet']
VanButton: typeof import('vant/es')['Button']
VanCell: typeof import('vant/es')['Cell']
VanDatePicker: typeof import('vant/es')['DatePicker']
VanDialog: typeof import('vant/es')['Dialog']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanNavBar: typeof import('vant/es')['NavBar']
VanImage: typeof import('vant/es')['Image']
VanImagePreview: typeof import('vant/es')['ImagePreview']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanOverlay: typeof import('vant/es')['Overlay']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
VanProgress: typeof import('vant/es')['Progress']
VanPullRefresh: typeof import('vant/es')['PullRefresh']
VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanSearch: typeof import('vant/es')['Search']
VanSkeleton: typeof import('vant/es')['Skeleton']
VanSlider: typeof import('vant/es')['Slider']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
VanTag: typeof import('vant/es')['Tag']
VanUploader: typeof import('vant/es')['Uploader']
WorkOrderStatusTags: typeof import('./components/WorkOrderStatusTags.vue')['default']
}
}
......@@ -159,12 +159,13 @@ function onCancel() {
.level-option__check {
position: absolute;
top: 14px;
top: 50%;
right: 0;
flex-shrink: 0;
width: 18px;
font-size: 18px;
color: #347BFF;
transform: translateY(-50%);
}
.level-picker__footer {
......
......@@ -80,7 +80,10 @@ async function loadClueDetail() {
try {
// TODO: 对接后端接口获取线索详情
const res = await getClueDetailApi({ id: cluesId.value });
console.log("loadClueDetail res", res);
res.data.cluesStatusName = getCluesStatusName(res.data.cluesStatus);
res.data.statusClass = getStatusClass(res.data.cluesStatus);
res.data.isExpiring = res.data.followTimeStatus == 1;
res.data.isOverdue = res.data.followTimeStatus == 2;
res.data.vehicleText = `${res.data.carBrand}-${res.data.carChildsBrandName}-${res.data.carSeriesName}-${res.data.carTypeName}`;
clueDetail.value = res.data || {};
} catch (error) {
......@@ -155,6 +158,32 @@ async function loadFollowList() {
}
}
/**
* 获取线索状态名称
*/
function getCluesStatusName(status) {
const statusMap = {
1: "待跟进",
2: "跟进中",
3: "暂败",
4: "成功收车"
};
return statusMap[status] || "-";
}
/**
* 获取状态样式类
*/
function getStatusClass(status) {
const classMap = {
1: "status-pending",
2: "status-following",
3: "status-failed",
4: "status-success"
};
return classMap[status] || "";
}
function onAddFollow() {
if (isSalesReadonly.value) return;
// 关闭当前webview页面,跳转到小程序跟进页面
......@@ -209,16 +238,20 @@ function onBack() {
<div class="info-card">
<div class="info-card__header">
<span class="info-card__title">线索信息</span>
<div class="info-card__tags">
<span v-for="tag in clueDetail?.tags"
:key="tag"
class="info-tag"
:class="{
'tag-warning': tag === '临期',
'tag-success': tag === '跟进中',
}">
{{ tag }}
</span>
<div class="status-wrap">
<div v-if="clueDetail?.isExpiring" class="expiring-tag">
<img class="icon"
mode=""
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/alarm-clock.png" />
临期
</div>
<div v-if="clueDetail?.isOverdue" class="overdue-tag">
<van-icon color="#F24724" name="warning-o" />
已超期
</div>
<div class="status-tag" :class="[clueDetail?.statusClass]">
{{ clueDetail?.cluesStatusName }}
</div>
</div>
</div>
<div class="info-list">
......@@ -429,6 +462,76 @@ function onBack() {
border-radius: 4px;
}
.status-wrap {
display: flex;
gap: 6px;
align-items: center;
}
.status-tag {
padding: 3px 6px;
font-size: 12px;
line-height: 17px;
border-radius: 4px;
}
.status-following {
color: #22C55E;
background: #E8F5E9;
}
.status-pending {
color: #007AFF;
background: #007AFF14;
}
.status-failed {
color: #F24724;
background: #F247241A;
}
.status-success {
color: #7A66FE;
background: #7A66FE14;
}
.expiring-tag {
display: flex;
gap: 2px;
align-items: center;
padding: 2px 6px;
font-size: 12px;
color: #FF9800;
border-radius: 2px;
.icon {
width: 12px;
height: 12px;
}
}
.overdue-tag {
display: flex;
gap: 2px;
align-items: center;
padding: 2px 6px;
font-size: 12px;
color: #EF5350;
border-radius: 2px;
.overdue-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 10px;
height: 10px;
font-size: 8px;
color: #fff;
background: #EF5350;
border-radius: 50%;
}
}
.info-tag.tag-warning {
color: #ff9d0a;
background: #fff7e8;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!