From 71823baebd86100064e6b1d201adcf00c69fb619 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 29 Jan 2024 14:59:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=8E=E7=BB=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=80=89=E6=8B=A9=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereturnRequestMain/index.vue | 41 +++++++++++++++++++ .../purchasereturnRequestMain.data.ts | 1 + 2 files changed, 42 insertions(+) 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',