|
|
@ -57,6 +57,7 @@ |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@formFormDateChange="formFormDateChange" |
|
|
|
@onEnter="onEnter" |
|
|
|
/> |
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
@ -204,7 +205,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
const newRow = val[0] |
|
|
|
newRow['poNumber'] = val[0]['number'] |
|
|
|
// 请求明细数据 |
|
|
|
getSearchTableData(val[0]['number'],val[0]['supplierCode']) |
|
|
|
getSearchTableData(val[0]['number']) |
|
|
|
// tableData.value = [newRow] |
|
|
|
// formRef.handleAddTable() |
|
|
|
} |
|
|
@ -372,7 +373,7 @@ const labelPrint = async (row) => { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const getSearchTableData = async (number,supplierCode)=>{ |
|
|
|
const getSearchTableData = async (number,isEnter=false)=>{ |
|
|
|
const {tableObject ,tableMethods} = useTable({ |
|
|
|
defaultParams:{number}, |
|
|
|
getListApi: PurchaseDetailApi.getPurchaseDetailPage // 分页接口 |
|
|
@ -391,14 +392,16 @@ const getSearchTableData = async (number,supplierCode)=>{ |
|
|
|
newRow['itemCode'] = row['itemCode'] |
|
|
|
newRow['uom'] = row['uom'] |
|
|
|
newRow['poNumber'] =row['number'] |
|
|
|
let queryData = { |
|
|
|
supplierCode, |
|
|
|
itemCode:row['itemCode'] |
|
|
|
} |
|
|
|
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{ |
|
|
|
newRow['defaultToLocationCode'] = res |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
|
tableData.value.push(newRow) |
|
|
|
if(isEnter){ |
|
|
|
//回车--供应商代码 |
|
|
|
const setV = {} |
|
|
|
setV['poNumber'] = number |
|
|
|
setV['supplierCode'] = row.supplierCode |
|
|
|
formRef.value.formRef.setValues(setV) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
/** 添加/修改操作 */ |
|
|
@ -566,7 +569,10 @@ const handleAddTable = () => { |
|
|
|
const handleDeleteTable = (item, index) => { |
|
|
|
tableData.value.splice(index, 1) |
|
|
|
} |
|
|
|
|
|
|
|
const onEnter = async (field,value)=>{ |
|
|
|
console.log(field,value) |
|
|
|
getSearchTableData(value,true) |
|
|
|
} |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|