来料任务细节修改

yangwl
shaoyong 10 months ago
parent 76ef1c0c35
commit 35431f0d62

@ -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 = { const data = {
recordId, recordId,
status, status,
remark,
defectCode, defectCode,
remark defectQuality
} }
return request({ return request({
url: '/quality/qcIncome/changeCheckDetailStatus', url: '/quality/qcIncome/changeCheckDetailStatus',
@ -121,13 +122,7 @@ export function commitActualValue(recordId, actualValues) {
} }
//审核结果提交 //审核结果提交
export function commitCheckResult(recordId,typeCode,checkType,orderNo) { export function commitCheckResult(data) {
const data = {
recordId,
typeCode,
checkType,
orderNo
}
return request({ return request({
url: '/quality/qcIncome/commitCheckResult', url: '/quality/qcIncome/commitCheckResult',
method: 'put', method: 'put',

@ -9,7 +9,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24" :xs="24"> <el-col :span="24" :xs="24">
<el-table v-loading="loading" :data="itemList" ref="myTable" > <el-table v-loading="loading" :data="itemList" ref="myTable">
<el-table-column width="50" align="center" type="selection"> <el-table-column width="50" align="center" type="selection">
</el-table-column> </el-table-column>
<!-- 序号 --> <!-- 序号 -->
@ -37,6 +37,23 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入不良描述" /> <el-input v-model="scope.row.remark" placeholder="请输入不良描述" />
</template> </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>
<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">
@ -55,7 +72,6 @@
v-model="scope.row.status" v-model="scope.row.status"
active-value="Y" active-value="Y"
inactive-value="N" inactive-value="N"
@change="handleStatusChange(scope.row)"
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
@ -121,7 +137,7 @@ export default {
total: 0, total: 0,
// BOM // BOM
itemList: null, itemList: null,
qcCheckTaskDetails: [],
// //
bomCode: undefined, bomCode: undefined,
defaultProps: { defaultProps: {
@ -156,7 +172,7 @@ export default {
methods: { methods: {
getDefect(){ getDefect(){
getDefectList('defect_in').then(response => { getDefectList('material').then(response => {
this.defectList = response; this.defectList = response;
}); });
}, },
@ -207,10 +223,25 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
getAllRowData() {
this.rowData = this.$refs.myTable.data;
},
// //
submitBomForm() { 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.$modal.msgSuccess("检测完成");
this.$emit('saveCheck'); this.$emit('saveCheck');
this.showFlag = false; this.showFlag = false;
@ -223,16 +254,16 @@ export default {
}, },
// /YN // /YN
handleStatusChange(row) { /* handleStatusChange(row) {
let text = row.status === "N" ? "不合格" : "合格"; let text = row.status === "N" ? "不合格" : "合格";
this.$modal.confirm('确认' + '"' + row.projectNo + '"'+text+'吗?').then(function() { 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(() => { }).then(() => {
this.$modal.msgSuccess(text + "操作成功"); this.$modal.msgSuccess(text + "操作成功");
}).catch(function() { }).catch(function() {
row.status = row.status === "N" ? "Y" : "N"; row.status = row.status === "N" ? "Y" : "N";
}); });
}, }, */
// //
/** 检测结果钮操作 */ /** 检测结果钮操作 */

Loading…
Cancel
Save