xial
This commit is contained in:
parent
d3401e3fe9
commit
fa867475c3
|
|
@ -288,8 +288,8 @@
|
||||||
for(let i=0;i<this.results.length;i++){
|
for(let i=0;i<this.results.length;i++){
|
||||||
let key = this.results[i].field_key;
|
let key = this.results[i].field_key;
|
||||||
//checkForm接收表单数据的对象
|
//checkForm接收表单数据的对象
|
||||||
that.checkForm[key]='';
|
that.checkForm[key]=this.results[i].field_value;
|
||||||
that.$set(that.checkForm,key,'')
|
that.$set(that.checkForm,key,this.results[i].field_value)
|
||||||
}
|
}
|
||||||
//判定项
|
//判定项
|
||||||
let listJudge = this.formData.filter(item => {
|
let listJudge = this.formData.filter(item => {
|
||||||
|
|
@ -307,17 +307,17 @@
|
||||||
that.$set(that.originForm,key,this.origins[i].field_value)
|
that.$set(that.originForm,key,this.origins[i].field_value)
|
||||||
}*/
|
}*/
|
||||||
//图片地址
|
//图片地址
|
||||||
let imag= this.formData.filter(item => {
|
// let imag= this.formData.filter(item => {
|
||||||
return item.field_type === 'draw';
|
// return item.field_type === 'draw';
|
||||||
});
|
// });
|
||||||
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
// that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
||||||
|
|
||||||
/*let originImag= this.origins.filter(item => {
|
/*let originImag= this.origins.filter(item => {
|
||||||
return item.field_type === 'draw';
|
return item.field_type === 'draw';
|
||||||
});*/
|
});*/
|
||||||
that.originImg = new Image();
|
// that.originImg = new Image();
|
||||||
that.originImg.crossOrigin = '';
|
// that.originImg.crossOrigin = '';
|
||||||
that.originImg = imag[0].origin_value;
|
// that.originImg = imag[0].origin_value;
|
||||||
|
|
||||||
listJudge.forEach(item => {
|
listJudge.forEach(item => {
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="card" >
|
||||||
<el-tab-pane label="总览" name="1" >
|
<el-tab-pane label="总览" name="1" >
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
|
||||||
:data="productionplan.results"
|
:data="productionplan.results"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ export default {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.productionplan = response.data;
|
this.productionplan = response.data;
|
||||||
this.productionplanID=response.data.id;
|
this.productionplanID=response.data.id;
|
||||||
console.log(response.data.process_json);
|
|
||||||
let process_json = [];
|
let process_json = [];
|
||||||
for(let item in response.data.process_json){
|
for(let item in response.data.process_json){
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
|
|
@ -184,7 +184,7 @@ export default {
|
||||||
process_json.push(obj)
|
process_json.push(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(process_json);
|
|
||||||
this.process_json= process_json;
|
this.process_json= process_json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -212,13 +212,13 @@ export default {
|
||||||
//查看该玻璃检验记录表
|
//查看该玻璃检验记录表
|
||||||
handleoption(scope){
|
handleoption(scope){
|
||||||
|
|
||||||
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id }, })
|
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id ,productionplanid:this.id ,number:scope.row.number,process:scope.row.step_.name}, })
|
||||||
|
|
||||||
},
|
},
|
||||||
//查看工序对应的玻璃
|
//查看工序对应的玻璃
|
||||||
handleprocess (scope){
|
handleprocess (scope){
|
||||||
|
|
||||||
this.$router.push({name: "wproduct", params: { id: scope.row.process,productionplanID:this.productionplanID } })
|
this.$router.push({name: "wproduct", params: { id: scope.row.process,productionplanid:this.id} })
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||||
|
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="玻璃编号">{{wproductnumber}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="玻璃所在子工序">{{process}}</el-descriptions-item>
|
||||||
|
|
||||||
<el-table
|
|
||||||
:data="recordList.results"
|
</el-descriptions>
|
||||||
border
|
|
||||||
fit
|
<el-table
|
||||||
stripe
|
:data="recordList.results"
|
||||||
style="width: 100%"
|
border
|
||||||
height="300"
|
fit
|
||||||
>
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
<el-table-column type="index" width="50"/>
|
height="300"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="表单名称">
|
<el-table-column label="表单名称">
|
||||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查类型">
|
<el-table-column label="检查类型">
|
||||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
checkTypes[scope.row.type]
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否提交">
|
<el-table-column label="是否提交">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -26,69 +36,155 @@
|
||||||
<span v-else>未提交</span>
|
<span v-else>未提交</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作">
|
<el-table-column align="center" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-link @click="handleRecordDetail(scope)">查看 </el-link>
|
||||||
<el-link
|
|
||||||
|
|
||||||
@click="handleRecordDetail(scope)"
|
|
||||||
>查看
|
|
||||||
</el-link>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
<!--非检查表显示-->
|
||||||
|
<el-dialog
|
||||||
|
width="60%"
|
||||||
|
:title="formName"
|
||||||
|
:visible.sync="recordVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@close="recordCancel"
|
||||||
|
>
|
||||||
|
<customForm
|
||||||
|
v-if="recordVisible"
|
||||||
|
:results="fieldList"
|
||||||
|
:hasPicture="hasPicture"
|
||||||
|
:formID="recordform"
|
||||||
|
:wproduct="wproduct"
|
||||||
|
:recordId="recordId"
|
||||||
|
:isDisabled="isDisabled"
|
||||||
|
@recordSubmit="recordSubmit"
|
||||||
|
@recordSave="recordSave"
|
||||||
|
@recordCancel="recordCancel"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||||
import {getTestRecord} from "@/api/qm";
|
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||||
|
import customForm from "@/components/customForm/index";
|
||||||
|
import { getTestRecord ,getTestRecordItem} from "@/api/qm";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination, customForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recordList:"",
|
recordList: "",
|
||||||
checkTypes:{
|
checkTypes: {
|
||||||
10:"子工序检验",
|
10: "子工序检验",
|
||||||
20:"工序检验",
|
20: "工序检验",
|
||||||
30:"工序复检",
|
30: "工序复检",
|
||||||
36:"夹层检验",
|
36: "夹层检验",
|
||||||
40:"成品检验",
|
40: "成品检验",
|
||||||
},
|
},
|
||||||
|
state_:{
|
||||||
|
10:'制定中',
|
||||||
|
20:'已下达',
|
||||||
|
30:'已接受',
|
||||||
|
40:'生产中',
|
||||||
|
50:'已完成',
|
||||||
|
60:'军检完成'},
|
||||||
|
recordVisible: false,
|
||||||
|
customfieldList: [],
|
||||||
|
recordform: null,
|
||||||
|
recordId: null,
|
||||||
|
fifo_detail: "",
|
||||||
|
formName: "项目检查表",
|
||||||
|
hasPicture: false,
|
||||||
|
fieldList: [],
|
||||||
|
isDisabled: false,
|
||||||
|
productionplan:{
|
||||||
|
number:""
|
||||||
|
},
|
||||||
|
wproductnumber:null,
|
||||||
|
process:null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.id = this.$route.params.id;
|
this.id = this.$route.params.id;
|
||||||
this.getList();
|
this.productionplanid = this.$route.params.productionplanid;
|
||||||
|
this.wproductnumber=this.$route.params.number;
|
||||||
|
this.process=this.$route.params.process;
|
||||||
|
|
||||||
|
this.getListp();
|
||||||
|
this.getList();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
getListp() {
|
||||||
getList() {
|
|
||||||
getTestRecord({wproduct: this.id}).then(res=>{
|
getProductionplan(this.productionplanid).then((response) => {
|
||||||
if(res.code==200){
|
if (response.data) {
|
||||||
|
this.productionplan = response.data;
|
||||||
this.recordList = res.data;
|
}
|
||||||
}else{
|
});
|
||||||
this.$message.error(res.msg);
|
},
|
||||||
}
|
getList() {
|
||||||
})
|
getTestRecord({ wproduct: this.id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.recordList = res.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击记录里的查看
|
||||||
|
handleRecordDetail(scope) {
|
||||||
|
let that = this;
|
||||||
|
that.recordVisible = false;
|
||||||
|
that.recordId = scope.row.id;
|
||||||
|
that.recordform = scope.row.form;
|
||||||
|
that.formName = scope.row.form_.name;
|
||||||
|
getrffieldList({ form: this.recordform, page: 1, page_size: 100 }).then(
|
||||||
|
(response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.hasPicture = false;
|
||||||
|
let fieldList = response.data.results;
|
||||||
|
that.fieldList = [...fieldList];
|
||||||
|
let arr = fieldList.filter((item) => {
|
||||||
|
return item.field_type === "draw";
|
||||||
|
});
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.hasPicture = true;
|
||||||
|
}
|
||||||
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
let fieldList = res.data.record_data;
|
||||||
|
for (let i = 0; i < that.fieldList.length; i++) {
|
||||||
|
let obj = that.fieldList[i];
|
||||||
|
obj.is_testok = null;
|
||||||
|
for (let j = 0; j < fieldList.length; j++) {
|
||||||
|
if (that.fieldList[i].field_key === fieldList[j].field_key) {
|
||||||
|
obj.id = fieldList[j].id;
|
||||||
|
obj.is_testok = fieldList[j].is_testok;
|
||||||
|
obj.field_value = fieldList[j].field_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.push(obj);
|
||||||
|
}
|
||||||
|
that.fieldList = arr;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.isDisabled = true;
|
||||||
|
that.recordVisible = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,13 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
|
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||||
|
<el-descriptions-item label="任务编号">{{productionplans.number}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品名称" v-if="productionplans.product_">{{productionplans.product_.name}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="规格型号" v-if="productionplans.product_">{{productionplans.product_.specification}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="生产状态">{{state_[productionplans.state]}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
<el-table
|
<el-table
|
||||||
:data="wproduct"
|
:data="wproduct"
|
||||||
border
|
border
|
||||||
|
|
@ -54,6 +61,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getwproductList} from "@/api/wpm";
|
import { getwproductList} from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||||
|
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
@ -62,8 +70,17 @@ export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
productionplans:{
|
||||||
|
number:""
|
||||||
|
},
|
||||||
wproduct: "",
|
wproduct: "",
|
||||||
|
state_:{
|
||||||
|
10:'制定中',
|
||||||
|
20:'已下达',
|
||||||
|
30:'已接受',
|
||||||
|
40:'生产中',
|
||||||
|
50:'已完成',
|
||||||
|
60:'军检完成'},
|
||||||
actstate_: {
|
actstate_: {
|
||||||
6: "待复检",
|
6: "待复检",
|
||||||
10: "操作进行中",
|
10: "操作进行中",
|
||||||
|
|
@ -83,16 +100,26 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
this.id = this.$route.params.id;
|
this.id = this.$route.params.id;
|
||||||
this.productionplanID = this.$route.params.productionplanID;
|
this.productionplan = this.$route.params.productionplanid;
|
||||||
this.getList();
|
this.getList();
|
||||||
console.log(this.productionplanID);
|
this.getpList();
|
||||||
|
console.log(this.productionplan);
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
getpList() {
|
||||||
|
getProductionplan(this.productionplan).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.productionplans = response.data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
//半成品列表
|
//半成品列表
|
||||||
getList() {
|
getList() {
|
||||||
getwproductList({production_plan:this.productionplanID,step__process:this.id,page:0}).then((response) => {
|
getwproductList({production_plan:this.productionplan,step__process:this.id,page:0}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproduct= response.data;
|
this.wproduct= response.data;
|
||||||
}
|
}
|
||||||
|
|
@ -103,8 +130,8 @@ export default {
|
||||||
|
|
||||||
//查看该玻璃检验记录表
|
//查看该玻璃检验记录表
|
||||||
handleoption(scope){
|
handleoption(scope){
|
||||||
|
console.log(this.productionplan);
|
||||||
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id }, })
|
this.$router.push({name: "taskrecordfrom", params: { id:scope.row.id,productionplanid:this.productionplan,number:scope.row.number,process:scope.row.step_.name} })
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue