Commit 6452bee7 authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 3111d014 a5325903
......@@ -53,6 +53,8 @@ public class SpringContextUtil implements ApplicationContextAware {
public static OrganizationMapper organizationMapper;
public static EnterpriseAccountSetOrgMapper enterpriseAccountSetOrgMapper;
public static AccountMappingMapper accountMappingMapper;
public static TrialBalanceMapper trialBalanceMapper;
public static AdjustmentTableMapper adjustmentTableMapper;
/**
* 获取bean
......@@ -106,5 +108,7 @@ public class SpringContextUtil implements ApplicationContextAware {
enterpriseAccountSetOrgMapper = webApplicationContext.getBean(EnterpriseAccountSetOrgMapper.class);
accountMappingMapper = webApplicationContext.getBean(AccountMappingMapper.class);
glBalanceMapper = webApplicationContext.getBean(GlBalanceMapper.class);
trialBalanceMapper = webApplicationContext.getBean(TrialBalanceMapper.class);
adjustmentTableMapper = webApplicationContext.getBean(AdjustmentTableMapper.class);
}
}
......@@ -40,7 +40,7 @@ public class RevenueConfEnum {
* 账载收入类型
*/
public enum TaxBase {
Account(1, "账载"),
Account(1, "账载收入"),
Invoice(2, "开票收入"),
Manual(3, "手工录入"),
Period_Dr(4, "借方发生额"),
......
......@@ -10,11 +10,8 @@ import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgInfoDto;
import pwc.taxtech.atms.dpo.OrgSimpleDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.organization.OrganizationExtraDto;
import pwc.taxtech.atms.dto.AreaOrganizationStatistics;
import pwc.taxtech.atms.dto.IndustryDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.OrganizationValidateDto;
import pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard;
import pwc.taxtech.atms.dto.dimension.OrgDashboardParams;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
......@@ -297,4 +294,13 @@ public class OrganizationController {
}
}
@GetMapping("getMyOrgList")
public ApiResultDto getMyOrgList() {
try {
return ApiResultDto.success(organizationService.getMyOrgList());
} catch (Exception e) {
logger.error("getMyOrgList error.", e);
return ApiResultDto.fail();
}
}
}
package pwc.taxtech.atms.controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.revenuconf.RevConfAddDto;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfParam;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfResult;
import pwc.taxtech.atms.service.impl.RevenueConfService;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
import javax.annotation.Resource;
@RestController
@RequestMapping(value = "api/v1/revenueConf")
public class RevenueConfController extends BaseController {
@Resource
private RevenueConfService revenueConfService;
@PostMapping("queryPage")
public CamelPagingResultDto<RevenueConfResult> queryPage(@RequestBody RevenueConfParam param) {
return new CamelPagingResultDto<>(revenueConfService.queryPage(param));
}
@PostMapping("add")
public ApiResultDto addConf(@RequestBody RevConfAddDto addDto) {
revenueConfService.addConfig(addDto);
return ApiResultDto.success();
}
@PostMapping("update")
public ApiResultDto updateConf(@RequestBody RevenueConfig config) {
revenueConfService.updateConfig(config);
return ApiResultDto.success();
}
}
package pwc.taxtech.atms.dto.input;
import com.alibaba.fastjson.annotation.JSONField;
import com.github.pagehelper.PageInfo;
import java.util.List;
public class CamelPagingResultDto<T> {
@JSONField(name = "List")
private List<T> list;
@JSONField(name = "PageInfo")
private CamelPagingDto pageInfo;
private T calculateData;
public CamelPagingResultDto() {
super();
}
public CamelPagingResultDto(PageInfo<T> pageInfo) {
this.setList(pageInfo.getList());
CamelPagingDto pagingDto = new CamelPagingDto();
pagingDto.setPageIndex(pageInfo.getPageNum());
pagingDto.setPageSize(pageInfo.getPageSize());
pagingDto.setTotalCount((int) pageInfo.getTotal());
this.setPageInfo(pagingDto);
}
public List<T> getList() {
......
package pwc.taxtech.atms.dto.revenuconf;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
import java.util.List;
public class RevConfAddDto extends RevenueConfig {
private List<String> orgList;
public List<String> getOrgList() {
return this.orgList;
}
public void setOrgList(List<String> orgList) {
this.orgList = orgList;
}
}
package pwc.taxtech.atms.dto.revenuconf;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
public class RevenueConfParam extends RevenueConfig {
private CamelPagingDto pageInfo;
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.revenuconf;
import pwc.taxtech.atms.constant.enums.RevenueConfEnum;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
public class RevenueConfResult extends RevenueConfig {
public String getAccountTypeStr() {
return RevenueConfEnum.AccountType.MAPPING.get(this.getAccountType());
}
public String getTaxBaseStr() {
return RevenueConfEnum.TaxBase.MAPPING.get(this.getTaxBase());
}
public String getTaxTypeStr() {
return RevenueConfEnum.TaxType.MAPPING.get(this.getTaxType());
}
public String getRevenueTypeStr() {
return RevenueConfEnum.RevenueType.MAPPING.get(this.getRevenueType());
}
public String getStatusStr() {
return RevenueConfEnum.Status.MAPPING.get(this.getStatus());
}
}
package pwc.taxtech.atms.exception;
public class ServiceException extends Exception {
public class ServiceException extends RuntimeException {
public ServiceException() {
}
......
......@@ -60,6 +60,7 @@ import pwc.taxtech.atms.entity.OrganizationExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.annotation.Resource;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -170,6 +171,9 @@ public class OrganizationServiceImpl extends BaseService{
@Autowired
private BeanUtil beanUtil;
@Resource
private UserMapper userMapper;
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
public boolean isOrganizationStructureExists(String organizationStructureId) {
......@@ -3208,4 +3212,19 @@ public class OrganizationServiceImpl extends BaseService{
header.put("TaxRuleIntroduction","税制简介");
return header;
}
/**
* 获取当前用户可查看机构信息
*
* @return List<OrgSelectDto>
*/
public List<OrgSelectDto> getMyOrgList() {
String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid);
if (user.getIsSuperAdmin()) {
return organizationMapper.getAllOrgSelectList();
} else {
return organizationMapper.getMyOrgSelectList(uid);
}
}
}
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.revenuconf.RevConfAddDto;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfParam;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfResult;
import pwc.taxtech.atms.vat.dao.RevenueConfigMapper;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
import pwc.taxtech.atms.vat.entity.RevenueConfigExample;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class RevenueConfService extends BaseService {
@Resource
private RevenueConfigMapper revenueConfigMapper;
@Resource
private OrganizationServiceImpl organizationService;
/**
* 分页查询可查看的配置信息
*
* @param param RevenueConfParam
* @return PageInfo
*/
public PageInfo<RevenueConfResult> queryPage(RevenueConfParam param) {
List<OrgSelectDto> orgDtoList = organizationService.getMyOrgList();
if (CollectionUtils.isEmpty(orgDtoList)) {
return new PageInfo<>();
}
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
RevenueConfigExample example = new RevenueConfigExample();
example.createCriteria().andOrgIdIn(orgDtoList.stream().map(OrgSelectDto::getId).collect(Collectors.toList()));
PageInfo<RevenueConfResult> pageInfo = new PageInfo<>(revenueConfigMapper.selectByExample(example).stream()
.map(o -> beanUtil.copyProperties(o, new RevenueConfResult())).collect(Collectors.toList()));
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
/**
* 新增配置
*
* @param config RevenueConfig
*/
public void addConfig(RevenueConfig config) {
//todo 重复校验
config.setId(idService.nextId());
revenueConfigMapper.insertSelective(config);
}
/**
* 前台批量新增
*
* @param addDto RevConfAddDto
*/
public void addConfig(RevConfAddDto addDto) {
if (!CollectionUtils.isEmpty(addDto.getOrgList())) {
addDto.getOrgList().forEach(id -> {
addDto.setId(idService.nextId());
addDto.setOrgId(id);
revenueConfigMapper.insertSelective(addDto);
});
}
}
/**
* 更新配置
*
* @param config RevenueConfig
*/
public void updateConfig(RevenueConfig config) {
//todo 重复校验
revenueConfigMapper.updateByPrimaryKeySelective(config);
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import com.alibaba.fastjson.JSON;
import org.apache.commons.collections.CollectionUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator;
import org.apache.poi.ss.formula.eval.*;
......@@ -138,29 +139,41 @@ public class FunctionBase {
dataSource.setPeriod(period);
dataSource.setProjectId(projectId);
SpringContextUtil.periodDataSourceMapper.insertSelective(dataSource);
for (Object obj : dataSourceList) {
if (obj.getClass() == java.util.ArrayList.class) {
for (Object obj2 : (ArrayList<Object>) obj) {
if(CollectionUtils.isNotEmpty(dataSourceList)){
for (Object obj : dataSourceList) {
if (obj.getClass() == java.util.ArrayList.class) {
for (Object obj2 : (ArrayList<Object>) obj) {
PeriodDataSourceDetail dataSourceDetail = new PeriodDataSourceDetail();
dataSourceDetail.setId(SpringContextUtil.distributedIdService.nextId());
dataSourceDetail.setDataSourceId(dataSourceId);
dataSourceDetail.setDataSourceType(formulaDataSourceDetailType.getCode());
dataSourceDetail.setItemValue(JSON.toJSONString(obj2));
dataSourceDetail.setPeriod(period);
dataSourceDetail.setProjectId(projectId);
SpringContextUtil.periodDataSourceDetailMapper.insertSelective(dataSourceDetail);
}
} else {
PeriodDataSourceDetail dataSourceDetail = new PeriodDataSourceDetail();
dataSourceDetail.setId(SpringContextUtil.distributedIdService.nextId());
dataSourceDetail.setDataSourceId(dataSourceId);
dataSourceDetail.setDataSourceType(formulaDataSourceDetailType.getCode());
dataSourceDetail.setItemValue(JSON.toJSONString(obj2));
dataSourceDetail.setItemValue(JSON.toJSONString(obj));
dataSourceDetail.setPeriod(period);
dataSourceDetail.setProjectId(projectId);
SpringContextUtil.periodDataSourceDetailMapper.insertSelective(dataSourceDetail);
}
} else {
PeriodDataSourceDetail dataSourceDetail = new PeriodDataSourceDetail();
dataSourceDetail.setId(SpringContextUtil.distributedIdService.nextId());
dataSourceDetail.setDataSourceId(dataSourceId);
dataSourceDetail.setDataSourceType(formulaDataSourceDetailType.getCode());
dataSourceDetail.setItemValue(JSON.toJSONString(obj));
dataSourceDetail.setPeriod(period);
dataSourceDetail.setProjectId(projectId);
SpringContextUtil.periodDataSourceDetailMapper.insertSelective(dataSourceDetail);
}
}else{
PeriodDataSourceDetail dataSourceDetail = new PeriodDataSourceDetail();
dataSourceDetail.setId(SpringContextUtil.distributedIdService.nextId());
dataSourceDetail.setDataSourceId(dataSourceId);
dataSourceDetail.setDataSourceType(formulaDataSourceDetailType.getCode());
dataSourceDetail.setItemValue("{}");
dataSourceDetail.setPeriod(period);
dataSourceDetail.setProjectId(projectId);
SpringContextUtil.periodDataSourceDetailMapper.insertSelective(dataSourceDetail);
}
return dataSourceId;
}
......
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.commons.collections.CollectionUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
......@@ -56,6 +57,10 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
cellTemplateDataList = agent.getCellTemplateByTypeAndIndex(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), bo.getRowColumnIndex() - 1, bo.getTaxRate(), bo.getRevenueType(), bo.getTaxType(), bo.getColumnIndex() - 1,
formulaContext.getPeriod(), formulaContext.getOrganizationId(), queryDate, queryDate);
if(CollectionUtils.isEmpty(cellTemplateDataList)){
cellTemplateDataList = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), ec.getRowIndex(), ec.getColumnIndex(), formulaContext.getPeriod());
}
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
for (CellTemplatePerGroupDto cellTemplateData : cellTemplateDataList) {
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
......@@ -74,11 +79,13 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
} finally {
LOGGER.warn("[BB_Exception] error for bb cacls for {}", bo.toString());
Long dataSourceId = saveDataSource(ec, dataSource, FormulaDataSourceDetailType.ReportCellDataSourceDto,
cellValue, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), ec.getColumnIndex(), ec.getRowIndex(),
formulaContext.getProjectId());
cellValue, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), ec.getColumnIndex(), ec.getRowIndex(),
formulaContext.getProjectId());
saveFormulaBlock(formulaContext.getPeriod(), ec,
bo.getFormulaExpression(), cellValue, dataSourceId, formulaContext.getProjectId());
bo.getFormulaExpression(), cellValue, dataSourceId, formulaContext.getProjectId());
}
}
......
......@@ -6,10 +6,7 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgGeneralInfoMiddleDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dpo.*;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
......@@ -134,4 +131,11 @@ public interface OrganizationMapper extends MyMapper {
@Param("areaId") String areaId, @Param("regionLevelType") Integer regionLevelType);
List<OrgGeneralInfoMiddleDto> selectJoinToOrgGeneralInfo();
@Select("select tb.id,tb.name from user_organization ta left join organization tb on ta.organization_id = tb.id " +
"where ta.user_id = #{uid}")
List<OrgSelectDto> getMyOrgSelectList(String uid);
@Select("select id, name from organization;")
List<OrgSelectDto> getAllOrgSelectList();
}
\ No newline at end of file
package pwc.taxtech.atms.dpo;
public class OrgSelectDto {
private String id;
private String name;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -1288,6 +1288,24 @@ var dataImpModule = angular.module('app.dataImp', ['ui.grid', 'ui.router','ui.gr
sticky: true
});
$stateProvider.state({
name: 'dataImportConfigRevenueType',
url: "/dataImportConfig/revenueType",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<vat-revenue-config></vat-revenue-config>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.dataImp),
sticky: true
});
$stateProvider.state({
name: 'recordImportLog',
url: "/dataImportLog/dataImport",
......
......@@ -2085,5 +2085,25 @@
"extractInvoiceData": "发票数据抽取",
"ExtractInvoiceDataTitle": "发票数据抽取",
"RevenueConfigTitle": "收入类型配置",
"RevenueAddBtn": "新增",
"RevenueDelBtn": "删除",
"RevenueColSerialNo": "序号",
"RevenueColName": "收入类型名称",
"RevenueColOrg": "适用公司",
"RevenueColAccountName": "账载收入",
"RevenueColTaxRate": "税率",
"RevenueColTaxBase": "计税收入",
"RevenueColType": "收入类型",
"RevenueColTaxType": "计税方法",
"RevenueColStatus": "状态",
"RevenueColEnable": "启用日期",
"RevenueColDisable": "终止日期",
"RevenueColEdit": "编辑",
"RevenueNoOrgData": "没有机构权限",
"RevenueGetOrgError": "获取机构信息失败",
"RevenueAddSuccess": "添加成功",
"RevenueUpdateSuccess": "更新成功",
"~MustBeEndOneApp": "我必须是最后一个!"
}
\ No newline at end of file
......@@ -160,7 +160,7 @@
paging: {
enabled: false
},
rowAlternationEnabled: false, //单双行颜色
rowAlternationEnabled: true, //单双行颜色
scrolling: {
mode: "infinite"
},
......
citModule.controller('VatRevenueConfigController', ['$scope', '$log', '$translate', '$timeout', 'SweetAlert', '$q',
'$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: 'serialNo', caption: $translate.instant('RevenueColSerialNo'), fixed: true, allowHeaderFiltering: true},
{dataField: 'name', caption: $translate.instant('RevenueColName'), fixed: true, allowHeaderFiltering: true},
{dataField: 'orgId', caption: $translate.instant('RevenueColOrg'), fixed: true, allowHeaderFiltering: true,
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},
{dataField: 'taxRate', caption: $translate.instant('RevenueColTaxRate'), fixed: true, allowHeaderFiltering: true,
calculateCellValue: function(data) {
return (data.taxRate * 100) + '%';
}},
{dataField: 'taxBaseStr', caption: $translate.instant('RevenueColTaxBase'), fixed: true, allowHeaderFiltering: true},
{dataField: 'revenueTypeStr', caption: $translate.instant('RevenueColType'), fixed: true, allowHeaderFiltering: true},
{dataField: 'taxTypeStr', caption: $translate.instant('RevenueColTaxType'), fixed: true, allowHeaderFiltering: true},
{dataField: 'statusStr', caption: $translate.instant('RevenueColStatus'), fixed: true, allowHeaderFiltering: true},
{dataField: 'startDate', caption: $translate.instant('RevenueColEnable'), fixed: true, allowHeaderFiltering: true},
{dataField: 'endDate', caption: $translate.instant('RevenueColDisable'), fixed: true, allowHeaderFiltering: true},
{dataField: 'statusString', caption: $translate.instant('RevenueColEdit'), fixed: true, allowHeaderFiltering: true},
],
bindingOptions: {
dataSource: 'pageConfDataSource',
},
selection: {
mode: 'multiple',
showCheckBoxesMode: 'always',
allowSelectAll: true
}
});
//刷新页面
$scope.refreshConfigGrid = function () {
$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 {
SweetAlert.error($translate.instant('SystemError'));
}
})
};
//添加配置
$scope.addConfig = function () {
$($scope.revenueConfAddDiv).modal('show');
};
//删除配置
$scope.delConfig = function () {
SweetAlert.info('del');
};
//添加配置
$scope.saveConfig = function () {
$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');
}else {
SweetAlert.error($translate.instant('SystemError'));
}
})
};
//关闭配置框
$scope.cancelModal = function () {
// $('#configForm')[0].reset();
$scope.formParam = {}
};
//获取机构列表
function getMyOrgList() {
$http.get('/org/getMyOrgList',apiConfig.createVat())
.success(function (res) {
if (res && 0 === res.code) {
$scope.selectOrgList = res.data;
}else {
SweetAlert.error($translate.instant('RevenueGetOrgError'));
}
})
}
(function initialize() {
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 20, //每页多少条数据
};
$scope.formParam = {
};
$scope.isAccount = false;
//机构下拉设置
$scope.selectOrgOptions = {
displayExpr: 'name',
valueExpr: 'id',
width: '95%',
bindingOptions: {
value: 'formParam.orgList',
dataSource: 'selectOrgList'
},
height: '30px',
placeholder: '',
showClearButton: true,
searchEnabled: true,
noDataText: $translate.instant('RevenueNoOrgData'),
showSelectionControls: true,
};
//税率下拉框
$scope.selectTaxRateOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.taxRate'
},
dataSource: [
{'key': '0%', 'val': 0},
{'key': '1.5%', 'val': 0.015},
{'key': '3%', 'val': 0.03},
{'key': '5%', 'val': 0.05},
{'key': '6%', 'val': 0.06},
{'key': '10%', 'val': 0.1},
{'key': '16%', 'val': 0.16},
]
};
//计税基础下拉
$scope.selectTaxBaseOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.taxBase'
},
dataSource: [
{'key': '账载收入', 'val': 1},
{'key': '开票收入', 'val': 2},
{'key': '手工录入', 'val': 3},
{'key': '借方发生额', 'val': 4},
{'key': '贷方发生额', 'val': 5},
]
};
//账载收入下拉
$scope.selectAccountTypeOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.accountType'
},
dataSource: [
{'key': '0值', 'val': 0},
{'key': '科目', 'val': 1},
{'key': '手工录入', 'val': 2},
]
};
$scope.selectRevenueTypeOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.revenueType'
},
dataSource: [
{'key': '货物及加工修理修配劳务', 'val': 0},
{'key': '服务、不动产和无形资产', 'val': 1},
]
};
$scope.selectTaxTypeOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.taxType'
},
dataSource: [
{'key': '一般计税', 'val': 0},
{'key': '简易计税', 'val': 1},
{'key': '免抵退税', 'val': 2},
{'key': '免税', 'val': 3},
]
};
$scope.selectStatusOptions = {
displayExpr: 'key',
valueExpr: 'val',
bindingOptions: {
value: 'formParam.status'
},
dataSource: [
{'key': '启用', 'val': 0},
{'key': '停用', 'val': 1},
]
};
$scope.dateBoxStart = {
acceptCustomValue: false,
openOnFieldClick: true,
displayFormat: 'yyyy-MM',
dateSerializationFormat: 'yyyy-MM',
bindingOptions: {
value: 'formParam.startDate'
}
};
$scope.dateBoxEnd = {
acceptCustomValue: false,
openOnFieldClick: true,
displayFormat: 'yyyy-MM',
dateSerializationFormat: 'yyyy-MM',
bindingOptions: {
value: 'formParam.endDate'
}
};
$scope.revenueConfAddDiv = ".vat-revenue-config #revenueConfAddDiv";
function init() {
getMyOrgList();
$scope.refreshConfigGrid();
}
init()
})();
}
]);
<div class="vat-revenue-config">
<!--标题-->
<div class="nav-wrapper">
<div class="nav-header" translate="RevenueConfigTitle"></div>
</div>
<div id="tab_total">
<form class="form-inline">
<div class="form-group"><div class="import-wrapper">
<button type="button" class="btn btn-primary" ng-click="addConfig()">{{'RevenueAddBtn' | translate }}</button>&nbsp;&nbsp;&nbsp;
<button type="button" class="btn btn-third" ng-click="delConfig()">{{'RevenueDelBtn' | translate }}</button>
</div></div>
</form>
<div class="dt-init-wrapper">
<div class="dx-viewport grid-container">
<div id="revenueGridContainer" dx-data-grid="revenueGridOptions"
style="margin-top: 0px;">
</div>
</div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="refreshConfigGrid()"></ack-pagination>
</div>
</div>
</div>
<div class="modal fade" id="revenueConfAddDiv" tabindex="-1" role="dialog">
<div class="modal-dialog" style="width: 1200px;" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="modal-title">
<span translate="RevenueConfigTitle"></span>
</h3>
</div>
<div class="modal-body" id="modal-body">
<form class="form-horizontal" id="configForm">
<div class="form-group">
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColName' | translate}}:</label>
<div class="col-sm-4">
<input class="form-control" name="name" ng-model="formParam.name" maxlength="255">
</div>
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColOrg' | translate}}:</label>
<div class="col-sm-4">
<div dx-tag-box="selectOrgOptions"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColAccountName' | translate}}:</label>
<div class="col-sm-1">
<div dx-select-box="selectAccountTypeOptions" style="width: 90px;"></div>
</div>
<div class="col-sm-1"><input class="form-control" name="name" ng-model="formParam.tbSegment3" ng-disabled="!isAccount" maxlength="255" placeholder="科目"></div>
<div class="col-sm-1"><input class="form-control" name="name" ng-model="formParam.tbSegment5" ng-disabled="!isAccount" maxlength="255" placeholder="利润中心"></div>
<div class="col-sm-1"><input class="form-control" name="name" ng-model="formParam.tbSegment6" ng-disabled="!isAccount" maxlength="255" placeholder="产品"></div>
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColTaxRate' | translate}}:</label>
<div class="col-sm-4">
<div dx-select-box="selectTaxRateOptions"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColTaxBase' | translate}}:</label>
<div class="col-sm-2">
<div dx-select-box="selectTaxBaseOptions"></div>
</div>
<div class="col-sm-2">
<input class="form-control" name="name" ng-model="formParam.baseCrCode" maxlength="255" placeholder="科目">
</div>
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColType' | translate}}:</label>
<div class="col-sm-4">
<div dx-select-box="selectRevenueTypeOptions"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColTaxType' | translate}}:</label>
<div class="col-sm-4">
<div dx-select-box="selectTaxTypeOptions"></div>
</div>
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColStatus' | translate}}:</label>
<div class="col-sm-4">
<div dx-select-box="selectStatusOptions"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColEnable' | translate}}:</label>
<div class="col-sm-4">
<div dx-date-box="dateBoxStart"></div>
</div>
<label class="col-sm-2 control-label"><span style="color: red">*</span>{{'RevenueColDisable' | translate}}:</label>
<div class="col-sm-4">
<div dx-date-box="dateBoxEnd"></div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="saveConfig()">{{'Confirm' | translate }}</button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelModal()">{{'Cancel' | translate }}</button>
</div>
</div>
</div>
</div>
</div>
citModule.directive('vatRevenueConfig', ['$log', 'browserService', '$translate', 'region', '$timeout',
function ($log, browserService, $translate, region, $timeout) {
$log.debug('vatPreviewProfitLoss.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/dataImport/vat-revenue-config/vat-revenue-config.html' + '?_=' + Math.random(),
scope: {},
controller: 'VatRevenueConfigController',
link: function ($scope, element) {
$('.main-contents')[0].style.width = "260px";
$('.main-contents')[0].style.float = "left";
$('.main-contents')[0].style.styleFloat = "left";
$('.main-contents')[0].style.cssFloat = "left";
}
}
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.vat-revenue-config {
/*background-color: @color-white;*/
padding-left: 20px;
/*min-height: 800px;*/
height: 96%;
.nav-wrapper {
/*padding-bottom: 5px;
border-bottom: 1px solid #DBD8D3;*/
.nav-header {
height: 54px;
line-height: 54px;
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #333;
display: inline-block;
}
.nav-tab {
span {
display: inline-block;
height: 34px;
line-height: 34px;
padding: 0 10px;
background-color: #B90808;
color: #FFF;
font-family: "Microsoft YaHei";
font-weight: 400;
font-style: normal;
font-size: 14px;
cursor: pointer;
}
.active {
background-color: #F91000;
}
}
.alert-warning {
background-color: #FDE2DE;
cursor: pointer;
}
.alert {
color: #CF2D1B;
font-weight: bold;
display: inline-block;
padding: 5px;
margin-left: 60px;
margin-bottom: 0px;
i {
font-size: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
.operation-wrapper {
margin: 15px 25px 10px 10px;
span {
cursor: pointer;
}
}
}
.dropdown-common() {
display: inline-block;
.select-button {
background-color: #F5F5F5;
padding: 6px 0;
width: 100px;
}
.caret {
margin-top: 8px;
}
.dropdown-menu {
min-width: 100px;
li {
text-align: center;
min-height: 0px;
height: 30px;
line-height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
}
}
}
}
#tab_total {
display: block;
height: calc(~'100% - 40px');
position: relative;
.import-wrapper {
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.period-picker {
width: 150px;
border: 1px solid #c7c5c0;
display: inline-block;
line-height: 20px;
margin-top: 7px;
}
.imp-subheader {
display: inline-block;
font-size: 15px;
height: 30px;
line-height: 30px;
vertical-align: middle;
border: none;
select {
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background: transparent;
}
}
.dropdown {
.dropdown-common();
}
input {
width: 50px;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
padding: 2px;
text-align: center;
}
> button:last-child {
float: right;
margin-right: 20px;
}
.btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
.btn-vat-primary {
min-width: 80px;
}
}
}
.dt-init-wrapper {
margin: 30px 0;
max-width: 99%;
height: calc(~'100% - 25px');
position: relative;
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
.importPLStatusGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
}
}
.error-info-wrapper {
position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -40px;
}
#content-resizer {
width: 110%;
position: absolute;
height: 4px;
bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -40px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -381px;
text-align: center;
display: block !important;
}
}
.dt-import-wrapper {
margin: 60px 0;
max-width: 99%;
overflow: auto;
height: calc(~"100% - 35px");
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
}
}
.error-list-modal {
.modal-title {
color: #FF0000;
}
.modal-body {
max-height: 300px;
overflow-y: auto;
table {
border: 1px solid #CCC;
thead tr th {
height: 30px;
border: 1px solid #CCC;
}
tbody tr td {
height: 25px;
border: 1px solid #CCC;
}
}
}
.modal-footer {
text-align: center;
}
}
#tab_detail {
display: none;
}
/*覆写ack-pagination.less中:.page-size, .pagination 中的margin演示 */
.page-form-group{
float:right;
.page-size{
margin:0;
}
.pagination {
margin:0;
}
}
}
.tb-model-period-dropdow-popup {
width: 400px;
height: 500px;
position: fixed;
top: 25%;
left: 40%;
.modal-dialog {
width: 100%;
height: 90%;
margin: 20px auto;
.modal-content {
width: 100%;
.modal-body {
height: 90%;
}
}
}
}
#totalWrapper {
margin: 5px 10px 10px -10px;
width: 100%;
padding-left: 10px;
font-family: Microsoft YaHei;
font-size: 13px;
float:right;
.total_span{
color: #B4122A !important;
background-color:#ddd !important;
font-size: 12px !important;
font-weight:bold !important;
border-radius:10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
.total-column{
width:15%;
float:left;
padding-left: 15px;
}
}
\ No newline at end of file
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