生产过程检验ABC不良品的动态获取,抽样规则优化,物料组成员优化

master
shaoyong 11 months ago
parent 519a6b377e
commit 024ff7533b

@ -42,3 +42,9 @@ export function delDefectType(faultId) {
method: 'delete' method: 'delete'
}); });
} }
export function getDefectTypeListByDefectType(defectType) {
return request({
url: '/quality/defectType/getDefectTypeListByDefectType/' + defectType,
method: 'get',
});
}

@ -313,7 +313,12 @@ export default {
console.log(this.form.groupId); console.log(this.form.groupId);
if(this.form.materialCode != null) { if(this.form.materialCode != null) {
addMaterialGroupDetail(this.form).then((response) => { addMaterialGroupDetail(this.form).then((response) => {
let message = response.code
if(message == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
}else {
this.$modal.msgError("新增失败");
}
this.open = false; this.open = false;
this.getMaterialTree(); this.getMaterialTree();
}); });

@ -332,19 +332,9 @@
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" /> <el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6" v-for="(item,index) in form.defects" :key="index">
<el-form-item label="A类不良数量" prop="aNoOkquality"> <el-form-item :label="item.defectSubclass" prop="">
<el-input type="number" v-model="form.aNoOkquality" placeholder="请输入不良数量" /> <el-input type="number" v-model="item.noOkQuality" placeholder="请输入不合格数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="B类不良数量" prop="bNoOkquality">
<el-input type="number" v-model="form.bNoOkquality" placeholder="请输入不良数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="C类不良数量" prop="cNoOkquality">
<el-input type="number" v-model="form.cNoOkquality" placeholder="请输入不良数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -424,6 +414,7 @@ import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectWorkCenter from "./selectWorkCenter.vue"; import ItemSelectWorkCenter from "./selectWorkCenter.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue"; import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue"; import ItemSelectProject from "../qcIncome/checkProjectType.vue";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
export default { export default {
name: "QcProduce", name: "QcProduce",
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder}, components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
@ -445,6 +436,7 @@ export default {
// //
qcProduceList: [], qcProduceList: [],
checkTypeList:[], checkTypeList:[],
defectTypeList: [],
// //
title: "", title: "",
// //
@ -522,6 +514,7 @@ export default {
this.getDate(); this.getDate();
this.getList(); this.getList();
this.getCheckTypes(); this.getCheckTypes();
this.handleDefectType();
}, },
methods: { methods: {
/****/ /****/
@ -602,7 +595,8 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
factoryCode: null, factoryCode: null,
delFlag: null delFlag: null,
defects: []
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -625,8 +619,10 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.defects = this.defectTypeList;
this.open = true; this.open = true;
this.title = "添加生产过程检验任务"; this.title = "添加生产过程检验任务";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -735,6 +731,12 @@ export default {
// //
saveCheck(){ saveCheck(){
this.getList(); this.getList();
},
handleDefectType() {
const defectType = "produce"
getDefectTypeListByDefectType(defectType).then(response => {
this.defectTypeList = response.rows;
});
} }
} }
}; };

@ -133,13 +133,13 @@
<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="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="开始值" prop="startValue"> <el-form-item label="开始值" prop="startValue">
<el-input v-model="form.startValue" placeholder="请输入数字" /> <el-input type="number" v-model="form.startValue" placeholder="请输入数字" />
</el-form-item> </el-form-item>
<el-form-item label="结束值" prop="endValue"> <el-form-item label="结束值" prop="endValue">
<el-input v-model="form.endValue" placeholder="请输入数字" /> <el-input type="number" v-model="form.endValue" placeholder="请输入数字" />
</el-form-item> </el-form-item>
<el-form-item label="抽样数量" prop="sampleQuality"> <el-form-item label="抽样数量" prop="sampleQuality">
<el-input v-model="form.sampleQuality" placeholder="请输入抽样数量" /> <el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item> </el-form-item>
<el-form-item label="检验类型" prop="typeCode"> <el-form-item label="检验类型" prop="typeCode">
<el-select v-model="form.typeCode" placeholder="请选择检验类型" <el-select v-model="form.typeCode" placeholder="请选择检验类型"
@ -217,15 +217,12 @@ export default {
rules: { rules: {
startValue: [ startValue: [
{ required: true, message: "开始值不能为空", trigger: "blur" }, { required: true, message: "开始值不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
], ],
endValue: [ endValue: [
{ required: true, message: "结束值不能为空", trigger: "blur" }, { required: true, message: "结束值不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
], ],
sampleQuality: [ sampleQuality: [
{ required: true, message: "抽样数量不能为空", trigger: "blur" }, { required: true, message: "抽样数量不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
], ],
typeCode: [ typeCode: [
{ required: true, message: "检验类型不能为空", trigger: "blur" } { required: true, message: "检验类型不能为空", trigger: "blur" }

Loading…
Cancel
Save