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