|
|
@@ -36,7 +36,18 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
-
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-link
|
|
|
+ slot="reference"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ v-if="row.disposalStatus != 2"
|
|
|
+ @click="disposeFn(2, row)"
|
|
|
+ >
|
|
|
+ 处置
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
<template v-slot:badTypeName="{ row, $index }">
|
|
|
<el-select
|
|
|
v-model="row.badTypeId"
|
|
|
@@ -734,6 +745,16 @@
|
|
|
return this.allList.find((item) => item.value == cellValue)
|
|
|
?.label;
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ fixed: 'right',
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
];
|
|
|
return arr;
|
|
|
@@ -935,6 +956,7 @@
|
|
|
},
|
|
|
// // 处置
|
|
|
disposeFn(type, row) {
|
|
|
+ this.current = {};
|
|
|
if (type == 1) {
|
|
|
this.all = true;
|
|
|
} else {
|
|
|
@@ -942,7 +964,6 @@
|
|
|
}
|
|
|
this.formData = { ...row };
|
|
|
this.dialogVisible = true;
|
|
|
- // let ids = this.current ? [this.current.id] : this.selection.map((item) => item.id);
|
|
|
},
|
|
|
|
|
|
async getQueryQualityInventory() {
|
|
|
@@ -1023,7 +1044,10 @@
|
|
|
|
|
|
async handleDispose() {
|
|
|
this.$refs['disposeForm'].validate(async (valid) => {
|
|
|
- let ids = this.selection.map((item) => item.id);
|
|
|
+ // let ids = this.selection.map((item) => item.id);
|
|
|
+ let ids = this.current?.id
|
|
|
+ ? [this.current.id]
|
|
|
+ : this.selection.map((item) => item.id);
|
|
|
this.poList.forEach((item, index) => {
|
|
|
if (ids.includes(item.id)) {
|
|
|
this.$set(this.poList[index], 'disposalStatus', 1);
|