Commit b4e2af90 authored by Facius's avatar Facius

我的仓库初步搭建

parent 73936f54
......@@ -262,6 +262,14 @@
"enablePullDownRefresh": false
}
},
{
"path": "warehouse/records",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "操作记录",
"enablePullDownRefresh": false
}
},
{
"path": "superLogin/index",
"style": {
......
......@@ -148,18 +148,12 @@
methods: {
sectionChange(index) {
this.curNow = index;
this.pageNumber = 0
this.orderList = []
this.loadStatus = 'loading'
this.getOrderList(this.currentIndex)
this.reloadOrderList()
},
// tab栏切换
change(index) {
this.current = index;
this.pageNumber = 0
this.orderList = []
this.loadStatus = 'loading'
this.getOrderList(index);
this.reloadOrderList()
},
reachBottom(e) {
......@@ -271,10 +265,12 @@
this.triggered = 'restore'; // 需要重置
},
reloadOrderInfo() {
this.reloadOrderList()
this.getOrderCount();
},
reloadOrderList() {
this.pageNumber = 0
this.orderList = []
this.loadStatus = 'loading'
this.getOrderCount();
this.getOrderList(this.currentIndex);
},
scroll(e) {
......@@ -290,181 +286,11 @@
};
</script>
<style>
/* #ifndef H5 */
page {
height: 100%;
background-color: #f2f2f2;
}
/* #endif */
</style>
<style lang="scss" scoped>
.u-tabs-box {
margin-bottom: 30rpx;
}
.order {
.top {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
.tag {
text-align: center;
width: 84rpx;
height: 40rpx;
background: linear-gradient(270deg, #47ABFF 0%, #2272FF 100%);
border-radius: 8rpx;
font-size: 22rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}
.store {
margin: 0 10rpx;
font-size: 36rpx;
font-weight: bold;
color: #333333;
line-height: 36px;
}
}
.right {
height: 40rpx;
background: #F4F5F7;
border-radius: 22rpx;
padding: 8rpx 16rpx 8rpx 16rpx;
font-size: 22rpx;
line-height: 24rpx;
font-weight: 400;
color: #333333;
}
}
.item {
display: flex;
flex-direction: column;
margin: 20rpx 0 0;
.content {
.title {
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 52rpx;
}
}
.address {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
font-weight: 400;
color: #333333;
line-height: 52rpx;
.left {}
.right {}
}
}
.total {
margin-top: 20rpx;
text-align: right;
font-size: 24rpx;
.total-price {
font-size: 32rpx;
}
}
.bottom {
display: flex;
margin-top: 30rpx;
padding: 0 10rpx;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
justify-content: space-between;
.tag {
text-align: center;
width: 54rpx;
height: 54rpx;
background: #FF930D;
font-size: 26rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 54rpx;
border-radius: 50%;
margin-right: 20rpx;
}
}
.right-btn {
text-align: center;
width: 200rpx;
height: 80rpx;
background: #2272FF;
border-radius: 40rpx;
font-size: 32rpx;
font-weight: 600;
color: #FFFFFF;
line-height: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
}
}
}
.centre {
text-align: center;
margin: 200rpx auto;
font-size: 32rpx;
image {
width: 164rpx;
height: 164rpx;
border-radius: 50%;
margin-bottom: 20rpx;
}
.tips {
font-size: 24rpx;
color: #999999;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 200rpx;
border-radius: 32rpx;
line-height: 64rpx;
color: #ffffff;
font-size: 26rpx;
background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
}
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
}
.tab-view {
height: 100%;
overflow: auto;
......@@ -509,34 +335,4 @@
}
}
}
.order-taps {
height: 80rpx;
padding: 8rpx 30rpx 20rpx 30rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.order-taps-item {
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 20px;
.taps-count {
position: absolute;
font-size: 16rpx;
font-weight: 400;
line-height: 16rpx;
width: 36rpx;
height: 24rpx;
background: #FFFFFF;
border-radius: 16rpx;
border: 2rpx solid #FA5A49;
text-align: center;
color: #FA5A49;
}
}
}
</style>
This diff is collapsed.
<template>
<view class="ware-wrap">
<w-navbar title="操作记录" :background="{backgroundColor: '#F4F5F7'}"></w-navbar>
<view class="content">
<view class="panel">
<view class="title">物料明细</view>
<view class="item-table">
<view class="item-header">
<view>物料名称</view>
<view>库存数量</view>
</view>
<u-divider half-width="315" border-color="#F4F5F7" height="2"></u-divider>
<view class="item-row" v-for="(item, index) in details" :key="index">
<view class="width-504 break">{{ item.skuName }}</view>
<view class="width-106 center">{{ item.systemStock }}</view>
</view>
</view>
</view>
<view class="panel">
<view class="title">操作记录</view>
<view class="item-table">
<view class="item-header">
<view class="width-132">订单编号</view>
<view class="width-210">物料名称</view>
<view class="width-80">出库量</view>
<view class="width-140 right">操作时间</view>
</view>
<u-divider half-width="315" border-color="#F4F5F7" height="2"></u-divider>
<view class="item-row" v-for="(item, index) in record" :key="index">
<view class="width-132 break">{{ item.businessNumber }}</view>
<view class="width-210 break">{{ item.skuName }}</view>
<view class="width-80 center">{{ item.outAmount }}</view>
<view class="width-140 create-time">{{ (item.updateTime || item.createTime) | datefmt('YYYY.MM.DD HH:mm:ss')}}</view>
</view>
<u-loadmore margin-top="20" :status="status" @loadmore="loadRecord" />
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
status: 'loadmore',
details: [],
record: [],
total: 100,
search: {
pageNumber: 0,
pageSize: 10,
},
};
},
onReachBottom() {
if(this.status == 'nomore') return ;
this.status = 'loading';
this.search.pageNumber = ++ this.search.pageNumber;
this.loadAccess()
},
computed: {},
onLoad() {
getApp().trackPage('我的仓库-操作记录')
this.getData();
},
methods: {
getData() {
let self = this
self.initDetails()
self.loadAccess()
},
async initDetails() {
let self = this
let res = await self.$u.api.listBystock()
if(res && res.code == 200) {
self.details = res.data
}
},
loadRecord() {
if(this.status == 'nomore') return ;
this.status = 'loading';
this.search.pageNumber = ++ this.search.pageNumber;
this.loadAccess()
},
async loadAccess() {
let self = this
let res = await self.$u.api.listAccessHistory(self.search)
if(res && res.code == 200) {
self.total = res.data && res.data.total || self.total
let list = res.data && res.data.list && self.$u.deepClone(res.data.list) || [];
if(list && list.length) {
self.record.push(...list)
if(self.total > self.record.length) {
self.status = "loadmore"
} else {
self.status = "nomore"
}
} else {
self.status = "nomore"
}
} else {
self.status = "nomore"
}
},
}
}
</script>
<style lang="scss" scoped>
.ware-wrap {
background-color: #F4F5F7;
.content {
padding: 34rpx 30rpx;
display: flex;
flex-direction: column;
align-items: center;
.panel {
.title {
margin-bottom: 30rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 44rpx;
}
.item-table {
margin-bottom: 46rpx;
padding: 34rpx 30rpx;
width: 690rpx;
background: #FFFFFF;
border-radius: 12rpx;
.item-header {
margin-bottom: 24rpx;
font-size: 26rpx;
font-weight: bold;
color: #333333;
line-height: 38rpx;
display: flex;
justify-content: space-between;
}
.item-row {
margin: 24rpx 0;
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 38rpx;
display: flex;
justify-content: space-between;
.create-time {
letter-spacing: 0.03rpx
}
}
}
}
}
}
.width-504 {
width: 504rpx;
}
.width-106 {
width: 106rpx;
}
.width-132 {
width: 132rpx;
}
.width-210 {
width: 210rpx;
}
.width-80 {
width: 80rpx;
}
.width-140 {
width: 140rpx;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
.break {
word-break:break-all;
}
</style>
......@@ -17,7 +17,7 @@
</view>
</view>
<!-- 订单详情 -->
<view class="card base-item">
<view class="card">
<Detail :order="order" :readMore.sync="readMore" :operate="isAllowDianhuaAndDaohang"></Detail>
</view>
<!-- 从我的页面进来显示结算信息 -->
......@@ -343,7 +343,7 @@
}
},
onShow() {
// 从标签列表页面返回,获取选中的标签
// 从过程反馈回来,需要刷新数据
let pages = getCurrentPages()
let page = pages[pages.length - 1]
if (page.needFresh) {
......@@ -980,96 +980,6 @@
padding: 0;
}
}
.toolbar {
margin-bottom: 44rpx;
display: flex;
justify-content: center;
align-items: center;
.left {
width: 100rpx;
height: 100rpx;
.button {
width: 100rpx;
height: 100rpx;
background: #929CB8;
border-radius: 100rpx;
font-weight: bold;
display: flex;
text-align: center;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #FFFFFF;
}
}
.center {
width: 140rpx;
height: 140rpx;
margin-left: 74rpx;
margin-right: 74rpx;
.center-button-view {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
.time-view {
display: flex;
font-size: 20rpx;
color: #FFFFFF;
align-items: center;
justify-content: space-around;
}
}
.appoint-btn {
background: #2272FF;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
}
.isGan-btn {
background: #D1D4D4;
box-shadow: 2px 2px 20px 0px rgba(181, 181, 181, 0.3);
}
.timeOut-btn {
background: #FA5A49;
box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3);
}
}
.right {
width: 100rpx;
height: 100rpx;
.button {
width: 100rpx;
height: 100rpx;
background-color: #929CB8;
border-radius: 100rpx;
font-size: 28rpx;
font-weight: bold;
align-items: center;
display: flex;
color: #FFFFFF;
justify-content: center;
&.active {
background-color: #FF930D;
}
}
}
}
}
.settlement-view {
......
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