|
|
@ -39,7 +39,8 @@ |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
@submitForm="submitForm" |
|
|
|
@onChange="onChangeQty" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" |
|
|
@ -247,6 +248,20 @@ |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row : any, titleName : any, titleValue : any) => { |
|
|
|
console.log("row",row.type); |
|
|
|
if(row.type == 'DISCRETE'){ |
|
|
|
PurchaseDetail.allSchemas.formSchema.map((item) => { |
|
|
|
if (item.field == 'orderQty') { |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
PurchaseDetail.allSchemas.formSchema.map((item) => { |
|
|
|
if (item.field == 'orderQty') { |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue,'orderPurchaseMain') |
|
|
|
} |
|
|
|
|
|
|
@ -393,6 +408,23 @@ |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
const onChangeQty = (field, cur) => { |
|
|
|
if(field == 'type' && cur == 'DISCRETE'){ |
|
|
|
PurchaseDetail.allSchemas.tableFormColumns.map((item) => { |
|
|
|
if (item.field == 'orderQty') { |
|
|
|
item.tableForm.disabled = false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if(field == 'type' && cur == 'SCHEDULE'){ |
|
|
|
PurchaseDetail.allSchemas.tableFormColumns.map((item) => { |
|
|
|
if (item.field == 'orderQty') { |
|
|
|
item.tableForm.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|