bugfix
This commit is contained in:
parent
43a936b7d9
commit
db83e0224e
|
@ -132,7 +132,6 @@
|
||||||
<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;display: none">
|
||||||
<!--<img id="canvasImg" src="./../../assets/glass.png" style="width:500px;height: 300px;display: none">-->
|
|
||||||
<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">
|
||||||
|
@ -200,6 +199,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
debugger;
|
||||||
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
that.checkForm = {};
|
that.checkForm = {};
|
||||||
this.form = this.formID;
|
this.form = this.formID;
|
||||||
|
@ -232,17 +233,20 @@
|
||||||
let listJudge = this.formData.filter(item => {
|
let listJudge = this.formData.filter(item => {
|
||||||
return item.need_judge === true;
|
return item.need_judge === true;
|
||||||
});
|
});
|
||||||
|
debugger;
|
||||||
listJudge.forEach(item => {
|
listJudge.forEach(item => {
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
obj = item;
|
obj = item;
|
||||||
that.judgeList.push(obj)
|
that.judgeList.push(obj)
|
||||||
});
|
});
|
||||||
|
debugger;
|
||||||
let imag= this.formData.filter(item => {
|
let imag= this.formData.filter(item => {
|
||||||
return item.field_type === 'draw';
|
return item.field_type === 'draw';
|
||||||
});
|
});
|
||||||
that.img = new Image();
|
that.img = new Image();
|
||||||
that.img.crossOrigin = '';
|
that.img.crossOrigin = 'anonymous';
|
||||||
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
let value = imag[0].field_value?imag[0].field_value:imag[0].draw_template;
|
||||||
|
that.img = 'http://47.95.0.242:2222'+value;
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
that.canvasInit();
|
that.canvasInit();
|
||||||
},500);
|
},500);
|
||||||
|
|
|
@ -97,6 +97,7 @@
|
||||||
:results="fieldList.results"
|
:results="fieldList.results"
|
||||||
:hasPicture="hasPicture"
|
:hasPicture="hasPicture"
|
||||||
:formID="formID"
|
:formID="formID"
|
||||||
|
:isDisabled="isDisabled"
|
||||||
@formFunc="formFunc"
|
@formFunc="formFunc"
|
||||||
/>
|
/>
|
||||||
<!--<el-form ref="Forms" label-width="100px" :model="checkForm">
|
<!--<el-form ref="Forms" label-width="100px" :model="checkForm">
|
||||||
|
@ -695,7 +696,8 @@
|
||||||
imgData: '',
|
imgData: '',
|
||||||
canvasImg: '',
|
canvasImg: '',
|
||||||
judgeList: [],
|
judgeList: [],
|
||||||
limitedPhoto:false
|
limitedPhoto:false,
|
||||||
|
isDisabled:true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="wproductList.results"
|
:data="wproductList.results"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
|
@ -15,9 +13,9 @@
|
||||||
<el-table-column label="产品编号">
|
<el-table-column label="产品编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="任务编号">
|
<el-table-column label="任务编号">
|
||||||
<template slot-scope="scope" v-if="scope.row.subproduction_plan_">{{ scope.row.subproduction_plan_.number }}</template>
|
<template slot-scope="scope" v-if="scope.row.subproduction_plan_">{{ scope.row.subproduction_plan_.number }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称">
|
<el-table-column label="产品名称">
|
||||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.name }}</template>
|
||||||
|
@ -25,18 +23,17 @@
|
||||||
<el-table-column label="型号规格">
|
<el-table-column label="型号规格">
|
||||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
|
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="军检状态">
|
<el-table-column label="军检状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
|
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
|
||||||
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
|
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="军检结论">
|
<el-table-column label="军检结论">
|
||||||
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope"><el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
|
<el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
|
||||||
<el-tag v-if="scope.row.is_mtestok==true">合格</el-tag></template>
|
<el-tag v-if="scope.row.is_mtestok==true">合格</el-tag>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库">
|
<el-table-column label="仓库">
|
||||||
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ scope.row.warehouse_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ scope.row.warehouse_.name }}</template>
|
||||||
|
@ -47,8 +44,6 @@
|
||||||
<el-table-column label="检查状态">
|
<el-table-column label="检查状态">
|
||||||
<template slot-scope="scope">{{ actstate_[scope.row.act_state]}}</template>
|
<template slot-scope="scope">{{ actstate_[scope.row.act_state]}}</template>
|
||||||
</el-table-column>
|
</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
|
||||||
|
@ -57,7 +52,6 @@
|
||||||
>军检
|
>军检
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
|
|
||||||
@click="checkRecord(scope)"
|
@click="checkRecord(scope)"
|
||||||
>检验记录
|
>检验记录
|
||||||
</el-link>
|
</el-link>
|
||||||
|
@ -72,21 +66,23 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||||
<el-form :model="mtestform" label-width="130px"
|
<el-form
|
||||||
label-position="right">
|
:model="mtestform"
|
||||||
|
label-width="130px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
<el-form-item label="是否军检合格" prop="name">
|
<el-form-item label="是否军检合格" prop="name">
|
||||||
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="军检备注" prop="name">
|
<el-form-item label="军检备注" prop="name">
|
||||||
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="submtest">确 定</el-button>
|
<el-button type="primary" @click="submtest">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="检验记录" :close-on-click-modal="false" :visible.sync="limitedCheckRecord">
|
<el-dialog title="检验记录" :close-on-click-modal="false" :visible.sync="limitedCheckRecord">
|
||||||
<el-table
|
<el-table
|
||||||
:data="recordList"
|
:data="recordList"
|
||||||
|
@ -108,70 +104,54 @@
|
||||||
</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
|
<el-link
|
||||||
@click="handleRecordDetail(scope)"
|
@click="handleRecordDetail(scope)"
|
||||||
>查看
|
>查看
|
||||||
</el-link>
|
</el-link>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="60%"
|
|
||||||
:title="formName"
|
:title="formName"
|
||||||
:visible.sync="recordVisible"
|
:visible.sync="recordVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@close="recordCancel"
|
@close="recordCancel"
|
||||||
>
|
>
|
||||||
<customForm
|
<el-row>
|
||||||
v-if="recordVisible"
|
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||||
:results="fieldList"
|
<div class="items">
|
||||||
:hasPicture="hasPicture"
|
<span class="itemLabel">{{item.field_name}}:</span>
|
||||||
:formID="recordform"
|
<span>{{item.field_value}}</span>
|
||||||
:wproduct="wproduct"
|
</div>
|
||||||
:recordId="recordId"
|
</el-col>
|
||||||
:isDisabled="isDisabled"
|
</el-row>
|
||||||
@recordSubmit="recordSubmit"
|
|
||||||
@recordSave="recordSave"
|
|
||||||
@recordCancel="recordCancel"
|
|
||||||
/>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getfifodetailList } from "@/api/inm";
|
import {getfifodetailList} from "@/api/inm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { mtest,getwproductList } from "@/api/wpm";
|
import {mtest, getwproductList} from "@/api/wpm";
|
||||||
|
|
||||||
import customForm from '@/components/customForm/index';
|
import customForm from '@/components/customForm/index';
|
||||||
import { getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
import {getTestRecord,getTestRecordItem} from "@/api/qm";
|
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, customForm},
|
||||||
components: { Pagination,customForm },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wproductList: {
|
wproductList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
|
||||||
checkTypes: {
|
checkTypes: {
|
||||||
10: "子工序检验",
|
10: "子工序检验",
|
||||||
20: "工序检验",
|
20: "工序检验",
|
||||||
|
@ -191,14 +171,13 @@ export default {
|
||||||
26: "待夹层检验",
|
26: "待夹层检验",
|
||||||
70: "报废",
|
70: "报废",
|
||||||
},
|
},
|
||||||
activeName:"1",
|
activeName: "1",
|
||||||
saleproduct:"",
|
saleproduct: "",
|
||||||
dialogVisible:false,
|
dialogVisible: false,
|
||||||
mtestform:{
|
mtestform: {
|
||||||
is_mtestok:false,
|
is_mtestok: false,
|
||||||
},
|
},
|
||||||
wproduct: null,
|
wproduct: null,
|
||||||
limitedCheckRecord: false,
|
|
||||||
recordList: [],
|
recordList: [],
|
||||||
fieldList: [],
|
fieldList: [],
|
||||||
is_testok: "true",
|
is_testok: "true",
|
||||||
|
@ -217,7 +196,6 @@ export default {
|
||||||
dialogFormVisibles: false,
|
dialogFormVisibles: false,
|
||||||
limitedCheckRecord: false,
|
limitedCheckRecord: false,
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
|
|
||||||
WarehouseData: "",
|
WarehouseData: "",
|
||||||
formName: '项目检查表',
|
formName: '项目检查表',
|
||||||
};
|
};
|
||||||
|
@ -229,44 +207,36 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//待检成品列表
|
//待检成品列表
|
||||||
getList() {
|
getList() {
|
||||||
|
|
||||||
|
|
||||||
this.listQuery.material__type = 1;
|
this.listQuery.material__type = 1;
|
||||||
getwproductList(this.listQuery).then((response) => {
|
getwproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproductList = response.data;
|
this.wproductList = response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleMtest(scope){
|
handleMtest(scope) {
|
||||||
|
this.saleproduct = scope.row.id;
|
||||||
this.saleproduct=scope.row.id;
|
this.dialogVisible = true;
|
||||||
this.dialogVisible=true;
|
|
||||||
},
|
},
|
||||||
submtest(){
|
submtest() {
|
||||||
mtest(this.saleproduct,this.mtestform).then((res)=>{
|
mtest(this.saleproduct, this.mtestform).then((res) => {
|
||||||
if(res.code >= 200)
|
if (res.code >= 200) {
|
||||||
{
|
|
||||||
this.$message.success("提交成功!");
|
this.$message.success("提交成功!");
|
||||||
this.dialogVisible=false;
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//检验记录
|
//检验记录
|
||||||
checkRecord(scope){
|
checkRecord(scope) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.wproduct = scope.row.id;//成品ID
|
that.wproduct = scope.row.id;//成品ID
|
||||||
that.limitedCheckRecord = true;
|
that.limitedCheckRecord = true;
|
||||||
getTestRecord({wproduct:scope.row.id,page:0}).then(res=>{
|
getTestRecord({wproduct: scope.row.id, page: 0}).then(res => {
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
that.recordList = res.data;
|
that.recordList = res.data;
|
||||||
}else{
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -275,45 +245,28 @@ export default {
|
||||||
handleRecordDetail(scope) {
|
handleRecordDetail(scope) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.fieldList = [];
|
that.fieldList = [];
|
||||||
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) => {
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
let arr = [];
|
if (res.code >= 200) {
|
||||||
let fieldList = res.data.record_data;
|
debugger;
|
||||||
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;
|
that.recordVisible = true;
|
||||||
});
|
that.formName = res.data.form_.name;
|
||||||
})
|
that.fieldList = res.data.record_data;
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.items {
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemLabel {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||||
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
|
<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_.name}}
|
||||||
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item>
|
</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="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
|
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
|
||||||
<el-descriptions-item label="玻璃编号">{{wproductnumber}}</el-descriptions-item>
|
<el-descriptions-item label="玻璃编号">{{wproductnumber}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="玻璃所在子工序">{{process}}</el-descriptions-item>
|
<el-descriptions-item label="玻璃所在子工序">{{process}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="recordList.results"
|
:data="recordList.results"
|
||||||
border
|
border
|
||||||
|
@ -21,14 +22,14 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="300"
|
height="300"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<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">{{
|
<template slot-scope="scope">
|
||||||
checkTypes[scope.row.type]
|
{{checkTypes[scope.row.type]}}
|
||||||
}}</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否提交">
|
<el-table-column label="是否提交">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -38,45 +39,41 @@
|
||||||
</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
|
<el-dialog
|
||||||
width="60%"
|
|
||||||
:title="formName"
|
:title="formName"
|
||||||
:visible.sync="recordVisible"
|
:visible.sync="recordVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@close="recordCancel"
|
@close="recordCancel"
|
||||||
>
|
>
|
||||||
<customForm
|
<el-row>
|
||||||
v-if="recordVisible"
|
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||||
:results="fieldList"
|
<div class="items" v-if="item.field_type!=='draw'">
|
||||||
:hasPicture="hasPicture"
|
<span class="itemLabel">{{item.field_name}}:</span>
|
||||||
:formID="recordform"
|
<span>{{item.field_value}}</span>
|
||||||
:wproduct="wproduct"
|
</div>
|
||||||
:recordId="recordId"
|
</el-col>
|
||||||
:isDisabled="isDisabled"
|
<el-col v-for="item in fieldList" :key="item.id" :span="24">
|
||||||
@recordSubmit="recordSubmit"
|
<div class="items" v-if="item.field_type==='draw'" style="height: 400px">
|
||||||
@recordSave="recordSave"
|
<span class="itemLabel">{{item.field_name}}:</span>
|
||||||
@recordCancel="recordCancel"
|
<img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
|
||||||
/>
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-dialog>
|
</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 {getProductionplan} from "@/api/pm";
|
||||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
import {getTestRecord, getTestRecordItem} from "@/api/qm";
|
||||||
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 {
|
export default {
|
||||||
components: { Pagination, customForm },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recordList: "",
|
recordList: "",
|
||||||
|
@ -87,13 +84,14 @@ export default {
|
||||||
36: "夹层检验",
|
36: "夹层检验",
|
||||||
40: "成品检验",
|
40: "成品检验",
|
||||||
},
|
},
|
||||||
state_:{
|
state_: {
|
||||||
10:'制定中',
|
10: '制定中',
|
||||||
20:'已下达',
|
20: '已下达',
|
||||||
30:'已接受',
|
30: '已接受',
|
||||||
40:'生产中',
|
40: '生产中',
|
||||||
50:'已完成',
|
50: '已完成',
|
||||||
60:'军检完成'},
|
60: '军检完成'
|
||||||
|
},
|
||||||
recordVisible: false,
|
recordVisible: false,
|
||||||
customfieldList: [],
|
customfieldList: [],
|
||||||
recordform: null,
|
recordform: null,
|
||||||
|
@ -103,11 +101,11 @@ export default {
|
||||||
hasPicture: false,
|
hasPicture: false,
|
||||||
fieldList: [],
|
fieldList: [],
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
productionplan:{
|
productionplan: {
|
||||||
number:""
|
number: ""
|
||||||
},
|
},
|
||||||
wproductnumber:null,
|
wproductnumber: null,
|
||||||
process:null,
|
process: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -115,8 +113,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.id = this.$route.params.id;
|
this.id = this.$route.params.id;
|
||||||
this.productionplanid = this.$route.params.productionplanid;
|
this.productionplanid = this.$route.params.productionplanid;
|
||||||
this.wproductnumber=this.$route.params.number;
|
this.wproductnumber = this.$route.params.number;
|
||||||
this.process=this.$route.params.process;
|
this.process = this.$route.params.process;
|
||||||
|
|
||||||
this.getListp();
|
this.getListp();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -133,7 +131,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
getTestRecord({ wproduct: this.id }).then((res) => {
|
getTestRecord({wproduct: this.id}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.recordList = res.data;
|
this.recordList = res.data;
|
||||||
} else {
|
} else {
|
||||||
|
@ -144,47 +142,29 @@ export default {
|
||||||
//点击记录里的查看
|
//点击记录里的查看
|
||||||
handleRecordDetail(scope) {
|
handleRecordDetail(scope) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.recordVisible = false;
|
that.fieldList = [];
|
||||||
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) => {
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
let arr = [];
|
if (res.code >= 200) {
|
||||||
let fieldList = res.data.record_data;
|
debugger;
|
||||||
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;
|
that.recordVisible = true;
|
||||||
});
|
that.formName = res.data.form_.name;
|
||||||
});
|
that.fieldList = res.data.record_data;
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.items {
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemLabel {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -938,12 +938,11 @@
|
||||||
//批量入库
|
//批量入库
|
||||||
putins() {
|
putins() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.mutipID = []
|
_this.mutipID = [];
|
||||||
this.$refs.multipleTable.selection.forEach((item) => {
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
_this.mutipID.push(item.id);
|
_this.mutipID.push(item.id);
|
||||||
|
|
||||||
});
|
});
|
||||||
console.log(_this.mutipID);
|
|
||||||
createputins({
|
createputins({
|
||||||
warehouse: this.form.warehouse,
|
warehouse: this.form.warehouse,
|
||||||
wproducts: _this.mutipID,
|
wproducts: _this.mutipID,
|
||||||
|
@ -1185,6 +1184,7 @@
|
||||||
that.formName = res.data.form_.name;
|
that.formName = res.data.form_.name;
|
||||||
let fieldList = res.data.record_data;
|
let fieldList = res.data.record_data;
|
||||||
that.fieldList = [...fieldList];
|
that.fieldList = [...fieldList];
|
||||||
|
debugger;
|
||||||
let arr = fieldList.filter(item => {
|
let arr = fieldList.filter(item => {
|
||||||
return item.field_type === 'draw'
|
return item.field_type === 'draw'
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue