Commit be16c663 authored by eddie.woo's avatar eddie.woo

抽取分发bug

parent ab13cfa3
...@@ -2131,7 +2131,7 @@ ...@@ -2131,7 +2131,7 @@
"StartDateMao": "开始日期:", "StartDateMao": "开始日期:",
"EndDateMao": "结束日期:", "EndDateMao": "结束日期:",
"SelectedOrganization": "选择机构", "SelectedOrganization": "选择机构",
"SelectedDataType": "选择数据类型", "SelectedDataType": "数据类型",
"DataProcessLog": "数据处理校验记录", "DataProcessLog": "数据处理校验记录",
"DataProcessLogTitle": "数据处理校验记录", "DataProcessLogTitle": "数据处理校验记录",
......
...@@ -106,14 +106,7 @@ ...@@ -106,14 +106,7 @@
//导入事件 //导入事件
var callFinancialApi = function () { var callFinancialApi = function () {
var periodStr = $scope.UploadPeriodTime; dataImportService.callExtractFinancialData($scope.formParam).success(function (data) {
var param = {
orgIds: $scope.checkedCompanyCodeList,
period: periodStr,
dataTypes: $scope.checkedFileCodeList
};
dataImportService.callExtractFinancialData(param).success(function (data) {
if (data) { if (data) {
getFinancialDataStatus(); getFinancialDataStatus();
} }
...@@ -296,20 +289,6 @@ ...@@ -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 () { var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) { orgService.getOrgListByUserId().success(function (data) {
...@@ -319,97 +298,6 @@ ...@@ -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 () { var initParam = function () {
$scope.callFinancialApi = callFinancialApi; $scope.callFinancialApi = callFinancialApi;
...@@ -428,12 +316,60 @@ ...@@ -428,12 +316,60 @@
//开始 //开始
(function initialize() { (function initialize() {
$log.debug('ImportTBController.ctor()...'); $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(); initParam();
checkUserOrganizationPermissionList(); checkUserOrganizationPermissionList();
getUserPermission(); getUserPermission();
initCompanyList(); initCompanyList();
loadExtractFinancialInfoDatagrid(); loadExtractFinancialInfoDatagrid();
initDatePicker();
$timeout(function () { $timeout(function () {
$scope.isLoadComplete = true; $scope.isLoadComplete = true;
......
...@@ -2,76 +2,38 @@ ...@@ -2,76 +2,38 @@
<!--标题--> <!--标题-->
<div class="nav-wrapper"> <div class="nav-wrapper">
<div class="nav-header" translate="ExtractFinancialDataTitle"></div> <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}} <i class="fa fa-exclamation-circle" aria-hidden="true"></i>{{errorMsg}}
</div> </div>
</div> </div>
<!--导航栏--> <!--导航栏-->
<div id="tab_total"> <div id="tab_total">
<form class="form-inline" id="navigationForm" name="navigationForm"> <form class="form-horizontal">
<div class="form-group" ng-style="setButtonWrapStyle()"> <div class="form-group" style="margin-top: 10px; height: 10px;">
<div class="import-wrapper"> <label class="col-sm-1 control-label">{{'Entity' | translate}}:</label>
<span class="text-bold" translate="SelectedOrganization"></span>: <div class="col-sm-3">
<div class="dropdown" style="margin-left:10px"> <div dx-tag-box="selectOrgOptions"></div>
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" </div>
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 220px;"> <label class="col-sm-1 control-label">{{'InvoiceQJ' | translate}}:</label>
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}} <div class="col-sm-2">
<span class="caret" style="float: right "></span> <div dx-date-box="dateBoxStart"></div>
</button> </div>
<ul class="dropdown-menu" style="width: 220px;" aria-labelledby="dropdownMenu1"> <label class="col-sm-1 control-label">{{'SelectedDataType' | translate}}:</label>
<li><input type="checkbox" ng-model="selectedAll" ng-change="selectAll()" <div class="col-sm-3">
style="float: left;margin-left: 10px; margin-top: 7px; width: 15px" checked> <div dx-tag-box="selectTypeOptions"></div>
<span style="margin-left:5px;float: left;">全选</span></li> </div>
<li role="separator" class="divider" style="height: 1px;margin: 9px 0; <div class="col-sm-1">
overflow: hidden;background-color: #e5e5e5;"></li> <button type="button" atms-permission permission-control-type="ngIf"
<li ng-repeat="i in companyList"> permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
<div class="checkbox-custom checkbox-default"> class="btn btn-vat-primary"
<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;"
translate="ImportBtn" translate="ImportBtn"
ng-click="callFinancialApi()"></button> ng-click="callFinancialApi()"></button>
</div> </div>
</div> </div>
</form> </form>
<div class="dt-init-wrapper"> <div class="dt-init-wrapper">
<div class="dx-viewport grid-container"> <div class="dx-viewport grid-container">
<div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions" <div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions"
...@@ -89,7 +51,9 @@ ...@@ -89,7 +51,9 @@
<script type="text/ng-template" id="tb-model-period-dropdown.html" class="tb-model-period-dropdow-popup"> <script type="text/ng-template" id="tb-model-period-dropdown.html" class="tb-model-period-dropdow-popup">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title" style="margin-bottom:10px"> <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> </div>
<div class="modal-body"> <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