批量入库
This commit is contained in:
@@ -95,6 +95,20 @@ export function setTheBoxToBeQualified(data) {
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置全部合格
|
||||
* @param {*} query
|
||||
* @returns
|
||||
*/
|
||||
export function setAllQualified(query) {
|
||||
return request({
|
||||
url: '/mes/wm/WmFgentryInspect/setAllQualified',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
批量修改不合格
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="检验结果" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-progress width="100" type="circle" :percentage="calculate_percentage(scope.row.result_good, scope.row.result_bad,scope.row.result_null)"></el-progress>
|
||||
<el-progress
|
||||
width="100"
|
||||
type="circle"
|
||||
:percentage="calculate_percentage(scope.row.result_good, scope.row.result_bad, scope.row.result_null)"
|
||||
></el-progress>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验" align="center" width="140">
|
||||
@@ -80,6 +84,9 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain @click="batchUnqualified">批量不合格</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" round @click="allQualified">一键全部合格</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="10" :offset="6">
|
||||
本页合格率
|
||||
@@ -132,6 +139,7 @@ import {
|
||||
listWmFgentryInspect_firstLevel,
|
||||
listWmFgentryInspect_secondLevel,
|
||||
setTheBoxToBeQualified,
|
||||
setAllQualified,
|
||||
setTheBoxToBeUnQualified,
|
||||
addWmFgentryInspect,
|
||||
delWmFgentryInspect,
|
||||
@@ -251,18 +259,16 @@ export default {
|
||||
// 列表数据查询
|
||||
this.getList_first()
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
calculate_percentage(result_good, result_bad,result_null) {
|
||||
calculate_percentage(result_good, result_bad, result_null) {
|
||||
if (result_good + result_bad == 0) {
|
||||
return 0
|
||||
}
|
||||
console.log("result_good",result_good)
|
||||
console.log("result_bad",result_bad)
|
||||
console.log("result_null",result_null)
|
||||
return Math.floor((result_good / (result_good + result_bad+result_null)) * 100)
|
||||
console.log('result_good', result_good)
|
||||
console.log('result_bad', result_bad)
|
||||
console.log('result_null', result_null)
|
||||
return Math.floor((result_good / (result_good + result_bad + result_null)) * 100)
|
||||
},
|
||||
//todo 一级菜单调 二级
|
||||
handle_secondLevel(workorder) {
|
||||
@@ -331,6 +337,15 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
//todo 一键全部合格
|
||||
allQualified() {
|
||||
const query = { workorder_selected: this.workorder_selected }
|
||||
setAllQualified(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getList_second(this.workorder_selected)
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 批量不合格
|
||||
batchUnqualified() {
|
||||
if (this.packcode_select.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user