Commit 96dd4241 authored by kevin's avatar kevin

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 67582adc 11c7cf69
infrastructureModule infrastructureModule
.controller('OrganizationManageController', ['$scope', '$log', 'orgService', '$interval', 'uiGridTreeViewConstants', 'uiGridConstants', 'SweetAlert', 'projectService', '$translate', '$timeout', 'organizationStructureService', 'areaRegionService', 'apiInterceptor', 'enterpriseAccountService', 'businessUnitService', 'userService', 'roleService', '$q', 'permissionService', 'dimensionService','region','equityService','orgExtraService', .controller('OrganizationManageController', ['$scope', '$log', 'orgService', '$interval', 'uiGridTreeViewConstants', 'uiGridConstants', 'SweetAlert', 'projectService', '$translate', '$timeout', 'organizationStructureService', 'areaRegionService', 'apiInterceptor', 'enterpriseAccountService', 'businessUnitService', 'userService', 'roleService', '$q', 'permissionService', 'dimensionService', 'region', 'equityService', 'orgExtraService',
function ($scope, $log, orgService, $interval, uiGridTreeViewConstants, uiGridConstants, SweetAlert, projectService, $translate, $timeout, organizationStructureService, areaRegionService, apiInterceptor, enterpriseAccountService, businessUnitService, userService, roleService, $q, permissionService, dimensionService, region,equityService,orgExtraService) { function ($scope, $log, orgService, $interval, uiGridTreeViewConstants, uiGridConstants, SweetAlert, projectService, $translate, $timeout, organizationStructureService, areaRegionService, apiInterceptor, enterpriseAccountService, businessUnitService, userService, roleService, $q, permissionService, dimensionService, region, equityService, orgExtraService) {
'use strict'; 'use strict';
$scope.expanded = false; $scope.expanded = false;
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
$scope.isNotHundred = false; $scope.isNotHundred = false;
$scope.editOrgExtraModel = {}; $scope.editOrgExtraModel = {};
var translate={ var translate = {
Enabled:$translate.instant('BusinessUnitActive'), //已启用 Enabled: $translate.instant('BusinessUnitActive'), //已启用
Disabled: $translate.instant('BusinessUnitDisabled')//已停用 Disabled: $translate.instant('BusinessUnitDisabled')//已停用
}; };
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
if ($scope.isLoadComplete) { if ($scope.isLoadComplete) {
var y = $(".company-detail").height(); var y = $(".company-detail").height();
var parent = $('.org-right-container').height(); var parent = $('.org-right-container').height();
return { height: parent - y + 'px' }; return {height: parent - y + 'px'};
} }
return {}; return {};
...@@ -117,8 +117,7 @@ ...@@ -117,8 +117,7 @@
}); });
if (findResult) { if (findResult) {
return findResult.name; return findResult.name;
} } else {
else {
return ''; return '';
} }
}, },
...@@ -128,8 +127,7 @@ ...@@ -128,8 +127,7 @@
}); });
if (findResult) { if (findResult) {
return findResult.name; return findResult.name;
} } else {
else {
return ''; return '';
} }
} }
...@@ -261,25 +259,25 @@ ...@@ -261,25 +259,25 @@
},*/ },*/
columns: [ columns: [
{ {
dataField : "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "eNum", dataField: "eNum",
visible : false, visible: false,
sortOrder: "asc", sortOrder: "asc",
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "organizationId", dataField: "organizationId",
visible : false, visible: false,
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "investorName", dataField: "investorName",
caption: $translate.instant('InvestorName'), caption: $translate.instant('InvestorName'),
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "investorEconomicNature", dataField: "investorEconomicNature",
...@@ -317,7 +315,7 @@ ...@@ -317,7 +315,7 @@
}, },
{ {
dataField: "payableShareholderIdNum", dataField: "payableShareholderIdNum",
visible : false, visible: false,
caption: $translate.instant('PayableShareholderIdNum'), caption: $translate.instant('PayableShareholderIdNum'),
allowHeaderFiltering: false allowHeaderFiltering: false
}, },
...@@ -339,10 +337,9 @@ ...@@ -339,10 +337,9 @@
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.orgEquityListInstance = e.component; $scope.orgEquityListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
loadPanel: { loadPanel: {
...@@ -401,7 +398,7 @@ ...@@ -401,7 +398,7 @@
{ {
dataField: "createTime", dataField: "createTime",
caption: $translate.instant('RevisionDate'), caption: $translate.instant('RevisionDate'),
allowHeaderFiltering:false, allowHeaderFiltering: false,
dataType: "date" dataType: "date"
}, },
{ {
...@@ -416,9 +413,9 @@ ...@@ -416,9 +413,9 @@
}, },
{ {
caption: $translate.instant('Operation'), caption: $translate.instant('Operation'),
width : '10%', width: '10%',
cellTemplate: function(cellElement, cellInfo) { cellTemplate: function (cellElement, cellInfo) {
if(cellInfo.rowIndex===0){ if (cellInfo.rowIndex === 0) {
var $button = $("<button>") var $button = $("<button>")
.text(" 撤销变更") .text(" 撤销变更")
.addClass("btn") .addClass("btn")
...@@ -449,10 +446,9 @@ ...@@ -449,10 +446,9 @@
}, },
onContentReady: function (e) { onContentReady: function (e) {
$scope.equityDetailInstance = e.component; $scope.equityDetailInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
loadPanel: { loadPanel: {
...@@ -503,10 +499,10 @@ ...@@ -503,10 +499,10 @@
}, },
function (isConfirm) { function (isConfirm) {
if (isConfirm) { if (isConfirm) {
equityService.cancelChange(rowData.data.originalState,rowData.data.updateState).success(function (data) { equityService.cancelChange(rowData.data.originalState, rowData.data.updateState).success(function (data) {
if(data){ if (data) {
SweetAlert.success($translate.instant('CancelChangeEquitySuccess')); SweetAlert.success($translate.instant('CancelChangeEquitySuccess'));
}else{ } else {
SweetAlert.error($translate.instant('CancelChangeEquityFailed')); SweetAlert.error($translate.instant('CancelChangeEquityFailed'));
} }
}); });
...@@ -520,18 +516,18 @@ ...@@ -520,18 +516,18 @@
//todo 绑定数据 //todo 绑定数据
dataSource: new DevExpress.data.DataSource({ dataSource: new DevExpress.data.DataSource({
load: function (loadOptions) { load: function (loadOptions) {
if(key.rowIndex === 1){ if (key.rowIndex === 1) {
var deferred = $q.defer(); var deferred = $q.defer();
return equityService.getEquityById(key.data.id).success(function (response) { return equityService.getEquityById(key.data.id).success(function (response) {
deferred.resolve({ data: response, totalCount: response.length }); deferred.resolve({data: response, totalCount: response.length});
}).error(function () { }).error(function () {
deferred.reject("Data Loading Error"); deferred.reject("Data Loading Error");
}); });
return deferred.promise; return deferred.promise;
}else{ } else {
var deferred = $q.defer(); var deferred = $q.defer();
return equityService.getEquityHisById(key.data.id).success(function (response) { return equityService.getEquityHisById(key.data.id).success(function (response) {
deferred.resolve({ data: response, totalCount: response.length }); deferred.resolve({data: response, totalCount: response.length});
}).error(function () { }).error(function () {
deferred.reject("Data Loading Error"); deferred.reject("Data Loading Error");
}); });
...@@ -543,25 +539,25 @@ ...@@ -543,25 +539,25 @@
showBorders: true, showBorders: true,
columns: [ columns: [
{ {
dataField : "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "eNum", dataField: "eNum",
visible : false, visible: false,
sortOrder: "asc", sortOrder: "asc",
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "organizationId", dataField: "organizationId",
visible : false, visible: false,
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "investorName", dataField: "investorName",
caption: $translate.instant('InvestorName'), caption: $translate.instant('InvestorName'),
allowHeaderFiltering:false allowHeaderFiltering: false
}, },
{ {
dataField: "investorEconomicNature", dataField: "investorEconomicNature",
...@@ -599,7 +595,7 @@ ...@@ -599,7 +595,7 @@
}, },
{ {
dataField: "payableShareholderIdNum", dataField: "payableShareholderIdNum",
visible : false, visible: false,
caption: $translate.instant('PayableShareholderIdNum'), caption: $translate.instant('PayableShareholderIdNum'),
allowHeaderFiltering: false allowHeaderFiltering: false
}, },
...@@ -618,15 +614,15 @@ ...@@ -618,15 +614,15 @@
caption: $translate.instant('PayableContributionProportion'), caption: $translate.instant('PayableContributionProportion'),
allowHeaderFiltering: false allowHeaderFiltering: false
} }
], ],
summary: { summary: {
totalItems: [{ totalItems: [{
column: "money", column: "money",
customizeText:"总出资额(万元)", customizeText: "总出资额(万元)",
summaryType: "sum" summaryType: "sum"
}, { }, {
column: "rate"+"%", column: "rate" + "%",
customizeText:"股权总比", customizeText: "股权总比",
summaryType: "sum" summaryType: "sum"
}] }]
...@@ -645,11 +641,11 @@ ...@@ -645,11 +641,11 @@
}; };
var getEquityHistoryById = function (key) { var getEquityHistoryById = function (key) {
if(key.rowIndex === 1){ if (key.rowIndex === 1) {
equityService.getEquityById(key.data.id).success(function (data) { equityService.getEquityById(key.data.id).success(function (data) {
return data; return data;
}); });
}else{ } else {
equityService.getEquityHisById(key.data.id).success(function (data) { equityService.getEquityHisById(key.data.id).success(function (data) {
return data; return data;
}); });
...@@ -674,15 +670,15 @@ ...@@ -674,15 +670,15 @@
columns: [ columns: [
{ {
dataField: "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('id') caption: $translate.instant('id')
},{ }, {
dataField: "index", dataField: "index",
width : '5%', width: '5%',
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('SequenceNoCol') caption: $translate.instant('SequenceNoCol')
},{ }, {
dataField: "groupName", dataField: "groupName",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('TaxGroup'), caption: $translate.instant('TaxGroup'),
...@@ -691,7 +687,7 @@ ...@@ -691,7 +687,7 @@
displayExpr: "type", displayExpr: "type",
valueExpr: "type" valueExpr: "type"
} }
},{ }, {
dataField: "taxDecCycle", dataField: "taxDecCycle",
allowHeaderFiltering: true, allowHeaderFiltering: true,
caption: $translate.instant('TaxDecCycle'), caption: $translate.instant('TaxDecCycle'),
...@@ -700,7 +696,7 @@ ...@@ -700,7 +696,7 @@
displayExpr: "type", displayExpr: "type",
valueExpr: "type" valueExpr: "type"
} }
},{ }, {
dataField: "taxDecType", dataField: "taxDecType",
allowHeaderFiltering: true, allowHeaderFiltering: true,
caption: $translate.instant('TaxDecType') caption: $translate.instant('TaxDecType')
...@@ -708,19 +704,18 @@ ...@@ -708,19 +704,18 @@
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.TaxRuleListInstance = e.component; $scope.TaxRuleListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -729,40 +724,40 @@ ...@@ -729,40 +724,40 @@
if (data) { if (data) {
getTaxRuleList($scope.selectCompany.id); getTaxRuleList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateTaxRule(updateData).success(function (data) { orgExtraService.updateTaxRule(updateData).success(function (data) {
if (data) { if (data) {
getTaxRuleList($scope.selectCompany.id); getTaxRuleList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteTaxRule(e.key.id).success(function (data) { orgExtraService.deleteTaxRule(e.key.id).success(function (data) {
if (data) { if (data) {
getTaxRuleList($scope.selectCompany.id); getTaxRuleList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -803,16 +798,16 @@ ...@@ -803,16 +798,16 @@
if (data) { if (data) {
$scope.TaxRuleGridSource = data; $scope.TaxRuleGridSource = data;
for (var i = 1; i <= $scope.TaxRuleGridSource.length; i++) { for (var i = 1; i <= $scope.TaxRuleGridSource.length; i++) {
$scope.TaxRuleGridSource[i-1].index = i; $scope.TaxRuleGridSource[i - 1].index = i;
} }
} }
}); });
}; };
$scope.visiableTaxRule = function () { $scope.visiableTaxRule = function () {
if($scope.showTaxRule){ if ($scope.showTaxRule) {
$scope.showTaxRule = false; $scope.showTaxRule = false;
}else{ } else {
$scope.showTaxRule = true; $scope.showTaxRule = true;
} }
}; };
...@@ -835,15 +830,15 @@ ...@@ -835,15 +830,15 @@
columns: [ columns: [
{ {
dataField: "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('id') caption: $translate.instant('id')
},{ }, {
dataField: "index", dataField: "index",
width : '5%', width: '5%',
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('SequenceNoCol') caption: $translate.instant('SequenceNoCol')
},{ }, {
dataField: "invoiceTypeName", dataField: "invoiceTypeName",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('InvoiceTypeName'), caption: $translate.instant('InvoiceTypeName'),
...@@ -852,7 +847,7 @@ ...@@ -852,7 +847,7 @@
displayExpr: "type", displayExpr: "type",
valueExpr: "type" valueExpr: "type"
} }
},{ }, {
dataField: "unit", dataField: "unit",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('InvoiceUnit'), caption: $translate.instant('InvoiceUnit'),
...@@ -861,15 +856,15 @@ ...@@ -861,15 +856,15 @@
displayExpr: "type", displayExpr: "type",
valueExpr: "type" valueExpr: "type"
} }
},{ }, {
dataField: "monthlyMaxTicketsPurchased", dataField: "monthlyMaxTicketsPurchased",
allowHeaderFiltering: true, allowHeaderFiltering: true,
caption: $translate.instant('MonthlyMaxTicketsPurchased') caption: $translate.instant('MonthlyMaxTicketsPurchased')
},{ }, {
dataField: "singleInvoicingMaxLimit", dataField: "singleInvoicingMaxLimit",
allowHeaderFiltering: true, allowHeaderFiltering: true,
caption: $translate.instant('SingleInvoicingMaxLimit') caption: $translate.instant('SingleInvoicingMaxLimit')
},{ }, {
dataField: "offlineBillingTimeLimit", dataField: "offlineBillingTimeLimit",
allowHeaderFiltering: true, allowHeaderFiltering: true,
caption: $translate.instant('OfflineBillingTimeLimit') caption: $translate.instant('OfflineBillingTimeLimit')
...@@ -877,19 +872,18 @@ ...@@ -877,19 +872,18 @@
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.invoiceInfoListInstance = e.component; $scope.invoiceInfoListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -898,40 +892,40 @@ ...@@ -898,40 +892,40 @@
if (data) { if (data) {
getInvoiceInfoList($scope.selectCompany.id); getInvoiceInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateInvoice(updateData).success(function (data) { orgExtraService.updateInvoice(updateData).success(function (data) {
if (data) { if (data) {
getInvoiceInfoList($scope.selectCompany.id); getInvoiceInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteInvoice(e.key.id).success(function (data) { orgExtraService.deleteInvoice(e.key.id).success(function (data) {
if (data) { if (data) {
getInvoiceInfoList($scope.selectCompany.id); getInvoiceInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -972,16 +966,16 @@ ...@@ -972,16 +966,16 @@
if (data) { if (data) {
$scope.InvoiceInfoGridSource = data; $scope.InvoiceInfoGridSource = data;
for (var i = 1; i <= $scope.InvoiceInfoGridSource.length; i++) { for (var i = 1; i <= $scope.InvoiceInfoGridSource.length; i++) {
$scope.InvoiceInfoGridSource[i-1].index = i; $scope.InvoiceInfoGridSource[i - 1].index = i;
} }
} }
}); });
}; };
$scope.visiableInvoiceInfo = function () { $scope.visiableInvoiceInfo = function () {
if($scope.showInvoiceInfo){ if ($scope.showInvoiceInfo) {
$scope.showInvoiceInfo = false; $scope.showInvoiceInfo = false;
}else{ } else {
$scope.showInvoiceInfo = true; $scope.showInvoiceInfo = true;
} }
}; };
...@@ -1006,55 +1000,54 @@ ...@@ -1006,55 +1000,54 @@
allowAdding: true allowAdding: true
}, },
columns: [{ columns: [{
dataField: "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('id') caption: $translate.instant('id')
},{ }, {
dataField: "index", dataField: "index",
width : '5%', width: '5%',
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('SequenceNoCol') caption: $translate.instant('SequenceNoCol')
},{ }, {
dataField: "groupName", dataField: "groupName",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('TaxGroup'), caption: $translate.instant('TaxGroup'),
width : '30%', width: '30%',
lookup: { lookup: {
dataSource: constant.GroupTypeList, dataSource: constant.GroupTypeList,
displayExpr: "type", displayExpr: "type",
valueExpr: "type" valueExpr: "type"
} }
}, },
{ {
dataField: "returnRate", dataField: "returnRate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width : '15%', width: '15%',
caption: $translate.instant('ReturnRate') caption: $translate.instant('ReturnRate')
}, },
{ {
dataField: "startDate", dataField: "startDate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width : '25%', width: '25%',
dataType: "date", dataType: "date",
caption: $translate.instant('StartingDate') caption: $translate.instant('StartingDate')
} }
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.returnRateListInstance = e.component; $scope.returnRateListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1063,40 +1056,40 @@ ...@@ -1063,40 +1056,40 @@
if (data) { if (data) {
getReturnRateInfoList($scope.selectCompany.id); getReturnRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateReturnRate(updateData).success(function (data) { orgExtraService.updateReturnRate(updateData).success(function (data) {
if (data) { if (data) {
getReturnRateInfoList($scope.selectCompany.id); getReturnRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteReturnRate(e.key.id).success(function (data) { orgExtraService.deleteReturnRate(e.key.id).success(function (data) {
if (data) { if (data) {
getReturnRateInfoList($scope.selectCompany.id); getReturnRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1137,16 +1130,16 @@ ...@@ -1137,16 +1130,16 @@
if (data) { if (data) {
$scope.ReturnGridSource = data; $scope.ReturnGridSource = data;
for (var i = 1; i <= $scope.ReturnGridSource.length; i++) { for (var i = 1; i <= $scope.ReturnGridSource.length; i++) {
$scope.ReturnGridSource[i-1].index = i; $scope.ReturnGridSource[i - 1].index = i;
} }
} }
}); });
}; };
$scope.visiableReturnRateInfo = function () { $scope.visiableReturnRateInfo = function () {
if($scope.showReturnRateInfo){ if ($scope.showReturnRateInfo) {
$scope.showReturnRateInfo = false; $scope.showReturnRateInfo = false;
}else{ } else {
$scope.showReturnRateInfo = true; $scope.showReturnRateInfo = true;
} }
}; };
...@@ -1177,6 +1170,11 @@ ...@@ -1177,6 +1170,11 @@
width: '10%', width: '10%',
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('SequenceNoCol') caption: $translate.instant('SequenceNoCol')
}, {
dataField: "rate",
allowHeaderFiltering: false,
width: '10%',
caption: $translate.instant('AccountingRate')
}, { }, {
dataField: "currencyFrom", dataField: "currencyFrom",
allowHeaderFiltering: false, allowHeaderFiltering: false,
...@@ -1188,23 +1186,18 @@ ...@@ -1188,23 +1186,18 @@
width: '15%', width: '15%',
caption: $translate.instant('CurrencyTo') caption: $translate.instant('CurrencyTo')
}, { }, {
dataField: "startDate", dataField: "startDate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '20%', width: '20%',
dataType: "date", dataType: "date",
caption: $translate.instant('StartingPeriod') caption: $translate.instant('StartingPeriod')
}, { }, {
dataField: "endDate", dataField: "endDate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '20%', width: '20%',
dataType: "date", dataType: "date",
caption: $translate.instant('EndPeriod') caption: $translate.instant('EndPeriod')
}, { }
dataField: "rate",
allowHeaderFiltering: false,
width: '10%',
caption: $translate.instant('AccountingRate')
}
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.accountingRateListInstance = e.component; $scope.accountingRateListInstance = e.component;
...@@ -1213,13 +1206,13 @@ ...@@ -1213,13 +1206,13 @@
$scope.totalCount = totalCount; $scope.totalCount = totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1228,40 +1221,40 @@ ...@@ -1228,40 +1221,40 @@
if (data) { if (data) {
getAccountingRateInfoList($scope.selectCompany.id); getAccountingRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateAccountingRate(updateData).success(function (data) { orgExtraService.updateAccountingRate(updateData).success(function (data) {
if (data) { if (data) {
getAccountingRateInfoList($scope.selectCompany.id); getAccountingRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteAccountingRate(e.key.id).success(function (data) { orgExtraService.deleteAccountingRate(e.key.id).success(function (data) {
if (data) { if (data) {
getAccountingRateInfoList($scope.selectCompany.id); getAccountingRateInfoList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1309,9 +1302,9 @@ ...@@ -1309,9 +1302,9 @@
}; };
$scope.visiableAccountingRateInfo = function () { $scope.visiableAccountingRateInfo = function () {
if($scope.showAccountingRateInfo){ if ($scope.showAccountingRateInfo) {
$scope.showAccountingRateInfo = false; $scope.showAccountingRateInfo = false;
}else{ } else {
$scope.showAccountingRateInfo = true; $scope.showAccountingRateInfo = true;
} }
}; };
...@@ -1383,19 +1376,18 @@ ...@@ -1383,19 +1376,18 @@
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.approvedLevyListInstance = e.component; $scope.approvedLevyListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1404,40 +1396,40 @@ ...@@ -1404,40 +1396,40 @@
if (data) { if (data) {
getApprovedLevyList($scope.selectCompany.id); getApprovedLevyList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateApprovedLevyInfo(updateData).success(function (data) { orgExtraService.updateApprovedLevyInfo(updateData).success(function (data) {
if (data) { if (data) {
getApprovedLevyList($scope.selectCompany.id); getApprovedLevyList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteApprovedLevyInfo(e.key.id).success(function (data) { orgExtraService.deleteApprovedLevyInfo(e.key.id).success(function (data) {
if (data) { if (data) {
getApprovedLevyList($scope.selectCompany.id); getApprovedLevyList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1485,9 +1477,9 @@ ...@@ -1485,9 +1477,9 @@
}; };
$scope.visiableApprovedLevyInfo = function () { $scope.visiableApprovedLevyInfo = function () {
if($scope.showApprovedLevyInfo){ if ($scope.showApprovedLevyInfo) {
$scope.showApprovedLevyInfo = false; $scope.showApprovedLevyInfo = false;
}else{ } else {
$scope.showApprovedLevyInfo = true; $scope.showApprovedLevyInfo = true;
} }
}; };
...@@ -1509,44 +1501,43 @@ ...@@ -1509,44 +1501,43 @@
}, },
columns: [{ columns: [{
dataField: "id", dataField: "id",
visible : false, visible: false,
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('id') caption: $translate.instant('id')
},{ }, {
dataField: "index", dataField: "index",
width : '5%', width: '5%',
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('SequenceNoCol') caption: $translate.instant('SequenceNoCol')
},{ }, {
dataField: "taxOfficerName", dataField: "taxOfficerName",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('TaxOfficerName'), caption: $translate.instant('TaxOfficerName'),
width : '25%' width: '25%'
},{ }, {
dataField: "taxOfficerPhoneNum", dataField: "taxOfficerPhoneNum",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('TaxOfficerPhoneNum'), caption: $translate.instant('TaxOfficerPhoneNum'),
width : '25%' width: '25%'
},{ }, {
dataField: "remark", dataField: "remark",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('TaxOfficerRemark'), caption: $translate.instant('TaxOfficerRemark'),
width : '25%' width: '25%'
}], }],
onContentReady: function (e) { onContentReady: function (e) {
$scope.taxOfficerListInstance = e.component; $scope.taxOfficerListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1555,40 +1546,40 @@ ...@@ -1555,40 +1546,40 @@
if (data) { if (data) {
getTaxOfficerList($scope.selectCompany.id); getTaxOfficerList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateTaxOfficer(updateData).success(function (data) { orgExtraService.updateTaxOfficer(updateData).success(function (data) {
if (data) { if (data) {
getTaxOfficerList($scope.selectCompany.id); getTaxOfficerList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteTaxOfficer(e.key.id).success(function (data) { orgExtraService.deleteTaxOfficer(e.key.id).success(function (data) {
if (data) { if (data) {
getTaxOfficerList($scope.selectCompany.id); getTaxOfficerList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1636,9 +1627,9 @@ ...@@ -1636,9 +1627,9 @@
}; };
$scope.visiableTaxOfficerInfo = function () { $scope.visiableTaxOfficerInfo = function () {
if($scope.showTaxOfficerInfo){ if ($scope.showTaxOfficerInfo) {
$scope.showTaxOfficerInfo = false; $scope.showTaxOfficerInfo = false;
}else{ } else {
$scope.showTaxOfficerInfo = true; $scope.showTaxOfficerInfo = true;
} }
}; };
...@@ -1687,19 +1678,18 @@ ...@@ -1687,19 +1678,18 @@
}], }],
onContentReady: function (e) { onContentReady: function (e) {
$scope.employeeListInstance = e.component; $scope.employeeListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1708,40 +1698,40 @@ ...@@ -1708,40 +1698,40 @@
if (data) { if (data) {
getEmployeeList($scope.selectCompany.id); getEmployeeList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateEmployee(updateData).success(function (data) { orgExtraService.updateEmployee(updateData).success(function (data) {
if (data) { if (data) {
getEmployeeList($scope.selectCompany.id); getEmployeeList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteEmployee(e.key.id).success(function (data) { orgExtraService.deleteEmployee(e.key.id).success(function (data) {
if (data) { if (data) {
getEmployeeList($scope.selectCompany.id); getEmployeeList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1789,9 +1779,9 @@ ...@@ -1789,9 +1779,9 @@
}; };
$scope.visiableEmployee = function () { $scope.visiableEmployee = function () {
if($scope.showEmployee){ if ($scope.showEmployee) {
$scope.showEmployee = false; $scope.showEmployee = false;
}else{ } else {
$scope.showEmployee = true; $scope.showEmployee = true;
} }
}; };
...@@ -1853,19 +1843,18 @@ ...@@ -1853,19 +1843,18 @@
], ],
onContentReady: function (e) { onContentReady: function (e) {
$scope.taxpayerQualificationListInstance = e.component; $scope.taxpayerQualificationListInstance = e.component;
var totalCount =e.component.totalCount(); var totalCount = e.component.totalCount();
if(totalCount>0) if (totalCount > 0) {
{ $scope.totalCount = totalCount;
$scope.totalCount=totalCount;
} }
}, },
onEditingStart: function(e) { onEditingStart: function (e) {
}, },
onInitNewRow: function(e) { onInitNewRow: function (e) {
}, },
onRowInserting: function(e) { onRowInserting: function (e) {
var dataList= []; var dataList = [];
var rowData = e.data; var rowData = e.data;
rowData.organizationId = $scope.selectCompany.id; rowData.organizationId = $scope.selectCompany.id;
delete rowData.__KEY__; delete rowData.__KEY__;
...@@ -1874,40 +1863,40 @@ ...@@ -1874,40 +1863,40 @@
if (data) { if (data) {
getTaxpayerQualificationList($scope.selectCompany.id); getTaxpayerQualificationList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('SaveFail')); SweetAlert.error($translate.instant('SaveFail'));
} }
}); });
}, },
onRowInserted: function(e) { onRowInserted: function (e) {
SweetAlert.success($translate.instant('SaveSuccess')); SweetAlert.success($translate.instant('SaveSuccess'));
}, },
onRowUpdating: function(e) { onRowUpdating: function (e) {
var updateData = e.newData; var updateData = e.newData;
updateData.id = e.key.id; updateData.id = e.key.id;
orgExtraService.updateTaxpayerQualification(updateData).success(function (data) { orgExtraService.updateTaxpayerQualification(updateData).success(function (data) {
if (data) { if (data) {
getTaxpayerQualificationList($scope.selectCompany.id); getTaxpayerQualificationList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('UpdateFail')); SweetAlert.error($translate.instant('UpdateFail'));
} }
}); });
}, },
onRowUpdated: function(e) { onRowUpdated: function (e) {
SweetAlert.success($translate.instant('UpdateSuccess')); SweetAlert.success($translate.instant('UpdateSuccess'));
}, },
onRowRemoving: function(e) { onRowRemoving: function (e) {
orgExtraService.deleteTaxpayerQualification(e.key.id).success(function (data) { orgExtraService.deleteTaxpayerQualification(e.key.id).success(function (data) {
if (data) { if (data) {
getTaxpayerQualificationList($scope.selectCompany.id); getTaxpayerQualificationList($scope.selectCompany.id);
return; return;
}else{ } else {
SweetAlert.error($translate.instant('DeleteFail')); SweetAlert.error($translate.instant('DeleteFail'));
} }
}); });
}, },
onRowRemoved: function(e) { onRowRemoved: function (e) {
SweetAlert.success($translate.instant('DeleteSuccess')); SweetAlert.success($translate.instant('DeleteSuccess'));
}, },
loadPanel: { loadPanel: {
...@@ -1955,9 +1944,9 @@ ...@@ -1955,9 +1944,9 @@
}; };
$scope.visiableTaxpayerQualification = function () { $scope.visiableTaxpayerQualification = function () {
if($scope.showTaxpayerQualification){ if ($scope.showTaxpayerQualification) {
$scope.showTaxpayerQualification = false; $scope.showTaxpayerQualification = false;
}else{ } else {
$scope.showTaxpayerQualification = true; $scope.showTaxpayerQualification = true;
} }
}; };
...@@ -1983,7 +1972,6 @@ ...@@ -1983,7 +1972,6 @@
}; };
// 保存启用、启用的操作结果 // 保存启用、启用的操作结果
$scope.updateIsActive = function () { $scope.updateIsActive = function () {
$scope.isCanOrganizationIsActiveBtn = false; $scope.isCanOrganizationIsActiveBtn = false;
...@@ -2162,16 +2150,16 @@ ...@@ -2162,16 +2150,16 @@
// TODO 将这个方法添加到切换功能里 // TODO 将这个方法添加到切换功能里
$scope.updateOrgExtraCancel = function () { $scope.updateOrgExtraCancel = function () {
$scope.selectCompanyExtra = $scope.comExtraOldData; $scope.selectCompanyExtra = $scope.comExtraOldData;
$scope.selectCompanyExtra.unifiedSocialCreditCode=$scope.selectCompany.taxPayerNumber; $scope.selectCompanyExtra.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
$scope.editOrgExtraModel = $scope.editOldData; $scope.editOrgExtraModel = $scope.editOldData;
generalSelectCompanyExtraText(); generalSelectCompanyExtraText();
cancelWebChange(); cancelWebChange();
}; };
var cancelWebChange = function(){ var cancelWebChange = function () {
$('.tax-extra-info-content .col-sm-8 span').removeAttr("hidden"); $('.tax-extra-info-content .col-sm-8 span').removeAttr("hidden");
$('.tax-reg-info-content .col-sm-4 span').removeAttr("hidden"); $('.tax-reg-info-content .col-sm-4 span').removeAttr("hidden");
$('.extra-organization-info .right-option .button2position').attr("hidden","hidden"); $('.extra-organization-info .right-option .button2position').attr("hidden", "hidden");
$('.extra-organization-info .right-option .updOrgBtn').removeAttr("hidden"); $('.extra-organization-info .right-option .updOrgBtn').removeAttr("hidden");
for (var i = 0; i < $('.tax-reg-info-content .col-sm-4 input').length; i++) { for (var i = 0; i < $('.tax-reg-info-content .col-sm-4 input').length; i++) {
$('.tax-reg-info-content .col-sm-4 input')[i].style.display = "none"; $('.tax-reg-info-content .col-sm-4 input')[i].style.display = "none";
...@@ -2232,23 +2220,23 @@ ...@@ -2232,23 +2220,23 @@
}); });
}; };
var generalSelectCompanyExtraText = function(){ var generalSelectCompanyExtraText = function () {
if($scope.selectCompanyExtra.smallMeagerProfit!=null){ if ($scope.selectCompanyExtra.smallMeagerProfit != null) {
$scope.selectCompanyExtra.smallMeagerProfit = $scope.selectCompanyExtra.smallMeagerProfit?"是":"否"; $scope.selectCompanyExtra.smallMeagerProfit = $scope.selectCompanyExtra.smallMeagerProfit ? "是" : "否";
} }
if($scope.selectCompanyExtra.listedCompany!=null){ if ($scope.selectCompanyExtra.listedCompany != null) {
$scope.selectCompanyExtra.listedCompany = $scope.selectCompanyExtra.listedCompany?"是":"否"; $scope.selectCompanyExtra.listedCompany = $scope.selectCompanyExtra.listedCompany ? "是" : "否";
} }
if($scope.selectCompanyExtra.signTripartiteAgreement!=null){ if ($scope.selectCompanyExtra.signTripartiteAgreement != null) {
$scope.selectCompanyExtra.signTripartiteAgreement = $scope.selectCompanyExtra.signTripartiteAgreement =
$scope.selectCompanyExtra.signTripartiteAgreement?"是":"否"; $scope.selectCompanyExtra.signTripartiteAgreement ? "是" : "否";
} }
if($scope.selectCompanyExtra.completeRecordTotalInstitutions!=null){ if ($scope.selectCompanyExtra.completeRecordTotalInstitutions != null) {
$scope.selectCompanyExtra.completeRecordTotalInstitutions = $scope.selectCompanyExtra.completeRecordTotalInstitutions =
$scope.selectCompanyExtra.completeRecordTotalInstitutions?"是":"否"; $scope.selectCompanyExtra.completeRecordTotalInstitutions ? "是" : "否";
} }
if($scope.selectCompanyExtra.regFinancialAccountingType!=null){ if ($scope.selectCompanyExtra.regFinancialAccountingType != null) {
$scope.regFinancialAccountingTypeList.map(function(value,index){ $scope.regFinancialAccountingTypeList.map(function (value, index) {
if (value.code === $scope.selectCompanyExtra.regFinancialAccountingType) { if (value.code === $scope.selectCompanyExtra.regFinancialAccountingType) {
$scope.selectCompanyExtra.regFinancialAccountingType = value.type; $scope.selectCompanyExtra.regFinancialAccountingType = value.type;
return; return;
...@@ -2257,20 +2245,20 @@ ...@@ -2257,20 +2245,20 @@
} }
}; };
var generalSelectCompanyText = function(){ var generalSelectCompanyText = function () {
if($scope.selectCompany.engageNationalProhibitIndustry!=null){ if ($scope.selectCompany.engageNationalProhibitIndustry != null) {
$scope.selectCompany.engageNationalProhibitIndustryStr = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否"; $scope.selectCompany.engageNationalProhibitIndustryStr = $scope.selectCompany.engageNationalProhibitIndustry ? "是" : "否";
} }
if($scope.selectCompany.nationalEconomicIndustry!=null){ if ($scope.selectCompany.nationalEconomicIndustry != null) {
$scope.nationalEconomicIndustryList.map(function(value,index){ $scope.nationalEconomicIndustryList.map(function (value, index) {
if (value.code === $scope.selectCompany.nationalEconomicIndustry) { if (value.code === $scope.selectCompany.nationalEconomicIndustry) {
$scope.selectCompany.nationalEconomicIndustryStr = value.code+"-"+value.type; $scope.selectCompany.nationalEconomicIndustryStr = value.code + "-" + value.type;
return; return;
} }
}); });
if(null==$scope.selectCompany.nationalEconomicIndustryStr||""===$scope.selectCompany.nationalEconomicIndustryStr){ if (null == $scope.selectCompany.nationalEconomicIndustryStr || "" === $scope.selectCompany.nationalEconomicIndustryStr) {
$scope.selectCompany.nationalEconomicIndustryStr=$scope.selectCompany.nationalEconomicIndustry; $scope.selectCompany.nationalEconomicIndustryStr = $scope.selectCompany.nationalEconomicIndustry;
} }
} }
}; };
...@@ -2359,8 +2347,12 @@ ...@@ -2359,8 +2347,12 @@
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach(function (row) { data.forEach(function (row) {
var uniqRoleList = _.uniq(row.roleInfoList, function (item) { return item.name }); var uniqRoleList = _.uniq(row.roleInfoList, function (item) {
row.roleNameList = _.map(uniqRoleList, function (x) { return x.name; }).join(constant.comma); return item.name
});
row.roleNameList = _.map(uniqRoleList, function (x) {
return x.name;
}).join(constant.comma);
//var roleNames = _.pluck(row.roleInfoList, 'name'); //var roleNames = _.pluck(row.roleInfoList, 'name');
//row.roleNameList = roleNames.join(','); //row.roleNameList = roleNames.join(',');
...@@ -2371,7 +2363,7 @@ ...@@ -2371,7 +2363,7 @@
row.hasEditPermission = $scope.hasEditPermission; row.hasEditPermission = $scope.hasEditPermission;
userRoleShowList.push({ id: row.id, userName: row.userName, roleNameList: row.roleNameList }); userRoleShowList.push({id: row.id, userName: row.userName, roleNameList: row.roleNameList});
row.roleInfoList.forEach(function (role) { row.roleInfoList.forEach(function (role) {
var one = _.find(roleStaticsList, function (data) { var one = _.find(roleStaticsList, function (data) {
return data.id === role.id; return data.id === role.id;
...@@ -2400,7 +2392,6 @@ ...@@ -2400,7 +2392,6 @@
$scope.selectOrganization = function (branch) { $scope.selectOrganization = function (branch) {
var org = branch.data; var org = branch.data;
$scope.output = "You selected: " + org.id; $scope.output = "You selected: " + org.id;
...@@ -2446,18 +2437,18 @@ ...@@ -2446,18 +2437,18 @@
$scope.isInternational = $scope.selectCompany.oversea; $scope.isInternational = $scope.selectCompany.oversea;
$scope.editOrgExtraModel.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber; $scope.editOrgExtraModel.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
$scope.selectCompanyExtra.unifiedSocialCreditCode=$scope.selectCompany.taxPayerNumber; $scope.selectCompanyExtra.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
//加载用户权限list //加载用户权限list
loadUserRoleList(org.id); loadUserRoleList(org.id);
generalSelectCompanyText(); generalSelectCompanyText();
cancelWebChange(); cancelWebChange();
// $scope.updateOrgExtraCancel() // $scope.updateOrgExtraCancel()
}); });
orgService.getSingleOrgExtra(org.id).success(function (data) { orgService.getSingleOrgExtra(org.id).success(function (data) {
if(data){ if (data) {
$scope.selectCompanyExtra = data; $scope.selectCompanyExtra = data;
$scope.editOrgExtraModel = angular.copy(data); $scope.editOrgExtraModel = angular.copy(data);
generalSelectCompanyExtraText(); generalSelectCompanyExtraText();
...@@ -2981,8 +2972,6 @@ ...@@ -2981,8 +2972,6 @@
}; };
var getAllRolePermission = function () { var getAllRolePermission = function () {
roleService.getAllRolePermission(constant.serviceType.VAT).success(function (data) { roleService.getAllRolePermission(constant.serviceType.VAT).success(function (data) {
if (data) { if (data) {
...@@ -3007,10 +2996,10 @@ ...@@ -3007,10 +2996,10 @@
amountTotal: amountTotal, amountTotal: amountTotal,
proportionTotal: proportionTotal proportionTotal: proportionTotal
}; };
if($scope.EquitySumInfo.proportionTotal!==100){ if ($scope.EquitySumInfo.proportionTotal !== 100) {
$scope.isNotHundred=true; $scope.isNotHundred = true;
}else{ } else {
$scope.isNotHundred=false; $scope.isNotHundred = false;
} }
} else { } else {
SweetAlert.warning($translate.instant('NoEquityInfo')); SweetAlert.warning($translate.instant('NoEquityInfo'));
...@@ -3018,7 +3007,7 @@ ...@@ -3018,7 +3007,7 @@
}); });
}; };
$scope.refreshEquityList = function (){ $scope.refreshEquityList = function () {
getEquityListByOrgId($scope.selectCompany.id); getEquityListByOrgId($scope.selectCompany.id);
getEquityChangeList($scope.selectCompany.name); getEquityChangeList($scope.selectCompany.name);
}; };
...@@ -3026,17 +3015,17 @@ ...@@ -3026,17 +3015,17 @@
var confirmWarningWindow = function (title, text) { var confirmWarningWindow = function (title, text) {
var deferred = $q.defer(); var deferred = $q.defer();
SweetAlert.swal({ SweetAlert.swal({
title: title, title: title,
text: text, text: text,
type: "warning", type: "warning",
showCancelButton: true, showCancelButton: true,
confirmButtonColor: "#DD6B55", confirmButtonColor: "#DD6B55",
allowOutsideClick: false, allowOutsideClick: false,
confirmButtonText: $translate.instant('Confirm'), confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'), cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: false, closeOnConfirm: false,
closeOnCancel: true closeOnCancel: true
}, },
function (isConfirm) { function (isConfirm) {
deferred.resolve(isConfirm); deferred.resolve(isConfirm);
}); });
...@@ -3108,7 +3097,7 @@ ...@@ -3108,7 +3097,7 @@
$scope.getGridHeight = function () { $scope.getGridHeight = function () {
return { height: $(".dx-viewport").height() + "px" }; return {height: $(".dx-viewport").height() + "px"};
}; };
//获取当前角色对应的权限列表 //获取当前角色对应的权限列表
......
...@@ -229,8 +229,11 @@ ...@@ -229,8 +229,11 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<!-- <button style="margin-left: 22px;" type="button" class="btn btn-primary" ng-click="saveAssetGroupInfo()"-->
<!-- ng-disabled="!hasEditPermission">{{'Confirm' | translate }}-->
<!-- </button>-->
<button style="margin-left: 22px;" type="button" class="btn btn-primary" ng-click="saveAssetGroupInfo()" <button style="margin-left: 22px;" type="button" class="btn btn-primary" ng-click="saveAssetGroupInfo()"
ng-disabled="!hasEditPermission">{{'Confirm' | translate }} >{{'Confirm' | translate }}
</button> </button>
<button type="button" class="btn btn-third" ng-click="cancelAsset()" ng-if="!isDisabled" <button type="button" class="btn btn-third" ng-click="cancelAsset()" ng-if="!isDisabled"
ng-disabled="isDisabled">{{'ButtonCancel' | translate }} ng-disabled="isDisabled">{{'ButtonCancel' | translate }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment