Commit 1524117b authored by Morson's avatar Morson

feat(parts):逻辑代码补充

parent ae151497
...@@ -132,7 +132,6 @@ ...@@ -132,7 +132,6 @@
this._freshing = false; this._freshing = false;
}, },
onShow() { onShow() {
// 从过程反馈回来,需要刷新数据
let pages = getCurrentPages() let pages = getCurrentPages()
let page = pages[pages.length - 1] let page = pages[pages.length - 1]
if (page.needApplyList) { if (page.needApplyList) {
...@@ -218,7 +217,7 @@ ...@@ -218,7 +217,7 @@
}, },
handleClickApply() { handleClickApply() {
uni.navigateTo({ uni.navigateTo({
url: 'pages/parts/application' url: 'pages/parts/application?applyType=1'
}) })
}, },
handleClickSearch() { handleClickSearch() {
......
<template> <template>
<view class="ware-wrap"> <view class="ware-wrap record-table">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="出库记录" titleColor="#333333" <u-navbar back-icon-color="#333333" background="#FFFFFF" title="出库记录"
:border-bottom="false" title-bold></u-navbar> titleColor="#333333" :border-bottom="false" title-bold></u-navbar>
<view class="panel"> <u-row gutter="12" justify="space-between">
<view class="item-table"> <u-col span="3">
<view class="item-header"> <view class="label u-text-left">订单编号</view>
<view class="width-132">订单编号</view> </u-col>
<view class="width-210">物料名称</view> <u-col span="4">
<view class="width-80">出库量</view> <view class="label u-text-center">物料名称</view>
<view class="width-140 right">操作时间</view> </u-col>
<u-col span="2">
<view class="label u-text-center">出库量</view>
</u-col>
<u-col span="3">
<view class="label u-text-right">操作时间</view>
</u-col>
</u-row>
<view style="padding: 0 6rpx;">
<u-divider half-width="100%" border-color="#F4F5F7" height="2"
margin-top="30" margin-bottom="30"></u-divider>
</view> </view>
<u-divider half-width="315" border-color="#F4F5F7" height="2"></u-divider> <view class="table-content">
<view class="item-row" v-for="(item, index) in record" :key="index"> <u-row gutter="12" justify="space-between"
<view class="width-132 break">{{ item.businessNumber }}</view> v-for="(item, index) in record" :key="index">
<view class="width-210 break">{{ item.skuName }}</view> <u-col span="3">
<view class="width-80 center">{{ item.outAmount }}</view> <view class="row-txt">{{ item.businessNumber }}</view>
<view class="width-140 create-time">{{ (item.updateTime || item.createTime) | datefmt('YYYY.MM.DD HH:mm:ss')}}</view> </u-col>
<u-col span="4">
<view class="row-txt">{{ item.skuName }}</view>
</u-col>
<u-col span="2">
<view class="row-txt u-text-center">{{ item.outAmount || 0 }}</view>
</u-col>
<u-col span="3">
<view class="row-txt u-text-right time-txt">
{{ (item.updateTime || item.createTime) | datefmt('YYYY.MM.DD HH:mm:ss')}}
</view> </view>
</u-col>
</u-row>
<u-loadmore margin-top="20" :status="status" @loadmore="loadRecord" /> <u-loadmore margin-top="20" :status="status" @loadmore="loadRecord" />
</view> <u-gap height="68"></u-gap>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -87,77 +107,30 @@ ...@@ -87,77 +107,30 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.ware-wrap { .ware-wrap {
background-color: #FFFFFF; background-color: #FFFFFF;
// .content {
height: 100vh; height: 100vh;
padding: 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; .label {
.panel {
padding: 0 30rpx 44rpx 30rpx;
height: 100%;
.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-size: 26rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 38rpx; line-height: 32rpx;
display: flex;
justify-content: space-between;
} }
.item-row { .row-txt{
margin: 24rpx 0; word-break:break-all;
margin-bottom: 40rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 38rpx; line-height: 32rpx;
display: flex;
justify-content: space-between;
.create-time {
letter-spacing: 0.03rpx
} }
.time-txt {
word-break:normal;
} }
.table-content {
height: 100%;
overflow-y: auto;
} }
// }
}
}
.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> </style>
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
getApp().trackPage('备件库页') getApp().trackPage('备件库页')
this.getReserveList() this.getReserveList()
}, },
onShow() {},
methods: { methods: {
getReserveList() { // 备件列表 getReserveList() { // 备件列表
this.loaded = false this.loaded = false
...@@ -196,7 +197,7 @@ ...@@ -196,7 +197,7 @@
}, },
handleClickApply() { handleClickApply() {
uni.navigateTo({ uni.navigateTo({
url: 'pages/parts/application' url: 'pages/parts/application?applyType=1'
}) })
}, },
scroll() { scroll() {
......
...@@ -209,10 +209,6 @@ export default { ...@@ -209,10 +209,6 @@ export default {
this.$u.route({ this.$u.route({
type: 'redirect', type: 'redirect',
url: "pages/parts/nodes", url: "pages/parts/nodes",
params: {
type: 1,
returnNo: res.data.orderNumber
}
}) })
} else { } else {
console.log(res.message, "配件申请失败!"); console.log(res.message, "配件申请失败!");
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
{ {
type: 'parts', type: 'parts',
icon: 'successful.png', icon: 'successful.png',
title: '您的件申请已提交成功', title: '您的件申请已提交成功',
message: '工作人员正在加紧审核中', message: '工作人员正在加紧审核中',
btnTxt: '我知道了' btnTxt: '我知道了'
}, },
...@@ -77,6 +77,11 @@ ...@@ -77,6 +77,11 @@
}, },
goBack() { goBack() {
if(this.isParts){ if(this.isParts){
var pages = getCurrentPages();
if(pages.length >= 2) {
var prevPage = pages[pages.length - 2];
prevPage.needApplyList = true
}
this.$u.route({type:'back'}) this.$u.route({type:'back'})
} }
if(this.isReturn){ if(this.isReturn){
......
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