From 58cda5ccce81a712b51bc9fbb2c452fceb7f4014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Mon, 28 Jul 2025 10:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A2=9E=E5=8A=A0=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=EF=BC=8C=E5=85=B6=E4=BB=96=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/oa/oa-dict-tag/index.vue | 94 ++++++++++++++ pages/workbench/project/detail.vue | 2 +- pages/workbench/project/project.vue | 193 +++++++++++++++++++++++++++- pages/workbench/wms/wms.vue | 2 +- 4 files changed, 282 insertions(+), 9 deletions(-) create mode 100644 components/oa/oa-dict-tag/index.vue diff --git a/components/oa/oa-dict-tag/index.vue b/components/oa/oa-dict-tag/index.vue new file mode 100644 index 0000000..fb7d87e --- /dev/null +++ b/components/oa/oa-dict-tag/index.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/pages/workbench/project/detail.vue b/pages/workbench/project/detail.vue index 14f13b2..506219d 100644 --- a/pages/workbench/project/detail.vue +++ b/pages/workbench/project/detail.vue @@ -13,7 +13,7 @@ 项目类型: - {{ projectDetail.projectType || '-' }} + 项目地址: diff --git a/pages/workbench/project/project.vue b/pages/workbench/project/project.vue index ae15ef6..f06299b 100644 --- a/pages/workbench/project/project.vue +++ b/pages/workbench/project/project.vue @@ -2,19 +2,82 @@ + + - + > + + + 更多筛选条件 + + 项目类型 + + + + 贸易类型 + + + + 项目代号 + + + + 日期范围 + + + + + + + + {{ item.projectName }} 负责人:{{ item.functionary }} - + 剩余时间:{{ item.remainTime }}天 项目总金额:{{ item.funds }}元 @@ -70,13 +133,74 @@ export default { loadMoreStatus: 'more', // 加载更多状态 scrollHeight: 0, // 滚动区域高度 qualityFilter: false, // 优质筛选开关 + searchTime: [], // 日期范围 + queryParams: { + projectName: '', + projectType: '', + tradeType: '', + projectCode: '', + projectStatus: '' + }, + dict: { + type: { + sys_project_type: [], + sys_trade_type: [], + sys_project_code: [], + sys_project_status: [] + } + } } }, onShow() { this.getList(); this.calculateScrollHeight(); + // TODO: 这里应请求字典数据填充dict.type }, methods: { + getStatusLabel(val) { + const arr = this.dict.type.sys_project_status; + const found = arr.find(i => i.value === val); + return found ? found.label : ''; + }, + openSettingsPopup() { + this.$nextTick(() => { + if (this.$refs.filterDrawer) this.$refs.filterDrawer.open(); + }); + }, + handleSearch() { + this.page = 1; + this.projectList = []; + this.getList(); + }, + handleQuery() { + this.page = 1; + this.projectList = []; + if (this.$refs.filterDrawer) this.$refs.filterDrawer.close(); + // 日期范围处理 + if (this.searchTime && this.searchTime.length === 2) { + this.queryParams.beginDate = this.searchTime[0]; + this.queryParams.endDate = this.searchTime[1]; + } else { + this.queryParams.beginDate = ''; + this.queryParams.endDate = ''; + } + this.getList(); + }, + resetQuery() { + this.queryParams = { + projectName: '', + projectType: '', + tradeType: '', + projectCode: '', + projectStatus: '' + }; + this.searchTime = []; + this.handleQuery(); + }, + filterCode(val) { + // 可根据需要自定义筛选逻辑 + return true; + }, calculateScrollHeight() { const systemInfo = uni.getSystemInfoSync(); const tabHeight = 75; // tab高度 @@ -84,7 +208,7 @@ export default { this.scrollHeight = systemInfo.windowHeight - tabHeight - containerPadding + 80; }, getList() { - const params = { pageNum: this.page, pageSize: this.pageSize }; + const params = { pageNum: this.page, pageSize: this.pageSize, ...this.queryParams }; if (this.qualityFilter) { params.prePay = 0.1; // 添加优质筛选参数 } @@ -186,6 +310,7 @@ export default { justify-content: flex-end; /* 右对齐 */ align-items: center; margin: 20rpx; + gap: 10rpx; /* 按钮之间的间距 */ } .button-group { @@ -195,8 +320,62 @@ export default { .popup-content { background-color: #fff; /* 设置纯白背景 */ - padding: 20px; /* 添加内边距 */ - border-radius: 8px; /* 圆角 */ + padding: 24px 18px 18px 18px; /* 上右下左内边距 */ + border-radius: 14px; /* 圆角 */ + min-height: 100vh; + box-sizing: border-box; +} + +.filter-title { + font-size: 20px; + font-weight: bold; + color: #333; + margin-bottom: 18px; + text-align: left; +} + +.filter-item { + display: flex; + align-items: center; + margin-bottom: 18px; +} +.filter-label { + min-width: 80px; + font-size: 16px; + color: #666; + margin-right: 10px; +} +.filter-item oa-dict-select, +.filter-item picker, +.filter-item uni-datetime-picker { + flex: 1; +} +.filter-item .uni-input { + background: #f7f7f7; + border-radius: 6px; + padding: 8px 12px; + font-size: 15px; + color: #333; +} +.filter-actions { + display: flex; + justify-content: center; + gap: 18px; + margin-top: 10px; +} +.filter-actions button { + min-width: 90px; + padding: 8px 0; + border-radius: 6px; + font-size: 16px; + background: #2979ff; + color: #fff; + border: none; +} +.filter-actions button:not(.primary) { + background: #f5f5f5; + color: #333; + border: 1px solid #e0e0e0; } .close-button { diff --git a/pages/workbench/wms/wms.vue b/pages/workbench/wms/wms.vue index 2105a59..2d0662b 100644 --- a/pages/workbench/wms/wms.vue +++ b/pages/workbench/wms/wms.vue @@ -118,7 +118,7 @@ export default { total: 0, loadingMore: false, hasMore: true, - activeFilter: 'model' // 当前展开的筛选项 + activeFilter: 'name' // 当前展开的筛选项 } }, onLoad() {