运营加入小区费用项

This commit is contained in:
wuxw 2025-03-02 18:40:06 +08:00
parent 8e056fd351
commit e8457c334e
4 changed files with 402 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<!-- 弹出层 modal -->
<div class="bg-white margin-top-xs padding border-radius tree-div">
<div id="jstree_communityFeeTypeTreeDiv">
</div>
<!-- end 弹出层 moda -->
</div>

View File

@ -0,0 +1,93 @@
(function (vc) {
let DEFAULT_PAGE = 1;
let DEFAULT_ROW = 10;
vc.extends({
data: {
communityFeeTypeTreeInfo: {
feeTypeCds: [],
callName: ''
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('communityFeeTypeTree', 'initCommunityFeeTypeTree', function (_param) {
$that.communityFeeTypeTreeInfo.callName = _param.callName;
$that._loadCommunityFeeTypeTree();
});
},
methods: {
_loadCommunityFeeTypeTree: function () {
let param = {
params: {
hc:1.8
}
};
//发送get请求
vc.http.apiGet('/community.queryCommunityFeeTypeTree',
param,
function (json) {
let _json = JSON.parse(json);
$that.communityFeeTypeTreeInfo.feeTypeCds = _json.data;
$that._initJsTreeCommunityFeeTypeTree();
},
function () {
console.log('请求失败处理');
});
},
_initJsTreeCommunityFeeTypeTree: function () {
let _data = $that.communityFeeTypeTreeInfo.feeTypeCds;
$.jstree.destroy()
$("#jstree_communityFeeTypeTreeDiv").jstree({
"checkbox": {
"keep_selected_style": false
},
'state': { //一些初始化状态
"opened": true,
},
'core': {
"check_callback": true,
'data': _data
}
});
$("#jstree_communityFeeTypeTreeDiv").on("ready.jstree", function (e, data) {
$('#jstree_communityFeeTypeTreeDiv').jstree('select_node', _data[0].children[0].id /* , true */);
});
$('#jstree_communityFeeTypeTreeDiv').on("changed.jstree", function (e, data) {
if (data.action == 'model' || data.action == 'ready') {
return;
}
let _selected = data.selected[0];
if (_selected.startsWith('c_')) {
vc.emit($that.communityFeeTypeTreeInfo.callName, 'selectCommunity', {
communityName: data.node.original.communityName,
communityId: data.node.original.communityId
})
return;
}
if (_selected.startsWith('f_')) {
console.log(data.node);
vc.emit($that.communityFeeTypeTreeInfo.callName, 'selectFeeTypeCd', {
feeTypeCd: data.node.original.feeTypeCd,
communityId: data.node.original.communityId
})
return;
}
//console.log(_selected, data.node.original.unitId)
if (_selected.startsWith('l_')) {
vc.emit($that.communityFeeTypeTreeInfo.callName, 'selectFeeFlag', {
feeFlag: data.node.original.feeFlag,
feeTypeCd: data.node.original.feeTypeCd,
communityId: data.node.original.communityId
})
}
});
$('#jstree_communityFeeTypeTreeDiv')
.on('click', '.jstree-anchor', function (e) {
$(this).jstree(true).toggle_node(e.target);
})
},
}
});
})(window.vc);

View File

@ -0,0 +1,159 @@
<div class="animated fadeInRight ecommerce">
<div class="flex justify-start">
<div style="padding-right:0px;width: 200px;" class="room-floor-unit-tree">
<vc:create path="fee/communityFeeTypeTree"></vc:create>
</div>
<div class="margin-top-xs margin-left-sm" style="flex-grow: 1;">
<div class="ibox ">
<div class="ibox-title">
<h5>
<vc:i18n name="查询条件" namespace="adminFeeConfig"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入费用项ID','adminFeeConfig')"
v-model="adminFeeConfigInfo.conditions.configId" class=" form-control">
</div>
</div>
<!--收费项目-->
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入收费项目','adminFeeConfig')"
v-model="adminFeeConfigInfo.conditions.feeName" class=" form-control">
</div>
</div>
<div class="col-sm-2">
<select class="custom-select" v-model="adminFeeConfigInfo.conditions.feeFlag">
<option selected value="">{{vc.i18n('请选择费用标识','adminFeeConfig')}}</option>
<option v-for="(item,index) in adminFeeConfigInfo.feeFlags" :key="index"
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
<div class="col-sm-2">
<select class="custom-select" v-model="adminFeeConfigInfo.conditions.paymentCd">
<option selected value="">{{vc.i18n('请选择付费类型','adminFeeConfig')}}</option>
<option v-for="(item,index) in adminFeeConfigInfo.paymentCds" :key="index"
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
<div class="col-sm-2">
<select class="custom-select" v-model="adminFeeConfigInfo.conditions.deductFrom">
<option selected value="">{{vc.i18n('请选择账户抵扣','adminFeeConfig')}}</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeConfigMethod()">
<vc:i18n name="查询" namespace="adminFeeConfig"></vc:i18n>
</button>
<button type="button" class="btn btn-info btn-sm" v-on:click="_resetFeeConfigMethod()"
style="margin-left: 20px;">
<vc:i18n name="重置" namespace="adminFeeConfig"></vc:i18n>
</button>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="费用项" namespace="adminFeeConfig"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="编号" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="费用类型" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="收费项目" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="费用标识" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="付费类型" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="缴费周期(单位:月)" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="公式" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="计费单价(单位:元)" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="附加/固定费用(单位:元)" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="账户抵扣" namespace="adminFeeConfig"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="状态" namespace="adminFeeConfig"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="feeConfig in adminFeeConfigInfo.feeConfigs">
<td class="text-center">{{feeConfig.configId}}</td>
<td class="text-center">{{feeConfig.feeTypeCdName}}</td>
<td class="text-center">{{feeConfig.feeName}}</td>
<td class="text-center">{{feeConfig.feeFlagName}}</td>
<td class="text-center">{{feeConfig.paymentCd == '1200' ? '预付费':'后付费'}}</td>
<td class="text-center">{{feeConfig.paymentCycle}}</td>
<td class="text-center">{{feeConfig.computingFormulaName}}</td>
<td class="text-center">{{feeConfig.computingFormula == '2002' ?
'-':feeConfig.squarePrice}}
</td>
<td class="text-center">{{feeConfig.additionalAmount}}</td>
<td class="text-center">{{feeConfig.deductFrom == 'Y' ? '是':'否'}}</td>
<td class="text-center">{{feeConfig.state == 'Y'?'启用':'停用'}}</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<div class="row margin-top-xs">
<div class="col-sm-9">
<div>
费用标识:分为周期费用和一次性费用,周期费是连续收费的费用比如物业费每年都会收取,所以物业费建议用周期费;
</div>
<div>
一次性费用表示费用只收取一次比如押金,下次收费时还需要手工创建到房屋上;
</div>
<div>
付费类型:分为预付费和后付费,预付费表示费用提前收费 后付费表示之后收取;
</div>
</div>
<div class="col-sm-3 float-right">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>
<vc:create path="property/addFeeConfig" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="property/editFeeConfig"></vc:create>
<vc:create path="property/deleteFeeConfig"></vc:create>
</div>
</div>

View File

@ -0,0 +1,144 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
adminFeeConfigInfo: {
feeConfigs: [],
total: 0,
records: 1,
moreCondition: false,
feeName: '',
paymentCds: [],
billTypes: [],
isDefaults: [],
curPage: DEFAULT_PAGE,
conditions: {
configId: '',
feeFlag: '',
billType: '',
feeName: '',
feeTypeCd: '',
isDefault: 'F',
paymentCd: '',
deductFrom: ''
}
}
},
_initMethod: function () {
vc.emit('communityFeeTypeTree', 'initCommunityFeeTypeTree',{
callName:'adminFeeConfig'
});
$that._listAdminFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
//关联字典表费用类型
//关联字典表付费类型
vc.getDict('pay_fee_config', 'payment_cd', function (_data) {
$that.adminFeeConfigInfo.paymentCds = _data;
});
//关联字典表费用项
vc.getDict('pay_fee_config', 'is_default', function (_data) {
$that.adminFeeConfigInfo.isDefaults = _data;
})
},
_initEvent: function () {
vc.on('adminFeeConfig', 'selectCommunity', function (_param) {
$that.adminFeeConfigInfo.conditions.communityId = _param.communityId;
$that.adminFeeConfigInfo.conditions.feeTypeCd = '';
$that.adminFeeConfigInfo.conditions.feeFlag = '';
$that._listAdminFeeConfigs(DEFAULT_PAGE,DEFAULT_ROWS);
});
vc.on('adminFeeConfig', 'selectFeeTypeCd', function (_param) {
$that.adminFeeConfigInfo.conditions.communityId = _param.communityId;
$that.adminFeeConfigInfo.conditions.feeTypeCd = _param.feeTypeCd;
$that.adminFeeConfigInfo.conditions.feeFlag = '';
$that._listAdminFeeConfigs(DEFAULT_PAGE,DEFAULT_ROWS);
});
vc.on('adminFeeConfig', 'selectFeeFlag', function (_param) {
$that.adminFeeConfigInfo.conditions.communityId = _param.communityId;
$that.adminFeeConfigInfo.conditions.feeTypeCd = _param.feeTypeCd;
$that.adminFeeConfigInfo.conditions.feeFlag = _param.feeFlag;
$that._listAdminFeeConfigs(DEFAULT_PAGE,DEFAULT_ROWS);
});
vc.on('adminFeeConfig', 'listFeeConfig',
function (_param) {
$that._listAdminFeeConfigs($that.adminFeeConfigInfo.curPage, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event',
function (_currentPage) {
$that.adminFeeConfigInfo.curPage = _currentPage;
$that._listAdminFeeConfigs(_currentPage, DEFAULT_ROWS);
});
},
methods: {
//查询方法
_listAdminFeeConfigs: function (_page, _rows) {
$that.adminFeeConfigInfo.conditions.page = _page;
$that.adminFeeConfigInfo.conditions.row = _rows;
let param = {
params: $that.adminFeeConfigInfo.conditions
};
//发送get请求
vc.http.apiGet('/feeConfig.queryAdminFeeConfigs',
param,
function (json, res) {
let _json = JSON.parse(json);
$that.adminFeeConfigInfo.total = _json.total;
$that.adminFeeConfigInfo.records = _json.records;
$that.adminFeeConfigInfo.feeConfigs = _json.feeConfigs;
vc.emit('pagination', 'init', {
total: $that.adminFeeConfigInfo.records,
dataCount: $that.adminFeeConfigInfo.total,
currentPage: _page
});
},
function (errInfo, error) {
console.log('请求失败处理');
}
);
},
//重置方法
_resetListFeeConfigs: function () {
$that.adminFeeConfigInfo.conditions.configId = '';
$that.adminFeeConfigInfo.conditions.feeName = '';
$that.adminFeeConfigInfo.conditions.feeTypeCd = '';
$that.adminFeeConfigInfo.conditions.feeFlag = '';
$that.adminFeeConfigInfo.conditions.paymentCd = '';
$that.adminFeeConfigInfo.conditions.billType = '';
$that.adminFeeConfigInfo.conditions.isDefault = '';
$that.adminFeeConfigInfo.conditions.deductFrom = '';
$that._listAdminFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
},
//查询
_queryFeeConfigMethod: function () {
$that._listAdminFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
},
//重置
_resetFeeConfigMethod: function () {
$that._resetListFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if ($that.adminFeeConfigInfo.moreCondition) {
$that.adminFeeConfigInfo.moreCondition = false;
} else {
$that.adminFeeConfigInfo.moreCondition = true;
}
},
_settingConfigDiscount: function (_feeConfig) {
vc.jumpToPage('/#/pages/property/payFeeConfigDiscountManage?configId=' + _feeConfig.configId + "&feeName=" + _feeConfig.feeName);
},
swatchFeeTypeCd: function (item) {
$that.adminFeeConfigInfo.conditions.feeTypeCd = item.statusCd;
$that._listAdminFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
},
_openFeeConfigDetail: function (_feeConfig) {
window.open('/#/pages/fee/feeConfigDetail?configId=' + _feeConfig.configId)
}
}
});
})(window.vc);