This commit is contained in:
itcast 2025-12-23 17:43:07 +08:00
parent dc4071eea6
commit df25270f48
3 changed files with 13 additions and 4 deletions

View File

@ -297,8 +297,16 @@ export default {
this.selectedItems=[]
this.getItemList()
},
// methods
selectable(row) {
return !this.existingItems.some(item => item.id === row.id)
// 10
if (row.inStockNum <= 0) return false;
// 2id/devCode
const isExisted = this.existingItems.some(item => {
// devCode + devType
return item.id === row.id || item.devCode === row.devCode;
});
return !isExisted;
},
onSelectionChange(selection) {
this.selectedItems = selection

View File

@ -88,7 +88,8 @@
</el-card>
</el-row>
<ApproveDialog ref="approveDialog" />
<ApproveDialog ref="approveDialog"
:existing-items="tableData" />
</div>
</template>

View File

@ -31,7 +31,7 @@
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 200px"
style="width: 220px"
/>
</el-form-item>
</el-col>
@ -45,7 +45,7 @@
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 200px"
style="width: 220px"
/>
</el-form-item>
</el-col>