|
@ -82,7 +82,7 @@ |
|
|
:tableAllSchemas="PurchasereturnRequestDetailNew.allSchemas" |
|
|
:tableAllSchemas="PurchasereturnRequestDetailNew.allSchemas" |
|
|
:tableFormRules="PurchasereturnRequestDetailRulesNew" |
|
|
:tableFormRules="PurchasereturnRequestDetailRulesNew" |
|
|
:tableData="tableData" |
|
|
:tableData="tableData" |
|
|
:apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain" |
|
|
:apiUpdate="PurchasereturnRequestMainApi.updateReturnSpareNew" |
|
|
:apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain" |
|
|
:apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain" |
|
|
:isBusiness="true" |
|
|
:isBusiness="true" |
|
|
:isShowButton="false" |
|
|
:isShowButton="false" |
|
@ -200,7 +200,6 @@ const tableColumns = ref([ |
|
|
...PurchasereturnRequestDetail.allSchemas.tableMainColumns |
|
|
...PurchasereturnRequestDetail.allSchemas.tableMainColumns |
|
|
]) |
|
|
]) |
|
|
|
|
|
|
|
|
const isShowButton = ref(true) |
|
|
|
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
@ -628,32 +627,35 @@ const formRef = ref() |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
originTableData.value = [] // 重置明细数据 |
|
|
originTableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
isShowButton.value = true |
|
|
|
|
|
if (type == 'create') { |
|
|
|
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
|
|
if (item.field == 'supplierCode') { |
|
|
|
|
|
item.componentProps.disabled = true |
|
|
|
|
|
item.componentProps.isSearchList = true |
|
|
|
|
|
} |
|
|
|
|
|
if (item.field == 'purchaseReceiptRecordNumber') { |
|
|
|
|
|
item.componentProps.disabled = true |
|
|
|
|
|
item.componentProps.isSearchList = true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (type == 'update') { |
|
|
if (type == 'update') { |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
let updateData = await PurchasereturnRequestDetailApi.editReturnSpareNew({ |
|
|
|
|
|
masterId:row.masterId |
|
|
|
|
|
}) |
|
|
|
|
|
if(updateData&&updateData['receiptNumber']){ |
|
|
|
|
|
updateData['hahaha'] = updateData['receiptNumber'] |
|
|
|
|
|
}else{ |
|
|
|
|
|
updateData['hehehe'] = updateData['poNumber'] |
|
|
|
|
|
} |
|
|
|
|
|
updateData['masterId'] = row['masterId'] |
|
|
|
|
|
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'supplierCode') { |
|
|
if (item.field == 'supplierCode') { |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.isSearchList = false |
|
|
item.componentProps.isSearchList = false |
|
|
} |
|
|
} |
|
|
if (item.field == 'purchaseReceiptRecordNumber') { |
|
|
}) |
|
|
item.componentProps.disabled = true |
|
|
console.log('updateData',updateData) |
|
|
item.componentProps.isSearchList = false |
|
|
console.log('row',row) |
|
|
|
|
|
tableData.value = updateData.subList||[] |
|
|
|
|
|
formRef.value.open(type, updateData) |
|
|
|
|
|
}else{ |
|
|
|
|
|
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach((item) => { |
|
|
|
|
|
if (item.field == 'supplierCode') { |
|
|
|
|
|
item.componentProps.disabled = false |
|
|
|
|
|
item.componentProps.isSearchList = true |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
formRef.value.open(type,null) |
|
|
} |
|
|
} |
|
|
formRef.value.open(type, row) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
@ -797,7 +799,6 @@ const handleDeleteTable = (item, index, formRef) => { |
|
|
tableData.value.splice(itemIndex, 1) |
|
|
tableData.value.splice(itemIndex, 1) |
|
|
} |
|
|
} |
|
|
if (tableData.value.length == 0) { |
|
|
if (tableData.value.length == 0) { |
|
|
isShowButton.value = true |
|
|
|
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'supplierCode') { |
|
|
if (item.field == 'supplierCode') { |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.disabled = false |
|
@ -808,7 +809,6 @@ const handleDeleteTable = (item, index, formRef) => { |
|
|
const tableSelectionDelete = (selection) => { |
|
|
const tableSelectionDelete = (selection) => { |
|
|
tableData.value = tableData.value.filter((item) => !selection.includes(item)) |
|
|
tableData.value = tableData.value.filter((item) => !selection.includes(item)) |
|
|
if (tableData.value.length == 0) { |
|
|
if (tableData.value.length == 0) { |
|
|
isShowButton.value = true |
|
|
|
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'supplierCode') { |
|
|
if (item.field == 'supplierCode') { |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.disabled = false |
|
@ -863,7 +863,7 @@ const submitForm = async (formType, submitData) => { |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
|
} else { |
|
|
} else { |
|
|
data.returnSourceType='2' |
|
|
data.returnSourceType='2' |
|
|
await PurchasereturnRequestMainApi.updatePurchasereturnRequestMain(data) |
|
|
await PurchasereturnRequestMainApi.updateReturnSpareNew(data) |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
} |
|
|
} |
|
|
formRef.value.dialogVisible = false |
|
|
formRef.value.dialogVisible = false |
|
|