Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘川
wly-APP
Commits
e51fec4a
Commit
e51fec4a
authored
Sep 20, 2022
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
要货
parent
c2efb3ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
432 additions
and
128 deletions
+432
-128
group-baseinfo.nvue
pages/group-buy/group-baseinfo.nvue
+21
-4
group-buy.nvue
pages/group-buy/group-buy.nvue
+5
-3
quota-order.nvue
pages/group-buy/quota-order.nvue
+1
-1
purchase.nvue
pages/purchase/purchase.nvue
+405
-120
No files found.
pages/group-buy/group-baseinfo.nvue
View file @
e51fec4a
...
...
@@ -160,6 +160,12 @@
],
}
},
props: {
isKeepData: {
type: Boolean,
default: false
}
},
computed: {
...mapState(['groupOrder', 'userInfo']),
},
...
...
@@ -174,7 +180,7 @@
this.initGroupData()
},
mounted() {
console.log('监听到事件来自 update');
console.log(
this.groupOrder,
'监听到事件来自 update');
let _this = this
uni.$on('selectedBusiness', function(data) {
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data);
...
...
@@ -272,6 +278,17 @@
...ITEM[0]
}
this.HEADINFO = HEAD
if (this.isKeepData) {
this.selectedGroupClient = {
'OBJNAME': this.groupOrder.INFO.GRPNAME,
'ID': this.groupOrder.INFO.GRPUTID
}
this.selectedBusiness = {
'ID': this.groupOrder.INFO.BUSOPPID, // 团购单位编码
'NAME': this.groupOrder.INFO.BUSINAME // 团购单位名称
}
this.condition.BUSOPPID = this.groupOrder.INFO.BUSOPPID
}
},
bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
...
...
@@ -281,13 +298,13 @@
console.log('picker发送选择改变,携带值为', e.detail.value)
this.paintDesignIndex = e.detail.value
switch (e.detail.value) {
case
0
:
case
1
:
this.condition.ZZFLD000098 = this.condition.GRPUTID
break;
case
1
:
case
2
:
this.condition.ZZFLD000098 = this.selectedGroupClient.OBJNAME
break;
case
2
:
case
3
:
uni.navigateTo({
url: `/pages/select-paint-design/select-paint-design`
});
...
...
pages/group-buy/group-buy.nvue
View file @
e51fec4a
...
...
@@ -65,7 +65,7 @@
</view>
</view>
</view>
<component :style="componentHeight" :is="currentTabComponent" @click="changeComponent" @submit="submit">
<component :style="componentHeight" :is="currentTabComponent"
:key="currentTabComponent" :is-keep-data='isKeepData'
@click="changeComponent" @submit="submit">
</component>
</view>
</view>
...
...
@@ -92,7 +92,8 @@
data() {
return {
currentTabComponent: 'groupBaseinfo',
topHeight: ''
topHeight: '',
isKeepData: false
}
},
computed: {
...
...
@@ -171,7 +172,8 @@
return false
},
methods: {
changeComponent(com) {
changeComponent(com, status = false) {
this.isKeepData = status
this.currentTabComponent = com;
},
submit() {
...
...
pages/group-buy/quota-order.nvue
View file @
e51fec4a
...
...
@@ -406,7 +406,7 @@
this.$emit('click', 'orderUpload')
},
preStep() {
this.$emit('click', 'groupBaseinfo')
this.$emit('click', 'groupBaseinfo'
, true
)
},
...mapMutations(["$uStore"]),
}
...
...
pages/purchase/purchase.nvue
View file @
e51fec4a
<template>
<view class="purchase-page">
<view class="status_bar" :style="navHeight"></view>
<view class="tabs">
<uni-cell v-for="(item, index) in dataList" :key="item.id" class="tab-box">
<uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<!-- <uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'">
<div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}"
:class="{'refresh-icon-active': refreshFlag}"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading"
:contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{refreshText}}</text>
</div>
</uni-refresh> -->
<view class="block-detal-item">
<text class="detal-item-label">品牌</text>
<text class="detal-item-value">尖庄2101</text>
</view>
<uni-cell v-if="isLoading || dataList.length > 4">
<view class="loading-more">
<text class="loading-more-text">{{loadingText}}</text>
</view>
</uni-cell>
</uni-list>
<no-data class="no-data" v-if="isNoData" @retry="loadMore"></no-data>
</uni-cell>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view>
<view class="main" :style="mainHeight">
<list ref="list" class="scroll-area view" loadmoreoffset='100' @loadmore="scrolltolower"
:show-scrollbar='false'>
<refresh @refresh="refresh" :display="refreshing ? 'show' : 'hide'">
<!-- <loading-indicator></loading-indicator> -->
</refresh>
<cell v-for="(item,index) in lists" :key="item.plan_number">
<view class="scroll-item">
<view class="item-block item-block-code">
<text class="item-block-label">年度</text>
<text class="item-block-value">2022</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">发票类型</text>
<text class="item-block-value">100</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">产品</text>
<text class="item-block-value">2022</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">开票总量</text>
<text class="item-block-value">100</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">已发数量</text>
<text class="item-block-value">2022</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">剩余数量</text>
<text class="item-block-value">100</text>
</view>
<view class="bottom">
<view class="bottom-btn">
<button class="btn btn-l" type="default" @tap="purchaseBtn">
<text class="btn-text btn-text-l">立即要货</text>
</button>
</view>
</view>
</view>
</cell>
<cell>
<view class="loading-more" v-if='lists.length>2'>
<text class="loading-more-text">{{loadingText}}</text>
</view>
</cell>
<view class="planout-block-item__last"> </view>
</list>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
import uniList from '@/components/uni-list.vue';
import uniCell from '@/components/uni-cell.vue';
import uniRefresh from '@/components/uni-refresh.vue';
import uniLoadMore from '@/components/uni-load-more.vue';
import noData from '@/components/nodata.nvue';
import {
mapState
} from 'vuex'
import {
apiPurchaseList
} from '@/servers/purchaseList.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
},
data() {
return {
dataList: ['1','2','3','1','2','3','1','2'],
navigateFlag: false,
pulling: false,
refreshing: false,
refreshFlag: false,
refreshText: "",
isLoading: false,
loadingText: '加载中...',
isNoData: false,
pulling: false,
angle: 0,
loadingMoreText: {
contentdown: '',
contentrefresh: '',
contentnomore: ''
},
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==",
condition: {
USER_BP: '50000215',
ROLE: 'WLY001',
PROCESS_TYPE: [{
"SIGN": "I",
"OPTION": "EQ",
LOW: '',
HIGH: ''
}],
POSTING_DATE: [{
"SIGN": "I",
"OPTION": "BT",
LOW: '',
HIGH: ''
}]
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
return {
scrollTop: 0,
isOpened: 'none',
loadingText: '加载中...',
refreshing: false,
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
selectedSalePlan: {},
typesIndex: 0,
lists: [],
}
},
computed: {
...mapState(['sysinfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
computed: {
...mapState(['sysinfo', 'userInfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
mainHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 - 156 }px`
}
},
},
onReady() {
},
created() {
this.reset()
this.getSalesPlanTypes(true);
},
methods: {
purchaseBtn() {
console.log('00')
uni.navigateTo({
url: '/pages/purchase-main/purchase-main'
})
},
async getSalesPlan(isRefresh) {
if (this.loadParams.isDone) {
return
}
const params = {
...this.page,
}
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await apiPurchaseList(params)
uni.hideLoading();
const {
data,
page,
pagesize,
total
} = res
this.page.PAGE = page * 1
this.page.PAGESIZE = pagesize * 1
this.loadParams.total = total * 1
this.loadParams.totalPage = Math.ceil(total * 1 / this.page.PAGESIZE * 1)
const dataMap = data && data.map((item) => {
item.checked = false
return item
})
if (isRefresh) {
this.lists = dataMap
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(dataMap)
}
setTimeout(() => {
this.refreshing = false;
}, 300)
},
refresh(e) {
this.refreshing = true;
this.reset()
this.getSalesPlan(true)
// #ifdef APP-NVUE
try {
// console.log('-------', this.$refs.list)
this.$refs.list.resetLoadmore();
} catch (e) {
console.log('onrefresh', e)
}
// #endif
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getSalesPlan()
} else {
this.loadParams.isDone = true
this.loadingText = '-- 到底了 --'
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
this.loadingText = '加载中'
},
async getSalesPlanTypes() {
const params = {
"object_id": [{
"sign": "I",
"option": "EQ",
"low": "A0002",
"HIGH": ""
}]
}
this.getSalesPlan()
},
}
}
</script>
<style lang="scss" scoped>
.
purchase-page
{
.
view
{
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
}
.header-bg-img {
width: 750rpx;
}
.lists {
position: relative;
flex-direction: column;
background: #f0f4f5;
flex: 1;
}
/* #ifndef APP-PLUS */
page {
width: 100%;
min-height: 100%;
display: flex;
background: $background-color-1;
.main {
position: relative;
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
}
.scroll-area {
overflow-y: scroll;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.text-block {
overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
flex: 1;
}
.
status_bar
{
height: var(--status-bar-height)
;
.
uni-list-cell-db
{
flex: 1
;
}
/* #endif */
.picker-block {
flex: 1;
}
.uni-input-text {
font-size: 14px;
color: #888;
}
.icon-arrow {
position: absolute;
right: 0;
top: 16px;
width: 12rpx;
height: 20rpx;
z-index: 10;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.tabs {
.planout-block-item {
margin-bottom: 32rpx;
}
.scroll-item {
flex: 1;
display: flex;
flex-direction: column;
padding: 0 7px;
width: 100%;
height: 100%;
}
.listview{
flex: 1;
background: #ffffff;
margin-top: 12px;
}
.tab-box {
flex: 1;
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
margin-bottom: 32rpx;
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.planout-block-item__last {
height: 40px;
}
.item-block {
overflow: hidden;
}
.item-block-label {
font-size: 24rpx;
color: #999;
flex: 3;
line-height: 56rpx;
}
.item-block-value {
align-items: center;
flex: 5.5;
font-size: 24rpx;
color: $text-base-color;
line-height: 56rpx;
}
.item-block-code {
}
.item-block-label-des {
flex: 1;
text-align: left;
font-size: 28rpx;
color: #333;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
.bottom {
margin-top: 36rpx;
flex: 1;
justify-content: center;
}
.bottom-btn{
width: 328rpx;
height: 92rpx;
border-radius: 50%;
justify-content: space-between;
align-items: center;
}
.btn {
flex: 1;
background: $wly-primary-color;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
</style>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment