Browse Source

报价页面

devlop
邓雄飞 4 years ago
parent
commit
6dd7b2cec3
9 changed files with 435 additions and 398 deletions
  1. 2
      apis/mineApi.js
  2. 10
      pages/client-detail/base-paper-deals.vue
  3. 8
      pages/client-detail/index.vue
  4. 2
      pages/contract-manage/index.vue
  5. 2
      pages/mine/index.vue
  6. 2
      pages/order-detail/index.vue
  7. 210
      pages/trade/index.vue
  8. 13
      pages/trade/orderList.vue
  9. 584
      pages/trade/quotationList.vue

2
apis/mineApi.js

@ -8,7 +8,7 @@ import http from '../utils/http/index.js'
*/
export const getOrderStatistics = (data) => {
return http.get({
url: '/base-paper-trading/get/supplier/order-volume-statistics',
url: '/base-paper-trading/get/supplier/income-statistics',
data
})
}

10
pages/client-detail/base-paper-deals.vue

@ -55,6 +55,13 @@ import { getBasePaperDeals, getOrderVolumeStatistics } from '@/apis/clientDetail
export default {
components: { uGap },
props: {
// id
id: {
type: [String, Number],
default: ''
}
},
data() {
return {
option: {
@ -88,13 +95,14 @@ export default {
topInfo: {}
}
},
created() {
this.getOrderVolumeStatistics()
},
methods: {
//
getOrderVolumeStatistics() {
getOrderVolumeStatistics(this.orderParams).then((res) => {
getOrderVolumeStatistics({ ...this.orderParams, customerEnterpriseId: this.id }).then((res) => {
// console.log('', res)
this.topInfo = res
})

8
pages/client-detail/index.vue

@ -19,7 +19,7 @@
<view class="content">
<view v-show="current === 0"><basicInformation ref="basicInformationRef" :customerId="customerId"></basicInformation></view>
<view v-show="current === 1"><equipmentInformation></equipmentInformation></view>
<view v-show="current === 2"><basePaperDeals></basePaperDeals></view>
<view v-show="current === 2"><basePaperDeals :id="customerId"></basePaperDeals></view>
<view v-show="current === 3"><wastePaperTrading></wastePaperTrading></view>
</view>
</view>
@ -70,9 +70,9 @@ export default {
this.$refs.basicInformationRef.getBaseInfo()
})
},
onShow() {
this.$refs.popup.close()
},
// onShow() {
// this.$refs.popup.close()
// },
methods: {
go2,
onClickItem(e) {

2
pages/contract-manage/index.vue

@ -48,7 +48,7 @@
</view>
<view class="footer flex-row-center-space">
<text style="font-size: 30rpx; color: #888888">操作人: {{ item.userName }}</text>
<text style="font-size: 28rpx; color: #007aff" @click="viewContract(item.imgUrl)">查看</text>
<text style="font-size: 28rpx; color: #007aff" @click="viewContract(item.downloadUrl)">查看</text>
</view>
</view>
</scroll-list>

2
pages/mine/index.vue

@ -278,8 +278,6 @@ export default {
this.companyNum = res.enterpriseList?.length || 1
}
})
},
created() {
this.getStatistics()
}
}

2
pages/order-detail/index.vue

@ -289,7 +289,7 @@ export default {
} else if (item.status == '30302') {
step2.push({
title: '出库',
desc: item.userName + item.quantity + '\n\r' + item.createTime
desc: item.userName + ' ' + item.quantity + '\n\r' + item.createTime
})
outboundQuantity += item.quantity
} else if (item.status == '30303') {

210
pages/trade/index.vue

@ -1,18 +1,21 @@
<template>
<view class="trade-index">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view class="left-title">
<view v-if="mainKey === '0'" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="mainKey === '1'">
<view class="bar-contant">
<view class="check-control title-left36" :class="current === '0' ? 'check-title' : 'oncheck-title'" @click="controlChange('0')"><text>报价</text></view>
<view class="check-control title-left" :class="current === '1' ? 'check-title' : 'oncheck-title'" @click="controlChange('1')"><text>订单</text></view>
</view>
</view>
</view>
</uni-nav-bar>
<!-- <view class="top-bar">
<view class="trade-index">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view class="left-title">
<view v-if="mainKey === '0'" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="mainKey === '1'">
<view class="bar-contant">
<view class="check-control title-left36" :class="current === '0' ? 'check-title' : 'oncheck-title'" @click="controlChange('0')">
<text>报价</text>
</view>
<view class="check-control title-left" :class="current === '1' ? 'check-title' : 'oncheck-title'" @click="controlChange('1')">
<text>订单</text>
</view>
</view>
</view>
</view>
</uni-nav-bar>
<!-- <view class="top-bar">
<view v-if="mainKey === '0'" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="mainKey === '1'">
<view class="bar-contant">
@ -21,18 +24,18 @@
</view>
</view>
</view> -->
<view class="" v-if="mainKey === '0'"><not-logged @loginChange="loginChange()"></not-logged></view>
<view class="" v-if="mainKey === '1'">
<view class="content">
<view v-show="current === '0'">
<quotationList></quotationList>
</view>
<view v-show="current === '1'">
<orderList></orderList>
</view>
</view>
</view>
</view>
<view class="" v-if="mainKey === '0'"><not-logged @loginChange="loginChange()"></not-logged></view>
<view class="" v-if="mainKey === '1'">
<view class="content">
<view v-show="current === '0'">
<quotationList :refresh="refresh"></quotationList>
</view>
<view v-show="current === '1'">
<orderList :refresh="refresh"></orderList>
</view>
</view>
</view>
</view>
</template>
<script>
@ -42,88 +45,87 @@ import quotationList from './quotationList.vue'
import orderList from './orderList.vue'
import { gettradingHallList } from '@/apis/trade'
export default {
components: { notLogged, scrollList, quotationList, orderList },
data() {
return {
key: '',
mainKey: '1',
current: '0',
items: ['报价', '订单'],
}
},
mounted() {
// this.getQuotationQurty()
},
watch: {
},
methods: {
loginChange() {
this.mainKey === '0' ? '1' : '0'
},
//
controlChange(value) {
this.current = value
// if (value === '0') {
// this.getQuotationQurty()
// } else {
// this.getTradingQurty()
// }
},
}
components: { notLogged, scrollList, quotationList, orderList },
data() {
return {
key: '',
mainKey: '1',
current: '0',
items: ['报价', '订单'],
refresh: false
}
},
mounted() {
// this.getQuotationQurty()
},
onShow() {
this.refresh = !this.refresh
},
methods: {
loginChange() {
this.mainKey === '0' ? '1' : '0'
},
//
controlChange(value) {
this.current = value
// if (value === '0') {
// this.getQuotationQurty()
// } else {
// this.getTradingQurty()
// }
}
}
}
</script>
<style lang="scss">
.trade-index {
.left-title {
position: relative;
left: -100rpx;
}
.top-bar {
background-color: rgb(255, 255, 255);
border-bottom-width: 2rpx;
border-bottom-style: solid;
border-bottom-color: #eee;
z-index: 998;
height: 88rpx;
}
.title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.text-view {
padding: 20rpx;
}
.bar-contant {
display: flex;
}
.check-title {
font-size: 40rpx;
color: #000000;
// letter-spacing: 0;
font-weight: 550;
border-bottom: 4rpx solid #007aff;
}
.oncheck-title {
font-size: 32rpx;
color: #555555;
font-weight: 550;
}
.check-control {
line-height: 70rpx;
width: 80rpx;
text-align: center;
}
.title-left {
margin-left: 24rpx;
}
.title-left36 {
// margin-left: 36rpx;
}
.left-title {
position: relative;
left: -100rpx;
}
.top-bar {
background-color: rgb(255, 255, 255);
border-bottom-width: 2rpx;
border-bottom-style: solid;
border-bottom-color: #eee;
z-index: 998;
height: 88rpx;
}
.title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.text-view {
padding: 20rpx;
}
.bar-contant {
display: flex;
}
.check-title {
font-size: 40rpx;
color: #000000;
// letter-spacing: 0;
font-weight: 550;
border-bottom: 4rpx solid #007aff;
}
.oncheck-title {
font-size: 32rpx;
color: #555555;
font-weight: 550;
}
.check-control {
line-height: 70rpx;
width: 80rpx;
text-align: center;
}
.title-left {
margin-left: 24rpx;
}
.title-left36 {
// margin-left: 36rpx;
}
}
</style>

13
pages/trade/orderList.vue

@ -59,6 +59,17 @@ export default {
components: {
uGap
},
props: {
refresh: {
type: Boolean,
default: false
}
},
watch: {
refresh() {
this.orderDown()
}
},
data() {
return {
controlCurrent: 0,
@ -69,7 +80,7 @@ export default {
emptyText: '暂无订单信息~',
background: '#F7F8FA',
fontSize: '40rpx',
emptyImage: '/static/imgs/client-detail/no-data-icon.png'
emptyImage: '/static/imgs/client-detail/no-data-icon.png'
},
params: {
asc: '',

584
pages/trade/quotationList.vue

@ -1,52 +1,63 @@
<template>
<view class="quotation-list">
<scroll-list ref="quotationRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index">
<view class="list-border list-title-line">
<text class="list-title">{{ item.belongEnterpriseName }}</text>
<text class="list-title-Subtitle">{{ item.replyStatus | replyStatusName }}</text>
</view>
<view class="" @click="offerClick(item)">
<view class="list-border list-info-line">
<view class="list-info" :class="subIndex + 1 === item.itemList.length ? '' : 'list-border'" v-for="(subItem, subIndex) in item.itemList" :key="subIndex">
<view class=""><image class="list-image" :src="subItem.productImg" mode=""></image></view>
<view class="list-info-contant">
<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>
<view class="list-border list-bottom-contant" >
<view>
<text>交货时间</text>
<text>{{ item.deliveryDay }}</text>
</view>
<view>
<text>交货区域</text>
<text>{{ item.deliveryArea }}</text>
</view>
<view class="offer-class">
<view class="offer-width">
<text>报价截止</text>
<text>{{ item.enquiryValidTime }}</text>
</view>
<view><button type="primary" class="offer-btn">报价</button></view>
</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
<view>
<view class="offer-prices" @click="nativeTo()">
<image class="my-image" src="../../static/imgs/trade/myPrice.png" mode=""></image>
<view class="my-price">我的报价</view>
</view>
</view>
</view>
<view class="quotation-list">
<scroll-list ref="quotationRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index">
<view class="list-border list-title-line">
<text class="list-title">{{ item.belongEnterpriseName }}</text>
<text class="list-title-Subtitle">{{ item.replyStatus | replyStatusName }}</text>
</view>
<view class="" @click="offerClick(item)">
<view class="list-border list-info-line">
<view
class="list-info"
:class="subIndex + 1 === item.itemList.length ? '' : 'list-border'"
v-for="(subItem, subIndex) in item.itemList"
:key="subIndex"
>
<view class="">
<image
class="list-image"
:src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
</view>
<view class="list-info-contant">
<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>
<view class="list-border list-bottom-contant">
<view>
<text>交货时间</text>
<text>{{ item.deliveryDay }}</text>
</view>
<view>
<text>交货区域</text>
<text>{{ item.deliveryArea }}</text>
</view>
<view class="offer-class">
<view class="offer-width">
<text>报价截止</text>
<text>{{ item.enquiryValidTime }}</text>
</view>
<view><button type="primary" class="offer-btn">报价</button></view>
</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
<view>
<view class="offer-prices" @click="nativeTo()">
<image class="my-image" src="../../static/imgs/trade/myPrice.png" mode=""></image>
<view class="my-price">我的报价</view>
</view>
</view>
</view>
</template>
<script>
@ -54,245 +65,252 @@ import { getEnterpriseList } from '@/apis/trade'
import { back, go2 } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue'
export default {
props: {
queryData: {
type: Object,
default: () => {}
}
},
components: {
uGap
},
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无报价信息~',
background: '#F7F8FA',
fontSize: '40rpx',
emptyImage: '/static/imgs/client-detail/no-data-icon.png'
},
params: {
asc: '',
desc: '',
mallSupplierIds: [this.$store.state.supplierInfo.supplierId], // ID
// mallSupplierIds: ['553703427180466176'] // ID
},
pagination: {
pageNum: 0, //
pageSize: 20
},
list: []
}
},
onShow() {
this.getQuotationQurty()
},
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
}
},
methods: {
//
getQuotationQurty() {
return new Promise((resolve, reject) => {
getEnterpriseList({ ...this.params, ...this.pagination })
.then(res => {
console.log('获取报价列表', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
// this.list = []
// this.list = [{ name: '111', id: '222' }, { name: '111', id: '222' }]
} else {
this.list = this.list.concat(res.records)
}
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch(err => {
reject(err)
})
})
},
props: {
queryData: {
type: Object,
default: () => {}
}
},
components: {
uGap
},
props: {
refresh: {
type: Boolean,
default: false
}
},
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无报价信息~',
background: '#F7F8FA',
fontSize: '40rpx',
emptyImage: '/static/imgs/client-detail/no-data-icon.png'
},
params: {
asc: '',
desc: '',
mallSupplierIds: [this.$store.state.supplierInfo.supplierId] // ID
// mallSupplierIds: ['553703427180466176'] // ID
},
pagination: {
pageNum: 0, //
pageSize: 20
},
list: []
}
},
watch: {
refresh() {
this.quotationDown()
}
},
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
}
},
methods: {
//
getQuotationQurty() {
return new Promise((resolve, reject) => {
getEnterpriseList({ ...this.params, ...this.pagination })
.then((res) => {
console.log('获取报价列表', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
// this.list = []
// this.list = [{ name: '111', id: '222' }, { name: '111', id: '222' }]
} else {
this.list = this.list.concat(res.records)
}
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
})
},
//
quotationUp(page) {
this.pagination.pageNum++
this.getQuotationQurty()
.then(({ list, total }) => {
this.$refs.quotationRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.quotationRef.loadFail()
})
},
//
quotationDown() {
this.pagination.pageNum = 1
this.getQuotationQurty()
.then(({ list, total }) => {
this.$refs.quotationRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.quotationRef.refreshFail()
})
},
//
offerClick(item) {
var params = {
...item,
title: '提交报价'
}
go2('submit-quotation', params)
},
//
nativeTo() {
go2('my-offer')
}
}
//
quotationUp(page) {
this.pagination.pageNum++
this.getQuotationQurty()
.then(({ list, total }) => {
this.$refs.quotationRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.quotationRef.loadFail()
})
},
//
quotationDown() {
this.pagination.pageNum = 1
this.getQuotationQurty()
.then(({ list, total }) => {
this.$refs.quotationRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.quotationRef.refreshFail()
})
},
//
offerClick(item) {
var params = {
...item,
title: '提交报价'
}
go2('submit-quotation', params)
},
//
nativeTo() {
go2('my-offer')
}
}
}
</script>
<style lang="scss">
.quotation-list {
margin-bottom: 0rpx;
.list-border {
// border-top: 1px solid #dddddd;
border-bottom: 2rpx solid #dddddd;
}
.list-title-line {
line-height: 88rpx;
padding-left: 48rpx;
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;
background: #ffffff;
}
.list-info-contant {
margin-left: 48rpx;
background: #ffffff;
}
.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;
padding-bottom: 48rpx;
background: #ffffff;
}
.my-image {
width: 32rpx;
height: 32rpx;
}
.my-price {
font-family: PingFangSC-Medium;
font-size: 18rpx;
color: #007aff;
text-align: center;
font-weight: 500;
white-space: nowrap;
padding: 6rpx;
}
.offer-class {
display: flex;
justify-content: space-between;
}
.offer-btn {
width: 150rpx;
height: 64rpx;
background: #007aff;
border: 2rpx solid #007aff;
border-radius: 8rpx;
line-height: 60rpx;
margin-right: 32rpx;
}
.offer-width {
width: 70%;
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #ffffff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
margin-bottom: 0rpx;
.list-border {
// border-top: 1px solid #dddddd;
border-bottom: 2rpx solid #dddddd;
}
.list-title-line {
line-height: 88rpx;
padding-left: 48rpx;
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;
background: #ffffff;
}
.list-info-contant {
margin-left: 48rpx;
background: #ffffff;
}
.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;
padding-bottom: 48rpx;
background: #ffffff;
}
.my-image {
width: 32rpx;
height: 32rpx;
}
.my-price {
font-family: PingFangSC-Medium;
font-size: 18rpx;
color: #007aff;
text-align: center;
font-weight: 500;
white-space: nowrap;
padding: 6rpx;
}
.offer-class {
display: flex;
justify-content: space-between;
}
.offer-btn {
width: 150rpx;
height: 64rpx;
background: #007aff;
border: 2rpx solid #007aff;
border-radius: 8rpx;
line-height: 60rpx;
margin-right: 32rpx;
}
.offer-width {
width: 70%;
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #ffffff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
}
</style>
</style>
Loading…
Cancel
Save