Commit eeec3e8d authored by chuan.liu's avatar chuan.liu

部分页面新增下拉刷新 上拉加载功能

parent e7440625
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
"titleAlign": "left", "titleAlign": "left",
"titleColor": "#333", "titleColor": "#333",
"titleSize": "17px", "titleSize": "17px",
"backgroundColor": "#fff", "backgroundColor": "transparent",
"titleText": "配额订单", "titleText": "配额订单",
"autoBackButton": true "autoBackButton": true
} }
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
"titleAlign": "left", "titleAlign": "left",
"titleColor": "#333", "titleColor": "#333",
"titleSize": "17px", "titleSize": "17px",
"backgroundColor": "#fff", "backgroundColor": "transparent",
"titleText": "非配额订单", "titleText": "非配额订单",
"autoBackButton": true "autoBackButton": true
} }
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
"titleAlign": "left", "titleAlign": "left",
"titleColor": "#333", "titleColor": "#333",
"titleSize": "17px", "titleSize": "17px",
"backgroundColor": "#fff", "backgroundColor": "transparent",
"titleText": "团购订单", "titleText": "团购订单",
"autoBackButton": true "autoBackButton": true
} }
...@@ -149,7 +149,8 @@ ...@@ -149,7 +149,8 @@
}] }]
}, },
"bounce": "none" "bounce": "none"
} },
"enablePullDownRefresh": true
} }
}, { }, {
"path": "pages/select-product/select-product", "path": "pages/select-product/select-product",
...@@ -170,7 +171,9 @@ ...@@ -170,7 +171,9 @@
}] }]
}, },
"bounce": "none" "bounce": "none"
} },
"enablePullDownRefresh": true
// "onReachBottomDistance": 0
} }
}, { }, {
"path": "pages/select-product-pro/select-product-pro", "path": "pages/select-product-pro/select-product-pro",
...@@ -212,7 +215,8 @@ ...@@ -212,7 +215,8 @@
}] }]
}, },
"bounce": "none" "bounce": "none"
} },
"enablePullDownRefresh": true
} }
}, { }, {
"path": "pages/select-group-client/select-group-client", "path": "pages/select-group-client/select-group-client",
...@@ -232,7 +236,8 @@ ...@@ -232,7 +236,8 @@
"color": "#555" "color": "#555"
}] }]
}, },
"bounce": "none" "bounce": "none",
"enablePullDownRefresh": true
} }
} }
}, { }, {
...@@ -247,7 +252,8 @@ ...@@ -247,7 +252,8 @@
"titleText": "收货地址", "titleText": "收货地址",
"autoBackButton": true "autoBackButton": true
} }
} },
"enablePullDownRefresh": true
} }
}, { }, {
"path": "pages/purchase/purchase", "path": "pages/purchase/purchase",
...@@ -419,7 +425,8 @@ ...@@ -419,7 +425,8 @@
"titleText": "采购计划", "titleText": "采购计划",
"autoBackButton": true "autoBackButton": true
} }
} },
"enablePullDownRefresh": true
} }
}, },
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="order view"> <view class="order view">
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="listview"> <view class="listview">
<list class="cell-list" :show-scrollbar='false'> <list class="cell-list" :show-scrollbar='false' loadmoreoffset='100' @loadmore="scrolltolower">
<cell @click="handleChecked(item)" v-for="item in lists" :key='item.NUMBER'> <cell @click="handleChecked(item)" v-for="item in lists" :key='item.NUMBER'>
<view class="cell-list-block"> <view class="cell-list-block">
<text class="icon-address">{{item.NAME_ORG1.slice(0,1)}}</text> <text class="icon-address">{{item.NAME_ORG1.slice(0,1)}}</text>
...@@ -61,6 +61,12 @@ ...@@ -61,6 +61,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
lists: [], lists: [],
selectedAddress: {}, selectedAddress: {},
toPageParams: { toPageParams: {
...@@ -88,11 +94,24 @@ ...@@ -88,11 +94,24 @@
this.toPageParams.head = JSON.parse(head) this.toPageParams.head = JSON.parse(head)
} }
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getAddress(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.getAddress() this.reset()
this.getAddress(true)
}, },
methods: { methods: {
async getAddress() { async getAddress(isRefresh) {
if (this.loadParams.isDone) {
return
}
const { const {
PARTNER, PARTNER,
NAME_ORG1, NAME_ORG1,
...@@ -108,12 +127,53 @@ ...@@ -108,12 +127,53 @@
C_O_NAME C_O_NAME
} }
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiAddressSelect(params) const res = await apiAddressSelect(params)
this.lists = res.DATA.map((item) => { uni.hideLoading();
const {
DATA,
TOTAL
} = res
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
const dataMap = DATA && DATA.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
console.log('getAddress', res)
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getAddress()
} else {
this.loadParams.isDone = true
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
}, },
handleChecked(item) { handleChecked(item) {
this.selectedAddress = item this.selectedAddress = item
......
...@@ -23,16 +23,15 @@ ...@@ -23,16 +23,15 @@
<view class="filter-title"> <view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text <button type="default" class="filter-btn filter-btn-active"><text
class="filter-btn__text filter-btn-active__text">一周内</text></button> class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)" <button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" class="filter-btn" v-for="item in 3" :class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
:key='item'>
<text class="filter-btn__text" <text class="filter-btn__text"
:class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button> :class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<image @click="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}" <image @tap="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image> src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view> </view>
<view class="filter-content"> <view class="filter-content">
<button type="default" @click="handleFilter(item+3)" class="filter-btn" <button type="default" @tap="handleFilter(item+3)" class="filter-btn"
:class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'><text :class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'><text
class="filter-btn__text" class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button> :class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
...@@ -420,7 +419,7 @@ ...@@ -420,7 +419,7 @@
.icon-arrow { .icon-arrow {
width: 32rpx; width: 32rpx;
height: 20rpx; height: 20rpx;
margin-left: 12rpx; // margin-left: 12rpx;
margin-top: 24rpx; margin-top: 24rpx;
transition-property: transform; transition-property: transform;
transition-duration: 0.15s; transition-duration: 0.15s;
...@@ -453,17 +452,21 @@ ...@@ -453,17 +452,21 @@
line-height: 68rpx; line-height: 68rpx;
color: #8e8e8e; color: #8e8e8e;
font-size: 24rpx; font-size: 24rpx;
text-align: center;
} }
.filter-btn-active { .filter-btn-active {
background: #f61d30; background: #f61d30;
color: #fff; color: #fff;
border: 2rpx solid #f61d30; border: 2rpx solid #f61d30;
box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56); // box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56);
} }
.filter-btn-active__text { .filter-btn-active__text {
color: #fff; color: #fff;
height: 68rpx;
line-height: 68rpx;
background: #f61d30;
} }
.filter-content { .filter-content {
...@@ -471,6 +474,10 @@ ...@@ -471,6 +474,10 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
uni-button:after {
border: 0
}
.empty { .empty {
height: 124rpx; height: 124rpx;
} }
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
<view class="filter-title"> <view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text <button type="default" class="filter-btn filter-btn-active"><text
class="filter-btn__text filter-btn-active__text">一周内</text></button> class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)" <button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" class="filter-btn" v-for="item in 3" :class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'><text
:key='item'><text class="filter-btn__text" class="filter-btn__text"
:class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button> :class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<image @click="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}" <image @tap="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image> src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view> </view>
<view class="filter-content"> <view class="filter-content">
<button type="default" @click="handleFilter(item+3)" class="filter-btn" <button type="default" @tap="handleFilter(item+3)" class="filter-btn"
:class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'> :class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'>
<text class="filter-btn__text" <text class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button> :class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
.icon-arrow { .icon-arrow {
width: 32rpx; width: 32rpx;
height: 20rpx; height: 20rpx;
margin-left: 12rpx; // margin-left: 12rpx;
margin-top: 24rpx; margin-top: 24rpx;
transition-property: transform; transition-property: transform;
transition-duration: 0.15s; transition-duration: 0.15s;
...@@ -370,17 +370,25 @@ ...@@ -370,17 +370,25 @@
line-height: 68rpx; line-height: 68rpx;
color: #8e8e8e; color: #8e8e8e;
font-size: 24rpx; font-size: 24rpx;
text-align: center;
} }
.filter-btn-active { .filter-btn-active {
background: #f61d30; background: #f61d30;
color: #fff; color: #fff;
border: 2rpx solid #f61d30; border: 2rpx solid #f61d30;
box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56); // box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56);
} }
.filter-btn-active__text { .filter-btn-active__text {
color: #fff; color: #fff;
height: 68rpx;
line-height: 68rpx;
background: #f61d30;
}
uni-button:after {
border: 0
} }
.filter-content { .filter-content {
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
<view class="filter-title"> <view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text <button type="default" class="filter-btn filter-btn-active"><text
class="filter-btn__text filter-btn-active__text">一周内</text></button> class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)" <button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" class="filter-btn" v-for="item in 3" :class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'><text
:key='item'><text class="filter-btn__text" class="filter-btn__text"
:class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button> :class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<image @click="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}" <image @tap="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image> src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view> </view>
<view class="filter-content"> <view class="filter-content">
<button type="default" @click="handleFilter(item+3)" class="filter-btn" <button type="default" @tap="handleFilter(item+3)" class="filter-btn"
:class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'> :class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'>
<text class="filter-btn__text" <text class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button> :class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
...@@ -108,7 +108,13 @@ ...@@ -108,7 +108,13 @@
page: { page: {
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
} },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
} }
}, },
computed: { computed: {
...@@ -163,6 +169,9 @@ ...@@ -163,6 +169,9 @@
} = res } = res
const data_list = DATA; const data_list = DATA;
this.page.PAGE = PAGE this.page.PAGE = PAGE
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
this.isNoData = (data_list.length <= 0); this.isNoData = (data_list.length <= 0);
...@@ -196,8 +205,12 @@ ...@@ -196,8 +205,12 @@
}, },
loadMore(e) { loadMore(e) {
console.log('loadMore') console.log('loadMore')
this.page.PAGE++ if (this.page.PAGE < this.loadParams.totalPage) {
this.loadData(); this.page.PAGE++
this.loadData();
} else {
this.loadingText = '已到底'
}
}, },
clear() { clear() {
this.dataList.length = 0; this.dataList.length = 0;
...@@ -326,7 +339,7 @@ ...@@ -326,7 +339,7 @@
.icon-arrow { .icon-arrow {
width: 32rpx; width: 32rpx;
height: 20rpx; height: 20rpx;
margin-left: 12rpx; // margin-left: 12rpx;
margin-top: 24rpx; margin-top: 24rpx;
transition-property: transform; transition-property: transform;
transition-duration: 0.15s; transition-duration: 0.15s;
...@@ -360,17 +373,21 @@ ...@@ -360,17 +373,21 @@
height: 68rpx; height: 68rpx;
line-height: 68rpx; line-height: 68rpx;
color: #8e8e8e; color: #8e8e8e;
text-align: center;
font-size: 24rpx; font-size: 24rpx;
} }
.filter-btn-active { .filter-btn-active {
background: #f61d30; background: #f61d30;
border: 2rpx solid #f61d30; border: 2rpx solid #f61d30;
box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56); // box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56);
} }
.filter-btn-active__text { .filter-btn-active__text {
color: #fff; color: #fff;
height: 68rpx;
line-height: 68rpx;
background: #f61d30;
} }
.filter-content { .filter-content {
...@@ -378,6 +395,10 @@ ...@@ -378,6 +395,10 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
uni-button:after {
border: 0
}
.refresh { .refresh {
justify-content: center; justify-content: center;
} }
...@@ -421,6 +442,7 @@ ...@@ -421,6 +442,7 @@
} }
.loading-more { .loading-more {
flex: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 14px; padding-top: 14px;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
</view> </view>
<list class="scroll-area view"> <list class="scroll-area view" loadmoreoffset='100' @loadmore="scrolltolower" :show-scrollbar='false'>
<cell v-for="(item,index) in lists" :key="item.plan_number"> <cell v-for="(item,index) in lists" :key="item.plan_number">
<view class="scroll-item"> <view class="scroll-item">
<view class="item-block item-block-code"> <view class="item-block item-block-code">
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
selectedSalePlan: {}, selectedSalePlan: {},
selectedSalePlanTypes: [], selectedSalePlanTypes: [],
typesIndex: 0, typesIndex: 0,
...@@ -147,30 +153,83 @@ ...@@ -147,30 +153,83 @@
}, },
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getSalesPlan(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.condition.RT_GJAHR[0].LOW = timeFormat(new Date(), 'yyyy') this.condition.RT_GJAHR[0].LOW = timeFormat(new Date(), 'yyyy')
this.getSalesPlanTypes(); this.reset()
this.getSalesPlanTypes(true);
}, },
methods: { methods: {
async getSalesPlan() { async getSalesPlan(isRefresh) {
if (this.loadParams.isDone) {
return
}
const params = { const params = {
...this.page, ...this.page,
...this.condition ...this.condition
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiSalesPlan(params) const res = await apiSalesPlan(params)
uni.hideLoading();
const { const {
lt_result, lt_result,
page, page,
pagesize pagesize,
total
} = res } = res
this.page.PAGE = page this.page.PAGE = page
this.page.PAGESIZE = pagesize this.page.PAGESIZE = pagesize
this.lists = lt_result.map((item) => { this.loadParams.total = total
this.loadParams.totalPage = Math.ceil(total * 1 / this.page.PAGESIZE * 1)
const dataMap = lt_result && lt_result.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getSalesPlan()
} else {
this.loadParams.isDone = true
}
}, },
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
},
async getSalesPlanTypes() { async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect() const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA this.selectedSalePlanTypes = res.DATA
......
...@@ -590,9 +590,10 @@ ...@@ -590,9 +590,10 @@
} }
.title-first__text { .title-first__text {
font-size: 28rpx; font-size: 28px;
color: #333333; color: #333333;
font-weight: 600; font-weight: 600;
font-family: AvenirNext, AvenirNext-BoldItalic;
} }
...@@ -702,7 +703,7 @@ ...@@ -702,7 +703,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 40rpx; height: 40rpx;
margin-top: 48rpx; margin-top: 38rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 0 24rpx; padding: 0 24rpx;
} }
......
...@@ -33,36 +33,40 @@ ...@@ -33,36 +33,40 @@
</button> </button>
</view> </view>
<uni-swipe-action class="planout-block-lists"> <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150'
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.ID' :auto-close="false" :disabled='true' @scrolltolower='scrolltolower'>
:show="isOpened" @click="handleClick"> <uni-swipe-action class="planout-block-lists">
<template v-slot:left> <uni-swipe-action-item v-for="(item,index) in lists" :key='item.ID' :auto-close="false"
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text :disabled='true' :show="isOpened" @click="handleClick">
class="swipe-right-block__text" <template v-slot:left>
:class="{'swipe-right-block__active':item.checked}"></text> <view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
</view> class="swipe-right-block__text"
</template> :class="{'swipe-right-block__active':item.checked}"></text>
<view class="middle view planout-block-item"> </view>
<view class="text-block"> </template>
<text class="middle-date middle-date-select">商机编码</text> <view class="middle view planout-block-item">
<text class="middle-date-des middle-date-des-select">{{item.ID}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">商机编码</text>
<view class="text-block"> <text class="middle-date-des middle-date-des-select">{{item.ID}}</text>
<text class="middle-date middle-date-select">商机名称</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.NAME}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">商机名称</text>
<view class="text-block"> <text class="middle-date-des middle-date-des-select">{{item.NAME}}</text>
<text class="middle-date middle-date-select">客户编号</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.CUSTOMERCODE}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">客户编号</text>
<view class="text-block text-block-last"> <text class="middle-date-des middle-date-des-select">{{item.CUSTOMERCODE}}</text>
<text class="middle-date middle-date-select">客户名称</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.CUSTOMERNAME}}</text> <view class="text-block text-block-last">
<text class="middle-date middle-date-select">客户名称</text>
<text class="middle-date-des middle-date-des-select">{{item.CUSTOMERNAME}}</text>
</view>
</view> </view>
</view>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</scroll-view>
</view> </view>
</view> </view>
</template> </template>
...@@ -89,6 +93,12 @@ ...@@ -89,6 +93,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
lists: [], lists: [],
selectedBusiness: {}, selectedBusiness: {},
selectedGroupClient: {}, selectedGroupClient: {},
...@@ -104,6 +114,11 @@ ...@@ -104,6 +114,11 @@
'height': `${this.sysinfo.safeArea.top + 44}px` 'height': `${this.sysinfo.safeArea.top + 44}px`
} }
}, },
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 297- 44 - 20}px`
}
}
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedBusiness); // console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedBusiness);
...@@ -142,8 +157,17 @@ ...@@ -142,8 +157,17 @@
this.toPageParams.page = from this.toPageParams.page = from
} }
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getBusiness(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.getBusiness(); this.reset()
this.getBusiness(true);
}, },
mounted() { mounted() {
console.log('监听到事件来自 update'); console.log('监听到事件来自 update');
...@@ -157,7 +181,11 @@ ...@@ -157,7 +181,11 @@
}) })
}, },
methods: { methods: {
async getBusiness() { async getBusiness(isRefresh) {
if (this.loadParams.isDone) {
return
}
const { const {
BUNAME, BUNAME,
OWNERCODE, OWNERCODE,
...@@ -171,15 +199,58 @@ ...@@ -171,15 +199,58 @@
CUNAME: '' CUNAME: ''
}, },
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiBusinessSelect(params) const res = await apiBusinessSelect(params)
this.lists = res.DATA.map((item) => { uni.hideLoading();
const {
DATA,
TOTAL
} = res
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
const dataMap = res.DATA.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
console.log('ddd2', res)
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getBusiness()
} else {
this.loadParams.isDone = true
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
}, },
search() { search() {
this.reset()
this.getBusiness(true)
}, },
bindPickerChange(e) { bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
......
...@@ -32,35 +32,39 @@ ...@@ -32,35 +32,39 @@
</button> </button>
</view> </view>
<uni-swipe-action class="planout-block-lists"> <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150'
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.ID' :auto-close="false" :disabled='true' @scrolltolower='scrolltolower'>
:show="isOpened" @click="handleClick"> <uni-swipe-action class="planout-block-lists">
<template v-slot:left> <uni-swipe-action-item v-for="(item,index) in lists" :key='item.ID' :auto-close="false"
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text :disabled='true' :show="isOpened" @click="handleClick">
class="swipe-right-block__text" <template v-slot:left>
:class="{'swipe-right-block__active':item.checked}"></text> <view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
</view> class="swipe-right-block__text"
</template> :class="{'swipe-right-block__active':item.checked}"></text>
<view class="middle view planout-block-item"> </view>
<view class="text-block"> </template>
<text class="middle-date middle-date-select">团购编码</text> <view class="middle view planout-block-item">
<text class="middle-date-des middle-date-des-select">{{item.ID}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">团购编码</text>
<view class="text-block"> <text class="middle-date-des middle-date-des-select">{{item.ID}}</text>
<text class="middle-date middle-date-select">团购名称</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.OBJNAME}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">团购名称</text>
<view class="text-block"> <text class="middle-date-des middle-date-des-select">{{item.OBJNAME}}</text>
<text class="middle-date middle-date-select">城市</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.CITYDESC}}</text> <view class="text-block">
</view> <text class="middle-date middle-date-select">城市</text>
<view class="text-block text-block-last"> <text class="middle-date-des middle-date-des-select">{{item.CITYDESC}}</text>
<text class="middle-date middle-date-select">地址</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.ADDRESS}}</text> <view class="text-block text-block-last">
<text class="middle-date middle-date-select">地址</text>
<text class="middle-date-des middle-date-des-select">{{item.ADDRESS}}</text>
</view>
</view> </view>
</view> </uni-swipe-action-item>
</uni-swipe-action-item> </uni-swipe-action>
</uni-swipe-action> </scroll-view>
</view> </view>
</view> </view>
</template> </template>
...@@ -86,6 +90,12 @@ ...@@ -86,6 +90,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
lists: [], lists: [],
selectedGroupClient: {}, selectedGroupClient: {},
selectedSalePlanTypes: [{ selectedSalePlanTypes: [{
...@@ -114,6 +124,11 @@ ...@@ -114,6 +124,11 @@
'height': `${this.sysinfo.safeArea.top + 44}px` 'height': `${this.sysinfo.safeArea.top + 44}px`
} }
}, },
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 237- 44 - 20}px`
}
}
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
...@@ -154,11 +169,24 @@ ...@@ -154,11 +169,24 @@
this.toPageParams.page = from this.toPageParams.page = from
} }
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getGroupClient(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.getGroupClient() this.reset()
this.getGroupClient(true)
}, },
methods: { methods: {
async getGroupClient() { async getGroupClient(isRefresh) {
if (this.loadParams.isDone) {
return
}
const { const {
INFOTP, INFOTP,
COMPANY_NAME COMPANY_NAME
...@@ -170,12 +198,52 @@ ...@@ -170,12 +198,52 @@
COMPANY_NAME COMPANY_NAME
}, },
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiGroupClientSelect(params) const res = await apiGroupClientSelect(params)
this.lists = res.DATA.map((item) => { uni.hideLoading();
const {
DATA,
TOTAL
} = res
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
const dataMap = DATA && DATA.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
console.log('ddd2', res)
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getGroupClient()
} else {
this.loadParams.isDone = true
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
}, },
// async getSalesPlanTypes() { // async getSalesPlanTypes() {
// const res = await apiSalesPlanTypesSelect() // const res = await apiSalesPlanTypesSelect()
...@@ -183,8 +251,8 @@ ...@@ -183,8 +251,8 @@
// console.log('getSalesPlanTypes', res) // console.log('getSalesPlanTypes', res)
// }, // },
search() { search() {
this.page.PAGE = 1 this.reset()
this.getGroupClient() this.getGroupClient(true)
}, },
bindPickerTypesChange(e) { bindPickerTypesChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
...@@ -334,7 +402,6 @@ ...@@ -334,7 +402,6 @@
.planout-block-lists { .planout-block-lists {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden;
} }
.uni-swipe { .uni-swipe {
......
...@@ -22,36 +22,39 @@ ...@@ -22,36 +22,39 @@
</button> </button>
</view> </view>
<uni-swipe-action class="planout-block-lists"> <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150'
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.PRODUCT_ID' :auto-close="false" @scrolltolower='scrolltolower'>
:disabled='true' :show="isOpened" @click="handleClick"> <uni-swipe-action class="planout-block-lists">
<template v-slot:left> <uni-swipe-action-item v-for="(item,index) in lists" :key='item.PRODUCT_ID' :auto-close="false"
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text :disabled='true' :show="isOpened" @click="handleClick">
class="swipe-right-block__text" <template v-slot:left>
:class="{'swipe-right-block__active':item.checked}"></text> <view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
class="swipe-right-block__text"
:class="{'swipe-right-block__active':item.checked}"></text>
</view>
</template>
<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.PRODUCT_ID}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">描述</text>
<text class="middle-date-des middle-date-des-select">{{item.SHORT_TEXT}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">产品类型</text>
<text class="middle-date-des middle-date-des-select">{{item.CHFL_D}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date middle-date-select">价格</text>
<text class="middle-date-des middle-date-des-select">{{item.NORMS}}</text>
</view>
</view> </view>
</template>
<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.PRODUCT_ID}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">描述</text>
<text class="middle-date-des middle-date-des-select">{{item.SHORT_TEXT}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">产品类型</text>
<text class="middle-date-des middle-date-des-select">{{item.CHFL_D}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date middle-date-select">价格</text>
<text class="middle-date-des middle-date-des-select">{{item.NORMS}}</text>
</view>
</view>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</scroll-view>
</view> </view>
</view> </view>
</template> </template>
...@@ -75,8 +78,6 @@ ...@@ -75,8 +78,6 @@
data() { data() {
return { return {
isOpened: 'none', isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0,
condition: { condition: {
product: '', product: '',
code: '', code: '',
...@@ -85,6 +86,12 @@ ...@@ -85,6 +86,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
lists: [{ lists: [{
checked: false, checked: false,
"PRODUCT_ID": "040001005280116160", "PRODUCT_ID": "040001005280116160",
...@@ -111,6 +118,11 @@ ...@@ -111,6 +118,11 @@
return { return {
'height': `${this.sysinfo.safeArea.top + 44}px` 'height': `${this.sysinfo.safeArea.top + 44}px`
} }
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 237- 44 - 20}px`
}
} }
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
...@@ -143,6 +155,23 @@ ...@@ -143,6 +155,23 @@
// }) // })
// #endif // #endif
}, },
// onLoad(options) {
// setTimeout(function() {
// console.log('start pulldown');
// }, 1000);
// uni.startPullDownRefresh();
// },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getProduct(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
// onReachBottom() {
// console.log('onReachBottom');
// },
onLoad(option) { onLoad(option) {
console.log('select-product', option) console.log('select-product', option)
const { const {
...@@ -157,14 +186,15 @@ ...@@ -157,14 +186,15 @@
this.toPageParams.head = JSON.parse(head) this.toPageParams.head = JSON.parse(head)
}, },
created() { created() {
this.getProduct(); this.reset()
this.getProduct(true);
}, },
methods: { methods: {
search() { async getProduct(isRefresh) {
this.page.PAGE = 1 if (this.loadParams.isDone) {
this.getProduct() return
}, }
async getProduct() {
const params = { const params = {
...this.page, ...this.page,
"MODE": modeMap[this.toPageParams.page], "MODE": modeMap[this.toPageParams.page],
...@@ -174,16 +204,57 @@ ...@@ -174,16 +204,57 @@
"PRODUCT_ID": this.condition.code, "PRODUCT_ID": this.condition.code,
}, },
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiProductSelect(params) const res = await apiProductSelect(params)
uni.hideLoading();
this.lists = res && res.DATA.map((item) => { const {
DATA,
TOTAL
} = res
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
const dataMap = DATA && DATA.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
}, },
bindPickerChange(e) { scrolltolower() {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('onReachBottom');
this.index = e.detail.value if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getProduct()
} else {
this.loadParams.isDone = true
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
},
search() {
this.reset()
this.getProduct(true)
}, },
handleClick(e, content, index) { handleClick(e, content, index) {
console.log('click当前索引:', e, content, index); console.log('click当前索引:', e, content, index);
...@@ -324,10 +395,13 @@ ...@@ -324,10 +395,13 @@
z-index: 10; z-index: 10;
} }
.scroll-area {
overflow-y: scroll;
}
.planout-block-lists { .planout-block-lists {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden;
} }
.uni-swipe { .uni-swipe {
......
...@@ -58,36 +58,40 @@ ...@@ -58,36 +58,40 @@
</button> </button>
</view> </view>
<uni-swipe-action class="planout-block-lists"> <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150'
<uni-swipe-action-item v-for="(item,index) in lists" :key='index' :threshold='100' :auto-close="false" @scrolltolower='scrolltolower'>
:disabled='true' :show="isOpened"> <uni-swipe-action class="planout-block-lists">
<template v-slot:left> <uni-swipe-action-item v-for="(item,index) in lists" :key='index' :threshold='100'
<view class="swipe-right-block" @click.stop="handleChecked($event,item, index)"><text :auto-close="false" :disabled='true' :show="isOpened">
class="swipe-right-block__text" <template v-slot:left>
:class="{'swipe-right-block__active':item.checked}"></text> <view class="swipe-right-block" @click.stop="handleChecked($event,item, index)"><text
</view> class="swipe-right-block__text"
</template> :class="{'swipe-right-block__active':item.checked}"></text>
<view class="middle view planout-block-item"> </view>
<view class="text-block"> </template>
<text class="middle-date">计划编码</text> <view class="middle view planout-block-item">
<text class="middle-date-des">{{item.PLAN_NUMBER}}</text> <view class="text-block">
</view> <text class="middle-date">计划编码</text>
<view class="text-block"> <text class="middle-date-des">{{item.PLAN_NUMBER}}</text>
<text class="middle-date">类型</text> </view>
<text class="middle-date-des">{{item.PLAN_TYPE}}</text> <view class="text-block">
</view> <text class="middle-date">类型</text>
<view class="text-block"> <text class="middle-date-des">{{item.PLAN_TYPE}}</text>
<text class="middle-date">产品</text> </view>
<text class="middle-date-des">{{item.WLYBRAND}}</text> <view class="text-block">
</view> <text class="middle-date">产品</text>
<view class="text-block text-block-last"> <text class="middle-date-des">{{item.WLYBRAND}}</text>
<text class="middle-date">可用件数</text> </view>
<text class="middle-date-des">{{item.REMAIN_QTY}}</text> <view class="text-block text-block-last">
<text class="middle-date">可用件数</text>
<text class="middle-date-des">{{item.REMAIN_QTY}}</text>
</view>
</view> </view>
</view>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</scroll-view>
</view> </view>
</view> </view>
</template> </template>
...@@ -115,6 +119,12 @@ ...@@ -115,6 +119,12 @@
"PAGE": "1", "PAGE": "1",
"PAGESIZE": "10", "PAGESIZE": "10",
}, },
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
lists: [{ lists: [{
checked: false, checked: false,
"REPORT_TYPE": "正式提报", "REPORT_TYPE": "正式提报",
...@@ -147,6 +157,11 @@ ...@@ -147,6 +157,11 @@
'height': `${this.sysinfo.safeArea.top + 44}px` 'height': `${this.sysinfo.safeArea.top + 44}px`
} }
}, },
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 297- 44 - 20}px`
}
}
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedSalePlan); // console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedSalePlan);
...@@ -190,13 +205,27 @@ ...@@ -190,13 +205,27 @@
this.toPageParams.head = JSON.parse(head) this.toPageParams.head = JSON.parse(head)
} }
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getSalesPlan(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.condition.GJAHR = timeFormat(new Date(), 'yyyy') this.condition.GJAHR = timeFormat(new Date(), 'yyyy')
this.condition.MONAT = timeFormat(new Date(), 'mm') this.condition.MONAT = timeFormat(new Date(), 'mm')
this.getSalesPlanTypes(); this.getSalesPlanTypes();
this.reset()
this.getSalesPlan(true);
}, },
methods: { methods: {
async getSalesPlan() { async getSalesPlan(isRefresh) {
if (this.loadParams.isDone) {
return
}
const { const {
GJAHR, GJAHR,
MONAT, MONAT,
...@@ -213,18 +242,62 @@ ...@@ -213,18 +242,62 @@
PLAN_TYPE PLAN_TYPE
}, },
} }
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiSalesPlanSelect(params) const res = await apiSalesPlanSelect(params)
this.lists = res.DATA.map((item) => { uni.hideLoading();
const {
DATA,
TOTAL
} = res
this.loadParams.total = TOTAL
this.loadParams.totalPage = Math.ceil(TOTAL * 1 / this.page.PAGESIZE * 1)
const dataMap = DATA && DATA.map((item) => {
item.checked = false item.checked = false
return item return item
}) })
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getSalesPlan()
} else {
this.loadParams.isDone = true
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
}, },
async getSalesPlanTypes() { async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect() const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA this.selectedSalePlanTypes = res.DATA
}, },
search() { search() {
this.getSalesPlan(); this.reset()
this.getSalesPlan(true);
}, },
bindPickerTypesChange(e) { bindPickerTypesChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
......
...@@ -23,16 +23,15 @@ ...@@ -23,16 +23,15 @@
<view class="filter-title"> <view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text <button type="default" class="filter-btn filter-btn-active"><text
class="filter-btn__text filter-btn-active__text">一周内</text></button> class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)" <button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" class="filter-btn" v-for="item in 3" :class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
:key='item'>
<text class="filter-btn__text" <text class="filter-btn__text"
:class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button> :class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<image @click="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}" <image @tap="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image> src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view> </view>
<view class="filter-content"> <view class="filter-content">
<button type="default" @click="handleFilter(item+3)" class="filter-btn" <button type="default" @tap="handleFilter(item+3)" class="filter-btn"
:class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'><text :class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'><text
class="filter-btn__text" class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button> :class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
...@@ -414,7 +413,7 @@ ...@@ -414,7 +413,7 @@
.icon-arrow { .icon-arrow {
width: 32rpx; width: 32rpx;
height: 20rpx; height: 20rpx;
margin-left: 12rpx; // margin-left: 12rpx;
margin-top: 24rpx; margin-top: 24rpx;
transition-property: transform; transition-property: transform;
transition-duration: 0.15s; transition-duration: 0.15s;
...@@ -445,6 +444,7 @@ ...@@ -445,6 +444,7 @@
.filter-btn__text { .filter-btn__text {
height: 68rpx; height: 68rpx;
line-height: 68rpx; line-height: 68rpx;
text-align: center;
color: #8e8e8e; color: #8e8e8e;
font-size: 24rpx; font-size: 24rpx;
} }
...@@ -453,11 +453,14 @@ ...@@ -453,11 +453,14 @@
background: #f61d30; background: #f61d30;
color: #fff; color: #fff;
border: 2rpx solid #f61d30; border: 2rpx solid #f61d30;
box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56); // box-shadow: 0px 4rpx 12rpx 0px rgba(255, 29, 50, 0.56);
} }
.filter-btn-active__text { .filter-btn-active__text {
color: #fff; color: #fff;
height: 68rpx;
line-height: 68rpx;
background: #f61d30;
} }
.filter-content { .filter-content {
...@@ -465,6 +468,10 @@ ...@@ -465,6 +468,10 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
uni-button:after {
border: 0
}
.empty { .empty {
height: 124rpx; height: 124rpx;
} }
......
...@@ -125,24 +125,24 @@ ...@@ -125,24 +125,24 @@
...mapState(['sysinfo', 'userInfo']) ...mapState(['sysinfo', 'userInfo'])
}, },
async created() { async created() {
// this.getBpPrice() this.getBpPrice()
const parm = { // const parm = {
"user_bp": "50000215", // "user_bp": "50000215",
"role": "WLY001", // "role": "WLY001",
"page": "1", // "page": "1",
"pagesize": "1", // "pagesize": "1",
"PROCESS_TYPE": [{ // "PROCESS_TYPE": [{
"SIGN": "I", // "SIGN": "I",
"OPTION": "EQ", // "OPTION": "EQ",
"LOW": "ZS02" // "LOW": "ZS02"
}], // }],
"zzfld00002j": [{ // "zzfld00002j": [{
"SIGN": "I", // "SIGN": "I",
"OPTION": "EQ", // "OPTION": "EQ",
"LOW": "V013" // "LOW": "V013"
}] // }]
} // }
apiGetSalesOrder(parm) // apiGetSalesOrder(parm)
}, },
methods: { methods: {
async getBpPrice() { async getBpPrice() {
......
...@@ -78,6 +78,13 @@ class Request { ...@@ -78,6 +78,13 @@ class Request {
// title: response.errMsg // title: response.errMsg
// }); // });
// } // }
if (response.statusCode == 500) {
uni.showToast({
title: '服务器异常',
duration: 2000,
icon: 'none'
})
}
reject(response) reject(response)
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
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