From 28959cff239f6b5c62b36a055588652f475620a3 Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Thu, 13 Aug 2026 17:43:19 +0800 Subject: [PATCH] =?UTF-8?q?8/13=EF=BC=8C=E6=94=B6=E9=93=B6=E5=8F=B0-?= =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E5=91=A8=E6=9C=9F=EF=BC=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/utils/Reg.ts | 2 + src/views/system/Sdb/SdbCashier/index.vue | 79 ++++++++++--------- .../system/houseRental/addhouseResident.vue | 16 +++- 4 files changed, 59 insertions(+), 42 deletions(-) diff --git a/.env.development b/.env.development index cd182d8..2bd86fc 100644 --- a/.env.development +++ b/.env.development @@ -9,9 +9,9 @@ VITE_APP_ENV='development' # 开发环境 VITE_APP_BASE_API='/dev-api' # # 开发环境 接口代理地址 -#VITE_APP_PROXY_API='http://192.168.1.222:8080' +VITE_APP_PROXY_API='http://192.168.1.222:8080' # 开发环境 接口代理地址 -VITE_APP_PROXY_API='http://192.168.1.6:8080' +#VITE_APP_PROXY_API='http://192.168.1.6:8080' # 图片基础地址 VITE_IMG_URL='http://192.168.1.222:8080' diff --git a/src/utils/Reg.ts b/src/utils/Reg.ts index a51619f..86c6fc7 100644 --- a/src/utils/Reg.ts +++ b/src/utils/Reg.ts @@ -23,6 +23,8 @@ const reg = { passport: /^[EG]\d{8}$/, /** 港澳通行证 */ hongkongPassport: /^[CHMW]\d{8}$/, + /** 微信 */ + vx: /^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/, /** 年龄 */ age: /^[0-9]\d{0,2}$/, /** 数字 */ diff --git a/src/views/system/Sdb/SdbCashier/index.vue b/src/views/system/Sdb/SdbCashier/index.vue index 3cd5b42..c218902 100644 --- a/src/views/system/Sdb/SdbCashier/index.vue +++ b/src/views/system/Sdb/SdbCashier/index.vue @@ -40,17 +40,23 @@ > - + + @@ -58,17 +64,23 @@ - + + @@ -134,7 +146,7 @@ - + @@ -482,8 +494,6 @@ const queryParams = ref({ unitNoId: undefined, // 房屋id houseId: undefined, - // 缴费周期 - chargePeriod: undefined, // 房屋类型id houseUseTypeId: undefined, // 缴费时间 @@ -503,11 +513,6 @@ const queryParams = ref({ endDate: undefined }); -// 缴费周期 -const chargePeriod = ref([]); - -// 缴费时间 -const payTime = ref([]); const villageList = ref([]); // 小区列表 const buildingList = ref([]); // 楼栋列表 const unitList = ref([]); // 单元列表 @@ -578,21 +583,20 @@ function handleChangeUnit(val: string) { function handleChangeHouseNo() {} // 清空缴费时间 -function handleClearPayTime() { - payTime.value = []; +function handleClearPayTime(type: 'payTimeBegin' | 'payTimeEnd') { + queryParams.value[type] = undefined; } // 清空缴费周期 -function handleClearChargePeriod() { - chargePeriod.value = []; +function handleClearChargePeriod(type: 'start' | 'end' = 'start') { + if (type === 'start') { + queryParams.value.startDate = undefined; + } else { + queryParams.value.endDate = undefined; + } } // 获取列表 function getList() { loading.value = true; - queryParams.value.payTimeBegin = payTime.value[0] ? payTime.value[0] : undefined; - queryParams.value.payTimeEnd = payTime.value[1] ? payTime.value[1] : undefined; - - queryParams.value.startDate = chargePeriod.value[0] ? chargePeriod.value[0] : undefined; - queryParams.value.endDate = chargePeriod.value[1] ? chargePeriod.value[1] : undefined; billQuery(queryParams.value) .then((res) => { tableData.value = res.rows; @@ -612,10 +616,8 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); - payTime.value = []; - chargePeriod.value = []; queryParams.value = { - chargePeriod: undefined, + startDate: undefined, payTime: undefined, pageNum: 1, pageSize: 20, @@ -630,7 +632,6 @@ const resetQuery = () => { residentName: undefined, payTimeBegin: undefined, payTimeEnd: undefined, - startDate: undefined, endDate: undefined }; queryParams.value.villageId = villageId; @@ -877,7 +878,7 @@ const closer = () => { }; // 提交 const submitForm = () => { - if (!handlePayListIsEmpt()) { + if (!handlePayListIsEmpty()) { ElMessage.warning('请填写完整支付方式和支付金额'); return; } @@ -1149,7 +1150,7 @@ function handleChangePay(val: string, index: number = -1) { } } -function handlePayListIsEmpt() { +function handlePayListIsEmpty() { if (payList.value.length === 0) { ElMessage.warning('请添加支付方式'); return false; diff --git a/src/views/system/houseRental/addhouseResident.vue b/src/views/system/houseRental/addhouseResident.vue index f233f8a..4d01376 100644 --- a/src/views/system/houseRental/addhouseResident.vue +++ b/src/views/system/houseRental/addhouseResident.vue @@ -156,7 +156,7 @@ - + @@ -279,6 +279,20 @@ const rules = ref({ } } ], + vx: [ + { required: false, message: '请输入微信号码', trigger: 'blur' }, + { + validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => { + if (value === '' || value === null || value === 0) { + return callback(); + } + if (validator(value, 'vx')) { + return callback(new Error('请输入正确的微信号码')); + } + return callback(); + } + } + ], houseArea: [ { required: false,