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