mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
按钮
This commit is contained in:
parent
8ba6bbcba2
commit
bc9b18c49e
@ -1,52 +1,50 @@
|
|||||||
(function(vc,vm){
|
(function(vc, vm) {
|
||||||
|
|
||||||
vc.extends({
|
vc.extends({
|
||||||
data:{
|
data: {
|
||||||
deleteOrgInfo:{
|
deleteOrgInfo: {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod:function(){
|
_initMethod: function() {
|
||||||
|
|
||||||
},
|
},
|
||||||
_initEvent:function(){
|
_initEvent: function() {
|
||||||
vc.on('deleteOrg','openDeleteOrgModal',function(_params){
|
vc.on('deleteOrg', 'openDeleteOrgModal', function(_params) {
|
||||||
|
|
||||||
vc.component.deleteOrgInfo = _params;
|
vc.component.deleteOrgInfo = _params;
|
||||||
$('#deleteOrgModel').modal('show');
|
$('#deleteOrgModel').modal('show');
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
deleteOrg:function(){
|
deleteOrg: function() {
|
||||||
//vc.component.deleteOrgInfo.communityId=vc.getCurrentCommunity().communityId;
|
vc.http.apiPost(
|
||||||
vc.http.post(
|
'/org.deleteOrg',
|
||||||
'deleteOrg',
|
JSON.stringify(vc.component.deleteOrgInfo), {
|
||||||
'delete',
|
emulateJSON: true
|
||||||
JSON.stringify(vc.component.deleteOrgInfo),
|
},
|
||||||
{
|
function(json, res) {
|
||||||
emulateJSON:true
|
|
||||||
},
|
|
||||||
function(json,res){
|
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if(res.status == 200){
|
let _json = JSON.parse(json);
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
$('#deleteOrgModel').modal('hide');
|
$('#deleteOrgModel').modal('hide');
|
||||||
vc.emit('orgManage','listOrg',{});
|
vc.emit('orgManage', 'listOrg', {});
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
vc.toast(json);
|
vc.toast(_json.msg);
|
||||||
},
|
},
|
||||||
function(errInfo,error){
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
vc.toast(json);
|
vc.toast(json);
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeDeleteOrgModel:function(){
|
closeDeleteOrgModel: function() {
|
||||||
$('#deleteOrgModel').modal('hide');
|
$('#deleteOrgModel').modal('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})(window.vc,window.vc.component);
|
})(window.vc, window.vc.component);
|
||||||
@ -1,4 +1,29 @@
|
|||||||
<div>
|
<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="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="ibox">
|
<div class="ibox">
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
data: {
|
data: {
|
||||||
batchPayFeeOrderInfo: {
|
batchPayFeeOrderInfo: {
|
||||||
batchFees: [],
|
batchFees: [],
|
||||||
|
allBatchFees: [],
|
||||||
selectPayFeeIds: [],
|
selectPayFeeIds: [],
|
||||||
feePrices: 0.00,
|
feePrices: 0.00,
|
||||||
communityId: vc.getCurrentCommunity().communityId,
|
communityId: vc.getCurrentCommunity().communityId,
|
||||||
@ -16,7 +17,9 @@
|
|||||||
primeRates: [],
|
primeRates: [],
|
||||||
toFixedSign: 1, // 编码映射-应收款取值标识
|
toFixedSign: 1, // 编码映射-应收款取值标识
|
||||||
receivedAmountSwitch: '',
|
receivedAmountSwitch: '',
|
||||||
offlinePayFeeSwitch: '1'
|
offlinePayFeeSwitch: '1',
|
||||||
|
payerObjNames: [],
|
||||||
|
payObjs: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -74,10 +77,14 @@
|
|||||||
item.receivedAmount = item.receivableAmount;
|
item.receivedAmount = item.receivableAmount;
|
||||||
});
|
});
|
||||||
let toFixedSign = _fees[0].val;
|
let toFixedSign = _fees[0].val;
|
||||||
|
|
||||||
|
$that.batchPayFeeOrderInfo.allBatchFees = $that.batchPayFeeOrderInfo.batchFees;
|
||||||
// 防止后台设置有误
|
// 防止后台设置有误
|
||||||
if (toFixedSign == 1 || toFixedSign == 2 || toFixedSign == 3 || toFixedSign == 4 || toFixedSign == 5) {
|
if (toFixedSign == 1 || toFixedSign == 2 || toFixedSign == 3 || toFixedSign == 4 || toFixedSign == 5) {
|
||||||
$that.batchPayFeeOrderInfo.toFixedSign = toFixedSign;
|
$that.batchPayFeeOrderInfo.toFixedSign = toFixedSign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$that._pushPayObjs();
|
||||||
$that._doComputeTotalFee();
|
$that._doComputeTotalFee();
|
||||||
},
|
},
|
||||||
function() {
|
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() {
|
_payFee: function() {
|
||||||
if (vc.component.batchPayFeeOrderInfo.selectPayFeeIds.length <= 0) {
|
if (vc.component.batchPayFeeOrderInfo.selectPayFeeIds.length <= 0) {
|
||||||
vc.toast('未选择费用');
|
vc.toast('未选择费用');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user