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
66bc15fa
Commit
66bc15fa
authored
Mar 31, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增我的要货单界面
parent
6f46511b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1208 additions
and
15 deletions
+1208
-15
pages.json
pages.json
+30
-14
my-purchase.nvue
pages/my-purchase/my-purchase.nvue
+480
-0
order-item.nvue
pages/my-purchase/order-item.nvue
+397
-0
order-page.nvue
pages/my-purchase/order-page.nvue
+300
-0
usercenter.nvue
pages/usercenter/usercenter.nvue
+1
-1
No files found.
pages.json
View file @
66bc15fa
...
...
@@ -270,20 +270,6 @@
}
}
},{
"path"
:
"pages/logistics/logistics"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"物流跟踪"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/plan/plan"
,
"style"
:
{
"app-plus"
:
{
...
...
@@ -510,6 +496,36 @@
}
}
}
},
{
"path"
:
"pages/my-purchase/my-purchase"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"要货单"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/logistics/logistics"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"物流跟踪"
,
"autoBackButton"
:
true
}
}
}
}
],
"globalStyle"
:
{
...
...
pages/my-purchase/my-purchase.nvue
0 → 100644
View file @
66bc15fa
This diff is collapsed.
Click to expand it.
pages/my-purchase/order-item.nvue
0 → 100644
View file @
66bc15fa
<template>
<view class="order view">
<view class="top">
<text class="title-no">要货单号:TP10000021</text>
<view class="title-info">
<button class="title-info__status" type="default">待审批</button>
</view>
</view>
<view class="middle view">
<view class="middle-title">
<text class="middle-title__text">发货单号:FH200333222</text>
<image @click="checkLogistics" class="icon-car" src="@/static/image/order_car@3x.png" mode="aspectFit"></image>
</view>
<view class="text-block">
<text class="middle-date">苏州新川商贸公司</text>
<text class="middle-date-des">客户名称</text>
</view>
<view class="text-block-box">
<view class="text-block text-block-last">
<text class="middle-date">2021-08-06 05:14</text>
<text class="middle-date-des">申请时间</text>
</view>
<view class="text-block text-block-last">
<view class="middle-date-right">
<text class="dot"></text>
<text class="middle-date">一般</text>
</view>
<text class="middle-date-des middle-date-right">重要程度</text>
</view>
</view>
</view>
<view class="bottom view">
<view class="bottom-nav">
<view class="bottom-nav-arrow" @click="handleShowDetail">
<text class="arrow-des">明细</text>
<image class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
</view>
<view v-if="ishowDetail" class="bottom-content">
<view class="block-detal">
<view class="block-detal-item">
<text class="detal-item-label">品牌</text>
<text class="detal-item-value">尖庄2101</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">1618五粮液 500ml*6</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">未发货件数</text>
<text class="detal-item-value">220</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月计划量</text>
<text class="detal-item-value">7</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月剩余量</text>
<text class="detal-item-value">100</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当年剩余量</text>
<text class="detal-item-value">100</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">本次要货件数</text>
<text class="detal-item-value">200</text>
</view>
</view>
</view>
<view class="receive-info" :class="{'receive-info-auto':ishowReceiveDetail}">
<view class="block-detal-item">
<text class="detal-item-label detal-item-title">尽快发货</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">是否分流</text>
<text class="detal-item-value detal-item-value2">否</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">分流经销商</text>
<text class="detal-item-value detal-item-value2"></text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">收货单位</text>
<text class="detal-item-value detal-item-value2">步步高</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">喷码单位</text>
<text class="detal-item-value detal-item-value2">步步高</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">联系人电话</text>
<text class="detal-item-value detal-item-value2">738-14581240</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">收货地址</text>
<text class="detal-item-value detal-item-value2">黑龙江省黑河市嫩江县芒涌大道775号</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">备注</text>
<text class="detal-item-value detal-item-value2">快点发货</text>
</view>
<view class="block-detal-item attach-block">
<text class="detal-item-label">附件</text>
<image class="attach-file" src="@/static/image/avatar@3x.png" mode="aspectFit"></image>
</view>
<view class="float-btn-block">
<view class="float-btn" @click="handleShowReceiveDetail">
<text class="float-btn__text">{{ishowReceiveDetail?'收起':'展示完整信息'}}</text>
<image class="icon-arrow" :class="{'icon-arrow-rotate':!ishowReceiveDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
newsItem: {
type: Object,
default: function(e) {
return {}
}
}
},
data() {
return {
ishowDetail: true,
ishowReceiveDetail: true,
}
},
methods: {
click() {
this.$emit('click');
},
close(e) {
e.stopPropagation();
this.$emit('close');
},
handleShowDetail() {
this.ishowDetail = !this.ishowDetail
},
handleShowReceiveDetail() {
this.ishowReceiveDetail = !this.ishowReceiveDetail
},
checkLogistics(){
uni.navigateTo({
url:"/pages/logistics/logistics"
})
}
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.order {
flex: 1;
background: #ffffff;
border-radius: 16rpx 100rpx 16rpx 16rpx;
box-shadow: 0px 2px 4px 0px #dbe4ee;
margin-bottom: 60rpx;
margin-top: 28rpx;
padding-top: 30rpx;
}
.top {
height: 72rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
}
.title-no {
font-size: 24rpx;
color: #555555;
}
.title-info {
align-items: center;
margin-right: 26rpx;
}
.title-info__status {
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
border-radius: 8rpx 200rpx 200rpx 8rpx;
font-size: 12px;
color: #fff;
text-align: center;
}
.middle {
position: relative;
padding: 26rpx 32rpx;
}
.middle-title {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.middle-title__text {
font-weight: 500;
font-size: 32rpx;
color: $text-base-color;
font-family: PingFangSC, PingFangSC-Medium;
}
.icon-car {
width: 13px;
height: 13px;
margin-left: 16rpx;
}
.text-block {
flex: 1;
flex-direction: column;
margin-bottom: 32rpx;
}
.text-block-last {
margin-bottom: 0;
}
.middle-date {
font-size: 28rpx;
color: $text-base-color;
margin-bottom: 8rpx;
}
.middle-date-des {
font-size: 24rpx;
color: #999;
}
.text-block-box {
display: flex;
justify-content: space-between;
}
.middle-date-right {
display: flex;
align-items: center;
justify-content: flex-end;
}
.dot {
display: block;
width: 5px;
height: 5px;
background: #3bdc88;
border-radius: 50%;
margin-top: -4px;
margin-right: 7px;
}
.bottom {
padding: 0 50rpx 48rpx;
}
.bottom-nav {
height: 40rpx;
justify-content: flex-end;
align-items: center;
}
.bottom-nav-arrow {
align-items: center;
}
.arrow-des {
font-size: 24rpx;
color: #999;
}
.icon-arrow {
width: 7px;
height: 4px;
margin-left: 16rpx;
margin-top: 2px;
transition-property: transform;
transition-duration: 0.15s;
transform: rotate(0deg);
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
.bottom-content {
flex-direction: column;
margin-top: 48rpx;
}
.block-detal {
display: flex;
flex-direction: column;
background: #f8f8f8;
border-radius: 20rpx;
padding: 28rpx 32rpx;
margin-bottom: 16rpx;
}
.block-detal-last {
margin-bottom: 32rpx;
}
.block-detal-item {
display: flex;
margin-bottom: 32rpx;
justify-content: space-between;
}
.block-detal-item-last {
margin-bottom: 0;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
}
.detal-item-value2 {
font-size: 24rpx;
}
.receive-info {
position: relative;
display: flex;
flex-direction: column;
margin-top: 40rpx;
height: 240rpx;
overflow: hidden;
padding-bottom: 60rpx;
}
.receive-info-auto {
height: auto;
}
.detal-item-title {
color: #333;
font-size: 28rpx;
font-weight: 600;
}
.attach-block {
flex-direction: column;
}
.attach-file {
width: 94px;
height: 94px;
margin: 20rpx 20rpx 0 0;
}
.float-btn-block {
position: absolute;
left: 0;
bottom: 0;
z-index: 10;
width: 100%;
height: 120rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.float-btn {
padding: 0 20px;
height: 60rpx;
border: 0.5px solid #d8d8d9;
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>
pages/my-purchase/order-page.nvue
0 → 100644
View file @
66bc15fa
<template>
<view class="page-news">
<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>
<uni-cell v-for="(item, index) in dataList" :key="item.id">
<order-item :newsItem="item" @click="goDetail(item)"></order-item>
</uni-cell>
<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> -->
</view>
</template>
<script>
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 orderItem from './order-item.nvue';
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: [Number, String],
default: ''
}
},
data() {
return {
dataList: [],
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=="
}
},
created() {
this.pullTimer = null;
this.requestParams = {
columnId: this.nid,
minId: 0,
pageSize: 10,
column: 'id,post_id,title,author_name,cover,published_at,comments_count'
};
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this)
mediaQueryOb.observe({
minWidth: 768
}, matches => {
this._isWidescreen = matches;
})
// #endif
},
methods: {
loadData(refresh) {
if (this.isLoading) {
return;
}
this.isLoading = true;
this.isNoData = false;
this.requestParams.time = new Date().getTime() + '';
var startTime = new Date();
uni.request({
// url: this.$host + 'api/news',
url: 'https://unidemo.dcloud.net.cn/api/news',
data: this.requestParams,
success: (result) => {
var endTime = new Date();
const data = result.data;
this.isNoData = (data.length <= 0);
const data_list = data.map((news) => {
return {
id: this.newGuid() + news.id,
newsid: news.id,
article_type: 1,
datetime: (new Date(news.published_at.replace(/\-/g, '/')).getTime()),
title: news.title,
image_url: news.cover,
source: news.author_name,
comment_count: news.comments_count,
post_id: news.post_id
};
});
if (refresh) {
this.dataList = data_list;
this.requestParams.minId = 0;
} else {
this.dataList = this.dataList.concat(data_list);
this.requestParams.minId = data[data.length - 1].id;
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
}
});
},
loadMore(e) {
this.loadData();
},
clear() {
this.dataList.length = 0;
this.requestParams.minId = 0;
},
goDetail(detail) {
},
refreshData() {
if (this.isLoading) {
return;
}
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.loadData(true);
},
onrefresh(e) {
this.refreshData();
// #ifdef APP-NVUE
this.$refs.list.resetLoadmore();
// #endif
},
onpullingdown(e) {
if (this.refreshing) {
return;
}
// var angle = (e.pullingDistance) / e.viewHeight * 180;
// if (angle > 180) {
// angle = 180;
// }
// tab.angle = angle;
this.pulling = false;
if (Math.abs(e.pullingDistance) > Math.abs(e.viewHeight)) {
this.refreshFlag = true;
this.refreshText = "释放立即刷新";
} else {
this.refreshFlag = false;
this.refreshText = "下拉可以刷新";
}
},
newGuid() {
let s4 = function() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
}
return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4()).toUpperCase();
}
}
}
</script>
<style lang="scss" scoped>
.no-data {
flex: 1;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.page-news {
flex: 1;
flex-direction: column;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.listview {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
/* #ifndef MP-ALIPAY */
flex-direction: column;
/* #endif */
}
.refresh {
justify-content: center;
}
.refresh-view {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
width: 750rpx;
height: 64px;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
.refresh-icon {
width: 32px;
height: 32px;
transition-duration: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.loading-more {
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 28upx;
color: #999;
}
</style>
pages/usercenter/usercenter.nvue
View file @
66bc15fa
...
...
@@ -51,7 +51,7 @@
<text class="entry-bill-text">生产备料</text>
</view>
<view class="entry-block">
<view class="entry-block"
@click="goPage('my-purchase')"
>
<view class="entry-bill">
<image class="entry-bill-icon" src="@/static/image/uc_company@3x.png" mode=""></image>
</view>
...
...
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