mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
b920648b96
commit
e1c7cb5f15
@ -99,7 +99,8 @@
|
||||
squarePrice: _oweFeeItem.squarePrice,
|
||||
additionalAmount: _oweFeeItem.additionalAmount,
|
||||
feeName: _oweFeeItem.feeName,
|
||||
amount: _oweFeeItem.feePrice
|
||||
amount: _oweFeeItem.feePrice,
|
||||
roomName:$that.owePayFeeOrderInfo.roomName
|
||||
});
|
||||
}
|
||||
})
|
||||
@ -177,7 +178,7 @@
|
||||
vc.goBack();
|
||||
},
|
||||
_printOwnOrder: function () {
|
||||
vc.saveData('java110_printFee', $that.owePayFeeOrderInfo.oweFees);
|
||||
vc.saveData('java110_printFee', {fees:$that.owePayFeeOrderInfo.oweFees,roomName:$that.owePayFeeOrderInfo.roomName});
|
||||
//打印催交单
|
||||
window.open('/print.html#/pages/property/printOweFee?roomId=' + $that.owePayFeeOrderInfo.payObjId)
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<th scope="col" class="text-center">项目名称</th>
|
||||
<th scope="col" class="text-center">费用期间</th>
|
||||
<th scope="col" class="text-center">单位</th>
|
||||
<th scope="col" class="text-center">面积/用量</th>
|
||||
<th scope="col" class="text-center">面积</th>
|
||||
<th scope="col" class="text-center">单价</th>
|
||||
<th scope="col" class="text-center">金额</th>
|
||||
</tr>
|
||||
@ -33,7 +33,7 @@
|
||||
<td class="text-center">{{vc.dateFormat(item.endTime)}}至{{vc.dateFormat(item.deadlineTime)}}
|
||||
</td>
|
||||
<td class="text-center">元</td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center">{{printPayFeeInfo.builtUpArea}}</td>
|
||||
<td class="text-center">{{item.squarePrice}}/{{item.additionalAmount}}</td>
|
||||
<td class="text-center">{{item.feePrice}}</td>
|
||||
</tr>
|
||||
|
||||
@ -9,8 +9,10 @@
|
||||
fees: [],
|
||||
feeTime: '',
|
||||
wechatName: '',
|
||||
content:'',
|
||||
qrImg:''
|
||||
content: '',
|
||||
qrImg: '',
|
||||
roomId: '',
|
||||
builtUpArea: ''
|
||||
},
|
||||
printFlag: '0'
|
||||
},
|
||||
@ -18,19 +20,23 @@
|
||||
//vc.component._initPrintPurchaseApplyDateInfo();
|
||||
|
||||
let _fees = vc.getData('java110_printFee');
|
||||
$that.printPayFeeInfo.fees = _fees
|
||||
$that.printPayFeeInfo.fees = _fees.fees
|
||||
|
||||
$that.printPayFeeInfo.roomId = vc.getParam('roomId')
|
||||
$that._printOweRoom();
|
||||
|
||||
$that.printPayFeeInfo.feeTime = vc.dateTimeFormat(new Date().getTime());
|
||||
|
||||
$that.printPayFeeInfo.communityName = vc.getCurrentCommunity().name;
|
||||
|
||||
let _totalAmount = 0.0;
|
||||
_fees.forEach(item => {
|
||||
$that.printPayFeeInfo.fees.forEach(item => {
|
||||
_totalAmount += item.feePrice;
|
||||
});
|
||||
_totalAmount = Math.round(_totalAmount * 100) / 100;
|
||||
$that.printPayFeeInfo.feePrices = _totalAmount;
|
||||
|
||||
$that._loadPrintSpec();
|
||||
$that._loadPrintSpec();
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
@ -81,6 +87,33 @@
|
||||
_closePage: function () {
|
||||
window.opener = null;
|
||||
window.close();
|
||||
},
|
||||
_printOweRoom: function () {
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 1,
|
||||
roomId: $that.printPayFeeInfo.roomId,
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.get('roomCreateFee',
|
||||
'listRoom',
|
||||
param,
|
||||
function (json, res) {
|
||||
var listRoomData = JSON.parse(json);
|
||||
vc.copyObject(listRoomData.rooms[0], $that.printPayFeeInfo);
|
||||
if (listRoomData.rooms[0].roomType == '2020602') {
|
||||
$that.printPayFeeInfo.roomName = listRoomData.rooms[0].floorNum + '-' + listRoomData.rooms[0].roomNum;
|
||||
} else {
|
||||
$that.printPayFeeInfo.roomName = listRoomData.rooms[0].floorNum + '-' + listRoomData.rooms[0].unitNum + '-' + listRoomData.rooms[0].roomNum;
|
||||
}
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user