Commit 46970c1a authored by Eddie.Wu's avatar Eddie.Wu

Merge branch 'dev_wzk_period1' into 'dev_mysql'

EBS数据抽取页面机构选择框改为bootstrap-selectpicker控件,以解决下拉框机构太多出错问题

See merge request root/atms!434
parents 3d98e73e 4dd81ed2
dataImpModule.controller('extractFinancialDataController', ['$scope', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','orgService', 'dataImportService',
, 'projectService', 'vatCommonService', 'orgService', 'dataImportService',
function ($scope, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService , orgService,dataImportService) {
, projectService, vatCommonService, orgService, dataImportService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
......@@ -21,11 +21,11 @@
$scope.projectID = vatSessionService.project.id;
$scope.startRowNum = 2;
$scope.validationType = 0;
$scope.sheetData = { sheetNameList: [], dataList: [], selectedSheetIndex: 0 };
$scope.sheetInfo = { selectedSheetName: '', selectedSheetIndex: 0 };
$scope.sheetData = {sheetNameList: [], dataList: [], selectedSheetIndex: 0};
$scope.sheetInfo = {selectedSheetName: '', selectedSheetIndex: 0};
$scope.balanceInputList = [];
$scope.toInputList = [];
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2, ApiImport: 2 }; //导入方式
$scope.importEnum = {Import: 0, CoverImport: 1, AddImport: 2, ApiImport: 2}; //导入方式
$scope.selectedPeriod = null;
$scope.showTotalSecondRow = false;
$scope.maxTitleLength = constant.maxButtonTitleLength;
......@@ -106,6 +106,7 @@
//导入事件
var callFinancialApi = function () {
$scope.formParam.orgIds = $("#area1").val();
if (!$scope.formParam || !$scope.formParam.orgIds || !$scope.formParam.dataTypes
|| !$scope.formParam.period) {
SweetAlert.warning($translate.instant('PleaseSelectAtLeastOneItem'));
......@@ -120,10 +121,9 @@
var getGridHeight = function () {
if ($scope.isLoadComplete) {
return { height: ($('.balance-ouput-grid-wrapper').height()) + "px" };
}
else {
return { height: 0 + "px" };
return {height: ($('.balance-ouput-grid-wrapper').height()) + "px"};
} else {
return {height: 0 + "px"};
}
};
......@@ -196,7 +196,7 @@
allowHeaderFiltering: false,
width: '150px',
caption: $translate.instant('LogOperationTime'),
calculateCellValue: function(data) {
calculateCellValue: function (data) {
return new Date(data.operateTime).formatDateTime('yyyy-MM-dd HH:mm:ss');
}
}
......@@ -245,11 +245,11 @@
};
var getFinancialDataStatus = function () {
vatImportService.displayImportLog($scope.pagingOptions,constant.importFileType.ExtractFinancialData).success(function (data) {
vatImportService.displayImportLog($scope.pagingOptions, constant.importFileType.ExtractFinancialData).success(function (data) {
if (data && data.list) {
$scope.extractFinancialGridSource = data.list;
$scope.pagingOptions.totalItems = data.pageInfo.totalCount;
}else {
} else {
SweetAlert.error($translate.instant('SystemError'));
}
});
......@@ -291,16 +291,15 @@
var setButtonWrapStyle = function () {
if ($scope.fileName) {
return { width: "100%" };
return {width: "100%"};
}
};
var setGridStyle = function () {
if ($scope.showTotalSecondRow) {
return { 'margin-top': '60px' }
}
else {
return { 'margin-top': '55px' }
return {'margin-top': '60px'}
} else {
return {'margin-top': '55px'}
}
};
......@@ -331,9 +330,7 @@
//开始
(function initialize() {
$log.debug('ImportTBController.ctor()...');
$scope.formParam = {
};
$scope.formParam = {};
//机构下拉设置
$scope.selectOrgOptions = {
displayExpr: 'name',
......@@ -382,6 +379,28 @@
format: $scope.dateFormat //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
});
ele1.datepicker("setDate", $scope.selectedDate);
var control1 = $("#area1");
control1.empty();
orgService.getOrgListByUserId().success(function (data) {
if (data) {
var optionHtml = '';
$.each(data, function (i, item) {
// control.append("<option value='" + item.id + "'>&nbsp;" + item.name + "</option>");
optionHtml += "<option value='" + item.id + "'>&nbsp;" + item.name + "</option>";
});
control1.html(optionHtml);
control1.selectpicker({
liveSearch: true,
actionsBox: true,
selectAllText: '全选',
deselectAllText: '取消全选'
});
control1.selectpicker('refresh');
}
});
initParam();
checkUserOrganizationPermissionList();
getUserPermission();
......
......@@ -13,7 +13,12 @@
<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 dx-tag-box="selectOrgOptions"></div>-->
<!--<select id="area" class="select2" multiple="multiple"-->
<!--style="width: 100%;border-radius: 0 3px 3px 0 !important;max-height: 26px;overflow-y: auto !important;">-->
<!--</select>-->
<select id="area1" class="selectpicker" multiple style="width: 100%">
</select>
</div>
<label class="col-sm-1 control-label">{{'InvoiceQJ' | translate}}:</label>
<div class="col-sm-2">
......
......@@ -394,3 +394,13 @@
padding-left: 15px;
}
}
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 100%
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
\ No newline at end of file
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