roomFeeImportDetail.md 10.4 KB
<div class=" animated fadeInRight ecommerce">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="查询条件" namespace="roomFeeImportDetail"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                                v-on:click="_moreCondition()">
                            {{roomFeeImportDetailInfo.moreCondition == true?'隐藏':'更多'}}
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入楼栋编号','roomFeeImportDetail')"
                                       v-model="roomFeeImportDetailInfo.conditions.floorNum" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入单元编号','roomFeeImportDetail')"
                                       v-model="roomFeeImportDetailInfo.conditions.unitNum" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入房屋编号','roomFeeImportDetail')"
                                       v-model="roomFeeImportDetailInfo.conditions.roomNum" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeDetailMethod()">
                                <i class="fa fa-search"></i>
                                <span><vc:i18n name="查询" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                    <!--<div class="row">
                        <div class="col-sm-4" v-if="roomFeeImportDetailInfo.moreCondition == true">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入信息ID','roomFeeImportDetail')"
                                       v-model="roomFeeImportDetailInfo.conditions.activitiesId" class=" form-control">
                            </div>
                        </div>
                    </div>-->
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="导入费用详情" namespace="roomFeeImportDetail"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">
                            <i class="fa fa-close"></i>返回
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                        <tr>
                            <th class="text-center">
                                <span><vc:i18n name="楼栋编号" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="单元编号" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="房屋编号" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="费用名称" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="开始时间" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="结束时间" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="总金额" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="备注" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="状态" namespace="roomFeeImportDetail"></vc:i18n></span>
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="detail in roomFeeImportDetailInfo.importFeeDetails">
                            <td class="text-center">{{detail.floorNum}}</td>
                            <td class="text-center">{{detail.unitNum}}</td>
                            <td class="text-center">{{detail.roomNum}}</td>
                            <td class="text-center">{{detail.feeName}}</td>
                            <td class="text-center">{{detail.startTime}}</td>
                            <td class="text-center">{{detail.endTime}}</td>
                            <td class="text-center">{{detail.amount}}</td>
                            <td class="text-center">{{detail.remark}}</td>
                            <td class="text-center">
                                <span class="badge badge-success" v-if="detail.state == '1000'">
                                    <span><vc:i18n name="导入成功" namespace="roomFeeImportDetail"></vc:i18n></span>
                                </span>
                                <span class="badge badge-danger" v-else>
                                    <span><vc:i18n name="导入失败" namespace="roomFeeImportDetail"></vc:i18n></span>
                                </span>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="9">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
</div>
/**
 入驻小区
 **/
(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);