Commit 74b9f7fa authored by chuan.liu's avatar chuan.liu

个人中心数据联调 滚动处理

parent 5d97187d
......@@ -621,7 +621,7 @@
"titleSize": "17px",
"backgroundColor": "#fff",
"titleText": "账票查询",
"autoBackButton": false,
"autoBackButton": true,
"splitLine": {
"color": "#ccc",
"height": "0.5px"
......
<template>
<view class="lists" :style="mainHeight">
<list class="list-wrapper">
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<cell class="order view" v-for="(item,index) in lists" :key="index">
<view class="main">
<view class="list-wrapper" :style="scrollHeight">
<list class="list" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="list-cell" v-for="(item,index) in lists" :key="index">
<view class="listview">
<view class="cell-list">
<view class="middle view planout-block-item">
......@@ -36,11 +38,12 @@
</view>
</view>
<view class="empty-block">
</view>
</cell>
</list>
</view>
</view>
</view>
</template>
<script>
......@@ -70,6 +73,11 @@
'height': `${this.sysinfo.safeArea.height }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height -58}px`,
}
},
...mapState(['sysinfo', 'userInfo'])
},
created() {
......@@ -107,19 +115,31 @@
.header-bg {
height: 284rpx;
margin-top: -88rpx;
margin-bottom: -85px;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
}
.lists {
width: 750rpx;
position: relative;
overflow-y: scroll;
flex-direction: column;
background: #f0f4f5;
overflow: hidden;
}
.main {
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
overflow-y: scroll;
}
.list-wrapper {
flex: 1;
display: flex;
flex-direction: column;
}
.list {
display: flex;
flex-direction: column;
}
.order {
......@@ -128,6 +148,10 @@
background: #f0f4f5;
}
.list-cell {
padding-bottom: 26rpx;
}
.listview {
flex: 1;
flex-direction: column;
......
......@@ -40,8 +40,10 @@
</button>
</view>
<view class="planout-block-lists">
<view class="middle view planout-block-item" v-for="(item,index) in lists" :key='item.index'>
<view class="planout-block-lists" :style="scrollHeight">
<list class="lists-wrapper" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date middle-date-select">客户编码</text>
<text class="middle-date-des middle-date-des-select">{{item.CUSTOMER}}</text>
......@@ -59,7 +61,12 @@
<text class="middle-date-des middle-date-des-select">{{item.GOODS_AMOUNT}}</text>
</view>
</view>
<view class="empty-block"></view>
</cell>
</list>
</view>
</view>
</view>
</template>
......@@ -92,6 +99,16 @@
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
mainHeight() {
return {
'height': `${this.sysinfo.safeArea.height}px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 237}px`,
}
}
},
created() {
......@@ -158,10 +175,7 @@
.lists {
position: relative;
flex-direction: column;
overflow-y: scroll;
background: #f0f4f5;
overflow-x: hidden;
height: 100%;
}
.main {
......@@ -202,7 +216,6 @@
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
......@@ -222,6 +235,11 @@
align-items: center;
}
.uni-input {
font-size: 12px;
color: #888;
}
.uni-list-cell {
flex: 1;
}
......@@ -246,7 +264,17 @@
.planout-block-lists {
display: flex;
flex-direction: column;
overflow: hidden;
overflow: scroll;
background: #f0f4f5;
}
.list-cell {
padding-bottom: 26rpx;
}
.lists-wrapper {
display: flex;
flex-direction: column;
}
.planout-block {
......@@ -260,8 +288,6 @@
.planout-block-item {
flex: 1;
width: 750rpx;
margin-bottom: 26rpx;
}
.btn {
......@@ -275,4 +301,9 @@
color: #fff;
font-size: 34rpx;
}
.empty-block {
height: 26rpx;
background: #f0f4f5;
}
</style>
<template>
<view class="lists" :style="mainHeight">
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<list scrollable>
<view class="list-wrapper" :style="scrollHeight">
<list class="list-block" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="view scroll-area">
<view class="order-main view">
<view class="top">
......@@ -50,8 +51,8 @@
</view>
</view>
<view class="order-middle view" :class="{'order-middle-auto':!ishowReceiveDetail}" ref='receiveInfo'
:style="receiveInfoHeightComputed">
<view class="order-middle view" :class="{'order-middle-auto':!ishowReceiveDetail}"
ref='receiveInfo' :style="receiveInfoHeightComputed">
<view class="middle view">
<view class="item-block item-block-name">
<text class="item-block-label">收货信息</text>
......@@ -139,6 +140,7 @@
</cell>
</list>
</view>
</view>
</view>
......@@ -188,9 +190,9 @@
"height": `${this.receiveInfoHeight}px`
}
},
mainHeight() {
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height }px`,
'height': `${this.sysinfo.safeArea.height - 58 }px`,
}
},
},
......@@ -246,9 +248,18 @@
padding: 0 16rpx;
}
.list-wrapper {
display: flex;
flex-direction: column;
}
.scroll-area {
flex: 1;
overflow-y: scroll;
padding-bottom: 26rpx;
}
.list-block {
display: flex;
flex-direction: column;
}
.order-main {
......@@ -365,6 +376,7 @@
background-color: #fff;
padding-bottom: 60rpx;
margin-bottom: 16rpx;
overflow: hidden;
}
.order-middle-auto {
......
......@@ -3,6 +3,9 @@
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<view class="list-wrapper" :style="scrollHeight">
<list class="list-block" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="view scroll-area">
<view class="order-main view">
<view class="top">
<text class="title-no">订单编号:{{INFO.OBJECT_ID}}</text>
......@@ -31,8 +34,8 @@
</view>
</view>
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}" ref='receiveInfo'
:style="receiveInfoHeightComputed">
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}"
ref='receiveInfo' :style="receiveInfoHeightComputed">
<view class="middle view" v-for="(item,index) in ITEM" :key="index">
<view class="item-block item-block-name">
<text class="item-block-label">{{item.ZZFLD000005_Z1}}</text>
......@@ -94,7 +97,9 @@
</view>
</view>
</view>
</cell>
</list>
</view>
</view>
</view>
</template>
......@@ -141,8 +146,13 @@
return {
"height": `${this.receiveInfoHeight}px`
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 58 }px`,
}
},
},
onLoad(option) {
this.orderItem = JSON.parse(option.order)
this.getOrderDetail()
......@@ -182,7 +192,6 @@
.lists {
position: relative;
flex-direction: column;
overflow-y: scroll;
background: #f0f4f5;
}
......@@ -190,6 +199,21 @@
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
overflow-y: scroll;
}
.list-wrapper {
display: flex;
flex-direction: column;
}
.scroll-area {
padding-bottom: 26rpx;
}
.list-block {
display: flex;
flex-direction: column;
}
.order-main {
......
......@@ -3,6 +3,9 @@
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<view class="list-wrapper" :style="scrollHeight">
<list class="list-block" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="view scroll-area">
<view class="order-main view">
<view class="top">
<text class="title-no">订单编号:{{INFO.OBJECT_ID}}</text>
......@@ -31,8 +34,8 @@
</view>
</view>
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}" ref='receiveInfo'
:style="receiveInfoHeightComputed">
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}"
ref='receiveInfo' :style="receiveInfoHeightComputed">
<view class="middle view">
<view class="item-block item-block-name">
<text class="item-block-label">计划内</text>
......@@ -140,7 +143,9 @@
</view>
</view>
</view>
</cell>
</list>
</view>
</view>
</view>
</template>
......@@ -191,8 +196,13 @@
return {
"height": `${this.receiveInfoHeight}px`
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 58 }px`,
}
},
},
onLoad(option) {
this.orderItem = JSON.parse(option.order)
this.getOrderDetail()
......@@ -243,6 +253,20 @@
padding: 0 16rpx;
}
.list-wrapper {
display: flex;
flex-direction: column;
}
.scroll-area {
padding-bottom: 26rpx;
}
.list-block {
display: flex;
flex-direction: column;
}
.order-main {
flex: 1;
background: #ffffff;
......
......@@ -5,18 +5,18 @@
<view class="userinfo">
<image class="avatar" src="@/static/image/avatar@3x.png" mode=""></image>
<view class="nick-block">
<text class="nick-block--name">苏州新川商贸有限公司</text>
<text class="nick-block--no">编号:00998873</text>
<text class="nick-block--name">{{userInfo.username}}</text>
<text class="nick-block--no">编号:{{userInfo.customerCode}}</text>
</view>
</view>
<view class="amount-card">
<view class="amount-card--order">
<text class="amount-card--order_num">5000</text>
<text class="amount-card--order_num">{{bpPrice.ORDER_PRICE}}</text>
<text class="amount-card--order_text">订单金额</text>
</view>
<i class="divider"></i>
<view class="amount-card--order amount-card--bill">
<text class="amount-card--order_num">5000</text>
<text class="amount-card--order_num">{{bpPrice.ZHIPIAO_PRICE}}</text>
<text class="amount-card--order_text">开票金额</text>
</view>
</view>
......@@ -95,19 +95,36 @@
mapState
} from 'vuex'
import {
apiGetBpPrice
} from '@/servers/common.js'
export default {
onLoad() {
this.winHeight = `height:${this.sysinfo.safeArea.height}px`
},
data() {
return {
winHeight: 'height:auto'
winHeight: '',
bpPrice: {
ORDER_PRICE: '--',
ZHIPIAO_PRICE: '--'
}
}
},
computed: {
...mapState(['sysinfo'])
...mapState(['sysinfo', 'userInfo'])
},
created() {
this.getBpPrice()
},
methods: {
async getBpPrice() {
const res = await apiGetBpPrice({
PARTNER: this.userInfo.customerCode
})
this.bpPrice = res.DATA
},
goPage(page) {
uni.navigateTo({
url: `/pages/${page}/${page}`
......@@ -174,7 +191,7 @@
}
.nick-block--no {
width: 220rpx;
width: 240rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
......
......@@ -60,6 +60,16 @@ export async function apiAddressSelect(params) {
return res
}
/**
* 客户订单和制票金额查询。
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiGetBpPrice(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/masterdata/get_price_by_bp', params)
return res
}
export default {
apiProductSelect,
apiSalesPlanSelect,
......
......@@ -39,7 +39,7 @@ const store = new Vuex.Store({
vuex_version: '1.0.1',
vuex_demo: '绛紫',
userInfo: {
username: '',
username: '苏州新川商贸有限公司',
password: '',
customerCode: '' || '0050000215'
},
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment