Commit 69d2626e authored by chase's avatar chase

fix bug

parent ee24fd66
...@@ -19,10 +19,13 @@ import org.springframework.web.bind.annotation.*; ...@@ -19,10 +19,13 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.PageResultVo; import pwc.taxtech.atms.common.PageResultVo;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.FileUploadEnum;
import pwc.taxtech.atms.dto.TaxDocumentDto; import pwc.taxtech.atms.dto.TaxDocumentDto;
import pwc.taxtech.atms.entity.TaxDocument; import pwc.taxtech.atms.entity.TaxDocument;
import pwc.taxtech.atms.service.impl.DidiFileUploadService;
import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl; import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil; import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.entity.FileUpload;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
...@@ -39,6 +42,8 @@ public class TaxDocumentController { ...@@ -39,6 +42,8 @@ public class TaxDocumentController {
@Autowired @Autowired
private TaxDocumentServiceImpl taxDocumentService; private TaxDocumentServiceImpl taxDocumentService;
@Autowired
private DidiFileUploadService didiFileUploadService;
@PostMapping("selectList") @PostMapping("selectList")
@ResponseBody @ResponseBody
public PageResultVo<TaxDocument> selectTaxDocumentList(@RequestBody TaxDocumentDto taxDocumentDto) { public PageResultVo<TaxDocument> selectTaxDocumentList(@RequestBody TaxDocumentDto taxDocumentDto) {
...@@ -51,7 +56,7 @@ public class TaxDocumentController { ...@@ -51,7 +56,7 @@ public class TaxDocumentController {
@PostMapping("/queryWhetherData") @PostMapping("/queryWhetherData")
@ResponseBody @ResponseBody
public boolean queryWhetherData(@RequestBody TaxDocument taxDocument) { public TaxDocument queryWhetherData(@RequestBody TaxDocument taxDocument) {
return taxDocumentService.queryWhetherData(taxDocument); return taxDocumentService.queryWhetherData(taxDocument);
} }
...@@ -76,11 +81,17 @@ public class TaxDocumentController { ...@@ -76,11 +81,17 @@ public class TaxDocumentController {
@PostMapping("edit") @PostMapping("edit")
@ResponseBody @ResponseBody
public boolean editTaxDocument( TaxDocument taxDocument) { public boolean editTaxDocument(TaxDocument taxDocument,
@RequestParam("file") MultipartFile file,
@RequestParam(required = false) String modual) {
//TODO 判断file是否为null 为null则不做上传和设置新url地址值 若不为null 则上传文件并设置文件url地址值
if(file!=null&&!file.isEmpty()){
FileUpload fileUpload = didiFileUploadService.uploadFile(file,file.getOriginalFilename(), FileUploadEnum.BizSource.RECORD_UPLOAD.name());
taxDocument.setFileUploadId(fileUpload.getUid());
taxDocument.setFilePositionUrl(fileUpload.getViewHttpUrl());
}
return taxDocumentService.editFilesType(taxDocument); return taxDocumentService.editFilesType(taxDocument);
} }
@RequestMapping("exportExcel") @RequestMapping("exportExcel")
@ResponseBody @ResponseBody
public void exportExcelFile(HttpServletResponse response, @RequestBody TaxDocumentDto taxDocumentDto) { public void exportExcelFile(HttpServletResponse response, @RequestBody TaxDocumentDto taxDocumentDto) {
......
...@@ -12,6 +12,7 @@ import org.apache.poi.ss.usermodel.WorkbookFactory; ...@@ -12,6 +12,7 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.dpo.OrgCodeIdDto; import pwc.taxtech.atms.dpo.OrgCodeIdDto;
import pwc.taxtech.atms.dpo.OrgSelectDto; import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.revenuconf.RevTypeAddDto; import pwc.taxtech.atms.dto.revenuconf.RevTypeAddDto;
...@@ -108,9 +109,10 @@ public class RevenueTypeMappingService extends BaseService { ...@@ -108,9 +109,10 @@ public class RevenueTypeMappingService extends BaseService {
Sheet sheet = workbook.getSheetAt(0); Sheet sheet = workbook.getSheetAt(0);
List<RevenueTypeMapping> list = new ArrayList<>(); List<RevenueTypeMapping> list = new ArrayList<>();
List<OrgCodeIdDto> orgDtoList = organizationService.getMyOrgCodeList(); List<OrgCodeIdDto> orgDtoList = organizationService.getMyOrgCodeList();
for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) { List<String> orgIds = new ArrayList<>();
for (int r = sheet.getFirstRowNum()+1; r <= sheet.getLastRowNum(); r++) {
Row row = sheet.getRow(r); Row row = sheet.getRow(r);
String orgCode = row.getCell(0).getStringCellValue(); String orgCode = String.valueOf(new BigDecimal(POIUtil.getCellFormulaString(row.getCell(0))).intValue());
Optional<OrgCodeIdDto> optional = orgDtoList.stream().filter(o -> StringUtils.equals(o.getCode(), orgCode)).findFirst(); Optional<OrgCodeIdDto> optional = orgDtoList.stream().filter(o -> StringUtils.equals(o.getCode(), orgCode)).findFirst();
if (!optional.isPresent()) { if (!optional.isPresent()) {
continue; continue;
...@@ -118,16 +120,24 @@ public class RevenueTypeMappingService extends BaseService { ...@@ -118,16 +120,24 @@ public class RevenueTypeMappingService extends BaseService {
RevenueTypeMapping mapping = new RevenueTypeMapping(); RevenueTypeMapping mapping = new RevenueTypeMapping();
mapping.setId(idService.nextId()); mapping.setId(idService.nextId());
mapping.setOrgId(optional.get().getId()); mapping.setOrgId(optional.get().getId());
mapping.setOuName(StringUtils.defaultString(row.getCell(1).getStringCellValue())); orgIds.add(optional.get().getId());
mapping.setContent(StringUtils.defaultString(row.getCell(2).getStringCellValue())); mapping.setOuName(POIUtil.getCellFormulaString(row.getCell(1)));
mapping.setTaxRate(new BigDecimal(row.getCell(3).getNumericCellValue())); mapping.setContent(POIUtil.getCellFormulaString(row.getCell(2)));
mapping.setRevenueTypeName(StringUtils.defaultString(row.getCell(4).getStringCellValue())); mapping.setTaxRate(new BigDecimal(POIUtil.getCellFormulaString(row.getCell(3))));
mapping.setStartDate(StringUtils.defaultString(row.getCell(5).getStringCellValue())); mapping.setRevenueTypeName(POIUtil.getCellFormulaString(row.getCell(4)));
mapping.setEndDate(StringUtils.defaultString(row.getCell(6).getStringCellValue(), DEFAULT_END_DATE)); mapping.setStartDate(POIUtil.getCellFormulaString(row.getCell(5)));
mapping.setEndDate(StringUtils.defaultString(POIUtil.getCellFormulaString(row.getCell(6)), DEFAULT_END_DATE));
mapping.setStatus(0);
mapping.setCreateBy("Admin");
mapping.setUpdateBy("Admin");
list.add(mapping); list.add(mapping);
} }
if (1 == type) { if (1 == type) {
//todo 覆盖导入 具体覆盖哪些 if(CollectionUtils.isNotEmpty(orgIds)){
RevenueTypeMappingExample delExample = new RevenueTypeMappingExample();
delExample.createCriteria().andOrgIdIn(orgIds);
typeMappingMapper.deleteByExample(delExample);
}
} }
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
List<List<RevenueTypeMapping>> batchList = CommonUtils.subListWithLen(list, CommonUtils.BATCH_NUM_2000); List<List<RevenueTypeMapping>> batchList = CommonUtils.subListWithLen(list, CommonUtils.BATCH_NUM_2000);
......
...@@ -161,6 +161,7 @@ public class TaxDocumentServiceImpl { ...@@ -161,6 +161,7 @@ public class TaxDocumentServiceImpl {
if (StringUtils.isNotBlank(taxDocumentDto.getCreator())) { if (StringUtils.isNotBlank(taxDocumentDto.getCreator())) {
criteria.andCreatorLike("%" + taxDocumentDto.getCreator() + "%"); criteria.andCreatorLike("%" + taxDocumentDto.getCreator() + "%");
} }
example.setOrderByClause("create_time DESC");
return example; return example;
} }
...@@ -331,7 +332,7 @@ public class TaxDocumentServiceImpl { ...@@ -331,7 +332,7 @@ public class TaxDocumentServiceImpl {
* @param taxDocument * @param taxDocument
* @return * @return
*/ */
public boolean queryWhetherData(TaxDocument taxDocument) { public TaxDocument queryWhetherData(TaxDocument taxDocument) {
try { try {
//简单参数校验 //简单参数校验
/* if (StringUtils.isAnyBlank(taxDocumentDto.getFileAttr(), taxDocumentDto.getFileName(), /* if (StringUtils.isAnyBlank(taxDocumentDto.getFileAttr(), taxDocumentDto.getFileName(),
...@@ -347,12 +348,12 @@ public class TaxDocumentServiceImpl { ...@@ -347,12 +348,12 @@ public class TaxDocumentServiceImpl {
criteria.andOwnTimeEqualTo(taxDocument.getOwnTime()); criteria.andOwnTimeEqualTo(taxDocument.getOwnTime());
List<TaxDocument> taxDocuments = taxDocumentMapper.selectByExample(taxDocumentExample); List<TaxDocument> taxDocuments = taxDocumentMapper.selectByExample(taxDocumentExample);
if (null != taxDocuments && taxDocuments.size() > 0) { if (null != taxDocuments && taxDocuments.size() > 0) {
return false; return taxDocuments.get(0);
} }
return true; return new TaxDocument();
} catch (Exception e) { } catch (Exception e) {
// log.error("TaxDocumentServiceImpl queryWhetherData error :" + e.getMessage()); // log.error("TaxDocumentServiceImpl queryWhetherData error :" + e.getMessage());
return false; return new TaxDocument();
} }
} }
public void downloadAllFile(HttpServletResponse response, List<Long> ids) { public void downloadAllFile(HttpServletResponse response, List<Long> ids) {
......
package pwc.taxtech.atms.vat.entity; package pwc.taxtech.atms.vat.entity;
import pwc.taxtech.atms.entity.BaseEntity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
/** /**
* *
...@@ -110,41 +110,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable { ...@@ -110,41 +110,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable {
*/ */
private Integer status; private Integer status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_type_mapping.create_by
*
* @mbg.generated
*/
private String createBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_type_mapping.update_by
*
* @mbg.generated
*/
private String updateBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_type_mapping.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_type_mapping.update_time
*
* @mbg.generated
*/
private Date updateTime;
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
...@@ -370,101 +335,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable { ...@@ -370,101 +335,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable {
this.status = status; this.status = status;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_type_mapping.create_by
*
* @return the value of revenue_type_mapping.create_by
*
* @mbg.generated
*/
public String getCreateBy() {
return createBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_type_mapping.create_by
*
* @param createBy the value for revenue_type_mapping.create_by
*
* @mbg.generated
*/
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_type_mapping.update_by
*
* @return the value of revenue_type_mapping.update_by
*
* @mbg.generated
*/
public String getUpdateBy() {
return updateBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_type_mapping.update_by
*
* @param updateBy the value for revenue_type_mapping.update_by
*
* @mbg.generated
*/
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_type_mapping.create_time
*
* @return the value of revenue_type_mapping.create_time
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_type_mapping.create_time
*
* @param createTime the value for revenue_type_mapping.create_time
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_type_mapping.update_time
*
* @return the value of revenue_type_mapping.update_time
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_type_mapping.update_time
*
* @param updateTime the value for revenue_type_mapping.update_time
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -487,10 +357,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable { ...@@ -487,10 +357,6 @@ public class RevenueTypeMapping extends BaseEntity implements Serializable {
sb.append(", startDate=").append(startDate); sb.append(", startDate=").append(startDate);
sb.append(", endDate=").append(endDate); sb.append(", endDate=").append(endDate);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", createBy=").append(createBy);
sb.append(", updateBy=").append(updateBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
......
...@@ -403,7 +403,6 @@ ...@@ -403,7 +403,6 @@
SELECT SELECT
id,file_attr, file_type id,file_attr, file_type
FROM file_types FROM file_types
WHERE status = 1
ORDER BY file_attr ORDER BY file_attr
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -414,38 +414,23 @@ ...@@ -414,38 +414,23 @@
</if> </if>
</select> </select>
<insert id="batchInsert" parameterType="pwc.taxtech.atms.vat.entity.RevenueTypeMapping"> <insert id="batchInsert">
insert into revenue_type_mapping (id, org_id, ou_name, insert into revenue_type_mapping
content, tax_rate, revenue_type_name, (id, org_id, ou_name, content, tax_rate, revenue_type_name, start_date, end_date, status, create_by, update_by, create_time, update_time) values
start_date, end_date, `status` <foreach collection="list" item="item" index="index" separator=",">
<if test="createBy != null"> (#{item.id},
,create_by #{item.orgId},
</if> #{item.ouName},
<if test="updateBy != null"> #{item.content},
,update_by #{item.taxRate},
</if> #{item.revenueTypeName},
<if test="createTime != null"> #{item.startDate},
,create_time #{item.endDate},
</if> #{item.status,jdbcType=TINYINT},
<if test="updateTime != null"> #{item.createBy},
,update_time #{item.updateBy},
</if>) values #{item.createTime},
<foreach collection="list" item="item" index="index" separator=","> #{item.updateTime})
(#{id,jdbcType=BIGINT}, #{orgId,jdbcType=VARCHAR}, #{ouName,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{taxRate,jdbcType=DECIMAL}, #{revenueTypeName,jdbcType=VARCHAR},
#{startDate,jdbcType=VARCHAR}, #{endDate,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}
<if test="createBy != null">
,create_by = #{createBy,jdbcType=VARCHAR}
</if>
<if test="updateBy != null">
,update_by = #{updateBy,jdbcType=VARCHAR}
</if>
<if test="createTime != null">
,create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="updateTime != null">
,update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>)
</foreach> </foreach>
</insert> </insert>
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
"AssignRoleCol" : "分配角色", "AssignRoleCol" : "分配角色",
"SequenceNoCol":"序号", "SequenceNoCol":"序号",
"DocumentID":"Doc ID", "DocumentID":"Doc ID",
"Document":"Document",
"TaxGroup":"税种", "TaxGroup":"税种",
"ReportTemplate":"Report Template", "ReportTemplate":"Report Template",
...@@ -78,6 +79,7 @@ ...@@ -78,6 +79,7 @@
"NoOrganizationData":"The current system does not have any organization", "NoOrganizationData":"The current system does not have any organization",
"TaxpayerIdentificationNumber":"TaxpayerIdentificationNumber", "TaxpayerIdentificationNumber":"TaxpayerIdentificationNumber",
"AddOrganization":"Add Organization", "AddOrganization":"Add Organization",
"IsRequired": "Is Required",
"EditOrganization":"Edit Organization", "EditOrganization":"Edit Organization",
"OrganizationName":"Entity Name", "OrganizationName":"Entity Name",
"OrganizationNameRequired":"Entity Name Required", "OrganizationNameRequired":"Entity Name Required",
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
"DocumentAttr":"DocumentAttr", "DocumentAttr":"DocumentAttr",
"DocumentType":"DocumentType", "DocumentType":"DocumentType",
"DocumentName":"DocumentName", "DocumentName":"DocumentName",
"IsRequired":"Is Required",
"PleaseChecksRequired":"Please Checks Required",
"BusinessLine":"BusinessLine", "BusinessLine":"BusinessLine",
"CorporationName":"CorporationName", "CorporationName":"CorporationName",
"AvailabilityDate":"AvailabilityDate", "AvailabilityDate":"AvailabilityDate",
...@@ -45,6 +47,7 @@ ...@@ -45,6 +47,7 @@
"NoData":"NoData", "NoData":"NoData",
"PleaseSelected":"PleaseSelected", "PleaseSelected":"PleaseSelected",
"PleaseType":"PleaseType", "PleaseType":"PleaseType",
"Tips":"Tips",
"EntityStorageDescription":"EntityStorageDescription", "EntityStorageDescription":"EntityStorageDescription",
"multiUpload":"multiUpload", "multiUpload":"multiUpload",
"UploadAttach":"UploadAttach", "UploadAttach":"UploadAttach",
......
{ {
"DocumentAttr":"档案属性", "DocumentAttr":"档案属性",
"Document":"档案",
"IsRequired":"为必填字段,不能为空,请检查",
"PleaseChecksRequired":"请检查必填字段",
"DocumentType":"档案类型", "DocumentType":"档案类型",
"DocumentName":"档案名称", "DocumentName":"档案名称",
"BusinessLine":"业务线", "BusinessLine":"业务线",
...@@ -45,6 +48,7 @@ ...@@ -45,6 +48,7 @@
"NoData":"当前无数据可下载", "NoData":"当前无数据可下载",
"PleaseSelected":"请选择", "PleaseSelected":"请选择",
"PleaseType":"请输入", "PleaseType":"请输入",
"Tips":"提示讯息",
"EntityStorageDescription":"请将实物档案存放地址精确到某个档案柜", "EntityStorageDescription":"请将实物档案存放地址精确到某个档案柜",
"multiUpload":"批量上传", "multiUpload":"批量上传",
"UploadAttach":"上传附件", "UploadAttach":"上传附件",
......
...@@ -250,7 +250,14 @@ ...@@ -250,7 +250,14 @@
rowAlternationEnabled: true, //单双行颜色 rowAlternationEnabled: true, //单双行颜色
}; };
}; };
$scope.getTableHeight=function(){
var row_height=$("table").find("tr").height();
if(row_height){
return {
height:(row_height*12+100)+"px"
}
}
};
$scope.exportEventTrigger = function(){ $scope.exportEventTrigger = function(){
$(".dx-datagrid-export-button").click(); $(".dx-datagrid-export-button").click();
}; };
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</div> </div>
<div style="padding:0 1rem;background:#fff"> <div style="padding:0 1rem;background:#fff">
<div class="dx-viewport demo-container"> <div class="dx-viewport demo-container">
<div id="gridContainer" dx-data-grid="dataGridOptions"></div> <div id="gridContainer" dx-data-grid="dataGridOptions" ng-style="getTableHeight()"></div>
</div> </div>
<!--<div class="form-group page-form-group">--> <!--<div class="form-group page-form-group">-->
......
...@@ -157,47 +157,45 @@ ...@@ -157,47 +157,45 @@
}) })
} }
$scope.upload = function() { $scope.upload = function(uploadType) {
if (!$scope.uploadFile || !$scope.uploadFile.file.name) { if (!$scope.uploadFile || !$scope.uploadFile.file.name) {
SweetAlert.warning($translate.instant('SelectUploadFileRequired')); SweetAlert.warning($translate.instant('SelectUploadFileRequired'));
return; return;
} }
$('#busy-indicator-container').show();
var deferred = $q.defer(); var deferred = $q.defer();
Upload.upload({ Upload.upload({
url: '/revenueConfMapping/upload', url: apiInterceptor.webApiHostUrl + '/revenueConfMapping/upload',
data: { data: {
type: $scope.uploadType, type: uploadType,
}, },
file: $scope.uploadFile.file, file: $scope.uploadFile.file,
// resumeChunkSize: resumable ? $scope.chunkSize : null, // resumeChunkSize: resumable ? $scope.chunkSize : null,
headers: { headers: {
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken(), Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken(),
__RequestVerificationToken: token,
withCredentials: true withCredentials: true
}, },
__RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(res) { }).then(function(res) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (res && 0 === res.code) { if (res && res.data && 0 === res.data.code) {
SweetAlert.success($translate.instant('ImportSuccess'));
$scope.refreshConfigGrid();
} else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}, function(resp) { }, function(resp) {
deferred.resolve(); deferred.resolve();
if (resp.statusText === 'HttpRequestValidationException') { if (resp.statusText === 'HttpRequestValidationException') {
SweetAlert.warning($translate.instant('HttpRequestValidationException')); SweetAlert.warning($translate.instant('HttpRequestValidationException'));
} else { } else {
SweetAlert.warning($translate.instant('SaveFail')); SweetAlert.warning($translate.instant('SaveFail'));
} }
$('#busy-indicator-container').hide();
console.log('Error status: ' + resp.status);
}, function(evt) { }, function(evt) {
deferred.resolve(); deferred.resolve();
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total); var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<label class="control-label">文件:</label> <label class="control-label">文件:</label>
<input class="form-control" type="text" name="fileName" ng-model="uploadFile.file.name" readonly placeholder=""/> <input class="form-control" type="text" name="fileName" ng-model="uploadFile.file.name" readonly placeholder=""/>
<button type="button" type="file" ngf-select ng-model="uploadFile.file" accept=".xls,.xlsx" class="btn btn-secondary browse">{{'SelectFile' | translate }}</button> <button type="button" type="file" ngf-select ng-model="uploadFile.file" accept=".xls,.xlsx" class="btn btn-secondary browse">{{'SelectFile' | translate }}</button>
<button type="button" class="btn btn-secondary" translate="CoverImportBtn" ng-click="upload()"></button> <button type="button" class="btn btn-secondary" translate="CoverImportBtn" ng-click="upload(1)"></button>
<button type="button" class="btn btn-secondary" translate="AddImportBtn" ng-click="upload()"></button> <button type="button" class="btn btn-secondary" translate="AddImportBtn" ng-click="upload(2)"></button>
<button type="button" class="btn btn-in-grid inline-div" ng-click="downloadTemplate()"><i <button type="button" class="btn btn-in-grid inline-div" ng-click="downloadTemplate()"><i
class="fa fa-download" aria-hidden="true"></i>下载模板 class="fa fa-download" aria-hidden="true"></i>下载模板
</button> </button>
......
...@@ -633,7 +633,7 @@ ...@@ -633,7 +633,7 @@
</div> </div>
<div style="padding:0 1rem;background:#fff"> <div style="padding:0 1rem;background:#fff">
<div class="TDL-data-grid-container dx-viewport demo-container"> <div class="TDL-data-grid-container dx-viewport demo-container">
<div id="gridContainer" dx-data-grid="dataGridOptions"></div> <div id="gridContainer" dx-data-grid="dataGridOptions" ng-style="getTableHeight()"></div>
</div> </div>
<div class="form-group page-form-group"> <div class="form-group page-form-group">
<div class="page-footer"> <div class="page-footer">
......
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