Commit f6a94285 authored by Cheng C Yang's avatar Cheng C Yang

Bug 23451

parent b2ffa029
package pwc.taxtech.atms.dto.organization; package pwc.taxtech.atms.dto.organization;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.util.PwCIdSerialize; import pwc.taxtech.atms.common.util.PwCIdSerialize;
...@@ -23,7 +24,9 @@ public class OrganizationExtraDto implements Serializable { ...@@ -23,7 +24,9 @@ public class OrganizationExtraDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@JsonSerialize(using = PwCIdSerialize.class) @JsonSerialize(using = PwCIdSerialize.class)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id; private Long id;
/** /**
...@@ -541,6 +544,7 @@ public class OrganizationExtraDto implements Serializable { ...@@ -541,6 +544,7 @@ public class OrganizationExtraDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long secondaryApprovalAmount; private Long secondaryApprovalAmount;
/** /**
...@@ -574,6 +578,7 @@ public class OrganizationExtraDto implements Serializable { ...@@ -574,6 +578,7 @@ public class OrganizationExtraDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long issuedShares; private Long issuedShares;
/** /**
......
...@@ -1984,5 +1984,7 @@ ...@@ -1984,5 +1984,7 @@
"FileExportSuccess": "File Export Success", "FileExportSuccess": "File Export Success",
"FileExportFailed": "File Export Failed", "FileExportFailed": "File Export Failed",
"InputAllMandatoryInfo": "Please Input All The Mandatory Information",
"~MustBeEndOneApp": "I Must be the End One, please!" "~MustBeEndOneApp": "I Must be the End One, please!"
} }
\ No newline at end of file
...@@ -2295,5 +2295,8 @@ ...@@ -2295,5 +2295,8 @@
"manyExport":"批量导出", "manyExport":"批量导出",
"saveAndRefresh" : "保存并刷新", "saveAndRefresh" : "保存并刷新",
"uploadProfileTable": "上传利润表", "uploadProfileTable": "上传利润表",
"InputAllMandatoryInfo": "请输入所有必填信息",
"~MustBeEndOneApp": "我必须是最后一个!" "~MustBeEndOneApp": "我必须是最后一个!"
} }
\ No newline at end of file
vatModule.controller('VatRevenueConfigController', ['$scope', '$log', '$translate', '$timeout', 'SweetAlert', '$q', vatModule.controller('VatRevenueConfigController', ['$scope', '$log', '$translate', '$timeout', 'SweetAlert', '$q',
'$interval','dxDataGridService','$http','apiConfig', '$interval', 'dxDataGridService', '$http', 'apiConfig',
function ($scope, $log, $translate, $timeout, SweetAlert, $q, $interval,dxDataGridService,$http,apiConfig) { function ($scope, $log, $translate, $timeout, SweetAlert, $q, $interval, dxDataGridService, $http, apiConfig) {
'use strict'; 'use strict';
//表格配置 //表格配置
$scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, { $scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, {
columns: [ columns: [
{dataField: 'idStr', caption: '', visible: false}, {dataField: 'idStr', caption: '', visible: false},
{dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true, minWidth: '300px'}, {
{dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true, minWidth: '300px', dataField: 'name',
calculateCellValue: function(data) { caption: $translate.instant('RevenueColName'),
return _.find($scope.selectOrgList, function(o) { fixed: true,
allowHeaderFiltering: true,
minWidth: '300px'
},
{
dataField: 'orgId',
caption: $translate.instant('RevenueColOrg'),
fixed: true,
allowHeaderFiltering: true,
minWidth: '300px',
calculateCellValue: function (data) {
return _.find($scope.selectOrgList, function (o) {
return o.id === data.orgId; return o.id === data.orgId;
}).name; }).name;
}}, }
},
//todo 组装accountName //todo 组装accountName
{dataField: 'accountTypeStr', caption: $translate.instant('RevenueColAccountName'), fixed: true, allowHeaderFiltering: true, width: '100px'}, {
{dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true, width: '50px', dataField: 'accountTypeStr',
calculateCellValue: function(data) { caption: $translate.instant('RevenueColAccountName'),
fixed: true,
allowHeaderFiltering: true,
width: '100px'
},
{
dataField: 'taxRate',
caption: $translate.instant('RevenueColTaxRate'),
fixed: true,
allowHeaderFiltering: true,
width: '50px',
calculateCellValue: function (data) {
return (data.taxRate * 100) + '%'; return (data.taxRate * 100) + '%';
}}, }
{dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true, width: '120px'}, },
{dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true, minWidth: '250px'}, {
{dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true, width: '120px'}, dataField: 'taxBaseStr',
{dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true, width: '50px'}, caption: $translate.instant('RevenueColTaxBase'),
{dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true, width: '120px'}, fixed: true,
{dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true, width: '120px'}, allowHeaderFiltering: true,
{dataField: '', caption: $translate.instant('RevenueColEdit'), fixed: true,width: '80px', alignment: 'center', width: '120px'
},
{
dataField: 'revenueTypeStr',
caption: $translate.instant('RevenueColType'),
fixed: true,
allowHeaderFiltering: true,
minWidth: '250px'
},
{
dataField: 'taxTypeStr',
caption: $translate.instant('RevenueColTaxType'),
fixed: true,
allowHeaderFiltering: true,
width: '120px'
},
{
dataField: 'statusStr',
caption: $translate.instant('RevenueColStatus'),
fixed: true,
allowHeaderFiltering: true,
width: '50px'
},
{
dataField: 'startDate',
caption: $translate.instant('RevenueColEnable'),
fixed: true,
allowHeaderFiltering: true,
width: '120px'
},
{
dataField: 'endDate',
caption: $translate.instant('RevenueColDisable'),
fixed: true,
allowHeaderFiltering: true,
width: '120px'
},
{
dataField: '',
caption: $translate.instant('RevenueColEdit'),
fixed: true,
width: '80px',
alignment: 'center',
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
$('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;') $('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;')
...@@ -37,11 +102,11 @@ ...@@ -37,11 +102,11 @@
.on('click', function () { .on('click', function () {
$scope.delConfig([options.data.idStr]); $scope.delConfig([options.data.idStr]);
}).appendTo(container); }).appendTo(container);
} } catch (e) {
catch (e) {
$log.error(e); $log.error(e);
} }
}}, }
},
], ],
bindingOptions: { bindingOptions: {
dataSource: 'pageConfDataSource', dataSource: 'pageConfDataSource',
...@@ -59,12 +124,12 @@ ...@@ -59,12 +124,12 @@
//刷新页面 //刷新页面
$scope.refreshConfigGrid = function () { $scope.refreshConfigGrid = function () {
$http.post('/revenueConf/queryPage',{pageInfo: $scope.pagingOptions}, apiConfig.createVat()) $http.post('/revenueConf/queryPage', {pageInfo: $scope.pagingOptions}, apiConfig.createVat())
.success(function (res) { .success(function (res) {
if (res && res.list) { if (res && res.list) {
$scope.pageConfDataSource = res.list; $scope.pageConfDataSource = res.list;
$scope.pagingOptions.totalItems = res.pageInfo.totalCount; $scope.pagingOptions.totalItems = res.pageInfo.totalCount;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}) })
...@@ -79,12 +144,12 @@ ...@@ -79,12 +144,12 @@
//删除配置 //删除配置
$scope.delConfig = function (idList) { $scope.delConfig = function (idList) {
$http.post('/revenueConf/del',idList, apiConfig.createVat()) $http.post('/revenueConf/del', idList, apiConfig.createVat())
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
SweetAlert.success($translate.instant('RevenueDelSuccess')); SweetAlert.success($translate.instant('RevenueDelSuccess'));
$scope.refreshConfigGrid(); $scope.refreshConfigGrid();
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}) })
...@@ -92,8 +157,10 @@ ...@@ -92,8 +157,10 @@
$scope.batchDelConfig = function () { $scope.batchDelConfig = function () {
if (!!$scope.selectedRecourdCount) { if (!!$scope.selectedRecourdCount) {
$scope.delConfig(_.map($scope.selectedItems, function(item){ return item.idStr; })); $scope.delConfig(_.map($scope.selectedItems, function (item) {
}else { return item.idStr;
}));
} else {
SweetAlert.warning($translate.instant('PleaseSelectAtLeastOneItem')); SweetAlert.warning($translate.instant('PleaseSelectAtLeastOneItem'));
} }
}; };
...@@ -101,27 +168,41 @@ ...@@ -101,27 +168,41 @@
//添加配置 //添加配置
$scope.saveConfig = function () { $scope.saveConfig = function () {
parseTaxBase(); parseTaxBase();
if ($scope.formParam.name === undefined || $scope.formParam.name === "" ||
$scope.formParam.orgList === undefined ||
$scope.formParam.revenueType === undefined ||
$scope.formParam.taxRate === undefined ||
$scope.formParam.taxBase === undefined ||
$scope.formParam.taxType === undefined ||
$scope.formParam.status === undefined ||
$scope.formParam.startDate === undefined ||
$scope.formParam.endDate === undefined) {
SweetAlert.warning("InputAllMandatoryInfo");
return;
}
if ($scope.isEdit) { if ($scope.isEdit) {
$http.post('/revenueConf/update',$scope.formParam, apiConfig.createVat()) $http.post('/revenueConf/update', $scope.formParam, apiConfig.createVat())
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
SweetAlert.success($translate.instant('RevenueAddSuccess')); SweetAlert.success($translate.instant('RevenueAddSuccess'));
$scope.refreshConfigGrid(); $scope.refreshConfigGrid();
$($scope.revenueConfAddDiv).modal('hide'); $($scope.revenueConfAddDiv).modal('hide');
$scope.cancelModal(); $scope.cancelModal();
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}) })
}else { } else {
$http.post('/revenueConf/add',$scope.formParam, apiConfig.createVat()) $http.post('/revenueConf/add', $scope.formParam, apiConfig.createVat())
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
SweetAlert.success($translate.instant('RevenueAddSuccess')); SweetAlert.success($translate.instant('RevenueAddSuccess'));
$scope.refreshConfigGrid(); $scope.refreshConfigGrid();
$($scope.revenueConfAddDiv).modal('hide'); $($scope.revenueConfAddDiv).modal('hide');
$scope.cancelModal(); $scope.cancelModal();
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}) })
...@@ -153,12 +234,12 @@ ...@@ -153,12 +234,12 @@
//获取机构列表 //获取机构列表
function getMyOrgList() { function getMyOrgList() {
$http.get('/org/getMyOrgList',apiConfig.createVat()) $http.get('/org/getMyOrgList', apiConfig.createVat())
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
$scope.selectOrgList = res.data; $scope.selectOrgList = res.data;
$scope.refreshConfigGrid(); $scope.refreshConfigGrid();
}else { } else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
} }
}) })
...@@ -169,7 +250,7 @@ ...@@ -169,7 +250,7 @@
if (4 === $scope.formParam.taxBase) { if (4 === $scope.formParam.taxBase) {
$scope.formParam.baseDrCode = $scope.formParam.baseCrCode; $scope.formParam.baseDrCode = $scope.formParam.baseCrCode;
$scope.formParam.baseCrCode = ''; $scope.formParam.baseCrCode = '';
}else if (4 !== $scope.formParam.taxBase && 5 !== $scope.formParam.taxBase) { } else if (4 !== $scope.formParam.taxBase && 5 !== $scope.formParam.taxBase) {
$scope.formParam.baseCrCode = ''; $scope.formParam.baseCrCode = '';
$scope.formParam.baseDrCode = ''; $scope.formParam.baseDrCode = '';
} }
...@@ -186,9 +267,7 @@ ...@@ -186,9 +267,7 @@
pageSize: 20, //每页多少条数据 pageSize: 20, //每页多少条数据
}; };
$scope.formParam = { $scope.formParam = {};
};
$scope.isAccount = false; $scope.isAccount = false;
$scope.isShowBaseCrCode = false; $scope.isShowBaseCrCode = false;
...@@ -250,7 +329,7 @@ ...@@ -250,7 +329,7 @@
} }
if (4 === e.selectedItem.val || 5 === e.selectedItem.val) { if (4 === e.selectedItem.val || 5 === e.selectedItem.val) {
$scope.isShowBaseCrCode = true; $scope.isShowBaseCrCode = true;
}else { } else {
$scope.isShowBaseCrCode = false; $scope.isShowBaseCrCode = false;
} }
} }
...@@ -274,7 +353,7 @@ ...@@ -274,7 +353,7 @@
} }
if (1 === e.selectedItem.val) { if (1 === e.selectedItem.val) {
$scope.isAccount = true; $scope.isAccount = true;
}else { } else {
$scope.isAccount = false; $scope.isAccount = false;
} }
} }
...@@ -349,6 +428,7 @@ ...@@ -349,6 +428,7 @@
getMyOrgList(); getMyOrgList();
} }
init() init()
})(); })();
......
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