<template>
|
<view class="page">
|
<view class="page_info">
|
<view class="page_info_title">{{info.code}}</view>
|
<view class="page_info_nr">
|
<view class="item">
|
<view class="item_label">物料信息:</view>
|
<view class="item_nr" v-if="info.mmodel">{{info.mmodel.name}}丨{{info.mmodel.code}}</view>
|
</view>
|
<view class="items" style="margin-top: 0">
|
<view class="item_label">生产数量:</view>
|
<view class="item_nr" v-if="info.umodel">{{info.num}}{{info.umodel.name}}</view>
|
</view>
|
<view class="item">
|
<view class="item_label">生产批次:</view>
|
<view class="item_nr">{{info.batch}}</view>
|
</view>
|
<view class="items">
|
<view class="item_label">生产工序:</view>
|
<view class="item_nr" v-if="info.pmodel">{{info.pmodel.name}}</view>
|
</view>
|
<view class="item">
|
<view class="item_label">工单编号:</view>
|
<view class="item_nr">{{info.workorderCode}}</view>
|
</view>
|
<!-- <view class="items">-->
|
<!-- <view class="item_label">生产人员:</view>-->
|
<!-- <view class="item_nr">{{info.proUserids}}</view>-->
|
<!-- </view>-->
|
<view class="items">
|
<view class="item_label">生产设备:</view>
|
<view class="item_nr" v-if="info.devmodel">{{info.devmodel.name}}</view>
|
</view>
|
<!-- <view class="items">
|
<view class="item_label">工装码:</view>
|
<view class="item_nr" v-if="info.amodel">{{info.amodel.code}}</view>
|
</view> -->
|
</view>
|
</view>
|
<view class="page_title">检验信息</view>
|
<view class="page_info1">
|
<view class="page_info1_item" style="margin: 0;">
|
<view class="label">检验人员:</view>
|
<view class="nr">{{info.smodelRealName}}/{{info.checkUserDepartName}}</view>
|
</view>
|
<view class="page_info1_items">
|
<view class="label">检验日期:</view>
|
<view class="nr">{{info.checkDate}}</view>
|
</view>
|
<view class="page_info1_item">
|
<view class="label">合格数量:</view>
|
<view class="nr" v-if="info.umodel">{{info.qualifiedNum}}{{info.umodel.name}}</view>
|
</view>
|
<view class="page_info1_items">
|
<view class="label">不良数量:</view>
|
<view class="nr" v-if="info.umodel">{{info.unqualifiedNum}}{{info.umodel.name}}</view>
|
</view>
|
</view>
|
<view class="page_err" v-if="info.checkInfo">
|
<!-- <view class="page_err_item">
|
<text>工装 {{info.qualifiedApplianceCode}}</text>
|
<text v-if="info.umodel">{{info.unqualifiedNum}}{{info.umodel.name}}</text>
|
</view> -->
|
<view class="page_err_items">
|
<text>不良原因:</text>
|
<text>{{info.checkInfo}}</text>
|
</view>
|
</view>
|
<view class="page_footer" v-if="info.createUser === $store.state.userInfo.id && info.workorderstatus !== 4 && info.workorderstatus !== 2">
|
<view class="page_footer_dele red" @click="dele">删除</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import { getBYid } from '@/util/api/QualityAPI'
|
import { deletejy } from "@/util/api/PlanningAPI"
|
|
export default {
|
data() {
|
return {
|
id: null,
|
info: {}
|
};
|
},
|
onLoad(option) {
|
this.id = option.id
|
this.getBYids()
|
},
|
methods: {
|
getBYids() {
|
getBYid(this.id)
|
.then(res => {
|
if (res.code === 200 && res.data) {
|
this.info = res.data
|
}
|
})
|
},
|
// 删除检验记录
|
dele() {
|
deletejy(this.id)
|
.then(res => {
|
if (res.code === 200) {
|
uni.showToast({ title: '删除成功', duration: 2000, mask: true })
|
setTimeout(() => {
|
uni.navigateBack({ delta: 1 });
|
}, 2000)
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.page {
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
background: #F7F7F7;
|
.page_info {
|
padding: 30rpx;
|
background: #ffffff;
|
.page_info_title {
|
font-size: 32rpx;
|
font-weight: 500;
|
color: #333333;
|
}
|
.page_info_nr {
|
padding: 0 30rpx 30rpx 30rpx;
|
margin-top: 30rpx;
|
background: #F7F7F7;
|
border-radius: 16rpx;
|
display: flex;
|
align-items: center;
|
flex-wrap: wrap;
|
.items {
|
width: 45%;
|
display: flex;
|
margin-top: 24rpx;
|
.item_label {
|
font-size: 24rpx;
|
font-weight: 400;
|
color: #666666;
|
flex-shrink: 0;
|
}
|
.item_nr {
|
font-size: 24rpx;
|
font-weight: 400;
|
color: #222222;
|
}
|
}
|
.item {
|
width: 55%;
|
display: flex;
|
margin-top: 24rpx;
|
.item_label {
|
font-size: 24rpx;
|
font-weight: 400;
|
color: #666666;
|
flex-shrink: 0;
|
}
|
.item_nr {
|
font-size: 24rpx;
|
font-weight: 400;
|
color: #222222;
|
}
|
}
|
}
|
}
|
.page_title {
|
padding: 40rpx 30rpx 30rpx 30rpx;
|
font-size: 32rpx;
|
font-weight: 500;
|
color: #222222;
|
}
|
.page_info1 {
|
padding: 0 30rpx 30rpx 30rpx;
|
background: #ffffff;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
margin-bottom: 24rpx;
|
.page_info1_items {
|
display: flex;
|
width: 45%;
|
margin-top: 30rpx;
|
.label {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #666666;
|
flex-shrink: 0;
|
}
|
.nr {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #222222;
|
}
|
}
|
.page_info1_item {
|
display: flex;
|
width: 55%;
|
margin-top: 30rpx;
|
.label {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #666666;
|
flex-shrink: 0;
|
}
|
.nr {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #222222;
|
}
|
}
|
}
|
.page_err {
|
padding: 0 30rpx 30rpx 30rpx;
|
background: #ffffff;
|
.page_err_item {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
padding-top: 30rpx;
|
text {
|
&:nth-child(1) {
|
font-size: 32rpx;
|
font-weight: 500;
|
color: #DE5243;
|
}
|
&:nth-child(2) {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #DE5243;
|
}
|
}
|
}
|
.page_err_items {
|
display: flex;
|
justify-content: space-between;
|
padding-top: 30rpx;
|
text {
|
&:nth-child(1) {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #666666;
|
flex-shrink: 0;
|
}
|
&:nth-child(2) {
|
font-size: 26rpx;
|
font-weight: 400;
|
color: #222222;
|
}
|
}
|
}
|
}
|
.page_footer {
|
position: fixed;
|
bottom: 0;
|
width: 100%;
|
padding-bottom: 68rpx;
|
padding-left: 30rpx;
|
padding-right: 30rpx;
|
box-sizing: border-box;
|
.page_footer_dele {
|
width: 100%;
|
height: 88rpx;
|
background: white;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-size: 30rpx;
|
border-radius: 8rpx;
|
box-shadow: 0 0 12rpx 0 rgba(0,0,0,0.08);
|
}
|
}
|
}
|
</style>
|