|
|
@ -26,17 +26,32 @@ |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm ref="formRef" @success="getList" :rules="PurchaseMainRules" :formAllSchemas="PurchaseMain.allSchemas" |
|
|
|
:tableAllSchemas="PurchaseDetail.allSchemas" :tableFormRules="PurchaseDetailRules" :tableData="tableData" |
|
|
|
:apiUpdate="PurchaseMainApi.updatePurchaseMain" :apiCreate="PurchaseMainApi.createPurchaseMain" :isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
|
<BasicForm ref="formRef" |
|
|
|
@success="getList" |
|
|
|
:rules="PurchaseMainRules" |
|
|
|
:formAllSchemas="PurchaseMain.allSchemas" |
|
|
|
:tableAllSchemas="PurchaseDetail.allSchemas" |
|
|
|
:tableFormRules="PurchaseDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
:apiUpdate="PurchaseMainApi.updatePurchaseMain" |
|
|
|
:apiCreate="PurchaseMainApi.createPurchaseMain" |
|
|
|
:isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchaseMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchaseDetail.allSchemas" :detailAllSchemasRules="PurchaseDetailRules" |
|
|
|
:apiCreate="PurchaseDetailApi.createPurchaseDetail" :apiUpdate="PurchaseDetailApi.updatePurchaseDetail" |
|
|
|
:apiPage="PurchaseDetailApi.getPurchaseDetailPage" :apiDelete="PurchaseDetailApi.deletePurchaseDetail" :Echo="Echo" |
|
|
|
<Detail ref="detailRef" |
|
|
|
:isBasic="false" |
|
|
|
:allSchemas="PurchaseMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchaseDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="PurchaseDetailRules" |
|
|
|
:apiCreate="PurchaseDetailApi.createPurchaseDetail" |
|
|
|
:apiUpdate="PurchaseDetailApi.updatePurchaseDetail" |
|
|
|
:apiPage="PurchaseDetailApi.getPurchaseDetailPage" |
|
|
|
:apiDelete="PurchaseDetailApi.deletePurchaseDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -208,7 +223,24 @@ |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm = async (type : string, row ?: number) => { |
|
|
|
console.log("【purchaseMain】type类型:",type); |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
if(type == 'create'){ |
|
|
|
PurchaseMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'supplierCode') { |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if(type == 'update'){ |
|
|
|
PurchaseMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'supplierCode') { |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|