Store this code. Do nothing with it. (function () {
 'use strict';

 angular
 .module('app')
 .directive('transactionhistory', transactionhistory);

 transactionhistory.$inject = ['$log', '$rootScope', 'loanKeyFactory', 'loanFactory', 'utilFactory', 'ccViewService', 'exportTransactionsService','WorksheetService'];
 /\* @ngInject \*/
 function transactionhistory($log, $rootScope, loanKeyFactory, loanFactory, utilFactory, ccViewService, exportTransactionsService, WorksheetService) {
 var directive = {
 restrict: 'A',
 scope: true,
 templateUrl: 'app/workform/sections/transactionhistory.html',
 link: link
 };

 return directive;

 function link(scope, element, attrs) {
 scope.loading = true;
 scope.CurrentTab = "Loan";
 scope.$on('loanKey:change', getTransactionHistory);
 scope.$on('tabs:Refresh', getTransactionHistory);
 scope.x = loanKeyFactory.getWorkFormRoleConfig();
 var loanKey = loanKeyFactory.getLoanKey();
 var loanId = loanKey.replace("O/L/", "");
 WorksheetService.getDepositoryAccountTransactions(loanId).then(function (transactions) {
 scope.depositoryAccountTransactions = transactions.data;
 });

 scope.gridTransactions = {
 minRowsToShow: 40,
 headerRowHeight: 35,
 enableRowSelection: false,
 enableRowHeaderSelection: false,
 enableGridMenu: false,
 enableColumnMenus: false,
 enableHorizontalScrollbar: 0,
 enableVerticalScrollbar: 0,
 enableColumnResize: true,
 onRegisterApi: function (gridApi) {
 scope.gridApi = gridApi;
 },
 columnDefs: [
 {
 field: 'EffectiveDate',
 name: 'Eff. Date',
 cellTemplate: "{{row.entity.EffectiveDate | date:'MM/dd/yyyy'}}"
 },
 {
 field: 'EffectiveDate',
 name: 'Eff. Time',
 cellTemplate: "{{row.entity.EffectiveDate | date:'hh:mm:ss a'}}"
 },
 {
 field: 'TransactionNumber',
 name: 'Number',
 cellTemplate: "{{row.entity.TransactionNumber}}"
 },
 {
 field: 'TransactionType',
 name: 'Type',
 width: '12.5%',
 cellTemplate: "{{row.entity.TransactionType}}"
 },
 {
 field: 'TransactionMode',
 name: 'Method',
 width: '12.5%',
 cellTemplate: "{{row.entity.TransactionMode}}"
 },
 {
 field: 'TotalAmount',
 name: 'Total Amount',
 cellTemplate: "{{row.entity.TotalAmount | negativeNumberFormat}}"
 },
 {
 field: 'Principal',
 name: 'Principal',
 cellTemplate: "{{row.entity.Principal | negativeNumberFormat}}"
 },
 {
 field: 'Interest',
 name: 'Interest',
 cellTemplate: "{{row.entity.Interest | negativeNumberFormat}}"
 },
 {
 field: 'PrincipalBad',
 name: 'Principal - Bad Debt',
 cellTemplate: "{{row.entity.PrincipalBad | negativeNumberFormat}}"
 },
 {
 field: 'InterestBad',
 name: 'Interest - Bad Debt',
 cellTemplate: "{{row.entity.InterestBad | negativeNumberFormat}}"
 },
 {
 field: 'LateFee',
 name: 'Late Fee',
 cellTemplate: "{{row.entity.LateFee | negativeNumberFormat}}"
 },
 {
 field: 'ServiceCharge',
 name: 'Service Charge',
 cellTemplate: "{{row.entity.ServiceCharge | negativeNumberFormat}}"
 }
 ]
 };
 getTransactionHistory();

 function getTransactionHistory() {
 scope.loading = true;

 var key = loanKeyFactory.getLoanKey();

 scope.loanAttributes = loanKeyFactory.getLoanAttributes();

 if (key === '' || key === "" || key === undefined || key === null) {
 //no loanKey. Nothing to load.
 scope.loading = false;
 }
 else {
 loanFactory.getTransactionHistory(key).then(function (response) {
 scope.loading = false;
 scope.gridTransactions.data = response;
 });

 }
 }

 scope.exportTypeList = [
 // { id: 'All', name: 'Get Entire File' },
 // { id: 'Approved', name: 'Get Approved File' },
 // { id: 'Denied', name: 'Get Denied File' },
 // { id: 'PDT', name: 'PDT Export File' },
 { id: 'CSV', name: 'CSV' }
 ];

 scope.ExportFile = function (ExportFilter) {
 scope.exporting = true;

 exportTransactionsService.exportTransactionsWorkform(scope.loanAttributes.LoanNumber, scope.loanAttributes.Organization, ExportFilter).then(
 function Success(response) {

 scope.exporting = false;

 //Construct file name
 var fileName = '';

 switch (ExportFilter) {
 // case 'All':
 // fileName = scope.selectedFileName + '.txt';
 // break;
 // case 'Approved':
 // fileName = scope.selectedFileName + '\_Approved.txt';
 // break;
 // case 'Denied':
 // fileName = scope.selectedFileName + '\_Denied.txt';
 // break;
 // case 'PDT':
 // fileName = 'PDT Export File ' + scope.selectedFileName + '.txt';
 // break;
 case 'CSV':
 fileName = 'TransactionHistory\_' + scope.loanAttributes.LoanNumber + '.csv';
 break;
 }

 if (scope.miseversion()) {
 var file = new Blob([response.data], {
 type: 'text/csv'
 });
 navigator.msSaveBlob(file, fileName)
 }
 else {
 var file = new Blob([response.data], {
 type: 'text/csv'
 });
 var fileURL = URL.createObjectURL(file);
 var a = document.createElement('a');
 a.href = fileURL;
 a.target = '\_blank';
 a.download = fileName;
 document.body.appendChild(a);
 a.click();
 }

 scope.ExportFilter = '';
 },
 function Failed(error) {
 // scope.exportError = true;
 window.alert('There was an error exporting the transaction history for account number ' + scope.loanAttributes.LoanNumber + '. Please try again. \n\nIf the problem continues, contact an administrator.');
 scope.exporting = false;
 }
 )
 }

 scope.miseversion = function () {
 var ua = window.navigator.userAgent;
 var msie = ua.indexOf("MSIE ");
 if (msie > 0 || window.navigator.userAgent.match(/Trident.\*rv\:11\./)) // If Internet Explorer, return true
 {
 console.log('Browser = IE')
 return true;
 } else { // If another browser,
 console.log('Browser != IE')
 return false;
 }
 }

 // scope.$on('wfrc', (wfrc, { x }) => {
 // scope.x = x;
 // });

 scope.$on('wfrc', function (event, args) {
 scope.x = args.x;
 });

 }
 }
})();
이 코드를 찢어버렸습니다. 아무것도 하지 마세요. (function () { 'use strict'; angular .module('app') .지시어('트랜잭션 히스토리', 트랜잭션 히스토리); transactionhistory.$inject = ['$log', '$rootScope', 'loanKeyFactory', 'loanFactory', 'utilFactory', 'ccViewService', 'exportTransactionsService','WorksheetService']; /\* @ngInject \*/ 함수 트랜잭션 히스토리($log, $rootScope, loanKeyFactory, loanFactory, utilFactory, ccViewService, exportTransactionsService, WorksheetService) { var 지시문 = { restrict: 'A', scope: true, templateUrl: 'app/workform/sections/transactionhistory.html', link: link }; 반환 지시문; 함수 link(scope, element, attrs) { scope.loading = true; scope.CurrentTab = "대출"; scope.$on('loanKey:change', getTransactionHistory); scope.$on('tabs:새로고침', getTransactionHistory); scope.x = loanKeyFactory.getWorkFormRoleConfig(); var loanKey = loanKeyFactory.getLoanKey(); var loanId = loanKey.replace("O/L/", ""); WorksheetService.getDepositoryAccountTransactions(loanId).then(function (transactions) { scope.depositoryAccountTransactions = transactions.data; }); scope.gridTransactions = { minRowsToShow: 40, headerRowHeight: 35, enableRowSelection: false, enableRowHeaderSelection: false, enableGridMenu: false, enableColumnMenus: false, 가로 스크롤바 활성화: 0, enableVerticalScrollbar: 0, enableColumnResize: true, onRegisterApi: 함수 (gridApi) { scope.gridApi = gridApi; }, columnDefs: [ { field: 'EffectiveDate', name: 'Eff. Date', cellTemplate: "{{row.entity.EffectiveDate | date:'MM/dd/yyyy'}}" }, { 필드: '유효 날짜', name: 'Eff. Time', cellTemplate: "{{row.entity.EffectiveDate | date:'hh:mm:ss a'}}" }, { 필드: '트랜잭션번호', 이름: '번호', cellTemplate: "{{row.entity.TransactionNumber}}" }, { 필드: '트랜잭션 유형', name: '유형', width: '12.5%', cellTemplate: "{{row.entity.TransactionType}}" }, { 필드: '트랜잭션모드', name: 'Method', width: '12.5%', cellTemplate: "{{row.entity.TransactionMode}}" }, { 필드: '총액', 이름: '총액', cellTemplate: "{{row.entity.TotalAmount | negativeNumberFormat}}" }, { field: 'Principal', name: 'Principal', cellTemplate: "{{row.entity.Principal | negativeNumberFormat}}" }, { field: 'Interest', name: '이자', cellTemplate: "{{row.entity.Interest | negativeNumberFormat}}" }, { field: 'PrincipalBad', name: '원금 - 불량 부채', cellTemplate: "{{row.entity.PrincipalBad | negativeNumberFormat}}" }, { field: 'InterestBad', name: '이자 - 부실채권', cellTemplate: "{{row.entity.InterestBad | negativeNumberFormat}}" }, { field: 'LateFee', name: '연체료', cellTemplate: "{{row.entity.LateFee | negativeNumberFormat}}" }, { 필드: '서비스 요금', 이름: '서비스 요금', cellTemplate: "{{row.entity.ServiceCharge | negativeNumberFormat}}" } ] }; getTransactionHistory(); 함수 getTransactionHistory() { scope.loading = true; var key = loanKeyFactory.getLoanKey(); scope.loanAttributes = loanKeyFactory.getLoanAttributes(); if (key === '' || key === "" || key === 정의되지 않음 || key === null) { //대출키 없음. 로드할 것이 없습니다. scope.loading = false; } else { loanFactory.getTransactionHistory(key).then(function (response) { scope.loading = false; scope.gridTransactions.data = response; }); } } scope.exportTypeList = [ // { id: '전체', name: '전체 파일 가져오기' }, // { id: '승인됨', name: '승인된 파일 가져오기' }, // { id: 'Denied', name: '거부된 파일 가져오기' }, // { id: 'PDT', name: 'PDT 내보내기 파일' }, { id: 'CSV', name: 'CSV' }, } ]; scope.ExportFile = function (ExportFilter) { scope.exporting = true; exportTransactionsService.exportTransactionsWorkform(scope.loanAttributes.LoanNumber, scope.loanAttributes.Organization, ExportFilter).then( 함수 성공(응답) { scope.exporting = false; //파일 이름 구성 var fileName = ''; switch (ExportFilter) { // case 'All': // fileName = scope.selectedFileName + '.txt'; // break; // case 'Approved': // fileName = scope.selectedFileName + '\_Approved.txt'; // break; // case 'Denied': // fileName = scope.selectedFileName + '\_Denied.txt'; // break; // case 'PDT': // fileName = 'PDT 내보내기 파일 ' + scope.selectedFileName + '.txt'; // break; case 'CSV': fileName = 'TransactionHistory\_' + scope.loanAttributes.LoanNumber + '.csv'; break; } if (scope.miseversion()) { var file = new Blob([response.data], { 유형: '텍스트/csv' }); navigator.msSaveBlob(파일, 파일명) } else { var file = new Blob([response.data], { 유형: '텍스트/csv' }); var fileURL = URL.createObjectURL(file); var a = document.createElement('a'); a.href = fileURL; a.target = '\_blank'; a.download = 파일명; document.body.appendChild(a); a.click(); } scope.ExportFilter = ''; }, 함수 Failed(error) { // scope.exportError = true; window.alert('계좌번호 ' + scope.loanAttributes.LoanNumber + ' 에 대한 거래 내역을 내보내는 동안 오류가 발생했습니다.