Browse Source

选择收货单明细

hella_online_20240815
wangyufei 3 months ago
parent
commit
d33fa56e7c
  1. 125
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

125
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -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) => {

Loading…
Cancel
Save