$scope.total_m > 제휴게시판

고객센터

제휴게시판


$scope.total_m

페이지 정보

profile_image
작성자 보증수리
댓글 0건 조회 990회 작성일 23-10-15 03:21

본문

$scope.total_mem_amt = 0; // 보험 상품 정보 바인딩 $scope.bindInsuranceInfo = function(){ if( $scope.vo.product_list != undefined ){ for(var i = 0; i < $scope.vo.product_list.length; i++){ if( $scope.vo.product_list[i].insurance_code == $scope.vo.requestParam.insurance_code ){ $scope.vo.current_product_info = $scope.vo.product_list[i]; //$scope.vo.current_product_info.product_name_tel = $scope.vo.product_list[i].product_name_tel.replace("TEL","텔레"); break; } } } }; // 상품관련 멤버 계산 $scope.vo.total_mem_amt = 0; $scope.calcTotalMemAmt = function(){ // 해당 상품의 멤버리스트 var member_list = $scope.vo.member_list; var temp_member = undefined; // 각 멤버별 총 이용금액 var total_amt = 0; for(var i = 0; i < member_list.length; i++){ temp_member = $scope.vo.member_list[i]; total_amt += temp_member.total_amt; } $scope.vo.total_mem_amt = total_amt; }; // 각 멤버의 가입금액 총합 계산 $scope.calcMemAmt = function(member){ // 멤버의 가입금액 var total_amt = 0; angular.forEach(member.insurance_list, function(item, index){ total_amt += item.insu_amt; }); member.total_amt = total_amt; // 멤버별 가입금액 총합 계산 $scope.calcTotalMemAmt(); }; // 각 멤버의 보험상품 선택시 $scope.onMemberInsuranceSelect = function(member){ var insurance_code = member.insurance_code; // 보험상품이 변경되었을때 if( $scope.vo.current_member_insu_code != insurance_code ){ // 멤버 기준 보험상품정보 바인딩 member.insurance_list = []; // 상품별 보험상품 정보 셋팅 $scope.setMemberInsuInfo(member); // 멤버별 가입금액 재계산 $scope.calcMemAmt(member); // 현재 멤버 보험상품 코드 저장 $scope.vo.current_member_insu_code = insurance_code; } }; // 보험상품 정보 셋팅 $scope.setMemberInsuInfo = function(member){ if( $scope.vo.current_product_info != undefined && $scope.vo.current_product_info.insurance_list

댓글목록

등록된 댓글이 없습니다.

Partners