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