diff --git a/.env.development b/.env.development index 2bd86fc..cd182d8 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/Complaint/index.ts b/src/api/system/Complaint/index.ts index 82abe2d..7e2a793 100644 --- a/src/api/system/Complaint/index.ts +++ b/src/api/system/Complaint/index.ts @@ -20,7 +20,7 @@ export const listComplaint = (query?: ComplaintQuery): AxiosPromise => { +export const getComplaint = (id: string): AxiosPromise => { return request({ url: '/complaint/' + id, method: 'get' diff --git a/src/api/system/Complaint/type.ts b/src/api/system/Complaint/type.ts index d13de25..55ccd15 100644 --- a/src/api/system/Complaint/type.ts +++ b/src/api/system/Complaint/type.ts @@ -30,7 +30,7 @@ export interface ComplaintVO { problemIamgeUrl: string; /** - * 投诉状态 0待处理 1处理中 2已处理 + * 投诉状态 0 待处理 1 已处理 */ status: string; diff --git a/src/api/system/SdbBill/type.ts b/src/api/system/SdbBill/type.ts index 8487137..4f0f55a 100644 --- a/src/api/system/SdbBill/type.ts +++ b/src/api/system/SdbBill/type.ts @@ -20,9 +20,13 @@ export interface BillVO { * 收费范围 0全体业主 1部分业主 */ chargeScope: string; + /** + * 按季度收费时,指定季度起始年月列表,格式 "yyyy-MM",如 ["2026-01", "2026-04", "2026-07"] + */ + periodCalcType: string; /** - * 收费周期 0年 1月 2日 + * 收费周期 0年 1月 2日 3 季度 4永久;为空时取账单配置 */ chargePeriod: string; diff --git a/src/api/system/SdbCashier/index.ts b/src/api/system/SdbCashier/index.ts index 8bc4efd..cea3767 100644 --- a/src/api/system/SdbCashier/index.ts +++ b/src/api/system/SdbCashier/index.ts @@ -63,8 +63,7 @@ export const billEdit = (data: { 'detailsId': string[]; 'payType': string; 'payS return request({ url: '/cash/billEdit', method: 'post', - data: data, - + data: data }); }; @@ -76,6 +75,25 @@ export const billPrint = (data: { 'detailsIds': string[]; 'residentId': string } data: data }); }; +// 查询所有账单总金额 +export const getAllAccount = ( + data = {} +): AxiosPromise<{ + /** 总金额 */ + 'receivableAmount': string; + /** 总实收金额 */ + 'receivedAmount': string; + /** 总优惠金额 */ + 'discountAmount': string; + /** 未收金额 */ + 'unpaidAmount': string; +}> => { + return request({ + url: '/cash/billAmountSummary', + method: 'post', + data: data + }); +}; // 删除账单 export const billDelete = (ids: string | string[]) => { diff --git a/src/api/system/houseRental/type.ts b/src/api/system/houseRental/type.ts index 7a81431..8617d48 100644 --- a/src/api/system/houseRental/type.ts +++ b/src/api/system/houseRental/type.ts @@ -117,6 +117,8 @@ export interface HouseRentalForm extends BaseEntity { villageId?: string; } export interface HouseRentalSigningVO { + rentAmount: string | number; + depositAmount: string | number; 'id': string; 'rentalId': string; 'contractNo': string; diff --git a/src/components/QuarterSelect/index.vue b/src/components/QuarterSelect/index.vue new file mode 100644 index 0000000..b6fb960 --- /dev/null +++ b/src/components/QuarterSelect/index.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/views/system/Complaint/complainMain.vue b/src/views/system/Complaint/complainMain.vue index b4a3826..3379e56 100644 --- a/src/views/system/Complaint/complainMain.vue +++ b/src/views/system/Complaint/complainMain.vue @@ -125,7 +125,10 @@ const formInfo = ref({ 'complaintName': '', 'phone': '', 'problemImageUrl': '', - 'status': '1', // 投诉状态 0 待处理 1 已处理 + /** + * 投诉状态 0 待处理 1 已处理╬╬╬╬╬╬ + */ + 'status': '1', 'handleId': '', 'handleName': '', 'handleContent': '', diff --git a/src/views/system/Decoration/index.vue b/src/views/system/Decoration/index.vue index e114704..088da73 100644 --- a/src/views/system/Decoration/index.vue +++ b/src/views/system/Decoration/index.vue @@ -137,6 +137,7 @@ import { listDecoration, delDecoration, updateDecoration } from '@/api/system/De import { DecorationVO, DecorationQuery, DecorationForm } from '@/api/system/Decoration/type'; import { checkPermi } from '@/utils/permission'; import { validator } from '@/utils/Reg'; +import '@/types/axios.d.ts'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { com_decoration_status } = toRefs(proxy?.useDict('com_decoration_status')); @@ -217,10 +218,14 @@ const { queryParams, form, rules } = toRefs(data); /** 查询装修管理列表 */ const getList = async () => { loading.value = true; - const res = await listDecoration(queryParams.value); - decorationList.value = res.rows; - total.value = res.total; - loading.value = false; + listDecoration(queryParams.value) + .then((res) => { + decorationList.value = res.rows; + total.value = res.total; + }) + .finally(() => { + loading.value = false; + }); }; /** 取消按钮 */ @@ -248,6 +253,8 @@ const handleClear = () => { /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); + queryParams.value.inspectionResult = undefined; + queryParams.value.applyName = undefined; handleQuery(); }; diff --git a/src/views/system/Repair/addRepair.vue b/src/views/system/Repair/addRepair.vue index eb778e2..6183d27 100644 --- a/src/views/system/Repair/addRepair.vue +++ b/src/views/system/Repair/addRepair.vue @@ -204,13 +204,18 @@ const dialogVisible = ref(false); const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => { console.log(uploadFile, uploadFiles); }; -const blockedExts = ['.exe', '.bat', '.cmd', '.msi']; +const blockedExits = ['.exe', '.bat', '.cmd', '.msi']; +const allUploadExits = ['.jpg', '.jpeg', '.png', '.gif', '.bmp']; const handleChangeFile: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => { const ext = rawFile.name.toLowerCase().slice(rawFile.name.lastIndexOf('.')); - if (blockedExts.includes(ext)) { + if (blockedExits.includes(ext)) { ElMessage.warning(`禁止上传 ${ext} 文件`); return false; } + if (!allUploadExits.includes(ext)) { + ElMessage.warning(`请上传 图片格式 文件`); + return false; + } return true; }; diff --git a/src/views/system/Repair/addRepairlist.vue b/src/views/system/Repair/addRepairlist.vue index a7ea253..8a37a9c 100644 --- a/src/views/system/Repair/addRepairlist.vue +++ b/src/views/system/Repair/addRepairlist.vue @@ -95,7 +95,7 @@ function handleChange(val: string) { form.value.projectType = find.projectType; } } -// != ========================================== +// != ==========================================8 async function init() { form.value = { diff --git a/src/views/system/Sdb/ChargeItem/add.vue b/src/views/system/Sdb/ChargeItem/add.vue index a42338f..19b8a00 100644 --- a/src/views/system/Sdb/ChargeItem/add.vue +++ b/src/views/system/Sdb/ChargeItem/add.vue @@ -43,8 +43,8 @@ - - + + diff --git a/src/views/system/Sdb/ChargeItem/index.vue b/src/views/system/Sdb/ChargeItem/index.vue index f1cb378..843fc5a 100644 --- a/src/views/system/Sdb/ChargeItem/index.vue +++ b/src/views/system/Sdb/ChargeItem/index.vue @@ -48,8 +48,7 @@ diff --git a/src/views/system/Sdb/SdbBill/add.vue b/src/views/system/Sdb/SdbBill/add.vue index c404270..66135e2 100644 --- a/src/views/system/Sdb/SdbBill/add.vue +++ b/src/views/system/Sdb/SdbBill/add.vue @@ -78,10 +78,46 @@ - + + +
+ + + + + + + +
+
- @@ -134,11 +159,12 @@ import { listChargeItem } from '@/api/system/SdbChargeItem'; import { getBill, updateBill, addBill } from '@/api/system/SdbBill'; import type { DatePickerType } from 'element-plus'; import { formatDate2 } from '@/utils'; +import { QuestionFilled } from '@element-plus/icons-vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { com_questionnaire_scope } = toRefs(proxy?.useDict('com_questionnaire_scope')); -const { com_bill_charge_scope_house } = toRefs(proxy?.useDict('com_bill_charge_scope_house')); -const { com_bill_charge_period } = toRefs(proxy?.useDict('com_bill_charge_period')); +const { com_bill_charge_scope_house, com_questionnaire_scope, com_bill_charge_period } = toRefs( + proxy?.useDict('com_bill_charge_scope_house', 'com_questionnaire_scope', 'com_bill_charge_period') +); type PickerConfig = { type: DatePickerType; @@ -163,6 +189,7 @@ const form = ref({ residentIds: [], // 部分业主 parkingIds: [], chargeTypeId: '', // typeid + periodCalcType: '0', // 周期计算维度 'startDate': '', // 开始 'endDate': '', // 结束 'remark': '' @@ -172,12 +199,30 @@ const rules = ref({ chargeItemId: [{ required: true, message: '请选择 收费项目', trigger: 'blur' }], chargePeriod: [{ required: true, message: '请选择 费用周期', trigger: 'blur' }], startDate: [{ required: true, message: '请选择 起止日期', trigger: 'blur' }], + periodCalcType: [{ required: true, message: '请选择 周期计算维度', trigger: 'blur' }], endDate: [{ required: true, message: '请选择 起止日期', trigger: 'blur' }] }); const userid = ref(null); // 开始结束日期 const StartEndDate = ref([]); +function handleDisableDate(date: Date) { + // 月 - 自然月/滚动月 + if (form.value.periodCalcType === '0') { + // 自然月 + const year = date.getFullYear(); + const month = date.getMonth() + 1; + const firstDay = new Date(year, month - 1, 1); + const lastDay = new Date(year, month, 0); + if (date.getTime() == lastDay.getTime() || date.getTime() == firstDay.getTime()) { + return false; + } + return true; + } else if (form.value.periodCalcType === '1') { + // 滚动月 + return false; + } +} function handleDate(val: string[]) { if (val === null || val.length === 0) { form.value.startDate = ''; @@ -201,7 +246,6 @@ const chargeItemList = ref([]); async function init() { listChargeItem({}).then((res) => { chargeItemList.value = res.rows; - // const res = await listBillHouse({ pageNum: 1, pageSize: 999999 }); // houselist.value = res.rows; // const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 }); @@ -215,15 +259,12 @@ async function init() { ...form.value, ...res.data }; - // TODO 没有住户参数 form.value.houseIds = res.data.houseIds || []; form.value.residentIds = res.data.residentIds || []; form.value.parkingIds = res.data.parkingIds || []; form.value.startDate = formatDate2(form.value.startDate); form.value.endDate = formatDate2(form.value.endDate); StartEndDate.value = [form.value.startDate, form.value.endDate]; - // TODO houseid 有默认值, 需要处理 - // TODO residentids 添加, checkoutHouses.value = []; checkoutUser.value = []; checkoutParking.value = []; @@ -231,6 +272,7 @@ async function init() { checkoutUser.value = form.value.residentIds.filter((item) => item); checkoutParking.value = form.value.parkingIds.filter((item) => item); handleChange(form.value.chargeItemId); + handleChangePeriod(form.value.chargePeriod); }); } }); @@ -315,10 +357,27 @@ function OpenUseTablesFun(val: string) { } } // !== 业主 ============================================================================= +const PeriodicCalculationDimensionList = ref([]); +function handleChangePeriod(val: string) { + const find = com_bill_charge_period.value.find((item: { value: string; label: string }) => item.value === val); + if (find) { + // 不是日,才显示自然和滚动周期 + if (find.value === '2') return; + PeriodicCalculationDimensionList.value = [ + { + label: find.value === '3' ? `自然${find.label}(日历季度)` : `自然${find.label}`, + value: '0' + }, + { + label: find.value === '3' ? `滚动${find.label}(连续3个月)` : `滚动${find.label}`, + value: '1' + } + ]; + } +} // !== 提交 ============================================================================= const submitForm = () => { - console.log(form.value); formRef.value?.validate(async (valid: boolean) => { if (valid) { if (userid.value) { @@ -342,6 +401,13 @@ const cancelForm = () => {