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>
<!-- 表单弹窗添加/修改 -->
<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)
}

Loading…
Cancel
Save