Commit c9fd2d49 authored by kevin's avatar kevin

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

parents 64aa2c3b 35a53741
......@@ -2131,7 +2131,7 @@
"StartDateMao": "开始日期:",
"EndDateMao": "结束日期:",
"SelectedOrganization": "选择机构",
"SelectedDataType": "选择数据类型",
"SelectedDataType": "数据类型",
"DataProcessLog": "数据处理校验记录",
"DataProcessLogTitle": "数据处理校验记录",
......
......@@ -106,14 +106,7 @@
//导入事件
var callFinancialApi = function () {
var periodStr = $scope.UploadPeriodTime;
var param = {
orgIds: $scope.checkedCompanyCodeList,
period: periodStr,
dataTypes: $scope.checkedFileCodeList
};
dataImportService.callExtractFinancialData(param).success(function (data) {
dataImportService.callExtractFinancialData($scope.formParam).success(function (data) {
if (data) {
getFinancialDataStatus();
}
......@@ -296,20 +289,6 @@
}
};
var initDatePicker = function () {
var ele1 = $("#periodDatepicker");
ele1.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: $scope.dateFormat //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
});
ele1.datepicker("setDate", $scope.selectedDate);
};
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
......@@ -319,97 +298,6 @@
});
};
$scope.selectOne = function () {
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) {
$scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedCompanyList.splice(index, 1);
}
});
$scope.selectedAll = $scope.companyList.length === $scope.checkedCompanyList.length;
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name+";";
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectAll = function () {
if($scope.selectedAll) {
$scope.selectedOne = true;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i);
i.checked = true;
})
}else {
$scope.selectedOne = false;
$scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) {
i.checked = false;
})
}
$scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) {
$scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id);
});
console.log($scope.checkedCompanyList);
};
$scope.selectOneFileType = function () {
$scope.checkedFileList = [];
angular.forEach($scope.fileTypeList , function (i) {
var index = $scope.checkedFileList.indexOf(i.code);
if(i.checked && index === -1) {
$scope.checkedFileList.push(i);
} else if (!i.checked && index !== -1){
$scope.checkedFileList.splice(index, 1);
}
});
$scope.selectedAllFileType = $scope.fileTypeList.length === $scope.checkedFileList.length;
$scope.checkedFileTypeList = "";
$scope.checkedFileCodeList = [];
angular.forEach($scope.checkedFileList,function (i) {
$scope.checkedFileTypeList += i.type+";";
$scope.checkedFileCodeList.push(i.code);
});
console.log($scope.checkedFileList);
};
$scope.selectAllFile = function () {
if($scope.selectedAllFileType) {
$scope.selectedOneFile = true;
$scope.checkedFileList = [];
angular.forEach($scope.fileTypeList, function (i, index) {
$scope.checkedFileList.push(i);
i.checked = true;
})
}else {
$scope.selectedOneFile = false;
$scope.checkedFileList = [];
angular.forEach($scope.fileTypeList, function (i, index) {
i.checked = false;
})
}
$scope.checkedFileTypeList = "";
$scope.checkedFileCodeList = [];
angular.forEach($scope.checkedFileList,function (i) {
$scope.checkedFileTypeList += i.type+";";
$scope.checkedFileCodeList.push(i.code);
});
console.log($scope.checkedFileList);
};
var initParam = function () {
$scope.callFinancialApi = callFinancialApi;
......@@ -428,12 +316,60 @@
//开始
(function initialize() {
$log.debug('ImportTBController.ctor()...');
$scope.formParam = {
};
//机构下拉设置
$scope.selectOrgOptions = {
displayExpr: 'name',
valueExpr: 'id',
width: '95%',
bindingOptions: {
value: 'formParam.orgIds',
dataSource: 'companyList'
},
height: '30px',
placeholder: $translate.instant('PleaseSelected'),
showClearButton: true,
searchEnabled: true,
noDataText: $translate.instant('RevenueNoOrgData'),
showSelectionControls: true
};
//类型
$scope.selectTypeOptions = {
displayExpr: 'type',
valueExpr: 'code',
width: '95%',
bindingOptions: {
value: 'formParam.dataTypes',
dataSource: 'fileTypeList'
},
height: '30px',
placeholder: $translate.instant('PleaseSelected'),
showClearButton: true,
searchEnabled: true,
noDataText: $translate.instant('NoData'),
showSelectionControls: true
};
//日期
$scope.dateBoxStart = {
width: '100%',
acceptCustomValue: false,
openOnFieldClick: true,
displayFormat: 'yyyy-MM',
maxZoomLevel: "year",
dateSerializationFormat: 'yyyy-MM',
bindingOptions: {
value: 'formParam.period'
}
};
initParam();
checkUserOrganizationPermissionList();
getUserPermission();
initCompanyList();
loadExtractFinancialInfoDatagrid();
initDatePicker();
$timeout(function () {
$scope.isLoadComplete = true;
......
......@@ -2,76 +2,38 @@
<!--标题-->
<div class="nav-wrapper">
<div class="nav-header" translate="ExtractFinancialDataTitle"></div>
<div class="alert alert-warning" style="width:400px;margin-bottom:5px;" ng-show="ImportErrorTab" ng-click="toggleErrorTab()">
<div class="alert alert-warning" style="width:400px;margin-bottom:5px;" ng-show="ImportErrorTab"
ng-click="toggleErrorTab()">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>{{errorMsg}}
</div>
</div>
<!--导航栏-->
<div id="tab_total">
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 220px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 220px;" aria-labelledby="dropdownMenu1">
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in companyList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOne()"
ng-checked="selectedOne"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.name}}</span>
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
<input type="text" id="periodDatepicker" class="datepicker imp-subheader" style="width:80px;"
readonly="readonly" ng-model="UploadPeriodTime"/>
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i>
</div>
<span class="text-bold" translate="SelectedDataType"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 180px;">
{{checkedFileTypeList ? ((checkedFileTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span>
</button>
<ul class="dropdown-menu" style="width: 180px;" aria-labelledby="dropdownMenu2">
<li><input type="checkbox" ng-model="selectedAllFileType" ng-change="selectAllFile()"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked>
<span style="margin-left:5px;float: left;">全选</span></li>
<li role="separator" class="divider" style="height: 2px;margin: 9px 0;
overflow: hidden;background-color: #e5e5e5;"></li>
<li ng-repeat="i in fileTypeList">
<div class="checkbox-custom checkbox-default">
<input type="checkbox" ng-model="i.checked" ng-change="selectOneFileType()"
ng-checked="selectedOneFile"
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px">
<span style="margin-left:5px;">{{i.type}}</span>
</div>
</li>
</ul>
</div>
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
<form class="form-horizontal">
<div class="form-group" style="margin-top: 10px; height: 10px;">
<label class="col-sm-1 control-label">{{'Entity' | translate}}:</label>
<div class="col-sm-3">
<div dx-tag-box="selectOrgOptions"></div>
</div>
<label class="col-sm-1 control-label">{{'InvoiceQJ' | translate}}:</label>
<div class="col-sm-2">
<div dx-date-box="dateBoxStart"></div>
</div>
<label class="col-sm-1 control-label">{{'SelectedDataType' | translate}}:</label>
<div class="col-sm-3">
<div dx-tag-box="selectTypeOptions"></div>
</div>
<div class="col-sm-1">
<button type="button" atms-permission permission-control-type="ngIf"
permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary"
translate="ImportBtn"
ng-click="callFinancialApi()"></button>
</div>
</div>
</form>
<div class="dt-init-wrapper">
<div class="dx-viewport grid-container">
<div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions"
......@@ -89,7 +51,9 @@
<script type="text/ng-template" id="tb-model-period-dropdown.html" class="tb-model-period-dropdow-popup">
<div class="modal-header">
<div class="modal-title" style="margin-bottom:10px">
{{remarksTitle}}<i class="fa fa-times" aria-hidden="true" style="float: right; font-size: 11px; color: #CF2D1B" ng-click="closePeriodSelectModal()"></i>
{{remarksTitle}}<i class="fa fa-times" aria-hidden="true"
style="float: right; font-size: 11px; color: #CF2D1B"
ng-click="closePeriodSelectModal()"></i>
</div>
</div>
<div class="modal-body">
......
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