From 0c4c9676b576ba4baa69d2ecbb2d69be9f0f982b Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Tue, 21 Jul 2026 17:32:22 +0800 Subject: [PATCH] =?UTF-8?q?7/17=20=E6=B7=BB=E5=8A=A0=E5=85=AC=E5=8C=BA?= =?UTF-8?q?=E6=94=B6=E7=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .../resident/index.ts | 2 +- .../resident/type.ts | 0 src/api/system/revenueNotice/index.ts | 63 ++++ src/api/system/revenueNotice/type.ts | 140 +++++++++ src/api/workflow/index.ts | 27 ++ src/assets/icons/svg/gongqushouyi.svg | 1 + src/components/Editor/index.vue | 297 +++++++++++++++--- src/components/Holder/index.vue | 4 +- src/components/Holder/repairUser.vue | 2 +- src/layout/components/Navbar.vue | 2 +- src/utils/money.ts | 9 +- src/utils/print.ts | 151 +++++++++ src/utils/request.ts | 4 +- src/views/system/Complaint/complainMain.vue | 2 +- src/views/system/HandleLog/addHandleLog.vue | 45 ++- src/views/system/NoticePc/addNoticePc.vue | 7 +- src/views/system/NoticePc/index.vue | 19 +- .../system/Questionnaire/addQuestionnaire.vue | 2 +- src/views/system/Sdb/SdbCashier/index.vue | 10 +- src/views/system/cars/addCars.vue | 1 - src/views/system/cars/index.vue | 2 +- .../system/houseRental/addhouseResident.vue | 2 +- src/views/system/inspection/Daily/index.vue | 28 +- src/views/system/inspection/Monthly/index.vue | 28 +- src/views/system/inspection/Weekly/index.vue | 29 +- src/views/system/resident/ResidentMain.vue | 4 +- src/views/system/resident/addResident.vue | 4 +- src/views/system/resident/index.vue | 4 +- .../system/revenueNotice/addRevenueNotice.vue | 259 +++++++++++++++ src/views/system/revenueNotice/index.vue | 276 ++++++++++++++++ src/views/system/statistics/Payment/index.vue | 6 +- .../system/warehouse/Inventory/index.vue | 3 +- .../system/warehouse/Material/addMaterial.vue | 2 - .../system/warehouse/Supplier/addSupplier.vue | 8 +- .../warehouse/Warehouse/addWarehouse.vue | 18 +- .../workbench/components/feeOverview.vue | 210 +++++++++++++ .../workbench/components/repairechartsAll.vue | 2 +- src/views/workbench/components/todo.vue | 32 +- src/views/workbench/components/usertable.vue | 2 +- src/views/workbench/index2.vue | 4 +- 41 files changed, 1583 insertions(+), 132 deletions(-) rename src/api/system/{ => residentReviewProcess}/resident/index.ts (98%) rename src/api/system/{ => residentReviewProcess}/resident/type.ts (100%) create mode 100644 src/api/system/revenueNotice/index.ts create mode 100644 src/api/system/revenueNotice/type.ts create mode 100644 src/assets/icons/svg/gongqushouyi.svg create mode 100644 src/views/system/revenueNotice/addRevenueNotice.vue create mode 100644 src/views/system/revenueNotice/index.vue create mode 100644 src/views/workbench/components/feeOverview.vue diff --git a/.env.development b/.env.development index 1b230d8..7230ff9 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/resident/index.ts b/src/api/system/residentReviewProcess/resident/index.ts similarity index 98% rename from src/api/system/resident/index.ts rename to src/api/system/residentReviewProcess/resident/index.ts index fc610f3..54fe0ae 100644 --- a/src/api/system/resident/index.ts +++ b/src/api/system/residentReviewProcess/resident/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { ResidentVO, ResidentForm, ResidentQuery } from '@/api/system/resident/type'; +import { ResidentVO, ResidentForm, ResidentQuery } from '@/api/system/residentReviewProcess/resident/type'; /** * 查询住户管理列表 diff --git a/src/api/system/resident/type.ts b/src/api/system/residentReviewProcess/resident/type.ts similarity index 100% rename from src/api/system/resident/type.ts rename to src/api/system/residentReviewProcess/resident/type.ts diff --git a/src/api/system/revenueNotice/index.ts b/src/api/system/revenueNotice/index.ts new file mode 100644 index 0000000..18b189b --- /dev/null +++ b/src/api/system/revenueNotice/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { RevenueNoticeVO, RevenueNoticeForm, RevenueNoticeQuery } from './type'; + +/** + * 查询公区收益通知列表 + * @param query + * @returns {*} + */ + +export const listRevenueNotice = (query?: RevenueNoticeQuery): AxiosPromise => { + return request({ + url: '/revenueNotice/list', + method: 'get', + params: query + }); +}; + +/** + * 查询公区收益通知详细 + * @param noticeId + */ +export const getRevenueNotice = (noticeId: string | number): AxiosPromise => { + return request({ + url: '/revenueNotice/' + noticeId, + method: 'get' + }); +}; + +/** + * 新增公区收益通知 + * @param data + */ +export const addRevenueNotice = (data: RevenueNoticeForm) => { + return request({ + url: '/revenueNotice', + method: 'post', + data: data + }); +}; + +/** + * 修改公区收益通知 + * @param data + */ +export const updateRevenueNotice = (data: RevenueNoticeForm) => { + return request({ + url: '/revenueNotice', + method: 'put', + data: data + }); +}; + +/** + * 删除公区收益通知 + * @param noticeId + */ +export const delRevenueNotice = (noticeId: string | number | Array) => { + return request({ + url: '/revenueNotice/' + noticeId, + method: 'delete' + }); +}; diff --git a/src/api/system/revenueNotice/type.ts b/src/api/system/revenueNotice/type.ts new file mode 100644 index 0000000..1f3c8c6 --- /dev/null +++ b/src/api/system/revenueNotice/type.ts @@ -0,0 +1,140 @@ +export interface RevenueNoticeVO { + /** + * 公告ID + */ + noticeId: string | number; + + /** + * 公告标题 + */ + noticeTitle: string; + + /** + * 公告内容 + */ + noticeContent: string; + + /** + * 作者 + */ + author: string; + + /** + * 紧急程度 0=普通 1=紧急 2=非常紧急 + */ + urgencyLevel: number; + + /** + * 发布状态 0=草稿 1=已发布 + */ + publishStatus: number; + + /** + * 发布人 + */ + publishBy: string; + + /** + * 发布日期 + */ + publishTime: string; + + /** + * 所属小区id + */ + villageId: string | number; +} + +export interface RevenueNoticeForm extends BaseEntity { + /** + * 公告ID + */ + noticeId?: string | number; + + /** + * 公告标题 + */ + noticeTitle?: string; + + /** + * 公告内容 + */ + noticeContent?: string; + + /** + * 作者 + */ + author?: string; + + /** + * 紧急程度 0=普通 1=紧急 2=非常紧急 + */ + urgencyLevel?: number; + + /** + * 发布状态 0=草稿 1=已发布 + */ + publishStatus?: number; + + /** + * 发布人 + */ + publishBy?: string; + + /** + * 发布日期 + */ + publishTime?: string; + + /** + * 所属小区id + */ + villageId?: string | number; +} + +export interface RevenueNoticeQuery extends PageQuery { + /** + * 公告标题 + */ + noticeTitle?: string; + + /** + * 公告内容 + */ + noticeContent?: string; + + /** + * 作者 + */ + author?: string; + + /** + * 紧急程度 0=普通 1=紧急 2=非常紧急 + */ + urgencyLevel?: number; + + /** + * 发布状态 0=草稿 1=已发布 + */ + publishStatus?: number; + + /** + * 发布人 + */ + publishBy?: string; + + /** + * 发布日期 + */ + publishTime?: string; + + /** + * 所属小区id + */ + villageId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/workflow/index.ts b/src/api/workflow/index.ts index 86a1b0c..11253df 100644 --- a/src/api/workflow/index.ts +++ b/src/api/workflow/index.ts @@ -65,6 +65,33 @@ export const workSpaceIncomeTrendListApi = ( } }); }; +/** + * 收费率统计 + * @returns {*} + */ +export const paymentRateApi = ( + startDate: string, + endDate: string +): Promise<{ + data: { + 'receivableAmount': string; + 'receivablePercent': string; + 'receivedAmount': string; + 'receivedPercent': string; + 'unpaidAmount': string; + 'unpaidPercent': string; + }; +}> => { + return request({ + url: '/workSpace/paymentRate', + method: 'GET', + params: { + startDate: startDate, + endDate: endDate + } + }); +}; + /** * 查询近一周支出趋势 * @returns {*} diff --git a/src/assets/icons/svg/gongqushouyi.svg b/src/assets/icons/svg/gongqushouyi.svg new file mode 100644 index 0000000..afd4619 --- /dev/null +++ b/src/assets/icons/svg/gongqushouyi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 77584b7..2f906ea 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -1,17 +1,37 @@ @@ -27,9 +47,11 @@ +const handleUploadRequest: UploadRequestHandler = async (options: UploadRequestOptions) => { + const file = options.file as File; + const quill = toRaw(quillEditorRef.value)?.getQuill(); + if (!quill) { + proxy?.$modal.msgError('编辑器未就绪'); + proxy?.$modal.closeLoading(); + return Promise.reject(new Error('editor not ready')); + } + const range = quill.selection?.savedRange; + const insertIndex = range ? range.index : quill.getLength(); - + +`; + + // 只复制票据内部innerHTML,不带外层el-dialog多余结构 + const printContent = el.innerHTML; + + win.document.write(` + + + + ${title} + + ${styles} + ${printScopeStyle} + + +
${printContent}
+ + + `); + win.document.close(); win.onload = () => { setTimeout(() => { win.print(); diff --git a/src/utils/request.ts b/src/utils/request.ts index 341f4f4..fdfc3af 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -245,13 +245,13 @@ service.interceptors.response.use( } ); // 通用下载方法 -export function download(url: string, params: any, fileName: string) { +export function download(url: string, params: any, fileName: string, format: boolean = true) { downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); // prettier-ignore return service.post(url, params, { transformRequest: [ (params: any) => { - return tansParams(params); + return format ? tansParams(params) : JSON.stringify(params); } ], headers: { 'Content-Type': 'application/x-www-form-urlencoded',silentError: 'true' }, diff --git a/src/views/system/Complaint/complainMain.vue b/src/views/system/Complaint/complainMain.vue index 04cc5a6..b84b6f7 100644 --- a/src/views/system/Complaint/complainMain.vue +++ b/src/views/system/Complaint/complainMain.vue @@ -108,7 +108,7 @@ import repairUser from '@/components/Holder/repairUser.vue'; import PageHeader from '@/components/Pageheader/index.vue'; import { getComplaint, updateComplaint } from '@/api/system/Complaint'; import { listComplaintType } from '@/api/system/ComplainType'; -import { ResidentVO } from '@/api/system/resident/type'; +import { ResidentVO } from '@/api/system/residentReviewProcess/resident/type'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { com_complaint_status } = toRefs(proxy?.useDict('com_complaint_status')); diff --git a/src/views/system/HandleLog/addHandleLog.vue b/src/views/system/HandleLog/addHandleLog.vue index 9e49e62..3016636 100644 --- a/src/views/system/HandleLog/addHandleLog.vue +++ b/src/views/system/HandleLog/addHandleLog.vue @@ -57,23 +57,25 @@
上传文件
+
@@ -144,14 +146,16 @@ const handleAvatarRemove: UploadProps['onRemove'] = (uploadFile: UploadUserFile, // 定义大小限制常量 (单位: MB) const MAX_SINGLE_FILE_SIZE = 10 * 1024 * 1024; // 10MB in bytes const MAX_TOTAL_FILE_SIZE = 20 * 1024 * 1024; // 20MB in bytes -// 禁止的危险文件后缀 -const forbidSuffix = ['exe', 'msi', 'bat', 'cmd', 'sh', 'apk', 'dmg']; +const uploadRef = ref(); // 添加一个锁,防止 on-change 递归调用导致重复提示 const isChecking = ref(false); const handleProgress: UploadProps['onChange'] = (uploadFile: UploadUserFile, uploadFiles: UploadFiles) => { // 如果正在校验中,直接返回,避免重复执行 + if (!beforeAvatarUpload(uploadFile)) { + uploadRef.value.handleRemove(uploadFile); + return; + } if (isChecking.value) return; - // 加锁 isChecking.value = true; // 创建一个新数组来存储校验通过的文件 @@ -229,12 +233,41 @@ const handleProgress: UploadProps['onChange'] = (uploadFile: UploadUserFile, upl }; const blockedExts = ['.exe', '.bat', '.cmd', '.msi']; -const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => { +const allowExts = [ + // word + '.doc', + '.docx', + '.dot', + '.dotx', + // excel + '.xls', + '.xlsx', + '.xlsm', + '.xlsb', + // img + '.jpg', + '.jpeg', + '.png', + '.gif', + '.bmp', + '.webp', + // 专业/矢量图 + '.psd', + '.ai', + '.svg', + '.tif', + '.tiff' +]; +const beforeAvatarUpload = (rawFile: UploadUserFile) => { const ext = rawFile.name.toLowerCase().slice(rawFile.name.lastIndexOf('.')); if (blockedExts.includes(ext)) { ElMessage.warning(`禁止上传 ${ext} 文件`); return false; } + if (!allowExts.includes(ext)) { + ElMessage.warning('只能上传word,excel,图片等文件'); + return false; + } return true; }; diff --git a/src/views/system/NoticePc/addNoticePc.vue b/src/views/system/NoticePc/addNoticePc.vue index dfde51f..6527a4b 100644 --- a/src/views/system/NoticePc/addNoticePc.vue +++ b/src/views/system/NoticePc/addNoticePc.vue @@ -48,6 +48,7 @@ :height="500" :min-height="300" :read-only="false" + type="url" :file-size="5" /> @@ -71,7 +72,6 @@ import PageHeader from '@/components/Pageheader/index.vue'; import { addNotice, getNotice } from '@/api/system/NoticePc'; import { updateNotice } from '@/api/system/NoticePc'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { com_noticepc_level } = toRefs(proxy?.useDict('com_noticepc_level')); const { com_publish_status } = toRefs(proxy?.useDict('com_publish_status')); const route = useRoute(); @@ -94,6 +94,7 @@ const rules = { const userid = ref(); // ! 富文本 ============================================================================================================= function handleContent(val: string) { + console.log(val); form.value.noticeContent = val.trim(); } // ! 富文本 ============================================================================================================= @@ -134,9 +135,7 @@ const submitForm = () => { // 返回 function handleBack() { - router.push({ - path: '/repair/noticepc' - }); + router.back(); } diff --git a/src/views/system/NoticePc/index.vue b/src/views/system/NoticePc/index.vue index afa1211..21e03dc 100644 --- a/src/views/system/NoticePc/index.vue +++ b/src/views/system/NoticePc/index.vue @@ -47,23 +47,23 @@ - + - + - - - - - + + + + + + + -
+
{{ print_form.title }}