Commit 0de392d6 authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents b695bff4 69aab9f3
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
"CertificationResult": "Certification Result", "CertificationResult": "Certification Result",
"Change": "Change", "Change": "Change",
"Alter": "Alter", "Alter": "Alter",
"MenuRecordManage": "Record Manage", "MenuRecordManage": "Document Management",
"MenuAnalysis": "Analysis", "MenuAnalysis": "Tax Analysis",
"ChangePassword": "Change Password", "ChangePassword": "Change Password",
"ChangePasswordFailInfo": "Failed Password Modification Operation:", "ChangePasswordFailInfo": "Failed Password Modification Operation:",
"ChangePasswordSuccessInfo": "The Password Modification Operation was Successful! Automatic Shutdown After 3 Seconds...", "ChangePasswordSuccessInfo": "The Password Modification Operation was Successful! Automatic Shutdown After 3 Seconds...",
......
...@@ -155,6 +155,25 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -155,6 +155,25 @@ taxDocumentManageModule.controller('taxDocumentListController',
caption: "", caption: "",
visible: false visible: false
}, },
{
dataField: "",
caption: $translate.instant('Operation'),
cellTemplate: function (container, options) {
var prevTarget = $('<a style="color:#506bf7;margin-right:1rem;" href="javascript:void(0)"><span>' + $translate.instant('Preview') + '</span></a>');
prevTarget.off('click').on('click', function () {
$scope.viewRemoteFile(options.data.fileName, options.data.filePositionUrl);
});
var editTarget = $('<a style="color:#506bf7;" href="javascript:void(0)"><span>' + $translate.instant('Edit') + '</span></a>');
editTarget.off('click').on('click', function () {
$scope.openSimpleUploadPop(options.data.id);
});
container.append(prevTarget).append(editTarget);
}
},
{ {
dataField: "fileAttr", dataField: "fileAttr",
caption: $translate.instant('Document Attribute'), caption: $translate.instant('Document Attribute'),
...@@ -296,26 +315,7 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -296,26 +315,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField: "remark", dataField: "remark",
caption: $translate.instant('Remarks'), caption: $translate.instant('Remarks'),
},
{
dataField: "",
caption: $translate.instant('Operation'),
cellTemplate: function (container, options) {
var prevTarget = $('<a style="color:#506bf7;margin-right:1rem;" href="javascript:void(0)"><span>' + $translate.instant('Preview') + '</span></a>');
prevTarget.off('click').on('click', function () {
$scope.viewRemoteFile(options.data.fileName, options.data.filePositionUrl);
});
var editTarget = $('<a style="color:#506bf7;" href="javascript:void(0)"><span>' + $translate.instant('Edit') + '</span></a>');
editTarget.off('click').on('click', function () {
$scope.openSimpleUploadPop(options.data.id);
});
container.append(prevTarget).append(editTarget);
} }
},
], ],
onCellClick: function (e) { onCellClick: function (e) {
//单元格点击— e.columnIndex=0 排除复选框列 //单元格点击— e.columnIndex=0 排除复选框列
...@@ -457,9 +457,9 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -457,9 +457,9 @@ taxDocumentManageModule.controller('taxDocumentListController',
// var mon = ownTimeString.substr(4, 2); // var mon = ownTimeString.substr(4, 2);
// $scope.editFieldModel.ownTime = year + "/" + mon; // $scope.editFieldModel.ownTime = year + "/" + mon;
$scope.editFieldModel.ownTime = $scope.queryOwnTime(item.ownTime, "/"); $scope.editFieldModel.ownTime = $scope.queryOwnTime(item.ownTime, "-");
$scope.editFieldModel.fileTime = $scope.getQueryDate(item.fileTime, "/"); $scope.editFieldModel.fileTime = $scope.getQueryDate(item.fileTime, "-");
$scope.editFieldModel.effectiveTime = $scope.getQueryDate(item.effectiveTime, "/"); $scope.editFieldModel.effectiveTime = $scope.getQueryDate(item.effectiveTime, "-");
$scope.syncFileType($scope.editFieldModel.fileAttr); $scope.syncFileType($scope.editFieldModel.fileAttr);
$scope.matchFieldTypeId($scope.editFieldModel); $scope.matchFieldTypeId($scope.editFieldModel);
} }
...@@ -499,17 +499,19 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -499,17 +499,19 @@ taxDocumentManageModule.controller('taxDocumentListController',
uploadItem.formData = [ uploadItem.formData = [
{originFileName: fileName}, {originFileName: fileName},
]; ];
Object.keys($scope.editFieldModel).forEach(function (key) {
Object.keys(params).forEach(function (key) {
var fields = {}; var fields = {};
var curItemValue = $scope.editFieldModel[key] ? $scope.editFieldModel[key] : ""; var curItemValue = params[key] ? params[key] : "";
if (/ownTime/.test(key)) { if (/ownTime/.test(key)) {
// var splitMark = curItemValue.indexOf("-") > -1 ? "-" : "/"; // var splitMark = curItemValue.indexOf("-") > -1 ? "-" : "/";
// fields[key] = parseInt(curItemValue.split(splitMark).join("")); // fields[key] = parseInt(curItemValue.split(splitMark).join(""));
fields[key] = $scope.queryOwnTime(curItemValue, "int"); fields[key] = $scope.queryOwnTime(curItemValue, "int");
} else { } else {
if (/(createTime|updateTime|uploadTime)/.test(key)) { if (/(createTime|updateTime|uploadTime|effectiveTime|fileTime)/.test(key)) {
fields[key] = $scope.getQueryDate(curItemValue, "/"); fields[key] = $scope.getQueryDate(curItemValue, "-");
} else fields[key] = curItemValue; } else fields[key] = curItemValue;
} }
...@@ -642,11 +644,11 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -642,11 +644,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
if (params[key] === undefined || params[key] === null) params[key] = ""; if (params[key] === undefined || params[key] === null) params[key] = "";
}); });
params.ownTime = $scope.queryOwnTime(params.ownTime, "int"); params.ownTime = $scope.queryOwnTime(params.ownTime, "int");
params.effectiveTime ? params.effectiveTime = $scope.getQueryDate(params.effectiveTime, "/") : delete params.effectiveTime; params.effectiveTime ? params.effectiveTime = $scope.getQueryDate(params.effectiveTime, "-") : delete params.effectiveTime;
params.fileTime ? params.fileTime = $scope.getQueryDate(params.fileTime, "/") : delete params.fileTime; params.fileTime ? params.fileTime = $scope.getQueryDate(params.fileTime, "-") : delete params.fileTime;
params.createTime ? params.createTime = $scope.getQueryDate(params.createTime, "/") : delete params.createTime; params.createTime ? params.createTime = $scope.getQueryDate(params.createTime, "-") : delete params.createTime;
params.updateTime ? params.updateTime = $scope.getQueryDate(params.updateTime, "/") : delete params.updateTime; params.updateTime ? params.updateTime = $scope.getQueryDate(params.updateTime, "-") : delete params.updateTime;
params.uploadTime ? params.uploadTime = $scope.getQueryDate(params.uploadTime, "/") : delete params.uploadTime; params.uploadTime ? params.uploadTime = $scope.getQueryDate(params.uploadTime, "-") : delete params.uploadTime;
params.filePositionUrl = encodeURIComponent(params.filePositionUrl); params.filePositionUrl = encodeURIComponent(params.filePositionUrl);
params.auditStatus = $scope.transformAuditStatusToServer(params.auditStatus); params.auditStatus = $scope.transformAuditStatusToServer(params.auditStatus);
taxDocumentListService.editRecord(params).then(function (data) { taxDocumentListService.editRecord(params).then(function (data) {
...@@ -1081,6 +1083,11 @@ taxDocumentManageModule.directive('multiFileUploader', function () { ...@@ -1081,6 +1083,11 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
}]; }];
$scope.matchCompanyId($scope.multiUploadSuccessItems[i]); $scope.matchCompanyId($scope.multiUploadSuccessItems[i]);
var editFieldModel = $scope.multiUploadSuccessItems[i]; var editFieldModel = $scope.multiUploadSuccessItems[i];
editFieldModel.effectiveTime ? editFieldModel.effectiveTime = $scope.getQueryDate(editFieldModel.effectiveTime, "-") : delete editFieldModel.effectiveTime;
editFieldModel.createTime ? editFieldModel.createTime = $scope.getQueryDate(editFieldModel.createTime, "-") : delete editFieldModel.createTime;
editFieldModel.updateTime ? editFieldModel.updateTime = $scope.getQueryDate(editFieldModel.updateTime, "-") : delete editFieldModel.updateTime;
editFieldModel.uploadTime ? editFieldModel.uploadTime = $scope.getQueryDate(editFieldModel.uploadTime, "-") : delete editFieldModel.uploadTime;
editFieldModel.fileTime ? editFieldModel.fileTime = $scope.getQueryDate(editFieldModel.fileTime, "-") : delete editFieldModel.fileTime;
Object.keys(editFieldModel).forEach(function (key) { Object.keys(editFieldModel).forEach(function (key) {
var curItemValue = editFieldModel[key] ? editFieldModel[key] : ""; var curItemValue = editFieldModel[key] ? editFieldModel[key] : "";
...@@ -1275,6 +1282,12 @@ taxDocumentManageModule.directive('multiFileUploader', function () { ...@@ -1275,6 +1282,12 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
}]; }];
$scope.matchCompanyId($scope.multiUploadSuccessItems[i]); $scope.matchCompanyId($scope.multiUploadSuccessItems[i]);
var editFieldModel = $scope.multiUploadSuccessItems[i]; var editFieldModel = $scope.multiUploadSuccessItems[i];
editFieldModel.effectiveTime ? editFieldModel.effectiveTime = $scope.getQueryDate(editFieldModel.effectiveTime, "-") : delete editFieldModel.effectiveTime;
editFieldModel.createTime ? editFieldModel.createTime = $scope.getQueryDate(editFieldModel.createTime, "-") : delete editFieldModel.createTime;
editFieldModel.updateTime ? editFieldModel.updateTime = $scope.getQueryDate(editFieldModel.updateTime, "-") : delete editFieldModel.updateTime;
editFieldModel.uploadTime ? editFieldModel.uploadTime = $scope.getQueryDate(editFieldModel.uploadTime, "-") : delete editFieldModel.uploadTime;
editFieldModel.fileTime ? editFieldModel.fileTime = $scope.getQueryDate(editFieldModel.fileTime, "-") : delete editFieldModel.fileTime;
Object.keys(editFieldModel).forEach(function (key) { Object.keys(editFieldModel).forEach(function (key) {
var curItemValue = editFieldModel[key] ? editFieldModel[key] : ""; var curItemValue = editFieldModel[key] ? editFieldModel[key] : "";
fileItem.formData.push($scope.queryFileUploadData(key, curItemValue)); fileItem.formData.push($scope.queryFileUploadData(key, curItemValue));
...@@ -2305,7 +2318,7 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -2305,7 +2318,7 @@ taxDocumentManageModule.directive('tempModule', function () {
fields[key] = $scope.queryOwnTime(curItemValue, "int"); fields[key] = $scope.queryOwnTime(curItemValue, "int");
} else { } else {
if (/(createTime|updateTime|uploadTime)/.test(key)) { if (/(createTime|updateTime|uploadTime)/.test(key)) {
fields[key] = $scope.getQueryDate(curItemValue, "/"); fields[key] = $scope.getQueryDate(curItemValue, "-");
} else fields[key] = curItemValue; } else fields[key] = curItemValue;
} }
return fields; return fields;
......
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