mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
按钮
This commit is contained in:
parent
8ba6bbcba2
commit
bc9b18c49e
@ -1,52 +1,50 @@
|
||||
(function(vc,vm){
|
||||
(function(vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
deleteOrgInfo:{
|
||||
data: {
|
||||
deleteOrgInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function() {
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('deleteOrg','openDeleteOrgModal',function(_params){
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('deleteOrg', 'openDeleteOrgModal', function(_params) {
|
||||
|
||||
vc.component.deleteOrgInfo = _params;
|
||||
$('#deleteOrgModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
deleteOrg:function(){
|
||||
//vc.component.deleteOrgInfo.communityId=vc.getCurrentCommunity().communityId;
|
||||
vc.http.post(
|
||||
'deleteOrg',
|
||||
'delete',
|
||||
JSON.stringify(vc.component.deleteOrgInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
methods: {
|
||||
deleteOrg: function() {
|
||||
vc.http.apiPost(
|
||||
'/org.deleteOrg',
|
||||
JSON.stringify(vc.component.deleteOrgInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if(res.status == 200){
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteOrgModel').modal('hide');
|
||||
vc.emit('orgManage','listOrg',{});
|
||||
return ;
|
||||
vc.emit('orgManage', 'listOrg', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
},
|
||||
function(errInfo,error){
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(json);
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
closeDeleteOrgModel:function(){
|
||||
closeDeleteOrgModel: function() {
|
||||
$('#deleteOrgModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
})(window.vc, window.vc.component);
|
||||
@ -1,4 +1,29 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-1 text-right">
|
||||
<div class="form-group">
|
||||
收费对象
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<span class="margin-right" v-for="(item,index) in batchPayFeeOrderInfo.payObjs">
|
||||
<input type="checkbox" class="i-checks checkItem" v-bind:value="item" v-model="batchPayFeeOrderInfo.payerObjNames" @change="_chanagePayerObjName()"> {{item}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
data: {
|
||||
batchPayFeeOrderInfo: {
|
||||
batchFees: [],
|
||||
allBatchFees: [],
|
||||
selectPayFeeIds: [],
|
||||
feePrices: 0.00,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
@ -16,7 +17,9 @@
|
||||
primeRates: [],
|
||||
toFixedSign: 1, // 编码映射-应收款取值标识
|
||||
receivedAmountSwitch: '',
|
||||
offlinePayFeeSwitch: '1'
|
||||
offlinePayFeeSwitch: '1',
|
||||
payerObjNames: [],
|
||||
payObjs: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -74,10 +77,14 @@
|
||||
item.receivedAmount = item.receivableAmount;
|
||||
});
|
||||
let toFixedSign = _fees[0].val;
|
||||
|
||||
$that.batchPayFeeOrderInfo.allBatchFees = $that.batchPayFeeOrderInfo.batchFees;
|
||||
// 防止后台设置有误
|
||||
if (toFixedSign == 1 || toFixedSign == 2 || toFixedSign == 3 || toFixedSign == 4 || toFixedSign == 5) {
|
||||
$that.batchPayFeeOrderInfo.toFixedSign = toFixedSign;
|
||||
}
|
||||
|
||||
$that._pushPayObjs();
|
||||
$that._doComputeTotalFee();
|
||||
},
|
||||
function() {
|
||||
@ -85,6 +92,63 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_pushPayObjs: function() {
|
||||
let _allBatchFees = $that.batchPayFeeOrderInfo.allBatchFees;
|
||||
let _payObjs = $that.batchPayFeeOrderInfo.payObjs;
|
||||
let _payerObjNames = $that.batchPayFeeOrderInfo.payerObjNames;
|
||||
let _payerObjName = '';
|
||||
_allBatchFees.forEach(_fee => {
|
||||
_payerObjName = '';
|
||||
_fee.feeAttrs.forEach(item => {
|
||||
if (item.specCd == '390012') {
|
||||
_payerObjName = item.value;
|
||||
}
|
||||
})
|
||||
if (_payerObjName && !$that._hasPayObjsIn(_payerObjName)) {
|
||||
_payObjs.push(_payerObjName);
|
||||
_payerObjNames.push(_payerObjName);
|
||||
}
|
||||
});
|
||||
},
|
||||
_chanagePayerObjName: function() {
|
||||
let _allBatchFees = $that.batchPayFeeOrderInfo.allBatchFees;
|
||||
$that.batchPayFeeOrderInfo.batchFees = [];
|
||||
_allBatchFees.forEach(_fee => {
|
||||
_payerObjName = '';
|
||||
_fee.feeAttrs.forEach(item => {
|
||||
if (item.specCd == '390012') {
|
||||
_payerObjName = item.value;
|
||||
}
|
||||
})
|
||||
if (_payerObjName && $that._hasPayObjNamesIn(_payerObjName)) {
|
||||
$that.batchPayFeeOrderInfo.batchFees.push(_fee)
|
||||
}
|
||||
});
|
||||
|
||||
$that._doComputeTotalFee();
|
||||
},
|
||||
_hasPayObjsIn: function(_payerObjName) {
|
||||
let _payObjs = $that.batchPayFeeOrderInfo.payObjs;
|
||||
let _hasIn = false;
|
||||
_payObjs.forEach(item => {
|
||||
if (item == _payerObjName) {
|
||||
_hasIn = true;
|
||||
}
|
||||
});
|
||||
|
||||
return _hasIn;
|
||||
},
|
||||
_hasPayObjNamesIn: function(_payerObjName) {
|
||||
let _payObjs = $that.batchPayFeeOrderInfo.payerObjNames;
|
||||
let _hasIn = false;
|
||||
_payObjs.forEach(item => {
|
||||
if (item == _payerObjName) {
|
||||
_hasIn = true;
|
||||
}
|
||||
});
|
||||
console.log(_payerObjName, _hasIn)
|
||||
return _hasIn;
|
||||
},
|
||||
_payFee: function() {
|
||||
if (vc.component.batchPayFeeOrderInfo.selectPayFeeIds.length <= 0) {
|
||||
vc.toast('未选择费用');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user