diff --git a/src/api/fee/roomFeeImportDetailApi.js b/src/api/fee/roomFeeImportDetailApi.js new file mode 100644 index 0000000..4c732a8 --- /dev/null +++ b/src/api/fee/roomFeeImportDetailApi.js @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 查询导入费用详情 +export function queryImportFeeDetail(params) { + return new Promise((resolve, reject) => { + request({ + url: '/importFee/queryImportFeeDetail', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || '查询导入费用详情失败')) + } + }).catch(error => { + reject(error) + }) + }) +} diff --git a/src/i18n/index.js b/src/i18n/index.js index 9e7f7cd..c2cdf03 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -148,6 +148,7 @@ import { messages as systemI18n } from './systemI18n' import { messages as communityI18n } from './communityI18n' import { messages as workI18n } from './workI18n' import { messages as feeI18n } from './feeI18n' +import { messages as roomFeeImportMessages } from '../views/fee/roomFeeImportLang' Vue.use(VueI18n) @@ -293,6 +294,7 @@ const messages = { ...communityI18n.en, ...workI18n.en, ...feeI18n.en, + ...roomFeeImportMessages.en, }, zh: { ...loginMessages.zh, @@ -432,6 +434,7 @@ const messages = { ...communityI18n.zh, ...workI18n.zh, ...feeI18n.zh, + ...roomFeeImportMessages.zh, } } diff --git a/src/router/feeRouter.js b/src/router/feeRouter.js index 8243de3..f0556dc 100644 --- a/src/router/feeRouter.js +++ b/src/router/feeRouter.js @@ -60,6 +60,11 @@ export default [ component: () => import('@/views/fee/roomFeeImportList.vue') }, { + path: '/views/fee/roomFeeImportDetail', + name: '/views/fee/roomFeeImportDetail', + component: () => import('@/views/fee/roomFeeImportDetail.vue') + }, + { path: '/views/fee/shareReadingFee', name: '/views/fee/shareReadingFee', component: () => import('@/views/fee/shareReadingFeeList.vue') diff --git a/src/views/fee/roomFeeImportDetail.md b/src/views/fee/roomFeeImportDetail.md new file mode 100644 index 0000000..b1f5048 --- /dev/null +++ b/src/views/fee/roomFeeImportDetail.md @@ -0,0 +1,212 @@ +```html +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
{{detail.floorNum}}{{detail.unitNum}}{{detail.roomNum}}{{detail.feeName}}{{detail.startTime}}{{detail.endTime}}{{detail.amount}}{{detail.remark}} + + + + + + +
+
    +
    + + +
    +
    +
    +
    +
    +``` +```js +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + roomFeeImportDetailInfo: { + importFeeDetails: [], + total: 0, + records: 1, + moreCondition: false, + conditions: { + floorNum: '', + unitNum: '', + roomNum: '', + importFeeId: '' + } + } + }, + _initMethod: function () { + $that.roomFeeImportDetailInfo.conditions.importFeeId = vc.getParam('importFeeId'); + $that._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + vc.on('pagination', 'page_event', function (_currentPage) { + vc.component._listImportFeeDetails(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listImportFeeDetails: function (_page, _rows) { + vc.component.roomFeeImportDetailInfo.conditions.page = _page; + vc.component.roomFeeImportDetailInfo.conditions.row = _rows; + vc.component.roomFeeImportDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; + var param = { + params: vc.component.roomFeeImportDetailInfo.conditions + }; + //发送get请求 + vc.http.apiGet('/importFee/queryImportFeeDetail', + param, + function (json, res) { + var _roomFeeImportDetailInfo = JSON.parse(json); + vc.component.roomFeeImportDetailInfo.total = _roomFeeImportDetailInfo.total; + vc.component.roomFeeImportDetailInfo.records = _roomFeeImportDetailInfo.records; + vc.component.roomFeeImportDetailInfo.importFeeDetails = _roomFeeImportDetailInfo.data; + vc.emit('pagination', 'init', { + total: vc.component.roomFeeImportDetailInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _openBillDetail: function () { + }, + _queryFeeDetailMethod: function () { + vc.component._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _moreCondition: function () { + if (vc.component.roomFeeImportDetailInfo.moreCondition) { + vc.component.roomFeeImportDetailInfo.moreCondition = false; + } else { + vc.component.roomFeeImportDetailInfo.moreCondition = true; + } + }, + _goBack: function () { + vc.goBack(); + } + } + }); +})(window.vc); +``` \ No newline at end of file diff --git a/src/views/fee/roomFeeImportDetail.vue b/src/views/fee/roomFeeImportDetail.vue new file mode 100644 index 0000000..4a34b42 --- /dev/null +++ b/src/views/fee/roomFeeImportDetail.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/src/views/fee/roomFeeImportLang.js b/src/views/fee/roomFeeImportLang.js index 6f8b6c5..c0c55fa 100644 --- a/src/views/fee/roomFeeImportLang.js +++ b/src/views/fee/roomFeeImportLang.js @@ -54,6 +54,38 @@ export const messages = { downloadSuccess: 'Download template successfully', downloadFailed: 'Download template failed' } + }, + roomFeeImportDetail: { + search: { + title: 'Search Conditions', + floorNum: 'Please enter floor number', + unitNum: 'Please enter unit number', + roomNum: 'Please enter room number', + moreCondition: 'More', + hideCondition: 'Hide' + }, + table: { + title: 'Import Fee Details', + floorNum: 'Floor Number', + unitNum: 'Unit Number', + roomNum: 'Room Number', + feeName: 'Fee Name', + startTime: 'Start Time', + endTime: 'End Time', + amount: 'Total Amount', + remark: 'Remark', + state: 'Status' + }, + status: { + success: 'Import Success', + failed: 'Import Failed' + }, + button: { + back: 'Back' + }, + message: { + fetchError: 'Failed to fetch data' + } } }, zh: { @@ -111,6 +143,38 @@ export const messages = { downloadSuccess: '下载模板成功', downloadFailed: '下载模板失败' } + }, + roomFeeImportDetail: { + search: { + title: '查询条件', + floorNum: '请输入楼栋编号', + unitNum: '请输入单元编号', + roomNum: '请输入房屋编号', + moreCondition: '更多', + hideCondition: '隐藏' + }, + table: { + title: '导入费用详情', + floorNum: '楼栋编号', + unitNum: '单元编号', + roomNum: '房屋编号', + feeName: '费用名称', + startTime: '开始时间', + endTime: '结束时间', + amount: '总金额', + remark: '备注', + state: '状态' + }, + status: { + success: '导入成功', + failed: '导入失败' + }, + button: { + back: '返回' + }, + message: { + fetchError: '获取数据失败' + } } } } \ No newline at end of file diff --git a/src/views/fee/roomFeeImportList.vue b/src/views/fee/roomFeeImportList.vue index f14df68..948d0ad 100644 --- a/src/views/fee/roomFeeImportList.vue +++ b/src/views/fee/roomFeeImportList.vue @@ -136,7 +136,7 @@ export default { }, handleDetail(row) { this.$router.push({ - path: '/fee/roomFeeImportDetail', + path: '/views/fee/roomFeeImportDetail', query: { importFeeId: row.importFeeId } }) },