Commit c9c6a82e by 前端

fixed

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