不良检验优化

master
shaoyong 8 months ago
parent 59e95d5f39
commit 86794b24a6

@ -56,10 +56,17 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="物料组名称" prop="groupName"> <el-form-item label="物料组名称" prop="groupName">
<el-input v-model="form.groupName" placeholder="请输入物料组名称" /> <el-select v-model="form.groupCode" filterable clearable placeholder="请选择物料组">
<el-option
v-for="(item,index) in OriginalGroupList"
:key="index"
:label="item.groupName"
:value="item.groupCode">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="物料组编码" prop="groupCode"> <el-form-item v-show="true" label="物料组编码" prop="groupCode">
<el-input v-model="form.groupCode" placeholder="请输入物料组编码" disabled/> <el-input v-model="form.groupName" placeholder="请输入物料组编码"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -78,7 +85,7 @@
<script> <script>
import { import {
getGroupList, getOriginalGroupList,
addMaterialGroup, addMaterialGroup,
delMaterialGroup, delMaterialGroup,
updateMaterialGroup, updateMaterialGroup,
@ -117,6 +124,8 @@ export default {
groupName: undefined, groupName: undefined,
// //
materialGroupList: [], materialGroupList: [],
//
OriginalGroupList: [],
// //
nodeData: {}, nodeData: {},
// //
@ -150,6 +159,7 @@ export default {
}, },
created() { created() {
this.getMaterialTree(); this.getMaterialTree();
this.getOriginalGroup();
}, },
methods: { methods: {
// //
@ -175,6 +185,13 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 获取初始物料组 */
getOriginalGroup() {
getOriginalGroupList(this.queryParams).then((response) => {
this.OriginalGroupList = response.rows;
//this.loading = false;
});
},
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getMaterialTree() { getMaterialTree() {
materialTreeSelect().then((response) => { materialTreeSelect().then((response) => {

@ -48,11 +48,6 @@
v-hasPermi="['quality:qcIncome:edit']" v-hasPermi="['quality:qcIncome:edit']"
>不良数量</el-button> >不良数量</el-button>
</template> </template>
</el-table-column>
<el-table-column label="不良数量" align="left" prop="defectQuality" width="120">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.defectQuality" placeholder="请输入不良数量"/>
</template>
</el-table-column> </el-table-column>
<el-table-column label="检测值" align="center" class-name="small-padding fixed-width" v-if="this.viewStatus != '1' "> <el-table-column label="检测值" align="center" class-name="small-padding fixed-width" v-if="this.viewStatus != '1' ">
<template slot-scope="scope"> <template slot-scope="scope">
@ -210,7 +205,6 @@ export default {
this.getDefect(); this.getDefect();
}, },
methods: { methods: {
getDefect(){ getDefect(){
getDefectList(this.typeCode).then(response => { getDefectList(this.typeCode).then(response => {
this.defectList = response; this.defectList = response;
@ -331,6 +325,7 @@ export default {
this.defectForm.defectItems.forEach(item => { this.defectForm.defectItems.forEach(item => {
item.belongToDetail = row.recordId; item.belongToDetail = row.recordId;
item.belongTo = row.belongTo; item.belongTo = row.belongTo;
item.noOkQuality = 0;
}); });
getDefectValue(row.recordId).then(response => { getDefectValue(row.recordId).then(response => {
let values = response.rows; let values = response.rows;
@ -343,6 +338,8 @@ export default {
noOkQuality: item.noOkQuality, noOkQuality: item.noOkQuality,
})); }));
this.updateFlag = true; this.updateFlag = true;
}else{
this.updateFlag = false;
} }
this.defectOpen = true; this.defectOpen = true;
}); });

Loading…
Cancel
Save