From d5b3f9f82a59a49a2d44baf9e6da6331228fc7c9 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 15 Nov 2024 16:46:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E8=AF=A2=E8=AF=81=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Search/src/Search.vue | 11 +++++++- .../supplierApbalanceMain/index.vue | 27 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/components/Search/src/Search.vue b/src/components/Search/src/Search.vue index 81f58b97d..1fbda34ed 100644 --- a/src/components/Search/src/Search.vue +++ b/src/components/Search/src/Search.vue @@ -273,6 +273,14 @@ const reset = async () => { emit('reset', model) } +const getSearchFormData = async () => { + await unref(elFormRef)?.validate() + const { getFormData } = methods + const model = await getFormData() + console.log(model) + return model +} + const bottonButtonStyle = computed(() => { return { textAlign: props.buttomPosition as unknown as 'left' | 'center' | 'right' @@ -293,7 +301,7 @@ const onBlur = async (field, e) => { } const Search = ref() onMounted(() => {}) -defineExpose({setFormValues,search}) // 提供 open 方法,用于打开弹窗 +defineExpose({setFormValues,search,getSearchFormData}) // 提供 open 方法,用于打开弹窗 @@ -319,6 +327,7 @@ defineExpose({setFormValues,search}) // 提供 open 方法,用于打开弹窗 > + @@ -347,7 +354,27 @@ const getMonthDay = async ()=>{ console.log('monthList',monthList.value) } } +// 询证回调 +const confirmationHandle = async ()=>{ + let searchData = await searchRef.value.getSearchFormData() + if((year.value||month.value||day.value)&&(!year.value||!month.value||!day.value)){ + message.error('请选择年月日') + return + } + if(month.value.length==1){ + month.value = '0'+month.value + } + if((''+day.value).length==1){ + day.value = '0' + day.value + } + if(year.value&&month.value&&day.value){ + // 年-月-日 `${year.value}-${month.value}-${day.value}` + } + //供应商代码 searchData.ttSupplier + + +} const searchRef = ref() // 日期 const dayList = ref([])