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
017a7865
Commit
017a7865
authored
Feb 18, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
7daf47a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
98 deletions
+82
-98
import-cit-journal-adjust.ctrl.js
...port-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
+57
-50
import-cit-journal-adjust.html
.../import-cit-journal-adjust/import-cit-journal-adjust.html
+25
-48
No files found.
atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
View file @
017a7865
...
...
@@ -16,7 +16,7 @@
$scope
.
period
=
$scope
.
periodId
;
$scope
.
moduleid
=
enums
.
vatModuleEnum
.
Import_TrialBalance
;
$scope
.
chunkSize
=
100000
;
$scope
.
success
=
false
;
$scope
.
success
=
false
;
$scope
.
showErrorTable
=
false
;
$scope
.
showInitTable
=
false
;
$scope
.
showImportTable
=
false
...
...
@@ -149,7 +149,7 @@
//验证每行数据类型
var
valueTypeValidation
=
function
(
balanceinputlist
)
{
return
true
;
//todo:[validation] to skip data validation (neo)
return
true
;
//todo:[validation] to skip data validation (neo)
var
AccountCodeOverLengthMsg
=
''
;
var
AccountCodeNullMsg
=
''
;
var
PeriodMsg
=
''
;
...
...
@@ -586,16 +586,16 @@
if
(
$scope
.
balanceInputList
[
0
].
MonthId
===
null
)
{
//没有选中月份,默认导入所有期间
$scope
.
isSelectPeriod
=
false
;
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'NoPeriod'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
title
:
"warning!"
,
text
:
$translate
.
instant
(
'NoPeriod'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
$timeout
(
function
()
{
if
(
isConfirm
)
{
...
...
@@ -620,16 +620,16 @@
});
if
(
isSame
===
false
)
{
//是否只导入当前月份数据
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'PeriodDifferenceTip'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
title
:
"warning!"
,
text
:
$translate
.
instant
(
'PeriodDifferenceTip'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
$timeout
(
function
()
{
if
(
isConfirm
)
{
...
...
@@ -697,15 +697,13 @@
logDto
.
UpdateTime
=
new
Date
();
logDto
.
OperationContent
=
$scope
.
fileName
;
if
(
importType
===
$scope
.
importEnum
.
Import
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'Import
TrialBalance
'
);
logDto
.
OperationName
=
$translate
.
instant
(
'Import
ProfitLoss
'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
Import
;
}
else
if
(
importType
===
$scope
.
importEnum
.
CoverImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'CoverImportTrialBalance'
);
}
else
if
(
importType
===
$scope
.
importEnum
.
CoverImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'CoverImportProfitLoss'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
CoverImport
;
}
else
if
(
importType
===
$scope
.
importEnum
.
AddImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'AddImportTrialBalance'
);
}
else
if
(
importType
===
$scope
.
importEnum
.
AddImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'AddImportProfitLoss'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
AddImport
;
}
...
...
@@ -714,7 +712,8 @@
Upload
.
upload
({
url
:
$scope
.
importPLExcelFile
,
data
:
{
periodDate
:
period
periodDate
:
period
,
importType
:
importType
},
file
:
impExl
,
headers
:
{
...
...
@@ -730,17 +729,19 @@
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
ret
.
result
)
{
// 导入成功
// todo ImportPLStatusGridSource Change
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFail
'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess
'
));
}
else
{
if
(
ret
.
resultMsg
&&
ret
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
ret
.
resultMsg
));
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFailed'
));
}
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportFail'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFail'
));
}
getImportPLStatus
();
},
function
(
resp
)
{
deferred
.
resolve
();
...
...
@@ -826,7 +827,7 @@
caption
:
$translate
.
instant
(
'id'
)
},
{
dataField
:
"taxpayerIdNum"
,
width
:
'1
0
%'
,
width
:
'1
5
%'
,
allowHeaderFiltering
:
false
,
caption
:
$translate
.
instant
(
'TaxpayerIdNum'
)
},
{
...
...
@@ -837,27 +838,32 @@
},
{
dataField
:
"companyName"
,
allowHeaderFiltering
:
false
,
width
:
'
15
%'
,
width
:
'
27
%'
,
caption
:
$translate
.
instant
(
'CompanyName'
)
},
{
dataField
:
"
yearPeriod
"
,
dataField
:
"
periodYear
"
,
allowHeaderFiltering
:
false
,
width
:
'
20
%'
,
width
:
'
5
%'
,
caption
:
$translate
.
instant
(
'YearPeriod'
)
},
{
dataField
:
"period"
,
dataField
:
"period
Month
"
,
allowHeaderFiltering
:
false
,
width
:
'20%'
,
width
:
'10%'
,
caption
:
$translate
.
instant
(
'TMSPeriod'
)
},
{
dataField
:
"periodMonth"
,
allowHeaderFiltering
:
false
,
width
:
'5%'
,
caption
:
$translate
.
instant
(
'Period'
)
},
{
dataField
:
"recordSize"
,
allowHeaderFiltering
:
false
,
width
:
'
10
%'
,
width
:
'
8
%'
,
caption
:
$translate
.
instant
(
'RecordSize'
)
},
{
dataField
:
"
status
"
,
dataField
:
"
errorMsg
"
,
allowHeaderFiltering
:
false
,
width
:
'1
0
%'
,
width
:
'1
5
%'
,
caption
:
$translate
.
instant
(
'Status'
)
}
],
...
...
@@ -894,14 +900,15 @@
}
}
};
getImportPLStatus
();
};
var
getImportPLStatus
=
function
()
{
orgExtraService
.
getAccountingRateListByOrgId
(
orgId
).
success
(
function
(
data
)
{
vatImportService
.
displayImportLog
(
constant
.
importFileType
.
profitLoss
).
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
ImportPLStatusGridSource
=
data
;
for
(
var
i
=
1
;
i
<=
$scope
.
AccountingRate
GridSource
.
length
;
i
++
)
{
$scope
.
AccountingRate
GridSource
[
i
-
1
].
index
=
i
;
for
(
var
i
=
1
;
i
<=
$scope
.
ImportPLStatus
GridSource
.
length
;
i
++
)
{
$scope
.
ImportPLStatus
GridSource
[
i
-
1
].
index
=
i
;
}
}
});
...
...
@@ -1127,8 +1134,8 @@
refreshByService
.
refreshFail
();
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
}
}).
error
(
function
()
{
...
...
@@ -1219,7 +1226,7 @@
loadImportPLStatusInfoDatagrid
();
initDatePicker
();
$scope
.
$watch
(
'
fileNameWrapper
'
,
function
(
newValue
,
oldValue
)
{
$scope
.
$watch
(
'
importExcelFile
'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
!==
null
&&
newValue
!==
oldValue
)
{
initImportFile
(
newValue
);
}
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.html
View file @
017a7865
<div
class=
"import-cit-journal-adjust"
>
<!--标题-->
<div
class=
"nav-wrapper"
>
<div
class=
"nav-header"
translate=
"
InvoiceData
Title"
></div>
<div
class=
"nav-header"
translate=
"
ProfitLoss
Title"
></div>
<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
class=
"pull-right operation-wrapper"
>
<span
ng-click=
"refreshTbData()"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
ng-if=
"showInitTable"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i>
{{'Refresh' | translate}}
</span>
<span
ng-click=
"clearTbData()"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
ng-if=
"showInitTable && hasImportPermission"
><i
class=
"fa fa-trash-o"
aria-hidden=
"true"
></i>
{{'ClearAll' | translate}}
</span>
<span
ng-click=
"showOperateLogPop()"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'Remarks' | translate}}
</span>
</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=
"InvoiceQJ"
></span>
:
<div
class=
"period-picker"
style=
"margin-left:10px"
>
<input
type=
"text"
id=
"periodDatepicker"
class=
"datepicker imp-subheader"
style=
"width:120px;"
readonly=
"readonly"
ng-model=
"UploadPeriodTime"
/>
<i
class=
"fa fa-calendar imp-subheader red-color"
style=
"width:20px;"
></i>
</div>
<div
ng-show=
"fileName"
style=
"display:inline-block"
>
<span
title=
"{{fileName}}"
>
{{'FileName' | translate}}{{fileName | limitString:10}}
</span>
</div>
<button
type=
"button"
atms-permission
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
ngf-select=
""
type=
"file"
ng-model=
"importExcelFile"
ngf-drag-over-class=
"'dragover'"
accept=
".xls,.xlsx"
ngf-multiple=
"false"
ngf-allow-dir=
"false"
class=
"btn btn-vat-third"
style=
"margin-right:10px;margin-left:30px"
>
{{'SelectFile' | translate}}
</button>
<div
ng-show=
"fileName"
style=
"display:inline-block"
>
<span
title=
"{{fileName}}"
>
{{'FileName' | translate}}{{fileName | limitString:10}}
</span>
|
<span
translate=
"WorkSheet"
></span>
<div
class=
"ui-select-no-border"
>
<ui-select
ng-model=
"sheetInfo.selectedSheetName"
on-select=
"changeSheet($item)"
search-enabled=
"false"
style=
"width:120px;"
>
<ui-select-match
placeholder=
"{{'SelectASheet' | translate}}"
>
{{$select.selected.name}}
</ui-select-match>
<ui-select-choices
repeat=
"sheetName in sheetData.sheetNameList | propsFilter: {name: $select.search}"
>
<div
title=
"{{sheetName.name}}"
ng-bind-html=
"sheetName.name | limitString:9"
></div>
</ui-select-choices>
</ui-select>
</div>
|
<span
translate=
"StartRowNum"
></span>
<input
id=
"StartRowNum"
ng-model=
"startRowNum"
type=
"text"
onkeyup=
"if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
onafterpaste=
"if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
/>
</div>
<button
type=
"button"
atms-permission
permission-control-type=
"ngIf"
class=
"btn btn-vat-primary"
style=
"float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate=
"TemplateBtn"
...
...
@@ -67,12 +44,12 @@
<div
class=
"btn-wrapper"
ng-if=
"!isShowImportTotalBtn"
>
<button
class=
"btn btn-vat-primary"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
translate=
"ConverImportBtn"
ng-click=
"doUploadTbResult(importEnum.CoverImport)"
></button>
|
<button
class=
"btn btn-vat-primary"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
translate=
"AddImportBtn"
ng-click=
"doUploadTbResult(importEnum.AddImport)"
></button>
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
translate=
"ConverImportBtn"
ng-click=
"doUploadTbResult(importEnum.CoverImport)"
></button>
|
<button
class=
"btn btn-vat-primary"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
translate=
"AddImportBtn"
ng-click=
"doUploadTbResult(importEnum.AddImport)"
></button>
</div>
</div>
</div>
...
...
@@ -84,7 +61,7 @@
</div>
</div>-->
</form>
<div
class=
"dt-init-wrapper"
>
<div
class=
"dx-viewport grid-container"
>
<div
id=
"importPLStatusGridContainer"
dx-data-grid=
"importPLStatusGridOptions"
...
...
@@ -92,8 +69,8 @@
</div>
</div>
</div>
<div
class=
"error-info-wrapper"
id=
"error-info-wrapper"
ng-show=
"showErrorTable"
>
<div
ui-grid=
"gridOptionsErrorMsg"
style=
"width:100%;"
ng-style=
"getErrorGridHeight()"
></div>
</div>
...
...
@@ -168,20 +145,20 @@
<br
/>
<table>
<thead>
<tr>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpNoCol' | translate}}
</th>
<th
width=
"20%"
>
{{'ImportErrorPopUpErrorTypeCol' | translate}}
</th>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpErrorCountCol' | translate}}
</th>
<th
width=
"6%"
>
{{'ImportErrorPopUpErrorDescCol' | translate}}
</th>
</tr>
<tr>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpNoCol' | translate}}
</th>
<th
width=
"20%"
>
{{'ImportErrorPopUpErrorTypeCol' | translate}}
</th>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpErrorCountCol' | translate}}
</th>
<th
width=
"6%"
>
{{'ImportErrorPopUpErrorDescCol' | translate}}
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"error in errorMsgMap track by $index"
>
<td
width=
"10%"
style=
"text-align:center;"
>
{{$index + 1}}
</td>
<td
width=
"20%"
>
{{error.errorType}}
</td>
<td
width=
"10%"
style=
"text-align:center;"
>
{{error.errorCount}}
</td>
<td
width=
"60%"
ng-bind-html=
"error.errorContent"
></td>
</tr>
<tr
ng-repeat=
"error in errorMsgMap track by $index"
>
<td
width=
"10%"
style=
"text-align:center;"
>
{{$index + 1}}
</td>
<td
width=
"20%"
>
{{error.errorType}}
</td>
<td
width=
"10%"
style=
"text-align:center;"
>
{{error.errorCount}}
</td>
<td
width=
"60%"
ng-bind-html=
"error.errorContent"
></td>
</tr>
</tbody>
</table>
</div>
...
...
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