问题修改

master
zhangdi 3 days ago
parent 8309a2e0c6
commit 2a094ec06c
  1. 16
      src/views/firstOrder/components/batchSelectionDialog.vue
  2. 4
      src/views/firstOrder/outbound.vue

@ -92,8 +92,24 @@ export default {
// //
handleSelectionChange(selection, parentRow) { handleSelectionChange(selection, parentRow) {
console.log('666666', selection, parentRow) console.log('666666', selection, parentRow)
const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity;
if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){ if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){
this.$message.error('勾选数量不能大于申请数量') this.$message.error('勾选数量不能大于申请数量')
const validSelection = selection.slice(0, maxAllowed);
const removedItems = selection.slice(maxAllowed);
const selectionWithParent = validSelection.map(item => ({
...item,
parentMaterialId: parentRow.materialId,
parentDepartmentName: parentRow.departmentName,
applicationQuantity: parentRow.applicationQuantity,
ldDemandEndId: parentRow.ldDemandEndId,
outboundQuantity: parentRow.outboundQuantity,
}));
this.selectedRows = this.selectedRows.filter(
item => item.parentMaterialId !== parentRow.materialId
);
this.selectedRows.push(...selectionWithParent);
return return
} }

@ -41,7 +41,7 @@
> >
<el-button <el-button
type="text" type="text"
v-if="scope.row.status == 1" v-if="scope.row.status == 1||scope.row.status == 2"
@click.stop="handleEdit(scope.row)" @click.stop="handleEdit(scope.row)"
>编辑</el-button >编辑</el-button
> >
@ -223,7 +223,7 @@ export default {
value: 1, value: 1,
}, },
{ {
label: "待审批", label: "待二级库入库",
value: 2, value: 2,
}, },
{ {

Loading…
Cancel
Save