<template>
|
<view class="">
|
<!-- <u-navbar back-text="" title="详情" :custom-back="back"></u-navbar> -->
|
<view class="line">
|
<text class="col7">出库任务单号:</text>
|
<text class="ml10">{{code}}</text>
|
</view>
|
<view class="line">
|
<text class="col7">创建时间:</text>
|
<text class="ml10">{{$moment(doTime).format('YYYY-MM-DD hh:mm:ss')}}</text>
|
</view>
|
<view class="line">
|
<text class="col7">出库口:</text>
|
<text class="ml10">{{shipping}}</text>
|
</view>
|
<view class="line2">
|
<view class="">
|
<text class="col7">零件号:</text>
|
<text class="ml10">{{pn}}</text>
|
</view>
|
<view class="">
|
<text class="col7">零件名称:</text>
|
<text class="ml10">{{partName}}</text>
|
</view>
|
</view>
|
<view class="line">
|
<text class="col7">目的地:</text>
|
<text class="ml10">{{bourn}}</text>
|
</view>
|
<view class="line">
|
<text class="col7">出库类型:</text>
|
<text class="ml10">{{orderType}}</text>
|
</view>
|
<view class="line">
|
<text class="col7">出库数量:</text>
|
<text class="ml10">{{checkOutNum}}</text>
|
</view>
|
<!-- <view class="line">
|
<text class="col7">总需求数量:</text>
|
<text class="ml10">{{totalOutNum}}</text>
|
</view> -->
|
<view class="line">
|
<text class="col7">任务状态:</text>
|
<text class="ml10">{{orderStatus}}</text>
|
</view>
|
<view class="line">
|
<text class="col7">完成时间:</text>
|
<text class="ml10">{{$moment(updateTime).format('YYYY-MM-DD hh:mm:ss')}}</text>
|
</view>
|
<!-- <view class="line">
|
<text class="col7">叉车工人:</text>
|
<text class="ml10">{{applianceType}}</text>
|
</view> -->
|
<view class="fix">
|
<button class="btn" @click="putOut">出库</button>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import {
|
out,
|
add,
|
CheckOutOrder
|
} from '../../../api/putOut.js'
|
import {
|
part
|
} from '../../../api/putIn.js'
|
export default {
|
data() {
|
return {
|
code: '', //任务单号
|
shipping: '', //出货口
|
pn: '', //零件编号
|
partName: '', //零件名称
|
bourn: '', //目的地
|
checkOutNum: '', //出库数量
|
orderType: '', //出库类型
|
orderStatus: '', //任务状态
|
updateTime: '', //完成时间
|
maxNum: '', //装箱数量
|
erpOrderId: '', //ERP号
|
doTime: '', //创建时间
|
totalOutNum: '',
|
id: '',
|
list: [{
|
num: 51,
|
ship: '2号口'
|
}, {
|
num: 64,
|
ship: '3号口'
|
}, {
|
num: 67,
|
ship: '4号口'
|
}, {
|
num: 34,
|
ship: '5号口'
|
}, {
|
num: 30,
|
ship: '6号口'
|
}, {
|
num: 19,
|
ship: '7号口'
|
}, {
|
num: 12,
|
ship: '8号口'
|
}, {
|
num: 997,
|
ship: '冲压出口'
|
}, {
|
num: 999,
|
ship: '焊装出口'
|
}]
|
}
|
},
|
mounted() {
|
this.out()
|
},
|
// onBackPress(e) {
|
// // 这里可以自定义返回逻辑,比如下面跳转其他页面
|
// uni.navigateTo({
|
// url: './plan'
|
// });
|
// // return true 表示禁止默认返回
|
// return true
|
// },
|
onLoad(options) {
|
let val = JSON.parse(decodeURIComponent(options.val))
|
this.code = val.outOrderCode
|
this.dotime = val.doTime
|
this.pn = val.ItemName
|
this.shipping = val.tranLine
|
this.bourn = val.productionLineName
|
this.orderStatus = val.orderStatus
|
this.partName = val.itemDes
|
this.orderType = val.orderType
|
this.checkOutNum = val.checkOutNum
|
this.updateTime = val.updateTime
|
this.totalOutNum = val.totalOutNum
|
this.id = val.id
|
},
|
methods: {
|
//fanhu
|
back() {
|
uni.navigateTo({
|
url: './plan'
|
})
|
},
|
out() {
|
let params = {
|
page: '1',
|
onePageNum: 40
|
}
|
out(params).then((res) => {
|
res.data.forEach(item => {
|
if (this.code === item.outOrderCode) {
|
this.list.forEach(i => {
|
if (item.tranLine == i.num) {
|
this.shipping = i.ship
|
}
|
})
|
this.pn = item.itemName
|
this.partName = item.itemDes
|
this.bourn = item.productionLineName
|
this.orderType = item.orderType
|
this.checkOutNum = item.checkOutNum
|
this.orderStatus = item.orderStatus
|
this.updateTime = item.updateTime
|
this.erpOrderId = item.erpOrderId
|
this.doTime = item.doTime
|
this.num()
|
}
|
|
})
|
})
|
},
|
num() {
|
let params = {
|
page: '1',
|
itemName: this.pn,
|
onePageNum: 999
|
}
|
part(params).then((res) => {
|
this.maxNum = res.data[0].maxNum
|
})
|
},
|
//出库页面
|
putOut() {
|
let params = {
|
page: '1',
|
id: this.id,
|
}
|
CheckOutOrder(params).then((res) => {
|
uni.navigateTo({
|
url: `./plan`
|
});
|
})
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.line {
|
height: 50px;
|
border-bottom: 1px solid #eaeaea;
|
padding-left: 3rem;
|
font-size: 1rem;
|
padding-right: 10px;
|
display: flex;
|
align-items: center;
|
}
|
|
.line2 {
|
border-bottom: 1px solid #eaeaea;
|
font-size: 1rem;
|
line-height: 1.9rem;
|
padding: 10px 10px 10px 3rem;
|
}
|
|
.fix {
|
position: fixed;
|
bottom: 10px;
|
width: 100%;
|
heigh: 45px;
|
|
.btn {
|
background-color: #1aac19;
|
color: #fff;
|
margin: 0 8px;
|
}
|
}
|
|
.col7 {
|
color: #777;
|
}
|
|
.ml10 {
|
margin-left: 20px;
|
}
|
</style>
|