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.selectedItems=[]
this.getItemList() this.getItemList()
}, },
// methods
selectable(row) { 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) { onSelectionChange(selection) {
this.selectedItems = selection this.selectedItems = selection

View File

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

View File

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