Merge remote-tracking branch 'origin/master'

master
zhaoxiaolin 10 months ago
commit b2094a5830

@ -93,12 +93,13 @@ export function getCkeckProjectList(query) {
}
//合格不合格
export function changeCheckDetailStatus(recordId, status,defectCode,remark) {
export function changeCheckDetailStatus(recordId, status,remark,defectCode,defectQuality) {
const data = {
recordId,
status,
remark,
defectCode,
remark
defectQuality
}
return request({
url: '/quality/qcIncome/changeCheckDetailStatus',
@ -121,13 +122,7 @@ export function commitActualValue(recordId, actualValues) {
}
//审核结果提交
export function commitCheckResult(recordId,typeCode,checkType,orderNo) {
const data = {
recordId,
typeCode,
checkType,
orderNo
}
export function commitCheckResult(data) {
return request({
url: '/quality/qcIncome/commitCheckResult',
method: 'put',

@ -37,6 +37,23 @@
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入不良描述" />
</template>
</el-table-column>
<el-table-column label="不良类型" align="left" prop="defectCode" width="120">
<template slot-scope="scope">
<el-select v-model="scope.row.defectCode" placeholder="检验结果" clearable>
<el-option
v-for="(item,index) in defectList"
:key="index"
:label="item.defectSubclass"
:value="item.defectCode"
/>
</el-select>
</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 label="检测值" align="center" class-name="small-padding fixed-width" v-if="this.viewStatus != '1' ">
<template slot-scope="scope">
@ -55,7 +72,6 @@
v-model="scope.row.status"
active-value="Y"
inactive-value="N"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
@ -105,6 +121,7 @@ import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitChe
export default {
name: "itemSelectUser",
dicts: ["check_result","qc_rule_prop"],
props: ['defectType'],
data() {
return {
viewStatus : '0',
@ -121,7 +138,7 @@ export default {
total: 0,
// BOM
itemList: null,
qcCheckTaskDetails: [],
//
bomCode: undefined,
defaultProps: {
@ -156,7 +173,8 @@ export default {
methods: {
getDefect(){
getDefectList('defect_in').then(response => {
console.log(this.defectType);
getDefectList(this.defectType).then(response => {
this.defectList = response;
});
},
@ -207,10 +225,33 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
getAllRowData() {
const rowArray = this.$refs.myTable.data;
this.rowData = rowArray.map(obj => {
const found = this.defectList.find(subObj => subObj.defectCode === obj.defectCode);
if (found) {
return { ...obj, defectSubclass: found.defectSubclass };
} else {
return obj;
}
});
},
//
submitBomForm() {
commitCheckResult(this.queryParams.belongTo,this.typeCode,this.checkType,this.orderNo).then(response => {
//----
this.getAllRowData();
const data = {
recordId: this.data.recordId,
typeCode: this.typeCode,
checkType: this.checkType,
orderCode: this.orderNo,
workorderCodeSap: this.orderNo,
sampleQuality: this.data.sampleQuality,
incomeBatchNo: this.data.incomeBatchNo,
qcCheckTaskDetails: this.rowData,
}
commitCheckResult(data).then(response => {
this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck');
this.showFlag = false;
@ -223,16 +264,16 @@ export default {
},
// /YN
handleStatusChange(row) {
/* handleStatusChange(row) {
let text = row.status === "N" ? "不合格" : "合格";
this.$modal.confirm('确认' + '"' + row.projectNo + '"'+text+'吗?').then(function() {
return changeCheckDetailStatus(row.recordId, row.status, row.defectCode,row.remark);
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";
});
},
}, */
//
/** 检测结果钮操作 */

@ -355,6 +355,7 @@
<ItemSelectProject
ref="itemSelectProject"
@saveCheck="saveCheck"
:defectType="'material'"
></ItemSelectProject>
</div>
</template>

@ -325,6 +325,7 @@
<ItemSelectProject
ref="itemSelectProject"
@saveCheck="saveCheck"
:defectType="'inventory'"
></ItemSelectProject>
</div>
</template>

@ -394,6 +394,7 @@
<ItemSelectProject
ref="itemSelectProject"
@saveCheck="saveCheck"
:defectType="'product'"
></ItemSelectProject>
</div>
</template>

Loading…
Cancel
Save