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