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