|
|
@ -30,9 +30,13 @@ |
|
|
|
<BasicForm ref="formRef" @success="getList" :rules="PurchasePlanMainRules" |
|
|
|
:formAllSchemas="PurchasePlanMain.allSchemas" :tableAllSchemas="PurchasePlanDetail.allSchemas" |
|
|
|
:tableFormRules="PurchasePlanDetailRules" :tableData="tableData" |
|
|
|
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain" :apiCreate="PurchasePlanMainApi.createPurchasePlanMain" |
|
|
|
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> |
|
|
|
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain" |
|
|
|
:apiCreate="PurchasePlanMainApi.createPurchasePlanMain" |
|
|
|
:isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<!-- 隐藏子表编辑和删除是因为要货计划以后是接口发过来的,而且我们的计划数量是放入到采购订单已计划数量里,无法再次编辑数量--> |
|
|
@ -440,6 +444,10 @@ |
|
|
|
if (data.subList.length == tableData.value.length) { |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
if(data.subList.length == 0){ |
|
|
|
message.error('子列表数量不能空') |
|
|
|
return |
|
|
|
} |
|
|
|
await PurchasePlanMainApi.createPurchasePlanMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|