Browse Source

接入报价接口

devlop
buffeyu 4 years ago
parent
commit
acdbe27190
8 changed files with 1032 additions and 941 deletions
  1. 29
      apis/trade.js
  2. 2
      pages/client-detail/basic-information.vue
  3. 76
      pages/my-offer/index.vue
  4. 11
      pages/quotation-details/index.vue
  5. 1380
      pages/submit-quotation/index.vue
  6. 2
      pages/trade/index.vue
  7. 471
      pages/trade/orderList.vue
  8. 2
      pages/trade/quotationList.vue

29
apis/trade.js

@ -19,5 +19,34 @@ export function gettradingHallList(data) {
},
{ hideLoading: true }
)
}
// 我的报价
export function getMyreplyList(data) {
return http.get(
{
url: '/base-paper-trading/get/my-reply-list',
data
},
{ hideLoading: true }
)
}
// 提交报价
export function updataEnquiryReply(data) {
return http.post({
url: '/base-paper-trading/update/enquiry-reply',
data
})
}
// 获取报价详情
export function enquiryReplyDetail(data) {
return http.get(
{
url: '/base-paper-trading/get/enquiry-reply-detail/'+data,
},
{ hideLoading: true }
)
}

2
pages/client-detail/basic-information.vue

@ -292,7 +292,7 @@ export default {
flex-direction: row;
justify-content: space-between;
height: 88rpx;
line-height: 88rpx;
line-height: 88rpx;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;

76
pages/my-offer/index.vue

@ -8,28 +8,26 @@
</uni-nav-bar>
</view>
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown">
<view v-for="(items,index) in orderData" :key="index" @click="myPriceInfo(items)">
<view v-for="(items, index) in orderData" :key="index" @click="myPriceInfo(items)">
<view class="list-border list-title-line">
<text class="list-title">广州民族印刷有限公司</text>
<text class="list-title-Subtitle">{{controlItems[items.orderStatus -1] }}</text>
<text class="list-title-Subtitle">{{ controlItems[items.orderStatus - 1] }}</text>
</view>
<view class="list-border list-info-line" v-for="(item, index) in items.orderItemList" :key="index">
<view class="list-info" :class="index===items.orderItemList.length?'list-border':''">
<view class="">
<!-- <image class="list-image" :src="item.productImg" mode=""></image> -->
<image class="list-image" src="../../static/logo.png" mode="">
</view>
<view class="list-info" :class="index === items.orderItemList.length ? 'list-border' : ''">
<view class=""><image class="list-image" src="../../static/logo.png"></image></view>
<view class="list-info-contant">
<view class="list-info-title">{{ item.brandName }}{{ item.categoryName }}</view>
<view class="list-info-text">
{{ item.categoryName }}/{{ item.brandName }}/{{ item.gramWeight }}g/{{ item.length }}*{{ item.width }}/{{item.pieceQuantity }}
<text>{{ item.categoryName }}/{{ item.brandName }}/</text>
<text>{{ item.gramWeight }}g/{{ item.length }}*{{ item.width }}/{{ item.pieceQuantity }}</text>
</view>
</view>
</view>
</view>
<view class="list-border list-bottom-contant">
<view>
<text class="list-time">三分钟前</text>
<view><text class="list-time">三分钟前</text></view>
<view class="">
<text class="list-title-Subtitle">¥{{ items.totalOfferPrice }}</text>
</view>
</view>
@ -40,10 +38,10 @@
</template>
<script>
import { back, go2 } from '@/utils/hook.js'
import { back, go2 } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue'
import scrollList from '@/components/scroll-list/scroll-list.vue'
import { getEnterpriseList, gettradingHallList } from '@/apis/trade'
import { getMyreplyList } from '@/apis/trade.js'
export default {
// props: {
// queryOrderData: {
@ -62,8 +60,8 @@ export default {
pageSize: 10
},
orderData: [],
controlCurrent:0,
controlItems: ['待付款', '待发货', '待收货', '已完成','已关闭'],
controlCurrent: 0,
controlItems: ['待付款', '待发货', '待收货', '已完成', '已关闭'],
orderOption: {
size: 10,
auto: true,
@ -79,12 +77,11 @@ export default {
}
}
},
filters:{
},
filters: {},
watch: {
orderParams: {
handler(val) {
this.getTradingQurty()
this.getMyreplyListQuery()
},
deep: true
}
@ -95,14 +92,14 @@ export default {
option.longitude && (this.params.longitude = option.longitude)
option.km && (this.params.km = option.km)
}
this.getTradingQurty()
this.getMyreplyListQuery()
},
methods: {
back,
//
getTradingQurty() {
back,
//
getMyreplyListQuery() {
return new Promise((resolve, reject) => {
gettradingHallList({ ...this.orderParams, ...this.orderPagination })
getMyreplyList({ ...this.orderParams, ...this.orderPagination })
.then(res => {
if (res) {
if (this.orderPagination.pageNum == 1) {
@ -121,7 +118,7 @@ export default {
//
orderUp(page) {
this.orderPagination.pageNum++
this.getTradingQurty()
this.getMyreplyListQuery()
.then(({ list, total }) => {
this.$refs.orderRef.loadSuccess({ list, total })
})
@ -132,7 +129,7 @@ export default {
//
orderDown() {
this.orderPagination.pageNum = 1
this.getTradingQurty()
this.getMyreplyListQuery()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
@ -140,14 +137,14 @@ export default {
this.$refs.orderRef.refreshFail()
})
},
//
myPriceInfo(item){
console.log(item)
uni.navigateTo({
url: '/pages/quotation-details/index'
});
}
//
myPriceInfo(item) {
console.log(item)
uni.navigateTo({
url: '/pages/quotation-details/index'
})
}
}
}
</script>
@ -162,7 +159,7 @@ export default {
.list-title-line {
line-height: 88rpx;
padding-left: 48rpx;
background: #FFFFFF;
background: #ffffff;
}
.my-offer-title {
width: 100%;
@ -193,7 +190,7 @@ export default {
.list-info-line {
padding-left: 48rpx;
line-height: 70rpx;
background: #FFFFFF;
background: #ffffff;
}
.list-info-contant {
margin-left: 48rpx;
@ -224,13 +221,14 @@ export default {
display: flex;
}
.list-bottom-contant {
line-height: 70rpx;
align-items: center;
padding-left: 48rpx;
width: 750rpx;
height: 80rpx;
background: #FFFFFF;
background: #ffffff;
display: flex;
justify-content: space-between;
}
.list-time{
.list-time {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #888888;
@ -239,4 +237,4 @@ export default {
font-weight: 400;
}
}
</style>
</style>

11
pages/quotation-details/index.vue

@ -78,6 +78,7 @@
import { back, go2 } from '@/utils/hook.js'
import qnHeader from '@/components/qn-header/qn-header.vue'
import uGap from '@/components/u-gap/u-gap.vue'
import { enquiryReplyDetail } from '@/apis/trade.js'
export default {
components: {
qnHeader,
@ -92,6 +93,16 @@ export default {
},
methods: {
back,
//
getDetail(id){
this.enquiryReplyDetail(id)
.then(({ list, total }) => {
this.$refs.orderRef.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.loadFail()
})
},
//
commodityModify(item) {
console.log(111)

1380
pages/submit-quotation/index.vue
File diff suppressed because it is too large
View File

2
pages/trade/index.vue

@ -28,7 +28,7 @@ import notLogged from '@/components/not-logged/not-logged.vue'
import scrollList from '@/components/scroll-list/scroll-list.vue'
import quotationList from './quotationList.vue'
import orderList from './orderList.vue'
import { getEnterpriseList, gettradingHallList } from '@/apis/trade'
import { gettradingHallList } from '@/apis/trade'
export default {
components: { notLogged, scrollList, quotationList, orderList },
data() {

471
pages/trade/orderList.vue

@ -1,233 +1,238 @@
<template>
<view class="order-list">
<uni-segmented-control :current="controlCurrent" :values="controlItems" @clickItem="onClickItem" styleType="text" activeColor="#007AFF"></uni-segmented-control>
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown">
<view v-for="(items, index) in orderData" :key="index">
<view class="list-border list-title-line">
<text class="list-title">广州民族印刷有限公司</text>
<text class="list-title-Subtitle">{{controlItems[items.orderStatus-1] }}</text>
</view>
<view class="list-border list-info-line" v-for="(item, index) in items.orderItemList" :key="index">
<view class="list-info " :class="index===items.orderItemList.length?'list-border':''">
<view class="">
<!-- <image class="list-image" :src="item.productImg" mode=""></image> -->
<image class="list-image" src="../../static/logo.png" mode="">
</view>
<view class="list-info-contant">
<view class="list-info-title">{{ item.brandName }}{{ item.categoryName }}</view>
<view class="list-info-text">
{{ item.categoryName }}/{{ item.brandName }}/{{ item.gramWeight }}g/{{ item.length }}*{{ item.width }}/{{ item.pieceQuantity }}
</view>
</view>
</view>
</view>
<view class="list-border list-bottom-contant">
<view>
<text class="list-bottom-contant-text">交货时间</text>
<text class="list-bottom-contant-subtext">{{ items.deliveryDay }}</text>
<text class="list-title-Subtitle">¥{{ items.totalOfferPrice }}</text>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import scrollList from '@/components/scroll-list/scroll-list.vue'
import { getEnterpriseList, gettradingHallList } from '@/apis/trade'
export default {
// props: {
// queryOrderData: {
// type: Object,
// default: () => {}
// }
// },
components: {
uGap
},
data() {
return {
orderPagination: {
pageNum: 0, //
pageSize: 10
},
orderData: [],
controlCurrent: 0,
controlItems: ['全部', '待确认', '待发货', '已完成'],
orderOption: {
size: 10,
auto: true,
emptyText: '暂无报价信息~',
background: '#F7F8FA',
fontSize: '40rpx'
},
orderParams: {
cooperationState: 0,
latitude: 23.12616,
longitude: 113.38466,
km: 5
}
}
},
watch: {
// queryOrderData(value) {
// console.log('value', value)
// },
orderParams: {
handler(val) {
this.getTradingQurty()
},
deep: true
}
},
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)
}
this.getTradingQurty()
},
methods: {
//
getTradingQurty() {
return new Promise((resolve, reject) => {
gettradingHallList({ ...this.orderParams, ...this.orderPagination })
.then(res => {
if (res) {
if (this.orderPagination.pageNum == 1) {
this.orderData = res.records
} else {
this.orderData = this.orderData.concat(res.records)
}
resolve({ list: this.orderData, total: res.total })
}
})
.catch(err => {
reject(err)
})
})
},
//
orderUp(page) {
this.orderPagination.pageNum++
this.getTradingQurty()
.then(({ list, total }) => {
this.$refs.orderRef.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.loadFail()
})
},
//
orderDown() {
this.orderPagination.pageNum = 1
this.getTradingQurty()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.refreshFail()
})
},
//
onClickItem(value) {
console.log(value)
}
}
}
</script>
<style lang="scss">
.order-list {
margin-bottom: 0px;
background: #FFFFFF;
.list-border {
border-bottom: 2rpx solid #dddddd;
}
.list-title-line {
line-height: 88rpx;
padding-left: 48rpx;
width: 750rpx;
height: 88rpx;
background: #FFFFFF;
}
.list-title {
font-family: PingFangSC-Semibold;
font-size: 30rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
}
.list-title-Subtitle {
font-family: PingFangSC-Medium;
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
float: right;
margin-right: 32rpx;
}
.list-info-line {
padding-left: 48rpx;
line-height: 70rpx;
// width: 750rpx;
// height: 88rpx;
background: #FFFFFF;
}
.list-info-contant {
margin-left: 48rpx;
}
.list-info-title {
font-family: PingFangSC-Medium;
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 550;
}
.list-info-text {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 64rpx;
font-weight: 400;
}
.list-image {
width: 100rpx;
height: 100rpx;
margin-top: 20rpx;
}
.list-info {
display: flex;
}
.list-bottom-contant {
line-height: 70rpx;
padding-left: 48rpx;
width: 750rpx;
height: 80rpx;
background: #FFFFFF;
.list-bottom-contant-text{
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
line-height: 32rpx;
font-weight: 400;
}
.list-bottom-contant-subtext{
font-size: 26rpx;
color: #333333;
letter-spacing: 0;
line-height: 32rpx;
font-weight: 400;
}
}
}
</style>
<template>
<view class="order-list">
<uni-segmented-control :current="controlCurrent" :values="controlItems" @clickItem="onClickItem" styleType="text" activeColor="#007AFF"></uni-segmented-control>
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown">
<view v-for="(items, index) in orderData" :key="index">
<view class="list-border list-title-line">
<text class="list-title">广州民族印刷有限公司</text>
<text class="list-title-Subtitle">{{controlItems[items.orderStatus-1] }}</text>
</view>
<view class="list-border list-info-line" v-for="(item, index) in items.orderItemList" :key="index">
<view class="list-info " :class="index===items.orderItemList.length?'list-border':''">
<view class="">
<!-- <image class="list-image" :src="item.productImg" mode=""></image> -->
<image class="list-image" src="../../static/logo.png" mode="">
</view>
<view class="list-info-contant">
<view class="list-info-title">{{ item.brandName }}{{ item.categoryName }}</view>
<view class="list-info-text">
{{ item.categoryName }}/{{ item.brandName }}/{{ item.gramWeight }}g/{{ item.length }}*{{ item.width }}/{{ item.pieceQuantity }}
</view>
</view>
</view>
</view>
<view class="list-border list-bottom-contant">
<view>
<text class="list-bottom-contant-text">交货时间</text>
<text class="list-bottom-contant-subtext">{{ items.deliveryDay }}</text>
</view>
<view>
<text class="list-title-Subtitle">¥{{ items.totalOfferPrice }}</text>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import scrollList from '@/components/scroll-list/scroll-list.vue'
import { gettradingHallList } from '@/apis/trade'
export default {
// props: {
// queryOrderData: {
// type: Object,
// default: () => {}
// }
// },
components: {
uGap
},
data() {
return {
orderPagination: {
pageNum: 0, //
pageSize: 10
},
orderData: [],
controlCurrent: 0,
controlItems: ['全部', '待确认', '待发货', '已完成'],
orderOption: {
size: 10,
auto: true,
emptyText: '暂无报价信息~',
background: '#F7F8FA',
fontSize: '40rpx'
},
orderParams: {
cooperationState: 0,
latitude: 23.12616,
longitude: 113.38466,
km: 5
}
}
},
watch: {
// queryOrderData(value) {
// console.log('value', value)
// },
orderParams: {
handler(val) {
this.getTradingQurty()
},
deep: true
}
},
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)
}
this.getTradingQurty()
},
methods: {
//
getTradingQurty() {
return new Promise((resolve, reject) => {
gettradingHallList({ ...this.orderParams, ...this.orderPagination })
.then(res => {
if (res) {
if (this.orderPagination.pageNum == 1) {
this.orderData = res.records
} else {
this.orderData = this.orderData.concat(res.records)
}
resolve({ list: this.orderData, total: res.total })
}
})
.catch(err => {
reject(err)
})
})
},
//
orderUp(page) {
this.orderPagination.pageNum++
this.getTradingQurty()
.then(({ list, total }) => {
this.$refs.orderRef.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.loadFail()
})
},
//
orderDown() {
this.orderPagination.pageNum = 1
this.getTradingQurty()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.refreshFail()
})
},
//
onClickItem(value) {
console.log(value)
}
}
}
</script>
<style lang="scss">
.order-list {
margin-bottom: 0px;
background: #FFFFFF;
.list-border {
border-bottom: 2rpx solid #dddddd;
}
.list-title-line {
line-height: 88rpx;
padding-left: 48rpx;
width: 750rpx;
height: 88rpx;
background: #FFFFFF;
}
.list-title {
font-family: PingFangSC-Semibold;
font-size: 30rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
}
.list-title-Subtitle {
font-family: PingFangSC-Medium;
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
float: right;
margin-right: 32rpx;
}
.list-info-line {
padding-left: 48rpx;
line-height: 70rpx;
// width: 750rpx;
// height: 88rpx;
background: #FFFFFF;
}
.list-info-contant {
margin-left: 48rpx;
}
.list-info-title {
font-family: PingFangSC-Medium;
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 550;
}
.list-info-text {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 64rpx;
font-weight: 400;
}
.list-image {
width: 100rpx;
height: 100rpx;
margin-top: 20rpx;
}
.list-info {
display: flex;
}
.list-bottom-contant {
// line-height: 70rpx;
align-items: center;
padding-left: 48rpx;
width: 750rpx;
height: 80rpx;
background: #FFFFFF;
display: flex;
justify-content: space-between;
.list-bottom-contant-text{
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
line-height: 32rpx;
font-weight: 400;
}
.list-bottom-contant-subtext{
font-size: 26rpx;
color: #333333;
letter-spacing: 0;
line-height: 32rpx;
font-weight: 400;
}
}
}
</style>

2
pages/trade/quotationList.vue

@ -52,7 +52,7 @@
</template>
<script>
import { getEnterpriseList, gettradingHallList } from '@/apis/trade'
import { getEnterpriseList } from '@/apis/trade'
import { back, go2 } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue'
export default {

Loading…
Cancel
Save