diff --git a/.env.development b/.env.development index 7230ff9..1b230d8 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/api/system/Payment/index.ts b/src/api/system/Payment/index.ts index 3f54359..d00d380 100644 --- a/src/api/system/Payment/index.ts +++ b/src/api/system/Payment/index.ts @@ -69,7 +69,6 @@ export const income_scourcApi = (datetime?: string): AxiosPromise => }); }; - export interface PayMentMethod { 'wechatAmount': string; 'wechatPercent': string; @@ -89,7 +88,6 @@ export const payment_methodApi = (datetime?: string): AxiosPromise => { return request({ url: '/api/analysis/income/payment_trend', method: 'get', params: { startDate, - endDate, + endDate } }); }; diff --git a/src/api/system/Personnel/index.ts b/src/api/system/Personnel/index.ts index a3a253f..5196e4e 100644 --- a/src/api/system/Personnel/index.ts +++ b/src/api/system/Personnel/index.ts @@ -93,8 +93,6 @@ export const get_movein_moveout_list = (query?: { }); }; - - export const get_person_age = (query?: { dateTime: string; }): AxiosPromise< diff --git a/src/api/system/SdbBill/type.ts b/src/api/system/SdbBill/type.ts index a5f70b3..8487137 100644 --- a/src/api/system/SdbBill/type.ts +++ b/src/api/system/SdbBill/type.ts @@ -3,7 +3,7 @@ export interface BillVO { * 账单管理表id */ id: string; - billName:string; + billName: string; /** * 账单编号 diff --git a/src/api/system/SdbChargeItem/type.ts b/src/api/system/SdbChargeItem/type.ts index 5ae4ef7..6121f91 100644 --- a/src/api/system/SdbChargeItem/type.ts +++ b/src/api/system/SdbChargeItem/type.ts @@ -15,7 +15,7 @@ export interface ChargeItemVO { itemName: string; /** - * 计费方式 0单次收费 1周期收费 2仪表收费 + * 计费方式 0单次收费 1 周期收费 2 仪表收费 */ billingMethod: string; @@ -53,6 +53,10 @@ export interface ChargeItemVO { * 小区id */ villageId: string; + /** + * 状态 0正常 1停用 + */ + status: string; } export interface ChargeItemForm extends BaseEntity { diff --git a/src/api/system/Twarehouse/type.ts b/src/api/system/Twarehouse/type.ts index 042fa05..4a2373f 100644 --- a/src/api/system/Twarehouse/type.ts +++ b/src/api/system/Twarehouse/type.ts @@ -88,7 +88,6 @@ export interface WarehouseQuery extends PageQuery { */ warehouseName?: string; - /** * 联系人* */ diff --git a/src/api/system/cars/index.ts b/src/api/system/cars/index.ts index ff47ced..9f1ed1a 100644 --- a/src/api/system/cars/index.ts +++ b/src/api/system/cars/index.ts @@ -82,9 +82,7 @@ export interface AppUserList { /** * 获取用户端app-用户 * */ -export const getAppUser = ( - data -): AxiosPromise => { +export const getAppUser = (data): AxiosPromise => { return request({ url: '/car/getAppUserList', method: 'GET', diff --git a/src/api/system/equipment/archive/type.ts b/src/api/system/equipment/archive/type.ts index edc76af..6a69d47 100644 --- a/src/api/system/equipment/archive/type.ts +++ b/src/api/system/equipment/archive/type.ts @@ -19,7 +19,7 @@ export interface DeviceVO { * 设备编号 */ deviceCode: string; - shelfLife:string; + shelfLife: string; /** * 设备型号 diff --git a/src/api/system/version/type.ts b/src/api/system/version/type.ts index 433d34b..8d6ca15 100644 --- a/src/api/system/version/type.ts +++ b/src/api/system/version/type.ts @@ -150,7 +150,6 @@ export interface VersionQuery extends PageQuery { */ downloadUrl?: string; - /** * 0-禁用 1-启用 */ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 6e242c0..d85696c 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -259,4 +259,3 @@ aside { .el-button { border-radius: 5px; } - diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 46d51e4..b26a377 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -85,7 +85,7 @@ const fileAccept = computed(() => props.fileType.map((type) => `.${type}`).join( watch( () => props.modelValue, - async (val:string) => { + async (val: string) => { if (val) { let temp = 1; // 首先将值转为数组 diff --git a/src/utils/house.ts b/src/utils/house.ts index 4497116..23518e7 100644 --- a/src/utils/house.ts +++ b/src/utils/house.ts @@ -80,11 +80,7 @@ export function buildHousePathCache(treeData: Tree[]) { pathCache.set('label', new Map()); pathCache.set('value', new Map()); - const stack: [Tree, (string | number)[], (string | number)[]][] = treeData.map(node => [ - node, - [node.label], - [node.value] - ]); + const stack: [Tree, (string | number)[], (string | number)[]][] = treeData.map((node) => [node, [node.label], [node.value]]); while (stack.length) { const [node, labelPath, valPath] = stack.pop()!; @@ -99,11 +95,7 @@ export function buildHousePathCache(treeData: Tree[]) { if (node.children?.length) { const reverseChildren = [...node.children].reverse(); for (const child of reverseChildren) { - stack.push([ - child, - [...labelPath, child.label], - [...valPath, child.value] - ]); + stack.push([child, [...labelPath, child.label], [...valPath, child.value]]); } } } diff --git a/src/utils/money.ts b/src/utils/money.ts index 163e7ec..407fed2 100644 --- a/src/utils/money.ts +++ b/src/utils/money.ts @@ -190,7 +190,6 @@ export function neqMoney(a: string | number, b: string | number): boolean { return !toBig(a).eq(toBig(b)); } - // 保留2位小数(金额专用) export function toFixed2(val) { return Number(val).toFixed(2); diff --git a/src/views/system/Activity/addActivity.vue b/src/views/system/Activity/addActivity.vue index e000514..6668ea3 100644 --- a/src/views/system/Activity/addActivity.vue +++ b/src/views/system/Activity/addActivity.vue @@ -138,7 +138,7 @@ - + diff --git a/src/views/system/Complaint/index.vue b/src/views/system/Complaint/index.vue index cdc514e..e8ee335 100644 --- a/src/views/system/Complaint/index.vue +++ b/src/views/system/Complaint/index.vue @@ -6,7 +6,7 @@ - + @@ -120,6 +120,11 @@ const handleQuery = () => { getList(); }; +/** 清空投诉类型 */ +const handleClear = () => { + queryParams.value.typeId = undefined; + handleQuery(); +}; /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); diff --git a/src/views/system/Decoration/addDecoration.vue b/src/views/system/Decoration/addDecoration.vue index b7cea26..2d5a2b4 100644 --- a/src/views/system/Decoration/addDecoration.vue +++ b/src/views/system/Decoration/addDecoration.vue @@ -7,7 +7,7 @@
基本信息
-
+
@@ -37,14 +37,7 @@ - + @@ -64,6 +57,7 @@ import { ref } from 'vue'; import PageHeader from '@/components/Pageheader/index.vue'; import { addDecoration, getDecoration, updateDecoration } from '@/api/system/Decoration'; import { useHouseStore } from '@/store/modules/house'; +import { validator } from '@/utils/Reg'; const houseStore = useHouseStore(); const treedata = ref([]); @@ -77,39 +71,12 @@ const form = ref({ 'buildingId': null, 'unitNoId': null, 'applyName': '', + 'inspectionResult': '0', 'decorationCompany': '', 'decorationContent': '', 'decorationDeposit': null }); -/** - * 通用金额校验器 - * @param value 输入值 - * @param type money金额 / num整数 - * @returns 校验提示信息,空则校验通过 - */ -const validator = (value: number | null, type: 'money' | 'num') => { - // 空值由 required 规则拦截,这里只处理有值的情况 - if (value === null || value === undefined) return ''; - - // 转字符串处理小数位数 - const strVal = String(value); - // 禁止负数 - if (value < 0) return '金额不能为负数'; - - if (type === 'money') { - // 匹配最多两位小数 - const reg = /^\d+(\.\d{1,2})?$/; - if (!reg.test(strVal)) return '金额仅支持最多两位小数'; - // 限制金额上限(可按需修改) - if (value > 9999999.99) return '押金金额不能超过9999999.99元'; - } else if (type === 'num') { - const reg = /^\d+$/; - if (!reg.test(strVal)) return '只能输入正整数'; - } - - return ''; -}; const rules = { houseId: [{ required: true, message: '请选择具体房屋', trigger: 'blur' }], applyName: [{ required: true, message: '请输入申请人', trigger: 'blur' }], @@ -120,9 +87,18 @@ const rules = { if (val === '' || val === null) { return callback(new Error('请输入装修押金')); } - const msg = validator(val, 'money'); - if (msg) callback(new Error(msg)); - else callback(); + const num = Number(val); + console.log(val); + if (Number.isNaN(num)) { + return callback(new Error('请输入装修押金')); + } + if (num < 0) { + return callback(new Error('装修押金不能为负数')); + } + if (num > 99999999) { + return callback(new Error('装修押金过大')); + } + return validator(val, 'money'); }, trigger: ['blur', 'change'] } @@ -184,9 +160,7 @@ const submitForm = () => { // 返回 function handleBack() { - router.push({ - path: '/repair/decoration' - }); + router.back(); } @@ -198,7 +172,7 @@ function handleBack() { margin-top: 20px; flex: 1; - .formbox { + .formBox { width: 1000px; margin: 0 auto; } diff --git a/src/views/system/Decoration/index.vue b/src/views/system/Decoration/index.vue index 2989511..e6057ec 100644 --- a/src/views/system/Decoration/index.vue +++ b/src/views/system/Decoration/index.vue @@ -9,7 +9,7 @@ - + @@ -59,11 +59,16 @@ link type="primary" v-if="scope.row.inspectionResult !== '1'" - @click="handleInspection(scope.row, 0, '验收')" + @click="handleInspection(scope.row, EditType.Add, '验收')" v-has-permi="['repair:edit:decoration']" >验收 - 详情 编辑 @@ -77,42 +82,47 @@ - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + +
+ + + - - + + - +
-
- - + +
@@ -72,16 +72,21 @@ - + - +