xial
This commit is contained in:
parent
d3401e3fe9
commit
fa867475c3
|
|
@ -288,8 +288,8 @@
|
|||
for(let i=0;i<this.results.length;i++){
|
||||
let key = this.results[i].field_key;
|
||||
//checkForm接收表单数据的对象
|
||||
that.checkForm[key]='';
|
||||
that.$set(that.checkForm,key,'')
|
||||
that.checkForm[key]=this.results[i].field_value;
|
||||
that.$set(that.checkForm,key,this.results[i].field_value)
|
||||
}
|
||||
//判定项
|
||||
let listJudge = this.formData.filter(item => {
|
||||
|
|
@ -307,17 +307,17 @@
|
|||
that.$set(that.originForm,key,this.origins[i].field_value)
|
||||
}*/
|
||||
//图片地址
|
||||
let imag= this.formData.filter(item => {
|
||||
return item.field_type === 'draw';
|
||||
});
|
||||
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
||||
// let imag= this.formData.filter(item => {
|
||||
// return item.field_type === 'draw';
|
||||
// });
|
||||
// that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
||||
|
||||
/*let originImag= this.origins.filter(item => {
|
||||
return item.field_type === 'draw';
|
||||
});*/
|
||||
that.originImg = new Image();
|
||||
that.originImg.crossOrigin = '';
|
||||
that.originImg = imag[0].origin_value;
|
||||
// that.originImg = new Image();
|
||||
// that.originImg.crossOrigin = '';
|
||||
// that.originImg = imag[0].origin_value;
|
||||
|
||||
listJudge.forEach(item => {
|
||||
let obj = new Object();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<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-table
|
||||
v-loading="listLoading"
|
||||
|
||||
:data="productionplan.results"
|
||||
border
|
||||
fit
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ export default {
|
|||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
this.productionplanID=response.data.id;
|
||||
console.log(response.data.process_json);
|
||||
|
||||
let process_json = [];
|
||||
for(let item in response.data.process_json){
|
||||
let obj = new Object();
|
||||
|
|
@ -184,7 +184,7 @@ export default {
|
|||
process_json.push(obj)
|
||||
}
|
||||
|
||||
console.log(process_json);
|
||||
|
||||
this.process_json= process_json;
|
||||
}
|
||||
|
||||
|
|
@ -212,13 +212,13 @@ export default {
|
|||
//查看该玻璃检验记录表
|
||||
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){
|
||||
|
||||
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>
|
||||
<div class="app-container">
|
||||
<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"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
<el-table
|
||||
:data="recordList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="表单名称">
|
||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||
</el-table-column>
|
||||
<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 label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -26,69 +36,155 @@
|
|||
<span v-else>未提交</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
|
||||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
|
||||
<el-link @click="handleRecordDetail(scope)">查看 </el-link>
|
||||
</template>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
import {getTestRecord} from "@/api/qm";
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
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
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
components: { Pagination, customForm },
|
||||
data() {
|
||||
return {
|
||||
recordList:"",
|
||||
checkTypes:{
|
||||
10:"子工序检验",
|
||||
20:"工序检验",
|
||||
30:"工序复检",
|
||||
36:"夹层检验",
|
||||
40:"成品检验",
|
||||
},
|
||||
|
||||
recordList: "",
|
||||
checkTypes: {
|
||||
10: "子工序检验",
|
||||
20: "工序检验",
|
||||
30: "工序复检",
|
||||
36: "夹层检验",
|
||||
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: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.id = this.$route.params.id;
|
||||
this.productionplanid = this.$route.params.productionplanid;
|
||||
this.wproductnumber=this.$route.params.number;
|
||||
this.process=this.$route.params.process;
|
||||
|
||||
this.getListp();
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
getTestRecord({wproduct: this.id}).then(res=>{
|
||||
if(res.code==200){
|
||||
|
||||
this.recordList = res.data;
|
||||
}else{
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
getListp() {
|
||||
|
||||
getProductionplan(this.productionplanid).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@
|
|||
<div class="app-container">
|
||||
|
||||
<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
|
||||
:data="wproduct"
|
||||
border
|
||||
|
|
@ -54,6 +61,7 @@
|
|||
<script>
|
||||
import { getwproductList} from "@/api/wpm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
|
@ -62,8 +70,17 @@ export default {
|
|||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
productionplans:{
|
||||
number:""
|
||||
},
|
||||
wproduct: "",
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成',
|
||||
60:'军检完成'},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
|
|
@ -83,16 +100,26 @@ export default {
|
|||
created() {
|
||||
|
||||
this.id = this.$route.params.id;
|
||||
this.productionplanID = this.$route.params.productionplanID;
|
||||
this.productionplan = this.$route.params.productionplanid;
|
||||
this.getList();
|
||||
console.log(this.productionplanID);
|
||||
this.getpList();
|
||||
console.log(this.productionplan);
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getpList() {
|
||||
getProductionplan(this.productionplan).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplans = response.data;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//半成品列表
|
||||
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) {
|
||||
this.wproduct= response.data;
|
||||
}
|
||||
|
|
@ -103,8 +130,8 @@ export default {
|
|||
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope){
|
||||
|
||||
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id }, })
|
||||
console.log(this.productionplan);
|
||||
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