Commit a8e01d74 authored by CN\Frank XA Zhang's avatar CN\Frank XA Zhang

show report validation config --frank

parent 7fc003a6
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
if ($scope.curServiceTypeId === enums.serviceType.VAT) { if ($scope.curServiceTypeId === enums.serviceType.VAT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt); $scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
var ds = _.filter(citReportTypeList, function (item) { return item.value == 1 || item.value == 3 || item.value == 4 }); var ds = _.filter(citReportTypeList, function (item) {
return item.value == 1 || item.value == 3 || item.value == 4
});
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({ $scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: ds data: ds
}); });
...@@ -314,7 +316,7 @@ ...@@ -314,7 +316,7 @@
($scope.editReportFormulaForm.formula && !_.isEmpty($scope.editReportFormulaForm.formula.$error) || ($scope.editReportFormulaForm.formula && !_.isEmpty($scope.editReportFormulaForm.formula.$error) ||
$scope.editReportFormulaForm.voucher && !_.isEmpty($scope.editReportFormulaForm.voucher.$error) || $scope.editReportFormulaForm.voucher && !_.isEmpty($scope.editReportFormulaForm.voucher.$error) ||
$scope.editReportFormulaForm.invoice && !_.isEmpty($scope.editReportFormulaForm.invoice.$error) || $scope.editReportFormulaForm.invoice && !_.isEmpty($scope.editReportFormulaForm.invoice.$error) ||
$scope.editReportFormulaForm.model && !_.isEmpty($scope.editReportFormulaForm.model.$error) || // $scope.editReportFormulaForm.model && !_.isEmpty($scope.editReportFormulaForm.model.$error) ||
$scope.editReportFormulaForm.validation && !_.isEmpty($scope.editReportFormulaForm.validation.$error)) $scope.editReportFormulaForm.validation && !_.isEmpty($scope.editReportFormulaForm.validation.$error))
}; };
...@@ -577,10 +579,10 @@ ...@@ -577,10 +579,10 @@
_spread = spread; _spread = spread;
var activeSheet; var activeSheet;
if(constant.regesterInformation.active){ if (constant.regesterInformation.active) {
activeSheet = _spread.getActiveSheet(); activeSheet = _spread.getActiveSheet();
} }
else{ else {
activeSheet = _spread.getSheet(1); activeSheet = _spread.getSheet(1);
} }
//设置整个sheet不可编辑 //设置整个sheet不可编辑
...@@ -764,8 +766,8 @@ ...@@ -764,8 +766,8 @@
var row = startRow + i; var row = startRow + i;
var col = startCol + j; var col = startCol + j;
if (_.every(exceptedCells, function (c) { if (_.every(exceptedCells, function (c) {
return c.rowIndex !== row || c.columnIndex !== col; return c.rowIndex !== row || c.columnIndex !== col;
})) { })) {
validPosition.push({rowIndex: row, columnIndex: col}); validPosition.push({rowIndex: row, columnIndex: col});
} }
} }
...@@ -862,10 +864,10 @@ ...@@ -862,10 +864,10 @@
$scope.selectedTab = 1; $scope.selectedTab = 1;
} }
else if (editModel.hasModel) { else if (editModel.hasModel) {
$scope.selectedTab = 2; $scope.selectedTab = 3;
} }
else if (editModel.hasValidation) { else if (editModel.hasValidation) {
$scope.selectedTab = 3; $scope.selectedTab = 2;
} }
else { // all options are not configured else { // all options are not configured
$scope.selectedTab = 0; $scope.selectedTab = 0;
...@@ -1098,8 +1100,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1098,8 +1100,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
// Find the operators and make sure they are not duplicated // Find the operators and make sure they are not duplicated
var operatorMatches = ngModelValue.match(notDuplicateOperatorExp); var operatorMatches = ngModelValue.match(notDuplicateOperatorExp);
if (_.any(operatorMatches, function (m) { if (_.any(operatorMatches, function (m) {
return m.length > 1; return m.length > 1;
})) { })) {
ngModel.$setValidity('operatorDuplicateValidator', false); ngModel.$setValidity('operatorDuplicateValidator', false);
return false; return false;
} }
...@@ -1279,8 +1281,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1279,8 +1281,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
// Find the operators and make sure they are not duplicated // Find the operators and make sure they are not duplicated
var operatorMatches = ngModelValue.match(notDuplicateOperatorExp); var operatorMatches = ngModelValue.match(notDuplicateOperatorExp);
if (_.any(operatorMatches, function (m) { if (_.any(operatorMatches, function (m) {
return m.length > 1; return m.length > 1;
})) { })) {
ngModel.$setValidity('operatorDuplicateValidator', false); ngModel.$setValidity('operatorDuplicateValidator', false);
return false; return false;
} }
...@@ -1354,7 +1356,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1354,7 +1356,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
}; };
/*********************** End Formula Editor ***********************************/ /*********************** End Formula Editor ***********************************/
//模板另存为 //模板另存为
var saveTemplateGroup = function () { var saveTemplateGroup = function () {
var groupName = $scope.groupName; var groupName = $scope.groupName;
if (groupName === '' || groupName === undefined) { if (groupName === '' || groupName === undefined) {
...@@ -1732,9 +1734,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1732,9 +1734,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
if (!newValue) { if (!newValue) {
$scope.selectedModel = []; $scope.selectedModel = [];
$scope.editModel.modelIDs = []; $scope.editModel.modelIDs = [];
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true); // $scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true);
} else if ($scope.editModel.modelIDs.length === 0) { } else if ($scope.editModel.modelIDs.length === 0) {
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', false); // $scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', false);
} }
}); });
...@@ -1764,9 +1766,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1764,9 +1766,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
$scope.$watch('selectedModel.length', function (newValue, oldValue) { $scope.$watch('selectedModel.length', function (newValue, oldValue) {
if (newValue !== 0 || !$scope.editModel.hasModel) { if (newValue !== 0 || !$scope.editModel.hasModel) {
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true); // $scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true);
} else { } else {
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', false); // $scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', false);
} }
if (newValue !== oldValue) { if (newValue !== oldValue) {
...@@ -1972,7 +1974,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -1972,7 +1974,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
serviceTypeId = $scope.curServiceTypeId; serviceTypeId = $scope.curServiceTypeId;
} }
$scope.templateModel = { $scope.templateModel = {
reportTypeList:$scope.detailReportTypeList, reportTypeList: $scope.detailReportTypeList,
templateGroupID: $scope.curTemplateGroup.id, templateGroupID: $scope.curTemplateGroup.id,
serviceTypeID: serviceTypeId, serviceTypeID: serviceTypeId,
payTaxType: serviceTypeId === enums.serviceType.CIT || serviceTypeId === enums.serviceType.Others ? '' : $scope.payTaxType.value, payTaxType: serviceTypeId === enums.serviceType.CIT || serviceTypeId === enums.serviceType.Others ? '' : $scope.payTaxType.value,
...@@ -2183,9 +2185,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>'); ...@@ -2183,9 +2185,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
var tabs = [ var tabs = [
{id: 0, text: $translate.instant('AutoCalculateTab')}, {id: 0, text: $translate.instant('AutoCalculateTab')},
{id: 1, text: $translate.instant('ManualInputTab')} {id: 1, text: $translate.instant('ManualInputTab')},
// {id: 2, text: $translate.instant('ModelTab')}, // {id: 2, text: $translate.instant('ModelTab')},
// {id: 2, text: $translate.instant('ValidationTab')} {id: 2, text: $translate.instant('ValidationTab')}
]; ];
$scope.tabOptions = { $scope.tabOptions = {
dataSource: tabs, dataSource: tabs,
......
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<input type="checkbox" ng-model="editModel.hasKeyIn" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'ManualInput' | translate}} <input type="checkbox" ng-model="editModel.hasKeyIn" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'ManualInput' | translate}}
</label> </label>
</div> </div>
<div class="form-group model-group" ng-show="selectedTab === 2"> <div class="form-group model-group" ng-show="selectedTab === 3">
<label class="checkbox-inline bold" ng-class="{ 'disabled': !hasEditPermission || !ToggleSaveAs }"> <label class="checkbox-inline bold" ng-class="{ 'disabled': !hasEditPermission || !ToggleSaveAs }">
<input type="checkbox" name="model" ng-model="editModel.hasModel" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'LinkModel' | translate}} <input type="checkbox" name="model" ng-model="editModel.hasModel" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'LinkModel' | translate}}
</label> </label>
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
</button> </button>
</div> </div>
</div> </div>
<div class="dx-viewport grid-container last-grid" ng-show="selectedTab === 2" ng-class="{ 'row1': selectedModel.length <= 1, 'row2': selectedModel.length === 2, <div class="dx-viewport grid-container last-grid" ng-show="selectedTab === 3" ng-class="{ 'row1': selectedModel.length <= 1, 'row2': selectedModel.length === 2,
'row3': selectedModel.length === 3, 'row3': selectedModel.length === 3,
'row4': selectedModel.length === 4, 'row4': selectedModel.length === 4,
'row5': selectedModel.length === 5, 'row5': selectedModel.length === 5,
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
}"> }">
<div id="modelGrid" dx-data-grid="modelGridOptions"></div> <div id="modelGrid" dx-data-grid="modelGridOptions"></div>
</div> </div>
<div class="form-group validation-group" ng-show="selectedTab === 3"> <div class="form-group validation-group" ng-show="selectedTab === 2">
<label class="checkbox-inline bold" ng-class="{ 'disabled': !hasEditPermission || !ToggleSaveAs }"> <label class="checkbox-inline bold" ng-class="{ 'disabled': !hasEditPermission || !ToggleSaveAs }">
<input type="checkbox" ng-model="editModel.hasValidation" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'ValidationConfig' | translate}} <input type="checkbox" ng-model="editModel.hasValidation" ng-disabled="!hasEditPermission || !ToggleSaveAs">{{'ValidationConfig' | translate}}
</label> </label>
...@@ -245,11 +245,11 @@ ...@@ -245,11 +245,11 @@
translator-blur="timerHideTranslatorForValidation();"></formula-translator> translator-blur="timerHideTranslatorForValidation();"></formula-translator>
</div> </div>
<div class="form-group validation-instructions" ng-show="selectedTab === 3"> <div class="form-group validation-instructions" ng-show="selectedTab === 2">
<label class="bold">{{'ValidationInstructions' | translate}}:</label> <label class="bold">{{'ValidationInstructions' | translate}}:</label>
<textarea class="form-control" ng-model="editModel.validationDescription" ng-readonly="!hasEditPermission || !ToggleSaveAs"></textarea> <textarea class="form-control" ng-model="editModel.validationDescription" ng-readonly="!hasEditPermission || !ToggleSaveAs"></textarea>
</div> </div>
<div ng-show="selectedTab === 3 && hasEditPermission && ToggleSaveAs" class="flex-row-start-center" style="margin: 15px 0 15px -15px;"> <div ng-show="selectedTab === 2 && hasEditPermission && ToggleSaveAs" class="flex-row-start-center" style="margin: 15px 0 15px -15px;">
<span>{{'IsInputNecessary' | translate}}:</span> <span>{{'IsInputNecessary' | translate}}:</span>
<div class="btn-group switch-group" data-toggle="buttons"> <div class="btn-group switch-group" data-toggle="buttons">
<label class="btn btn-primary" ng-class="{'active':editModel.hasFormula}" ng-click="editModel.hasFormula=true;"> <label class="btn btn-primary" ng-class="{'active':editModel.hasFormula}" ng-click="editModel.hasFormula=true;">
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
scope.refreshGrids = function () { scope.refreshGrids = function () {
$("#voucherGrid").dxDataGrid("instance").refresh(); $("#voucherGrid").dxDataGrid("instance").refresh();
$("#modelGrid").dxDataGrid("instance").refresh(); //$("#modelGrid").dxDataGrid("instance").refresh();
}; };
scope.toggleSaveAs = function () { scope.toggleSaveAs = function () {
......
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