Commit d4cf5f97 authored by gary's avatar gary

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

parents 72475254 b75d1cec
...@@ -31,7 +31,7 @@ public class CitImportExcelController { ...@@ -31,7 +31,7 @@ public class CitImportExcelController {
@RequestMapping(value = "/citImportExcel", method = RequestMethod.POST) @RequestMapping(value = "/citImportExcel", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam String orgIds, OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds,
@RequestParam String periodDate, @RequestParam String periodDate,
@RequestParam Integer importType, @RequestParam Integer importType,
@RequestParam Integer importFileType){ @RequestParam Integer importFileType){
......
...@@ -156,4 +156,17 @@ public class TemplateGroupController { ...@@ -156,4 +156,17 @@ public class TemplateGroupController {
return OperationResultDto.error(ErrorMessage.SystemError); return OperationResultDto.error(ErrorMessage.SystemError);
} }
@RequestMapping(value = "withoutTemplate", method = RequestMethod.POST)
public @ResponseBody OperationResultDto withoutTemplate(@RequestBody TemplateGroupDto templateGroupDto) {
try {
templateGroupService.addTemplateGroupWithoutTemplate(templateGroupDto);
return OperationResultDto.success();
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("withoutTemplate error.", e);
}
return OperationResultDto.error(ErrorMessage.SystemError);
}
} }
...@@ -25,6 +25,7 @@ import java.math.BigDecimal; ...@@ -25,6 +25,7 @@ import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Service @Service
public class CitImportExcelServiceImpl extends BaseService { public class CitImportExcelServiceImpl extends BaseService {
...@@ -537,7 +538,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -537,7 +538,7 @@ public class CitImportExcelServiceImpl extends BaseService {
List<CitDataImportLog> citDataImportLogList = new ArrayList<>(); List<CitDataImportLog> citDataImportLogList = new ArrayList<>();
// Integer period = CitCommonUtil.getPeriod(); // Integer period = CitCommonUtil.getPeriod();
String companyName = CitCommonUtil.getValue(sheet.getRow(5).getCell(1)).toString(); String companyName = CitCommonUtil.getValue(sheet.getRow(5).getCell(1)).toString();
List<Organization> organizations = getOrganizationByName(companyName); List<Organization> organizations = getOrganizationByName(companyName).stream().filter(r->r.getCode()!=null&&!("".equals(r.getCode()))).collect(Collectors.toList());
String companyCode = ""; String companyCode = "";
String orgId = ""; String orgId = "";
String taxPayerId = ""; String taxPayerId = "";
...@@ -547,6 +548,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -547,6 +548,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if(!orgList.contains(orgId)){ if(!orgList.contains(orgId)){
saveResult.setResult(false); saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.DoNotSelectCompany); saveResult.setResultMsg(ErrorMessageCN.DoNotSelectCompany);
return saveResult; return saveResult;
} }
...@@ -556,6 +558,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -556,6 +558,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}else{ }else{
saveResult.setResult(false); saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.NoCompanyError); saveResult.setResultMsg(ErrorMessageCN.NoCompanyError);
return saveResult; return saveResult;
} }
...@@ -592,7 +595,6 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -592,7 +595,6 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError); citDataImportLogList.add(citDataImportLogError);
continue; continue;
} }
System.out.println(cellValue);
citBSPrcAdjust.setBegBal(new BigDecimal(cellValue.toString().replace(",",""))); citBSPrcAdjust.setBegBal(new BigDecimal(cellValue.toString().replace(",","")));
...@@ -888,7 +890,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -888,7 +890,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError); citDataImportLogList.add(citDataImportLogError);
continue; continue;
} }
String companyCode = cellValueCode.toString(); String companyCode = cellValueCode.toString().replace(".0","");
//根据code(主体)获取机构相关信息 //根据code(主体)获取机构相关信息
List<Organization> organizations = getOrganizationByCode(companyCode); List<Organization> organizations = getOrganizationByCode(companyCode);
String companyName = ""; String companyName = "";
...@@ -969,7 +971,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -969,7 +971,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvanceMapper.deleteByExample(example); citSalaryAdvanceMapper.deleteByExample(example);
updateImportLog(EnumCitImportType.SalaryAdvance.getCode()); updateImportLog(EnumCitImportType.SalaryAdvance.getCode());
} }
if(citSalaryAdvanceList.size()>0){
int insertBatchNum = citSalaryAdvanceMapper.insertBatch(citSalaryAdvanceList); int insertBatchNum = citSalaryAdvanceMapper.insertBatch(citSalaryAdvanceList);
}
//循环遍历成功导入的数据,组装日志记录实体并放入集合 //循环遍历成功导入的数据,组装日志记录实体并放入集合
for (Map.Entry<String, Integer> entry : companySuccessMap.entrySet()) { for (Map.Entry<String, Integer> entry : companySuccessMap.entrySet()) {
......
...@@ -38,10 +38,8 @@ import pwc.taxtech.atms.entity.TemplateGroup; ...@@ -38,10 +38,8 @@ import pwc.taxtech.atms.entity.TemplateGroup;
import pwc.taxtech.atms.entity.TemplateGroupExample; import pwc.taxtech.atms.entity.TemplateGroupExample;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper; import pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource; import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -527,6 +525,28 @@ public class TemplateGroupServiceImpl extends AbstractService { ...@@ -527,6 +525,28 @@ public class TemplateGroupServiceImpl extends AbstractService {
} }
@Transactional
public void addTemplateGroupWithoutTemplate(TemplateGroupDto templateGroupDto) throws ServiceException {
List<TemplateGroup> groupList = templateGroupDao.getByGroupName(templateGroupDto.getName());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException(TemplateMessage.TemplateGroupNameExist);
}
try {
TemplateGroup templateGroup=new TemplateGroup();
CommonUtils.copyProperties(templateGroupDto,templateGroup);
Long newGroupId = distributedIdService.nextId();
Date now = new Date();
templateGroup.setId(newGroupId);
templateGroup.setCreateTime(now);
templateGroup.setUpdateTime(now);
templateGroup.setName(templateGroupDto.getName());
templateGroupMapper.insertSelective(templateGroup);
} catch (Exception e) {
logger.error("addTemplateGroupWithoutTemplate error.", e);
throw new ServiceException(ErrorMessage.SystemError);
}
}
private List<CellTemplateConfig> getByTemplateId(Long id) { private List<CellTemplateConfig> getByTemplateId(Long id) {
CellTemplateConfigExample example = new CellTemplateConfigExample(); CellTemplateConfigExample example = new CellTemplateConfigExample();
CellTemplateConfigExample.Criteria criteria = example.createCriteria(); CellTemplateConfigExample.Criteria criteria = example.createCriteria();
......
...@@ -106,5 +106,5 @@ public interface CitSalaryAdvanceMapper extends MyMapper { ...@@ -106,5 +106,5 @@ public interface CitSalaryAdvanceMapper extends MyMapper {
*/ */
int updateByPrimaryKey(CitSalaryAdvance record); int updateByPrimaryKey(CitSalaryAdvance record);
int insertBatch(List<CitSalaryAdvance> citSalaryAdvanceList); int insertBatch(List<CitSalaryAdvance> list);
} }
\ No newline at end of file
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<otherwise>0,</otherwise> <otherwise>0,</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when> <when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise> <otherwise>'',</otherwise>
</choose> </choose>
<choose> <choose>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<otherwise>0,</otherwise> <otherwise>0,</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when> <when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise> <otherwise>'',</otherwise>
</choose> </choose>
<choose> <choose>
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<otherwise>'',</otherwise> <otherwise>'',</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.poNo != null">#{item.poNo,jdbcType=INTEGER},</when> <when test="item.poNo != null">#{item.poNo,jdbcType=VARCHAR},</when>
<otherwise>0,</otherwise> <otherwise>'',</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.poSubjectCode != null">#{item.poSubjectCode,jdbcType=VARCHAR},</when> <when test="item.poSubjectCode != null">#{item.poSubjectCode,jdbcType=VARCHAR},</when>
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto"> <select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto">
SELECT SELECT
P.id as ID, P.id as ID,
p.code as Code, P.code as Code,
p.name as Name, P.name as Name,
P.report_type as ReportType, P.report_type as ReportType,
Q.id AS TEMPLATE_GROUP_ID, Q.id AS TEMPLATE_GROUP_ID,
Q.name AS TEMPLATE_GROUP_NAME, Q.name AS TEMPLATE_GROUP_NAME,
......
...@@ -120,18 +120,14 @@ ...@@ -120,18 +120,14 @@
defaultValue = find; defaultValue = find;
$scope.templateGroupId = find.id; $scope.templateGroupId = find.id;
} }
else {
$scope.curTemplateGroup = null;
}
} }
dxControl.renderTemplateGroupDropDown(templateGroupData, defaultValue); dxControl.renderTemplateGroupDropDown(templateGroupData, defaultValue);
if (templateGroupData && templateGroupData.length > 0) {
loadReportType(); loadReportType();
} else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$('#dx-select-template').dxDropDownBox('instance').option('dataSource', []);
}
}); });
} }
}; };
...@@ -147,8 +143,18 @@ ...@@ -147,8 +143,18 @@
} }
}; };
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) { if ($scope.curServiceTypeId === enums.serviceType.VAT) {
if ($scope.curServiceTypeId === enums.serviceType.CIT) { $scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
var ds = _.filter(citReportTypeList, function (item) { return item.value == 1 || item.value == 3 || item.value == 4 });
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: ds
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.CIT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt); $scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({ $scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList data: citReportTypeList
...@@ -180,7 +186,6 @@ ...@@ -180,7 +186,6 @@
$scope.reportType = null; $scope.reportType = null;
listTemplates(); listTemplates();
} }
}
}; };
var loadIndustry = function () { var loadIndustry = function () {
...@@ -315,6 +320,7 @@ ...@@ -315,6 +320,7 @@
//加载'报表'源数据 //加载'报表'源数据
var listTemplates = function () { var listTemplates = function () {
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) {
templateGroupService.getTemplateList($scope.curTemplateGroup.id, $scope.reportType && $scope.reportType.value).success(function (templateData) { templateGroupService.getTemplateList($scope.curTemplateGroup.id, $scope.reportType && $scope.reportType.value).success(function (templateData) {
templateData = _.filter(templateData, function (row) { templateData = _.filter(templateData, function (row) {
...@@ -330,6 +336,9 @@ ...@@ -330,6 +336,9 @@
if (find) { if (find) {
defaultValue = find; defaultValue = find;
} }
else {
$scope.currentTemplate = null;
}
} }
$scope.templates = templateData; //当前组下的所有模板数据 $scope.templates = templateData; //当前组下的所有模板数据
...@@ -340,6 +349,12 @@ ...@@ -340,6 +349,12 @@
$scope.ToggleSaveAs = showSavebutton(); $scope.ToggleSaveAs = showSavebutton();
} }
}); });
}
else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$scope.templates.length = 0;
$scope.currentTemplate = null;
}
}; };
//模板不是默认模板才可以编辑和保存 //模板不是默认模板才可以编辑和保存
var showSavebutton = function () { var showSavebutton = function () {
......
...@@ -28,15 +28,15 @@ ...@@ -28,15 +28,15 @@
<div class="templates-top"> <div class="templates-top">
<div class="form-group"> <div class="form-group">
<span class="tab-content-select-lable" ng-show="curServiceTypeId !=='12'">{{'IndustryColon' | translate}}</span> <span class="tab-content-select-lable" ng-show="curServiceTypeId !=='12'">{{'IndustryColon' | translate}}</span>
<div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'" dx-select-box="dataSourceIndustryList" <div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'"
dx-item-alias="itemObj"> dx-select-box="dataSourceIndustryList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'industryItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}"> <div data-options="dxTemplate: { name: 'industryItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}} {{itemObj.name}}
</div> </div>
</div> </div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2'"></span> <span class="tab-content-select-lable" ng-show="curServiceTypeId === '2'">{{'Ratepayer' | translate}}:</span>
<div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'" dx-select-box="dataSourcePayTaxTypeList" <div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'"
dx-item-alias="itemObj"> dx-select-box="dataSourcePayTaxTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'filingTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}"> <div data-options="dxTemplate: { name: 'filingTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}} {{itemObj.name}}
</div> </div>
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<span class="tab-content-select-lable">{{'SelectTemplateGroup' | translate}}</span> <span class="tab-content-select-lable">{{'SelectTemplateGroup' | translate}}</span>
<div class="tab-content-select selectTemplateGroup col-md-2" id="dx-select-template-groups"> <div class="tab-content-select selectTemplateGroup col-md-2" id="dx-select-template-groups">
</div> </div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span> <span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'" <div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"
dx-select-box="detailReportTypeList" dx-item-alias="itemObj"> dx-select-box="detailReportTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'reportTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}"> <div data-options="dxTemplate: { name: 'reportTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}} {{itemObj.name}}
......
...@@ -240,15 +240,15 @@ ...@@ -240,15 +240,15 @@
} }
&.reportType { &.reportType {
width: 130px; width: 120px;
} }
&.selectTemplateGroup { &.selectTemplateGroup {
width: 200px; width: 150px;
} }
&.selectReport { &.selectReport {
width: 200px; width: 150px;
} }
} }
} }
......
...@@ -189,6 +189,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc ...@@ -189,6 +189,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// text: thisConstant.allSheets, // text: thisConstant.allSheets,
showClearButton: false, showClearButton: false,
noDataText: '', noDataText: '',
dropDownOptions: { maxHeight: '310px' },
dataSource: thisData.sheetNameObjList, dataSource: thisData.sheetNameObjList,
contentTemplate: function(e) { contentTemplate: function(e) {
var value = e.component.option("value"), var value = e.component.option("value"),
...@@ -231,7 +232,6 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc ...@@ -231,7 +232,6 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
save: function(modalInstance) { save: function(modalInstance) {
if (!$scope.editModel || !$scope.editModel.file) { if (!$scope.editModel || !$scope.editModel.file) {
SweetAlert.warning(thisData.pleaseSelectFile); SweetAlert.warning(thisData.pleaseSelectFile);
return; return;
} }
...@@ -267,6 +267,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc ...@@ -267,6 +267,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
allowManual: $("#allowManual").is(":checked"), allowManual: $("#allowManual").is(":checked"),
filename: $scope.editModel.file.name, filename: $scope.editModel.file.name,
tempFileName: tempFileName, tempFileName: tempFileName,
defaultInput: $scope.editModel.defaultInput,
reportType: $scope.editModel.reportType reportType: $scope.editModel.reportType
}, },
file: $scope.editModel.file, file: $scope.editModel.file,
...@@ -333,6 +334,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc ...@@ -333,6 +334,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// body... // body...
if (!thisData.selectTemplateCodeList || thisData.selectTemplateCodeList.length === 0) { if (!thisData.selectTemplateCodeList || thisData.selectTemplateCodeList.length === 0) {
SweetAlert.warning(thisConstant.pleaseSelectTemplate); SweetAlert.warning(thisConstant.pleaseSelectTemplate);
return;
} }
var model = { var model = {
...@@ -480,6 +482,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc ...@@ -480,6 +482,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// text: thisConstant.allSheets, // text: thisConstant.allSheets,
showClearButton: false, showClearButton: false,
noDataText: '', noDataText: '',
dropDownOptions: { maxHeight: '310px' },
dataSource: thisData.allTemplateList, dataSource: thisData.allTemplateList,
contentTemplate: function(e) { contentTemplate: function(e) {
var value = e.component.option("value"), var value = e.component.option("value"),
......
...@@ -2,20 +2,20 @@ ...@@ -2,20 +2,20 @@
<!-- 采用导入报表模板的方式 --> <!-- 采用导入报表模板的方式 -->
<script type="text/ng-template" id="editTemplateModal.html"> <script type="text/ng-template" id="editTemplateModal.html">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title">添加报表<span class="close" ng-click="cancel()" aria-hidden="true">×</span></div> <div class="modal-title">{{'AddReport' | translate}}<span class="close" ng-click="cancel()" aria-hidden="true">×</span></div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" id="editTemplateControlForm"> <form class="form-horizontal" id="editTemplateControlForm">
<div class="form-group radio-wrapper"> <div class="form-group radio-wrapper">
<label class="col-sm-4 normal-label"> <label class="col-sm-4 normal-label">
<input type="radio" ng-model="editModel.addExists" ng-value="true"><span>添加现有报表</span> <input type="radio" ng-model="editModel.addExists" ng-value="true"><span>{{'AddExistingReport' | translate}}</span>
</label> </label>
<label class="col-sm-4 normal-label"> <label class="col-sm-4 normal-label">
<input type="radio" ng-model="editModel.addExists" ng-value="false"><span>上传新报表</span> <input type="radio" ng-model="editModel.addExists" ng-value="false"><span>{{'UploadNewReport' | translate}}</span>
</label> </label>
</div> </div>
<div class="form-group" ng-show="!editModel.addExists"> <div class="form-group" ng-show="!editModel.addExists">
<label for="fileName" class="col-sm-3 control-label">报表底稿:</label> <label for="fileName" class="col-sm-3 control-label">{{'TemplateFile' | translate}}: </label>
<div class="col-sm-5"> <div class="col-sm-5">
<input class="form-control" type="text" name="fileName" ng-model="editModel.file.name" readonly placeholder=""> <input class="form-control" type="text" name="fileName" ng-model="editModel.file.name" readonly placeholder="">
</input> </input>
...@@ -25,25 +25,25 @@ ...@@ -25,25 +25,25 @@
</div> </div>
</div> </div>
<div class="form-group" ng-show="!editModel.addExists"> <div class="form-group" ng-show="!editModel.addExists">
<label for="telCode" class="col-sm-3 control-label">选择报表:</label> <label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<div class="col-sm-8 upload-sheet-wrapper"> <div class="col-sm-8 upload-sheet-wrapper">
<div id={{::editModel.sheetSelectDxID}}></div> <div id={{::editModel.sheetSelectDxID}}></div>
</div> </div>
</div> </div>
<div class="form-group radio-wrapper" ng-show="!editModel.addExists">
<label for="telCode" class="col-sm-4 normal-label">
<input type="radio" id="allowManual"><span>允许手工录入</span>
</label>
</div>
<div class="form-group" ng-show="editModel.addExists"> <div class="form-group" ng-show="editModel.addExists">
<label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<label for="telCode" class="col-sm-3 control-label">选择报表:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id={{::editModel.findSheetDxDropID}}></div> <div id={{::editModel.findSheetDxDropID}}></div>
</div> </div>
</div> </div>
<div class="form-group" ng-show="!editModel.addExists">
<div class="col-sm-9 normal-label checkbox">
<label>
<input type="checkbox" ng-model="editModel.defaultInput" ng-true-value="1" ng-false-value="0"> {{'AllowKeyInByDefault' | translate}}
</label>
</div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer" style="padding-left: 22px;text-align: left;"> <div class="modal-footer" style="padding-left: 22px;text-align: left;">
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
<!-- 添加现有报表 --> <!-- 添加现有报表 -->
<script type="text/ng-template" id="addExistTemplateModal.html"> <script type="text/ng-template" id="addExistTemplateModal.html">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title">添加现有报表</div> <div class="modal-title">{{'AddExistingReport' | translate}}</div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" id="editTemplateControlForm"> <form class="form-horizontal" id="editTemplateControlForm">
<div class="form-group"> <div class="form-group">
<label for="telCode" class="col-sm-3 control-label">选择报表:</label> <label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<div class="col-sm-7"> <div class="col-sm-7">
<div id={{::editModel.findSheetDxDropID}}></div> <div id={{::editModel.findSheetDxDropID}}></div>
</div> </div>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<!-- 编辑报表名称 --> <!-- 编辑报表名称 -->
<script type="text/ng-template" id="deleteTemplateModal.html"> <script type="text/ng-template" id="deleteTemplateModal.html">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title">删除报表</div> <div class="modal-title">{{'DeleteReport' | translate}}</div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" id="deleteTemplateControlForm"> <form class="form-horizontal" id="deleteTemplateControlForm">
...@@ -90,12 +90,12 @@ ...@@ -90,12 +90,12 @@
<!-- 编辑报表名称 --> <!-- 编辑报表名称 -->
<script type="text/ng-template" id="editTemplateNameModal.html"> <script type="text/ng-template" id="editTemplateNameModal.html">
<div class="modal-header"> <div class="modal-header">
<div class="modal-title">编辑报表</div> <div class="modal-title">{{'EditReport' | translate}}</div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" id="editTemplateNameModal"> <form class="form-horizontal" id="editTemplateNameModal">
<div class="form-group"> <div class="form-group">
<label for="name" class="col-sm-3 control-label"><span class="must-input">*</span>报表底稿:</label> <label for="name" class="col-sm-3 control-label"><span class="must-input">*</span>{{'TemplateFile' | translate}}: </label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="text" name="name" ng-model="editModel.name" /> <input class="form-control" type="text" name="name" ng-model="editModel.name" />
</div> </div>
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
padding-left: 0; padding-left: 0;
padding-right: 32px; padding-right: 32px;
} }
.checkbox {
margin-left: 100px;
}
} }
.edit-template-name-wrapper { .edit-template-name-wrapper {
......
...@@ -170,16 +170,22 @@ ...@@ -170,16 +170,22 @@
}).then(function (resp) { }).then(function (resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
} else { } else {
if (resp.message && resp.message.length > 0) { if (resp.message && resp.message.length > 0) {
SweetAlert.warning($translate.instant(resp.message));
} else {
SweetAlert.error($translate.instant('ImportFailed'));
}
if (resp.resultMsg && resp.resultMsg.length > 0) {
SweetAlert.warning($translate.instant(resp.resultMsg)); SweetAlert.warning($translate.instant(resp.resultMsg));
} else { } else {
SweetAlert.error($translate.instant('ImportFailed')); SweetAlert.error($translate.instant('ImportFailed'));
} }
logDto.UpdateState = $translate.instant('ImportFail'); logDto.UpdateState = $translate.instant('ImportFail');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
} }
...@@ -395,7 +401,7 @@ ...@@ -395,7 +401,7 @@
ele1.datepicker("setDate", $scope.selectedDate); ele1.datepicker("setDate", $scope.selectedDate);
}; };
$scope.initCompanyList = function () { var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) { orgService.getOrgListByUserId().success(function (data) {
if (data) { if (data) {
$scope.companyList = data; $scope.companyList = data;
...@@ -494,6 +500,7 @@ ...@@ -494,6 +500,7 @@
$scope.setGridStyle = setGridStyle; $scope.setGridStyle = setGridStyle;
getUserPermission(); getUserPermission();
initCompanyList();
loadImportInfoDataGrid(); loadImportInfoDataGrid();
initDatePicker(); initDatePicker();
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
}).then(function(resp) { }).then(function(resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
}).then(function(resp) { }).then(function(resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
}).then(function(resp) { }).then(function(resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
}).then(function(resp) { }).then(function(resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
}).then(function(resp) { }).then(function(resp) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.data) { if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); SweetAlert.success($translate.instant('ImportSuccess'));
......
...@@ -12,7 +12,7 @@ webservices.factory('templateGroupService', ['$http', 'apiConfig', 'httpCacheSer ...@@ -12,7 +12,7 @@ webservices.factory('templateGroupService', ['$http', 'apiConfig', 'httpCacheSer
return $http.post('/templateGroup/addTemplateGroup', templateGroup, apiConfig.create()); return $http.post('/templateGroup/addTemplateGroup', templateGroup, apiConfig.create());
}, },
addTemplateGroupWithoutTemplate: function (templateGroup) { addTemplateGroupWithoutTemplate: function (templateGroup) {
return $http.post('/templateGroup/templateGroup/withoutTemplate', templateGroup, apiConfig.create()); return $http.post('/templateGroup/withoutTemplate', templateGroup, apiConfig.create());
}, },
getTemplateList: function (templateGroupID, reportType) { getTemplateList: function (templateGroupID, reportType) {
return $http.get('/template/get?templateGroupID=' + templateGroupID + '&reportType=' + reportType, apiConfig.create()); return $http.get('/template/get?templateGroupID=' + templateGroupID + '&reportType=' + reportType, apiConfig.create());
......
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