Commit d21bfb54 authored by chase's avatar chase

merge 档案管理

parent 376af30c
...@@ -96,6 +96,7 @@ public class FileTypesController { ...@@ -96,6 +96,7 @@ public class FileTypesController {
headers.put("id", "id"); headers.put("id", "id");
headers.put("file_attr", "档案属性"); headers.put("file_attr", "档案属性");
headers.put("file_type", "档案类型"); headers.put("file_type", "档案类型");
headers.put("file_type", "必填字段");
headers.put("description", "说明"); headers.put("description", "说明");
headers.put("creator", "办事人"); headers.put("creator", "办事人");
headers.put("create_time", "创建时间"); headers.put("create_time", "创建时间");
......
...@@ -96,7 +96,7 @@ public class TaxDocumentController { ...@@ -96,7 +96,7 @@ public class TaxDocumentController {
headers.put("business_line", "业务线"); headers.put("business_line", "业务线");
headers.put("company_name", "公司名称"); headers.put("company_name", "公司名称");
headers.put("tax_type", "税种"); headers.put("tax_type", "税种");
headers.put("file_time", "文件日期"); headers.put("file_time", "文件生效日期");
headers.put("effective_time", "有效日期"); headers.put("effective_time", "有效日期");
headers.put("creator", "创建人"); headers.put("creator", "创建人");
headers.put("create_time", "创建时间"); headers.put("create_time", "创建时间");
...@@ -105,9 +105,10 @@ public class TaxDocumentController { ...@@ -105,9 +105,10 @@ public class TaxDocumentController {
headers.put("keeper", "保管人"); headers.put("keeper", "保管人");
headers.put("remark", "档案备注"); headers.put("remark", "档案备注");
headers.put("file_position_url", "文件存储的位置"); headers.put("file_position_url", "文件存储的位置");
headers.put("own_time", "所属期间");
List<TaxDocument> TaxDocument = taxDocumentService.selectTaxDocumentList(taxDocumentDto); List<TaxDocument> TaxDocument = taxDocumentService.selectTaxDocumentList(taxDocumentDto);
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1")); response.setHeader("Content-Disposition", "attachment;fileName=" + new String("taxDocument.xlsx".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream(); OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, TaxDocument, ouputStream); ExcelUtil.exportExcel(headers, TaxDocument, ouputStream);
} catch (Exception e) { } catch (Exception e) {
......
package pwc.taxtech.atms.dto; package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import pwc.taxtech.atms.anno.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto; package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import pwc.taxtech.atms.anno.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.organization; package pwc.taxtech.atms.dto.organization;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import pwc.taxtech.atms.thirdparty.ExcelCell; import pwc.taxtech.atms.anno.ExcelCell;
public class OrgBasicDto { public class OrgBasicDto {
//@JsonProperty("ID") //@JsonProperty("ID")
......
package pwc.taxtech.atms.dto.organization; package pwc.taxtech.atms.dto.organization;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import pwc.taxtech.atms.thirdparty.ExcelCell; import pwc.taxtech.atms.anno.ExcelCell;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.previewData; package pwc.taxtech.atms.dto.previewData;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.entity.BaseEntity; import pwc.taxtech.atms.anno.ExcelCell;
import pwc.taxtech.atms.entity.CustomDateSerializer; import pwc.taxtech.atms.entity.CustomDateSerializer;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.vatdto; package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.thirdparty.ExcelCell; import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
......
package pwc.taxtech.atms.dto.vatdto; package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.thirdparty.ExcelCell; import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
......
package pwc.taxtech.atms.dto.vatdto; package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import pwc.taxtech.atms.constant.enums.EnumOutputInvoiceType; import pwc.taxtech.atms.anno.ExcelCell;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.vatdto.dd; package pwc.taxtech.atms.dto.vatdto.dd;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.util.PwCIdSerialize;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.io.Serializable; import pwc.taxtech.atms.anno.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.vatdto.dd; package pwc.taxtech.atms.dto.vatdto.dd;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import pwc.taxtech.atms.anno.ExcelCell;
import pwc.taxtech.atms.common.util.PwCIdSerialize;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.vatdto.dd; package pwc.taxtech.atms.dto.vatdto.dd;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.util.PwCIdSerialize; import pwc.taxtech.atms.anno.ExcelCell;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.dto.vatdto.dd; package pwc.taxtech.atms.dto.vatdto.dd;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import pwc.taxtech.atms.anno.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package pwc.taxtech.atms.thirdparty; package pwc.taxtech.atms.thirdparty;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.beanutils.BeanComparator; import org.apache.commons.beanutils.BeanComparator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.ComparatorUtils; import org.apache.commons.collections.ComparatorUtils;
import org.apache.commons.collections.comparators.ComparableComparator; import org.apache.commons.collections.comparators.ComparableComparator;
import org.apache.commons.collections.comparators.ComparatorChain; import org.apache.commons.collections.comparators.ComparatorChain;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellReference; import org.apache.poi.ss.util.CellReference;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.anno.ExcelCell;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.MessageFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* The <code>ExcelUtil</code> 与 {@link ExcelCell}搭配使用 * The <code>ExcelUtil</code> 与 {@link ExcelCell}搭配使用
......
...@@ -9,7 +9,6 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction; ...@@ -9,7 +9,6 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.exception.Exceptions; import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
</parent> </parent>
<dependencies> <dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency> <dependency>
<groupId>org.mybatis</groupId> <groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId> <artifactId>mybatis</artifactId>
......
package pwc.taxtech.atms.thirdparty; package pwc.taxtech.atms.anno;
import org.apache.commons.lang3.StringUtils;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import org.apache.commons.lang3.StringUtils;
/** /**
* The <code>ExcelCell</code><br> * The <code>ExcelCell</code><br>
......
...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.entity; ...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.entity;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -24,6 +25,7 @@ public class FileTypes implements Serializable { ...@@ -24,6 +25,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=1)
private Long id; private Long id;
/** /**
...@@ -35,6 +37,7 @@ public class FileTypes implements Serializable { ...@@ -35,6 +37,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=2)
private String fileAttr; private String fileAttr;
/** /**
...@@ -57,6 +60,7 @@ public class FileTypes implements Serializable { ...@@ -57,6 +60,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=3)
private String fileType; private String fileType;
...@@ -69,6 +73,7 @@ public class FileTypes implements Serializable { ...@@ -69,6 +73,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=4)
private List<String> requiredField; private List<String> requiredField;
...@@ -85,6 +90,7 @@ public class FileTypes implements Serializable { ...@@ -85,6 +90,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=5)
private String description; private String description;
/** /**
...@@ -105,6 +111,7 @@ public class FileTypes implements Serializable { ...@@ -105,6 +111,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=6)
private String creator; private String creator;
/** /**
...@@ -116,6 +123,7 @@ public class FileTypes implements Serializable { ...@@ -116,6 +123,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=7)
private Date createTime; private Date createTime;
/** /**
...@@ -127,6 +135,7 @@ public class FileTypes implements Serializable { ...@@ -127,6 +135,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=8)
private Date updateTime; private Date updateTime;
/** /**
...@@ -138,6 +147,7 @@ public class FileTypes implements Serializable { ...@@ -138,6 +147,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=9)
private String status; private String status;
/** /**
...@@ -149,6 +159,7 @@ public class FileTypes implements Serializable { ...@@ -149,6 +159,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=10)
private String remarks; private String remarks;
/** /**
......
package pwc.taxtech.atms.entity; package pwc.taxtech.atms.entity;
import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -19,6 +21,7 @@ public class OperationLogFileType implements Serializable { ...@@ -19,6 +21,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=1)
private String id; private String id;
/** /**
...@@ -55,6 +58,7 @@ public class OperationLogFileType implements Serializable { ...@@ -55,6 +58,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=2)
private String operationAction; private String operationAction;
/** /**
...@@ -73,6 +77,7 @@ public class OperationLogFileType implements Serializable { ...@@ -73,6 +77,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=3)
private String updateState; private String updateState;
/** /**
...@@ -82,6 +87,7 @@ public class OperationLogFileType implements Serializable { ...@@ -82,6 +87,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=4)
private String operationUser; private String operationUser;
/** /**
...@@ -91,6 +97,7 @@ public class OperationLogFileType implements Serializable { ...@@ -91,6 +97,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=5)
private String ip; private String ip;
/** /**
...@@ -100,6 +107,7 @@ public class OperationLogFileType implements Serializable { ...@@ -100,6 +107,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=5)
private String comment; private String comment;
/** /**
...@@ -109,6 +117,7 @@ public class OperationLogFileType implements Serializable { ...@@ -109,6 +117,7 @@ public class OperationLogFileType implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=6)
private Date createTime; private Date createTime;
private List<String> fileTypeIds; private List<String> fileTypeIds;
......
package pwc.taxtech.atms.entity; package pwc.taxtech.atms.entity;
import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -19,6 +21,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -19,6 +21,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=1)
private String id; private String id;
/** /**
...@@ -55,6 +58,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -55,6 +58,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=2)
private String operationAction; private String operationAction;
/** /**
...@@ -73,6 +77,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -73,6 +77,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=3)
private String updateState; private String updateState;
/** /**
...@@ -82,6 +87,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -82,6 +87,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=4)
private String operationUser; private String operationUser;
/** /**
...@@ -91,6 +97,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -91,6 +97,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=5)
private String ip; private String ip;
/** /**
...@@ -100,6 +107,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -100,6 +107,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=6)
private String comment; private String comment;
/** /**
...@@ -109,6 +117,7 @@ public class OperationLogTaxDocument implements Serializable { ...@@ -109,6 +117,7 @@ public class OperationLogTaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=7)
private Date createTime; private Date createTime;
List<String> ids; List<String> ids;
......
package pwc.taxtech.atms.entity; package pwc.taxtech.atms.entity;
import pwc.taxtech.atms.anno.ExcelCell;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -10,7 +12,7 @@ import java.util.Date; ...@@ -10,7 +12,7 @@ import java.util.Date;
* *
* @mbg.generated do_not_delete_during_merge * @mbg.generated do_not_delete_during_merge
*/ */
public class TaxDocument extends BaseEntity implements Serializable { public class TaxDocument implements Serializable {
/** /**
* Database Column Remarks: * Database Column Remarks:
* 档案ID * 档案ID
...@@ -20,6 +22,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -20,6 +22,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=1)
private Long id; private Long id;
/** /**
...@@ -31,6 +34,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -31,6 +34,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=2)
private String fileAttr; private String fileAttr;
/** /**
...@@ -53,6 +57,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -53,6 +57,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=3)
private String fileType; private String fileType;
/** /**
...@@ -64,6 +69,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -64,6 +69,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=4)
private String fileName; private String fileName;
/** /**
...@@ -75,6 +81,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -75,6 +81,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=5)
private String businessLine; private String businessLine;
/** /**
...@@ -97,6 +104,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -97,6 +104,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=6)
private String companyName; private String companyName;
/** /**
...@@ -108,40 +116,44 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -108,40 +116,44 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=7)
private String taxType; private String taxType;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 期间 * 文件生效日期
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.own_time * This field corresponds to the database column tax_document.file_time
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer ownTime; @ExcelCell(index=8)
private Date fileTime;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 文件生效日期 * 到期日
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.file_time * This field corresponds to the database column tax_document.effective_time
* *
* @mbg.generated * @mbg.generated
*/ */
private Date fileTime; @ExcelCell(index=9)
private Date effectiveTime;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 到期日 * 所属期间
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.effective_time * This field corresponds to the database column tax_document.own_time
* *
* @mbg.generated * @mbg.generated
*/ */
private Date effectiveTime; @ExcelCell(index=17)
private Integer ownTime;
/** /**
* *
...@@ -161,22 +173,20 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -161,22 +173,20 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=10)
private String creator; private String creator;
/** /**
* Database Column Remarks:
* 创建时间
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.create_time * This field corresponds to the database column tax_document.create_time
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=11)
private Date createTime; private Date createTime;
/** /**
* Database Column Remarks:
* 更新时间
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.update_time * This field corresponds to the database column tax_document.update_time
...@@ -194,6 +204,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -194,6 +204,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=12)
private Date uploadTime; private Date uploadTime;
/** /**
...@@ -205,6 +216,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -205,6 +216,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=13)
private String storageArea; private String storageArea;
/** /**
...@@ -225,6 +237,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -225,6 +237,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=14)
private String keeper; private String keeper;
/** /**
...@@ -247,6 +260,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -247,6 +260,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=15)
private String remark; private String remark;
/** /**
...@@ -269,51 +283,53 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -269,51 +283,53 @@ public class TaxDocument extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=16)
private String filePositionUrl; private String filePositionUrl;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 按年份分区的冗余字段 * 上传文件id
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.year_redundancy * This field corresponds to the database column tax_document.file_upload_id
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer yearRedundancy; private String fileUploadId;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 审核状态(暂时无用);0:未审核;1:审核通过;-1:审核不通过; * 按年份分区的冗余字段
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.audit_status * This field corresponds to the database column tax_document.year_redundancy
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer auditStatus; private Integer yearRedundancy;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 是否启用,T:启用;F:不启用;用于逻辑删除 * 审核状态
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.enable * This field corresponds to the database column tax_document.audit_status
* *
* @mbg.generated * @mbg.generated
*/ */
private String enable; private Integer auditStatus;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 文件上传表id * 是否可用
* * T:可用
* F:不可用
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column tax_document.file_upload_id * This field corresponds to the database column tax_document.enable
* *
* @mbg.generated * @mbg.generated
*/ */
private String fileUploadId; private String enable;
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
...@@ -323,6 +339,46 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -323,6 +339,46 @@ public class TaxDocument extends BaseEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getEnable() {
return enable;
}
public String getFileUploadId() {
return fileUploadId;
}
public void setFileUploadId(String fileUploadId) {
this.fileUploadId = fileUploadId;
}
public void setEnable(String enable) {
this.enable = enable;
}
public Integer getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(Integer auditStatus) {
this.auditStatus = auditStatus;
}
public Integer getOwnTime() {
return ownTime;
}
public void setOwnTime(Integer ownTime) {
this.ownTime = ownTime;
}
public String getPhysicalIndexNumber() {
return physicalIndexNumber;
}
public void setPhysicalIndexNumber(String physicalIndexNumber) {
this.physicalIndexNumber = physicalIndexNumber;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.id * This method returns the value of the database column tax_document.id
...@@ -359,6 +415,14 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -359,6 +415,14 @@ public class TaxDocument extends BaseEntity implements Serializable {
return fileAttr; return fileAttr;
} }
public String getFileOriginalName() {
return fileOriginalName;
}
public void setFileOriginalName(String fileOriginalName) {
this.fileOriginalName = fileOriginalName;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.file_attr * This method sets the value of the database column tax_document.file_attr
...@@ -488,7 +552,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -488,7 +552,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* @mbg.generated * @mbg.generated
*/ */
public void setCompanyId(String companyId) { public void setCompanyId(String companyId) {
this.companyId = companyId == null ? null : companyId.trim(); this.companyId = companyId;
} }
/** /**
...@@ -539,30 +603,6 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -539,30 +603,6 @@ public class TaxDocument extends BaseEntity implements Serializable {
this.taxType = taxType == null ? null : taxType.trim(); this.taxType = taxType == null ? null : taxType.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.own_time
*
* @return the value of tax_document.own_time
*
* @mbg.generated
*/
public Integer getOwnTime() {
return ownTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.own_time
*
* @param ownTime the value for tax_document.own_time
*
* @mbg.generated
*/
public void setOwnTime(Integer ownTime) {
this.ownTime = ownTime;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.file_time * This method returns the value of the database column tax_document.file_time
...@@ -632,7 +672,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -632,7 +672,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* @mbg.generated * @mbg.generated
*/ */
public void setCreatorId(String creatorId) { public void setCreatorId(String creatorId) {
this.creatorId = creatorId == null ? null : creatorId.trim(); this.creatorId = creatorId;
} }
/** /**
...@@ -776,7 +816,7 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -776,7 +816,7 @@ public class TaxDocument extends BaseEntity implements Serializable {
* @mbg.generated * @mbg.generated
*/ */
public void setKeeperId(String keeperId) { public void setKeeperId(String keeperId) {
this.keeperId = keeperId == null ? null : keeperId.trim(); this.keeperId = keeperId;
} }
/** /**
...@@ -803,30 +843,6 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -803,30 +843,6 @@ public class TaxDocument extends BaseEntity implements Serializable {
this.keeper = keeper == null ? null : keeper.trim(); this.keeper = keeper == null ? null : keeper.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.physical_index_number
*
* @return the value of tax_document.physical_index_number
*
* @mbg.generated
*/
public String getPhysicalIndexNumber() {
return physicalIndexNumber;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.physical_index_number
*
* @param physicalIndexNumber the value for tax_document.physical_index_number
*
* @mbg.generated
*/
public void setPhysicalIndexNumber(String physicalIndexNumber) {
this.physicalIndexNumber = physicalIndexNumber == null ? null : physicalIndexNumber.trim();
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.remark * This method returns the value of the database column tax_document.remark
...@@ -851,30 +867,6 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -851,30 +867,6 @@ public class TaxDocument extends BaseEntity implements Serializable {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.file_original_name
*
* @return the value of tax_document.file_original_name
*
* @mbg.generated
*/
public String getFileOriginalName() {
return fileOriginalName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.file_original_name
*
* @param fileOriginalName the value for tax_document.file_original_name
*
* @mbg.generated
*/
public void setFileOriginalName(String fileOriginalName) {
this.fileOriginalName = fileOriginalName == null ? null : fileOriginalName.trim();
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.file_position_url * This method returns the value of the database column tax_document.file_position_url
...@@ -923,78 +915,6 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -923,78 +915,6 @@ public class TaxDocument extends BaseEntity implements Serializable {
this.yearRedundancy = yearRedundancy; this.yearRedundancy = yearRedundancy;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.audit_status
*
* @return the value of tax_document.audit_status
*
* @mbg.generated
*/
public Integer getAuditStatus() {
return auditStatus;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.audit_status
*
* @param auditStatus the value for tax_document.audit_status
*
* @mbg.generated
*/
public void setAuditStatus(Integer auditStatus) {
this.auditStatus = auditStatus;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.enable
*
* @return the value of tax_document.enable
*
* @mbg.generated
*/
public String getEnable() {
return enable;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.enable
*
* @param enable the value for tax_document.enable
*
* @mbg.generated
*/
public void setEnable(String enable) {
this.enable = enable == null ? null : enable.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tax_document.file_upload_id
*
* @return the value of tax_document.file_upload_id
*
* @mbg.generated
*/
public String getFileUploadId() {
return fileUploadId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tax_document.file_upload_id
*
* @param fileUploadId the value for tax_document.file_upload_id
*
* @mbg.generated
*/
public void setFileUploadId(String fileUploadId) {
this.fileUploadId = fileUploadId == null ? null : fileUploadId.trim();
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document * This method corresponds to the database table tax_document
...@@ -1004,38 +924,26 @@ public class TaxDocument extends BaseEntity implements Serializable { ...@@ -1004,38 +924,26 @@ public class TaxDocument extends BaseEntity implements Serializable {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()); sb.append("序号=").append(id);
sb.append(" ["); sb.append("档案属性=").append(fileAttr);
sb.append("Hash = ").append(hashCode()); sb.append("档案类型=").append(fileType);
sb.append(", id=").append(id); sb.append("文件名称=").append(fileName);
sb.append(", fileAttr=").append(fileAttr); sb.append("业务线=").append(businessLine);
sb.append(", fileTypeId=").append(fileTypeId); sb.append("公司名称=").append(companyName);
sb.append(", fileType=").append(fileType); sb.append("税种=").append(taxType);
sb.append(", fileName=").append(fileName); sb.append("文件生效日期=").append(fileTime==null?null:fileTime.toLocaleString());
sb.append(", businessLine=").append(businessLine); sb.append("到期日=").append(effectiveTime==null?null:effectiveTime.toLocaleString() );
sb.append(", companyId=").append(companyId); sb.append("所属期间=").append(ownTime );
sb.append(", companyName=").append(companyName); sb.append("创建人=").append(creator );
sb.append(", taxType=").append(taxType); sb.append("创建时间=").append(createTime==null?null:createTime.toLocaleString());
sb.append(", ownTime=").append(ownTime); sb.append("更新时间=").append(updateTime==null?null:updateTime.toLocaleString());
sb.append(", fileTime=").append(fileTime); sb.append("上传时间=").append(uploadTime==null?null:uploadTime.toLocaleString());
sb.append(", effectiveTime=").append(effectiveTime); sb.append("实物存放地点=").append(storageArea );
sb.append(", creatorId=").append(creatorId); sb.append("保管人=").append(keeper );
sb.append(", creator=").append(creator); sb.append("实物索引号=").append(physicalIndexNumber );
sb.append(", createTime=").append(createTime); sb.append("备注=").append(remark );
sb.append(", updateTime=").append(updateTime); sb.append("审批状态=").append(null==auditStatus?null:auditStatus==0?"未审核":auditStatus==1?"审核通过":"审核不通过");
sb.append(", uploadTime=").append(uploadTime); sb.append("是否可用=").append("T".equals(enable)?"启用":"未启用");
sb.append(", storageArea=").append(storageArea);
sb.append(", keeperId=").append(keeperId);
sb.append(", keeper=").append(keeper);
sb.append(", physicalIndexNumber=").append(physicalIndexNumber);
sb.append(", remark=").append(remark);
sb.append(", fileOriginalName=").append(fileOriginalName);
sb.append(", filePositionUrl=").append(filePositionUrl);
sb.append(", yearRedundancy=").append(yearRedundancy);
sb.append(", auditStatus=").append(auditStatus);
sb.append(", enable=").append(enable);
sb.append(", fileUploadId=").append(fileUploadId);
sb.append("]");
return sb.toString(); return sb.toString();
} }
} }
\ No newline at end of file
...@@ -387,3 +387,126 @@ ...@@ -387,3 +387,126 @@
})(); })();
}]); }]);
infrastructureModule.directive('exportPlugin',function(){
return{
restrict:"EA",
controller:['$scope','SweetAlert','$translate','docManageService','$q','$log',
function($scope,SweetAlert,$translate,docManageService,$q,$log){
$scope.exportTableData = function ()
{
docManageService.exportTableData().then(function (data, status, headers) {
if(status===204){
SweetAlert.warning("没有数据可以下载");
return;
}
exportToExcel(data, 'docType.xls');
},function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
})
};
//下载服务器上的xls文件
var exportToExcel = function (data, filename) {
$('#busy-indicator-container').show();
var defer = $q.defer();
// var octetStreamMime = 'application/vnd.ms-excel';
var success = false;
// Get the headers
// headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
// var filename = decodeURI(headers['x-file-name']) + defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
// var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
//console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: "arraybuffer" });
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;
if (saveBlob === undefined) throw "Not supported";
saveBlob(blob, filename);
}
//console.log("saveBlob succeeded");
success = true;
} catch (ex) {
$log.debug("saveBlob method failed with the following exception:");
$log.debug(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
//console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], { type: "arraybuffer" });
var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
//console.log("Download link method with simulated click succeeded");
success = true;
} catch (ex) {
$log.debug("Download link method with simulated click failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], { type: "arraybuffer" });
var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess;
//console.log("Download link method with window.location succeeded");
success = true;
} catch (ex) {
//console.log("Download link method with window.location failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
}
}
if (!success) {
// Fallback to window.open method
$log.debug("No methods worked for saving the arraybuffer, using last resort window.open");
window.open(httpPath, '_blank', '');
}
//Delete the file
// deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
};
}]
}
});
\ No newline at end of file
 
<div class="land-manage-page"> <div class="land-manage-page" export-plugin>
<style> <style>
.DM-state-label{ .DM-state-label{
margin: 0; margin: 0;
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
display: none; display: none;
} }
.required-tip{
color: red;
position: absolute;
left: 2rem;
top: 0.7rem;
}
</style> </style>
<div class="menu-header"> <div class="menu-header">
<div class="menu-title" translate="DocumentTypeSets"></div> <div class="menu-title" translate="DocumentTypeSets"></div>
...@@ -22,7 +28,7 @@ ...@@ -22,7 +28,7 @@
</div> </div>
<div class="content-container"> <div class="content-container">
<div class="row" style="margin-top:15px; text-align:right;padding:1rem;background: #fff"> <div class="row" style="margin-top:15px; text-align:right;padding:1rem;background: #fff">
<button style="width: 150px;" class="btn btn-in-panel-big" ng-click="exportEventTrigger()"> <button style="width: 150px;" class="btn btn-in-panel-big" ng-click="exportTableData()">
<i class="fa fa-file-excel-o"></i> <i class="fa fa-file-excel-o"></i>
{{'ExportTable' | translate}} {{'ExportTable' | translate}}
</button> </button>
...@@ -68,7 +74,7 @@ ...@@ -68,7 +74,7 @@
<!--档案属性--> <!--档案属性-->
<div class="form-group"> <div class="form-group">
<label for="DocumentAttr" class="col-sm-3 control-label"> <label for="DocumentAttr" class="col-sm-3 control-label">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
<span translate="DocumentAttr"></span> <span translate="DocumentAttr"></span>
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -86,7 +92,7 @@ ...@@ -86,7 +92,7 @@
<div class="form-group"> <div class="form-group">
<label for="DocumentType" class="col-sm-3 control-label"> <label for="DocumentType" class="col-sm-3 control-label">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
<span translate="DocumentType"></span> <span translate="DocumentType"></span>
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -116,7 +122,7 @@ ...@@ -116,7 +122,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
<span translate="RequiredFields"></span> <span translate="RequiredFields"></span>
</label> </label>
<div class="col-sm-11" style="width:61.67%" id="appMultiSelectContainer"> <div class="col-sm-11" style="width:61.67%" id="appMultiSelectContainer">
......
...@@ -15,6 +15,24 @@ function ($http, $q, apiConfig, apiInterceptor,jqFetch) { ...@@ -15,6 +15,24 @@ function ($http, $q, apiConfig, apiInterceptor,jqFetch) {
editFileType: function (params) { editFileType: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/edit', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/edit', params);
}, },
exportTableData:function(params){
$('#busy-indicator-container').show();
var defer = $q.defer();
var xhr = new XMLHttpRequest();
xhr.onload = function(e) {
var arraybuffer = xhr.response;
console.info("arraybuffer:",arraybuffer);
defer.resolve(arraybuffer,xhr.status,xhr.getAllResponseHeaders());
};
xhr.open("POST", apiInterceptor.webApiHostUrl + '/fileTypes/exportExcel', true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType = "arraybuffer";
xhr.send(JSON.stringify(params));
return defer.promise;
},
}; };
}]); }]);
...@@ -70,16 +70,16 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -70,16 +70,16 @@ frameworkModule.controller('appUsrOperateLogController',
descendingText: "Sort Descending", descendingText: "Sort Descending",
mode: "single" mode: "single"
}, },
'export': { // 'export': {
allowExportSelectedData: false,//允许选择导出 // allowExportSelectedData: false,//允许选择导出
customizeExcelCell: null, // customizeExcelCell: null,
enabled: true,//允许导出 // enabled: true,//允许导出
excelFilterEnabled: false, // excelFilterEnabled: false,
excelWrapTextEnabled: false, // excelWrapTextEnabled: false,
fileName: "usrlog",//名字 // fileName: "usrlog",//名字
ignoreExcelErrors: true, // ignoreExcelErrors: true,
//
}, // },
showRowLines: true, showRowLines: true,
columnAutoWidth: true, columnAutoWidth: true,
allowColumnReordering: true, allowColumnReordering: true,
...@@ -166,3 +166,124 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -166,3 +166,124 @@ frameworkModule.controller('appUsrOperateLogController',
}]); }]);
frameworkModule.directive('usrLogExportPlugin',function(){
return{
restrict:"EA",
controller:['$scope','SweetAlert','$translate','usrOperateLogService','$q','$log',
function($scope,SweetAlert,$translate,usrOperateLogService,$q,$log){
$scope.exportTableData = function ()
{
usrOperateLogService[$scope.thisModuleName + "Export"]().then(function (data, status, headers) {
if(status===204){
SweetAlert.warning("没有数据可以下载");
return;
}
exportToExcel(data, $scope.thisModuleName + '.xls');
},function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
})
};
//下载服务器上的xls文件
var exportToExcel = function (data, filename) {
var defer = $q.defer();
// var octetStreamMime = 'application/vnd.ms-excel';
var success = false;
// Get the headers
// headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
// var filename = decodeURI(headers['x-file-name']) + defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
// var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
//console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: "arraybuffer" });
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;
if (saveBlob === undefined) throw "Not supported";
saveBlob(blob, filename);
}
//console.log("saveBlob succeeded");
success = true;
} catch (ex) {
$log.debug("saveBlob method failed with the following exception:");
$log.debug(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
//console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], { type: "arraybuffer" });
var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
//console.log("Download link method with simulated click succeeded");
success = true;
} catch (ex) {
$log.debug("Download link method with simulated click failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], { type: "arraybuffer" });
var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess;
//console.log("Download link method with window.location succeeded");
success = true;
} catch (ex) {
//console.log("Download link method with window.location failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
}
}
if (!success) {
// Fallback to window.open method
$log.debug("No methods worked for saving the arraybuffer, using last resort window.open");
window.open(httpPath, '_blank', '');
}
//Delete the file
// deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
};
}]
}
});
\ No newline at end of file
<div class="operate-log-wrapper"> <div class="operate-log-wrapper" usr-log-export-plugin>
<style>
.log-export-btn{
position: absolute;
right: 550px;
z-index: 2;
top: 1.3rem;
background: #fff;
}
.log-export-btn:hover{
background: #E6E6E6;
}
</style>
<button class="btn btn-not-important" ng-click="openUsrOperateLogPop()"><i class="material-icons">description</i><span translate="log">日志</span></button> <button class="btn btn-not-important" ng-click="openUsrOperateLogPop()"><i class="material-icons">description</i><span translate="log">日志</span></button>
<script type="text/html" id="usrOperateLogPopContainer"> <script type="text/html" id="usrOperateLogPopContainer">
<div class="modal fade" id="usrOperateLogPop" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false"> <div class="modal fade" id="usrOperateLogPop" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
...@@ -19,6 +31,11 @@ ...@@ -19,6 +31,11 @@
<!--<div ui-grid="operateLogGridOptions" ui-grid-selection style="width:1140px; height:510px;margin:0px;"></div>--> <!--<div ui-grid="operateLogGridOptions" ui-grid-selection style="width:1140px; height:510px;margin:0px;"></div>-->
<div class="dx-viewport demo-container"> <div class="dx-viewport demo-container">
<button class="btn log-export-btn" ng-click="exportTableData()">
<i class="fa fa-file-excel-o"></i>
<span translate="ExportTable"></span>
</button>
<div dx-data-grid="dataGridOptions"></div> <div dx-data-grid="dataGridOptions"></div>
</div> </div>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Created by Administrator on 2019/2/28 0028. * Created by Administrator on 2019/2/28 0028.
*/ */
frameworkModule.factory('usrOperateLogService', frameworkModule.factory('usrOperateLogService',
['$q', 'apiConfig', 'jqFetch','apiInterceptor', ['$q', 'apiConfig', 'jqFetch','apiInterceptor',
function ($q, apiConfig, jqFetch,apiInterceptor) { function ($q, apiConfig, jqFetch,apiInterceptor) {
'use strict'; 'use strict';
return { return {
docManageTypeLog: function (params) { docManageTypeLog: function (params) {
...@@ -11,6 +11,38 @@ function ($q, apiConfig, jqFetch,apiInterceptor) { ...@@ -11,6 +11,38 @@ function ($q, apiConfig, jqFetch,apiInterceptor) {
}, },
docManageListLog: function (params) { docManageListLog: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/selectListForLog', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/selectListForLog', params);
},
docManageListLogExport:function(){
$('#busy-indicator-container').show();
return exportFn(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/exportExcel');
},
docManageTypeLogExport:function(){
$('#busy-indicator-container').show();
return exportFn(apiInterceptor.webApiHostUrl + '/operLogFileTypes/exportExcel');
// http://etms.longi-silicon.com:8180//api/v1/operLogFileTypes/exportExcel
} }
}; };
}]);
\ No newline at end of file function exportFn(url) {
var defer = $q.defer();
var xhr = new XMLHttpRequest();
xhr.onload = function(e) {
var arraybuffer = xhr.response;
console.info("arraybuffer:",arraybuffer);
defer.resolve(arraybuffer,xhr.status,xhr.getAllResponseHeaders());
};
xhr.open("POST", url, true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType = "arraybuffer";
xhr.send();
return defer.promise;
}
}]);
\ No newline at end of file
...@@ -60,16 +60,16 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -60,16 +60,16 @@ taxDocumentManageModule.controller('taxDocumentListController',
descendingText: "Sort Descending", descendingText: "Sort Descending",
mode: "single" mode: "single"
}, },
'export': { // 'export': {
allowExportSelectedData: false,//允许选择导出 // allowExportSelectedData: false,//允许选择导出
customizeExcelCell: null, // customizeExcelCell: null,
enabled: true,//允许导出 // enabled: true,//允许导出
excelFilterEnabled: false, // excelFilterEnabled: false,
excelWrapTextEnabled: false, // excelWrapTextEnabled: false,
fileName: "taxDocList",//名字 // fileName: "taxDocList",//名字
ignoreExcelErrors: true, // ignoreExcelErrors: true,
//
}, // },
showRowLines: true, showRowLines: true,
columnAutoWidth: true, columnAutoWidth: true,
allowColumnReordering: true, allowColumnReordering: true,
...@@ -1525,8 +1525,8 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -1525,8 +1525,8 @@ taxDocumentManageModule.directive('tempModule', function () {
return result; return result;
} }
$scope.intToDate = function(src,type){ $scope.intToDate = function(src,type){
if(!src) return "";
src = src + ""; src = src + "";
if(!src) return src;
type = type ? type : "/"; type = type ? type : "/";
var year = src.substr(0,4); var year = src.substr(0,4);
var mon = src.substr(4,2); var mon = src.substr(4,2);
...@@ -1540,10 +1540,10 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -1540,10 +1540,10 @@ taxDocumentManageModule.directive('tempModule', function () {
taxDocumentManageModule.directive('downLoadModule', function () { taxDocumentManageModule.directive('downLoadModule', function () {
return { return {
restrict: 'EA', restrict: 'EA',
controller: ['$scope', 'taxDocumentListService', '$translate', controller: ['$scope', 'taxDocumentListService', '$translate','SweetAlert',
function ($scope, taxDocumentListService, $translate) { function ($scope, taxDocumentListService, $translate,SweetAlert) {
$scope.downloadAttachment = function () { /* $scope.downloadAttachment = function () {
var checkedIDs = [ var checkedIDs = [
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=', // 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=', // 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
...@@ -1559,6 +1559,36 @@ taxDocumentManageModule.directive('downLoadModule', function () { ...@@ -1559,6 +1559,36 @@ taxDocumentManageModule.directive('downLoadModule', function () {
taxDocumentListService.downloadAllFile({ taxDocumentListService.downloadAllFile({
"ids":checkedIDs "ids":checkedIDs
}); });
};*/
$scope.downloadAttachment = function () {
var checkedURLs = [
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
];
$("input[name='dataGridCheckBox']").each(function (index, item) {
if (item.checked) {
var cellUrl = $(item).attr("data-url");
checkedURLs.push(cellUrl);
}
});
if (!checkedURLs.length) return SweetAlert.warning($translate.instant("NeedChecked"));
var triggerDelay = 100;
var removeDelay = 1000;
checkedURLs.forEach(function (item, index) {
if(item)_createIFrame(item, index * triggerDelay, removeDelay);
});
function _createIFrame(url, _triggerDelay, _removeDelay) {
setTimeout(function () {
var frame = $('<iframe style="display: none;" class="multi-download"></iframe>');
frame.attr('src', url);
document.body.appendChild(frame[0]);
setTimeout(function () {
frame.remove();
}, _removeDelay);
}, _triggerDelay);
}
}; };
}] }]
} }
...@@ -1566,46 +1596,67 @@ taxDocumentManageModule.directive('downLoadModule', function () { ...@@ -1566,46 +1596,67 @@ taxDocumentManageModule.directive('downLoadModule', function () {
taxDocumentManageModule.directive('exportPlugin',function(){ taxDocumentManageModule.directive('exportPlugin',function(){
return{ return{
restrict:"EA", restrict:"EA",
controller:['$scope','SweetAlert','$translate',function($scope,SweetAlert,$translate){ controller:['$scope','SweetAlert','$translate','taxDocumentListService','$q','$log',
$scope.exportOrgList = function () function($scope,SweetAlert,$translate,taxDocumentListService,$q,$log){
$scope.exportTableData = function ()
{ {
var exportData = { $scope.queryFieldModel.currentPage = $scope.pagingOptions.pageIndex;
"type" : "orgList", $scope.queryFieldModel.pageSize = $scope.pagingOptions.pageSize;
"jsonData" : JSON.stringify($scope.DataGridSource)
}; var params = angular.copy($scope.queryFieldModel);
orgService.downloadOrgListData(exportData).success(function (data, status, headers) { params.fileBeginTime = getQueryDate(params.fileBeginTime,"-");
params.fileEndTTime = getQueryDate(params.fileEndTTime,"-");
params.ownBeginTime = getQueryDate(params.ownBeginTime,"-");
params.ownEndTime = getQueryDate(params.ownEndTime,"-");
params.effectiveBeginTime = getQueryDate(params.effectiveBeginTime,"-");
params.effectiveEndTime = getQueryDate(params.effectiveEndTime,"-");
params.uploadBeginTime = getQueryDate(params.uploadBeginTime,"-");
params.uploadEndTime = getQueryDate(params.uploadEndTime,"-");
function getQueryDate(time, mark) {
if (!time) return "";
var theDate = new Date(time);
var year = theDate.getFullYear();
var mm = theDate.getMonth() + 1;
var dd = theDate.getDate();
mm = (mm + "").length < 2 ? "0" + mm : mm;
dd = (dd + "").length < 2 ? "0" + dd : dd;
return year + mark + mm + mark + dd;
}
taxDocumentListService.exportTableData(params).then(function (data, status, headers) {
if(status===204){ if(status===204){
SweetAlert.warning("没有数据可以下载"); SweetAlert.warning("没有数据可以下载");
return; return;
} }
exportToExcel(data, status, headers, 'taxDocument.xls'); exportToExcel(data, 'taxDocument.xls');
}).error(function () { },function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator')); SweetAlert.error($translate.instant('PleaseContactAdministrator'));
}); })/*.error(function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
});*/
}; };
//下载服务器上的xls文件 //下载服务器上的xls文件
var exportToExcel = function (data, status, headers, defaultFileName) { var exportToExcel = function (data, filename) {
$('#busy-indicator-container').show(); $('#busy-indicator-container').show();
var defer = $q.defer(); var defer = $q.defer();
var octetStreamMime = 'application/vnd.ms-excel'; // var octetStreamMime = 'application/vnd.ms-excel';
var success = false; var success = false;
// Get the headers // Get the headers
headers = headers(); // headers = headers();
// Get the filename from the x-filename header or default to "download.bin" // Get the filename from the x-filename header or default to "download.bin"
var filename = decodeURI(headers['x-file-name']) + defaultFileName; // var filename = decodeURI(headers['x-file-name']) + defaultFileName;
// Determine the content type from the header or default to "application/octet-stream" // Determine the content type from the header or default to "application/octet-stream"
var contentType = headers['content-type'] || octetStreamMime; // var contentType = headers['content-type'] || octetStreamMime;
try { try {
// Try using msSaveBlob if supported // Try using msSaveBlob if supported
//console.log("Trying saveBlob method ..."); //console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: contentType }); var blob = new Blob([data], { type: "arraybuffer" });
if (navigator.msSaveBlob) if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename); navigator.msSaveBlob(blob, filename);
else { else {
...@@ -1632,7 +1683,7 @@ taxDocumentManageModule.directive('exportPlugin',function(){ ...@@ -1632,7 +1683,7 @@ taxDocumentManageModule.directive('exportPlugin',function(){
try { try {
// Prepare a blob URL // Prepare a blob URL
//console.log("Trying download link method with simulated click ..."); //console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], { type: contentType }); var blobdownload = new Blob([data], { type: "arraybuffer" });
var urldownload = urlCreator.createObjectURL(blobdownload); var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload); link.setAttribute('href', urldownload);
...@@ -1659,7 +1710,7 @@ taxDocumentManageModule.directive('exportPlugin',function(){ ...@@ -1659,7 +1710,7 @@ taxDocumentManageModule.directive('exportPlugin',function(){
// Prepare a blob URL // Prepare a blob URL
// Use application/octet-stream when using window.location to force download // Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ..."); //console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], { type: octetStreamMime }); var blobsuccess = new Blob([data], { type: "arraybuffer" });
var urlsuccess = urlCreator.createObjectURL(blobsuccess); var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess; window.location = urlsuccess;
//console.log("Download link method with window.location succeeded"); //console.log("Download link method with window.location succeeded");
......
<div class="land-manage-page" watch-group temp-module down-load-module> <div class="land-manage-page" watch-group temp-module down-load-module export-plugin>
<style> <style>
ul { ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
.edit-panel-left-part{
padding-left:0;
padding-right:0;
}
.required-tip{
color: red;
}
.TDL-header { .TDL-header {
padding: 1rem; padding: 1rem;
...@@ -139,10 +147,9 @@ ...@@ -139,10 +147,9 @@
} }
.TDL-content-container .DTL-content-head-bar { .TDL-content-container .DTL-content-head-bar {
position: absolute;
z-index: 2; z-index: 2;
right: 11rem; padding-right: 1rem;
top: 1rem; margin-bottom: 1rem;
} }
.TDL-content-container .DTL-content-head-bar button { .TDL-content-container .DTL-content-head-bar button {
...@@ -177,7 +184,7 @@ ...@@ -177,7 +184,7 @@
color: inherit; color: inherit;
} }
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button { /* .dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button {
border: 0; border: 0;
} }
...@@ -193,7 +200,7 @@ ...@@ -193,7 +200,7 @@
position: relative; position: relative;
top: 0; top: 0;
left: 0; left: 0;
} }*/
.DTL-special-external-btn { .DTL-special-external-btn {
width: 34px; width: 34px;
...@@ -583,12 +590,14 @@ ...@@ -583,12 +590,14 @@
<div class="content-container TDL-content-container"> <div class="content-container TDL-content-container">
<div class="DTL-content-head-bar"> <div class="DTL-content-head-bar">
<app-usr-operate-log style="float:right" <app-usr-operate-log style="float:right"
this-module-name="docManageListLog" this-module-name="docManageListLog"
this-module-id="checkedItemIds" this-module-id="checkedItemIds"
></app-usr-operate-log> ></app-usr-operate-log>
<div style="text-align: right;">
<button class="btn DTL-create-record" ng-click="openMultiUploadPop()"> <button class="btn DTL-create-record" ng-click="openMultiUploadPop()">
<i class="fa fa-plus-square"></i> <i class="fa fa-tasks"></i>
<span translate="MultiUpload"></span> <span translate="MultiUpload"></span>
</button> </button>
<button class="btn DTL-create-record" ng-click="openSimpleUploadPop()"> <button class="btn DTL-create-record" ng-click="openSimpleUploadPop()">
...@@ -603,6 +612,11 @@ ...@@ -603,6 +612,11 @@
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
<span translate="DownloadAttachment" ng-click="downloadAttachment()"></span> <span translate="DownloadAttachment" ng-click="downloadAttachment()"></span>
</button> </button>
<button class="btn" ng-click="exportTableData()">
<i class="fa fa-file-excel-o"></i>
<span translate="ExportTable"></span>
</button>
</div>
</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">
...@@ -629,8 +643,8 @@ ...@@ -629,8 +643,8 @@
<div class="modal-body"> <div class="modal-body">
<div ng-if="isCreatePop" class="col-sm-6 form-group"> <div ng-if="isCreatePop" class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentPath'|translate}} {{'DocumentPath'|translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -656,8 +670,8 @@ ...@@ -656,8 +670,8 @@
<div style="clear:both"></div> <div style="clear:both"></div>
<!--档案名称--> <!--档案名称-->
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentName' | translate}} {{'DocumentName' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -668,8 +682,8 @@ ...@@ -668,8 +682,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentAttr' | translate}} {{'DocumentAttr' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%" id="fileAttrOptions"> <div class="col-sm-11" style="width:61.67%" id="fileAttrOptions">
...@@ -691,8 +705,8 @@ ...@@ -691,8 +705,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'CorporationName' | translate}} {{'CorporationName' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%" id="companyNameOptionsMap"> <div class="col-sm-11" style="width:61.67%" id="companyNameOptionsMap">
...@@ -708,8 +722,8 @@ ...@@ -708,8 +722,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentType' | translate}} {{'DocumentType' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -726,8 +740,8 @@ ...@@ -726,8 +740,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('TaxType')"> * </span> <span class="required-tip" ng-if="isRequired('TaxType')"> * </span>
{{'TaxType' | translate}} {{'TaxType' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -748,8 +762,8 @@ ...@@ -748,8 +762,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'Duration' | translate}} {{'Duration' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -760,8 +774,8 @@ ...@@ -760,8 +774,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('AvailabilityDate')"> * </span> <span class="required-tip" ng-if="isRequired('AvailabilityDate')"> * </span>
{{'AvailabilityDate' | translate}} {{'AvailabilityDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -772,8 +786,8 @@ ...@@ -772,8 +786,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('DueDate')"> * </span> <span class="required-tip" ng-if="isRequired('DueDate')"> * </span>
{{'DueDate' | translate}} {{'DueDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -784,8 +798,8 @@ ...@@ -784,8 +798,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityStorageLocation')"> * </span> <span class="required-tip" ng-if="isRequired('EntityStorageLocation')"> * </span>
{{'EntityStorageLocation' | translate}} {{'EntityStorageLocation' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -803,8 +817,8 @@ ...@@ -803,8 +817,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityCustodian')"> * </span> <span class="required-tip" ng-if="isRequired('EntityCustodian')"> * </span>
{{'EntityCustodian' | translate}} {{'EntityCustodian' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -816,8 +830,8 @@ ...@@ -816,8 +830,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityIndex')"> * </span> <span class="required-tip" ng-if="isRequired('EntityIndex')"> * </span>
{{'EntityIndex' | translate}} {{'EntityIndex' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -830,8 +844,8 @@ ...@@ -830,8 +844,8 @@
</div> </div>
</div> </div>
<div class="form-group" style="width:100%;float:left;"> <div class="form-group" style="width:100%;float:left;">
<label class="col-sm-3 control-label" style="width:12.5%"> <label class="col-sm-3 control-label edit-panel-left-part" style="width:12.5%">
<span style="color:red" ng-if="isRequired('Remarks')"> * </span> <span class="required-tip" ng-if="isRequired('Remarks')"> * </span>
{{'Remarks' | translate}}</label></label> {{'Remarks' | translate}}</label></label>
<div class="col-sm-11" style="width:87.5%"> <div class="col-sm-11" style="width:87.5%">
<textarea class="form-control" <textarea class="form-control"
...@@ -878,8 +892,8 @@ ...@@ -878,8 +892,8 @@
<ul> <ul>
<li ng-repeat="editFieldItem in editFieldModel_multi" ng-show="editFieldItem.iShow"> <li ng-repeat="editFieldItem in editFieldModel_multi" ng-show="editFieldItem.iShow">
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentPath'|translate}} {{'DocumentPath'|translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -900,8 +914,8 @@ ...@@ -900,8 +914,8 @@
<div style="clear:both"></div> <div style="clear:both"></div>
<!--档案名称--> <!--档案名称-->
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentName' | translate}} {{'DocumentName' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -912,8 +926,8 @@ ...@@ -912,8 +926,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentAttr' | translate}} {{'DocumentAttr' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -934,8 +948,8 @@ ...@@ -934,8 +948,8 @@
</div>--> </div>-->
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'CorporationName' | translate}} {{'CorporationName' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -952,8 +966,8 @@ ...@@ -952,8 +966,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'DocumentType' | translate}} {{'DocumentType' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -970,8 +984,8 @@ ...@@ -970,8 +984,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('TaxType')"> * </span> <span class="required-tip" ng-if="isRequired('TaxType')"> * </span>
{{'TaxType' | translate}} {{'TaxType' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -987,8 +1001,8 @@ ...@@ -987,8 +1001,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red"> * </span> <span class="required-tip"> * </span>
{{'Duration' | translate}} {{'Duration' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -999,8 +1013,8 @@ ...@@ -999,8 +1013,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('AvailabilityDate')"> * </span> <span class="required-tip" ng-if="isRequired('AvailabilityDate')"> * </span>
{{'AvailabilityDate' | translate}} {{'AvailabilityDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -1011,8 +1025,8 @@ ...@@ -1011,8 +1025,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('DueDate')"> * </span> <span class="required-tip" ng-if="isRequired('DueDate')"> * </span>
{{'DueDate' | translate}} {{'DueDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -1023,8 +1037,8 @@ ...@@ -1023,8 +1037,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityStorageLocation')"> * </span> <span class="required-tip" ng-if="isRequired('EntityStorageLocation')"> * </span>
{{'EntityStorageLocation' | translate}} {{'EntityStorageLocation' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -1044,8 +1058,8 @@ ...@@ -1044,8 +1058,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityCustodian')"> * </span> <span class="required-tip" ng-if="isRequired('EntityCustodian')"> * </span>
{{'EntityCustodian' | translate}} {{'EntityCustodian' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -1057,8 +1071,8 @@ ...@@ -1057,8 +1071,8 @@
</div> </div>
</div> </div>
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label edit-panel-left-part">
<span style="color:red" ng-if="isRequired('EntityIndex')"> * </span> <span class="required-tip" ng-if="isRequired('EntityIndex')"> * </span>
{{'EntityIndex' | translate}} {{'EntityIndex' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
...@@ -1071,8 +1085,8 @@ ...@@ -1071,8 +1085,8 @@
</div> </div>
</div> </div>
<div class="form-group" style="width:100%;float:left;"> <div class="form-group" style="width:100%;float:left;">
<label class="col-sm-3 control-label" style="width:12.5%"> <label class="col-sm-3 control-label edit-panel-left-part" style="width:12.5%">
<span style="color:red" ng-if="isRequired('Remarks')"> * </span> <span class="required-tip" ng-if="isRequired('Remarks')"> * </span>
{{'Remarks' | translate}} {{'Remarks' | translate}}
</label> </label>
<div class="col-sm-11" style="width:87.5%"> <div class="col-sm-11" style="width:87.5%">
...@@ -1180,6 +1194,7 @@ ...@@ -1180,6 +1194,7 @@
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging()" title="上一页">&lt;</button> <button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging()" title="上一页">&lt;</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging()" title="下一页">&gt;</button> <button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging()" title="下一页">&gt;</button>
</div> </div>
<div class="modal fade" id="imgLayoutDialog" img-preview tabindex="-1" role="dialog" aria-labelledby="myModal" <div class="modal fade" id="imgLayoutDialog" img-preview tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false"> data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;max-width:1028px" role="document"> <div class="modal-dialog" style="width:80%;max-width:1028px" role="document">
......
...@@ -79,8 +79,8 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -79,8 +79,8 @@ taxDocumentManageModule.factory('taxDocumentListService',
return jqFetch.get(apiInterceptor.webApiHostUrl + '/businessunit/getlist', params); return jqFetch.get(apiInterceptor.webApiHostUrl + '/businessunit/getlist', params);
}, },
downloadAllFile:function(params){ downloadAllFile:function(params){
//post请求会自带http://etms.longi-silicon.com:8180//api/v1的前缀路径,get请求不会
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
var fileName = 'files.zip'; // 文件名称
xhr.open('POST', apiInterceptor.webApiHostUrl + "/taxDoc/downloadAllFile", true); xhr.open('POST', apiInterceptor.webApiHostUrl + "/taxDoc/downloadAllFile", true);
xhr.responseType = 'arraybuffer'; xhr.responseType = 'arraybuffer';
// xhr.setRequestHeader(token, 'xxxxx') ;// 请求头中的验证信息等(如果有) // xhr.setRequestHeader(token, 'xxxxx') ;// 请求头中的验证信息等(如果有)
...@@ -88,9 +88,11 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -88,9 +88,11 @@ taxDocumentManageModule.factory('taxDocumentListService',
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()); xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8'); xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.onload = function() { xhr.onload = function() {
if (this.status === 200) { var fileName = 'files.zip'; // 文件名称
// let type = xhr.getResponseHeader('Content-Type'); var headers = xhr.getAllResponseHeaders();
fileName = headers['x-file-name'] ? headers['x-file-name'] : fileName;
if (this.status === 200) {
var blob = new Blob([this.response], {type: "arraybuffer"}); var blob = new Blob([this.response], {type: "arraybuffer"});
if (typeof window.navigator.msSaveBlob !== 'undefined') { if (typeof window.navigator.msSaveBlob !== 'undefined') {
/* /*
...@@ -138,6 +140,25 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -138,6 +140,25 @@ taxDocumentManageModule.factory('taxDocumentListService',
oReq.responseType = "arraybuffer"; oReq.responseType = "arraybuffer";
oReq.send(); oReq.send();
return defer.promise;
},
exportTableData:function(params){
$('#busy-indicator-container').show();
var defer = $q.defer();
var xhr = new XMLHttpRequest();
xhr.onload = function(e) {
var arraybuffer = xhr.response;
console.info("arraybuffer:",arraybuffer);
defer.resolve(arraybuffer,xhr.status,xhr.getAllResponseHeaders());
};
xhr.open("POST", apiInterceptor.webApiHostUrl + '/taxDoc/exportExcel', true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType = "arraybuffer";
xhr.send(JSON.stringify(params));
return defer.promise; return defer.promise;
} }
}; };
......
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