Browse Source

点编辑按钮,供应商代码可以换成其他,保存能成功问题修复

master
zhaoxuebing 10 months ago
parent
commit
bb88c60b68
  1. 48
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

48
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -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)
} }

Loading…
Cancel
Save