diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index 221d8b2cb..4dbdb7846 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -39,7 +39,8 @@ @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" - @submitForm="submitForm" /> + @submitForm="submitForm" + @onChange="onChangeQty" /> { + 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 () => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 8114d84c9..3451a5e4e 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -459,11 +459,13 @@ export const PurchaseDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { + disabled:false, min: 1, precision: 6 } }, tableForm: { + disabled:false, type: 'InputNumber', min: 1, precision: 6