Commit 1524117b authored by Morson's avatar Morson

feat(parts):逻辑代码补充

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