diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 580c71a..79a4ae8 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -891,7 +891,13 @@ const getlist = async () => { markets.value = searchData.value.markets[searchData.value.markets.length - 1] console.log('地区转换', markets.value) } - + if (searchData.value.jwcode) { + const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); + if (!isPositiveInteger) { + ElMessage.error('请输入正确的精网号') + return; + } + } const result = await request({ url: '/cashCollection/selectCollection', data: { diff --git a/src/views/moneyManage/receiveDetail/receiveHead.vue b/src/views/moneyManage/receiveDetail/receiveHead.vue index d010e96..0b805a0 100644 --- a/src/views/moneyManage/receiveDetail/receiveHead.vue +++ b/src/views/moneyManage/receiveDetail/receiveHead.vue @@ -772,6 +772,13 @@ const getlist = async () => { markets.value = searchData.value.markets[searchData.value.markets.length - 1] console.log('地区转换', markets.value) } + if (searchData.value.jwcode) { + const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); + if (!isPositiveInteger) { + ElMessage.error('请输入正确的精网号') + return; + } + } const result = await request({ url: '/cashCollection/selectCollection', diff --git a/src/views/moneyManage/receiveDetail/receiveManage.vue b/src/views/moneyManage/receiveDetail/receiveManage.vue index 580c71a..79a4ae8 100644 --- a/src/views/moneyManage/receiveDetail/receiveManage.vue +++ b/src/views/moneyManage/receiveDetail/receiveManage.vue @@ -891,7 +891,13 @@ const getlist = async () => { markets.value = searchData.value.markets[searchData.value.markets.length - 1] console.log('地区转换', markets.value) } - + if (searchData.value.jwcode) { + const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); + if (!isPositiveInteger) { + ElMessage.error('请输入正确的精网号') + return; + } + } const result = await request({ url: '/cashCollection/selectCollection', data: { diff --git a/src/views/moneyManage/receiveDetail/receiveService.vue b/src/views/moneyManage/receiveDetail/receiveService.vue index 938ef7d..225f23f 100644 --- a/src/views/moneyManage/receiveDetail/receiveService.vue +++ b/src/views/moneyManage/receiveDetail/receiveService.vue @@ -458,7 +458,6 @@ const defaultTime = [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, // 查询按钮 const search = () => { getlist() - ElMessage.success('查询成功') } // 重置按钮 @@ -519,6 +518,13 @@ const getlist = async () => { } else { searchData.value.market = '' } + if (searchData.value.jwcode) { + const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); + if (!isPositiveInteger) { + ElMessage.error('请输入正确的精网号') + return; + } + } const result = await request({ url: '/cashCollection/selectCollection',