diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 226f1bc9c..f992bc009 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -77,6 +77,7 @@ :apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + @detailOpenForm="detailOpenForm" :detailValidate="detailValidate" /> @@ -128,6 +129,7 @@ const updataTableColumns = (val) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { if (type == 'tableForm') { + console.log("EEEEEEE",val[0]) // 明细查询页赋值 row[formField] = val[0][searchField] row['supplierCode'] = val[0]['supplierCode'] @@ -166,6 +168,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => row['singlePrice'] = val[0]['singlePrice'] row['amount'] = val[0]['amount'] row['projectCode'] = val[0]['projectCode'] + + if(formField == 'itemCode'){ + row['batch'] = val[0]['toBatch'] + row['packingNumber'] = val[0]['toPackingNumber'] + row['containerNumber'] = val[0]['toContainerNumber'] + row['containerNumber'] = val[0]['containerNumber'] + row['containerNumber'] = val[0]['containerNumber'] + row['fromLocationCode'] = val[0]['fromLocationCode'] + row['toLocationCode'] = val[0]['toLocationCode'] + } } else { const setV = {} if(formField == 'purchaseReceiptRecordNumber'){ @@ -431,7 +443,9 @@ const openForm = async (type: string, row?: number) => { /** 详情操作 */ const detailRef = ref() +const purchaseReceiptRecordNumberRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { + purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber; detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain') } @@ -653,6 +667,33 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const detailOpenForm = (type, row) =>{ + console.log("type",type); + console.log("row",row); + console.log("AAAAAA",purchaseReceiptRecordNumberRef.value); + PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => { + if(purchaseReceiptRecordNumberRef.value == ''){ + if (item.field == 'itemCode') { + item.form.componentProps.disabled = true + item.form.componentProps.isSearchList = true + } + if(item.field == 'poLine'){ + item.form.componentProps.disabled = true + item.form.componentProps.isSearchList = false + } + }else{ + if (item.field == 'itemCode') { + item.form.componentProps.disabled = true + item.form.componentProps.isSearchList = false + } + if(item.field == 'poLine'){ + item.form.componentProps.disabled = true + item.form.componentProps.isSearchList = true + } + } + }) +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index 8aad77a84..0800c46e2 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -553,6 +553,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive form: { // labelMessage: '信息提示说明!!!', componentProps: { + disabled:true, isSearchList: true, searchListPlaceholder: '请选择订单行', searchField: 'poLine',