Merge remote-tracking branch 'origin/master'

yangwl
Yangwl 5 months ago
commit 390a40ae15

@ -109,10 +109,12 @@ export function changeCheckDetailStatus(recordId, status,remark,defectCode,defec
} }
//测量值提交 //测量值提交
export function commitActualValue(recordId, actualValues) { export function commitActualValue(recordId, actualValues,status,checkLevel,sampleAql,sampleCode,sampleQuality) {
const data = { const data = {
recordId, recordId,
actualValues actualValues,
status,
checkLevel,sampleAql,sampleCode,sampleQuality
} }
return request({ return request({
url: '/quality/qcIncome/commitActualValue', url: '/quality/qcIncome/commitActualValue',
@ -121,6 +123,24 @@ export function commitActualValue(recordId, actualValues) {
}) })
} }
//获取最多坏的数量
export function getAutoJudge(sampleQuality,checkLevel,sampleAql,actualValues,downDiff,upperDiff) {
const data = {
sampleQuality,
checkLevel,
sampleAql,
actualValues,
downDiff,
upperDiff
}
return request({
url: '/quality/handCheck/getAutoJudge',
method: 'post',
data: data
})
}
//审核结果提交 //审核结果提交
export function commitCheckResult(data) { export function commitCheckResult(data) {
return request({ return request({

@ -355,8 +355,13 @@
:show-overflow-tooltip="true" :formatter="orderCodeFormate" /> :show-overflow-tooltip="true" :formatter="orderCodeFormate" />
<el-table-column label="报工单号" width="115" align="left" prop="reportCode" <el-table-column label="报工单号" width="115" align="left" prop="reportCode"
:show-overflow-tooltip="true" /> :show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch" <el-table-column label="批次" width="250" align="left" prop="batch">
:show-overflow-tooltip="true" /> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.batch"
@change="handleEdit(scope.$index, scope.row)"
></el-input>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="报工数量" width="120" align="left" prop="quantityFeedback" <el-table-column label="报工数量" width="120" align="left" prop="quantityFeedback"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
@ -443,7 +448,7 @@
</el-table-column> </el-table-column>
<el-table-column label="单位" width="50" align="center" prop="unit" /> <el-table-column label="单位" width="50" align="center" prop="unit" />
<el-table-column label="反冲标识" align="center" prop="recoil" /> <el-table-column label="反冲标识" align="center" prop="recoil" />
<el-table-column label="sap项目编码" align="center" prop="rspos" />
<el-table-column label="仓库" width="150" align="center" prop="warehouseCode"> <el-table-column label="仓库" width="150" align="center" prop="warehouseCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%" <el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%"
@ -1339,13 +1344,6 @@ export default {
this.queryParams.workorderCode = ""; this.queryParams.workorderCode = "";
this.queryParams.machineCode = ""; this.queryParams.machineCode = "";
}); });
//this.queryParams.workorderCode = sr.workorderCode;
//BOM
//this.queryParams.parentOrder = '0';
//getBomList(this.queryParams).then(response => {
// this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode')
//});
}, },
// (zxl) // (zxl)
pConsumeSelection(selection, row) { pConsumeSelection(selection, row) {
@ -1354,7 +1352,8 @@ export default {
const hasDuplicate = acc.some( const hasDuplicate = acc.some(
(item) => (item) =>
item.materialCode === cur.materialCode && item.materialCode === cur.materialCode &&
item.workorderCode === cur.workorderCode item.workorderCode === cur.workorderCode &&
item.rspos === cur.rspos
); );
if (!hasDuplicate) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
@ -1370,7 +1369,8 @@ export default {
this.pConsumeRows.forEach((item) => { this.pConsumeRows.forEach((item) => {
if ( if (
item.workorderCode != row.workorderCode || item.workorderCode != row.workorderCode ||
item.materialCode != row.materialCode item.materialCode != row.materialCode ||
item.rspos != row.rspos
) { ) {
newPConsumeRows.push(item); newPConsumeRows.push(item);
} }
@ -1389,7 +1389,8 @@ export default {
const hasDuplicate = acc.some( const hasDuplicate = acc.some(
(item) => (item) =>
item.materialCode === cur.materialCode && item.materialCode === cur.materialCode &&
item.workorderCode === cur.workorderCode item.workorderCode === cur.workorderCode &&
item.rspos === cur.rspos
); );
if (!hasDuplicate) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
@ -1397,16 +1398,16 @@ export default {
return acc; return acc;
}, []); }, []);
}, },
sConsumeSelection(selection) { //sConsumeSelection(selection) {
this.sConsumeRows = selection; //this.sConsumeRows = selection;
}, //},
submitConsume() { submitConsume() {
this.loading = true; this.loading = true;
this.pConsumeRows = this.pConsumeRows.concat( this.pConsumeRows = this.pConsumeRows.concat(
this.mergedArray.filter( this.mergedArray.filter(
(obj2) => (obj2) =>
!this.pConsumeRows.some( !this.pConsumeRows.some(
(obj1) => obj1.materialCode === obj2.materialCode (obj1) => obj1.materialCode === obj2.materialCode && obj1.rspos === obj2.rspos
) )
) )
); );
@ -1583,17 +1584,18 @@ export default {
//-- //--
deleteBomRow(index, rows) { deleteBomRow(index, rows) {
let _this = this;
this.$modal this.$modal
.confirm("是否确认删除?确认后,不需要点击下方确定,立马删除!") .confirm("是否确认删除?确认后,不需要点击下方确定,立马删除!")
.then(function () { .then(function () {
if (rows[index].recordId != null) { if (rows[index].recordId != null) {
this.loading = true; _this.loading = true;
return deleteBomRowNow(rows[index].recordId); deleteBomRowNow(rows[index].recordId);
} }
}) })
.then(() => { .then(() => {
var newPConsumeRows = []; var newPConsumeRows = [];
this.pConsumeRows.forEach((item) => { _this.pConsumeRows.forEach((item) => {
if ( if (
item.workorderCode != rows[index].workorderCode || item.workorderCode != rows[index].workorderCode ||
item.materialCode != rows[index].materialCode item.materialCode != rows[index].materialCode
@ -1601,10 +1603,10 @@ export default {
newPConsumeRows.push(item); newPConsumeRows.push(item);
} }
}); });
this.pConsumeRows = newPConsumeRows; _this.pConsumeRows = newPConsumeRows;
rows.splice(index, 1); rows.splice(index, 1);
this.$modal.msgSuccess("删除成功"); _this.$modal.msgSuccess("删除成功");
this.loading = false; _this.loading = false;
}) })
.catch(() => {}); .catch(() => {});
}, },
@ -1632,7 +1634,7 @@ export default {
new Set([...this.pConsumeRowsall, ...obj].map(JSON.stringify)) new Set([...this.pConsumeRowsall, ...obj].map(JSON.stringify))
).map(JSON.parse); ).map(JSON.parse);
let arry2 = []; let arry2 = [];
this.pConsumeRowsall.forEach((item) => { this.pConsumeRowsall.forEach((item,i) => {
const row = { const row = {
workorderCode: item.workorderCode, workorderCode: item.workorderCode,
materialCode: item.component, materialCode: item.component,
@ -1640,26 +1642,28 @@ export default {
quantity: item.quantity, quantity: item.quantity,
unit: item.unit, unit: item.unit,
recoil: "X", recoil: "X",
parentOrder: sr.workorderCode, parentOrder: sr.workorderCode
}; };
arry2.push(row); arry2.push(row);
}); });
this.mergedArray = this.pConsumeRows.concat( this.mergedArray = this.pConsumeRows.concat(
arry2.filter( arry2.filter(
(obj2) => (obj2) =>!this.pConsumeRows.some(
!this.pConsumeRows.some( (obj1) => obj1.materialCode === obj2.materialCode && obj1.rspos === obj2.rspos
(obj1) => obj1.materialCode === obj2.materialCode
) )
) )
); );
const materialCodeSet = new Set( //const materialCodeSet = new Set(
this.pConsumeRows.map((item) => item.materialCode) // this.pConsumeRows.map((item) => item.materialCode)
//);
const rsposSet = new Set(
this.pConsumeRows.map((item) => item.rspos)
); );
// obj // obj
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {
// objcomponentpConsumeRows // objcomponentpConsumeRows
if (!materialCodeSet.has(obj[i].component)) { if (!rsposSet.has(obj[i].rspos)|| obj[i].rspos==null) {
const row = { const row = {
workorderCode: obj[i].workorderCode, workorderCode: obj[i].workorderCode,
materialCode: obj[i].component, materialCode: obj[i].component,
@ -1668,6 +1672,7 @@ export default {
unit: obj[i].unit, unit: obj[i].unit,
recoil: "X", recoil: "X",
parentOrder: sr.workorderCode, parentOrder: sr.workorderCode,
rspos: obj[i].rspos
}; };
// consumeList // consumeList
this.consumeList.push(row); this.consumeList.push(row);

@ -385,6 +385,7 @@
<el-table-column width="130" label="产品数量" align="center" prop="quantity"/> <el-table-column width="130" label="产品数量" align="center" prop="quantity"/>
<el-table-column label="已拆分数量" align="center" prop="quantitySplit"/> <el-table-column label="已拆分数量" align="center" prop="quantitySplit"/>
<el-table-column label="拆分数量" align="center" prop="atrr1"/> <el-table-column label="拆分数量" align="center" prop="atrr1"/>
<el-table-column label="生产版本" align="center" prop="atrr2"/>
</el-table> </el-table>
<el-form class="my-margin" :model="splitForm" ref="dynamicForm" label-width="80px"> <el-form class="my-margin" :model="splitForm" ref="dynamicForm" label-width="80px">

@ -214,6 +214,7 @@
</el-table-column>--> </el-table-column>-->
<el-table-column width="120" label="派工数量" align="center" prop="quantitySplit"/> <el-table-column width="120" label="派工数量" align="center" prop="quantitySplit"/>
<el-table-column width="50" label="单位" align="center" prop="unit"/> <el-table-column width="50" label="单位" align="center" prop="unit"/>
<el-table-column width="130" label="生产版本" align="center" prop="atrr2"/>
<el-table-column width="130" label="产线设备编码" align="center" prop="prodLineCode" v-if="false"/> <el-table-column width="130" label="产线设备编码" align="center" prop="prodLineCode" v-if="false"/>
<el-table-column width="300" label="产线设备" align="center" > <el-table-column width="300" label="产线设备" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -375,6 +376,7 @@
<el-table-column width="130" label="产品数量" align="center" prop="quantity"/> <el-table-column width="130" label="产品数量" align="center" prop="quantity"/>
<el-table-column label="已拆分数量" align="center" prop="quantitySplit"/> <el-table-column label="已拆分数量" align="center" prop="quantitySplit"/>
<el-table-column label="拆分数量" align="center" prop="atrr1"/> <el-table-column label="拆分数量" align="center" prop="atrr1"/>
<el-table-column label="生产版本" align="center" prop="atrr2"/>
</el-table> </el-table>
<el-form class="my-margin" :model="splitForm" ref="dynamicForm" label-width="80px"> <el-form class="my-margin" :model="splitForm" ref="dynamicForm" label-width="80px">
<!-- 编辑框 --> <!-- 编辑框 -->
@ -583,6 +585,7 @@
<el-table-column width="130" label="产品数量" align="center" prop="quantity"/> <el-table-column width="130" label="产品数量" align="center" prop="quantity"/>
<el-table-column label="已拆分数量" align="center" prop="quantitySplit"/> <el-table-column label="已拆分数量" align="center" prop="quantitySplit"/>
<el-table-column label="拆分数量" align="center" prop="atrr1"/> <el-table-column label="拆分数量" align="center" prop="atrr1"/>
<el-table-column label="生产版本" align="center" prop="atrr2"/>
</el-table> </el-table>
<el-form class="my-margin" :model="splitFormM" ref="dynamicForm" label-width="80px"> <el-form class="my-margin" :model="splitFormM" ref="dynamicForm" label-width="80px">
<el-row> <el-row>

@ -66,12 +66,13 @@
</el-table-column> </el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/> <el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/> <el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/>
<!--
<el-table-column label="合格判定" align="left" prop="judge" width="100" /> <el-table-column label="合格判定" align="left" prop="judge" width="100" />
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/> <el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>-->
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/> <el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/> <el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
<el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" /> <el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" />
<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/> <!--<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/>-->
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"

@ -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;
}, },
// /YN
/* 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>

@ -153,10 +153,10 @@
<el-table-column label="物料号" align="center" prop="materialCode" width="170" <el-table-column label="物料号" align="center" prop="materialCode" width="170"
:formatter="productCodeFormate" :formatter="productCodeFormate"
/> />
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/> <el-table-column label="物料名称" align="center" prop="materialName" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="收货数量" align="center" prop="quality" /> <el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/>
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="样本量编码" align="center" prop="sampleCode" width="120"/>
<el-table-column label="供应商编码" align="center" prop="supplierCode" width="120"/> <el-table-column label="供应商编码" align="center" prop="supplierCode" width="120"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/> <el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="来料类别" align="center" prop="orderType" width="100"> <el-table-column label="来料类别" align="center" prop="orderType" width="100">
@ -292,16 +292,6 @@
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" /> <el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item>
</el-col>
<el-col :span="6" v-for="(item,index) in form.defects" :key="index">
<el-form-item :label="item.defectSubclass" prop="">
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不合格数量" />
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单位" prop="unit" > <el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;"> <el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
@ -314,6 +304,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="检测水平" prop="checkLevel">
<el-select v-model="form.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-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -399,7 +401,7 @@ import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
export default { export default {
name: "Income", name: "Income",
components: { ItemSelectWorkOrder,ItemSelectSupplier,ItemSelectUser,ItemSelectProject}, components: { ItemSelectWorkOrder,ItemSelectSupplier,ItemSelectUser,ItemSelectProject},
dicts: ["unit","check_status","check_result","order_type_ll"], dicts: ["unit","check_status","check_result","order_type_ll","sample_level"],
data() { data() {
return { return {
// //
@ -585,7 +587,8 @@ export default {
updateTime: null, updateTime: null,
factoryCode: null, factoryCode: null,
delFlag: null, delFlag: null,
defects: [] defects: [],
checkLevel: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -636,6 +639,7 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
debugger
addIncome(this.form).then(response => { addIncome(this.form).then(response => {
this.open = false; this.open = false;
this.getList(); this.getList();

@ -129,13 +129,16 @@
<el-table-column label="检验方式" align="center" prop="checkMode" :show-overflow-tooltip="true" width="200"/> <el-table-column label="检验方式" align="center" prop="checkMode" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="检验工具" align="center" prop="checkTool" /> <el-table-column label="检验工具" align="center" prop="checkTool" />
<el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/> <el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/>
<!--
<el-table-column label="单位" align="center" prop="unitCode" > <el-table-column label="单位" align="center" prop="unitCode" >
<template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template> <template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template>
</el-table-column> </el-table-column>
<el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/> <el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/> -->
<el-table-column label="合格下限" align="center" prop="downDiff" width="100"/>
<el-table-column label="合格上限" align="center" prop="upperDiff" width="100"/>
<el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" /> <el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" />
<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/> <!--<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -226,6 +229,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col>
<el-form-item label="合格下限" prop="downDiff">
<el-input type='number' v-model="form.downDiff" placeholder="合格下限" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="合格上限" prop="upperDiff">
<el-input type='number' v-model="form.upperDiff" placeholder="合格上限" />
</el-form-item>
</el-col>
</el-row>
<!--
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="单位" prop="unitCode"> <el-form-item label="单位" prop="unitCode">
@ -240,7 +258,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
-->
</template> </template>
<!--
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="抽样方案" prop="samplePlan"> <el-form-item label="抽样方案" prop="samplePlan">
@ -254,14 +274,8 @@
<el-input type='textarea' v-model="form.defectLevel" placeholder="请输入检验标准" /> <el-input type='textarea' v-model="form.defectLevel" placeholder="请输入检验标准" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>-->
<el-row>
<el-col>
<el-form-item label="合格判定" prop="judge">
<el-input type='textarea' v-model="form.judge" placeholder="合格判定" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="检测项分类" prop="itemType"> <el-form-item label="检测项分类" prop="itemType">
@ -270,6 +284,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!--
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="合格判定比例" prop="judgeRate"> <el-form-item label="合格判定比例" prop="judgeRate">
@ -277,6 +292,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

@ -235,13 +235,11 @@ export default {
}, },
/**删除树节点 */ /**删除树节点 */
remove(node, data) { remove(node, data) {
const obj = this.projectList.find(obj => obj.projectTypeCode === data.id);
console.log(obj);
this.$modal this.$modal
.confirm('是否确认删除方案名称为"' + obj.projectTypeName + '"的数据项') .confirm('是否确认删除方案?')
.then(function () { .then(function () {
// //
return delQcProjectType(obj.id); return delQcProjectType(data.id);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();

Loading…
Cancel
Save