Commit c9c6a82e by 前端

fixed

1 parent e2d663a8
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
{{ item.customerName.substring(0, 1) + "*" || "-" }} {{ item.customerName.substring(0, 1) + "*" || "-" }}
</view> </view>
<view class="goods-name flex"> <view class="goods-name flex">
{{ <view class="goods-label">{{
item.goodsList.length item.goodsList.length
? item.goodsList[0].goodsName ? item.goodsList[0].goodsName
: "-" : "-"
}} }}</view>
X{{ item.goodsList.length }}件 X{{ item.goodsList.length }}件
<image <image
v-if="item.goodsList.length > 1" v-if="item.goodsList.length > 1"
...@@ -383,6 +383,13 @@ export default { ...@@ -383,6 +383,13 @@ export default {
height: 40rpx; height: 40rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
.goods-label {
max-width: calc(100% - 180rpx);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 10rpx;
}
} }
.image-box { .image-box {
width: 350rpx; width: 350rpx;
......
...@@ -19,6 +19,14 @@ ...@@ -19,6 +19,14 @@
size="20" size="20"
></uni-icons ></uni-icons
></view> ></view>
<uni-icons
v-if="isSearch"
type="closeempty"
class="close"
color="#999"
@click="handleClear"
size="20"
></uni-icons>
</view> </view>
<scroll-view <scroll-view
...@@ -122,7 +130,7 @@ export default { ...@@ -122,7 +130,7 @@ export default {
methods: { methods: {
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约 //已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
formatInvite(val) { formatInvite(val) {
if(val.inviteStatus == 2 && new Date().getTime() > new Date(val.receiveCouponDate).getTime()) { if(val.inviteStatus == 2 && new Date().getTime() > new Date(val.inviteDate).getTime()) {
return 5 return 5
} }
return val.inviteStatus return val.inviteStatus
...@@ -146,7 +154,7 @@ export default { ...@@ -146,7 +154,7 @@ export default {
this.customerNameOrPhone = e.detail.value this.customerNameOrPhone = e.detail.value
if (this.customerNameOrPhone == '') if (this.customerNameOrPhone == '')
this.isSearch = false this.isSearch = false
this.pageNum = 1 this.pageNum = 1
this.flag = false this.flag = false
this.getRecordList() this.getRecordList()
}, },
...@@ -154,6 +162,12 @@ export default { ...@@ -154,6 +162,12 @@ export default {
this.isSearch = true this.isSearch = true
}, },
handleClear() {
this.isSearch = false
this.customerNameOrPhone = ''
this.pageNum = 1
this.getRecordList()
},
getRecordList () { getRecordList () {
const { pageNum, pageSize, customerNameOrPhone } = this, const { pageNum, pageSize, customerNameOrPhone } = this,
userInfo = uni.$storage.get("userInfo"), userInfo = uni.$storage.get("userInfo"),
...@@ -252,6 +266,16 @@ export default { ...@@ -252,6 +266,16 @@ export default {
margin-left: 12rpx; margin-left: 12rpx;
} }
} }
.close {
position: absolute;
right: 0;
top: 0;
width: 120rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
} }
.record-box { .record-box {
height: calc(100vh - 300rpx); height: calc(100vh - 300rpx);
......
...@@ -4,31 +4,27 @@ ...@@ -4,31 +4,27 @@
<image src="../../../assets/images/media/bg-6.webp" /> <image src="../../../assets/images/media/bg-6.webp" />
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{title||'历史成交记录'}}</view> <view class="title">{{ title || "历史成交记录" }}</view>
<template v-if="list.length && shopMerchantId"> <template v-if="list.length && shopMerchantId">
<Tabs <Tabs :list="list" @tabclick="tabclick" ref="tabs" />
:list="list"
@tabclick="tabclick"
ref="tabs"
/>
</template> </template>
<view class="card-list"> <view class="card-list">
<template v-if="historyList.length > 0"> <template v-if="historyList.length > 0">
<view <view class="card-item" v-for="item in historyList" :key="item.id">
class="card-item" <view class="name"
v-for="item in historyList" >{{ nameHide(item.customerName) }}
:key="item.id"
>
<view class="name">{{ nameHide(item.customerName) }}
<view <view
v-if="item.ownerGender" v-if="item.ownerGender"
:class="['sex-avatar sprite-icon',`icon-${sexType[item.ownerGender]}`]" :class="[
'sex-avatar sprite-icon',
`icon-${sexType[item.ownerGender]}`,
]"
></view> ></view>
</view> </view>
<view class="goods-name">{{ item.goodsName }}</view> <view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info"> <view class="card-info">
<view>车架号</view> <view>车架号</view>
<view>{{ item.carVin || '-' }}</view> <view>{{ item.carVin || "-" }}</view>
</view> </view>
<view class="card-info"> <view class="card-info">
<view>工单号</view> <view>工单号</view>
...@@ -44,7 +40,12 @@ ...@@ -44,7 +40,12 @@
</view> </view>
<view class="card-info"> <view class="card-info">
<view>支付方式</view> <view>支付方式</view>
<view :class="['pay-type sprite-icon',`icon-${payType[item.payType]}`]"></view> <view
:class="[
'pay-type sprite-icon',
`icon-${payType[item.payType]}`,
]"
></view>
</view> </view>
<view class="card-info"> <view class="card-info">
<view>实收金额</view> <view>实收金额</view>
...@@ -68,10 +69,9 @@ ...@@ -68,10 +69,9 @@
<!-- </uni-grid-item> <!-- </uni-grid-item>
</uni-grid> --> </uni-grid> -->
</view> </view>
<view <view class="end-text" v-if="historyList.length > 0 && isEnd"
class="end-text" >我是一个有底线的人</view
v-if="historyList.length > 0 && isEnd" >
>我是一个有底线的人</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -263,6 +263,9 @@ export default { ...@@ -263,6 +263,9 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #2c66f7; color: #2c66f7;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.card-info { .card-info {
display: flex; display: flex;
......
...@@ -8,28 +8,22 @@ ...@@ -8,28 +8,22 @@
<view class="record-content"> <view class="record-content">
<view class="data-box"> <view class="data-box">
<template v-for="(i, index) in dataList"> <template v-for="(i, index) in dataList">
<view <view :class="['data-item', i.type]" :key="index">
:class="['data-item', i.type]" <image :src="i.icon" class="data-item-bg" />
:key="index" <view class="title">{{ dateList[index].text }}</view>
>
<image
:src="i.icon"
class="data-item-bg"
/>
<view class="title">{{dateList[index].text}}</view>
<view class="content"> <view class="content">
<view class="total"> <view class="total">
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="num-box"> <view class="num-box">
<view class="num">{{ i.count == null ? '-' : i.count }}</view> <view class="num">{{ i.count == null ? "-" : i.count }}</view>
</view> </view>
</view> </view>
<view class="duration"> <view class="duration">
<view class="label">平均接待时长</view> <view class="label">平均接待时长</view>
<view class="num-box"> <view class="num-box">
<view class="num">{{ i.minutes || '-' }}</view> <view class="num">{{ i.minutes || "-" }}</view>
<view class="unit">分</view> <view class="unit">分</view>
<view class="num"> {{ i.seconds || '-' }}</view> <view class="num"> {{ i.seconds || "-" }}</view>
<view class="unit">秒</view> <view class="unit">秒</view>
</view> </view>
</view> </view>
...@@ -37,14 +31,15 @@ ...@@ -37,14 +31,15 @@
</view> </view>
</template> </template>
</view> </view>
<view :class="['data-tabs-box', {sticky:sticky} ]"> <view :class="['data-tabs-box', { sticky: sticky }]">
<view class="data-tabs"> <view class="data-tabs">
<template v-for="(i, index) in dateList"> <template v-for="(i, index) in dateList">
<view <view
:class="['tab flex', { active: dateIndex == index }]" :class="['tab flex', { active: dateIndex == index }]"
:key="index" :key="index"
@click="changeIndex(index)" @click="changeIndex(index)"
>{{ i.text }}</view> >{{ i.text }}</view
>
</template> </template>
<view :class="['active-btn', `active-btn-${dateIndex}`]"></view> <view :class="['active-btn', `active-btn-${dateIndex}`]"></view>
</view> </view>
...@@ -54,27 +49,27 @@ ...@@ -54,27 +49,27 @@
<template v-if="list.length && list[0] && list[0].length"> <template v-if="list.length && list[0] && list[0].length">
<template v-for="i in list"> <template v-for="i in list">
<template v-for="item in i"> <template v-for="item in i">
<view <view class="item" :key="item.id">
class="item" <view
:key="item.id" :class="[
> 'status flex',
<view :class="['status flex', { deal: item.receptionStatus == 1 }]">{{ { deal: item.receptionStatus == 1 },
{ ]"
1: '成交', >{{
0: '战败', {
}[item.receptionStatus] 1: "成交",
}}</view> 0: "战败",
}[item.receptionStatus]
}}</view
>
<view class="name"> <view class="name">
{{ item.customerName }} {{ item.customerName }}
</view> </view>
<view class="goods-name">{{ item.carModel || '-'}}</view> <view class="goods-name">{{ item.carModel }}</view>
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view <view class="info flex" :key="ind">
class="info flex"
:key="ind"
>
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view class="value">{{ item[k.key] || '-' }}</view> <view class="value">{{ item[k.key] || "-" }}</view>
</view> </view>
</template> </template>
</view> </view>
...@@ -257,7 +252,6 @@ export default { ...@@ -257,7 +252,6 @@ export default {
this.pageNum = 1 this.pageNum = 1
this.dateIndex = index this.dateIndex = index
this.getReceptionList() this.getReceptionList()
this.getReceptionStatistics(0)
}, },
pageonReachBottom () { pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this let { pageNum, total, nothing, pageSize } = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!