|
@ -577,116 +577,18 @@ const originTableData = ref([]) |
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
// 添加明细 |
|
|
// 添加明细 |
|
|
const handleAddTable = () => { |
|
|
const handleAddTable = () => { |
|
|
const subTableDFata = originTableData.value.filter( |
|
|
|
|
|
(item) => !tableData.value.find((item1) => item1.id == item.id) |
|
|
|
|
|
) |
|
|
|
|
|
if (subTableDFata.length == 0) { |
|
|
|
|
|
message.warning('暂无可选择数据!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tableObject = { |
|
|
|
|
|
// 当前页 |
|
|
|
|
|
currentPage: 1, |
|
|
|
|
|
// 导出加载中 |
|
|
|
|
|
exportLoading: false, |
|
|
|
|
|
// 加载中 |
|
|
|
|
|
loading: false, |
|
|
|
|
|
// 页数 |
|
|
|
|
|
pageSize: subTableDFata.length, |
|
|
|
|
|
params: null, |
|
|
|
|
|
// 排序 |
|
|
|
|
|
sort: { |
|
|
|
|
|
order: '', // 排序规则 |
|
|
|
|
|
prop: '' // 排序字段 |
|
|
|
|
|
}, |
|
|
|
|
|
// 总条数 |
|
|
|
|
|
total: subTableDFata.length, |
|
|
|
|
|
// 表格数据 |
|
|
|
|
|
tableList: subTableDFata, |
|
|
|
|
|
currentRow: null |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns |
|
|
|
|
|
tableColumns.forEach((item) => { |
|
|
|
|
|
item.width = item.table?.width || 150 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
searchTableRef.value.openData('采购收货记录单号', tableObject, { tableColumns }, true) |
|
|
|
|
|
// searchTableRef.value.open( |
|
|
|
|
|
// ('供应商信息', |
|
|
|
|
|
// // _searchTableAllSchemas, |
|
|
|
|
|
// // _searchTablePage, // 接口 |
|
|
|
|
|
// // formField, |
|
|
|
|
|
// // searchField, |
|
|
|
|
|
// true,//是否多选 |
|
|
|
|
|
// // type, |
|
|
|
|
|
// // row, |
|
|
|
|
|
// _searchCondition |
|
|
|
|
|
// ) |
|
|
|
|
|
// ) |
|
|
|
|
|
|
|
|
|
|
|
// console.log(subTableDFata) |
|
|
|
|
|
// const {tableObject, tableMethods } = useTable({ |
|
|
|
|
|
// getListApi: getPage.value // 分页接口 |
|
|
|
|
|
// }) |
|
|
|
|
|
// searchTableRef.value.open( |
|
|
|
|
|
// ('供应商信息', |
|
|
|
|
|
// // _searchTableAllSchemas, |
|
|
|
|
|
// // _searchTablePage, // 接口 |
|
|
|
|
|
// // formField, |
|
|
|
|
|
// // searchField, |
|
|
|
|
|
// true,//是否多选 |
|
|
|
|
|
// // type, |
|
|
|
|
|
// // row, |
|
|
|
|
|
// _searchCondition |
|
|
|
|
|
// ) |
|
|
|
|
|
// ) |
|
|
|
|
|
// tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
|
|
|
|
|
// let purchaseReceiptRecordNumber = formRef.value.formRef.formModel.purchaseReceiptRecordNumber |
|
|
|
|
|
// PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => { |
|
|
|
|
|
// item.tableForm.disabled = true |
|
|
|
|
|
// if (item.field == 'remark') { |
|
|
|
|
|
// item.tableForm.disabled = false |
|
|
|
|
|
// } |
|
|
|
|
|
// if (item.field == 'reason') { |
|
|
|
|
|
// item.tableForm.disabled = false |
|
|
|
|
|
// } |
|
|
|
|
|
// if (item.field == 'qty') { |
|
|
|
|
|
// item.tableForm.disabled = false |
|
|
|
|
|
// } |
|
|
|
|
|
// if(purchaseReceiptRecordNumber == ''){ |
|
|
|
|
|
// if (item.field == 'itemCode') { |
|
|
|
|
|
// item.tableForm.isInpuFocusShow = true |
|
|
|
|
|
// } |
|
|
|
|
|
// if(item.field == 'poLine'){ |
|
|
|
|
|
// item.tableForm.isInpuFocusShow = false |
|
|
|
|
|
// } |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// if (item.field == 'itemCode') { |
|
|
|
|
|
// item.tableForm.isInpuFocusShow = false |
|
|
|
|
|
// } |
|
|
|
|
|
// if(item.field == 'poLine'){ |
|
|
|
|
|
// item.tableForm.isInpuFocusShow = true |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
} |
|
|
} |
|
|
// 选择收货单明细 |
|
|
// 选择收货单明细 |
|
|
const chooseReceiptList = ()=>{ |
|
|
const chooseReceiptList = ()=>{ |
|
|
// searchTableRef.value.open( |
|
|
if(!formRef.value.formRef.formModel.itemCode){ |
|
|
// ('供应商信息', |
|
|
message.error('请选择物料代码') |
|
|
// // _searchTableAllSchemas, |
|
|
return |
|
|
// // _searchTablePage, // 接口 |
|
|
} |
|
|
// // formField, |
|
|
if(!formRef.value.formRef.formModel.supplierName){ |
|
|
// // searchField, |
|
|
message.error('请选择供应商') |
|
|
// true,//是否多选 |
|
|
return |
|
|
// // type, |
|
|
} |
|
|
// // row, |
|
|
|
|
|
// _searchCondition |
|
|
|
|
|
// ) |
|
|
|
|
|
// ) |
|
|
|
|
|
|
|
|
|
|
|
searchTableRef.value.open( |
|
|
searchTableRef.value.open( |
|
|
"收货单明细", |
|
|
"收货单明细", |
|
|
Itembasic.allSchemas, |
|
|
Itembasic.allSchemas, |
|
@ -709,9 +611,12 @@ const chooseReceiptList = ()=>{ |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => { |
|
|
// 选择收货单明细 |
|
|
console.log(val) |
|
|
const searchTableSuccess1 = (formField, searchField, selections, type, row) => { |
|
|
tableData.value = [...tableData.value, ...val] |
|
|
console.log('searchTableSuccess1',formField, searchField, selections, type, row) |
|
|
|
|
|
formRef.value.formRef.setValues({ |
|
|
|
|
|
poNumber:111 |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
// 删除明细 |
|
|
// 删除明细 |
|
|
const handleDeleteTable = (item, index, formRef) => { |
|
|
const handleDeleteTable = (item, index, formRef) => { |
|
|