如果仓库只有1个,直接给单据进行默认选中
This commit is contained in:
parent
0a07c88b19
commit
5f83ac5bc0
@ -329,9 +329,13 @@ export const BillModalMixin = {
|
||||
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
||||
if (res.code === 200) {
|
||||
let arr = res.data
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if(arr[i].isDefault){
|
||||
target.setValues([{rowKey: row.id, values: {depotId: arr[i].id+''}}])
|
||||
if(arr.length===1) {
|
||||
target.setValues([{rowKey: row.id, values: {depotId: arr[0].id+''}}])
|
||||
} else {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if(arr[i].isDefault){
|
||||
target.setValues([{rowKey: row.id, values: {depotId: arr[i].id+''}}])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user