Browse Source

报价单

devlop
buffeyu 4 years ago
parent
commit
03334e211f
3 changed files with 58 additions and 42 deletions
  1. 4
      pages/add-record/index.vue
  2. 3
      pages/client-detail/equipment-information.vue
  3. 93
      pages/trade/quotationList.vue

4
pages/add-record/index.vue

@ -30,7 +30,7 @@
<view class="paper-price-image">
<qn-easyinput
class="paper-price-textArea gt-height"
:maxlength="200"
:maxlength="500"
:styles="{ disableColor: '#F7F8FA' }"
v-model="form.remark"
:inputBorder="false"
@ -57,7 +57,7 @@
<view class="location">
<image class="icon" src="/static/imgs/client-detail/address-icon.png"></image>
<text class="text">广州市天河区</text>
<uni-icons size="16" type="bottom"></uni-icons>
<!-- <uni-icons size="16" type="bottom"></uni-icons> -->
</view>
</view>

3
pages/client-detail/equipment-information.vue

@ -7,7 +7,8 @@
<view class="desc">
<view class="bottom-btn" @tap="dropdownTap(index)">
{{dropdownName}}
<uni-icons size="16" type="bottom"></uni-icons>
<!-- <uni-icons custom-prefix="iconfont" type="icon-required" size="16" color="#888888"></uni-icons> -->
<uni-icons size="16" custom-prefix="iconfont" type="m_dow_arrow" color="#888888"></uni-icons>
</view>
<view class="down-box" v-if="item.isShowSelect">
<view class="row" v-for="(citem, cindex) in dropdownList" :key="cindex" @tap="dropdownItemTap(cindex)">

93
pages/trade/quotationList.vue

@ -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%;

Loading…
Cancel
Save