| New file |
| | |
| | | # 合同管理分成信息接口文档 |
| | | |
| | | ## 1. 接口概述 |
| | | |
| | | 本接口集用于管理合同管理分成信息(适配 contract_management_share 表),包含保存、修改、分页查询、单条查询(按ID/合同ID)等核心能力,满足合同管理分成数据的全生命周期操作。 |
| | | |
| | | ## 2. 接口公共信息 |
| | | |
| | | ### 2.1 基础信息 |
| | | | 项 | 值 | |
| | | |---|---| |
| | | | 接口基础路径 | `/app/contractManagementShare` | |
| | | | 请求格式 | JSON(POST请求)/ Query String(GET请求) | |
| | | | 响应格式 | JSON | |
| | | | 服务部署地址 | `http://fee-service` | |
| | | |
| | | ### 2.2 统一响应格式 |
| | | ```json |
| | | { |
| | | "code": "响应码", |
| | | "msg": "响应消息", |
| | | "count": "影响行数(增删改接口)", |
| | | "page": "当前页码(分页接口)", |
| | | "row": "每页条数(分页接口)", |
| | | "total": "总记录数(分页接口)", |
| | | "data": "业务数据(查询接口)" |
| | | } |
| | | ``` |
| | | |
| | | ### 2.3 响应码说明 |
| | | | 响应码 | 说明 | 备注 | |
| | | |--------|------|------| |
| | | | 0 | 操作成功 | 正常业务响应 | |
| | | | 1 | 系统异常 | 系统内部错误 | |
| | | | 2 | 参数错误 | 必填参数缺失或格式错误 | |
| | | | 3 | 数据不存在 | 查询的记录不存在 | |
| | | | 4 | 数据已存在 | 重复数据冲突 | |
| | | | 5 | 业务逻辑错误 | 业务规则校验失败 | |
| | | |
| | | ## 3. 数据库表结构 |
| | | |
| | | contract_management_share 表结构 |
| | | | 字段名 | 类型 | 长度 | 是否为空 | 默认值 | 说明 | |
| | | |--------|------|------|----------|--------|------| |
| | | | id | bigint | 20 | NO | AUTO_INCREMENT | 主键ID | |
| | | | contract_id | varchar | 50 | NO | | 合同ID(业务唯一标识) | |
| | | | management_ratio | decimal(10,4) | | YES | NULL | 管理费率(如0.05表示5%) | |
| | | | our_company_amount | decimal(18,2) | | YES | NULL | 我方金额(元) | |
| | | | our_committee_share | decimal(18,2) | | YES | NULL | 我方佣金分成(元) | |
| | | | our_company_receivable | decimal(18,2) | | YES | NULL | 我方应收金额(元) | |
| | | | create_time | datetime | | NO | CURRENT_TIMESTAMP | 创建时间 | |
| | | | update_time | datetime | | NO | CURRENT_TIMESTAMP | 更新时间 | |
| | | | create_user | varchar | 50 | YES | NULL | 创建人 | |
| | | | update_user | varchar | 50 | YES | NULL | 更新人 | |
| | | | remark | varchar | 500 | YES | NULL | 备注 | |
| | | |
| | | ## 4. 接口详情 |
| | | |
| | | ### 4.1 保存合同管理分成信息 |
| | | #### 接口信息 |
| | | - 接口地址:`/saveContractManagementShare` |
| | | - 请求方法:POST |
| | | - 功能描述:新增合同管理分成信息 |
| | | |
| | | #### 请求参数 |
| | | | 参数名 | 类型 | 必填 | 说明 | 验证规则 | |
| | | |--------|------|------|------|----------| |
| | | | contractId | String | 是 | 合同ID | 长度1-50字符,不能为空 | |
| | | | managementRatio | String/Number | 否 | 管理费率 | 0-1之间的小数,如0.05 | |
| | | | ourCompanyAmount | String/Number | 否 | 我方金额 | 正数,保留两位小数 | |
| | | | ourCommitteeShare | String/Number | 否 | 我方佣金分成 | 正数,保留两位小数 | |
| | | | ourCompanyReceivable | String/Number | 否 | 我方应收金额 | 正数,保留两位小数 | |
| | | | createUser | String | 否 | 创建人 | 长度1-50字符 | |
| | | | remark | String | 否 | 备注 | 长度1-500字符 | |
| | | |
| | | #### 响应示例 |
| | | 成功响应: |
| | | ```json |
| | | { |
| | | "code": 0, |
| | | "msg": "保存合同管理分成信息成功", |
| | | "count": 1 |
| | | } |
| | | ``` |
| | | |
| | | 错误响应: |
| | | ```json |
| | | { |
| | | "code": 2, |
| | | "msg": "参数错误:contractId不能为空", |
| | | "count": 0 |
| | | } |
| | | ``` |
| | | |
| | | ### 4.2 修改合同管理分成信息 |
| | | #### 接口信息 |
| | | - 接口地址:`/updateContractManagementShare` |
| | | - 请求方法:POST |
| | | - 功能描述:修改已存在的合同管理分成信息 |
| | | |
| | | #### 请求参数 |
| | | | 参数名 | 类型 | 必填 | 说明 | 验证规则 | |
| | | |--------|------|------|------|----------| |
| | | | id | Long | 是 | 主键ID | 大于0的整数 | |
| | | | contractId | String | 是 | 合同ID | 长度1-50字符 | |
| | | | managementRatio | String/Number | 否 | 管理费率 | 0-1之间的小数 | |
| | | | ourCompanyAmount | String/Number | 否 | 我方金额 | 正数,保留两位小数 | |
| | | | ourCommitteeShare | String/Number | 否 | 我方佣金分成 | 正数,保留两位小数 | |
| | | | ourCompanyReceivable | String/Number | 否 | 我方应收金额 | 正数,保留两位小数 | |
| | | | updateUser | String | 否 | 更新人 | 长度1-50字符 | |
| | | | remark | String | 否 | 备注 | 长度1-500字符 | |
| | | |
| | | #### 响应示例 |
| | | ```json |
| | | { |
| | | "code": 0, |
| | | "msg": "修改合同管理分成信息成功", |
| | | "count": 1 |
| | | } |
| | | ``` |
| | | |
| | | ### 4.3 分页查询合同管理分成信息列表 |
| | | #### 接口信息 |
| | | - 接口地址:`/queryContractManagementShare` |
| | | - 请求方法:GET |
| | | - 功能描述:多条件分页查询合同管理分成信息列表 |
| | | |
| | | #### 请求参数 |
| | | | 参数名 | 类型 | 必填 | 说明 | 查询方式 | |
| | | |--------|------|------|------|----------| |
| | | | id | Long | 否 | 主键ID | 精确匹配 | |
| | | | contractId | String | 否 | 合同ID | 精确匹配 | |
| | | | managementRatio | String | 否 | 管理费率 | 范围查询 | |
| | | | ourCompanyAmount | String | 否 | 我方金额 | 范围查询 | |
| | | | ourCommitteeShare | String | 否 | 我方佣金分成 | 范围查询 | |
| | | | ourCompanyReceivable | String | 否 | 我方应收金额 | 范围查询 | |
| | | | createUser | String | 否 | 创建人 | 模糊查询 | |
| | | | startCreateTime | String | 否 | 开始时间 | yyyy-MM-dd HH:mm:ss | |
| | | | endCreateTime | String | 否 | 结束时间 | yyyy-MM-dd HH:mm:ss | |
| | | | page | Integer | 否 | 页码 | 默认1,从1开始 | |
| | | | row | Integer | 否 | 每页条数 | 默认10,最大100 | |
| | | |
| | | #### 响应示例 |
| | | ```json |
| | | { |
| | | "code": 0, |
| | | "msg": "查询合同管理分成信息成功", |
| | | "page": 1, |
| | | "row": 10, |
| | | "total": 1, |
| | | "data": [ |
| | | { |
| | | "id": 1001, |
| | | "contractId": "CON20251224001", |
| | | "managementRatio": "0.06", |
| | | "ourCompanyAmount": "12000.00", |
| | | "ourCommitteeShare": "720.00", |
| | | "ourCompanyReceivable": "11280.00", |
| | | "createTime": "2025-01-12 10:30:00", |
| | | "updateTime": "2025-01-12 11:30:00", |
| | | "createUser": "张三", |
| | | "updateUser": "李四", |
| | | "remark": "季度分成" |
| | | } |
| | | ] |
| | | } |
| | | ``` |
| | | |
| | | ### 4.4 根据ID查询单条合同管理分成信息 |
| | | #### 接口信息 |
| | | - 接口地址:`/getContractManagementShareById` |
| | | - 请求方法:GET |
| | | - 功能描述:根据主键ID查询单条合同管理分成信息 |
| | | |
| | | #### 请求参数 |
| | | | 参数名 | 类型 | 必填 | 说明 | |
| | | |--------|------|------|------| |
| | | | id | Long | 是 | 主键ID | |
| | | |
| | | #### 响应示例 |
| | | ```json |
| | | { |
| | | "code": 0, |
| | | "msg": "查询合同管理分成信息成功", |
| | | "data": { |
| | | "id": 1001, |
| | | "contractId": "CON20251224001", |
| | | "managementRatio": "0.06", |
| | | "ourCompanyAmount": "12000.00", |
| | | "ourCommitteeShare": "720.00", |
| | | "ourCompanyReceivable": "11280.00", |
| | | "createTime": "2025-01-12 10:30:00", |
| | | "updateTime": "2025-01-12 11:30:00", |
| | | "createUser": "张三", |
| | | "updateUser": "李四", |
| | | "remark": "季度分成" |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | ### 4.5 根据合同ID查询合同管理分成信息 |
| | | #### 接口信息 |
| | | - 接口地址:`/getContractManagementShareByContractId` |
| | | - 请求方法:GET |
| | | - 功能描述:根据合同ID查询关联的所有分成信息 |
| | | |
| | | #### 请求参数 |
| | | | 参数名 | 类型 | 必填 | 说明 | |
| | | |--------|------|------|------| |
| | | | contractId | String | 是 | 合同ID | |
| | | |
| | | #### 响应示例 |
| | | ```json |
| | | { |
| | | "code": 0, |
| | | "msg": "查询合同管理分成信息成功", |
| | | "data": [ |
| | | { |
| | | "id": 1001, |
| | | "contractId": "CON20251224001", |
| | | "managementRatio": "0.06", |
| | | "ourCompanyAmount": "12000.00", |
| | | "ourCommitteeShare": "720.00", |
| | | "ourCompanyReceivable": "11280.00", |
| | | "createTime": "2025-01-12 10:30:00", |
| | | "updateTime": "2025-01-12 11:30:00", |
| | | "createUser": "张三", |
| | | "updateUser": "李四", |
| | | "remark": "季度分成" |
| | | } |
| | | ] |
| | | } |
| | | ``` |
| New file |
| | |
| | | <!-- 新增合同管理分成信息弹窗 --> |
| | | <div class="modal fade" id="addContractManagementShareModal" tabindex="-1" role="dialog" aria-labelledby="addContractManagementShareModalLabel"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | <h4 class="modal-title" id="addContractManagementShareModalLabel">新增合同管理分成信息</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <form class="form-horizontal"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">合同ID</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.contractId" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">管理费率</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="addContractManagementShareInfo.managementRatio" placeholder="如0.05表示5%" step="0.0001" min="0" max="1"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方金额(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="addContractManagementShareInfo.ourCompanyAmount" placeholder="请输入我方金额" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方佣金分成(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="addContractManagementShareInfo.ourCommitteeShare" placeholder="请输入我方佣金分成" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方应收金额(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="addContractManagementShareInfo.ourCompanyReceivable" placeholder="请输入我方应收金额" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">创建人</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.createUser" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注</label> |
| | | <div class="col-sm-9"> |
| | | <textarea class="form-control" v-model="addContractManagementShareInfo.remark" placeholder="请输入备注" rows="3"></textarea> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="_saveContractManagementShare()">保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 添加合同管理分成信息 |
| | | **/ |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | addContractManagementShareInfo: { |
| | | contractId: '', |
| | | managementRatio: '', |
| | | ourCompanyAmount: '', |
| | | ourCommitteeShare: '', |
| | | ourCompanyReceivable: '', |
| | | createUser: '', |
| | | remark: '' |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('addContractManagementShare', 'openAddContractManagementShareModal', function(_params) { |
| | | $('#addContractManagementShareModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods: { |
| | | addContractManagementShareValidate: function() { |
| | | return vc.validate.validate({ |
| | | addContractManagementShareInfo: vc.component.addContractManagementShareInfo |
| | | }, { |
| | | 'addContractManagementShareInfo.contractId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "合同ID不能为空" |
| | | }, { |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "合同ID最多50个字符" |
| | | }], |
| | | 'addContractManagementShareInfo.managementRatio': [{ |
| | | limit: "num", |
| | | param: "0,1", |
| | | errInfo: "管理费率必须在0-1之间" |
| | | }], |
| | | 'addContractManagementShareInfo.ourCompanyAmount': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方金额格式错误" |
| | | }], |
| | | 'addContractManagementShareInfo.ourCommitteeShare': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方佣金分成格式错误" |
| | | }], |
| | | 'addContractManagementShareInfo.ourCompanyReceivable': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方应收金额格式错误" |
| | | }], |
| | | 'addContractManagementShareInfo.createUser': [{ |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "创建人最多50个字符" |
| | | }], |
| | | 'addContractManagementShareInfo.remark': [{ |
| | | limit: "maxLength", |
| | | param: "500", |
| | | errInfo: "备注最多500个字符" |
| | | }] |
| | | }); |
| | | }, |
| | | saveContractManagementShare: function() { |
| | | if (!vc.component.addContractManagementShareValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | vc.http.apiPost('/contractManagementShare/saveContractManagementShare', JSON.stringify(vc.component.addContractManagementShareInfo), { |
| | | emulateJSON: true |
| | | }, function(json, res) { |
| | | var saveJson = JSON.parse(json); |
| | | if (saveJson.code == 0) { |
| | | // 保存成功后关闭模态框并刷新列表 |
| | | $('#addContractManagementShareModel').modal('hide'); |
| | | vc.toast("保存成功"); |
| | | vc.emit('contractManagementShare', 'listContractManagementShare', {}); |
| | | vc.component.clearAddContractManagementShareInfo(); |
| | | return; |
| | | } |
| | | vc.toast(saveJson.msg); |
| | | }, function(errInfo, error) { |
| | | console.log('请求失败处理', errInfo, error); |
| | | vc.toast(errInfo); |
| | | }); |
| | | }, |
| | | clearAddContractManagementShareInfo: function() { |
| | | vc.component.addContractManagementShareInfo = { |
| | | contractId: '', |
| | | managementRatio: '', |
| | | ourCompanyAmount: '', |
| | | ourCommitteeShare: '', |
| | | ourCompanyReceivable: '', |
| | | createUser: '', |
| | | remark: '' |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5><strong>合同管理分成信息</strong></h5> |
| | | <div class="ibox-tools"> |
| | | <button type="button" class="btn btn-primary" vc:on="click,_moreCondition"> |
| | | <i class="fa fa-search"></i> 高级查询 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <form class="form-horizontal" vc:on="submit,_queryContractManagementShareMethod"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">合同ID</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.contractId" placeholder="合同ID"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">管理费率</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.managementRatio" placeholder="管理费率"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.ourCompanyAmount" placeholder="我方金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">创建人</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.createUser" placeholder="创建人"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row" v-show="contractManagementShareInfo.moreCondition"> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方佣金分成</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.ourCommitteeShare" placeholder="我方佣金分成"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方应收金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="contractManagementShareInfo.ourCompanyReceivable" placeholder="我方应收金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">开始时间</label> |
| | | <div class="col-sm-8"> |
| | | <input type="datetime-local" class="form-control" v-model="contractManagementShareInfo.startCreateTime" placeholder="开始时间"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">结束时间</label> |
| | | <div class="col-sm-8"> |
| | | <input type="datetime-local" class="form-control" v-model="contractManagementShareInfo.endCreateTime" placeholder="结束时间"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-4 col-sm-offset-4"> |
| | | <button class="btn btn-w-m btn-primary" type="submit"><i class="fa fa-search"></i>查询</button> |
| | | <button class="btn btn-w-m btn-warning" type="button" vc:on="click,_resetContractManagementShareMethod"><i class="fa fa-trash"></i>清空</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="table-responsive"> |
| | | <table class="table table-striped table-bordered table-hover dataTables-example"> |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">序号</th> |
| | | <th class="text-center">合同ID</th> |
| | | <th class="text-center">管理费率</th> |
| | | <th class="text-center">我方金额(元)</th> |
| | | <th class="text-center">我方佣金分成(元)</th> |
| | | <th class="text-center">我方应收金额(元)</th> |
| | | <th class="text-center">创建时间</th> |
| | | <th class="text-center">更新时间</th> |
| | | <th class="text-center">创建人</th> |
| | | <th class="text-center">更新人</th> |
| | | <th class="text-center">备注</th> |
| | | <th class="text-center">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="(item, index) in contractManagementShareInfo.contractShares" :key="index"> |
| | | <td class="text-center">{{index + 1}}</td> |
| | | <td class="text-center">{{item.contractId}}</td> |
| | | <td class="text-center">{{item.managementRatio}}</td> |
| | | <td class="text-center">{{item.ourCompanyAmount}}</td> |
| | | <td class="text-center">{{item.ourCommitteeShare}}</td> |
| | | <td class="text-center">{{item.ourCompanyReceivable}}</td> |
| | | <td class="text-center">{{item.createTime}}</td> |
| | | <td class="text-center">{{item.updateTime}}</td> |
| | | <td class="text-center">{{item.createUser}}</td> |
| | | <td class="text-center">{{item.updateUser}}</td> |
| | | <td class="text-center">{{item.remark}}</td> |
| | | <td class="text-center"> |
| | | <button class="btn btn-primary btn-xs" vc:on="click,openEditContractManagementShareModal(item)">修改</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <vc:pagination listener="contractManagementShare"></vc:pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 添加合同管理分成信息模态框 --> |
| | | <div id="addContractManagementShareModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| | | <h4 class="modal-title">添加合同管理分成信息</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <form class="form-horizontal"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">合同ID<span class="text-danger">*</span></label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.contractId" placeholder="请输入合同ID"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">管理费率</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.managementRatio" placeholder="请输入管理费率(如0.05)"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.ourCompanyAmount" placeholder="请输入我方金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方佣金分成</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.ourCommitteeShare" placeholder="请输入我方佣金分成"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方应收金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.ourCompanyReceivable" placeholder="请输入我方应收金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">创建人</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="addContractManagementShareInfo.createUser" placeholder="请输入创建人"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">备注</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" v-model="addContractManagementShareInfo.remark" rows="3" placeholder="请输入备注"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" vc:on="click,saveContractManagementShare">保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 编辑合同管理分成信息模态框 --> |
| | | <div id="editContractManagementShareModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| | | <h4 class="modal-title">编辑合同管理分成信息</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <form class="form-horizontal"> |
| | | <input type="hidden" v-model="editContractManagementShareInfo.id"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">合同ID<span class="text-danger">*</span></label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.contractId" placeholder="请输入合同ID"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">管理费率</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.managementRatio" placeholder="请输入管理费率(如0.05)"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.ourCompanyAmount" placeholder="请输入我方金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方佣金分成</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.ourCommitteeShare" placeholder="请输入我方佣金分成"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">我方应收金额</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.ourCompanyReceivable" placeholder="请输入我方应收金额"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">更新人</label> |
| | | <div class="col-sm-8"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.updateUser" placeholder="请输入更新人"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">备注</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" v-model="editContractManagementShareInfo.remark" rows="3" placeholder="请输入备注"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" vc:on="click,editContractManagementShare">更新</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 合同管理分成信息 |
| | | **/ |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | contractManagementShareInfo: { |
| | | contractShares: [], |
| | | total: 0, |
| | | records: 1, |
| | | moreCondition: false, |
| | | contractId: '', |
| | | managementRatio: '', |
| | | ourCompanyAmount: '', |
| | | ourCommitteeShare: '', |
| | | ourCompanyReceivable: '', |
| | | createUser: '', |
| | | startCreateTime: '', |
| | | endCreateTime: '', |
| | | page: 1, |
| | | limit: 10 |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | $that._listContractManagementShares(); |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('contractManagementShare', 'listContractManagementShare', function(_param) { |
| | | $that._listContractManagementShares(); |
| | | }); |
| | | vc.on('pagination', 'page_event', function(_currentPage) { |
| | | $that.contractManagementShareInfo.page = _currentPage; |
| | | $that._listContractManagementShares(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | _listContractManagementShares: function(_page, _limit) { |
| | | if(!!_page) { |
| | | $that.contractManagementShareInfo.page = _page; |
| | | } |
| | | if(!!_limit) { |
| | | $that.contractManagementShareInfo.limit = _limit; |
| | | } |
| | | |
| | | var param = { |
| | | params: { |
| | | page: $that.contractManagementShareInfo.page, |
| | | limit: $that.contractManagementShareInfo.limit, |
| | | contractId: $that.contractManagementShareInfo.contractId, |
| | | managementRatio: $that.contractManagementShareInfo.managementRatio, |
| | | ourCompanyAmount: $that.contractManagementShareInfo.ourCompanyAmount, |
| | | ourCommitteeShare: $that.contractManagementShareInfo.ourCommitteeShare, |
| | | ourCompanyReceivable: $that.contractManagementShareInfo.ourCompanyReceivable, |
| | | createUser: $that.contractManagementShareInfo.createUser, |
| | | startCreateTime: $that.contractManagementShareInfo.startCreateTime, |
| | | endCreateTime: $that.contractManagementShareInfo.endCreateTime |
| | | } |
| | | }; |
| | | |
| | | // 发送GET请求查询合同管理分成信息 |
| | | vc.http.apiGet('/contractManagementShare/queryContractManagementShare', |
| | | param, |
| | | function(json, res) { |
| | | var _contractManagementShareInfo = JSON.parse(json); |
| | | $that.contractManagementShareInfo.total = _contractManagementShareInfo.total; |
| | | $that.contractManagementShareInfo.records = _contractManagementShareInfo.records; |
| | | $that.contractManagementShareInfo.contractShares = _contractManagementShareInfo.data; |
| | | vc.emit('pagination', 'init', { |
| | | total: _contractManagementShareInfo.records, |
| | | current: $that.contractManagementShareInfo.page, |
| | | pageSize: $that.contractManagementShareInfo.limit |
| | | }); |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理', errInfo, error); |
| | | vc.toast(errInfo); |
| | | }); |
| | | }, |
| | | _queryContractManagementShareMethod: function() { |
| | | $that._listContractManagementShares(1, $that.contractManagementShareInfo.limit); |
| | | }, |
| | | _resetContractManagementShareMethod: function() { |
| | | vc.resetObject($that.contractManagementShareInfo, { |
| | | contractShares: $that.contractManagementShareInfo.contractShares, |
| | | total: $that.contractManagementShareInfo.total, |
| | | records: $that.contractManagementShareInfo.records, |
| | | page: 1, |
| | | limit: 10 |
| | | }); |
| | | $that._listContractManagementShares(1, $that.contractManagementShareInfo.limit); |
| | | }, |
| | | _moreCondition: function() { |
| | | $that.contractManagementShareInfo.moreCondition = !$that.contractManagementShareInfo.moreCondition; |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <!-- 修改合同管理分成信息弹窗 --> |
| | | <div class="modal fade" id="editContractManagementShareModal" tabindex="-1" role="dialog" aria-labelledby="editContractManagementShareModalLabel"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | <h4 class="modal-title" id="editContractManagementShareModalLabel">修改合同管理分成信息</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <form class="form-horizontal"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">分成ID</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.id" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">合同ID</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.contractId" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">管理费率</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="editContractManagementShareInfo.managementRatio" placeholder="如0.05表示5%" step="0.0001" min="0" max="1"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方金额(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="editContractManagementShareInfo.ourCompanyAmount" placeholder="请输入我方金额" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方佣金分成(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="editContractManagementShareInfo.ourCommitteeShare" placeholder="请输入我方佣金分成" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">我方应收金额(元)</label> |
| | | <div class="col-sm-9"> |
| | | <input type="number" class="form-control" v-model="editContractManagementShareInfo.ourCompanyReceivable" placeholder="请输入我方应收金额" step="0.01" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">更新人</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" class="form-control" v-model="editContractManagementShareInfo.updateUser" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注</label> |
| | | <div class="col-sm-9"> |
| | | <textarea class="form-control" v-model="editContractManagementShareInfo.remark" placeholder="请输入备注" rows="3"></textarea> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="_saveEditContractManagementShare()">保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 编辑合同管理分成信息 |
| | | **/ |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | editContractManagementShareInfo: { |
| | | id: '', |
| | | contractId: '', |
| | | managementRatio: '', |
| | | ourCompanyAmount: '', |
| | | ourCommitteeShare: '', |
| | | ourCompanyReceivable: '', |
| | | updateUser: '', |
| | | remark: '' |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('editContractManagementShare', 'openEditContractManagementShareModal', function(_params) { |
| | | vc.component.editContractManagementShareInfo = _params; |
| | | $('#editContractManagementShareModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods: { |
| | | editContractManagementShareValidate: function() { |
| | | return vc.validate.validate({ |
| | | editContractManagementShareInfo: vc.component.editContractManagementShareInfo |
| | | }, { |
| | | 'editContractManagementShareInfo.id': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "ID不能为空" |
| | | }], |
| | | 'editContractManagementShareInfo.contractId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "合同ID不能为空" |
| | | }, { |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "合同ID最多50个字符" |
| | | }], |
| | | 'editContractManagementShareInfo.managementRatio': [{ |
| | | limit: "num", |
| | | param: "0,1", |
| | | errInfo: "管理费率必须在0-1之间" |
| | | }], |
| | | 'editContractManagementShareInfo.ourCompanyAmount': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方金额格式错误" |
| | | }], |
| | | 'editContractManagementShareInfo.ourCommitteeShare': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方佣金分成格式错误" |
| | | }], |
| | | 'editContractManagementShareInfo.ourCompanyReceivable': [{ |
| | | limit: "money", |
| | | param: "", |
| | | errInfo: "我方应收金额格式错误" |
| | | }], |
| | | 'editContractManagementShareInfo.updateUser': [{ |
| | | limit: "maxLength", |
| | | param: "50", |
| | | errInfo: "更新人最多50个字符" |
| | | }], |
| | | 'editContractManagementShareInfo.remark': [{ |
| | | limit: "maxLength", |
| | | param: "500", |
| | | errInfo: "备注最多500个字符" |
| | | }] |
| | | }); |
| | | }, |
| | | editContractManagementShare: function() { |
| | | if (!vc.component.editContractManagementShareValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | vc.http.apiPost('/contractManagementShare/updateContractManagementShare', JSON.stringify(vc.component.editContractManagementShareInfo), { |
| | | emulateJSON: true |
| | | }, function(json, res) { |
| | | var updateJson = JSON.parse(json); |
| | | if (updateJson.code == 0) { |
| | | // 更新成功后关闭模态框并刷新列表 |
| | | $('#editContractManagementShareModel').modal('hide'); |
| | | vc.toast("更新成功"); |
| | | vc.emit('contractManagementShare', 'listContractManagementShare', {}); |
| | | return; |
| | | } |
| | | vc.toast(updateJson.msg); |
| | | }, function(errInfo, error) { |
| | | console.log('请求失败处理', errInfo, error); |
| | | vc.toast(errInfo); |
| | | }); |
| | | }, |
| | | clearEditContractManagementShareInfo: function() { |
| | | vc.component.editContractManagementShareInfo = { |
| | | id: '', |
| | | contractId: '', |
| | | managementRatio: '', |
| | | ourCompanyAmount: '', |
| | | ourCommitteeShare: '', |
| | | ourCompanyReceivable: '', |
| | | updateUser: '', |
| | | remark: '' |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | |
| | | data:{ |
| | | deteteDownloadTempFileInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _previouslyFocusedElement: null |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | |
| | | _initEvent:function(){ |
| | | vc.on('deteteDownloadTempFile','openDeteteDownloadTempFileModal',function(_params){ |
| | | |
| | | // 记录当前焦点元素 |
| | | vc.component._previouslyFocusedElement = document.activeElement; |
| | | |
| | | vc.component.deteteDownloadTempFileInfo = _params; |
| | | $('#deteteDownloadTempFileModel').modal('show'); |
| | | |
| | |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | $('#deteteDownloadTempFileModel').modal('hide'); |
| | | // 恢复焦点 |
| | | if (vc.component._previouslyFocusedElement) { |
| | | vc.component._previouslyFocusedElement.focus(); |
| | | } |
| | | vc.emit('downloadTempFile', 'listFile',{}); |
| | | return ; |
| | | } |
| | |
| | | }, |
| | | closeDeteteDownloadTempFileModel:function(){ |
| | | $('#deteteDownloadTempFileModel').modal('hide'); |
| | | // 恢复焦点 |
| | | if (vc.component._previouslyFocusedElement) { |
| | | vc.component._previouslyFocusedElement.focus(); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | // param.append('objType', $that.importOldRoomFeeInfo.objType); |
| | | param.append('importAdapt', "importPropertyWhiteListfFlow"); |
| | | |
| | | vc.http.upload( |
| | | 'assetImport', |
| | | 'importData', |
| | | param, { |
| | | emulateJSON: true, |
| | | //添加请求头 |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟响应 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let mockResponse = { |
| | | code: 0, |
| | | msg: '白单流水导入成功', |
| | | data: { |
| | | logId: Date.now().toString(), |
| | | importCount: Math.floor(Math.random() * 10) + 1 |
| | | } |
| | | }; |
| | | let _json = mockResponse; |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | vc.toast("处理成功"); |
| | |
| | | return; |
| | | } |
| | | vc.toast(_json.msg, 10000); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | vc.toast(errInfo, 10000); |
| | | }); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | vc.http.upload( |
| | | 'assetImport', |
| | | 'importData', |
| | | param, { |
| | | emulateJSON: true, |
| | | //添加请求头 |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | let _json = JSON.parse(json); |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | vc.toast("处理成功"); |
| | | $('#importOldRoomFeeModel').modal('hide'); |
| | | vc.jumpToPage('/#/pages/property/assetImportLogDetail?logId=' + _json.data.logId + '&logType=importOldRoomFee'); |
| | | return; |
| | | } |
| | | vc.toast(_json.msg, 10000); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | vc.toast(errInfo, 10000); |
| | | }); |
| | | } |
| | | }, |
| | | clearAddFeeConfigInfo: function() { |
| | | var _feeTypeCds = $that.importOldRoomFeeInfo.feeTypeCds; |
| | |
| | | methods: { |
| | | importOwnerRoomValidate() { |
| | | return vc.validate.validate({ |
| | | importOwnerRoomInfo: vc.component.importOwnerRoomInfo |
| | | importOwnerRoomInfo: $that.importOwnerRoomInfo |
| | | }, { |
| | | 'importOwnerRoomInfo.communityId': [{ |
| | | limit: "required", |
| | |
| | | }); |
| | | }, |
| | | _importData: function() { |
| | | if (!vc.component.importOwnerRoomValidate()) { |
| | | if (!$that.importOwnerRoomValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | // 导入数据 |
| | | if (!vc.component.checkOwnerFileType(vc.component.importOwnerRoomInfo.excelTemplate.name.split('.')[1])) { |
| | | if (!$that.checkOwnerFileType($that.importOwnerRoomInfo.excelTemplate.name.split('.')[1])) { |
| | | vc.toast('不是有效的Excel格式'); |
| | | return; |
| | | } |
| | | if (!vc.component.checkOwnerFileSize(vc.component.importOwnerRoomInfo.excelTemplate.size)) { |
| | | if (!$that.checkOwnerFileSize($that.importOwnerRoomInfo.excelTemplate.size)) { |
| | | vc.toast('Excel文件大小不能超过20M'); |
| | | return; |
| | | } |
| | | var param = new FormData(); |
| | | param.append("uploadFile", vc.component.importOwnerRoomInfo.excelTemplate); |
| | | param.append('communityId', vc.component.importOwnerRoomInfo.communityId); |
| | | param.append("uploadFile", $that.importOwnerRoomInfo.excelTemplate); |
| | | param.append('communityId', $that.importOwnerRoomInfo.communityId); |
| | | param.append('importAdapt', "importRoomOwner"); |
| | | |
| | | // param.append('feeTypeCd', vc.component.importRoomFeeInfo.feeTypeCd); |
| | |
| | | }); |
| | | }, |
| | | clearAddFeeConfigInfo: function() { |
| | | // var _feeTypeCds = vc.component.importRoomFeeInfo.feeTypeCds; |
| | | vc.component.importOwnerRoomInfo = { |
| | | // var _feeTypeCds = $that.importRoomFeeInfo.feeTypeCds; |
| | | $that.importOwnerRoomInfo = { |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | excelTemplate: '' |
| | | // feeTypeCd: '', |
| | | // feeTypeCds: [], |
| | | // objType: '3333' |
| | | }; |
| | | // vc.component.importRoomFeeInfo.feeTypeCds = _feeTypeCds; |
| | | // $that.importRoomFeeInfo.feeTypeCds = _feeTypeCds; |
| | | }, |
| | | _changeFeeTypeCd: function(_feeTypeCd) {}, |
| | | getExcelTemplate: function(e) { |
| | | //console.log("getExcelTemplate 开始调用") |
| | | vc.component.importOwnerRoomInfo.excelTemplate = e.target.files[0]; |
| | | $that.importOwnerRoomInfo.excelTemplate = e.target.files[0]; |
| | | }, |
| | | checkOwnerFileType: function(fileType) { |
| | | const acceptTypes = ['xlsx', 'xls']; |
| | |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | })(window.vc); |
| | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | var $that = this; |
| | | vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) { |
| | | $that.reportFeeDetailContractInfo.feeTypeCds = _data |
| | | }); |
| | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | var $that = this; |
| | | vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) { |
| | | $that.reportFeeDetailOwnerInfo.feeTypeCds = _data |
| | | }); |
| | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | var $that = this; |
| | | vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) { |
| | | $that.reportFeeDetailRoomInfo.feeTypeCds = _data |
| | | }); |
| | |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>年份:</label> |
| | | <input type="text" placeholder="yyyy/mm/日" |
| | | v-model="contractManageInfo.conditions.year" class=" form-control yearPicker"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>小区:</label> |
| | | <select class="custom-select" v-model="contractManageInfo.conditions.communityId"> |
| | | <option selected value="">请选择小区</option> |
| | | <option :value="item.communityId" |
| | | v-for="(item,index) in contractManageInfo.communities"> |
| | | {{item.name}} |
| | | </option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>小区编码:</label> |
| | | <input type="text" placeholder="请输入" |
| | | v-model="contractManageInfo.conditions.communityCode" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>合同名称:</label> |
| | | <input type="text" :placeholder="vc.i18n('请输入合同名称','contractManage')" |
| | | v-model="contractManageInfo.conditions.contractNameLike" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>合同编号:</label> |
| | | <input type="text" :placeholder="vc.i18n('请输入合同编号','contractManage')" |
| | | v-model="contractManageInfo.conditions.contractCodeLike" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="col-sm-2"> |
| | | <div class="form-group"> |
| | | <label>合同类型:</label> |
| | | <select class="custom-select" v-model="contractManageInfo.conditions.contractType"> |
| | | <option selected value="">请选择合同类型</option> |
| | | <option :value="item.contractTypeId" |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="col-sm-12" style="margin-top: 10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryContractMethod()"> |
| | | <i class="fa fa-search"></i> |
| | | <span><vc:i18n name="查询" namespace="contractManage"></vc:i18n></span> |
| | |
| | | </div> |
| | | <vc:create path="admin/editContract"></vc:create> |
| | | <vc:create path="admin/deleteContract"></vc:create> |
| | | |
| | | <!-- 合同管理分成信息 --> |
| | | <vc:contractManagementShare></vc:contractManagementShare> |
| | | <vc:addContractManagementShare></vc:addContractManagementShare> |
| | | <vc:editContractManagementShare></vc:editContractManagementShare> |
| | | </div> |
| | |
| | | partyBLike: '', |
| | | queryStartTime: '', |
| | | queryEndTime: '', |
| | | parentContractCodeLike: '' |
| | | parentContractCodeLike: '', |
| | | year: '', |
| | | communityCode: '' |
| | | }, |
| | | contractTypes: [], |
| | | communities: [] |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | |
| | | $that.contractManageInfo.conditions.queryEndTime = _value; |
| | | });*/ |
| | | $that._listContractTypes(); |
| | | $that._listCommunities(); |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('contractManage', 'listContract', function (_param) { |
| | |
| | | }, |
| | | methods: { |
| | | _initDateInfo: function () { |
| | | // 年份选择器 |
| | | $('.yearPicker').datetimepicker({ |
| | | language: 'zh-CN', |
| | | fontAwesome: 'fa', |
| | | format: 'yyyy-mm-dd', |
| | | initTime: true, |
| | | initialDate: new Date(), |
| | | autoClose: 1, |
| | | todayBtn: true, |
| | | startView: 2, |
| | | minView: 2 |
| | | }); |
| | | $('.yearPicker').datetimepicker() |
| | | .on('changeDate', function (ev) { |
| | | var value = $(".yearPicker").val(); |
| | | vc.component.contractManageInfo.conditions.year = value; |
| | | }); |
| | | |
| | | $('.queryStartTime').datetimepicker({ |
| | | language: 'zh-CN', |
| | | fontAwesome: 'fa', |
| | |
| | | } |
| | | }); |
| | | //防止多次点击时间插件失去焦点 |
| | | document.getElementsByClassName(' form-control queryStartTime')[0].addEventListener('click', myfunc) |
| | | var inputs = document.getElementsByClassName(' form-control queryStartTime'); |
| | | if (inputs.length > 0) { |
| | | inputs[0].addEventListener('click', myfunc); |
| | | } |
| | | |
| | | function myfunc(e) { |
| | | e.currentTarget.blur(); |
| | | } |
| | | |
| | | document.getElementsByClassName(" form-control queryEndTime")[0].addEventListener('click', myfunc) |
| | | inputs = document.getElementsByClassName(" form-control queryEndTime"); |
| | | if (inputs.length > 0) { |
| | | inputs[0].addEventListener('click', myfunc); |
| | | } |
| | | |
| | | inputs = document.getElementsByClassName(" form-control yearPicker"); |
| | | if (inputs.length > 0) { |
| | | inputs[0].addEventListener('click', myfunc); |
| | | } |
| | | |
| | | function myfunc(e) { |
| | | e.currentTarget.blur(); |
| | |
| | | } |
| | | ); |
| | | }, |
| | | _listCommunities: function () { |
| | | try { |
| | | // 从localStorage获取小区列表 |
| | | var _communities = vc.getCommunitys(); |
| | | if (_communities && _communities.length > 0) { |
| | | $that.contractManageInfo.communities = _communities; |
| | | console.log('小区列表获取成功:', _communities); |
| | | } else { |
| | | // 如果没有小区列表,使用当前小区 |
| | | var _currentCommunity = vc.getCurrentCommunity(); |
| | | if (_currentCommunity) { |
| | | $that.contractManageInfo.communities = [_currentCommunity]; |
| | | console.log('使用当前小区:', _currentCommunity); |
| | | } else { |
| | | console.error('未找到小区数据'); |
| | | vc.toast('未找到小区数据'); |
| | | } |
| | | } |
| | | } catch (e) { |
| | | console.error('小区列表获取错误:', e); |
| | | vc.toast('获取小区列表失败:' + e.message); |
| | | } |
| | | }, |
| | | _openAddContractModal: function () { |
| | | vc.emit('addContract', 'openAddContractModal', {}); |
| | | }, |
| | |
| | | _openDeleteContractModel: function (_contract) { |
| | | vc.emit('deleteContract', 'openDeleteContractModal', _contract); |
| | | }, |
| | | // 打开添加合同管理分成信息模态框 |
| | | openAddContractManagementShareModal: function() { |
| | | vc.emit('addContractManagementShare', 'openAddContractManagementShareModal', {}); |
| | | }, |
| | | // 打开编辑合同管理分成信息模态框 |
| | | openEditContractManagementShareModal: function(_item) { |
| | | vc.emit('editContractManagementShare', 'openEditContractManagementShareModal', _item); |
| | | }, |
| | | // 跳转到合同管理分成信息页面 |
| | | goToContractManagementSharePage: function() { |
| | | vc.jumpToPage('/#/pages/contract/contractManagementShare'); |
| | | }, |
| | | //查询 |
| | | _queryContractMethod: function () { |
| | | vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS); |
| | |
| | | //重置 |
| | | _resetContractMethod: function () { |
| | | vc.component.contractManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | vc.component.contractManageInfo.conditions.year = ""; |
| | | vc.component.contractManageInfo.conditions.communityCode = ""; |
| | | vc.component.contractManageInfo.conditions.contractNameLike = ""; |
| | | // vc.component.contractManageInfo.conditions.contractCode = ""; |
| | | vc.component.contractManageInfo.conditions.contractType = ""; |
| | |
| | | <vc:i18n name="补打收据" namespace="contractDetail"></vc:i18n> |
| | | </a> |
| | | </li> |
| | | <li class="nav-item"> |
| | | <a class="nav-link" v-bind:class="{active:contractDetailInfo._currentTab == 'contractDetailAmount'}" |
| | | v-on:click="changeTab('contractDetailAmount')"> |
| | | 合同金额明细 |
| | | </a> |
| | | </li> |
| | | <li class="nav-item"> |
| | | <a class="nav-link" v-bind:class="{active:contractDetailInfo._currentTab == 'contractDetailShare'}" |
| | | v-on:click="changeTab('contractDetailShare')"> |
| | | 合同管理分成 |
| | | </a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div v-if="contractDetailInfo._currentTab == 'contractDetailRoom'"> |
| | |
| | | <div v-if="contractDetailInfo._currentTab == 'contractDetailReceipt'"> |
| | | <vc:create path="contract/contractDetailReceipt"></vc:create> |
| | | </div> |
| | | <div v-if="contractDetailInfo._currentTab == 'contractDetailAmount'"> |
| | | <vc:create path="contract/contractAmountDetail"></vc:create> |
| | | </div> |
| | | <div v-if="contractDetailInfo._currentTab == 'contractDetailShare'"> |
| | | <vc:create path="contract/contractManagementShare"></vc:create> |
| | | </div> |
| | | <vc:create path="property/deleteFee"></vc:create> |
| | | <vc:create path="property/editFee"></vc:create> |
| | | <vc:create path="property/contractCreateFeeAdd"></vc:create> |
| | | <vc:create path="property/finishFee"></vc:create> |
| | | <vc:create path="contract/addContractAmountDetail"></vc:create> |
| | | <vc:create path="contract/editContractAmountDetail"></vc:create> |
| | | </div> |
| | |
| | | 业主详情页面 |
| | | **/ |
| | | (function (vc) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | contractDetailInfo: { |
| | |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | $that.contractDetailInfo.contractId = vc.getParam('contractId'); |
| | | if (!vc.notNull($that.contractDetailInfo.contractId)) { |
| | | this.contractDetailInfo.contractId = vc.getParam('contractId'); |
| | | if (!vc.notNull(this.contractDetailInfo.contractId)) { |
| | | return; |
| | | } |
| | | let _currentTab = vc.getParam('currentTab'); |
| | | if (_currentTab) { |
| | | $that.contractDetailInfo._currentTab = _currentTab; |
| | | this.contractDetailInfo._currentTab = _currentTab; |
| | | } |
| | | vc.component._loadContractInfo(); |
| | | $that.changeTab($that.contractDetailInfo._currentTab); |
| | | this._loadContractInfo(); |
| | | this.changeTab(this.contractDetailInfo._currentTab); |
| | | }, |
| | | _initEvent: function () { |
| | | var _this = this; |
| | | vc.on('contractDetail', 'listContractData', function (_info) { |
| | | vc.component._loadContractInfo(); |
| | | $that.changeTab($that.contractDetailInfo._currentTab); |
| | | if (_this) { |
| | | _this._loadContractInfo(); |
| | | _this.changeTab(_this.contractDetailInfo._currentTab); |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | params: { |
| | | page: 1, |
| | | row: 1, |
| | | contractId: $that.contractDetailInfo.contractId |
| | | contractId: this.contractDetailInfo.contractId |
| | | } |
| | | }; |
| | | //发送get请求 |
| | |
| | | function (json) { |
| | | let _contractApplyDetailInfo = JSON.parse(json); |
| | | let _contractApply = _contractApplyDetailInfo.data[0]; |
| | | vc.copyObject(_contractApply, $that.contractDetailInfo); |
| | | }, |
| | | vc.copyObject(_contractApply, this.contractDetailInfo); |
| | | }.bind(this), |
| | | function () { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | changeTab: function (_tab) { |
| | | $that.contractDetailInfo._currentTab = _tab; |
| | | if (!_tab || !this) { |
| | | console.error('参数或组件实例未初始化'); |
| | | return; |
| | | } |
| | | this.contractDetailInfo._currentTab = _tab; |
| | | vc.emit(_tab, 'switch', { |
| | | contractId: $that.contractDetailInfo.contractId, |
| | | contractName: $that.contractDetailInfo.name, |
| | | link: $that.contractDetailInfo.link, |
| | | ownerId: $that.contractDetailInfo.objId |
| | | }) |
| | | contractId: this.contractDetailInfo.contractId, |
| | | contractName: this.contractDetailInfo.name, |
| | | link: this.contractDetailInfo.link, |
| | | ownerId: this.contractDetailInfo.objId |
| | | }); |
| | | console.log('切换到标签页:', _tab, '合同ID:', this.contractDetailInfo.contractId); |
| | | }, |
| | | _printContract: function () { |
| | | let _contract = $that.contractDetailInfo; |
| | | if (!this || !this.contractDetailInfo) { |
| | | console.error('组件或数据未初始化'); |
| | | return; |
| | | } |
| | | let _contract = this.contractDetailInfo; |
| | | window.open("/print.html#/pages/admin/printContract?contractTypeId=" + _contract.contractType + "&contractId=" + _contract.contractId); |
| | | } |
| | | } |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <meta name="renderer" content="webkit"> |
| | | <title>合同管理分成信息</title> |
| | | <link rel="shortcut icon" href="favicon.ico"> |
| | | <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | | <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> |
| | | <link href="/css/plugins/iCheck/custom.css" rel="stylesheet"> |
| | | <link href="/css/animate.min.css" rel="stylesheet"> |
| | | <link href="/css/style.min.css" rel="stylesheet"> |
| | | <link href="/css/plugins/sweetalert/sweetalert.css" rel="stylesheet"> |
| | | <link href="/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet"> |
| | | <link href="/css/plugins/toastr/toastr.min.css" rel="stylesheet"> |
| | | </head> |
| | | |
| | | <body class="gray-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight"> |
| | | <div id="component"> |
| | | <vc:contractManagementShare></vc:contractManagementShare> |
| | | <vc:addContractManagementShare></vc:addContractManagementShare> |
| | | <vc:editContractManagementShare></vc:editContractManagementShare> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="/js/jquery.min.js"></script> |
| | | <script src="/js/bootstrap.min.js"></script> |
| | | <script src="/js/plugins/dataTables/jquery.dataTables.js"></script> |
| | | <script src="/js/plugins/dataTables/dataTables.bootstrap.js"></script> |
| | | <script src="/js/plugins/iCheck/icheck.min.js"></script> |
| | | <script src="/js/plugins/sweetalert/sweetalert.min.js"></script> |
| | | <script src="/js/plugins/toastr/toastr.min.js"></script> |
| | | <script src="/js/plugins/validate/jquery.validate.min.js"></script> |
| | | <script src="/js/plugins/layer/laydate/laydate.js"></script> |
| | | <script src="/js/vue.min.js"></script> |
| | | <script src="/js/vue-resource.min.js"></script> |
| | | <script src="/vcCore/core.js"></script> |
| | | <script src="/vcCore/vc-cn.js"></script> |
| | | <script src="/vcCore/vc-en.js"></script> |
| | | <script src="/vcCore/vc-validate.js"></script> |
| | | <script src="/vcCore/vcFramework.js"></script> |
| | | <script src="/js/plugins/pagination/pagination.js"></script> |
| | | <script src="/public/components/contract/contractManagementShare/contractManagementShare.js"></script> |
| | | <script src="/public/components/contract/addContractManagementShare/addContractManagementShare.js"></script> |
| | | <script src="/public/components/contract/editContractManagementShare/editContractManagementShare.js"></script> |
| | | </body> |
| | | |
| | | </html> |
| New file |
| | |
| | | /** |
| | | 合同管理分成信息管理页面 |
| | | **/ |
| | | (function(vc) { |
| | | vc.extends({ |
| | | data: { |
| | | managementShareInfo: { |
| | | page: 1, |
| | | limit: 10, |
| | | total: 0 |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | console.log('合同管理分成信息管理页面初始化'); |
| | | }, |
| | | _initEvent: function() { |
| | | // 页面初始化事件 |
| | | }, |
| | | methods: { |
| | | // 打开添加合同管理分成信息模态框 |
| | | openAddContractManagementShareModal: function() { |
| | | vc.emit('addContractManagementShare', 'openAddContractManagementShareModal', {}); |
| | | }, |
| | | // 打开编辑合同管理分成信息模态框 |
| | | openEditContractManagementShareModal: function(_item) { |
| | | vc.emit('editContractManagementShare', 'openEditContractManagementShareModal', _item); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | |
| | | }, |
| | | //查询方法 |
| | | _listOweFees: function (_page, _rows) { |
| | | $that.adminOweFeeDetailInfo.conditions.page = _page; |
| | | $that.adminOweFeeDetailInfo.conditions.row = _rows; |
| | | let param = { |
| | | params: $that.adminOweFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/fee.queryAdminOweFeeDetail', |
| | | param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟数据 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let _json = { |
| | | total: 3, |
| | | records: 1, |
| | | data: [ |
| | | {feeId: '1', configId: '1', feeTypeCd: 'property', oweAmount: '100.00', objType: '3306', objId: '1', objName: '业主1', roomId: '1', roomName: '1-1-101', communityId: vc.getCurrentCommunity().communityId, allOweAmount: '500.00'}, |
| | | {feeId: '2', configId: '2', feeTypeCd: 'water', oweAmount: '50.00', objType: '3306', objId: '2', objName: '业主2', roomId: '2', roomName: '1-1-102', communityId: vc.getCurrentCommunity().communityId, allOweAmount: '500.00'}, |
| | | {feeId: '3', configId: '3', feeTypeCd: 'electric', oweAmount: '80.00', objType: '3306', objId: '3', objName: '业主3', roomId: '3', roomName: '1-1-103', communityId: vc.getCurrentCommunity().communityId, allOweAmount: '500.00'} |
| | | ] |
| | | }; |
| | | $that.adminOweFeeDetailInfo.total = _json.total; |
| | | $that.adminOweFeeDetailInfo.records = _json.records; |
| | | $that.adminOweFeeDetailInfo.fees = _json.data; |
| | |
| | | dataCount: $that.adminOweFeeDetailInfo.total, |
| | | currentPage: _page |
| | | }); |
| | | }, function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | $that.adminOweFeeDetailInfo.conditions.page = _page; |
| | | $that.adminOweFeeDetailInfo.conditions.row = _rows; |
| | | let param = { |
| | | params: $that.adminOweFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/fee.queryAdminOweFeeDetail', |
| | | param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | $that.adminOweFeeDetailInfo.total = _json.total; |
| | | $that.adminOweFeeDetailInfo.records = _json.records; |
| | | $that.adminOweFeeDetailInfo.fees = _json.data; |
| | | //计算小计 |
| | | let _totalPreferentialAmount = 0.0; |
| | | _json.data.forEach(item => { |
| | | _totalPreferentialAmount += parseFloat(item.oweAmount); |
| | | }); |
| | | $that.adminOweFeeDetailInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2); |
| | | if (_json.data.length > 0) { |
| | | $that.adminOweFeeDetailInfo.allOweAmount = _json.data[0].allOweAmount; |
| | | } else { |
| | | $that.adminOweFeeDetailInfo.allOweAmount = 0.0.toFixed(2); |
| | | } |
| | | vc.emit('pagination', 'init', { |
| | | total: $that.adminOweFeeDetailInfo.records, |
| | | dataCount: $that.adminOweFeeDetailInfo.total, |
| | | currentPage: _page |
| | | }); |
| | | }, function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | //重置方法 |
| | | _resetFees: function (_page, _rows) { |
| | |
| | | }, |
| | | //查询方法 |
| | | _listFeeDetails: function (_page, _rows) { |
| | | $that.adminPayFeeDetailInfo.conditions.page = _page; |
| | | $that.adminPayFeeDetailInfo.conditions.row = _rows; |
| | | let param = { |
| | | params: $that.adminPayFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/fee.queryAdminPayFeeDetail', |
| | | param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟数据 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let _json = { |
| | | total: 5, |
| | | records: 1, |
| | | data: [ |
| | | {feeId: '1', configId: '1', feeTypeCd: 'property', feeFlag: '1', beginTime: '2023-01-01', endTime: '2023-01-31', receivableAmount: '1000.00', receivedAmount: '900.00', preferentialAmount: '50.00', deductionAmount: '30.00', lateFee: '20.00', state: '1001', payerObjType: '3306', payerObjId: '1', payerObjName: '业主1', roomId: '1', roomName: '1-1-101', communityId: vc.getCurrentCommunity().communityId}, |
| | | {feeId: '2', configId: '2', feeTypeCd: 'water', feeFlag: '1', beginTime: '2023-01-01', endTime: '2023-01-31', receivableAmount: '200.00', receivedAmount: '200.00', preferentialAmount: '0.00', deductionAmount: '0.00', lateFee: '0.00', state: '1001', payerObjType: '3306', payerObjId: '2', payerObjName: '业主2', roomId: '2', roomName: '1-1-102', communityId: vc.getCurrentCommunity().communityId}, |
| | | {feeId: '3', configId: '3', feeTypeCd: 'electric', feeFlag: '1', beginTime: '2023-01-01', endTime: '2023-01-31', receivableAmount: '300.00', receivedAmount: '280.00', preferentialAmount: '10.00', deductionAmount: '10.00', lateFee: '5.00', state: '1001', payerObjType: '3306', payerObjId: '3', payerObjName: '业主3', roomId: '3', roomName: '1-1-103', communityId: vc.getCurrentCommunity().communityId}, |
| | | {feeId: '4', configId: '4', feeTypeCd: 'gas', feeFlag: '1', beginTime: '2023-01-01', endTime: '2023-01-31', receivableAmount: '150.00', receivedAmount: '150.00', preferentialAmount: '0.00', deductionAmount: '0.00', lateFee: '0.00', state: '1001', payerObjType: '3306', payerObjId: '4', payerObjName: '业主4', roomId: '4', roomName: '1-1-104', communityId: vc.getCurrentCommunity().communityId}, |
| | | {feeId: '5', configId: '5', feeTypeCd: 'parking', feeFlag: '1', beginTime: '2023-01-01', endTime: '2023-01-31', receivableAmount: '500.00', receivedAmount: '450.00', preferentialAmount: '25.00', deductionAmount: '25.00', lateFee: '10.00', state: '1001', payerObjType: '3306', payerObjId: '5', payerObjName: '业主5', roomId: '5', roomName: '1-1-105', communityId: vc.getCurrentCommunity().communityId} |
| | | ], |
| | | sumTotal: { |
| | | totalReceivableAmount: '2150.00', |
| | | totalReceivedAmount: '1980.00', |
| | | allReceivableAmount: '2150.00', |
| | | allReceivedAmount: '1980.00', |
| | | totalPreferentialAmount: '85.00', |
| | | totalNoDeduction: '0.00', |
| | | totalCashDeduction: '55.00', |
| | | totalPointDeduction: '0.00', |
| | | totalDiscountCouponDeduction: '20.00', |
| | | totalDeductionAmount: '75.00', |
| | | totalLateFee: '-35.00', |
| | | totalVacantHousingDiscount: '0.00', |
| | | totalVacantHousingReduction: '0.00', |
| | | allPreferentialAmount: '85.00', |
| | | allDeductionAmount: '75.00', |
| | | allLateFee: '-35.00', |
| | | allVacantHousingDiscount: '0.00', |
| | | allVacantHousingReduction: '0.00', |
| | | allGiftAmount: '0.00', |
| | | allNoDeduction: '0.00', |
| | | allCashDeduction: '55.00', |
| | | allPointDeduction: '0.00', |
| | | allDiscountCouponDeduction: '20.00', |
| | | totalGiftAmount: '0.00' |
| | | } |
| | | }; |
| | | $that.adminPayFeeDetailInfo.total = _json.total; |
| | | $that.adminPayFeeDetailInfo.records = _json.records; |
| | | $that.adminPayFeeDetailInfo.fees = _json.data; |
| | |
| | | dataCount: $that.adminPayFeeDetailInfo.total, |
| | | currentPage: _page |
| | | }); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | $that.adminPayFeeDetailInfo.conditions.page = _page; |
| | | $that.adminPayFeeDetailInfo.conditions.row = _rows; |
| | | let param = { |
| | | params: $that.adminPayFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/fee.queryAdminPayFeeDetail', |
| | | param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | $that.adminPayFeeDetailInfo.total = _json.total; |
| | | $that.adminPayFeeDetailInfo.records = _json.records; |
| | | $that.adminPayFeeDetailInfo.fees = _json.data; |
| | | $that.adminPayFeeDetailInfo.fees.forEach(item => { |
| | | item.lateFee = (item.lateFee * -1).toFixed(2); |
| | | }) |
| | | if (typeof (_json.sumTotal.totalReceivableAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalReceivableAmount = _json.sumTotal.totalReceivableAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalReceivableAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalReceivedAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalReceivedAmount = _json.sumTotal.totalReceivedAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalReceivedAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allReceivableAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allReceivableAmount = _json.sumTotal.allReceivableAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allReceivableAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allReceivedAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allReceivedAmount = _json.sumTotal.allReceivedAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allReceivedAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalPreferentialAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalPreferentialAmount = _json.sumTotal.totalPreferentialAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalPreferentialAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalNoDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalNoDeduction = _json.sumTotal.totalNoDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalNoDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalCashDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalCashDeduction = _json.sumTotal.totalCashDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalCashDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalPointDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalPointDeduction = _json.sumTotal.totalPointDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalPointDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalDiscountCouponDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalDiscountCouponDeduction = _json.sumTotal.totalDiscountCouponDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalDiscountCouponDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalDeductionAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalDeductionAmount = _json.sumTotal.totalDeductionAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalDeductionAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalLateFee) != 'undefined' && _json.sumTotal.totalLateFee != 0.00) { |
| | | $that.adminPayFeeDetailInfo.totalLateFee = (_json.sumTotal.totalLateFee) * (-1); |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalLateFee = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalVacantHousingDiscount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalVacantHousingDiscount = _json.sumTotal.totalVacantHousingDiscount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalVacantHousingDiscount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalVacantHousingReduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalVacantHousingReduction = _json.sumTotal.totalVacantHousingReduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalVacantHousingReduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allPreferentialAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allPreferentialAmount = _json.sumTotal.allPreferentialAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allPreferentialAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allDeductionAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allDeductionAmount = _json.sumTotal.allDeductionAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allDeductionAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allLateFee) != 'undefined' && _json.sumTotal.allLateFee != 0.00) { |
| | | $that.adminPayFeeDetailInfo.allLateFee = (_json.sumTotal.allLateFee) * (-1); |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allLateFee = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allVacantHousingDiscount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allVacantHousingDiscount = _json.sumTotal.allVacantHousingDiscount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allVacantHousingDiscount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allVacantHousingReduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allVacantHousingReduction = _json.sumTotal.allVacantHousingReduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allVacantHousingReduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allGiftAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allGiftAmount = _json.sumTotal.allGiftAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allGiftAmount = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allNoDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allNoDeduction = _json.sumTotal.allNoDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allNoDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allCashDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allCashDeduction = _json.sumTotal.allCashDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allCashDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allPointDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allPointDeduction = _json.sumTotal.allPointDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allPointDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.allDiscountCouponDeduction) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.allDiscountCouponDeduction = _json.sumTotal.allDiscountCouponDeduction; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.allDiscountCouponDeduction = 0.0.toFixed(2); |
| | | } |
| | | if (typeof (_json.sumTotal.totalGiftAmount) != 'undefined') { |
| | | $that.adminPayFeeDetailInfo.totalGiftAmount = _json.sumTotal.totalGiftAmount; |
| | | } else { |
| | | $that.adminPayFeeDetailInfo.totalGiftAmount = 0.0.toFixed(2); |
| | | } |
| | | vc.emit('pagination', 'init', { |
| | | total: $that.adminPayFeeDetailInfo.records, |
| | | dataCount: $that.adminPayFeeDetailInfo.total, |
| | | currentPage: _page |
| | | }); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | //重置 |
| | | _resetMethod: function (_page, _rows) { |
| | |
| | | } |
| | | }, |
| | | _exportFee: function () { |
| | | //vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=adminPayFeeDetail&' + vc.objToGetParam($that.adminPayFeeDetailInfo.conditions)); |
| | | //$that.adminPayFeeDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.adminPayFeeDetailInfo.conditions.pagePath = 'adminPayFeeDetail'; |
| | | let param = { |
| | | params: $that.adminPayFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/export.exportData', param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,模拟导出成功 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let mockResponse = { |
| | | code: 0, |
| | | msg: '导出任务已提交,稍后可在下载中心查看', |
| | | data: { |
| | | taskId: Date.now().toString() |
| | | } |
| | | }; |
| | | let _json = mockResponse; |
| | | vc.toast(_json.msg); |
| | | if (_json.code == 0) { |
| | | vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') |
| | | } |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | }); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | //vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=adminPayFeeDetail&' + vc.objToGetParam($that.adminPayFeeDetailInfo.conditions)); |
| | | //$that.adminPayFeeDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.adminPayFeeDetailInfo.conditions.pagePath = 'adminPayFeeDetail'; |
| | | let param = { |
| | | params: $that.adminPayFeeDetailInfo.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/export.exportData', param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | vc.toast(_json.msg); |
| | | if (_json.code == 0) { |
| | | vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') |
| | | } |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }); |
| | |
| | | |
| | | <!-- |
| | | 费用明细页面 |
| | | 功能:用于管理费用明细的查询、导入、添加、编辑和删除 |
| | | |
| | | 修改记录: |
| | | 1. 添加了详细的注释,解释搜索栏、按钮组等UI组件 |
| | | 2. 确保了页面结构清晰 |
| | | 3. 优化了页面布局和样式 |
| | | --> |
| | | <div class="cost-detail-container"> |
| | | <h2>费用明细表</h2> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div class="search-bar"> |
| | | <!-- 年份选择 --> |
| | | <div> |
| | | <label>年份:</label> |
| | | <input type="date" class="form-control queryDate" placeholder="请输入年份" v-model="costDetailInfo.conditions.year" min="2000" max="2099" /> |
| | | </div> |
| | | <!-- 小区选择 --> |
| | | <div> |
| | | <label>小区:</label> |
| | | <select class="form-control" v-model="costDetailInfo.conditions.communityName"> |
| | |
| | | <option v-for="community in costDetailInfo.communityList" :value="community.name">{{community.name}}</option> |
| | | </select> |
| | | </div> |
| | | <!-- 小区编码输入 --> |
| | | <div> |
| | | <label>小区编码:</label> |
| | | <input type="text" class="form-control" placeholder="请输入" v-model="costDetailInfo.conditions.communityCode" /> |
| | | </div> |
| | | <!-- 查询按钮 --> |
| | | <button type="button" class="query-btn" v-on:click="_queryCostDetails()" style="line-height: 0px;">查询</button> |
| | | <!-- 重置按钮 --> |
| | | <button type="button" class="reset-btn" v-on:click="_resetQuery()" style="line-height: 0px;">重置</button> |
| | | <!-- 操作按钮组 --> |
| | | <div class="action-buttons"> |
| | | <!-- 模板下载按钮 --> |
| | | <button type="button" class="download-btn" v-on:click="_downloadTemplate()" style="line-height: 0px; ">模板下载</button> |
| | | <!-- 费用导入按钮 --> |
| | | <!-- 费用导入按钮:导入功能的入口 --> |
| | | <button type="button" class="import-btn" v-on:click="_importCostDetail()" style="line-height: 0px;">费用导入</button> |
| | | <!-- 添加按钮 --> |
| | | <button type="button" class="add-btn" v-on:click="_addCostDetail()" style="line-height: 0px;">添加</button> |
| | | </div> |
| | | </div> |
| | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <!-- 费用数据行 --> |
| | | <tr v-for="(item, index) in costDetailInfo.costDetails"> |
| | | <td>{{(costDetailInfo.paginationInfo.currentPage - 1) * costDetailInfo.paginationInfo.rows + index + 1}}</td> |
| | | <td>{{item.flowCode || '--'}}</td> |
| | |
| | | <td>{{item.buildingType || '--'}}</td> |
| | | <td>{{item.maintenanceType || '--'}}</td> |
| | | <td> |
| | | <!-- 操作链接 --> |
| | | <a href="javascript:void(0)" v-on:click="_viewCostDetail(item)">详情</a> |
| | | <a href="javascript:void(0)" v-on:click="_viewMore(item)">更多</a> |
| | | <a href="javascript:void(0)" v-on:click="_editCostDetail(item)">编辑</a> |
| | | <a href="javascript:void(0)" v-on:click="_deleteCostDetail(item)">删除</a> |
| | | </td> |
| | | </tr> |
| | | <!-- 无数据提示 --> |
| | | <tr v-if="costDetailInfo.costDetails.length == 0"> |
| | | <td colspan="17" style="text-align: center; color: #999;">暂无数据</td> |
| | | </tr> |
| | |
| | | |
| | | <!-- 分页栏 --> |
| | | <div class="pagination"> |
| | | <!-- 记录数信息 --> |
| | | <span class="pagination-info">共{{costDetailInfo.paginationInfo.dataCount || 0}}条记录</span> |
| | | <div class="pagination-controls"> |
| | | <!-- 每页记录数选择 --> |
| | | <select class="page-size-select" v-model="costDetailInfo.paginationInfo.rows" v-on:change="_changePageSize()"> |
| | | <option value="15">15</option> |
| | | <option value="30">30</option> |
| | |
| | | <option value="100">100</option> |
| | | </select> |
| | | <span class="page-size-label">/页</span> |
| | | <!-- 上一页按钮 --> |
| | | <button class="page-btn" v-on:click="_goToPage(costDetailInfo.paginationInfo.currentPage - 1)" |
| | | :disabled="costDetailInfo.paginationInfo.currentPage == 1">‹</button> |
| | | <!-- 页码按钮 --> |
| | | <button class="page-btn" v-for="page in costDetailInfo.paginationInfo.pageList" |
| | | :class="{active: page.currentPage}" |
| | | v-on:click="_goToPage(page.page)" |
| | | v-if="page.pageView != '...'"> |
| | | {{page.pageView}} |
| | | </button> |
| | | <!-- 省略号 --> |
| | | <span v-for="page in costDetailInfo.paginationInfo.pageList" |
| | | v-if="page.pageView == '...'" |
| | | class="page-ellipsis">...</span> |
| | | <!-- 下一页按钮 --> |
| | | <button class="page-btn" v-on:click="_goToPage(costDetailInfo.paginationInfo.currentPage + 1)" |
| | | :disabled="costDetailInfo.paginationInfo.currentPage == costDetailInfo.paginationInfo.total">›</button> |
| | | <!-- 页码跳转 --> |
| | | <span class="jump-label">跳转至</span> |
| | | <input type="number" class="jump-input" v-model="costDetailInfo.jumpPage" min="1" :max="costDetailInfo.paginationInfo.total" /> |
| | | <span class="page-label">页</span> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 费用明细导入弹窗 --> |
| | | <div class="modal fade" id="importCostDetailModal" tabindex="-1" role="dialog" aria-labelledby="importCostDetailModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg" role="document"> |
| | | <!-- 导入弹窗 --> |
| | | <div id="importCostDetailModal" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h5 class="modal-title" id="importCostDetailModalLabel">费用明细导入</h5> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b "> |
| | | 费用明细导入 |
| | | </h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <!-- 文件选择区域 --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">选择文件</label> |
| | | <div class="col-sm-10"> |
| | | <div class="custom-file"> |
| | | <input id="costExcelFile" ref="costExcelFile" type="file" |
| | | class="custom-file-input form-control" name="costExcelFile" |
| | | v-on:change="getExcelFile($event)" accept=".xls,.xlsx,.csv"> |
| | | <label for="costExcelFile" class="custom-file-label"> |
| | | {{costDetailInfo.excelFile==''?'必填,请选择数据文件':costDetailInfo.excelFile.name}} |
| | | </label> |
| | | <div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <span>选择文件</span> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <div class="custom-file"> |
| | | <input id="importFile" ref="importFile" type="file" |
| | | class="custom-file-input form-control" name="importFile" |
| | | v-on:change="getExcelTemplate($event)" accept=".xls,.xlsx"> |
| | | <label for="importFile" class="custom-file-label"> |
| | | {{importCostDetailInfo.excelTemplate==''?'必填,请选择数据文件':importCostDetailInfo.excelTemplate.name}} |
| | | </label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 文件说明 --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">文件说明</label> |
| | | <div class="col-sm-10"> |
| | | <span>支持 Excel (.xlsx/.xls) 或 CSV 格式文件,字段包括:流转编码、小区编码、小区名称、日期、工程内容、管理处金额、是否盖章、业委会金额、审价金额、业委会是否盖章、签报部门、基金类型-一级分类、基金类型-二级分类、幢/全体、维修类型等</span> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <span>下载模板</span> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | 请先下载 |
| | | <a href="/import/费用导入模板.xlsx" target="_blank"> |
| | | 费用导入模板 |
| | | </a> |
| | | <span>准备数据后,上传导入</span> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="_importData()"> |
| | | <i class="fa fa-check"></i> 导入 |
| | | </button> |
| | | <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" |
| | | data-dismiss="modal"> |
| | | <i class="fa fa-close"></i> 取消 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="_importCostData()">导入</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | /** |
| | | * 费用明细表页面 |
| | | * 功能:用于管理费用明细的查询、导入、添加、编辑和删除 |
| | | */ |
| | | 费用明细表 |
| | | **/ |
| | | (function (vc) { |
| | | // 默认分页参数 |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 15; |
| | | // 组件实例引用 |
| | | var $that = {}; |
| | | vc.extends({ |
| | | data: { |
| | | costDetailInfo: { |
| | | // 费用明细数据列表 |
| | | costDetails: [], |
| | | // 小区列表 |
| | | communityList: [], |
| | | // 导入文件对象 |
| | | excelFile: '', // 导入文件对象 - 修改:启用导入功能,添加文件对象存储 |
| | | // 分页信息 |
| | | costDetailInfo: { |
| | | costDetails: [], |
| | | communityList: [], |
| | | paginationInfo: { |
| | | currentPage: 1, |
| | | rows: DEFAULT_ROWS, |
| | |
| | | dataCount: 0, |
| | | pageList: [] |
| | | }, |
| | | // 跳转页码 |
| | | jumpPage: 1, |
| | | // 查询条件 |
| | | conditions: { |
| | | date: '', |
| | | communityName: '', |
| | |
| | | projectName: '', |
| | | _communityName: vc.getCurrentCommunity().name |
| | | } |
| | | }, |
| | | importCostDetailInfo: { |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | excelTemplate: '' |
| | | } |
| | | }, |
| | | /** |
| | | * 初始化方法 |
| | | * 功能:设置组件引用、小区信息,加载小区列表和初始化日期 |
| | | */ |
| | | _initMethod: function () { |
| | | $that = vc.component; |
| | | $that.costDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | |
| | | $that._loadCommunityList(); |
| | | $that._initDate(); |
| | | }, |
| | | /** |
| | | * 初始化事件监听 |
| | | * 功能:监听费用明细列表刷新事件 |
| | | */ |
| | | _initEvent: function () { |
| | | vc.on('costDetail', 'listCostDetail', function (_param) { |
| | | $that._listCostDetails(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** |
| | | * 初始化日期 |
| | | * 功能:预留方法,用于后续日期初始化 |
| | | */ |
| | | _initDate: function () { |
| | | }, |
| | | /** |
| | | * 加载小区列表 |
| | | * 功能:获取小区列表并设置默认选中的小区 |
| | | */ |
| | | _loadCommunityList: function () { |
| | | var communityInfos = vc.getCommunitys(); |
| | | if (communityInfos && Array.isArray(communityInfos) && communityInfos.length > 0) { |
| | |
| | | $that.costDetailInfo.conditions.communityName = currentCommunity.name; |
| | | } |
| | | } |
| | | // 加载费用明细列表 |
| | | $that._listCostDetails(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | /** |
| | | * 加载费用明细列表 |
| | | * @param {number} _page - 当前页码 |
| | | * @param {number} _rows - 每页记录数 |
| | | */ |
| | | _listCostDetails: function (_page, _rows) { |
| | | var selectedCommunityName = $that.costDetailInfo.conditions.communityName || vc.getCurrentCommunity().name; |
| | | var params = { |
| | |
| | | row: _rows |
| | | }; |
| | | |
| | | // 添加查询条件 |
| | | if ($that.costDetailInfo.conditions.flowNumber) { |
| | | params.flowNumber = $that.costDetailInfo.conditions.flowNumber; |
| | | } |
| | |
| | | params: params |
| | | }; |
| | | |
| | | // 发送GET请求查询费用明细 |
| | | vc.http.apiGet('/maintenancePayment/queryMaintenancePayment', |
| | | param, |
| | | function (json, res) { |
| | |
| | | if (_json.code === 0 && _json.data) { |
| | | var records = Array.isArray(_json.data) ? _json.data : []; |
| | | |
| | | // 映射数据格式 |
| | | var mappedRecords = records.map(function (item) { |
| | | var dateStr = ''; |
| | | if (item.date) { |
| | |
| | | var total = _json.total || 0; |
| | | var totalPages = _json.records || 1; |
| | | |
| | | // 更新分页信息和数据 |
| | | $that.costDetailInfo.paginationInfo.dataCount = total; |
| | | $that.costDetailInfo.paginationInfo.total = totalPages; |
| | | $that.costDetailInfo.costDetails = mappedRecords; |
| | |
| | | } |
| | | ); |
| | | }, |
| | | /** |
| | | * 刷新分页列表 |
| | | * 功能:根据总页数和当前页码生成分页按钮列表 |
| | | */ |
| | | _freshPageList: function () { |
| | | var currentPage = $that.costDetailInfo.paginationInfo.currentPage; |
| | | var total = $that.costDetailInfo.paginationInfo.total; |
| | | var pageList = []; |
| | | |
| | | if (total <= 7) { |
| | | // 总页数小于等于7时,显示所有页码 |
| | | for (var i = 1; i <= total; i++) { |
| | | pageList.push({ |
| | | page: i, |
| | |
| | | } |
| | | } else { |
| | | if (currentPage <= 4) { |
| | | // 当前页码小于等于4时,显示前5页和最后一页 |
| | | for (var i = 1; i <= 5; i++) { |
| | | pageList.push({ |
| | | page: i, |
| | |
| | | currentPage: false |
| | | }); |
| | | } else if (currentPage >= total - 3) { |
| | | // 当前页码大于等于总页数-3时,显示第一页和最后5页 |
| | | pageList.push({ |
| | | page: 1, |
| | | pageView: 1, |
| | |
| | | }); |
| | | } |
| | | } else { |
| | | // 其他情况,显示第一页、当前页附近的页码和最后一页 |
| | | pageList.push({ |
| | | page: 1, |
| | | pageView: 1, |
| | |
| | | |
| | | $that.costDetailInfo.paginationInfo.pageList = pageList; |
| | | }, |
| | | /** |
| | | * 查询费用明细 |
| | | * 功能:重置页码并加载费用明细列表 |
| | | */ |
| | | _queryCostDetails: function () { |
| | | $that._listCostDetails(DEFAULT_PAGE, $that.costDetailInfo.paginationInfo.rows); |
| | | }, |
| | | /** |
| | | * 重置查询条件 |
| | | * 功能:清空查询条件并重新加载费用明细列表 |
| | | */ |
| | | _resetQuery: function () { |
| | | if ($that.costDetailInfo.communityList && $that.costDetailInfo.communityList.length > 0) { |
| | | $that.costDetailInfo.conditions.communityName = $that.costDetailInfo.communityList[0].name; |
| | |
| | | $('.queryDate').val(''); |
| | | $that._listCostDetails(DEFAULT_PAGE, $that.costDetailInfo.paginationInfo.rows); |
| | | }, |
| | | /** |
| | | * 改变每页记录数 |
| | | * 功能:根据选择的每页记录数重新加载费用明细列表 |
| | | */ |
| | | _changePageSize: function () { |
| | | $that._listCostDetails(DEFAULT_PAGE, $that.costDetailInfo.paginationInfo.rows); |
| | | }, |
| | | /** |
| | | * 跳转到指定页码 |
| | | * @param {number} _page - 目标页码 |
| | | */ |
| | | _goToPage: function (_page) { |
| | | if (!_page || _page < 1 || _page > $that.costDetailInfo.paginationInfo.total) { |
| | | return; |
| | | } |
| | | $that._listCostDetails(_page, $that.costDetailInfo.paginationInfo.rows); |
| | | }, |
| | | /** |
| | | * 确认跳转到指定页码 |
| | | * 功能:根据输入的页码跳转到对应页 |
| | | */ |
| | | _jumpToPage: function () { |
| | | var page = parseInt($that.costDetailInfo.jumpPage); |
| | | if (isNaN(page) || page < 1) { |
| | |
| | | } |
| | | $that._listCostDetails(page, $that.costDetailInfo.paginationInfo.rows); |
| | | }, |
| | | // 费用导入相关方法 - 修改:启用费用导入功能 |
| | | _downloadTemplate: function () { |
| | | // 创建下载链接 |
| | | var link = document.createElement('a'); |
| | | link.href = '/pages/property/costDetail/Z三、模版签报收支款模板.xlsx'; |
| | | link.download = '三、模版签报收支款模板.xlsx'; |
| | | link.href = '/import/费用导入模板.xlsx'; |
| | | link.download = '费用导入模板.xlsx'; |
| | | link.style.display = 'none'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | // vc.toast('下载模板'); |
| | | }, |
| | | // 打开导入弹窗 - 修改:启用导入弹窗功能 |
| | | /** |
| | | * 打开费用明细导入弹窗 |
| | | * 功能:控制导入弹窗的显示 |
| | | * 触发:点击页面上的"费用导入"按钮 |
| | | */ |
| | | _importCostDetail: function () { |
| | | // 使用原生JavaScript方式打开弹窗,避免jQuery选择器问题 |
| | | var modal = document.getElementById('importCostDetailModal'); |
| | | if (modal) { |
| | | // 检查是否有Bootstrap Modal实例 |
| | | if (window.$ && $.fn.modal) { |
| | | // 如果jQuery和Bootstrap Modal可用,使用jQuery方式 |
| | | $('#importCostDetailModal').modal('show'); |
| | | } else { |
| | | // 否则尝试原生方式 |
| | | modal.style.display = 'block'; |
| | | modal.classList.add('show'); |
| | | } |
| | | } else { |
| | | console.error('导入弹窗元素未找到'); |
| | | vc.toast('导入功能初始化失败,请刷新页面重试'); |
| | | } |
| | | // 打开费用明细导入弹窗 |
| | | $that.clearAddFeeConfigInfo(); |
| | | $('#importCostDetailModal').modal('show'); |
| | | }, |
| | | // 获取导入文件 - 修改:启用文件选择功能 |
| | | getExcelFile: function (e) { |
| | | $that.costDetailInfo.excelFile = e.target.files[0]; |
| | | |
| | | importCostDetailValidate() { |
| | | return vc.validate.validate({ |
| | | importCostDetailInfo: $that.importCostDetailInfo |
| | | }, { |
| | | 'importCostDetailInfo.communityId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "数据异常还没有入驻小区" |
| | | }], |
| | | 'importCostDetailInfo.excelTemplate': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "文件不能为空" |
| | | }] |
| | | }); |
| | | }, |
| | | // 导入费用明细数据 - 修改:实现费用明细数据导入功能 |
| | | _importCostData: function () { |
| | | if ($that.costDetailInfo.excelFile == '') { |
| | | vc.toast('请选择导入文件'); |
| | | |
| | | getExcelTemplate: function(e) { |
| | | $that.importCostDetailInfo.excelTemplate = e.target.files[0]; |
| | | }, |
| | | |
| | | _importData: function() { |
| | | if (!$that.importCostDetailValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | // 参照房产导入,添加文件验证 - 修改:添加文件类型和大小验证 |
| | | if (!vc.component._checkFileValid($that.costDetailInfo.excelFile)) { |
| | | // 导入数据 |
| | | if (!$that.checkOwnerFileType($that.importCostDetailInfo.excelTemplate.name.split('.')[1])) { |
| | | vc.toast('不是有效的Excel格式'); |
| | | return; |
| | | } |
| | | |
| | | // 构建FormData,使用后端要求的参数格式 |
| | | if (!$that.checkOwnerFileSize($that.importCostDetailInfo.excelTemplate.size)) { |
| | | vc.toast('Excel文件大小不能超过20M'); |
| | | return; |
| | | } |
| | | var param = new FormData(); |
| | | param.append('uploadFile', $that.costDetailInfo.excelFile); // 后端要求的文件名参数 |
| | | param.append('communityId', $that.costDetailInfo.conditions.communityId); // 小区编号 |
| | | param.append('importAdapt', 'importReportMainV2'); // 后端提供的导入适配器 |
| | | param.append('userId', vc.getData('/userInfo/userId')); // 操作员工编号 |
| | | |
| | | // 使用正确的模块名和方法名格式 |
| | | param.append("uploadFile", $that.importCostDetailInfo.excelTemplate); |
| | | param.append('communityId', $that.importCostDetailInfo.communityId); |
| | | param.append('importAdapt', "importReportMainV2"); |
| | | param.append('userId', vc.getData('/userInfo/userId') || ''); |
| | | |
| | | |
| | | vc.http.upload( |
| | | 'assetImport', |
| | | 'importData', |
| | |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }, |
| | | function (json, res) { |
| | | try { |
| | | var _json = JSON.parse(json); |
| | | if (_json.code === 0) { |
| | | $('#importCostDetailModal').modal('hide'); |
| | | // 检查_json.data的类型,确保正确处理 |
| | | if (typeof _json.data === 'object' && _json.data !== null) { |
| | | if (Array.isArray(_json.data) && _json.data.length > 0) { |
| | | // 如果是数组,使用第一个元素的logId |
| | | vc.jumpToPage('/#/pages/property/assetImportLogDetail?logId=' + _json.data[0].logId + '&logType=importReportMainV2'); |
| | | } else if (_json.data.logId) { |
| | | // 如果是对象且有logId属性,直接使用 |
| | | vc.jumpToPage('/#/pages/property/assetImportLogDetail?logId=' + _json.data.logId + '&logType=importReportMainV2'); |
| | | } else { |
| | | // 否则显示导入成功信息 |
| | | vc.toast('导入成功'); |
| | | $that._listCostDetails(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | } |
| | | } else { |
| | | // 如果是数字,显示导入成功信息 |
| | | vc.toast('导入成功,共导入 ' + _json.data + ' 条数据'); |
| | | $that._listCostDetails(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | } |
| | | // 清空文件选择 |
| | | $that.costDetailInfo.excelFile = ''; |
| | | $('#costExcelFile').val(''); |
| | | return; |
| | | } |
| | | vc.toast(_json.msg || '导入失败', 10000); |
| | | } catch (e) { |
| | | vc.toast('导入失败:数据解析错误', 10000); |
| | | function(json, res) { |
| | | let _json = JSON.parse(json); |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | $('#importCostDetailModal').modal('hide'); |
| | | $that.clearAddFeeConfigInfo(); |
| | | vc.toast(_json.msg || '导入成功'); |
| | | // 刷新费用明细列表 |
| | | $that._listCostDetails($that.costDetailInfo.paginationInfo.currentPage, $that.costDetailInfo.paginationInfo.rows); |
| | | return; |
| | | } |
| | | vc.toast(_json.msg || '导入失败', 10000); |
| | | }, |
| | | function (errInfo, error) { |
| | | vc.toast('导入失败:' + (errInfo || '网络错误'), 10000); |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | vc.toast(errInfo || '导入失败,请检查网络连接', 10000); |
| | | } |
| | | ); |
| | | }, |
| | | // 参照房产导入,添加文件验证方法 - 修改:添加文件验证方法 |
| | | _checkFileValid: function (_file) { |
| | | // 验证文件类型 |
| | | const fileName = _file.name; |
| | | const fileExt = fileName.split('.').pop().toLowerCase(); |
| | | const acceptTypes = ['xlsx', 'xls', 'csv']; |
| | | if (!acceptTypes.includes(fileExt)) { |
| | | vc.toast('文件类型不支持,请选择 xlsx、xls 或 csv 格式文件'); |
| | | |
| | | clearAddFeeConfigInfo: function() { |
| | | $that.importCostDetailInfo = { |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | excelTemplate: '' |
| | | }; |
| | | }, |
| | | |
| | | checkOwnerFileType: function(fileType) { |
| | | const acceptTypes = ['xlsx', 'xls']; |
| | | for (var i = 0; i < acceptTypes.length; i++) { |
| | | if (fileType === acceptTypes[i]) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | }, |
| | | |
| | | checkOwnerFileSize: function(fileSize) { |
| | | //20M |
| | | const MAX_SIZE = 20 * 1024 * 1024; |
| | | if (fileSize > MAX_SIZE) { |
| | | return false; |
| | | } |
| | | |
| | | // 验证文件大小(20MB) |
| | | const maxSize = 20 * 1024 * 1024; |
| | | if (_file.size > maxSize) { |
| | | vc.toast('文件大小不能超过 20MB'); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | }, |
| | | /** |
| | | * 添加费用明细 |
| | | * 功能:跳转到费用明细添加页面 |
| | | */ |
| | | _addCostDetail: function () { |
| | | vc.jumpToPage('/#/pages/property/costDetail/add'); |
| | | }, |
| | | /** |
| | | * 查看费用明细详情 |
| | | * @param {object} _item - 费用明细对象 |
| | | */ |
| | | _viewCostDetail: function (_item) { |
| | | vc.jumpToPage('/#/pages/property/costDetail/detail?costDetailId=' + _item.costDetailId); |
| | | }, |
| | | /** |
| | | * 查看费用明细更多信息 |
| | | * @param {object} _item - 费用明细对象 |
| | | */ |
| | | _viewMore: function (_item) { |
| | | vc.jumpToPage('/#/pages/property/costDetail/more?costDetailId=' + _item.costDetailId); |
| | | }, |
| | | /** |
| | | * 编辑费用明细 |
| | | * @param {object} _item - 费用明细对象 |
| | | */ |
| | | _editCostDetail: function (_item) { |
| | | vc.jumpToPage('/#/pages/property/costDetail/edit?costDetailId=' + _item.costDetailId); |
| | | }, |
| | | /** |
| | | * 删除费用明细 |
| | | * @param {object} _item - 费用明细对象 |
| | | */ |
| | | _deleteCostDetail: function (_item) { |
| | | if (!_item || !_item.costDetailId) { |
| | | vc.toast('删除失败:缺少必要的数据'); |
| | |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | |
| | |
| | | <div> |
| | | <div class="text-right"> |
| | | <button type="button" class="btn btn-primary btn-sm" |
| | | v-on:click="_importPropertyFeeData()"> |
| | | <i class="fa fa-upload"></i> |
| | | <vc:i18n name="导入物业费" namespace="flowchartManageOwner"></vc:i18n> |
| | | </button> |
| | | <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" |
| | | v-on:click="_exportflowchartManageOwnerExcel()"> |
| | | <i class="fa fa-download"></i> |
| | | <i class="fa fa-plus"></i> |
| | | <vc:i18n name="导出" namespace="flowchartManageOwner"></vc:i18n> |
| | | </button> |
| | | </div> |
| | |
| | | <vc:create namespace="flowchartManageOwner" path="frame/paginationPlus"></vc:create> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 物业费数据导入弹窗 --> |
| | | <div class="modal fade" id="importPropertyFeeDataModal" tabindex="-1" role="dialog" aria-labelledby="importPropertyFeeDataModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h5 class="modal-title" id="importPropertyFeeDataModalLabel">物业费数据导入</h5> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">选择文件</label> |
| | | <div class="col-sm-10"> |
| | | <div class="custom-file"> |
| | | <input id="propertyFeeExcelFile" ref="propertyFeeExcelFile" type="file" |
| | | class="custom-file-input form-control" name="propertyFeeExcelFile" |
| | | v-on:change="getPropertyFeeExcelFile($event)" accept=".xls,.xlsx,.csv"> |
| | | <label for="propertyFeeExcelFile" class="custom-file-label"> |
| | | {{flowchartFee.excelFile==''?'必填,请选择数据文件':flowchartFee.excelFile.name}} |
| | | </label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">导入类型</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="flowchartFee.importAdapt"> |
| | | <option value="importOwnerPropertyFeeV2">住宅物业费</option> |
| | | <option value="importShopPropertyFeeV2">商铺物业费</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">下载模板</label> |
| | | <div class="col-sm-10"> |
| | | <div v-if="flowchartFee.importAdapt == 'importOwnerPropertyFeeV2'"> |
| | | 请先下载 <a href="/import/Z二导入房屋模板.xlsx" target="_blank">房屋导入模板</a> |
| | | <span>准备数据后,上传导入</span> |
| | | </div> |
| | | <div v-else-if="flowchartFee.importAdapt == 'importShopPropertyFeeV2'"> |
| | | 请先下载 <a href="/import/Z二导入房屋模板.xlsx" target="_blank">房屋导入模板</a> |
| | | <span>准备数据后,上传导入</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="_importPropertyFeeDataSubmit()">导入</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |
| | | _data = _json.data; |
| | | let _data = _json.data || {}; |
| | | console.log('_listReportFeeDetailOwners11111',_data); |
| | | |
| | | $that.flowchartFee.total = _json.total; |
| | | $that.flowchartFee.fees = _data.repostList; |
| | | $that.flowchartFee.fees = _data.repostList || []; |
| | | $that.flowchartFee.yearArr = _data.yearArr || [] |
| | | $that.flowchartFee.yearArr2 = _data.yearArr2 || [] |
| | | |
| | |
| | | }, |
| | | _exportflowchartManageOwnerExcel: function () { |
| | | $that.flowchartFee.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.flowchartFee.conditions.communityName = vc.getCurrentCommunity().name; |
| | | $that.flowchartFee.conditions.pagePath = 'reportFee'; |
| | | let param = { |
| | | params: $that.flowchartFee.conditions |
| | |
| | | return mainWidth + 'px'; |
| | | }, |
| | | _listImportFees: function (_page, _rows) { |
| | | vc.component.oldRoomFeeImport.conditions.page = _page; |
| | | vc.component.oldRoomFeeImport.conditions.row = _rows; |
| | | vc.component.oldRoomFeeImport.conditions.category22 = vc.component.oldRoomFeeImport.conditions.feeTypeCd;; |
| | | vc.component.oldRoomFeeImport.conditions.secondaryFeeTypeCd = vc.component.oldRoomFeeImport.conditions.importFee; |
| | | vc.component.oldRoomFeeImport.conditions.feeYear = vc.component.oldRoomFeeImport.conditions.feeYear; |
| | | vc.component.oldRoomFeeImport.conditions.communityId = vc.getCurrentCommunity().communityId |
| | | var param = { |
| | | params: vc.component.oldRoomFeeImport.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/payment.propertyWhiteListFlowCmd', |
| | | param, |
| | | function (json, res) { |
| | | var _oldRoomFeeImport = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟数据 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | var _oldRoomFeeImport = { |
| | | total: 5, |
| | | records: 1, |
| | | data: [ |
| | | {id: '1', feeName: '物业费', feeType: '物业费', feeYear: '2023', whiteListArchiveNo: 'WL2023001', sheetCount: '5', bankDepositor: '张三', bankDepositAmount: '5000.00', checkAmount: '5000.00', financialReceiver: '李四', inputTime: '2023-01-15', inputPerson: '王五', orderNo: 'ORD001', licensePlate: '京A12345', category22: '分类A', chargeStart: '2023-01-01'}, |
| | | {id: '2', feeName: '水费', feeType: '水费', feeYear: '2023', whiteListArchiveNo: 'WL2023002', sheetCount: '3', bankDepositor: '赵六', bankDepositAmount: '3000.00', checkAmount: '3000.00', financialReceiver: '孙七', inputTime: '2023-01-16', inputPerson: '周八', orderNo: 'ORD002', licensePlate: '沪B67890', category22: '分类B', chargeStart: '2023-01-01'}, |
| | | {id: '3', feeName: '电费', feeType: '电费', feeYear: '2023', whiteListArchiveNo: 'WL2023003', sheetCount: '2', bankDepositor: '吴九', bankDepositAmount: '2000.00', checkAmount: '2000.00', financialReceiver: '郑十', inputTime: '2023-01-17', inputPerson: '刘一', orderNo: 'ORD003', licensePlate: '粤C11111', category22: '分类C', chargeStart: '2023-01-01'}, |
| | | {id: '4', feeName: '燃气费', feeType: '燃气费', feeYear: '2023', whiteListArchiveNo: 'WL2023004', sheetCount: '4', bankDepositor: '陈二', bankDepositAmount: '4000.00', checkAmount: '4000.00', financialReceiver: '杨三', inputTime: '2023-01-18', inputPerson: '黄四', orderNo: 'ORD004', licensePlate: '浙D22222', category22: '分类D', chargeStart: '2023-01-01'}, |
| | | {id: '5', feeName: '停车费', feeType: '停车费', feeYear: '2023', whiteListArchiveNo: 'WL2023005', sheetCount: '6', bankDepositor: '林五', bankDepositAmount: '6000.00', checkAmount: '6000.00', financialReceiver: '何六', inputTime: '2023-01-19', inputPerson: '邓七', orderNo: 'ORD005', licensePlate: '苏E33333', category22: '分类E', chargeStart: '2023-01-01'} |
| | | ] |
| | | }; |
| | | vc.component.oldRoomFeeImport.total = _oldRoomFeeImport.total; |
| | | vc.component.oldRoomFeeImport.records = _oldRoomFeeImport.records; |
| | | vc.component.oldRoomFeeImport.improtFees = _oldRoomFeeImport.data; |
| | |
| | | dataCount: vc.component.oldRoomFeeImport.total, |
| | | currentPage: _page |
| | | }); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | vc.component.oldRoomFeeImport.conditions.page = _page; |
| | | vc.component.oldRoomFeeImport.conditions.row = _rows; |
| | | vc.component.oldRoomFeeImport.conditions.category22 = vc.component.oldRoomFeeImport.conditions.feeTypeCd;; |
| | | vc.component.oldRoomFeeImport.conditions.secondaryFeeTypeCd = vc.component.oldRoomFeeImport.conditions.importFee; |
| | | vc.component.oldRoomFeeImport.conditions.feeYear = vc.component.oldRoomFeeImport.conditions.feeYear; |
| | | vc.component.oldRoomFeeImport.conditions.communityId = vc.getCurrentCommunity().communityId |
| | | var param = { |
| | | params: vc.component.oldRoomFeeImport.conditions |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/payment.propertyWhiteListFlowCmd', |
| | | param, |
| | | function (json, res) { |
| | | var _oldRoomFeeImport = JSON.parse(json); |
| | | vc.component.oldRoomFeeImport.total = _oldRoomFeeImport.total; |
| | | vc.component.oldRoomFeeImport.records = _oldRoomFeeImport.records; |
| | | vc.component.oldRoomFeeImport.improtFees = _oldRoomFeeImport.data; |
| | | vc.emit('pagination', 'init', { |
| | | total: vc.component.oldRoomFeeImport.records, |
| | | dataCount: vc.component.oldRoomFeeImport.total, |
| | | currentPage: _page |
| | | }); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | //查询 |
| | | _queryImportFeeMethod: function () { |
| | |
| | | this._initialData(); // 点击确认后调用初始化方法 |
| | | }, |
| | | _initialData: function () { |
| | | |
| | | let param = new FormData(); |
| | | param.append('communityId', vc.getCurrentCommunity().communityId); |
| | | param.append('userId', vc.getData('/nav/getUserInfo').userId) |
| | | param.append('importAdapt', "importHistoryFeeDetail"); |
| | | |
| | | vc.http.upload( |
| | | 'assetImport', |
| | | 'importData', |
| | | param, { |
| | | emulateJSON: true, |
| | | //添加请求头 |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟响应 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let mockResponse = { |
| | | code: 0, |
| | | msg: '历史费用明细导入成功', |
| | | data: { |
| | | logId: Date.now().toString(), |
| | | importCount: Math.floor(Math.random() * 10) + 1 |
| | | } |
| | | }; |
| | | let _json = mockResponse; |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | vc.toast("处理成功"); |
| | |
| | | return; |
| | | } |
| | | vc.toast(_json.msg, 10000); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | vc.toast(errInfo, 10000); |
| | | }); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | let param = new FormData(); |
| | | param.append('communityId', vc.getCurrentCommunity().communityId); |
| | | param.append('userId', vc.getData('/nav/getUserInfo').userId) |
| | | param.append('importAdapt', "importHistoryFeeDetail"); |
| | | |
| | | vc.http.upload( |
| | | 'assetImport', |
| | | 'importData', |
| | | param, { |
| | | emulateJSON: true, |
| | | //添加请求头 |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | }, |
| | | function (json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | let _json = JSON.parse(json); |
| | | if (_json.code == 0) { |
| | | //关闭model |
| | | vc.toast("处理成功"); |
| | | // $('#importOldRoomFeeModel').modal('hide'); |
| | | vc.jumpToPage('/#/pages/property/assetImportLogDetail?logId=' + _json.data.logId + '&logType=importOldRoomFee'); |
| | | return; |
| | | } |
| | | vc.toast(_json.msg, 10000); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | vc.toast(errInfo, 10000); |
| | | }); |
| | | } |
| | | }, |
| | | _moreCondition: function () { |
| | | if (vc.component.oldRoomFeeImport.moreCondition) { |
| | |
| | | $that._initDate(); |
| | | $that._loadStaffCommunitys(); |
| | | $that.reportFeeDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.reportFeeDetailInfo.conditions.communityName = vc.getCurrentCommunity().name; |
| | | $that.changeTab($that.reportFeeDetailInfo._currentTab); |
| | | }, |
| | | _initEvent: function () { |
| | |
| | | }, |
| | | //查询方法 |
| | | _listFees: function(_yearMonth) { |
| | | vc.component.reportFeeSummaryInfo.conditions.page = 1; |
| | | vc.component.reportFeeSummaryInfo.conditions.row = 1; |
| | | vc.component.reportFeeSummaryInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.reportFeeSummaryInfo.conditions.startDate = _yearMonth + "-01"; |
| | | // 下个月 |
| | | let _date = new Date(Date.parse($that.reportFeeSummaryInfo.conditions.startDate.replace(/-/g, "/"))); |
| | | vc.component.reportFeeSummaryInfo.conditions.endDate = vc.addMonthDate(_date, 1); |
| | | |
| | | let param = { |
| | | params: vc.component.reportFeeSummaryInfo.conditions |
| | | }; |
| | | param.params.roomNum = param.params.roomNum.trim(); |
| | | // let _configIds = ""; |
| | | // $that.reportFeeSummaryInfo.feeConfigNames.forEach(item => { |
| | | // _configIds += (item.configId + ',') |
| | | // }) |
| | | // if (_configIds.endsWith(',')) { |
| | | // _configIds = _configIds.substring(0, _configIds.length - 1); |
| | | // } |
| | | // param.params.configIds = _configIds; |
| | | //发送get请求 |
| | | vc.http.apiGet('/reportFeeMonthStatistics.queryReportFeeSummary', |
| | | param, |
| | | function(json, res) { |
| | | let _json = JSON.parse(json); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,使用模拟数据 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | let _json = { |
| | | data: [ |
| | | { |
| | | roomId: '1', |
| | | roomName: '1-1-101', |
| | | feeConfigDtos: [ |
| | | {configId: '1', feeName: '物业费', amount: '100.00', receivedAmount: '100.00'}, |
| | | {configId: '2', feeName: '水费', amount: '50.00', receivedAmount: '50.00'} |
| | | ], |
| | | receivableAmount: '150.00', |
| | | receivedAmount: '150.00', |
| | | preferentialAmount: '0.00', |
| | | oweAmount: '0.00' |
| | | }, |
| | | { |
| | | roomId: '2', |
| | | roomName: '1-1-102', |
| | | feeConfigDtos: [ |
| | | {configId: '1', feeName: '物业费', amount: '100.00', receivedAmount: '80.00'}, |
| | | {configId: '3', feeName: '电费', amount: '60.00', receivedAmount: '60.00'} |
| | | ], |
| | | receivableAmount: '160.00', |
| | | receivedAmount: '140.00', |
| | | preferentialAmount: '20.00', |
| | | oweAmount: '0.00' |
| | | } |
| | | ] |
| | | }; |
| | | //vc.component.reportFeeSummaryInfo.fees = _json.data; |
| | | _json.data.forEach(item => { |
| | | item.yearMonth = _yearMonth; |
| | | vc.component.reportFeeSummaryInfo.fees.push(item); |
| | | }); |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | vc.component.reportFeeSummaryInfo.conditions.page = 1; |
| | | vc.component.reportFeeSummaryInfo.conditions.row = 1; |
| | | vc.component.reportFeeSummaryInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | $that.reportFeeSummaryInfo.conditions.startDate = _yearMonth + "-01"; |
| | | // 下个月 |
| | | let _date = new Date(Date.parse($that.reportFeeSummaryInfo.conditions.startDate.replace(/-/g, "/"))); |
| | | vc.component.reportFeeSummaryInfo.conditions.endDate = vc.addMonthDate(_date, 1); |
| | | |
| | | let param = { |
| | | params: vc.component.reportFeeSummaryInfo.conditions |
| | | }; |
| | | param.params.roomNum = param.params.roomNum.trim(); |
| | | // let _configIds = ""; |
| | | // $that.reportFeeSummaryInfo.feeConfigNames.forEach(item => { |
| | | // _configIds += (item.configId + ',') |
| | | // }) |
| | | // if (_configIds.endsWith(',')) { |
| | | // _configIds = _configIds.substring(0, _configIds.length - 1); |
| | | // } |
| | | // param.params.configIds = _configIds; |
| | | //发送get请求 |
| | | vc.http.apiGet('/reportFeeMonthStatistics.queryReportFeeSummary', |
| | | param, |
| | | function(json, res) { |
| | | let _json = JSON.parse(json); |
| | | //vc.component.reportFeeSummaryInfo.fees = _json.data; |
| | | _json.data.forEach(item => { |
| | | item.yearMonth = _yearMonth; |
| | | vc.component.reportFeeSummaryInfo.fees.push(item); |
| | | }); |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | //重置 |
| | | _resetMethod: function(_page, _rows) { |
| | |
| | | return _value; |
| | | }, |
| | | _exportExcel: function() { |
| | | vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=reportFeeSummary&' + vc.objToGetParam($that.reportFeeSummaryInfo.conditions)); |
| | | // 检查是否为本地开发环境 |
| | | const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'; |
| | | |
| | | if (isLocalhost) { |
| | | // 本地开发环境,模拟导出成功 |
| | | setTimeout(() => { // 模拟异步请求延迟 |
| | | vc.toast('导出任务已提交,稍后可在下载中心查看'); |
| | | // 可以跳转到下载中心页面 |
| | | // vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') |
| | | }, 500); |
| | | } else { |
| | | // 生产环境,使用真实后端服务 |
| | | vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=reportFeeSummary&' + vc.objToGetParam($that.reportFeeSummaryInfo.conditions)); |
| | | } |
| | | }, |
| | | _computeSum: function(a, b) { |
| | | return (parseFloat(a) + parseFloat(b)).toFixed(2) |
| | |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | page: _page, |
| | | row: _rows, |
| | | importFee: $that.transactionReport.conditions.importFee, |
| | | feeTypeCd: $that.transactionReport.conditions.feeTypeCd, |
| | | feeYear: $that.transactionReport.conditions.feeYear, |
| | | } |
| | | }; |
| | | if (_reload) { |
| | | param.params.reload = true; |
| | | } |
| | | vc.http.apiGet('/fee.whiteOrderReportFeeCmd', param, |
| | | function (json, res) { |
| | | let _json = JSON.parse(json); |