Commit 5d9addb7 authored by kevin's avatar kevin

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 0933ef59 efafdbfd
......@@ -215,9 +215,32 @@ public class EbsApiController {
}
}
/**
* callback服务
* @param callBackDto
* @return
*/
@RequestMapping(value = "/callback", method = RequestMethod.POST)
public ApiResultDto callback(@RequestBody EbsCallBackDto callBackDto) {
logger.info("EBS callback 调用,taskId :{}",callBackDto.getTaskId());
ApiResultDto apiResultDto = new ApiResultDto();
try{
ebsApiService.changeCallBackStatus(callBackDto);
logger.debug("ebs callback taskId:{},status:{} end ",callBackDto.getTaskId(),callBackDto.getTaskStatus());
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS);
return apiResultDto;
}catch(Exception e){
logger.error("ebs callback error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR);
return apiResultDto;
}
}
private void setApiResult(ApiResultDto apiResultDto,EnumErrorCodeMsg error) {
apiResultDto.setCode(error.getCode());
apiResultDto.setMessage(error.getMsg());
}
}
......@@ -25,10 +25,9 @@ import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
......@@ -166,12 +165,30 @@ public class TaxDocumentController {
*/
@PostMapping("/previewExcelToJson")
@ResponseBody
public String previewExcel(String path) {
public String previewExcel(@RequestParam("path") String path) {
try {
JSONArray dataArray = new JSONArray();
URL httpurl=new URL(path);
InputStream is;
HttpURLConnection httpConn=(HttpURLConnection)httpurl.openConnection();
httpConn.setDoOutput(true);// 使用 URL 连接进行输出
httpConn.setDoInput(true);// 使用 URL 连接进行输入
httpConn.setUseCaches(false);// 忽略缓存
httpConn.setRequestMethod("GET");// 设置URL请求方法
//可设置请求头
httpConn.setRequestProperty("Content-Type", "application/octet-stream");
httpConn.setRequestProperty("Connection", "Keep-Alive");// 维持长连接
httpConn.setRequestProperty("Charset", "UTF-8");
httpConn.connect();
if (httpConn.getResponseCode() >= 400 ) {
is = httpConn.getErrorStream();
}
else{
is = httpConn.getInputStream();
}
InputStream inStream =is;
XSSFWorkbook xssfWorkbook = new XSSFWorkbook(new FileInputStream(path));
XSSFWorkbook xssfWorkbook = new XSSFWorkbook(inStream);
// 循环工作表Sheet
for (int numSheet = 0; numSheet < xssfWorkbook.getNumberOfSheets(); numSheet++) {
XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);
......@@ -223,7 +240,7 @@ public class TaxDocumentController {
dataArray.add(sheetJson);
}
return dataArray.toString();
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
return JSONNull.getInstance().toString();
}
......
......@@ -15,7 +15,7 @@ public class TaxDocumentDto {
private String fileAttr;//档案属性
private Integer fileTypeId;//文件类型的id
private Long fileTypeId;//文件类型的id
private String fileType;//档案类型
......@@ -165,11 +165,11 @@ public class TaxDocumentDto {
this.fileAttr = fileAttr;
}
public Integer getFileTypeId() {
public Long getFileTypeId() {
return fileTypeId;
}
public void setFileTypeId(Integer fileTypeId) {
public void setFileTypeId(Long fileTypeId) {
this.fileTypeId = fileTypeId;
}
......
package pwc.taxtech.atms.dto.ebsdto;
public class EbsCallBackDto {
private Long taskId;
private String taskStatus;
private String taskDesc;
public Long getTaskId() {
return taskId;
}
public void setTaskId(Long taskId) {
this.taskId = taskId;
}
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public String getTaskDesc() {
return taskDesc;
}
public void setTaskDesc(String taskDesc) {
this.taskDesc = taskDesc;
}
}
......@@ -68,4 +68,10 @@ public interface EbsApiService {
* @param items
*/
void queryRemoteServerThenUpdateOrg(Long id, List<OrganizationQueryDto> items);
/**
* ebs最后调用更新状态
* @param ebsCallBackDto
*/
void changeCallBackStatus(EbsCallBackDto ebsCallBackDto);
}
......@@ -183,12 +183,11 @@ public class CitReportServiceImpl extends BaseService {
@Override
public void run() {
try {
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
// TODO 进行数据校验
DataValidation(periodParam, projectId, genJob);
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
PeriodResources resources = reportGenerator.getPeriodResources(projectId, periodParam,
templates.stream().map(Template::getId).collect(Collectors.toList()));
......
......@@ -82,7 +82,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestJEItems 日记账表条目:" + JSON.toJSONString(items));
for (JournalEntryQueryDto a : items) {
try {
processJE(a);
processJE(id,a);
} catch (Exception e) {
logger.error("break loop as catch:" + e, e);
}
......@@ -238,8 +238,9 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("end queryRemoteServerThenUpdateOAR 汇率表,took [{}] ms", System.currentTimeMillis() - start);
}
private void processJE(JournalEntryQueryDto item) {
private void processJE(Long id,JournalEntryQueryDto item) {
JournalEntryExample journalEntryExample = new JournalEntryExample();
item.setTaskId(String.valueOf(id));
//日记账头ID和日记账行号
journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum()).andTaskIdNotEqualTo(item.getTaskId());
List<JournalEntry> journalEntryList = journalEntryMapper.selectByExample(journalEntryExample);
......@@ -264,6 +265,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processTB(Long id,TrialBalanceQueryDto item) {
TrialBalanceExample example = new TrialBalanceExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andSegment1EqualTo(item.getSegment1()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<TrialBalance> itemList = trialBalanceMapper.selectByExample(example);
......@@ -283,6 +285,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processCF(Long id,CashFlowQueryDto item) {
CashFlowExample example = new CashFlowExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<CashFlow> itemList = cashFlowMapper.selectByExample(example);
......@@ -303,6 +306,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processBS(Long id,BalanceSheetQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example);
......@@ -331,6 +335,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processBSprc(Long id,BalanceSheetPrcQueryDto item) {
BalanceSheetPrcExample example = new BalanceSheetPrcExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<BalanceSheetPrc> itemList = balanceSheetPrcMapper.selectByExample(example);
......@@ -358,6 +363,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processPL(Long id,ProfitLossStatementQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example);
......@@ -385,6 +391,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processPLprc(Long id,ProfitLossStatementPrcQueryDto item) {
ProfitLossStatementPrcExample example = new ProfitLossStatementPrcExample();
item.setTaskId(String.valueOf(id));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<ProfitLossStatementPrc> itemList = profitLossStatementPrcMapper.selectByExample(example);
......@@ -412,6 +419,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processOAR(Long id,OrganizationAccountingRateQueryDto item) {
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
item.setTaskId(String.valueOf(id));
//期间
example.createCriteria().andPeriodEqualTo(convertPeriod12(item.getPeriod())).andTaskIdNotEqualTo(item.getTaskId());
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
......@@ -783,6 +791,19 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("end queryRemoteServerThenUpdateOrg 机构表,took [{}] ms", System.currentTimeMillis() - start);
}
@Override
public void changeCallBackStatus(EbsCallBackDto ebsCallBackDto) {
DataImportLog dataImportLog = new DataImportLog();
dataImportLog.setId(ebsCallBackDto.getTaskId());
dataImportLog.setImportResult(ebsCallBackDto.getTaskStatus().equals("S")?true:false);
dataImportLog.setErrorMsg(ebsCallBackDto.getTaskDesc());
dataImportLog.setUpdateTime(new Date());
int res = dataImportLogMapper.updateByPrimaryKeySelective(dataImportLog);
if (res < 0) {
logger.warn(String.format("warn callBack end [%s]", ebsCallBackDto.getTaskId()));
}
}
private void processORG(OrganizationQueryDto a) {
// 机构信息
OrganizationExample organizationExample = new OrganizationExample();
......@@ -833,8 +854,6 @@ public class EbsApiServiceImpl implements EbsApiService {
organizationEmployeeMapper.insertSelective(oe);
}
private void updateDataImportLog(Long id, int size) {
DataImportLog dataImportLog = new DataImportLog();
dataImportLog.setId(id);
......
......@@ -14,7 +14,6 @@ import pwc.taxtech.atms.entity.OperationLogFileType;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* 查询
......@@ -54,10 +53,11 @@ public class FileTypesServiceImpl {
fileTypes.setCreateTime(new Date());
fileTypes.setCreator(authUserHelper.getCurrentAuditor().get());
fileTypes.setCreatorId(authUserHelper.getCurrentUserId());
int num = fileTypesMapper.insert(fileTypes);
if (num > 0) {
Long id = fileTypesMapper.insert(fileTypes);
if (id > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("新增");
actionEntity.setId(id.toString());
actionEntity.setUpdateState(fileTypes.toString());
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
......@@ -81,6 +81,7 @@ public class FileTypesServiceImpl {
if (num > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("删除");
actionEntity.setId(id.toString());
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
return true;
......@@ -106,8 +107,8 @@ public class FileTypesServiceImpl {
if (num > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("更新");
actionEntity.setId(fileTypes.getId().toString());
//设置更新值
actionEntity.setOriginalState(fileTypesMapper.selectByPrimaryKey(fileTypes.getId()).toString());
actionEntity.setUpdateState(fileTypes.toString());
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
......@@ -131,7 +132,6 @@ public class FileTypesServiceImpl {
*/
private OperationLogFileType buildOperationLogFileType() {
OperationLogFileType actionEntity = new OperationLogFileType();
actionEntity.setId("FileType:"+UUID.randomUUID().toString());
actionEntity.setOperationContent("系统管理");
actionEntity.setModuleName("档案管理");
actionEntity.setOperationObject("税务档案类型设置");
......
......@@ -123,11 +123,13 @@ public class ReportFileUploadService extends BaseService {
}
if (StringUtils.isBlank(data.getProjectId()) && StringUtils.isNotBlank(data.getOrgId()) && data.getPeriod() != null) {
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andOrganizationIdEqualTo(data.getOrgId()).andYearEqualTo(data.getPeriod()/100);
String year = String.valueOf(data.getPeriod()).substring(0,4);
projectExample.createCriteria().andOrganizationIdEqualTo(data.getOrgId()).andYearEqualTo(Integer.valueOf(year));
List<Project> projects = projectMapper.selectByExample(projectExample);
if(CollectionUtils.isNotEmpty(projects)){
data.setProjectId(projects.get(0).getId());
}else{
return;
}
}else {
......
......@@ -152,21 +152,24 @@ public class TaxDocumentServiceImpl {
ReportFileUpload reportFileUpload = new ReportFileUpload();
reportFileUpload.setOrgId(taxDocument.getCompanyId());
reportFileUpload.setSourceType(ReportFileUploadEnum.SuorceType.RECORD.name());
reportFileUpload.setPeriod(taxDocument.getOwnTime()/100);
String period = String.valueOf(taxDocument.getOwnTime()).substring(0,6);
reportFileUpload.setPeriod(Integer.valueOf(period));
reportFileUpload.setFileUploadId(fileUpload.getUid());
reportFileUpload.setReportType(taxDocument.getFileType());
// reportFileUploadService.saveData(file,reportFileUpload);
reportFileUploadService.saveData(file,reportFileUpload);
}
}
//设置创建人 创建时间信息 设置年份区分
taxDocument.setCreateTime(new Date());
taxDocument.setUpdateTime(new Date());
taxDocument.setCreator(authUserHelper.getCurrentAuditor().get());
taxDocument.setCreatorId(authUserHelper.getCurrentUserId());
taxDocument.setUploadTime(new Date());
taxDocument.setYearRedundancy(Calendar.getInstance().get(Calendar.YEAR));
int num = taxDocumentMapper.insert(taxDocument);
if (num > 0) {
Long id = taxDocumentMapper.insert(taxDocument);
if (id > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
actionEntity.setId(id.toString());
actionEntity.setOperationAction("新增");
actionEntity.setUpdateState(taxDocument.toString());
boolean result = operationLogTaxDocService.addTaxDocumentList(actionEntity);
......@@ -192,6 +195,7 @@ public class TaxDocumentServiceImpl {
if (num > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
actionEntity.setOperationAction("删除");
actionEntity.setId(id.toString());
boolean result = operationLogTaxDocService.addTaxDocumentList(actionEntity);
if (result) {
return true;
......@@ -220,7 +224,20 @@ public class TaxDocumentServiceImpl {
return false;
}
for (Long id : ids) {
taxDocumentMapper.deleteByPrimaryKey(id);
int num = taxDocumentMapper.deleteByPrimaryKey(id);
if (num > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
actionEntity.setOperationAction("删除");
actionEntity.setId(id.toString());
boolean result = operationLogTaxDocService.addTaxDocumentList(actionEntity);
if (result) {
return true;
} else {
throw new RuntimeException("TaxDocumentServiceImpl batchDeleteTaxDocument log error");
}
} else {
return false;
}
}
return true;
} catch (Exception e) {
......@@ -261,7 +278,6 @@ public class TaxDocumentServiceImpl {
*/
private OperationLogTaxDocument buildOperationLogTaxDocument() {
OperationLogTaxDocument actionEntity = new OperationLogTaxDocument();
actionEntity.setId("TaxDocument:" + UUID.randomUUID().toString());
actionEntity.setOperationContent("主页");
actionEntity.setModuleName("档案管理");
actionEntity.setOperationObject("税务档案");
......
......@@ -361,6 +361,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
Row row = temp.getRow(j);
for(int k = row.getFirstCellNum(); k < row.getLastCellNum(); k++){
Cell cell = row.getCell(k);
if (cell == null) {
continue;//todo cell == null 如何处理
}
cell.setCellType(CellType.STRING);
if(!cell.getCellStyle().getLocked() && "${KeyIn}".equalsIgnoreCase(cell.getStringCellValue())){
cell.setCellValue("");
......
......@@ -223,9 +223,18 @@ public class FormulaAgent {
double rev = 0.00;
/* for (int i = 0, j = stringObjectMap.size(); i < j; i++) {
if (i == 1) {
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev = 0.00;
}else{
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
} else {
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev= rev+ 0.00;
}else{
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
}
}
*/
......
......@@ -513,7 +513,7 @@ public class ReportGeneratorImpl {
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new SUM2(formulaContext),
new SUM(formulaContext), new RSUMIF(formulaContext), new TABLESUMIF(formulaContext)};
new RSUMIF(formulaContext), new TABLESUMIF(formulaContext), new SUM(formulaContext)};
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -41,7 +41,7 @@ public interface FileTypesMapper extends MyMapper {
*
* @mbg.generated
*/
int insert(FileTypes record);
Long insert(FileTypes record);
/**
* This method was generated by MyBatis Generator.
......
......@@ -41,7 +41,7 @@ public interface TaxDocumentMapper extends MyMapper {
*
* @mbg.generated
*/
int insert(TaxDocument record);
Long insert(TaxDocument record);
/**
* This method was generated by MyBatis Generator.
......
......@@ -443,22 +443,16 @@ public class FileTypes implements Serializable {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", fileAttr=").append(fileAttr);
sb.append(", fileTypeId=").append(fileTypeId);
sb.append(", fileType=").append(fileType);
sb.append(", description=").append(description);
sb.append(", creatorId=").append(creatorId);
sb.append(", requiredField=").append(requiredField);
sb.append(", creator=").append(creator);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", remarks=").append(remarks);
sb.append("]");
sb.append("序号=").append(id);
sb.append(", 档案属性=").append(fileAttr);
sb.append(", 档案类型=").append(fileType);
sb.append(", 说明=").append(description);
sb.append(", 必填字段=").append(requiredField);
sb.append(", 创建人=").append(creator);
sb.append(", 创建时间=").append(createTime.toLocaleString());
sb.append(", 更新时间=").append(updateTime.toLocaleString());
sb.append(", 状态=").append("T".equals(status)?"启用":"未启用");
sb.append(", 说明=").append(remarks);
return sb.toString();
}
......
......@@ -141,7 +141,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
private int ownTime;
private Integer ownTime;
/**
*
......@@ -344,11 +344,11 @@ public class TaxDocument implements Serializable {
this.auditStatus = auditStatus;
}
public int getOwnTime() {
public Integer getOwnTime() {
return ownTime;
}
public void setOwnTime(int ownTime) {
public void setOwnTime(Integer ownTime) {
this.ownTime = ownTime;
}
......@@ -904,34 +904,27 @@ public class TaxDocument implements Serializable {
*/
@Override
public String toString() {
return "TaxDocument{" +
"id=" + id +
", fileAttr='" + fileAttr + '\'' +
", fileTypeId=" + fileTypeId +
", fileType='" + fileType + '\'' +
", fileName='" + fileName + '\'' +
", businessLine='" + businessLine + '\'' +
", companyId=" + companyId +
", companyName='" + companyName + '\'' +
", taxType='" + taxType + '\'' +
", fileTime=" + fileTime +
", effectiveTime=" + effectiveTime +
", ownTime=" + ownTime +
", creatorId='" + creatorId + '\'' +
", creator='" + creator + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", uploadTime=" + uploadTime +
", storageArea='" + storageArea + '\'' +
", keeperId='" + keeperId + '\'' +
", keeper='" + keeper + '\'' +
", physicalIndexNumber='" + physicalIndexNumber + '\'' +
", remark='" + remark + '\'' +
", fileOriginalName='" + fileOriginalName + '\'' +
", filePositionUrl='" + filePositionUrl + '\'' +
", yearRedundancy=" + yearRedundancy +
", auditStatus=" + auditStatus +
", enable='" + enable + '\'' +
'}';
StringBuilder sb = new StringBuilder();
sb.append("序号=").append(id);
sb.append("档案属性=").append(fileAttr);
sb.append("档案类型=").append(fileType);
sb.append("文件名称=").append(fileName);
sb.append("业务线=").append(businessLine);
sb.append("公司名称=").append(companyName);
sb.append("税种=").append(taxType);
sb.append("文件生效日期=").append(fileTime.toLocaleString());
sb.append("到期日=").append(effectiveTime.toLocaleString() );
sb.append("所属期间=").append(ownTime );
sb.append("创建人=").append(creator );
sb.append("创建时间=").append(createTime.toLocaleString());
sb.append("更新时间=").append(updateTime.toLocaleString());
sb.append("上传时间=").append(uploadTime.toLocaleString());
sb.append("实物存放地点=").append(storageArea );
sb.append("保管人=").append(keeper );
sb.append("实物索引号=").append(physicalIndexNumber );
sb.append("备注=").append(remark );
sb.append("审批状态=").append(auditStatus==0?"未审核":auditStatus==1?"审核通过":"审核不通过");
sb.append("是否可用=").append("T".equals(enable)?"启用":"未启用");
return sb.toString();
}
}
\ No newline at end of file
......@@ -745,6 +745,11 @@ public class TaxDocumentExample {
return (Criteria) this;
}
public Criteria andOwnTimeEqualTo(Integer value) {
addCriterion("own_time =", value, "ownTime");
return (Criteria) this;
}
public Criteria andAuditStatusEqualTo(Integer value) {
addCriterion("audit_status =", value, "auditStatus");
return (Criteria) this;
......@@ -860,16 +865,6 @@ public class TaxDocumentExample {
return (Criteria) this;
}
public Criteria andOwnTimeBetween(Date value1, Date value2) {
addCriterion("own_time between", value1, value2, "ownTime");
return (Criteria) this;
}
public Criteria andOwnTimeEqualTo(Integer value) {
addCriterion("own_time =", value, "ownTime");
return (Criteria) this;
}
public Criteria andFileTimeNotBetween(Date value1, Date value2) {
addCriterion("file_time not between", value1, value2, "fileTime");
return (Criteria) this;
......
......@@ -8,7 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="file_attr" jdbcType="VARCHAR" property="fileAttr" />
<result column="file_type_id" jdbcType="BIGINT" property="fileTypeId" />
<result column="file_type_id" jdbcType="INTEGER" property="fileTypeId" />
<result column="file_type" jdbcType="VARCHAR" property="fileType" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="creator_id" jdbcType="VARCHAR" property="creatorId" />
......@@ -90,7 +90,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, file_attr, file_type_id, file_type, description, creator_id, creator, create_time,
id, file_attr, file_type_id, file_type, description, creator_id, creator, create_time,
update_time, status, remarks,required_field_json
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.FileTypesExample" resultMap="BaseResultMap">
......@@ -116,7 +116,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
from file_types
where id = #{id,jdbcType=BIGINT}
......@@ -139,19 +139,19 @@
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.entity.FileTypes">
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into file_types (file_attr, file_type_id,
file_type, description, creator_id,
creator, create_time, update_time,
status, remarks,required_field_json)
values ( #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=BIGINT},
#{fileType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creatorId,jdbcType=VARCHAR},
#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},#{requiredFieldJson})
file_type, description, creator_id,
creator, create_time, update_time,
status, remarks,required_field_json)
values ( #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=INTEGER},
#{fileType,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creatorId,jdbcType=VARCHAR},
#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},#{requiredFieldJson})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.FileTypes">
<!--
......@@ -254,7 +254,7 @@
file_attr = #{record.fileAttr,jdbcType=VARCHAR},
</if>
<if test="record.fileTypeId != null">
file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
file_type_id = #{record.fileTypeId,jdbcType=INTEGER},
</if>
<if test="record.fileType != null">
file_type = #{record.fileType,jdbcType=VARCHAR},
......@@ -292,16 +292,16 @@
-->
update file_types
set id = #{record.id,jdbcType=BIGINT},
file_attr = #{record.fileAttr,jdbcType=VARCHAR},
file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
file_type = #{record.fileType,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
creator_id = #{record.creatorId,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=VARCHAR},
remarks = #{record.remarks,jdbcType=VARCHAR}
file_attr = #{record.fileAttr,jdbcType=VARCHAR},
file_type_id = #{record.fileTypeId,jdbcType=INTEGER},
file_type = #{record.fileType,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
creator_id = #{record.creatorId,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=VARCHAR},
remarks = #{record.remarks,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -317,7 +317,7 @@
file_attr = #{fileAttr,jdbcType=VARCHAR},
</if>
<if test="fileTypeId != null">
file_type_id = #{fileTypeId,jdbcType=BIGINT},
file_type_id = #{fileTypeId,jdbcType=INTEGER},
</if>
<if test="fileType != null">
file_type = #{fileType,jdbcType=VARCHAR},
......@@ -357,7 +357,7 @@
file_attr = #{fileAttr,jdbcType=VARCHAR},
</if>
<if test="fileTypeId != null and fileTypeId != ''">
file_type_id = #{fileTypeId,jdbcType=BIGINT},
file_type_id = #{fileTypeId,jdbcType=INTEGER},
</if>
<if test="fileType != null and fileType != ''">
file_type = #{fileType,jdbcType=VARCHAR},
......
......@@ -89,7 +89,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, operation_content, module_name, operation_object, operation_action, original_state,
id, operation_content, module_name, operation_object, operation_action, original_state,
update_state, operation_user, ip, comment, create_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OperationLogFileTypeExample" resultMap="BaseResultMap">
......@@ -101,7 +101,7 @@
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
id, operation_action, original_state, update_state, operation_user, ip, comment, create_time
from operation_log_file_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
......@@ -109,14 +109,14 @@
<!--<if test="orderByClause != null">
order by ${orderByClause}
</if>-->
ORDER BY create_time
ORDER BY create_time
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
from operation_log_file_type
where id = #{id,jdbcType=VARCHAR}
......@@ -144,14 +144,14 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into operation_log_file_type (id, operation_content, module_name,
operation_object, operation_action, original_state,
update_state, operation_user, ip,
comment, create_time)
values (#{id,jdbcType=VARCHAR}, #{operationContent,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR},
#{operationObject,jdbcType=VARCHAR}, #{operationAction,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR},
#{updateState,jdbcType=VARCHAR}, #{operationUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
insert into operation_log_file_type (id, operation_content, module_name,
operation_object, operation_action, original_state,
update_state, operation_user, ip,
comment, create_time)
values (#{id,jdbcType=VARCHAR}, #{operationContent,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR},
#{operationObject,jdbcType=VARCHAR}, #{operationAction,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR},
#{updateState,jdbcType=VARCHAR}, #{operationUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.OperationLogFileType">
<!--
......@@ -292,16 +292,16 @@
-->
update operation_log_file_type
set id = #{record.id,jdbcType=VARCHAR},
operation_content = #{record.operationContent,jdbcType=VARCHAR},
module_name = #{record.moduleName,jdbcType=VARCHAR},
operation_object = #{record.operationObject,jdbcType=VARCHAR},
operation_action = #{record.operationAction,jdbcType=VARCHAR},
original_state = #{record.originalState,jdbcType=VARCHAR},
update_state = #{record.updateState,jdbcType=VARCHAR},
operation_user = #{record.operationUser,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
operation_content = #{record.operationContent,jdbcType=VARCHAR},
module_name = #{record.moduleName,jdbcType=VARCHAR},
operation_object = #{record.operationObject,jdbcType=VARCHAR},
operation_action = #{record.operationAction,jdbcType=VARCHAR},
original_state = #{record.originalState,jdbcType=VARCHAR},
update_state = #{record.updateState,jdbcType=VARCHAR},
operation_user = #{record.operationUser,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -353,15 +353,15 @@
-->
update operation_log_file_type
set operation_content = #{operationContent,jdbcType=VARCHAR},
module_name = #{moduleName,jdbcType=VARCHAR},
operation_object = #{operationObject,jdbcType=VARCHAR},
operation_action = #{operationAction,jdbcType=VARCHAR},
original_state = #{originalState,jdbcType=VARCHAR},
update_state = #{updateState,jdbcType=VARCHAR},
operation_user = #{operationUser,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
module_name = #{moduleName,jdbcType=VARCHAR},
operation_object = #{operationObject,jdbcType=VARCHAR},
operation_action = #{operationAction,jdbcType=VARCHAR},
original_state = #{originalState,jdbcType=VARCHAR},
update_state = #{updateState,jdbcType=VARCHAR},
operation_user = #{operationUser,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OperationLogFileTypeExample" resultMap="BaseResultMap">
......
......@@ -89,7 +89,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, operation_content, module_name, operation_object, operation_action, original_state,
id, operation_content, module_name, operation_object, operation_action, original_state,
update_state, operation_user, ip, comment, create_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OperationLogTaxDocumentExample" resultMap="BaseResultMap">
......@@ -101,7 +101,7 @@
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
id, operation_action, original_state, update_state, operation_user, ip, comment, create_time
from operation_log_tax_document
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
......@@ -115,7 +115,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
from operation_log_tax_document
where id = #{id,jdbcType=VARCHAR}
......@@ -143,14 +143,14 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into operation_log_tax_document (id, operation_content, module_name,
operation_object, operation_action, original_state,
update_state, operation_user, ip,
comment, create_time)
values (#{id,jdbcType=VARCHAR}, #{operationContent,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR},
#{operationObject,jdbcType=VARCHAR}, #{operationAction,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR},
#{updateState,jdbcType=VARCHAR}, #{operationUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
insert into operation_log_tax_document (id, operation_content, module_name,
operation_object, operation_action, original_state,
update_state, operation_user, ip,
comment, create_time)
values (#{id,jdbcType=VARCHAR}, #{operationContent,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR},
#{operationObject,jdbcType=VARCHAR}, #{operationAction,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR},
#{updateState,jdbcType=VARCHAR}, #{operationUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.OperationLogTaxDocument">
<!--
......@@ -291,16 +291,16 @@
-->
update operation_log_tax_document
set id = #{record.id,jdbcType=VARCHAR},
operation_content = #{record.operationContent,jdbcType=VARCHAR},
module_name = #{record.moduleName,jdbcType=VARCHAR},
operation_object = #{record.operationObject,jdbcType=VARCHAR},
operation_action = #{record.operationAction,jdbcType=VARCHAR},
original_state = #{record.originalState,jdbcType=VARCHAR},
update_state = #{record.updateState,jdbcType=VARCHAR},
operation_user = #{record.operationUser,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
operation_content = #{record.operationContent,jdbcType=VARCHAR},
module_name = #{record.moduleName,jdbcType=VARCHAR},
operation_object = #{record.operationObject,jdbcType=VARCHAR},
operation_action = #{record.operationAction,jdbcType=VARCHAR},
original_state = #{record.originalState,jdbcType=VARCHAR},
update_state = #{record.updateState,jdbcType=VARCHAR},
operation_user = #{record.operationUser,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -352,15 +352,15 @@
-->
update operation_log_tax_document
set operation_content = #{operationContent,jdbcType=VARCHAR},
module_name = #{moduleName,jdbcType=VARCHAR},
operation_object = #{operationObject,jdbcType=VARCHAR},
operation_action = #{operationAction,jdbcType=VARCHAR},
original_state = #{originalState,jdbcType=VARCHAR},
update_state = #{updateState,jdbcType=VARCHAR},
operation_user = #{operationUser,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
module_name = #{moduleName,jdbcType=VARCHAR},
operation_object = #{operationObject,jdbcType=VARCHAR},
operation_action = #{operationAction,jdbcType=VARCHAR},
original_state = #{originalState,jdbcType=VARCHAR},
update_state = #{updateState,jdbcType=VARCHAR},
operation_user = #{operationUser,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OperationLogTaxDocumentExample" resultMap="BaseResultMap">
......
......@@ -8,7 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="file_attr" jdbcType="VARCHAR" property="fileAttr"/>
<result column="file_type_id" jdbcType="INTEGER" property="fileTypeId"/>
<result column="file_type_id" jdbcType="BIGINT" property="fileTypeId"/>
<result column="file_type" jdbcType="VARCHAR" property="fileType"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="business_line" jdbcType="VARCHAR" property="businessLine"/>
......@@ -160,7 +160,7 @@
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.entity.TaxDocument">
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -173,7 +173,7 @@
upload_time, storage_area, keeper_id,
keeper, remark, file_original_name, file_upload_id, file_position_url,
year_redundancy,audit_status,physical_index_number,own_time)
values (#{id,jdbcType=BIGINT}, #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=BIGINT},
#{fileType,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{businessLine,jdbcType=VARCHAR},
#{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{taxType,jdbcType=VARCHAR},
#{fileTime,jdbcType=TIMESTAMP}, #{effectiveTime,jdbcType=TIMESTAMP}, #{creatorId,jdbcType=INTEGER},
......@@ -351,7 +351,7 @@
file_attr = #{record.fileAttr,jdbcType=VARCHAR},
</if>
<if test="record.fileTypeId != null">
file_type_id = #{record.fileTypeId,jdbcType=INTEGER},
file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
</if>
<if test="record.fileType != null">
file_type = #{record.fileType,jdbcType=VARCHAR},
......@@ -423,7 +423,7 @@
update tax_document
set id = #{record.id,jdbcType=BIGINT},
file_attr = #{record.fileAttr,jdbcType=VARCHAR},
file_type_id = #{record.fileTypeId,jdbcType=INTEGER},
file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
file_type = #{record.fileType,jdbcType=VARCHAR},
file_name = #{record.fileName,jdbcType=VARCHAR},
business_line = #{record.businessLine,jdbcType=VARCHAR},
......@@ -461,7 +461,7 @@
file_attr = #{fileAttr,jdbcType=VARCHAR},
</if>
<if test="fileTypeId != null">
file_type_id = #{fileTypeId,jdbcType=INTEGER},
file_type_id = #{fileTypeId,jdbcType=BIGINT},
</if>
<if test="fileType != null">
file_type = #{fileType,jdbcType=VARCHAR},
......@@ -534,7 +534,7 @@
file_attr = #{fileAttr,jdbcType=VARCHAR},
</if>
<if test="null != fileTypeId">
file_type_id = #{fileTypeId,jdbcType=INTEGER},
file_type_id = #{fileTypeId,jdbcType=BIGINT},
</if>
<if test="null != fileType and '' != fileType">
file_type = #{fileType,jdbcType=VARCHAR},
......
......@@ -194,6 +194,6 @@
"SystemTypeCannotDelete": "系统类型不能删除",
"OrganizationUsedTemplateGroup": "有机构在使用,不能删除",
"Industry": "行业:",
"SearchHintText": "搜索"
"SearchHintText": "搜索",
"DescriptionWithOutColon": "Description"
}
\ No newline at end of file
......@@ -52,6 +52,7 @@
"DefaultTaxTypeAndReport": "默认纳税类型及报表:",
"DeleteKeyValueConfiguration": "删除关键数据",
"Description": "描述:",
"DescriptionWithOutColon": "描述",
"DirectionDifferent": "借贷方向不一致",
"EnterpriceAccountMapping": "自动对应",
"EtsSubjectNameCol": "对应企业科目",
......
infrastructureModule.controller('docManageController',
['$log', '$http', '$q', '$scope', '$translate', '$timeout', 'SweetAlert', '$compile', 'docManageService','$filter',
['$log', '$http', '$q', '$scope', '$translate', '$timeout', 'SweetAlert', '$compile', 'docManageService', '$filter',
function ($log, $http, $q, $scope, $translate, $timeout, SweetAlert, $compile, docManageService, $filter) {
$scope.localData = {};
......@@ -32,7 +32,7 @@
// store: $scope.localData.items,
// reshapeOnPush: true
// },
bindingOptions:{
bindingOptions: {
dataSource: 'localData',
},
// repaintChangesOnly: true,
......@@ -84,21 +84,69 @@
dataField: "id",
caption: $translate.instant('SequenceNoCol'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.id) {
$('<span ' + style + '>').text(options.data.id).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
} catch (e) {
$log.error(e);
}
}
},
{
dataField: "fileAttr",
caption: $translate.instant('DocumentAttr'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.fileAttr) {
$('<span ' + style + '>').text(options.data.fileAttr).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
} catch (e) {
$log.error(e);
}
}
},
{
dataField: "fileType",
caption: $translate.instant('DocumentType'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.fileType) {
$('<span ' + style + '>').text(options.data.fileType).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
} catch (e) {
$log.error(e);
}
}
},
{
dataField: "description",
caption: $translate.instant('Explain'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.description) {
$('<span ' + style + '>').text(options.data.description).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
} catch (e) {
$log.error(e);
}
}
},
{
......@@ -107,23 +155,9 @@
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.requiredField) {
// var thisFields = [];
// // options.data.requiredField从服务器返回的时候是一个数字数组
// // 在插入表格之前,需要全部转换成显示字符
// options.data.requiredField.forEach(function (item) {
// var editRequiredFieldsMap = {
// 1: "文件生效日期",
// 2: "所属期间",
// 3: "到期日",
// 4: "实物索引号",
// 5: "实物存放地点",
// 6: "实物保管人",
// 7: "税种"
// };
// thisFields.push(editRequiredFieldsMap[item]);
// });
$('<span>').text(options.data.requiredField.join(",")).appendTo(container);
$('<span '+style+'>').text(options.data.requiredField.join(",")).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
......@@ -137,6 +171,18 @@
dataField: "creator",
caption: $translate.instant('Creator'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.creator) {
$('<span ' + style + '>').text(options.data.creator).appendTo(container);
} else {
$('<span>').text("").appendTo(container);
}
} catch (e) {
$log.error(e);
}
}
},
{
dataField: "createTime",
......@@ -145,8 +191,9 @@
cellTemplate: function (container, options) {
try {
var style = options.data.status == 1 ? '' : 'style="color:#999"';
if (options.data.createTime) {
$('<span>').text($filter('date')(options.data.createTime, 'yyyy-MM-dd')).appendTo(container);
$('<span '+style+'>').text($filter('date')(options.data.createTime, 'yyyy-MM-dd')).appendTo(container);
} else {
$('<span>').text().appendTo(container);
}
......@@ -164,7 +211,7 @@
if (options.data.status == 1) {
$('<span>').text($translate.instant('Enabled')).appendTo(container);
} else {
$('<span style="color:gray">').text($translate.instant('Disabled')).appendTo(container);
$('<span style="color:#999">').text($translate.instant('Disabled')).appendTo(container);
}
} catch (e) {
$log.error(e);
......@@ -198,8 +245,8 @@
var openEditPop = function (rowId) {
if (rowId) {
$scope.confirmDocFileType = editDocFileType;
$scope.localData.forEach(function(item){
if(item.id == rowId){
$scope.localData.forEach(function (item) {
if (item.id == rowId) {
$scope.editModel = angular.copy(item);
}
});
......@@ -228,10 +275,10 @@
var uploadModel = angular.copy($scope.editModel);
delete uploadModel.id; //新增文档不需要上传ID
docManageService.addFileType(uploadModel).then(function (data) {
if(data == true){
if (data == true) {
SweetAlert.success($translate.instant('SaveSuccess'));
$scope.loadMainData();
}else{
} else {
SweetAlert.warning($translate.instant('SaveFail'));
}
});
......@@ -241,10 +288,10 @@
var editDocFileType = function () {
var uploadModel = angular.copy($scope.editModel);
docManageService.editFileType(uploadModel).then(function (data) {
if(data == true){
if (data == true) {
SweetAlert.success($translate.instant('SaveSuccess'));
$scope.loadMainData();
}else{
} else {
SweetAlert.warning($translate.instant('SaveFail'));
}
});
......

<div class="land-manage-page">
<style>
.DM-state-label{
margin: 0;
height: 27px;
line-height: 34px;
float: none;
}
</style>
<div class="menu-header">
<div class="menu-title" translate="DocumentTypeSets"></div>
<div class="menu-log">
......@@ -23,9 +31,9 @@
</div>
<!--<div class="form-group page-form-group">-->
<!--<div class="page-footer">-->
<!--<ack-pagination page-options="pagingOptions" refresh-table="loadMainData()"></ack-pagination>-->
<!--</div>-->
<!--<div class="page-footer">-->
<!--<ack-pagination page-options="pagingOptions" refresh-table="loadMainData()"></ack-pagination>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
......@@ -47,12 +55,15 @@
id="SequenceNoCol"
placeholder="0004"
ng-model="editModel.id"
readonly style="width:320px;" maxlength="20" />
readonly style="width:320px;"/>
</div>
</div>
<!--档案属性-->
<div class="form-group">
<label for="DocumentAttr" class="col-sm-3 control-label" translate="DocumentAttr"></label>
<label for="DocumentAttr" class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="DocumentAttr"></span>
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
id="DocumentAttr"
......@@ -60,13 +71,17 @@
ng-model="editModel.fileAttr"
required style="width:320px;" maxlength="50" />
</div>
<div style="margin-top:7px;">
<span style="color:red"> * <span translate="Require"></span> </span>
</div>
<!--<div style="margin-top:7px;">-->
<!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>-->
</div>
<!--档案类型-->
<div class="form-group">
<label for="DocumentType" class="col-sm-3 control-label" translate="DocumentType"></label>
<label for="DocumentType" class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="DocumentType"></span>
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
id="DocumentType"
......@@ -74,13 +89,16 @@
ng-model="editModel.fileType"
required style="width:320px;" maxlength="50" />
</div>
<div style="margin-top:7px;">
<span style="color:red"> * <span translate="Require"></span> </span>
</div>
<!--<div style="margin-top:7px;">-->
<!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>-->
</div>
<!--说明-->
<div class="form-group">
<label for="Description" class="col-sm-3 control-label" translate="Description"></label>
<label for="Description" class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="DescriptionWithOutColon"></span>
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" id="Description"
ng-model="editModel.description"
......@@ -90,17 +108,21 @@
</div>
<!--必填字段-->
<div class="form-group">
<label class="col-sm-3 control-label" translate="RequiredFields"></label>
<label class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="RequiredFields"></span>
</label>
<div class="col-sm-11" style="width:61.67%" id="appMultiSelectContainer">
<!--<app-multi-select class="form-control" style="width:320px;"-->
<!--this-option-map="editRequiredFieldsMap"-->
<!--this-callback="editRequiredFieldsCallback"-->
<!--this-default-checked="editModel.requiredField"-->
<!--this-option-map="editRequiredFieldsMap"-->
<!--this-callback="editRequiredFieldsCallback"-->
<!--this-default-checked="editModel.requiredField"-->
<!--&gt;</app-multi-select>-->
</div>
<div style="margin-top:7px;">
<span style="color:red"> * <span translate="Require"></span> </span>
</div>
<!--<div style="margin-top:7px;">-->
<!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>-->
</div>
<!--备注-->
<div class="form-group">
......@@ -114,16 +136,19 @@
</div>
<!--状态-->
<div class="form-group">
<label class="col-sm-3 control-label" translate="State"></label>
<div class="col-sm-11" style="width:61.67%">
<label class="col-sm-5">
<label class="col-sm-3 control-label">
<span style="color:red"> * </span>
<span translate="State"></span>
</label>
<div class="col-sm-11" style="width:61.67%">
<label class="col-sm-5 DM-state-label">
<input type="radio" name="editModelState"
value=1
ng-model="editModel.status" required />
<span translate="Enable"></span>
</label>
<label class="col-sm-5">
<label class="col-sm-5 DM-state-label">
<input type="radio" name="editModelState"
value=0
ng-model="editModel.status" required />
......@@ -132,16 +157,16 @@
</div>
<div style="margin-top:7px;">
<span style="color:red"> * <span translate="Require"></span> </span>
</div>
<!--<div style="margin-top:7px;">-->
<!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>-->
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" translate="Confirm"
></button><!--ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"-->
></button><!--ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"-->
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()" translate="Cancel"></button>
</div>
</form>
......
......@@ -642,7 +642,9 @@ debugger;
}
var getInitTaskStatus = function(){
debugger;
citReportService.getRunningJob(vatSessionService.project.id,0).then(function (result) {
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
if(result.data.jobStatus=='Begin'||result.data.jobStatus=='Running'){
......
......@@ -8,10 +8,9 @@ taxDocumentManageModule.controller('taxDocumentListController',
SweetAlert, $compile, taxDocumentListService, $filter,apiInterceptor) {
$scope.queryFieldModel = {};
$scope.editFieldModel = {
};
$scope.resetQueryField = function(){
$scope.queryFieldModel={};
$scope.editFieldModel = {};
$scope.resetQueryField = function () {
$scope.queryFieldModel = {};
$("#period-picker1").val("");
$("#period-picker2").val("");
......@@ -19,8 +18,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
$("#period-picker4").val("");
};
$scope.pagingOptions = {
};
$scope.pagingOptions = {};
$scope.localData = null;
$scope.loadMainData = function () {
......@@ -28,8 +26,20 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.queryFieldModel.pageSize = $scope.pagingOptions.pageSize;
var params = angular.copy($scope.queryFieldModel);
// 过滤时间格式
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(params.ownTime.split("-").join(""));
var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
params.fileBeginTime ? params.fileBeginTime += "-01" : "";
params.fileEndTTime ? params.fileEndTTime += "-01" : "";
params.ownBeginTime ? params.ownBeginTime += "-01" : "";
params.ownEndTime ? params.ownEndTime += "-01" : "";
params.effectiveBeginTime ? params.effectiveBeginTime += "-01" : "";
params.effectiveEndTime ? params.effectiveEndTime += "-01" : "";
params.uploadBeginTime ? params.uploadBeginTime += "-01" : "";
params.uploadEndTime ? params.uploadEndTime += "-01" : "";
taxDocumentListService.fetchMainList(params).then(function (data, status, headers) {
if (status == 204) {
SweetAlert.warning($translate.instant("NoData"));
......@@ -73,7 +83,10 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField: "id",
caption: "",
cellTemplate: function (container, options) {
$('<input name="dataGridCheckBox" type="checkbox">').appendTo(container);
$('<input name="dataGridCheckBox" ' +
'data-id="'+options.data.id+'" ' +
'data-url="'+options.data.filePositionUrl+'" ' +
'type="checkbox">').appendTo(container);
}
},
{
......@@ -114,7 +127,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate: function (container, options) {
try {
if (options.data.fileTime) {
$('<span>').text($filter('date')(options.data.fileTime, 'yyyy-MM-dd')).appendTo(container);
$('<span>').text($filter('date')(options.data.fileTime, 'yyyy/MM/dd')).appendTo(container);
} else {
$('<span>').text('').appendTo(container);
}
......@@ -129,7 +142,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate: function (container, options) {
try {
if (options.data.ownTime) {
$('<span>').text($filter('date')(options.data.ownTime, 'yyyy-MM-dd')).appendTo(container);
var ownTimeString = options.data.ownTime + "";
var year = ownTimeString.substr(0, 4);
var mon = ownTimeString.substr(4, 2);
var day = ownTimeString.substr(6, 2);
$('<span>').text(year + "/" + mon + "/" + day).appendTo(container);
} else {
$('<span>').text('').appendTo(container);
}
......@@ -145,7 +162,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate: function (container, options) {
try {
if (options.data.effectiveTime) {
$('<span>').text($filter('date')(options.data.effectiveTime, 'yyyy-MM-dd')).appendTo(container);
$('<span>').text($filter('date')(options.data.effectiveTime, 'yyyy/MM/dd')).appendTo(container);
} else {
$('<span>').text('').appendTo(container);
}
......@@ -180,7 +197,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate: function (container, options) {
try {
if (options.data.uploadTime) {
$('<span>').text($filter('date')(options.data.uploadTime, 'yyyy-MM-dd')).appendTo(container);
$('<span>').text($filter('date')(options.data.uploadTime, 'yyyy/MM/dd')).appendTo(container);
} else {
$('<span>').text('').appendTo(container);
}
......@@ -232,14 +249,16 @@ taxDocumentManageModule.controller('taxDocumentListController',
if (rowId) {
$scope.isCreatePop = false;
$scope.simpleUploadSubmit = editDocFileRecord;
$scope.syncFileType();
$scope.localData.forEach(function (item) {
if (item.id == rowId) {
$scope.editFieldModel = angular.copy(item);
$scope.editFieldModel.ownTime = dateFormat(item.ownTime);
$scope.editFieldModel.fileTime = dateFormat(item.fileTime);
$scope.editFieldModel.effectiveTime = dateFormat(item.effectiveTime);
function dateFormat(date){
if(!date)return "";
$scope.syncFileType($scope.editFieldModel.fileAttr);
function dateFormat(date) {
if (!date)return "";
var _date = new Date(date);
var yy = _date.getFullYear();
var mm = (_date.getMonth() + 1) + "";
......@@ -252,6 +271,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
});
}
else {
$scope.curFileTypeOptions.length = 0;
$scope.isCreatePop = true;
$scope.simpleUploadSubmit = simpleUploadSubmit;
$scope.editFieldModel = {};
......@@ -266,31 +286,38 @@ taxDocumentManageModule.controller('taxDocumentListController',
var params = angular.copy($scope.editFieldModel);
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(params.ownTime.split("-").join(""));
taxDocumentListService.verifyDuplicate(params).then(function(data){
var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
params.fileTime = $scope.queryDate(params.fileTime,"-");
params.effectiveTime = $scope.queryDate(params.effectiveTime,"-");
taxDocumentListService.verifyDuplicate(params).then(function (data) {
// 先设置上传参数
var uploadItem = $scope.uploader.queue[0];
var fileName = uploadItem._file ? uploadItem._file.name : uploadItem.name;
uploadItem.formData = [
{originFileName:fileName},
{originFileName: fileName},
];
Object.keys($scope.editFieldModel).forEach(function(key){
Object.keys($scope.editFieldModel).forEach(function (key) {
var fields = {};
if(/ownTime/.test(key)){
fields[key] = parseInt($scope.editFieldModel[key].split("-").join(""));
}
else if(/(fileTime|effectiveTime)/.test(key)){
fields[key] = $scope.editFieldModel[key].split("-").join("/");
var curItemValue = $scope.editFieldModel[key] ? $scope.editFieldModel[key] : "";
if (/ownTime/.test(key)) {
var splitMark = curItemValue.indexOf("-") > -1 ? "-" : "/";
fields[key] = parseInt(curItemValue.split(splitMark).join(""));
}else{
fields[key] = $scope.editFieldModel[key];
if(/(createTime|updateTime|uploadTime)/.test(key)){
fields[key] = $scope.queryDate(fields[key],"/");
}else fields[key] = curItemValue;
}
uploadItem.formData.push(fields);
});
// data == true,代表可以直接上传,否则属于覆盖行为
if (data == true) {
$scope.uploader.url = apiInterceptor.webApiHostUrl + "/taxDoc/add";
$scope.uploader.queue[0].url = apiInterceptor.webApiHostUrl + "/taxDoc/add";
$scope.uploader.uploadItem(0);
$scope.isCoverOperation = false;
......@@ -310,11 +337,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
},
function (isConfirm) {
if (isConfirm) {
$scope.uploader.url = apiInterceptor.webApiHostUrl + "/taxDoc/edit";
$scope.uploader.queue[0].url = apiInterceptor.webApiHostUrl + "/taxDoc/edit";
$scope.uploader.uploadItem(0);
// editDocFileRecord($scope.editFieldModel, 'simple');
// $('#busy-indicator-container').show();
$scope.isCoverOperation = true;
}
})
......@@ -322,33 +346,34 @@ taxDocumentManageModule.controller('taxDocumentListController',
});
};
var addLogicAfterUploadFile = function(editFieldModel,type){
var addLogicAfterUploadFile = function (editFieldModel, type) {
var params = angular.copy(editFieldModel);
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(params.ownTime.split("-").join(""));
var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
taxDocumentListService.addNewRecord(params).then(function (data) {
if (data == true) {
if(type == 'simp'){
if (type == 'simp') {
SweetAlert.swal({
title:$translate.instant("Created"),
title: $translate.instant("Created"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
}else{
if($scope.multiUploadSuccessItems.length == 0){
} else {
if ($scope.multiUploadSuccessItems.length == 0) {
SweetAlert.swal({
title:$translate.instant("Uploaded"),
title: $translate.instant("Uploaded"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
}
}
......@@ -360,33 +385,40 @@ taxDocumentManageModule.controller('taxDocumentListController',
});
};
var editDocFileRecord = function (fieldModel,type) {
var editDocFileRecord = function (fieldModel, type) {
var params = angular.copy(fieldModel);
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(params.ownTime.split("-").join(""));
var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
params.effectiveTime = $scope.queryDate(params.effectiveTime,"/");
params.fileTime = $scope.queryDate(params.fileTime,"/");
params.createTime = $scope.queryDate(params.createTime,"/");
params.updateTime = $scope.queryDate(params.updateTime,"/");
params.uploadTime = $scope.queryDate(params.uploadTime,"/");
taxDocumentListService.editRecord(params).then(function (data) {
if (data == true) {
if(type == 'simple'){
if (type == 'simple') {
SweetAlert.swal({
title:$translate.instant("Edited"),
title: $translate.instant("Edited"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
}else{
if($scope.multiUploadSuccessItems.length == 0){
} else {
if ($scope.multiUploadSuccessItems.length == 0) {
SweetAlert.swal({
title:$translate.instant("Uploaded"),
title: $translate.instant("Uploaded"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
}
}
......@@ -403,68 +435,71 @@ taxDocumentManageModule.controller('taxDocumentListController',
console.log("cancelDocFileType")
};
var delRecord = function(){
var delRecord = function () {
var delItems = {};
delItems.ids=[];
delItems.ids = [];
$("input[name='dataGridCheckBox']").each(function(index,item){
if(item.checked){
delItems.ids.push($scope.localData[index].id);
$("input[name='dataGridCheckBox']").each(function (index, tdCell) {
if (tdCell.checked) {
var cellId = $(tdCell).attr('data-id');
delItems.ids.push(cellId);
}
});
var params = angular.copy(delItems);
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(params.ownTime.split("-").join(""));
taxDocumentListService.delFileRecordItems(params).then(function(data){
if(data){
var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
taxDocumentListService.delFileRecordItems(params).then(function (data) {
if (data) {
SweetAlert.swal({
title:$translate.instant("Deleted"),
title: $translate.instant("Deleted"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
}
});
};
var downloadAttachment = function(){
var 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){
checkedURLs.push($scope.localData[index].filePositionUrl);
$("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"));
if (!checkedURLs.length) return SweetAlert.warning($translate.instant("NeedChecked"));
var triggerDelay = 100;
var removeDelay = 1000;
checkedURLs.forEach(function(item,index){
checkedURLs.forEach(function (item, index) {
_createIFrame(item, index * triggerDelay, removeDelay);
});
function _createIFrame(url, _triggerDelay, _removeDelay) {
setTimeout(function() {
setTimeout(function () {
var frame = $('<iframe style="display: none;" class="multi-download"></iframe>');
frame.attr('src', url);
document.body.appendChild(frame[0]);
setTimeout(function() {
setTimeout(function () {
frame.remove();
}, _removeDelay);
}, _triggerDelay);
}
};
$scope.loadSelectMap = function(){
taxDocumentListService.getFileInfoOptions().then(function(data){
$scope.loadSelectMap = function () {
taxDocumentListService.getFileInfoOptions().then(function (data) {
// console.log(data);
if(data){
if (data) {
$scope.typeAndAttrMap = data;
Object.keys(data).forEach(function (item) {
$scope.fileTypeOptions[item] = item;
......@@ -487,15 +522,6 @@ taxDocumentManageModule.controller('taxDocumentListController',
});
};
//----------------------taxation----basic-end-------------------------------
$scope.syncFileType = function(curAttr){
$scope.curFileTypeOptions.length = 0;
Object.keys($scope.typeAndAttrMap).forEach(function(key){
if(curAttr === $scope.typeAndAttrMap[key]){
$scope.curFileTypeOptions.push(key);
}
});
};
(function initialize() {
$scope.typeAndAttrMap = {};
$scope.fileTypeOptions = {};
......@@ -520,11 +546,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
})();
}]);
taxDocumentManageModule.directive("multiDatePicker", function () {
/*taxDocumentManageModule.directive("multiDatePicker", function () {
return {
restrict: "EA",
controller: ['$scope', '$element', '$translate','$compile',
function ($scope, $element, $translate,$compile) {
controller: ['$scope', '$element', '$translate', '$compile',
function ($scope, $element, $translate, $compile) {
var minDate = [1, 1970];
var maxDate = [12, new Date().getFullYear()];
......@@ -553,7 +579,7 @@ taxDocumentManageModule.directive("multiDatePicker", function () {
// setDate: setDate,
months: monthList,
RTL: "bottom left",
minView:2,
minView: 2,
ConfirmBtnText: $translate.instant('Confirm'),
CancelBtnText: $translate.instant('ButtonCancel')
};
......@@ -583,9 +609,9 @@ taxDocumentManageModule.directive("multiDatePicker", function () {
$scope.queryFieldModel.uploadEndTime = dateFormat(result[1].reverse());
});
function dateFormat(dateArr){
function dateFormat(dateArr) {
var result = [];
dateArr.forEach(function(dateItem){
dateArr.forEach(function (dateItem) {
dateItem = dateItem + "";
dateItem = dateItem.length < 2 ? "0" + dateItem : dateItem;
result.push(dateItem);
......@@ -597,7 +623,7 @@ taxDocumentManageModule.directive("multiDatePicker", function () {
}]
}
});
});*/
taxDocumentManageModule.directive('dateTimePicker', function () {
return {
restrict: 'EA',
......@@ -606,33 +632,36 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
// 鼠标down的时候动态创建
var year = new Date().getFullYear();
$element.off('mousedown').on('mousedown',function(e){
// viewMode:0-days 1-mons 2-years
// minViewMode:0-days 1-mons 2-years
$element.off('mousedown').on('mousedown', function (e) {
$element.datepicker({
startDate:new Date(year - 20, 1, 1),
endDate:new Date(year + 20, 1, 1),
minViewMode: $attrs["minView"],
startDate: new Date(year - 20, 1, 1),
endDate: new Date(year + 20, 1, 1),
viewMode: $attrs["viewMode"] ? parseInt($attrs["viewMode"]):0,
minViewMode: $attrs["minViewMode"] ? parseInt($attrs["minViewMode"]):0,
autoclose: true,
language: region,
format: "yyyy-mm-dd",
todayBtn:true,
todayBtn: true,
clearBtn: true //清除按钮
}).off("changeDate").on('changeDate', function(ev){
}).off("changeDate").on('changeDate', function (ev) {
runCallback(ev);
}).off("hide").on("hide",function(){
}).off("hide").on("hide", function () {
killPlugin();
})
});
function resetValue(){
function resetValue() {
$element.val("");
}
function killPlugin(){
function killPlugin() {
// 当选择完毕的时候,就摧毁控件,腾出内存
$element.datepicker('remove');
}
function runCallback(ev){
function runCallback(ev) {
// changeDate的操作主要是为了,视图上被合并单元格之后,数据需要同步到被合并的单元格上
// 这样做需要满足两个接口:
// @rowName : 当行的数据模型的名字,
......@@ -642,16 +671,16 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
var callback = saafTable ? saafTable.getData : $scope[$attrs["callback"]];
var peerRow = $scope[$attrs["rowName"]];
var itemIndex = $attrs["itemIndex"];
if(callback) callback(ev.currentTarget.value,peerRow[itemIndex]);
if (callback) callback(ev.currentTarget.value, peerRow[itemIndex]);
}
function setDateRang(){
function setDateRang() {
// 当启动焦点事件的时候,才判断设置时间范围
$element.datepicker("setStartDate", $attrs.startdate? $attrs.startdate : new Date(year - 20, 1, 1));
$element.datepicker("setEndDate", $attrs.enddate? $attrs.enddate : new Date(year + 20, 1, 1));
$element.datepicker("setStartDate", $attrs.startdate ? $attrs.startdate : new Date(year - 20, 1, 1));
$element.datepicker("setEndDate", $attrs.enddate ? $attrs.enddate : new Date(year + 20, 1, 1));
}
function getLayout(e){
function getLayout(e) {
var result = "bottom-left";
var $ = angular.element;
var target = $(e.currentTarget);
......@@ -663,7 +692,7 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
// 300为插件的默认高度(固定值)
// 取固定值是因为,【设置显示位置】的API只能在创建时使用
if(targetTop + 300 + targetHeight > winHeight){
if (targetTop + 300 + targetHeight > winHeight) {
result = "top-left";
}
......@@ -673,24 +702,28 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
}]
}
});
taxDocumentManageModule.directive('fileUploader',function () {
return{
restrict:"EA",
controller:['$scope','FileUploader','apiInterceptor','taxDocumentListService','$translate','SweetAlert',
function($scope,FileUploader,apiInterceptor,taxDocumentListService,$translate,SweetAlert){
$scope.uploadFile = function(){
taxDocumentManageModule.directive('fileUploader', function () {
return {
restrict: "EA",
controller: ['$scope', 'FileUploader', 'apiInterceptor', 'taxDocumentListService', '$translate', 'SweetAlert',
function ($scope, FileUploader, apiInterceptor, taxDocumentListService, $translate, SweetAlert) {
$scope.uploadFile = function () {
$("#uploadFilePlugin").click();
};
$scope.uploader = new FileUploader({
url: apiInterceptor.webApiHostUrl + "/taxDoc/add",
url: apiInterceptor.webApiHostUrl + "/v1/taxDoc/add",
// autoUpload: true,//添加后,自动上传
headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload:true,
headers: {"Authorization": apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload: true,
});
$scope.uploader.filters.push({//xls限制
name: 'fileTypeFilter',
fn: function (item, options) {
var fileNativePath = $("#uploadFilePlugin")[0].value;
if(item.name.indexOf("_") === -1) {
SweetAlert.warning("文件名格式不符合规则,请重新选择");
return false;
}
var fileNativePath = $("#uploadFilePlugin")[0].value || "";
var splitMark = /\//.test(fileNativePath) ? "/" : "\\";
var prevPath = fileNativePath.split(splitMark);
prevPath.pop();
......@@ -698,13 +731,14 @@ taxDocumentManageModule.directive('fileUploader',function () {
$scope.uploader.clearQueue();
$scope.editFieldModel.fileNativePath = fileNativePath;
$scope.editFieldModel.fileName = item.name;
$scope.autoMatchAttrAndType(item.name,$scope.editFieldModel);
return true;
}
});
$scope.uploader.onAfterAddingFile(function(item){
console.info("is added!",item);
$scope.uploader.onAfterAddingFile(function (item) {
console.info("is added!", item);
});
$scope.uploader.onErrorItem = function(fileItem, response, status, headers) {
$scope.uploader.onErrorItem = function (fileItem, response, status, headers) {
SweetAlert.warning($translate.instant('FailUpload'));
// $scope.uploader.cancelItem();
// $scope.uploader.clearQueue();
......@@ -715,12 +749,12 @@ taxDocumentManageModule.directive('fileUploader',function () {
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// console.info('onCancelItem', fileItem, response, status, headers);
// };
$scope.uploader.onSuccessItem = function(fileItem, response, status, headers) {
$scope.uploader.onSuccessItem = function (fileItem, response, status, headers) {
// fileItem.filePositionUrl = response;
// $scope.editFieldModel.filePositionUrl = response;
var title = $translate.instant("Uploaded");
if($scope.isCoverOperation) {
if ($scope.isCoverOperation) {
title = $translate.instant("Edited");
// $scope.coverDocFileRecord($scope.editFieldModel, 'simple');
} else {
......@@ -729,13 +763,13 @@ taxDocumentManageModule.directive('fileUploader',function () {
}
SweetAlert.swal({
title:title,
title: title,
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
if (isConfirm) $scope.loadMainData();
});
$('#simpleUploadPopDialog').modal('hide');
......@@ -743,67 +777,73 @@ taxDocumentManageModule.directive('fileUploader',function () {
}]
}
});
taxDocumentManageModule.directive('multiFileUploader',function () {
return{
restrict:"EA",
controller:['$scope','FileUploader','apiInterceptor','taxDocumentListService','$translate','SweetAlert',
function($scope,FileUploader,apiInterceptor,taxDocumentListService,$translate,SweetAlert){
taxDocumentManageModule.directive('multiFileUploader', function () {
return {
restrict: "EA",
controller: ['$scope', 'FileUploader', 'apiInterceptor', 'taxDocumentListService', '$translate', 'SweetAlert',
function ($scope, FileUploader, apiInterceptor, taxDocumentListService, $translate, SweetAlert) {
var timer = null;
$scope.activeTab = function(activeIndex){
$scope.activeTab = function (activeIndex) {
$scope.editFieldModel_multi.forEach(function (item) {
item.iShow = false;
});
$scope.editFieldModel_multi[activeIndex].iShow = true;
};
$scope.openMultiUploadPop = function(){
$scope.openMultiUploadPop = function () {
timer = null;
$("#multiUploadFilePlugin").click();
$scope.multiUploader.clearQueue();
$scope.editFieldModel_multi.length = 0;
timer = setInterval(function(){
if($scope.multiUploader.queue && $scope.multiUploader.queue.length > 0){
timer = setInterval(function () {
if ($scope.multiUploader.queue && $scope.multiUploader.queue.length > 0) {
$("#multiUploadPopDialog").modal("show");
console.log("is run times");
}
},500);
}, 500);
};
// 由于$watch无法监听$scope.multiUploader,暂时用循环来做
setInterval(function(){
if($("#multiUploadPopDialog").is(":visible")){
setInterval(function () {
if ($("#multiUploadPopDialog").is(":visible")) {
clearInterval(timer);
}
},500);
}, 500);
$scope.multiUploader = new FileUploader({
// autoUpload: true,//添加后,自动上传
headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload:true,
headers: {"Authorization": apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload: true,
});
$scope.multiUploader.filters.push({//xls限制
name: 'fileTypeFilter',
fn: function (item, options) {
var fileNativePath = $("#multiUploadFilePlugin")[0].value;
if(item.name.indexOf("_") === -1) {
SweetAlert.warning("文件名格式不符合规则,请重新选择");
return false;
}
var fileNativePath = $("#multiUploadFilePlugin")[0].value || "";
var splitMark = /\//.test(fileNativePath) ? "/" : "\\";
var prevPath = fileNativePath.split(splitMark);
prevPath.pop();
fileNativePath = prevPath.join(splitMark) + splitMark;
$scope.editFieldModel_multi.push({
fileNativePath:fileNativePath,
fileName:item.name,
iShow:$scope.editFieldModel_multi.length == 0
});
var thisModel = {
fileNativePath: fileNativePath,
fileName: item.name,
iShow: $scope.editFieldModel_multi.length == 0
};
$scope.editFieldModel_multi.push(thisModel);
$scope.autoMatchAttrAndType(item.name,thisModel);
// 根据需求,改为不做类型限制
return true;
}
});
$scope.multiUploader.onAfterAddingFile(function(item){
console.info("is added!",item);
$scope.multiUploader.onAfterAddingFile(function (item) {
console.info("is added!", item);
});
$scope.multiUploadErrorItems = [];
$scope.multiUploader.onErrorItem = function(fileItem) {
$scope.multiUploader.onErrorItem = function (fileItem) {
$scope.multiUploadErrorItems.push(fileItem);
console.info('onErrorItem', fileItem);
};
......@@ -820,43 +860,46 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
// $scope.multiUploader.clearQueue();
};
$scope.multiUploader.onSuccessItem = function(fileItem,response) {
$scope.multiUploader.onSuccessItem = function (fileItem, response) {
// fileItem.filePositionUrl = response;
$scope.multiUploadSuccessItems.push(fileItem);
};
$scope.multiUploadSubmit = function(){
$scope.multiUploadSubmit = function () {
$scope.multiUploadErrorItems = [];
$scope.multiUploadSuccessItems = [];
for(var i = 0; i < $scope.multiUploader.queue.length;i++){
for (var i = 0; i < $scope.multiUploader.queue.length; i++) {
// 先设置uploader队列里每个文件的请求参数:fileOriginalName
var fileItem = $scope.multiUploader.queue[i];
fileItem.formData = [{
fileOriginName:fileItem.name ? fileItem.name : fileItem._file.name
fileOriginName: fileItem.name ? fileItem.name : fileItem._file.name
}];
var editFieldModel = $scope.editFieldModel_multi[i];
Object.keys(editFieldModel).forEach(function(key){
Object.keys(editFieldModel).forEach(function (key) {
var fields = {};
if(/ownTime/.test(key)){
fields[key] = parseInt(editFieldModel[key].split("-").join(""));
}
else if(/(fileTime|effectiveTime)/.test(key)){
fields[key] = editFieldModel[key].split("-").join("/");
}else{
fields[key] = editFieldModel[key];
var curItemValue = editFieldModel[key] ? editFieldModel[key] : "";
if (/ownTime/.test(key)) {
var splitMark = curItemValue.indexOf("-") > -1 ? "-" : "/";
fields[key] = parseInt(curItemValue.split(splitMark).join(""));
}else {
if(/(createTime|updateTime|uploadTime)/.test(key)){
fields[key] = $scope.queryDate(fields[key],"/");
}else fields[key] = curItemValue;
}
fileItem.formData.push(fields);
});
(function(_i,_fileItem,_editFieldModel,_taxDocumentListService,_multiUploader){
(function (_i, _fileItem, _editFieldModel, _taxDocumentListService, _multiUploader) {
var params = angular.copy(_editFieldModel);
params.ownTime = params.ownTime ? params.ownTime : "";
params.ownTime = parseInt(_editFieldModel.ownTime.split("-").join(""));
_taxDocumentListService.verifyDuplicate(params).then(function(data){
params.fileTime = $scope.queryDate(params.fileTime,"-");
params.effectiveTime = $scope.queryDate(params.effectiveTime,"-");
_taxDocumentListService.verifyDuplicate(params).then(function (data) {
if (data == true) {
_fileItem.url = apiInterceptor.webApiHostUrl + "/taxDoc/add";
} else {
......@@ -864,54 +907,54 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
}
_multiUploader.uploadItem(_i);
});
})(i,fileItem,editFieldModel,taxDocumentListService,$scope.multiUploader);
})(i, fileItem, editFieldModel, taxDocumentListService, $scope.multiUploader);
}
};
$scope.confirmUploadResult = function(){
$scope.confirmUploadResult = function () {
$('#uploadResultPop').modal('hide');
$scope.loadMainData();
};
}]
}
});
taxDocumentManageModule.directive('filePreview',function(){
return{
restrict:'EA',
controller:['$scope','$translate','SweetAlert','$compile','taxDocumentListService',
function($scope,$translate,SweetAlert,$compile,taxDocumentListService){
taxDocumentManageModule.directive('filePreview', function () {
return {
restrict: 'EA',
controller: ['$scope', '$translate', 'SweetAlert', '$compile', 'taxDocumentListService',
function ($scope, $translate, SweetAlert, $compile, taxDocumentListService) {
$scope.previewData = [];
/**上传时预览的功能取消 2019/3/8*/
/* $scope.viewNativeFile = function(fileItem){
if(!fileItem) return SweetAlert.warning($translate.instant('NeedLoadUp'));
var fileType = fileItem.filePositionUrl.split(".").pop();
if(/xlsx|xls/i.test(fileType)){
var reader = new FileReader();
reader.onload = function (e) {
/!* read workbook *!/
var wb = window.XLSX.read(e.target.result, {type:"binary"});
var data = window.XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
if(data.length){
$scope.filePreview_dataGridUpdate(data);
$("#filePreviewPop").modal("show");
}
else{
SweetAlert.warning($translate.instant('UnReadFile'));
}
/!* DO SOMETHING WITH workbook HERE *!/
};
reader.readAsBinaryString(fileItem._file);
}else if(/pdf/i.test(fileType)){
$scope.openPdfPreviewPop(fileItem.filePositionUrl);
}else{
SweetAlert.warning($translate.instant('UnFile'));
}
if(!fileItem) return SweetAlert.warning($translate.instant('NeedLoadUp'));
var fileType = fileItem.filePositionUrl.split(".").pop();
if(/xlsx|xls/i.test(fileType)){
var reader = new FileReader();
reader.onload = function (e) {
/!* read workbook *!/
var wb = window.XLSX.read(e.target.result, {type:"binary"});
var data = window.XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
if(data.length){
$scope.filePreview_dataGridUpdate(data);
$("#filePreviewPop").modal("show");
}
else{
SweetAlert.warning($translate.instant('UnReadFile'));
}
/!* DO SOMETHING WITH workbook HERE *!/
};
reader.readAsBinaryString(fileItem._file);
}else if(/pdf/i.test(fileType)){
$scope.openPdfPreviewPop(fileItem.filePositionUrl);
}else{
SweetAlert.warning($translate.instant('UnFile'));
}
};*/
$scope.currentSheetName = '';
var sheetCurPageIndex = 0;
......@@ -919,27 +962,31 @@ taxDocumentManageModule.directive('filePreview',function(){
var sheetPromise = null;
var cacheUrl = null;
$scope.prevPaging_xls = function(){
if(sheetCurPageIndex <= 0) return sheetCurPageIndex = 0;
sheetCurPageIndex --;
sheetPromise.then(function(resData){renderXLS(resData)})
$scope.prevPaging_xls = function () {
if (sheetCurPageIndex <= 0) return sheetCurPageIndex = 0;
sheetCurPageIndex--;
sheetPromise.then(function (resData) {
renderXLS(resData)
})
};
$scope.nextPaging_xls = function(){
if(sheetCurPageIndex >= (sheetSumPages - 1)) return sheetCurPageIndex = sheetSumPages - 1;
sheetCurPageIndex ++;
sheetPromise.then(function(resData){renderXLS(resData)})
$scope.nextPaging_xls = function () {
if (sheetCurPageIndex >= (sheetSumPages - 1)) return sheetCurPageIndex = sheetSumPages - 1;
sheetCurPageIndex++;
sheetPromise.then(function (resData) {
renderXLS(resData)
})
};
function getXLS(url){
function getXLS(url) {
// return taxDocumentListService.getBinaryData('./bundles/MS Function list - Phase 1.xlsx');
return taxDocumentListService.readXLSX({
// path:url
path:'http://47.94.233.173:11007/static/erp_tax_system/FE9A6FCC-019E-4B93-A9B2-1DD04CDD7431?expire=1552463739&signiture=H15ovgMR4zXwiYlPe4nZMoeLMSZFhimiHFUZ4-SVVaE='
path: 'http://47.94.233.173:11007/static/erp_tax_system/FE9A6FCC-019E-4B93-A9B2-1DD04CDD7431?expire=1552463739&signiture=H15ovgMR4zXwiYlPe4nZMoeLMSZFhimiHFUZ4-SVVaE='
});
}
function renderXLS(resData){
try{
function renderXLS(resData) {
try {
// var wb = window.XLSX.read(resData, {type:"array"});
//
......@@ -950,34 +997,39 @@ taxDocumentManageModule.directive('filePreview',function(){
sheetSumPages = resData.length;
var curSheet = resData[sheetCurPageIndex];
$scope.currentSheetName = Object.keys(curSheet)[0];
if(resData && resData.length){
if (resData && resData.length) {
$scope.filePreview_dataGridUpdate(curSheet[$scope.currentSheetName]);
$("#filePreviewPop").modal("show");
}
}catch(e){
} catch (e) {
SweetAlert.warning(e.message);
}
}
$scope.viewRemoteFile = function (fileName, filePositionUrl) {
if(typeof filePositionUrl !== 'string'
if (typeof filePositionUrl !== 'string'
|| filePositionUrl == 'null'
|| filePositionUrl == 'undefined')
return SweetAlert.warning($translate.instant('UnRecord'));
//区分文件类型
fileName = fileName ? fileName : "";
var fileType = fileName.split(".").pop();
if(/xlsx|xls/i.test(fileType)){
if (/xlsx|xls/i.test(fileType)) {
if(cacheUrl !== filePositionUrl){
if (cacheUrl !== filePositionUrl) {
cacheUrl = filePositionUrl;
sheetPromise = getXLS(filePositionUrl);
}
sheetPromise.then(function(resData){renderXLS(resData)})
sheetPromise.then(function (resData) {
renderXLS(resData)
})
}
else if(/pdf/i.test(fileType)){
else if (/pdf/i.test(fileType)) {
// return SweetAlert.warning('暂时不支持PDF预览');
$scope.openPdfPreviewPop(filePositionUrl);
}else{
} else {
SweetAlert.warning($translate.instant('UnFile'));
}
......@@ -989,17 +1041,17 @@ taxDocumentManageModule.directive('filePreview',function(){
var field_keys = Object.keys(_data[0]);
var field_values = Object.values(_data[0]);
_data.forEach(function(item){
_data.forEach(function (item) {
var curRow_keys = Object.keys(item);
var curRow_values = Object.values(item);
if(curRow_keys && curRow_keys.length > field_keys.length){
if (curRow_keys && curRow_keys.length > field_keys.length) {
field_keys = curRow_keys;
field_values = curRow_values;
}
});
$scope.filePreview_dataGridOptions = {
bindingOptions:{
bindingOptions: {
dataSource: 'previewData',
},
showBorders: true,
......@@ -1034,12 +1086,12 @@ taxDocumentManageModule.directive('filePreview',function(){
showRowLines: true,
columnAutoWidth: true,
allowColumnReordering: true,
columns: (function(){
columns: (function () {
var cols = [];
field_keys.forEach(function(field,index){
field_keys.forEach(function (field, index) {
cols.push({
dataField: field,
caption: (Object.keys(_data[0]).length == field_values.length) ? field_values[index]:index
caption: (Object.keys(_data[0]).length == field_values.length) ? field_values[index] : index
});
});
return cols;
......@@ -1052,14 +1104,14 @@ taxDocumentManageModule.directive('filePreview',function(){
};
$scope.hideFilePreviewPop = function(){
$scope.hideFilePreviewPop = function () {
$("#preview_dataGrid").html("");
$("#filePreviewPop").modal("hide");
};
$scope.resetDataForm = function(){
$scope.resetDataForm = function () {
$scope.previewData.length = 0;
if($scope.filePreview_dataGridOptions)
if ($scope.filePreview_dataGridOptions)
$scope.filePreview_dataGridOptions.columns.length = 0;
};
......@@ -1067,10 +1119,10 @@ taxDocumentManageModule.directive('filePreview',function(){
}]
}
});
taxDocumentManageModule.directive('pdfPreview',function(){
return{
restrict:'EA',
controller:['$scope',function($scope){
taxDocumentManageModule.directive('pdfPreview', function () {
return {
restrict: 'EA',
controller: ['$scope', function ($scope) {
window.PDFJS.workerSrc = './bundles/pdf.worker.js';
var canvas = document.getElementById('the-canvas');
var context = canvas.getContext('2d');
......@@ -1079,33 +1131,40 @@ taxDocumentManageModule.directive('pdfPreview',function(){
var container = document.getElementById("pdfLayoutDialog");
var pdfPromise = null;
var cacheUrl = null;
$scope.openPdfPreviewPop = function(url){
$scope.openPdfPreviewPop = function (url) {
container.style.display = "block";
if(cacheUrl !== url){
if (cacheUrl !== url) {
cacheUrl = url;
pdfPromise = getPdf(url);
}
pdfPromise.then(function(pdf){renderPdf(pdf)})
pdfPromise.then(function (pdf) {
renderPdf(pdf)
})
};
$scope.closePdfPop = function () {
container.style.display = "none";
};
$scope.prevPaging = function(){
if(pdfCurPageIndex <= 1) return pdfCurPageIndex = 1;
pdfCurPageIndex --;
pdfPromise.then(function(pdf){renderPdf(pdf)})
$scope.prevPaging = function () {
if (pdfCurPageIndex <= 1) return pdfCurPageIndex = 1;
pdfCurPageIndex--;
pdfPromise.then(function (pdf) {
renderPdf(pdf)
})
};
$scope.nextPaging = function(){
if(pdfCurPageIndex >= pdfSumPages) return pdfCurPageIndex = pdfSumPages;
pdfCurPageIndex ++;
pdfPromise.then(function(pdf){renderPdf(pdf)})
$scope.nextPaging = function () {
if (pdfCurPageIndex >= pdfSumPages) return pdfCurPageIndex = pdfSumPages;
pdfCurPageIndex++;
pdfPromise.then(function (pdf) {
renderPdf(pdf)
})
};
function getPdf(url){
function getPdf(url) {
// var url = 'http://47.94.233.173:11007/static/erp_tax_system/61063D1D-8C9E-47C1-B106-AFF696CF5D98?expire=1552466477&signiture=5IaoVIHX_pzmQgyaxdzYC2NsNOz_R0eyRUhQU1BJjiE=';
return window.PDFJS.getDocument(url);
}
function renderPdf(pdf){
function renderPdf(pdf) {
pdfSumPages = pdf.numPages;
pdf.getPage(pdfCurPageIndex).then(function getPageHelloWorld(page) {
......@@ -1132,17 +1191,17 @@ taxDocumentManageModule.directive('pdfPreview',function(){
}]
}
});
taxDocumentManageModule.directive('helpPop',function(){
return{
restrict:'EA',
controller:['$scope','taxDocumentListService','$translate','$compile',
function($scope,taxDocumentListService,$translate,$compile){
$scope.openHelpPop = function(){
taxDocumentManageModule.directive('helpPop', function () {
return {
restrict: 'EA',
controller: ['$scope', 'taxDocumentListService', '$translate', '$compile',
function ($scope, taxDocumentListService, $translate, $compile) {
$scope.openHelpPop = function () {
$scope.help_loadData();
};
$scope.help_cacheData = {};
$scope.help_loadData = function () {
taxDocumentListService.getDocumentsAttrAndType({params:{}}).then(function (data) {
taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
$scope.help_dataGridUpdate(data);
var dataGrid = $('<div dx-data-grid="help_dataGridOptions">');
$("#helpPopContainer").html("").append(dataGrid);
......@@ -1196,4 +1255,123 @@ taxDocumentManageModule.directive('helpPop',function(){
}]
}
});
\ No newline at end of file
});
taxDocumentManageModule.directive('watchGroup', function () {
return {
restrict: 'EA',
controller: ['$scope','taxDocumentListService','$translate',
function ($scope,taxDocumentListService,$translate) {
// $scope.$watch("editFieldModel.fileName",function(result){
// console.log("asdaw");
// if(result && result.length) $scope.autoMatchAttrAndType(result);
// });
//根据文件属性来匹配出
// 1,文件类型
$scope.syncFileType = function (curAttr) {
$scope.curFileTypeOptions.length = 0;
Object.keys($scope.typeAndAttrMap).forEach(function (key) {
if (curAttr === $scope.typeAndAttrMap[key]) {
$scope.curFileTypeOptions.push(key);
}
});
};
//根据文件名来匹配出
// 1,公司名
// 2,公司ID
// 3,文档属性
// 4,文档类型
// 5,文档类型ID
$scope.autoMatchAttrAndType = function (fileName,fieldModel) {
fileName = fileName ? fileName : "";
var fieldsAttrs = fileName.split("_");
fieldModel.companyName = fieldsAttrs[0];
fieldModel.fileType = fieldsAttrs[1];
// 根据Type来匹配Attr;
Object.keys($scope.typeAndAttrMap).forEach(function (key) {
if (fieldModel.fileType === key) {
fieldModel.fileAttr = $scope.typeAndAttrMap[key];
}
});
$scope.syncRequiredFields(fieldModel);
// 根据companyName来匹配companyId;
Object.keys($scope.companyNameOptionsMap).forEach(function (key) {
if (fieldModel.companyName === $scope.companyNameOptionsMap[key]) {
fieldModel.companyId = key;
}
});
// 根据Type来匹配TypeId;
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
if(FATItem.fileType === fieldModel.fileType
&& FATItem.fileAttr === fieldModel.fileAttr){
fieldModel.fileTypeId = FATItem.id;
}
});
};
$scope.FileAttrAndTypeCache = [];
taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
$scope.FileAttrAndTypeCache = data.items;
});
$scope.requiredField = [];
// 选了属性之后,就自动匹配必填字段
$scope.syncRequiredFields = function(fieldModel){
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
if(FATItem.fileType === fieldModel.fileType
&& FATItem.fileAttr === fieldModel.fileAttr){
$scope.requiredField = FATItem.requiredField;
}
});
};
$scope.isRequired = function(IT8nField){
return $scope.requiredField.indexOf($translate.instant(IT8nField)) > -1;
};
// 选了公司之后,就自动匹配公司ID
$scope.matchCompanyId = function(fieldModel){
Object.keys($scope.companyNameOptionsMap).forEach(function (key) {
if($scope.companyNameOptionsMap[key] === fieldModel.companyName){
fieldModel.companyId = key;
}
})
};
}]
}
});
taxDocumentManageModule.directive('tempModule', function () {
return {
restrict: 'EA',
controller: ['$scope','taxDocumentListService','$translate',
function ($scope,taxDocumentListService,$translate) {
//税种
$scope.taxTypeSelects = ["纳税申报表","税票"];
// updateTime: null
// uploadTime: "2019-03-13T12:05:03.000+08:00"
$scope.queryDate = function(time,mark){
if(!time) return "";
var theDate = new Date(time);
var year = theDate.getFullYear();
var mm = theDate.getMonth() + 1;
var dd = theDate.getDay();
mm = (mm + "").length < 2 ? "0" + mm : mm;
dd = (dd + "").length < 2 ? "0" + dd : dd;
return year + mark + mm + mark + dd;
}
}]
}
});
<div class="land-manage-page">
<div class="land-manage-page" watch-group temp-module>
<style>
ul{
margin:0;
padding:0;
ul {
margin: 0;
padding: 0;
list-style: none;
}
.TDL-header{
.TDL-header {
padding: 1rem;
}
.TDL-query-bar{
.TDL-query-bar {
width: 100%;
padding: 1rem;
border: 1px solid #dadada;
border-radius: 4px;
background: #F9F9F9;
}
.TDL-query-bar .TDL-query-row{
width:100%;
.TDL-query-bar .TDL-query-row {
width: 100%;
padding: 7px 0;
position:relative;
position: relative;
}
/*dx-datagrid-header-panel*/
.TDL-query-bar .TDL-query-footer{
.TDL-query-bar .TDL-query-footer {
margin-top: 1rem;
}
.TDL-query-bar .TDL-query-block{
width:24.75%;
min-width:24.75%;
max-width:24.75%;
display:inline-block;
.TDL-query-bar .TDL-query-block {
width: 24.75%;
min-width: 24.75%;
max-width: 24.75%;
display: inline-block;
box-sizing: border-box;
}
.TDL-query-bar .TDL-query-des{
.TDL-query-bar .TDL-query-des {
text-align: right;
width:30%;
width: 30%;
max-width: 30%;
display: inline-block;
box-sizing: border-box;
overflow: hidden;
line-height: 100%;
}
.TDL-query-bar .TDL-query-val{
.TDL-query-bar .TDL-query-val {
text-align: left;
display: inline-block;
width: 68%;
max-width: 68%;
padding-left: 1rem;
box-sizing: border-box;
}
.TDL-query-bar .TDL-query-more{
.TDL-query-bar .TDL-query-val .TDL-query-val-multi {
width: 45%;
max-width: 45%;
left: 0;
display: inline-block;
margin: 0;
}
.TDL-query-bar .TDL-query-more {
text-align: center;
padding:1rem 3rem;
padding: 1rem 3rem;
z-index: 1;
}
.DL-query-bar .TDL-query-more > span{
color:#999;
.DL-query-bar .TDL-query-more > span {
color: #999;
}
.TDL-query-bar .TDL-query-operate{
.TDL-query-bar .TDL-query-operate {
position: absolute;
right: 1rem;
top: 1rem;
z-index: 2;
}
.TDL-query-bar .TDL-query-operate > button{
.TDL-query-bar .TDL-query-operate > button {
border: 0;
padding: 0.5rem 3rem;
border-radius: 4px;
}
.TDL-query-bar .TDL-query-operate button.TDL-query-operate-search {
color: #fff;
background: #999;
margin-right:1rem;
margin-right: 1rem;
}
.TDL-query-bar .TDL-query-operate button.TDL-query-operate-reset {
background: #fff;
border:1px solid #bbb;
border: 1px solid #bbb;
}
.TDL-query-bar .TDL-query-operate button.TDL-query-operate-search:hover,
.TDL-query-bar .TDL-query-operate button.TDL-query-operate-reset:hover{
.TDL-query-bar .TDL-query-operate button.TDL-query-operate-reset:hover {
background: #E6E6E6;
color:inherit;
color: inherit;
}
.TDL-query-bar .TDL-query-val > input,
.TDL-query-bar .TDL-query-val > select
{
width: 80%;
max-width: 80%;
.TDL-query-bar .TDL-query-val > select {
width: 90%;
max-width: 90%;
box-sizing: border-box;
margin-left:1rem;
border:1px solid #E1E1E1;
border: 1px solid #E1E1E1;
}
/*修改表格头部样式*/
.TDL-data-grid-container .dx-header-row .dx-datagrid-action,
.TDL-data-grid-container .dx-header-row .dx-datagrid-drag-action{
.TDL-data-grid-container .dx-header-row .dx-datagrid-drag-action {
background: #F2F2F2;
color: #333;
font-weight: 600;
}
/*修改头部动作条样式*/
.TDL-data-grid-container .dx-datagrid-header-panel{
.TDL-data-grid-container .dx-datagrid-header-panel {
border: 1px solid #dadada;
border-bottom: 0;
padding: 1rem 1rem 0 1rem;
}
.TDL-content-container{
.TDL-content-container {
position: relative;
}
.TDL-content-container .DTL-content-head-bar{
.TDL-content-container .DTL-content-head-bar {
position: absolute;
z-index: 2;
right: 11rem;
top: 1rem;
}
.TDL-content-container .DTL-content-head-bar button{
border:0;
.TDL-content-container .DTL-content-head-bar button {
border: 0;
padding: 0 10px;
height: 34px;
font-weight: 400;
......@@ -127,48 +151,55 @@
color: #333;
line-height: 36px;
}
.TDL-content-container .DTL-content-head-bar button > i{
.TDL-content-container .DTL-content-head-bar button > i {
font-size: 16px;
}
.TDL-content-container .DTL-content-head-bar button.DTL-create-record{
color:#DC6900;
.TDL-content-container .DTL-content-head-bar button.DTL-create-record {
color: #DC6900;
}
.TDL-content-container .DTL-content-head-bar button.DTL-del-record{
color:#999;
.TDL-content-container .DTL-content-head-bar button.DTL-del-record {
color: #999;
}
.TDL-content-container .DTL-content-head-bar button:hover{
border:0;
.TDL-content-container .DTL-content-head-bar button:hover {
border: 0;
background: #E6E6E6;
color:inherit;
color: inherit;
}
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button{
border:0;
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button {
border: 0;
}
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button .dx-button-content{
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button .dx-button-content {
width: 100px;
min-width: 100px;
text-align: left;
}
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button .dx-button-content i:after{
content:"导出列表";
font-size:14px;
.dx-toolbar .dx-toolbar-after .dx-toolbar-item-content .dx-datagrid-toolbar-button .dx-button-content i:after {
content: "导出列表";
font-size: 14px;
position: relative;
top:0;
top: 0;
left: 0;
}
.DTL-special-external-btn{
.DTL-special-external-btn {
width: 34px;
float: right;
line-height: 34px;
height: 34px;
text-align: center;
position: absolute;
left: 87%;
top: 0;
}
.fake-exclamatory-circle:after,
.fake-question-circle:after{
.fake-question-circle:after {
position: relative;
padding: 5px;
border: 1px solid #bbb;
......@@ -176,24 +207,28 @@
height: 24px;
display: block;
border-radius: 100%;
color:#bbb;
color: #bbb;
}
.fake-question-circle:after{
content:"?";
.fake-question-circle:after {
content: "?";
}
.fake-exclamatory-circle:after{
content:"!";
.fake-exclamatory-circle:after {
content: "!";
}
.TDL-multi-upload-tab{
.TDL-multi-upload-tab {
/*position: absolute;*/
/*left: 0;*/
/*top: 0;*/
float:left;
float: left;
min-width: 100px;
/*max-width: 100px;*/
width:10%;
width: 10%;
}
.TDL-multi-upload-tab li.TDL-multi-upload-tab-item{
.TDL-multi-upload-tab li.TDL-multi-upload-tab-item {
width: 100%;
/*background: #EB8C00;*/
font-size: 1.6rem;
......@@ -204,32 +239,39 @@
cursor: pointer;
border: 1px solid #e5e5e5;
}
.TDL-multi-upload-content{
.TDL-multi-upload-content {
width: 90%;
float: right;
}
.TDL-multi-upload-tab .TDL-multi-upload-tab-active{
.TDL-multi-upload-tab .TDL-multi-upload-tab-active {
background: #EB8C00;
color: #fff;
}
/*color:#4395ff*/
.DTL-special-external-preview{
color:#4395ff;
.DTL-special-external-preview {
color: #4395ff;
}
.TDL-pdf-preview-pop{
.TDL-pdf-preview-pop {
position: fixed;
top: 0;left: 0;z-index: 1051;
top: 0;
left: 0;
z-index: 1051;
background: #333;
text-align: center;
overflow: auto;
}
.TDL-pdf-preview-pop-close-btn{
.TDL-pdf-preview-pop-close-btn {
position: fixed;
top: 6rem;
right: 6rem;
width: 4rem;
height: 4rem;
background: rgba(254,66,66,0.5);
background: rgba(254, 66, 66, 0.5);
color: #333;
border-radius: 100%;
text-align: center;
......@@ -239,46 +281,53 @@
z-index: 1502;
border: 0;
}
.TDL-pdf-preview-pop-close-btn:hover{
background: rgba(254,66,66,0.8);
color:#fff;
.TDL-pdf-preview-pop-close-btn:hover {
background: rgba(254, 66, 66, 0.8);
color: #fff;
}
.TDL-pdf-layout-dialog{
display:none;
.TDL-pdf-layout-dialog {
display: none;
}
.test{
.test {
position: absolute;
top:0;
left:0;
top: 0;
left: 0;
z-index: 1111;
}
.TDL-pdf-paging-btn{
.TDL-pdf-paging-btn {
position: fixed;
top: 49%;
z-index: 1052;
border: 0;
padding: 2rem;
font-size: 2rem;
background: rgba(33,33,33,0.5);
background: rgba(33, 33, 33, 0.5);
outline: none;
}
.TDL-pdf-paging-btn:hover{
.TDL-pdf-paging-btn:hover {
background: rgba(255, 255, 198, 0.7);
color:#fff;
color: #fff;
}
.TDL-pdf-paging-btn-prev{
.TDL-pdf-paging-btn-prev {
left: 6rem;
}
.TDL-pdf-paging-btn-next{
.TDL-pdf-paging-btn-next {
right: 6rem;
}
/*HACK,主要为了解决rangPicker插件的布局问题*/
div.rangePicker.RTL > .wrap > .custom > div.calendar.from{
div.rangePicker.RTL > .wrap > .custom > div.calendar.from {
float: left;
}
</style>
<div class="menu-header TDL-header" multi-date-picker>
<div class="menu-header TDL-header">
<div class="TDL-query-bar" ng-init="MoreFields = false">
<div data-id="1" class="TDL-query-row">
<div class="TDL-query-block">
......@@ -290,7 +339,8 @@
class="form-control radius3"
required placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileAttr in fileAttrOptions track by $index"
value="{{fileAttr}}">{{fileAttr}}</option>
value="{{fileAttr}}">{{fileAttr}}
</option>
</select>
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.fileAttr"/>-->
......@@ -305,7 +355,9 @@
class="form-control radius3"
required placeholder="{{'PleaseSelected' | translate}}">
<option selected></option>
<option ng-repeat="fileType in fileTypeOptions track by $index" value="{{fileType}}">{{fileType}}</option>
<option ng-repeat="fileType in fileTypeOptions track by $index" value="{{fileType}}">
{{fileType}}
</option>
</select>
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.fileType"/>-->
......@@ -318,7 +370,15 @@
<div class="TDL-query-val">
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.AvailabilityDate"/>-->
<input type="text" class="form-control radius3" id="period-picker1"/>
<!--<input type="text" class="form-control radius3" id="period-picker1"/>-->
<input type='text' placeholder="From"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.fileBeginTime"
data-min-view-mode="1" />
<input type='text' placeholder="To"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.fileEndTTime"
data-min-view-mode="1" />
</div>
</div>
......@@ -329,7 +389,15 @@
<div class="TDL-query-val">
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.Duration"/>-->
<input type="text" class="form-control radius3" id="period-picker2"/>
<input type='text' placeholder="From"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.ownBeginTime"
data-min-view-mode="1"/>
<input type='text' placeholder="To"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.ownEndTime"
data-min-view-mode="1"/>
<!--<input type="text" class="form-control radius3" id="period-picker2"/>-->
</div>
</div>
......@@ -359,12 +427,14 @@
</div>
<div class="TDL-query-val">
<select ng-model="queryFieldModel.companyName" class="form-control radius3"
title="{{queryFieldModel.companyName}}" required placeholder="{{'PleaseSelected' | translate}}">
title="{{queryFieldModel.companyName}}" required
ng-change="matchCompanyId(queryFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-click="queryFieldModel.companyId = key"
ng-slected="queryFieldModel.companyName == companyName"
value="{{companyName}}">{{companyName}}</option>
value="{{companyName}}">{{companyName}}
</option>
</select>
</div>
</div>
......@@ -375,7 +445,18 @@
<div class="TDL-query-val">
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.DueDate"/>-->
<input type="text" class="form-control radius3" id="period-picker3" ng-model="queryFieldModel.DueDate" />
<input type='text' placeholder="From"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.effectiveBeginTime"
data-min-view-mode="1"/>
<input type='text' placeholder="To"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.effectiveEndTime"
data-min-view-mode="1"/>
<!--$scope.queryFieldModel.effectiveBeginTime = dateFormat(result[0].reverse());-->
<!--$scope.queryFieldModel.effectiveEndTime = dateFormat(result[1].reverse());-->
<!--<input type="text" class="form-control radius3" id="period-picker3" ng-model="queryFieldModel.DueDate" />-->
</div>
</div>
......@@ -435,8 +516,17 @@
<div class="TDL-query-val">
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.UploadDate"/>-->
<input type="text" class="form-control radius3" id="period-picker4" />
<!--<input type="text" class="form-control radius3" id="period-picker4" />-->
<input type='text' placeholder="From"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.uploadBeginTime"
data-min-view-mode="1"/>
<input type='text' placeholder="To"
date-time-picker class="form-control TDL-query-val-multi"
data-date-format="yyyy-mm" ng-model="queryFieldModel.uploadEndTime"
data-min-view-mode="1"/>
<!--$scope.queryFieldModel.uploadBeginTime = dateFormat(result[0].reverse());-->
<!--$scope.queryFieldModel.uploadEndTime = dateFormat(result[1].reverse());-->
</div>
</div>
<div class="TDL-query-block">
......@@ -497,12 +587,15 @@
</div>
</div>
<div class="modal fade" id="simpleUploadPopDialog" file-uploader tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal fade" id="simpleUploadPopDialog" file-uploader tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;height:200px;" role="document">
<div class="modal-content">
<form class="form-horizontal" name="newDocFileTypeForm" ng-submit="simpleUploadSubmit(editFieldModel,'simple')">
<form class="form-horizontal" name="newDocFileTypeForm"
ng-submit="simpleUploadSubmit(editFieldModel,'simple')">
<div class="modal-header">
<div class="modal-title"><span>{{isCreatePop ? 'UploadAttach' : 'Edit' | translate}}</span></div>
<div class="modal-title"><span>{{isCreatePop ? 'UploadAttach' : 'Edit' | translate}}</span>
</div>
</div>
<div class="modal-body">
......@@ -516,8 +609,9 @@
placeholder="{{'PleaseSelected' | translate}}"
readonly
ng-model="editFieldModel.fileNativePath"
required style="width:320px;" />
<input id="uploadFilePlugin" type="file" style="display:none" nv-file-select uploader="uploader" filters="fileTypeFilter">
required/>
<input id="uploadFilePlugin" type="file" style="display:none" nv-file-select
uploader="uploader" filters="fileTypeFilter">
</div>
<div class="DTL-special-external-btn">
<a href="javascript:void(0)" ng-click="uploadFile()"><i class="fa fa-upload"></i></a>
......@@ -537,11 +631,11 @@
<span style="color:red"> * </span>
{{'DocumentName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%" >
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" title="{{editFieldModel.fileName}}"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldModel.fileName"
required style="width:320px;" />
required/>
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -550,17 +644,14 @@
{{'DocumentAttr' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%" id="fileAttrOptions">
<!--<input class="form-control"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.fileAttr"-->
<!--required style="width:320px;" />-->
<select ng-model="editFieldModel.fileAttr"
ng-change="syncFileType(editFieldModel.fileAttr)"
class="form-control"
style="width:320px;" required placeholder="{{'PleaseSelected' | translate}}">
required placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileAttr in fileAttrOptions track by $index"
ng-selected="(editFieldModel.fileAttr == fileAttr)"
value="{{fileAttr}}">{{fileAttr}}</option>
value="{{fileAttr}}">{{fileAttr}}
</option>
</select>
</div>
......@@ -576,17 +667,14 @@
{{'CorporationName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%" id="companyNameOptionsMap">
<!--<input class="form-control" title="{{editFieldModel.companyName}}"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.companyName"-->
<!--required style="width:320px;" />-->
<select ng-model="editFieldModel.companyName" class="form-control"
title="{{editFieldModel.companyName}}" style="width:320px;" required placeholder="{{'PleaseSelected' | translate}}">
title="{{editFieldModel.companyName}}" required
ng-change="matchCompanyId(editFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-click="editFieldModel.companyId = key"
ng-selected="(editFieldModel.companyName == companyName)"
value="{{companyName}}">{{companyName}}</option>
value="{{companyName}}">{{companyName}}
</option>
</select>
</div>
</div>
......@@ -596,30 +684,38 @@
{{'DocumentType' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<!--<input class="form-control"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.fileType"-->
<!--required style="width:320px;" />-->
<select ng-model="editFieldModel.fileType"
ng-disabled="curFileTypeOptions.length === 0"
class="form-control"
style="width:320px;" required placeholder="{{'PleaseSelected' | translate}}">
ng-change="syncRequiredFields(editFieldModel)"
required placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileType in curFileTypeOptions track by $index"
ng-selected="(editFieldModel.fileType == fileType)"
value="{{fileType}}">{{fileType}}</option>
value="{{fileType}}">{{fileType}}
</option>
</select>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('TaxType')"> * </span>
{{'TaxType' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
placeholder="{{'PleaseSelected' | translate}}"
ng-model="editFieldModel.taxType"
style="width:320px;" />
<!--<input class="form-control"-->
<!--ng-required="isRequired('TaxType')"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.taxType"-->
<!--/>-->
<select ng-model="editFieldModel.taxType"
class="form-control"
ng-required="isRequired('TaxType')"
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="taxType in taxTypeSelects track by $index"
ng-selected="(editFieldModel.taxType == taxType)"
value="{{taxType}}">{{taxType}}
</option>
</select>
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -628,65 +724,87 @@
{{'Duration' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker
data-date-format="yyyy/mm/dd"
class="form-control" ng-model="editFieldModel.ownTime" required
data-min-view="2"/>
data-min-view-mode="1"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('AvailabilityDate')"> * </span>
{{'AvailabilityDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.fileTime"
data-min-view="2"/>
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker
data-date-format="yyyy/mm/dd"
ng-required="isRequired('AvailabilityDate')"
class="form-control" ng-model="editFieldModel.fileTime"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('DueDate')"> * </span>
{{'DueDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.effectiveTime"
data-min-view="2"/>
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker
data-date-format="yyyy/mm/dd"
ng-required="isRequired('DueDate')"
class="form-control" ng-model="editFieldModel.effectiveTime"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityStorageLocation"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityStorageLocation')"> * </span>
{{'EntityStorageLocation' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-required="isRequired('EntityStorageLocation')"
ng-model="editFieldModel.storageArea"
style="width:320px;" />
/>
</div>
<div class="DTL-special-external-btn" title="{{'EntityStorageDescription' | translate}}">
<i class="fa fake-exclamatory-circle"></i>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityCustodian"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityCustodian')"> * </span>
{{'EntityCustodian' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-required="isRequired('EntityCustodian')"
ng-model="editFieldModel.keeper"
style="width:320px;" />
/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityIndex"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityIndex')"> * </span>
{{'EntityIndex' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" title="{{editFieldModel.storageArea}}"
placeholder="{{'PleaseType' | translate}}"
ng-required="isRequired('EntityIndex')"
ng-model="editFieldModel.physicalIndexNumber"
style="width:320px;" />
/>
</div>
</div>
<div class="form-group" style="width:100%;float:left;">
<label class="col-sm-3 control-label" style="width:12.5%" translate="Remarks"></label>
<label class="col-sm-3 control-label" style="width:12.5%">
<span style="color:red" ng-if="isRequired('Remarks')"> * </span>
{{'Remarks' | translate}}</label></label>
<div class="col-sm-11" style="width:87.5%">
<textarea class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldModel.remarks" >
ng-required="isRequired('Remarks')"
ng-model="editFieldModel.remarks">
</textarea>
</div>
</div>
......@@ -694,25 +812,29 @@
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" translate="Confirm"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()" translate="Cancel"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()"
translate="Cancel"></button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="multiUploadPopDialog" multi-file-uploader tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal fade" id="multiUploadPopDialog" multi-file-uploader tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;height:200px;" role="document">
<div class="modal-content">
<form class="form-horizontal" name="newDocFileTypeForm" ng-submit="multiUploadSubmit()">
<div class="modal-header">
<div class="modal-title"><span>{{'MultiUpload'|translate}}</span></div>
<input id="multiUploadFilePlugin" type="file" multiple style="display:none" nv-file-select uploader="multiUploader">
<input id="multiUploadFilePlugin" type="file" multiple style="display:none" nv-file-select
uploader="multiUploader">
</div>
<div class="modal-body">
<div class="TDL-multi-upload-tab">
<ul>
<li class="TDL-multi-upload-tab-item" ng-class="{true:'TDL-multi-upload-tab-active',false:''}[editFieldItem.iShow]"
<li class="TDL-multi-upload-tab-item"
ng-class="{true:'TDL-multi-upload-tab-active',false:''}[editFieldItem.iShow]"
ng-repeat="editFieldItem in editFieldModel_multi"
ng-click="activeTab($index)">
<span>{{'档案' + ($index + 1)}}</span>
......@@ -730,9 +852,8 @@
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" title="{{editFieldItem.fileNativePath}}"
placeholder="{{'PleaseSelected' | translate}}"
readonly
ng-model="editFieldItem.fileNativePath"
required style="width:280px;" />
readonly required
ng-model="editFieldItem.fileNativePath"/>
<!--<input id="{{multiUploadFilePlugin}}" type="file" style="display:none" nv-file-select uploader="uploader" filters="fileTypeFilter">-->
</div>
</div>
......@@ -750,11 +871,11 @@
<span style="color:red"> * </span>
{{'DocumentName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%" >
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" title="{{editFieldItem.fileName}}"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldItem.fileName"
required style="width:280px;" />
required/>
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -763,23 +884,20 @@
{{'DocumentAttr' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<!--<input class="form-control"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.fileAttr"-->
<!--required style="width:280px;" />-->
<select ng-model="editFieldItem.fileAttr"
ng-change="syncFileType(editFieldItem.fileAttr)"
class="form-control"
style="width:280px;"
required placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileAttr in fileAttrOptions track by $index"
ng-selected="(editFieldItem.fileAttr == fileAttr)"
value="{{fileAttr}}">{{fileAttr}}</option>
value="{{fileAttr}}">{{fileAttr}}
</option>
</select>
</div>
<div class="DTL-special-external-btn" title="查看类型列表">
<a href="javascript:void(0)" ng-click="openHelpPop()"><i class="fa fake-question-circle" aria-hidden="true"></i></a>
<a href="javascript:void(0)" ng-click="openHelpPop()"><i
class="fa fake-question-circle" aria-hidden="true"></i></a>
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -788,17 +906,15 @@
{{'CorporationName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<!--<input class="form-control" title="{{editFieldModel.companyName}}"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.companyName"-->
<!--required style="width:280px;" />-->
<select ng-model="editFieldItem.companyName" class="form-control"
title="{{editFieldItem.companyName}}" style="width:280px;" required placeholder="{{'PleaseSelected' | translate}}">
title="{{editFieldItem.companyName}}" required
ng-change="matchCompanyId(editFieldItem,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-click="editFieldItem.companyId = key"
ng-selected="(editFieldItem.companyName == companyName)"
value="{{companyName}}">{{companyName}}</option>
value="{{companyName}}">{{companyName}}
</option>
</select>
</div>
</div>
......@@ -808,31 +924,33 @@
{{'DocumentType' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<!--<input class="form-control"-->
<!--placeholder="{{'PleaseSelected' | translate}}"-->
<!--ng-model="editFieldModel.fileType"-->
<!--required style="width:280px;" />-->
<select ng-model="editFieldItem.fileType"
ng-disabled="curFileTypeOptions.length === 0"
class="form-control"
style="width:280px;" required
ng-change="syncRequiredFields(editFieldItem)"
class="form-control" required
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileType in curFileTypeOptions track by $index"
ng-selected="(editFieldItem.fileType == fileType)"
value="{{fileType}}">{{fileType}}</option>
value="{{fileType}}">{{fileType}}
</option>
</select>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('TaxType')"> * </span>
{{'TaxType' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
placeholder="{{'PleaseSelected' | translate}}"
ng-model="editFieldItem.taxType"
style="width:280px;" />
<select ng-model="editFieldItem.taxType"
class="form-control"
ng-required="isRequired('TaxType')"
placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="taxType in taxTypeSelects track by $index"
ng-selected="(editFieldItem.taxType == taxType)"
value="{{taxType}}">{{taxType}}
</option>
</select>
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -842,67 +960,89 @@
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}"
date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
date-time-picker data-date-format="yyyy/mm/dd"
class="form-control" ng-model="editFieldItem.ownTime" required
data-min-view="2"/>
data-min-view-mode="1"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="AvailabilityDate">
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('AvailabilityDate')"> * </span>
{{'AvailabilityDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}"
date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.fileTime"
data-min-view="2"/>
date-time-picker data-date-format="yyyy/mm/dd"
ng-required="isRequired('AvailabilityDate')"
class="form-control" ng-model="editFieldItem.fileTime"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('DueDate')"> * </span>
{{'DueDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}"
date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.effectiveTime"
data-min-view="2"/>
date-time-picker data-date-format="yyyy/mm/dd"
ng-required="isRequired('DueDate')"
class="form-control" ng-model="editFieldItem.effectiveTime"/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityStorageLocation"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityStorageLocation')"> * </span>
{{'EntityStorageLocation' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldItem.storageArea"
style="width:280px;" />
ng-required="isRequired('EntityStorageLocation')"
/>
</div>
<div class="DTL-special-external-btn" title="{{'EntityStorageDescription'|translate}}">
<div class="DTL-special-external-btn"
title="{{'EntityStorageDescription'|translate}}">
<i class="fa fake-exclamatory-circle"></i>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityCustodian"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityCustodian')"> * </span>
{{'EntityCustodian' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
ng-required="isRequired('EntityCustodian')"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldItem.keeper"
style="width:280px;" />
/>
</div>
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="EntityIndex"></label>
<label class="col-sm-3 control-label">
<span style="color:red" ng-if="isRequired('EntityIndex')"> * </span>
{{'EntityIndex' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control" title="{{editFieldItem.storageArea}}"
<input class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldModel.physicalIndexNumber"
style="width:280px;" />
ng-model="editFieldItem.physicalIndexNumber"
ng-required="isRequired('EntityIndex')"
/>
</div>
</div>
<div class="form-group" style="width:100%;float:left;">
<label class="col-sm-3 control-label" style="width:12.5%" translate="Remarks"></label>
<label class="col-sm-3 control-label" style="width:12.5%">
<span style="color:red" ng-if="isRequired('Remarks')"> * </span>
{{'Remarks' | translate}}
</label>
<div class="col-sm-11" style="width:87.5%">
<textarea class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-model="editFieldItem.remarks" >
</textarea>
<textarea class="form-control"
placeholder="{{'PleaseType' | translate}}"
ng-required="isRequired('Remarks')"
ng-model="editFieldItem.remark">
</textarea>
</div>
</div>
<div style="clear:both;"></div>
......@@ -913,14 +1053,16 @@
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" translate="Confirm"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()" translate="Cancel"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()"
translate="Cancel"></button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="filePreviewPop" file-preview tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal fade" id="filePreviewPop" file-preview tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
......@@ -934,12 +1076,15 @@
</div>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging_xls()" title="上一页">&lt;</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging_xls()" title="下一页">&gt;</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging_xls()" title="上一页">&lt;
</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging_xls()" title="下一页">&gt;
</button>
</div>
</div>
<div class="modal fade" id="uploadResultPop" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal fade" id="uploadResultPop" tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
......@@ -967,7 +1112,8 @@
</div>
</div>
<div class="modal fade" id="helpPopDialog" help-pop tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal fade" id="helpPopDialog" help-pop tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
......
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