|
|
@ -83,7 +83,6 @@ |
|
|
|
:detailAllSchemas="PurchasePlanDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="PurchasePlanDetailRules" |
|
|
|
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail" |
|
|
|
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail" |
|
|
|
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage" |
|
|
|
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@ -98,6 +97,8 @@ |
|
|
|
:isOpenSearchTable="true" |
|
|
|
:mainSubmitCreateApi="true" |
|
|
|
fieldTableColumn="poLine" |
|
|
|
@detailOpenForm="detailOpenForm" |
|
|
|
@handleSubmitForm="handleSubmitForm" |
|
|
|
|
|
|
|
/> |
|
|
|
<!-- 导入 --> |
|
|
@ -517,7 +518,26 @@ const getSearchTableData = async (number,formField,searchField)=>{ |
|
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
|
} |
|
|
|
|
|
|
|
const detailOpenForm = (type, row) => { |
|
|
|
|
|
|
|
PurchasePlanDetail.allSchemas.formSchema.forEach(item=>{ |
|
|
|
if(item.field == 'planQty'){ |
|
|
|
//计划数量 |
|
|
|
item.componentProps.disabled = row.available=="FALSE" |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const handleSubmitForm = async (formType, data)=>{ |
|
|
|
if(formType == 'update'){ |
|
|
|
if(Number(data.planQty)<=0){ |
|
|
|
message.error(t('ts.计划数量必须大于0')) |
|
|
|
return |
|
|
|
} |
|
|
|
await PurchasePlanDetailApi.updatePurchasePlanDetail(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
/** 删除按钮操作 */ |
|
|
|
const handleDelete = async (id : number) => { |
|
|
|
try { |
|
|
|