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

Bug 23451

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