Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
a8e01d74
Commit
a8e01d74
authored
Mar 27, 2019
by
CN\Frank XA Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show report validation config --frank
parent
7fc003a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
+28
-26
declaration-form-configuration.ctrl.js
...nFormConfiguration/declaration-form-configuration.ctrl.js
+22
-20
declaration-form-configuration.html
...tionFormConfiguration/declaration-form-configuration.html
+5
-5
declaration-form-configuration.js
...rationFormConfiguration/declaration-form-configuration.js
+1
-1
No files found.
atms-web/src/main/webapp/app/admin/systemConfiguration/declarationFormConfiguration/declaration-form-configuration.ctrl.js
View file @
a8e01d74
...
...
@@ -145,7 +145,9 @@
if
(
$scope
.
curServiceTypeId
===
enums
.
serviceType
.
VAT
)
{
$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
({
data
:
ds
});
...
...
@@ -314,7 +316,7 @@
(
$scope
.
editReportFormulaForm
.
formula
&&
!
_
.
isEmpty
(
$scope
.
editReportFormulaForm
.
formula
.
$error
)
||
$scope
.
editReportFormulaForm
.
voucher
&&
!
_
.
isEmpty
(
$scope
.
editReportFormulaForm
.
voucher
.
$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
))
};
...
...
@@ -577,10 +579,10 @@
_spread
=
spread
;
var
activeSheet
;
if
(
constant
.
regesterInformation
.
active
)
{
if
(
constant
.
regesterInformation
.
active
)
{
activeSheet
=
_spread
.
getActiveSheet
();
}
else
{
else
{
activeSheet
=
_spread
.
getSheet
(
1
);
}
//设置整个sheet不可编辑
...
...
@@ -764,8 +766,8 @@
var
row
=
startRow
+
i
;
var
col
=
startCol
+
j
;
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
});
}
}
...
...
@@ -862,10 +864,10 @@
$scope
.
selectedTab
=
1
;
}
else
if
(
editModel
.
hasModel
)
{
$scope
.
selectedTab
=
2
;
$scope
.
selectedTab
=
3
;
}
else
if
(
editModel
.
hasValidation
)
{
$scope
.
selectedTab
=
3
;
$scope
.
selectedTab
=
2
;
}
else
{
// all options are not configured
$scope
.
selectedTab
=
0
;
...
...
@@ -1098,8 +1100,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
// Find the operators and make sure they are not duplicated
var
operatorMatches
=
ngModelValue
.
match
(
notDuplicateOperatorExp
);
if
(
_
.
any
(
operatorMatches
,
function
(
m
)
{
return
m
.
length
>
1
;
}))
{
return
m
.
length
>
1
;
}))
{
ngModel
.
$setValidity
(
'operatorDuplicateValidator'
,
false
);
return
false
;
}
...
...
@@ -1279,8 +1281,8 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
// Find the operators and make sure they are not duplicated
var
operatorMatches
=
ngModelValue
.
match
(
notDuplicateOperatorExp
);
if
(
_
.
any
(
operatorMatches
,
function
(
m
)
{
return
m
.
length
>
1
;
}))
{
return
m
.
length
>
1
;
}))
{
ngModel
.
$setValidity
(
'operatorDuplicateValidator'
,
false
);
return
false
;
}
...
...
@@ -1354,7 +1356,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
};
/*********************** End Formula Editor ***********************************/
//模板另存为
//模板另存为
var
saveTemplateGroup
=
function
()
{
var
groupName
=
$scope
.
groupName
;
if
(
groupName
===
''
||
groupName
===
undefined
)
{
...
...
@@ -1732,9 +1734,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
if
(
!
newValue
)
{
$scope
.
selectedModel
=
[];
$scope
.
editModel
.
modelIDs
=
[];
$scope
.
editReportFormulaForm
.
model
.
$setValidity
(
'modelNotSelectValidator'
,
true
);
//
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true);
}
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"/>');
$scope
.
$watch
(
'selectedModel.length'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
!==
0
||
!
$scope
.
editModel
.
hasModel
)
{
$scope
.
editReportFormulaForm
.
model
.
$setValidity
(
'modelNotSelectValidator'
,
true
);
//
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', true);
}
else
{
$scope
.
editReportFormulaForm
.
model
.
$setValidity
(
'modelNotSelectValidator'
,
false
);
//
$scope.editReportFormulaForm.model.$setValidity('modelNotSelectValidator', false);
}
if
(
newValue
!==
oldValue
)
{
...
...
@@ -1972,7 +1974,7 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
serviceTypeId
=
$scope
.
curServiceTypeId
;
}
$scope
.
templateModel
=
{
reportTypeList
:
$scope
.
detailReportTypeList
,
reportTypeList
:
$scope
.
detailReportTypeList
,
templateGroupID
:
$scope
.
curTemplateGroup
.
id
,
serviceTypeID
:
serviceTypeId
,
payTaxType
:
serviceTypeId
===
enums
.
serviceType
.
CIT
||
serviceTypeId
===
enums
.
serviceType
.
Others
?
''
:
$scope
.
payTaxType
.
value
,
...
...
@@ -2183,9 +2185,9 @@ ng-show="hasEditPermission && ToggleSaveAs && editModel.hasModel"/>');
var
tabs
=
[
{
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('ValidationTab')}
{
id
:
2
,
text
:
$translate
.
instant
(
'ValidationTab'
)}
];
$scope
.
tabOptions
=
{
dataSource
:
tabs
,
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/declarationFormConfiguration/declaration-form-configuration.html
View file @
a8e01d74
...
...
@@ -198,7 +198,7 @@
<input
type=
"checkbox"
ng-model=
"editModel.hasKeyIn"
ng-disabled=
"!hasEditPermission || !ToggleSaveAs"
>
{{'ManualInput' | translate}}
</label>
</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 }"
>
<input
type=
"checkbox"
name=
"model"
ng-model=
"editModel.hasModel"
ng-disabled=
"!hasEditPermission || !ToggleSaveAs"
>
{{'LinkModel' | translate}}
</label>
...
...
@@ -212,7 +212,7 @@
</button>
</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,
'row4': selectedModel.length === 4,
'row5': selectedModel.length === 5,
...
...
@@ -220,7 +220,7 @@
}"
>
<div
id=
"modelGrid"
dx-data-grid=
"modelGridOptions"
></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 }"
>
<input
type=
"checkbox"
ng-model=
"editModel.hasValidation"
ng-disabled=
"!hasEditPermission || !ToggleSaveAs"
>
{{'ValidationConfig' | translate}}
</label>
...
...
@@ -245,11 +245,11 @@
translator-blur=
"timerHideTranslatorForValidation();"
></formula-translator>
</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>
<textarea
class=
"form-control"
ng-model=
"editModel.validationDescription"
ng-readonly=
"!hasEditPermission || !ToggleSaveAs"
></textarea>
</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>
<div
class=
"btn-group switch-group"
data-toggle=
"buttons"
>
<label
class=
"btn btn-primary"
ng-class=
"{'active':editModel.hasFormula}"
ng-click=
"editModel.hasFormula=true;"
>
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/declarationFormConfiguration/declaration-form-configuration.js
View file @
a8e01d74
...
...
@@ -37,7 +37,7 @@
scope
.
refreshGrids
=
function
()
{
$
(
"#voucherGrid"
).
dxDataGrid
(
"instance"
).
refresh
();
$
(
"#modelGrid"
).
dxDataGrid
(
"instance"
).
refresh
();
//
$("#modelGrid").dxDataGrid("instance").refresh();
};
scope
.
toggleSaveAs
=
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment