|
|
@ -88,6 +88,7 @@ import { InventorymoveRequestMain,InventorymoveRequestMainRules,InventorymoveReq |
|
|
|
import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain' |
|
|
|
import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
|
|
|
|
// 库存转移申请 |
|
|
|
defineOptions({ name: 'InventorymoveRequestMain' }) |
|
|
@ -336,7 +337,32 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
|
|
|
|
// 物料隔离-获取到库位默认值 |
|
|
|
const getDefaultToLocationCode = async ()=>{ |
|
|
|
let searchCondition = [] |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if(item.field == "toLocationCode"){ |
|
|
|
searchCondition = item.tableForm.searchCondition |
|
|
|
} |
|
|
|
}) |
|
|
|
let params = {} |
|
|
|
searchCondition.forEach(item=>{ |
|
|
|
if(item['isMainValue']){ |
|
|
|
params[item['key']] = formRef.value.formRef.formModel[item['value']] |
|
|
|
}else{ |
|
|
|
params[item['key']] = item['value'] |
|
|
|
} |
|
|
|
}) |
|
|
|
let res = await LocationApi.selectBusinessTypeToLocation(params) |
|
|
|
console.log('res',res) |
|
|
|
if(res&&res.list.length>0){ |
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
if(!item['toLocationCode']){ |
|
|
|
item['toLocationCode'] = res.list[0]['code'] |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
@ -371,6 +397,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
if(routeName.value == 'OktoholdRequestMain'){ |
|
|
|
getDefaultToLocationCode() |
|
|
|
} |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|