diff --git a/app/api/pubnotice.js b/app/api/pubnotice.js new file mode 100644 index 0000000..f783071 --- /dev/null +++ b/app/api/pubnotice.js @@ -0,0 +1,42 @@ +import request from '@/utils/request.js'; + +/** + * pubnotice 新增 + * @param {Object} data + */ +export function pubnoticeCreateApi(data) { + return request.post('autogencode/pubnotice/save', data, { useAdminUrl: true }); +} + +/** + * pubnotice 更新 + * @param {Object} data + */ +export function pubnoticeUpdateApi(data) { + return request.post('autogencode/pubnotice/update', data, { useAdminUrl: true }); +} + +/** + * pubnotice 详情 + * @param {string} id noticeId + */ +export function pubnoticeDetailApi(id) { + return request.get(`autogencode/pubnotice/info/${id}`, {}, { useAdminUrl: true }); +} + +/** + * pubnotice 批量删除 + * @param {string[]|string} ids + */ +export function pubnoticeDeleteApi(ids) { + return request.post('autogencode/pubnotice/delete', ids, { useAdminUrl: true }); +} + +/** + * pubnotice 列表 + * @param {Object} params query params (page/limit + 各字段条件) + */ +export function pubnoticeListApi(params) { + return request.get('autogencode/pubnotice/list', params, { useAdminUrl: true }); +} + diff --git a/app/manifest.json b/app/manifest.json index b8daba4..5c019ef 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -123,6 +123,7 @@ /* 小程序特有相关 */ "mp-weixin" : { "appid" : "", + "libVersion" : "latest", "setting" : { "urlCheck" : true, "minified" : true, diff --git a/app/pages.json b/app/pages.json index 57959ae..d77e61c 100644 --- a/app/pages.json +++ b/app/pages.json @@ -249,6 +249,22 @@ "navigationBarBackgroundColor": "#409EFF", "navigationBarTextStyle": "white" } + }, + { + "path": "notice/index", + "style": { + "navigationBarTitleText": "通知公告列表", + "navigationBarBackgroundColor": "#409EFF", + "navigationBarTextStyle": "white" + } + }, + { + "path": "notice_detail/index", + "style": { + "navigationBarTitleText": "通知详情", + "navigationBarBackgroundColor": "#409EFF", + "navigationBarTextStyle": "white" + } } ] }, diff --git a/app/pages/index/index.vue b/app/pages/index/index.vue index 28da406..da7ce28 100644 --- a/app/pages/index/index.vue +++ b/app/pages/index/index.vue @@ -50,8 +50,9 @@ - - + + 物业服务 + @@ -1426,6 +1427,16 @@ color: #454545; } + .property-service-title { + width: 100%; + box-sizing: border-box; + padding: 20rpx 24rpx 8rpx; + font-size: 28rpx; + font-weight: 600; + color: #2f3a4a; + letter-spacing: 1rpx; + } + .mp-bg { position: absolute; left: 0; diff --git a/app/pages/supply_chain/approval/index.vue b/app/pages/supply_chain/approval/index.vue index aa29fc5..b8b169f 100644 --- a/app/pages/supply_chain/approval/index.vue +++ b/app/pages/supply_chain/approval/index.vue @@ -22,7 +22,7 @@ {{ item.type }} - {{ item.status }} + {{ item.status }} {{ item.time }} @@ -64,6 +64,10 @@ export default { data() { return { activeStatus: 'all', + statusClassMap: { + '待处理': 'status-pending', + '已处理': 'status-processed' + }, approvals: [ { id: 1, type: '采购申请', status: '待处理', time: '2026-03-07 10:00', applicant: '张三', content: '采购有机蔬菜100斤', amount: 100 }, { id: 2, type: '领用申请', status: '待处理', time: '2026-03-07 09:30', applicant: '李四', content: '领用维修耗材', amount: 50 }, @@ -87,14 +91,6 @@ export default { goBack() { uni.navigateBack(); }, - getStatusClass(status) { - if (status === '待处理') { - return 'status-pending'; - } else if (status === '已处理') { - return 'status-processed'; - } - return ''; - }, approveApproval(id) { // 模拟同意审批 uni.showToast({ diff --git a/app/pages/supply_chain/complaint/index.vue b/app/pages/supply_chain/complaint/index.vue index ce470e6..d877794 100644 --- a/app/pages/supply_chain/complaint/index.vue +++ b/app/pages/supply_chain/complaint/index.vue @@ -123,7 +123,7 @@ {{ item.submitChannel === '0' ? '投诉' : '建议' }} {{ statusText(item.status) }} @@ -204,7 +204,18 @@ export default { page: 1, limit: 10, loading: false, - finished: false + finished: false, + statusClassMap: { + '0': 'status-pending', + 0: 'status-pending', + '1': 'status-pending', + 1: 'status-pending', + '2': 'status-processing', + 2: 'status-processing', + '3': 'status-done', + 3: 'status-done', + '__default__': 'status-pending' + } }; }, computed: { @@ -327,14 +338,6 @@ export default { if (status === '3') return '已处理'; return status; }, - statusClass(status) { - const text = this.statusText(status); - if (text === '已处理') return 'status-done'; - if (text === '待处理') return 'status-pending'; - if (text === '未处理') return 'status-pending'; - if (text === '处理中') return 'status-processing'; - return ''; - } } }; diff --git a/app/pages/supply_chain/material_receipt/index.vue b/app/pages/supply_chain/material_receipt/index.vue index 5488b72..2572b38 100644 --- a/app/pages/supply_chain/material_receipt/index.vue +++ b/app/pages/supply_chain/material_receipt/index.vue @@ -42,7 +42,7 @@ {{ item.materialName }} - {{ item.status }} + {{ item.status }} @@ -82,6 +82,11 @@ export default { purpose: '', applicant: '' }, + statusClassMap: { + '待审批': 'status-pending', + '已审批': 'status-approved', + '已拒绝': 'status-rejected' + }, materials: [ { id: 1, name: '维修耗材' }, { id: 2, name: '办公用品' }, @@ -133,16 +138,6 @@ export default { showCancel: false }); }, - getStatusClass(status) { - if (status === '待审批') { - return 'status-pending'; - } else if (status === '已审批') { - return 'status-approved'; - } else if (status === '已拒绝') { - return 'status-rejected'; - } - return ''; - } } }; diff --git a/app/pages/supply_chain/notice/index.vue b/app/pages/supply_chain/notice/index.vue new file mode 100644 index 0000000..73afa2b --- /dev/null +++ b/app/pages/supply_chain/notice/index.vue @@ -0,0 +1,527 @@ + + + + + + diff --git a/app/pages/supply_chain/notice_detail/index.vue b/app/pages/supply_chain/notice_detail/index.vue new file mode 100644 index 0000000..9fefec6 --- /dev/null +++ b/app/pages/supply_chain/notice_detail/index.vue @@ -0,0 +1,347 @@ + + + + + + diff --git a/app/pages/supply_chain/purchase/index.vue b/app/pages/supply_chain/purchase/index.vue index f29a219..57cd0d4 100644 --- a/app/pages/supply_chain/purchase/index.vue +++ b/app/pages/supply_chain/purchase/index.vue @@ -72,7 +72,7 @@ 订单号:{{ item.orderNo }} - {{ item.status }} + {{ item.status }} @@ -150,6 +150,11 @@ export default { description: '', images: [] }, + statusClassMap: { + '已下单': 'status-ordered', + '配送中': 'status-delivering', + '已完成': 'status-completed' + }, orders: [ { id: 1, orderNo: 'CG20260307001', name: '有机蔬菜', quantity: 100, status: '已下单', orderTime: '2026-03-07', expectedTime: '2026-03-09' }, { id: 2, orderNo: 'CG20260307002', name: '新鲜水果', quantity: 50, status: '配送中', orderTime: '2026-03-06', expectedTime: '2026-03-08' }, @@ -262,18 +267,6 @@ export default { }; }, 1500); }, - getStatusClass(status) { - switch (status) { - case '已下单': - return 'status-ordered'; - case '配送中': - return 'status-delivering'; - case '已完成': - return 'status-completed'; - default: - return ''; - } - } } }; @@ -395,7 +388,7 @@ export default { } .upload-box { - .display: flex; + display: flex; flex-wrap: wrap; .upload-btn { @@ -562,7 +555,7 @@ export default { } .item-footer { - .display: flex; + display: flex; justify-content: flex-end; .detail-btn { diff --git a/app/pages/supply_chain/repair/index.vue b/app/pages/supply_chain/repair/index.vue index d864d99..670b7b9 100644 --- a/app/pages/supply_chain/repair/index.vue +++ b/app/pages/supply_chain/repair/index.vue @@ -59,7 +59,7 @@ - + 报修内容