|
|
|
@ -1,40 +1,45 @@ |
|
|
|
<template> |
|
|
|
<view class="quotation-list"> |
|
|
|
<scroll-list ref="quotationRef" :option="option" @load="quotationUp" @refresh="quotationDown"> |
|
|
|
<view v-for="(item, index) in quotationData" :key="index"> |
|
|
|
<view v-for="(item, index) in list" :key="index"> |
|
|
|
<view class="list-border list-title-line"> |
|
|
|
<text class="list-title">广州民族印刷有限公司</text> |
|
|
|
<text class="list-title-Subtitle">待报价</text> |
|
|
|
<text class="list-title">{{ item.belongEnterpriseName }}</text> |
|
|
|
<text class="list-title-Subtitle">{{ item.replyStatus | replyStatusName }}</text> |
|
|
|
</view> |
|
|
|
<view class="list-border list-info-line"> |
|
|
|
<view class="list-info list-border"> |
|
|
|
<view class=""><image class="list-image" src="../../static/logo.png" mode=""></image></view> |
|
|
|
<view class="list-info list-border" v-for="(subItem, subIndex) in item.itemList" :key="subIndex"> |
|
|
|
<view class=""> |
|
|
|
<!-- <image class="list-image" src="../../static/logo.png" mode=""></image> --> |
|
|
|
<image class="list-image" :src="subItem.productImg" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="list-info-contant"> |
|
|
|
<view class="list-info-title">金蝶蓝白卡</view> |
|
|
|
<view class="list-info-text">白卡纸/金蝶蓝/350g/787*1092/2200张</view> |
|
|
|
<view class="list-info-title">{{subItem.brandName}}</view> |
|
|
|
<view class="list-info-text"> |
|
|
|
{{subItem.categoryName}}/{{subItem.paperName}}/{{subItem.gramWeight}}g/{{subItem.length}}*{{subItem.width}}/{{subItem.quantity}}张 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list-info"> |
|
|
|
<!-- <view class="list-info"> |
|
|
|
<view class=""><image class="list-image" src="../../static/logo.png" mode=""></image></view> |
|
|
|
<view class="list-info-contant"> |
|
|
|
<view class="list-info-title">金蝶蓝白卡</view> |
|
|
|
<view class="list-info-text">白卡纸/金蝶蓝/350g/787*1092/2200张</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="list-border list-bottom-contant"> |
|
|
|
<view> |
|
|
|
<text>交货时间:</text> |
|
|
|
<text>3天</text> |
|
|
|
<text>{{item.deliveryDay}}天</text> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<text>交货区域:</text> |
|
|
|
<text>3天</text> |
|
|
|
<text>{{item.deliveryArea}}</text> |
|
|
|
</view> |
|
|
|
<view class="offer-class"> |
|
|
|
<view class="offer-width"> |
|
|
|
<text>报价截止:</text> |
|
|
|
<text>3天</text> |
|
|
|
<text>{{item.enquiryValidTime}}</text> |
|
|
|
</view> |
|
|
|
<view><button type="primary" class="offer-btn" @click="offerClick()">报价</button></view> |
|
|
|
</view> |
|
|
|
@ -76,50 +81,58 @@ export default { |
|
|
|
fontSize: '40rpx' |
|
|
|
}, |
|
|
|
params: { |
|
|
|
cooperationState: 0, |
|
|
|
latitude: 23.12616, |
|
|
|
longitude: 113.38466, |
|
|
|
km: 5 |
|
|
|
asc: '', |
|
|
|
desc: '', |
|
|
|
// mallSupplierIds: [this.$store.state.supplierInfo.supplierId], // 网关获取供应商ID集合 |
|
|
|
mallSupplierIds: ['553703427180466176'] // 网关获取供应商ID集合 |
|
|
|
}, |
|
|
|
pagination: { |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
quotationData: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
params: { |
|
|
|
handler(val) { |
|
|
|
this.getQuotationQurty() |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
list: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
if (option) { |
|
|
|
option.latitude && (this.params.latitude = option.latitude) |
|
|
|
option.longitude && (this.params.longitude = option.longitude) |
|
|
|
option.km && (this.params.km = option.km) |
|
|
|
onLoad(option) {}, |
|
|
|
filters: { |
|
|
|
replyStatusName(status) { |
|
|
|
let name = '' |
|
|
|
// 供应商端显示报价状态 30128 待报价 30130 已报价 30139 转化订单 30102 已失效 |
|
|
|
switch (status) { |
|
|
|
case 30128: |
|
|
|
name = '待报价' |
|
|
|
break |
|
|
|
case 30130: |
|
|
|
name = '已报价' |
|
|
|
break |
|
|
|
case 30139: |
|
|
|
name = '转化订单' |
|
|
|
break |
|
|
|
case 30102: |
|
|
|
name = '已失效' |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
return name |
|
|
|
} |
|
|
|
this.getQuotationQurty() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取报价列表 |
|
|
|
getQuotationQurty() { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
getEnterpriseList({ ...this.pagination }) |
|
|
|
getEnterpriseList({ ...this.params, ...this.pagination }) |
|
|
|
.then(res => { |
|
|
|
console.log('获取报价列表', res) |
|
|
|
if (res) { |
|
|
|
if (this.pagination.pageNum == 1) { |
|
|
|
// this.quotationData = res.records |
|
|
|
this.quotationData = [] |
|
|
|
this.quotationData = [{ name: '111', id: '222' }, { name: '111', id: '222' }] |
|
|
|
this.list = res.records |
|
|
|
// this.list = [] |
|
|
|
// this.list = [{ name: '111', id: '222' }, { name: '111', id: '222' }] |
|
|
|
} else { |
|
|
|
this.quotationData = this.quotationData.concat(res.records) |
|
|
|
this.list = this.list.concat(res.records) |
|
|
|
} |
|
|
|
console.log('this.quotationData', res) |
|
|
|
resolve({ list: this.quotationData, total: res.total }) |
|
|
|
resolve({ list: this.list, total: res.total }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
@ -133,7 +146,7 @@ export default { |
|
|
|
this.pagination.pageNum++ |
|
|
|
this.getQuotationQurty() |
|
|
|
.then(({ list, total }) => { |
|
|
|
this.$refs.quotationRef.loadSuccess({ list, total }) |
|
|
|
this.$refs.quotationRef.refreshSuccess({ list, total }) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$refs.quotationRef.loadFail() |
|
|
|
@ -249,6 +262,7 @@ export default { |
|
|
|
} |
|
|
|
.offer-class { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
} |
|
|
|
.offer-btn { |
|
|
|
width: 150rpx; |
|
|
|
@ -257,6 +271,7 @@ export default { |
|
|
|
border: 2rpx solid #007aff; |
|
|
|
border-radius: 8rpx; |
|
|
|
line-height: 60rpx; |
|
|
|
margin-right: 32rpx; |
|
|
|
} |
|
|
|
.offer-width { |
|
|
|
width: 70%; |
|
|
|
|