显示物料的基本信息

This commit is contained in:
shijing 2022-05-17 09:15:34 +08:00
parent 48f96ed571
commit 636c1bd7b4
2 changed files with 30 additions and 9 deletions

View File

@ -340,9 +340,16 @@
this.processOptions = res.data.results;
});
},
//绑定工序
//检查表
handlebind(scope) {
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
let materialItem = sessionStorage.getItem('materialItem');
if(materialItem){
sessionStorage.removeItem('materialItem');
sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
}else{
sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
}
this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
},
handleFilter() {
this.listQuery.page = 1;

View File

@ -1,6 +1,14 @@
<template>
<div class="app-container">
<el-card>
<el-card style="margin-top: 2px">
<el-descriptions title="物料详情" :column="4" border style="margin-bottom: 10px">
<el-descriptions-item label="编号">{{item.number}}</el-descriptions-item>
<el-descriptions-item label="类别">{{materialTypes[item.type]}}</el-descriptions-item>
<el-descriptions-item label="名称">{{item.name}}</el-descriptions-item>
<el-descriptions-item label="规格型号">{{item.specification}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-row :gutter="2">
<!--表格-->
<el-col :span="10">
@ -539,14 +547,12 @@
name: "",
number: "",
};
const defaultrecordform = {enabled: false};
const defaultfield = {};
let preDrawAry = [];
export default {
components: {Pagination, vueJsonEditor, Treeselect, customForm, faceLogin},
data() {
return {
item:{},
step: defaultstep,
stepList: [],
upHeaders: upHeaders(),
@ -691,6 +697,15 @@
40 : "成品检验表",
50 : "首件检查表",
},
materialTypes: {
"1": '成品',
"2": '半成品',
"3": '主要原料',
"4": '辅助材料',
"5": '加工工具',
"6": '辅助工装',
},
canvas: null,
ctx: null,
myCanvas_rect: null,
@ -710,11 +725,10 @@
},
computed: {},
watch: {},
created() {
this.material = this.$route.params.id;
this.recordformLists();
},
mounted(){
this.item = JSON.parse(sessionStorage.getItem('materialItem')) ;
this.material = this.item.id;
this.recordformLists();
getrecordformList({page:0}).then((response) => {
if (response.data) {
this.formList = response.data;