|
|
@ -18,30 +18,6 @@
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="4" v-if="this.typeCode == 'material' || this.typeCode == 'product'">
|
|
|
|
|
|
|
|
<el-form-item label="检测水平" prop="checkLevel">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.checkLevel" placeholder="请选择检测水平类型" clearable>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.sample_level"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4" v-if="this.typeCode == 'material' || this.typeCode == 'product'">
|
|
|
|
|
|
|
|
<el-form-item label="接受质量限" prop="checkAql">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.checkAql" placeholder="请选择检测水平类型" clearable>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.sample_aql"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
<el-col :span="4">
|
|
|
|
<el-form-item label="是否发起OA" prop="startOA">
|
|
|
|
<el-form-item label="是否发起OA" prop="startOA">
|
|
|
|
<el-radio-group v-model="form.startOA">
|
|
|
|
<el-radio-group v-model="form.startOA">
|
|
|
@ -100,9 +76,13 @@
|
|
|
|
<el-table-column label="检验方式" align="left" prop="checkMode" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column label="检验方式" align="left" prop="checkMode" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column label="检验工具" align="left" prop="checkTool" />
|
|
|
|
<el-table-column label="检验工具" align="left" prop="checkTool" />
|
|
|
|
<el-table-column label="检验标准" align="left" prop="checkStandard" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column label="检验标准" align="left" prop="checkStandard" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column label="上差值" align="left" prop="upperDiff" />
|
|
|
|
<el-table-column label="上差值" align="left" prop="upperDiff" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
<el-table-column label="下差值" align="left" prop="downDiff" />
|
|
|
|
<el-table-column label="下差值" align="left" prop="downDiff" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
<el-table-column label="单位" align="left" prop="unitCode" width="80"/>
|
|
|
|
<el-table-column label="单位" align="left" prop="unitCode" width="80"/>
|
|
|
|
|
|
|
|
<el-table-column label="样本量编码" align="left" prop="sampleCode" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
|
|
|
<el-table-column label="抽样数量" align="left" prop="sampleQuality" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
|
|
|
<el-table-column label="检测水平" align="left" prop="checkLevel" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
|
|
|
<el-table-column label="接受质量限" align="left" prop="sampleAql" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90" v-if="this.viewStatus == '1' ">
|
|
|
|
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90" v-if="this.viewStatus == '1' ">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="测量值" align="left" prop="actualValue" width="120"/>
|
|
|
|
<el-table-column label="测量值" align="left" prop="actualValue" width="120"/>
|
|
|
@ -161,6 +141,34 @@
|
|
|
|
<!--测量值弹窗-->
|
|
|
|
<!--测量值弹窗-->
|
|
|
|
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
|
|
|
|
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
|
|
|
|
<el-form :model="dynamicValidateForm" v-loading="dyloading" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
<el-form :model="dynamicValidateForm" v-loading="dyloading" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
|
|
|
|
<div v-if="this.upperDiff != null || this.downDiff !=null">
|
|
|
|
|
|
|
|
<el-form-item label="接受质量限" prop="checkLevel" v-if="this.typeCode == 'material' || this.typeCode == 'product'">
|
|
|
|
|
|
|
|
<el-select placeholder="请选择检测水平类型" clearable
|
|
|
|
|
|
|
|
@change="setSampleLevel" v-model="dynamicValidateForm.checkLevel"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.sample_level"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="接受质量限" prop="sampleAql" v-if="this.typeCode == 'material' || this.typeCode == 'product'">
|
|
|
|
|
|
|
|
<el-select placeholder="请选择接受质量限制" clearable
|
|
|
|
|
|
|
|
@change="setSampleAql" v-model="dynamicValidateForm.sampleAql"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.sample_aql"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item
|
|
|
|
<el-form-item
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
:label="'测量值' + index"
|
|
|
|
:label="'测量值' + index"
|
|
|
@ -205,7 +213,9 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitCheckResult,getDefectList,getWeightValue} from "@/api/quality/income";
|
|
|
|
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,
|
|
|
|
|
|
|
|
commitCheckResult,getDefectList,getWeightValue,getnoOkVals,getAutoJudge
|
|
|
|
|
|
|
|
} from "@/api/quality/income";
|
|
|
|
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
|
|
|
|
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "itemSelectUser",
|
|
|
|
name: "itemSelectUser",
|
|
|
@ -250,7 +260,9 @@ export default {
|
|
|
|
dynamicValidateForm: {
|
|
|
|
dynamicValidateForm: {
|
|
|
|
domains: [{
|
|
|
|
domains: [{
|
|
|
|
value: ''
|
|
|
|
value: ''
|
|
|
|
}]
|
|
|
|
}],
|
|
|
|
|
|
|
|
sampleAql:null,
|
|
|
|
|
|
|
|
checkLevel:null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
valueOpen: false,
|
|
|
|
valueOpen: false,
|
|
|
@ -278,10 +290,10 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
aqlNoOkVal:0,
|
|
|
|
|
|
|
|
sampleCode: null,
|
|
|
|
|
|
|
|
checkLevel:null
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -304,6 +316,7 @@ export default {
|
|
|
|
this.queryParams.belongTo = this.data.recordId;
|
|
|
|
this.queryParams.belongTo = this.data.recordId;
|
|
|
|
this.typeCode = typeCode;
|
|
|
|
this.typeCode = typeCode;
|
|
|
|
this.checkType = this.data.checkType;
|
|
|
|
this.checkType = this.data.checkType;
|
|
|
|
|
|
|
|
this.quality = this.data.quality;
|
|
|
|
this.orderNo = this.data.orderNo;
|
|
|
|
this.orderNo = this.data.orderNo;
|
|
|
|
this.viewStatus = this.data.checkStatus;
|
|
|
|
this.viewStatus = this.data.checkStatus;
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
@ -357,6 +370,9 @@ export default {
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
this.form.checkResult = 'Y';
|
|
|
|
this.form.checkResult = 'Y';
|
|
|
|
this.form.startOA = '0';
|
|
|
|
this.form.startOA = '0';
|
|
|
|
|
|
|
|
this.aqlNoOkVal = 0;
|
|
|
|
|
|
|
|
this.sampleCode = null;
|
|
|
|
|
|
|
|
this.checkLevel= null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
/** 重置按钮操作 */
|
|
|
@ -414,20 +430,10 @@ export default {
|
|
|
|
// 使用nextTick解决循环引用问题
|
|
|
|
// 使用nextTick解决循环引用问题
|
|
|
|
handleResetForm() {
|
|
|
|
handleResetForm() {
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
|
|
|
|
this.dynamicValidateForm.sampleAql = null;
|
|
|
|
|
|
|
|
this.dynamicValidateForm.checkLevel = null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
|
|
|
|
|
/* handleStatusChange(row) {
|
|
|
|
|
|
|
|
let text = row.status === "N" ? "不合格" : "合格";
|
|
|
|
|
|
|
|
this.$modal.confirm('确认' + '"' + row.projectNo + '"'+text+'吗?').then(function() {
|
|
|
|
|
|
|
|
return changeCheckDetailStatus(row.recordId, row.status, row.remark, row.defectCode, row.defectQuality);
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess(text + "操作成功");
|
|
|
|
|
|
|
|
}).catch(function() {
|
|
|
|
|
|
|
|
row.status = row.status === "N" ? "Y" : "N";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//动态测量值
|
|
|
|
//动态测量值
|
|
|
|
/** 检测结果钮操作 */
|
|
|
|
/** 检测结果钮操作 */
|
|
|
|
handleShowValue(row) {
|
|
|
|
handleShowValue(row) {
|
|
|
@ -435,11 +441,20 @@ export default {
|
|
|
|
this.valueOpen = true;
|
|
|
|
this.valueOpen = true;
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
this.weight = row.weight;
|
|
|
|
this.weight = row.weight;
|
|
|
|
|
|
|
|
this.upperDiff = row.upperDiff;
|
|
|
|
|
|
|
|
this.downDiff = row.downDiff;
|
|
|
|
|
|
|
|
if(row.sampleAql != null ){
|
|
|
|
|
|
|
|
this.dynamicValidateForm.sampleAql = row.sampleAql;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(row.checkLevel != null ){
|
|
|
|
|
|
|
|
this.dynamicValidateForm.checkLevel = row.checkLevel;
|
|
|
|
|
|
|
|
}
|
|
|
|
const actualValue = row.actualValue;
|
|
|
|
const actualValue = row.actualValue;
|
|
|
|
if(actualValue !== null && actualValue !== '') {
|
|
|
|
if(actualValue !== null && actualValue !== '') {
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
let values = actualValue.split(",");
|
|
|
|
let values = actualValue.split(",");
|
|
|
|
values.forEach((item,index) => {
|
|
|
|
values.forEach((item,index) => {
|
|
|
|
|
|
|
|
item = item.replace(/"/g, '').replace("[","").replace("]","");
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
value: item.toString(),
|
|
|
|
value: item.toString(),
|
|
|
|
key: Date.now() + index
|
|
|
|
key: Date.now() + index
|
|
|
@ -473,22 +488,53 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
submitForm(formName) {
|
|
|
|
submitForm(formName) {
|
|
|
|
|
|
|
|
let _this = this;
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
var autoStatus=null;
|
|
|
|
|
|
|
|
var auto
|
|
|
|
let values = this.dynamicValidateForm.domains;
|
|
|
|
let values = this.dynamicValidateForm.domains;
|
|
|
|
var actualValues = values.map(item => item.value);
|
|
|
|
var actualValues = values.map(item => item.value);
|
|
|
|
commitActualValue(this.recordId, actualValues).then(response => {
|
|
|
|
if(this.typeCode=='material' || this.typeCode =='product'){//只有来料和成品有自动判定
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
debugger
|
|
|
|
this.$modal.msgSuccess("提交成功");
|
|
|
|
//自动判定开始(仅使用范围形)
|
|
|
|
this.valueOpen = false;
|
|
|
|
getAutoJudge(this.quality,
|
|
|
|
this.getList();
|
|
|
|
this.dynamicValidateForm.checkLevel,
|
|
|
|
|
|
|
|
this.dynamicValidateForm.sampleAql,
|
|
|
|
|
|
|
|
actualValues,
|
|
|
|
|
|
|
|
_this.downDiff,
|
|
|
|
|
|
|
|
_this.upperDiff
|
|
|
|
|
|
|
|
).then(response => {
|
|
|
|
|
|
|
|
autoStatus = response.data.status;
|
|
|
|
|
|
|
|
this.commitActualValueFun(this.recordId, actualValues,autoStatus,
|
|
|
|
|
|
|
|
this.checkLevel,
|
|
|
|
|
|
|
|
this.sampleAql,
|
|
|
|
|
|
|
|
response.data.sampleCode,
|
|
|
|
|
|
|
|
response.data.sampleQuality
|
|
|
|
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//结束
|
|
|
|
|
|
|
|
}else{//不需要自动判定的情况
|
|
|
|
|
|
|
|
this.commitActualValueFun(this.recordId, actualValues,autoStatus,null,null,null,null);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log('error submit!!');
|
|
|
|
console.log('error submit!!');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
commitActualValueFun(recordId, actualValues,autoStatus,checkLevel,sampleAql,sampleCode,sampleQuality){
|
|
|
|
|
|
|
|
commitActualValue(recordId, actualValues,autoStatus,checkLevel,sampleAql,sampleCode,sampleQuality).then(response => {
|
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
|
|
|
|
this.dynamicValidateForm.checkLevel = null;
|
|
|
|
|
|
|
|
this.dynamicValidateForm.sampleAql = null;
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("提交成功");
|
|
|
|
|
|
|
|
this.valueOpen = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
resetForm(formName) {
|
|
|
|
resetForm(formName) {
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -570,9 +616,13 @@ export default {
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
setSampleLevel(sampleLevel){
|
|
|
|
|
|
|
|
this.checkLevel = sampleLevel;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setSampleAql(sampleAql){
|
|
|
|
|
|
|
|
this.sampleAql = sampleAql;
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|