136 lines
3.6 KiB
Vue
136 lines
3.6 KiB
Vue
<template>
|
|
<view class="component">
|
|
<view class="layout-price">
|
|
<view class="index-h2" style="padding-bottom: 0;">
|
|
<view class="big">最新询价信息</view>
|
|
<view class="more" @click="listLink">更多</view>
|
|
</view>
|
|
<view class="price-box flex justify-between flex-wrap">
|
|
<view class="w-50p" @click="detailLink(item._id)" v-for="(item, index) in enquirySheetData"
|
|
:key="index">
|
|
<view class="item">
|
|
<view class="price flex justify-start">
|
|
<view class="ing">报价中</view>
|
|
<view class="ed flex-1 p-left-10">{{ item.quoteNum }}家报价</view>
|
|
</view>
|
|
<view class="name text-single">{{ item.title.split(' -')[0] }}</view>
|
|
<view class="name text-single" style="font-size: 24rpx">{{ item.title.split(' -')[1] }}</view>
|
|
<view class="text-single">
|
|
{{
|
|
item.productList.map(product => (product.procureNumber ? product.procureNumber : '') + (product.procureUnit ? product.procureUnit : ''))[0]
|
|
}}
|
|
</view>
|
|
<view class="date">{{ dayjs(item._add_time_str).format('MM/DD HH:mm') }}</view>
|
|
<view class="company text-single">
|
|
<template v-if="item.user">
|
|
<template v-if="item.user.accountType === 1">{{ item.user.person.personName }}
|
|
</template>
|
|
<template v-if="item.user.accountType === 2">{{ item.user.company.companyName }}
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import dayjs from "dayjs";
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
isLogin: false,
|
|
enquirySheetData: []
|
|
}
|
|
},
|
|
methods: {
|
|
dayjs,
|
|
listLink() {
|
|
vk.navigateTo('/pages/price/price')
|
|
},
|
|
detailLink(id) {
|
|
vk.navigateTo(`/pages/price/detail?id=${id}`);
|
|
},
|
|
getEnquirySheetList() {
|
|
vk.callFunction({
|
|
url: 'client/enquiry/sheet/pub/getList',
|
|
loading: false,
|
|
data: {
|
|
pageIndex: 1,
|
|
pageSize: 10,
|
|
latest: true
|
|
},
|
|
success: (data) => {
|
|
this.enquirySheetData = data.rows.map(item => {
|
|
item.fullAddress = ''
|
|
item.fullAddress = (item.addressRegion && item.addressRegion.province) ? `${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name}` : ''
|
|
if (item.addressDetail) item.fullAddress += item.addressDetail
|
|
return item
|
|
})
|
|
}
|
|
});
|
|
},
|
|
},
|
|
mounted() {
|
|
this.getEnquirySheetList()
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.layout-price {
|
|
// width: 690rpx;
|
|
padding: 10rpx 30rpx;
|
|
|
|
.price-box {
|
|
padding: 0;
|
|
height: auto;
|
|
overflow: hidden;
|
|
|
|
.item {
|
|
//width: 100%;
|
|
// min-height: 160rpx;
|
|
padding: 20rpx;
|
|
height: 240rpx;
|
|
margin: 10rpx;
|
|
font-size: 24rpx;
|
|
line-height: 36rpx;
|
|
color: #9a9a9a;
|
|
background: #ffffff;
|
|
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.12);
|
|
|
|
&:nth-last-of-type(1) {
|
|
margin-top: 0;
|
|
}
|
|
|
|
&:nth-last-of-type(2) {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.name {
|
|
padding: 8rpx 0;
|
|
font-size: 28rpx;
|
|
line-height: 35rpx;
|
|
color: #333333;
|
|
}
|
|
|
|
.ing {
|
|
width: 120rpx;
|
|
height: 44rpx;
|
|
padding-left: 6rpx;
|
|
color: #ffffff;
|
|
background: url('~@/static/img/ing.png') center no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.ed {
|
|
color: #A92924;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|