Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
曹前明 2022-05-19 15:42:30 +08:00
commit 1c514b1e4e
5 changed files with 45 additions and 14 deletions

View File

@ -133,7 +133,7 @@
<el-row v-show="hasPicture"> <el-row v-show="hasPicture">
<el-form-item label="图表"> <el-form-item label="图表">
<div> <div>
<img id="canvasImg" :src="img" style="width:500px;height: 300px;display: none"> <img id="canvasImg" :src="img" style="width:500px;height: 300px;position: absolute;top: -1000px;">
<div style="position: relative;display: flex;flex-direction: column; <div style="position: relative;display: flex;flex-direction: column;
border: 1px solid #DCDFE6;"> border: 1px solid #DCDFE6;">
<canvas id="canvas" width="500" height="300"> <canvas id="canvas" width="500" height="300">
@ -436,8 +436,8 @@
draw(){ draw(){
let canvasImg = document.getElementById("canvasImg"); let canvasImg = document.getElementById("canvasImg");
canvasImg.setAttribute("crossOrigin",'anonymous'); canvasImg.setAttribute("crossOrigin",'anonymous');
canvasImg.style.width = '500px'; // canvasImg.style.width = '500px';
canvasImg.style.height = '300px'; // canvasImg.style.height = '300px';
this.ctx.drawImage(canvasImg,0,0,500,300); this.ctx.drawImage(canvasImg,0,0,500,300);
}, },
// 叉号 // 叉号

View File

@ -340,9 +340,16 @@
this.processOptions = res.data.results; this.processOptions = res.data.results;
}); });
}, },
//绑定工序 //检查表
handlebind(scope) { 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() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;

View File

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

View File

@ -548,7 +548,7 @@
} }
], ],
typeoptions: [{ typeoptions: [{
value: 1, value: 10,
label: '生产记录' label: '生产记录'
}], }],
}; };

View File

@ -61,6 +61,8 @@
> >
<template slot-scope="scope">{{ scope.row.step_.name }}</template> <template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -175,6 +177,8 @@
> >
<template slot-scope="scope">{{ scope.row.step_.name }}</template> <template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -271,6 +275,8 @@
<span v-else>{{scope.row.create_by_.username}}</span> <span v-else>{{scope.row.create_by_.username}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -367,6 +373,8 @@
<span v-else>{{scope.row.create_by_.username}}</span> <span v-else>{{scope.row.create_by_.username}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -431,6 +439,8 @@
> >
<template slot-scope="scope">{{ scope.row.step_.name }}</template> <template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -769,7 +779,7 @@
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
// import {saveAs} from "file-saver"; // import {saveAs} from "file-saver";
// import htmlDocx from "html-docx-js/dist/html-docx"; // import htmlDocx from "html-docx-js/dist/html-docx";
import htmlToPdf from './../../utils/htmlToPdf'; //import htmlToPdf from './../../utils/htmlToPdf';
const defaultetestitem = {}; const defaultetestitem = {};
export default { export default {