erp 新洋电子
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

118 lines
3.2 KiB

<template>
<view>
<view class="sm-box">
<view class="content-box-card">
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">物料编号:</view>
<text>{{ info.product_number }}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">规格:</view>
<text>{{ info.product_size }}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">生产线:</view>
<text>{{ info.line_title }}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">物料名称:</view>
<text>{{ info.product_name }}</text>
</view>
</view>
</view>
</view>
<view class="big-title">
巡检记录
</view>
<view class="white-card" >
<view class="lists" v-for="(item,index) in list" :key="index">
<view class="list-left">
<view class="list-left-up">
<view class="list-left-up-left">巡检人:{{item.one}}</view>
<view class="list-left-up-mid">巡检时间:{{item.create_time}}</view>
<view class="list-left-up-right-ok" v-if="item.result==1">OK</view>
<view class="list-left-up-right-no" v-if="item.result==2">NG</view>
</view>
<view class="list-left-dow">
<view class="list-left-dow-left">审核人:{{item.two}}</view>
<view class="list-left-dow-btn">
<view @tap="firstInspectionInfo(item.id,item)">
查看详情
</view>
<view class="red">
审核
</view>
</view>
</view>
</view>
<view class="list-right" v-if="list.length==1||index==0">
</view>
<view class="list-right" v-if="list.length>=2&&list.length-1==index">
</view>
</view>
<view class="submit-btn">
<button type="primary" @tap="addRecord()">新增巡检记录</button>
</view>
</view>
</view>
</template>
<script>
import {newCheckCyList} from "../../api/user.js"
export default {
data() {
return {
plan_id:'',
CyInfo:{},
info:{},
list:[],
limit:10,
page:1
};
},
onLoad(e) {
this.plan_id=e.plan_id;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.getData()
},methods:{
getData(){
let param={
plan_id:this.plan_id,
limit:this.limit,
page:this.page
};
newCheckCyList(param).then(res=>{
this.info=res,
this.list=this.info.lists.data;
console.log("详情",res)
})
}
,addRecord(){
uni.navigateTo({
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=1`,
success: res => {},
fail: () => {},
complete: () => {}
});
},
firstInspectionInfo(id){
uni.navigateTo({
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`,
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}
</script>
<style lang="scss">
@import "./index.scss"
</style>