退料接收-增加完好数量,损坏数量
This commit is contained in:
parent
e80328a159
commit
8290c16742
|
|
@ -220,7 +220,29 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观判定" align="center" prop="apDetection" min-width="120">
|
||||
<el-table-column label="完好数量" align="center" prop="goodNum" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.goodNum"
|
||||
placeholder="退料数量"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@input="changeNum(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="损坏数量" align="center" prop="badNum" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.badNum"
|
||||
placeholder="退料数量"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@input="changeNum(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="外观判定11" align="center" prop="apDetection" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.apDetection"
|
||||
|
|
@ -231,7 +253,7 @@
|
|||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="备注" align="center" prop="remark" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
|
|
@ -305,7 +327,7 @@
|
|||
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观判定" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
||||
<el-table-column label="外观判定11" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.apDetection"
|
||||
|
|
@ -571,6 +593,25 @@ export default {
|
|||
...mapState(['user'])
|
||||
},
|
||||
methods: {
|
||||
changeNum(row) {
|
||||
console.log('🚀 ~ changeNum ~ row:', row)
|
||||
// 将badNum 和 goodNum 向上取整
|
||||
// 只能输入正整数 过滤掉除正整数外的东西
|
||||
if (row.badNum) {
|
||||
row.badNum = Math.ceil(String(row.badNum).replace(/[^\d]/g, ''))
|
||||
}
|
||||
if (row.goodNum) {
|
||||
row.goodNum = Math.ceil(String(row.goodNum).replace(/[^\d]/g, ''))
|
||||
}
|
||||
// 不能大于preNum
|
||||
if (row.badNum + row.goodNum > row.preNum) {
|
||||
console.log('🚀 ~ changeNum ~ row.badNum + row.goodNum > row.preNum:', row.badNum + row.goodNum > row.preNum)
|
||||
this.$message.error('完好数量和损坏数量之和不能大于退料数量')
|
||||
row.badNum = 0
|
||||
row.goodNum = 0
|
||||
}
|
||||
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<div style="color: rgb(2, 167, 240);" @click="openAddCode(scope.row)" v-if="scope.row.manageType==0">查看编码</div>
|
||||
<el-input
|
||||
<!-- <el-input
|
||||
v-if="scope.row.manageType==1"
|
||||
v-model.number="scope.row.preNum"
|
||||
placeholder="退料数量"
|
||||
|
|
@ -183,11 +183,26 @@
|
|||
clearable :readonly="isView"
|
||||
@input="checkNum(scope.row)"
|
||||
style="width: 100%"
|
||||
/>
|
||||
/> -->
|
||||
<div>{{ scope.row.preNum }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="外观判定"
|
||||
label="完好数量"
|
||||
align="center"
|
||||
prop="goodNum"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="损坏数量"
|
||||
align="center"
|
||||
prop="badNum"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="外观判定22"
|
||||
align="center"
|
||||
prop="apDetection"
|
||||
min-width="120"
|
||||
|
|
@ -201,7 +216,7 @@
|
|||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column
|
||||
label="备注"
|
||||
|
|
@ -209,14 +224,14 @@
|
|||
prop="remark"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- <template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.remark"
|
||||
placeholder="备注" :readonly="isView"
|
||||
clearable maxlength="100"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="附件"
|
||||
|
|
@ -282,7 +297,7 @@
|
|||
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观判定" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
||||
<el-table-column label="外观判定222" prop="apDetection" align="center" width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.apDetection"
|
||||
|
|
|
|||
Loading…
Reference in New Issue