Commit dfb937a0 authored by kevin's avatar kevin

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

# Conflicts:
#	atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
parent cccebe28
package pwc.taxtech.atms.common.util;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.UUID;
public class ResponseUtil {
private static HttpServletResponse response;
public static ServletOutputStream response(HttpServletResponse response, String fileName, String type){
if(type != null){
}
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
response.setCharacterEncoding("UTF-8");
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
try {
return response.getOutputStream();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static ServletOutputStream response(HttpServletResponse response, String fileName){
return response(response, fileName, null );
}
}
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.common.util.ResponseUtil;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitEAMAssetsDisposalDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposal;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.service.impl.CitPreviewDataServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK;
@Controller
@RequestMapping("api/v1/citPreviewDataController")
public class CitPreviewDataController {
public class CitPreviewDataController extends BaseController {
@Autowired
private CitPreviewDataServiceImpl citPreviewDataService;
......@@ -22,4 +38,26 @@ public class CitPreviewDataController {
public CamelPagingResultDto<CitSalaryAdvance> getSalaryAdvaceListData(@RequestBody CitSalaryDataDto citSalaryDataDto){
return new CamelPagingResultDto<>(citPreviewDataService.getCitSalaryAdvanceDataList(citSalaryDataDto));
}
@RequestMapping("getCitPreviewEamDisposalDataList")
@ResponseBody
public CamelPagingResultDto<CitEAMAssetsDisposal> getCitPreviewEamDisposalDataList(@RequestBody CitEAMAssetsDisposalDto citSalaryDataDto){
return new CamelPagingResultDto<>(citPreviewDataService.getCitPreviewEamDisposalDataList(citSalaryDataDto));
}
@RequestMapping(value = "exportDataEAM/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportDataEAM(@RequestBody CitEAMAssetsDisposal citEAMAssetsDisposal, HttpServletResponse response) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "yyyy-MM-dd hh:MM:ss");
String format = simpleDateFormat.format(new Date());
String fileName = "EAM资产处理金额记录表"+ format;
int count = citPreviewDataService.exportDataEAM(citEAMAssetsDisposal, ResponseUtil.response(response, fileName));
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
}
}
package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto;
......
package pwc.taxtech.atms.dto.previewData;
import com.github.pagehelper.PageInfo;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
public class CitEAMAssetsDisposalDto {
private CamelPagingDto pageInfo;
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
......@@ -5,17 +5,32 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.CitEAMAssetsDisposalMapper;
import pwc.taxtech.atms.dao.CitSalaryAdvanceMapper;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitEAMAssetsDisposalDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.dto.vatdto.dd.BalanceSheetDto;
import pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceExportDto;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposal;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposalExample;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.entity.CitSalaryAdvanceExample;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.dpo.TrialBalanceCondition;
import pwc.taxtech.atms.vat.entity.TrialBalance;
import javax.servlet.ServletOutputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static pwc.taxtech.atms.common.util.SpringContextUtil.trialBalanceMapper;
@Service
public class CitPreviewDataServiceImpl {
public class CitPreviewDataServiceImpl extends BaseService {
@Autowired
private CitSalaryAdvanceMapper citSalaryAdvanceMapper;
......@@ -32,4 +47,54 @@ public class CitPreviewDataServiceImpl {
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
@Autowired
private CitEAMAssetsDisposalMapper citEAMAssetsDisposalMapper;
public PageInfo<CitEAMAssetsDisposal> getCitPreviewEamDisposalDataList(CitEAMAssetsDisposalDto citEAMAssetsDisposalDto) {
CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample();
CitEAMAssetsDisposalExample.Criteria criteria = example.createCriteria();
Page page = PageHelper.startPage(citEAMAssetsDisposalDto.getPageInfo().getPageIndex(), citEAMAssetsDisposalDto.getPageInfo().getPageSize());
List<CitEAMAssetsDisposal> citSalaryAdvances = citEAMAssetsDisposalMapper.selectByExample(example);
PageInfo<CitEAMAssetsDisposal> pageInfo =new PageInfo<CitEAMAssetsDisposal>(citSalaryAdvances);
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
private Map<String, String> generalEAMHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("Period","期间");
header.put("LedgerId","账套ID");
header.put("OccurPeriod","发生期间");
header.put("AssetLabelNumber","资产标签号");
header.put("CompensationSaleAmount","赔偿/变卖金额");
header.put("CreatedBy","主体性质");
return header;
}
public int exportDataEAM(CitEAMAssetsDisposal citEAMAssetsDisposal, ServletOutputStream response) {
try {
CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample();
List<CitEAMAssetsDisposal> list = citEAMAssetsDisposalMapper.selectByCondition(citEAMAssetsDisposal);
Map<String, String> header = generalEAMHeader();
/*
TrialBalanceCondition condition = new TrialBalanceCondition();
beanUtil.copyProperties(param, condition);
List<TrialBalance> trialBalances = trialBalanceMapper.selectByCondition(condition);*/
/*
Map<String, String> header = generalTBHeader();
List<TrialBalanceExportDto> cellList = new ArrayList<>();
trialBalances.forEach(tb -> {
TrialBalanceExportDto d = new TrialBalanceExportDto();
d = beanUtil.copyProperties(tb, d);
cellList.add(d);
});*/
ExcelUtil.exportExcel(header, list, response);
return list.size();
} catch (Exception e) {
logger.error("EAM资产处理金额记录表: %s", e.getMessage());
return 0;
}
}
}
......@@ -12,7 +12,6 @@ import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.config.SystemConfig;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.message.ErrorMessageCN;
import pwc.taxtech.atms.common.util.DateUtils;
......
......@@ -36,10 +36,12 @@ import pwc.taxtech.atms.service.impl.BaseService;
import pwc.taxtech.atms.service.impl.CellConfigTranslater;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dao.DataValidateLogMapper;
import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.entity.DataValidateLog;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
import java.io.File;
......@@ -633,14 +635,14 @@ public class ReportServiceImpl extends BaseService {
public void insertDataValidateResult(Map map){
DataValidateLog dataValidateLog = new DataValidateLog();
dataValidateLog.setCreateTime(new Date());
dataValidateLog.setPeriod((String)map.get("period"));
dataValidateLog.setPeriod((Integer) map.get("period"));
dataValidateLog.setProjectId((String)map.get("projectId"));
dataValidateLog.setValidateResult((String)map.get("validateResult"));
dataValidateLog.setResult((String)map.get("result"));
dataValidateLog.setOrganizationId((String)map.get("organizationId"));
dataValidateLog.setCompanyCode((String)map.get("companyCode"));
dataValidateLog.setCompanyName((String)map.get("companyName"));
dataValidateLog.setTmsPeriod(Long.parseLong(map.get("tmsPeriod").toString()));
dataValidateLog.setTmsPeriod((Integer) map.get("tmsPeriod"));
dataValidateLogMapper.insert(dataValidateLog);
}
......
jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = 10.0.1.224)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.225)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = taxdb)))
jdbc_user=tax_admin
jdbc_password=taxadmin2018
jdbc_url=jdbc:mysql://172.20.2.218:3300/fintax_test?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true&amp;useSSL=false
jdbc_user=fintax_user_test
jdbc_password=Fintaxuser@123Test
#jdbc_password=111111
jdbc_admin_db=tax_admin
jdbc_admin_db=taxadmin2018
jdbc2_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = 10.0.1.224)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.225)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = taxdb)))
jdbc2_user=pwc_invoice
......@@ -15,7 +15,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL
web.url=http://dts.erp.didichuxing.com:8080
web.url=http://172.20.201.164:9001
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......@@ -23,7 +23,7 @@ jwt.expireSecond=180000
jwt.refreshSecond=600
#File Server Config
file.server.url=http://etms.longi-silicon.com:9111
file.server.url=http://172.20.201.164:9001
file.server.upload=/api/v1/upload
#upload
......@@ -33,7 +33,7 @@ max_file_length=104857600
distributed_id_datacenter=10
distributed_id_machine=15
api.url=http://dts.erp.didichuxing.com:8180
api.url=http://172.20.201.164:8180
# Longi config
longi_api_basic_user=
......
......@@ -46,7 +46,7 @@
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>-->
<table tableName="bill_detail" domainObjectName="BillDetail">
<table tableName="data_validate_log" domainObjectName="DataValidateLog">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......
......@@ -107,4 +107,6 @@ public interface CitEAMAssetsDisposalMapper extends MyMapper {
int updateByPrimaryKey(CitEAMAssetsDisposal record);
int insertBatch(List<CitEAMAssetsDisposal> citEAMAssetsDisposalList);
List<CitEAMAssetsDisposal> selectByCondition(@Param("citEAMAssetsDisposal") CitEAMAssetsDisposal citEAMAssetsDisposal);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.DataValidateLog;
import pwc.taxtech.atms.entity.DataValidateLogExample;
@Mapper
public interface DataValidateLogMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
long countByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int deleteByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int insert(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int insertSelective(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
List<DataValidateLog> selectByExampleWithRowbounds(DataValidateLogExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
List<DataValidateLog> selectByExample(DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
DataValidateLog selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DataValidateLog record, @Param("example") DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByExample(@Param("record") DataValidateLog record, @Param("example") DataValidateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DataValidateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_validate_log
*
* @mbg.generated
*/
int updateByPrimaryKey(DataValidateLog record);
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
......@@ -400,6 +403,7 @@ public class CitEAMAssetsDisposal extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
@JsonSerialize(using = CustomDateSerializer.class)
public Date getCreateTime() {
return createTime;
}
......@@ -424,6 +428,7 @@ public class CitEAMAssetsDisposal extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
@JsonSerialize(using = CustomDateSerializer.class)
public Date getUpdateTime() {
return updateTime;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.CitEAMAssetsDisposalMapper">
<sql id="QueryCondition">
1 = 1
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(citEAMAssetsDisposal.orgId)">
AND period= #{citEAMAssetsDisposal.period,jdbcType=VARCHAR}
</if>
<if test="citEAMAssetsDisposal.periodStart!=null">
AND compensation_sale_amount &gt;= #{citEAMAssetsDisposal.compensationSaleAmount,jdbcType=INTEGER}
</if>
<if test="citEAMAssetsDisposal.periodEnd!=null">
AND asset_label_number &lt;= #{citEAMAssetsDisposal.assetLabelNumber,jdbcType=INTEGER}
</if>
</sql>
<insert id="insertBatch" parameterType="java.util.List">
insert into cit_eam_assets_disposal
(<include refid="Base_Column_List"/>)
......@@ -61,4 +72,10 @@
SELECT 1 FROM DUAL;
</insert>
<select id ="selectByCondition" parameterType="pwc.taxtech.atms.entity.CitEAMAssetsDisposal">
select * from cit_eam_assets_disposal
WHERE
<include refid="QueryCondition"/>
</select>
</mapper>
\ No newline at end of file
api.url=http://dts.erp.didichuxing.com:8180/
api.url=http://172.20.201.164:8180/
cookie.maxAgeSeconds=86400
......
......@@ -866,7 +866,7 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
template: '<cit-preview-eam-disposal-list></cit-preview-eam-disposal-list>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......
......@@ -1125,9 +1125,10 @@
"approvedPrice": "已批准标准发票金额",
"createBy": "创建人",
"createTime" : "创建时间",
"citSalaryAdvance" : "预提重分类数据源"
"citSalaryAdvance" : "预提重分类数据源",
"assetLabelNumber" : "资产标签号",
"compensationSaleAmount" : "赔偿/变卖金额",
"EAMDisposal" : "EAM资产处理金额"
}
\ No newline at end of file
citModule.controller('citPreviewEamDisposalController', ['$scope', '$log', '$translate', '$timeout', '$compile', '$uibModal', 'apiInterceptor',
'SweetAlert', '$q', 'uiGridConstants', '$interval', 'vatSessionService', 'citSessionService', 'vatImportService', 'loginContext',
'browserService', 'enums', 'vatOperationLogService', 'citPreviewDataService', 'vatCommonService', 'ackMessageBox','commonWebService',
function ($scope, $log, $translate, $timeout, $compile, $uibModal, apiInterceptor, SweetAlert, $q, uiGridConstants,
$interval, vatSessionService, citSessionService, vatImportService, loginContext, browserService, enums, vatOperationLogService, citPreviewDataService,
vatCommonService, ackMessageBox, commonWebService) {
'use strict';
$scope.listData = [];
/* $scope.formOptions = {
formData: salaryData,
colCount: 2,
items: [{
dataField: "FirstName",
editorOptions: {
value: ""
}
},
{
itemType: "button",
horizontalAlignment: "left",
buttonOptions: {
text: "查询",
type: "success",
useSubmitBehavior: true
}
}]
};*/
/* $scope.onFormSubmit = function(e) {//执行查询
e.preventDefault();
};*/
//初始化dx控件
function initAssetResultDxGrid() {
var dupColumns = [
{ caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, fixed: true },
{ caption: $translate.instant('period'), dataField: "period", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('source'), dataField: "source", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('assetLabelNumber'), dataField: "assetLabelNumber", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('compensationSaleAmount'), dataField: "compensationSaleAmount", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('createdBy'), dataField: "createBy", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('createTime'), dataField: "createTime", width: 200, allowEditing: false, fixed: true }
];
$scope.assetsResultGridOptions = {
columns: dupColumns,
bindingOptions: {
"dataSource": "listData",
},
editing: {
mode: "batch",
allowUpdating:true,
},
onInitialized: function (e) {
$scope.dataGridInstance = e.component;
},
onCellPrepared: function (e) {
},
loadPanel: {
enabled: true
},
paging: {
pageSize: 100,
},
searchPanel: {
visible: true,
width: 240,
placeholder: $translate.instant('SearchPlaceholder')
},
showBorders: true,
hoverStateEnabled: true,
//scrolling: { mode: "virtual" },
noDataText: $translate.instant('AccountVoucher_DataGrid_NoDataText'),
height: '99%',
width: '98%',
filterRow: {
visible: true
},
onRowUpdating: function (e) {
},
onToolbarPreparing: function (e) {
}
}
}
//导出数据
$scope.downloadTB = function () {
citPreviewDataService.exportData($scope.queryParams).success(function (data, status, headers) {
if(status===204){
SweetAlert.warning("没有数据可以下载");
return;
}
vatExportService.exportToExcel(data, status, headers, 'EAM资产处置金额记录表.xls');
}).error(function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
});
}
$scope.doDataReset = function () {
$scope.queryParams.period = "";
$scope.queryParams.compensationSaleAmount = "";
$scope.queryParams.assetLabelNumber = "";
}
$scope.doSearch = function () {
refreshConfigGrid();
}
var initListData = function(){
citPreviewDataService.getCitPreviewEamDisposalDataList($scope.queryParams).success(function (res) {
$scope.listData = commonWebService._index(res.list);
$scope.pagingOptions.totalItems = res.pageInfo.totalCount;
//$scope.$apply();
}).error(function (error) {
swal({
title: "信息",
text: error,
type: "info"
});
});
}
//刷新页面
$scope.refreshConfigGrid = function () {
citPreviewDataService.getCitPreviewEamDisposalDataList($scope.queryParams)
.success(function (res) {
if (res && res.list) {
$scope.listData =commonWebService._index(res.list);
$scope.pagingOptions.totalItems = res.pageInfo.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
})
};
//开始
(function initialize() {
$('#input-invoice-period-picker').focus(function () {
$('.filter-button').popover("hide");
});
//初始化month-picker
$('#input-invoice-period-picker').rangePicker({
minDate: minDate,
maxDate: maxDate,
setDate: setDate,
months: $scope.monthList,//['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
ConfirmBtnText: $translate.instant('Confirm'),
CancelBtnText: $translate.instant('ButtonCancel')
})
$scope.queryParams = {};
//分页的设置
$scope.queryParams.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 20, //每页多少条数据
};
initAssetResultDxGrid();
initListData();
if($rootScope.currentLanguageDesc = $rootScope.currentLanguage === 'en-us'){
$('.periodInput')[0].style.left = "280px";
}else{
$('.periodInput')[0].style.left = "150px";
}
})();
}
]);
\ No newline at end of file
<div class="cit-import-asset-list">
<div class="top-area-wrapper" style="margin-top: 10px">
<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true"
data-placement="bottom"
data-templateurl="app/cit/preview/cit-preview-eamDisposal-list/vat-preview-eamDisposal-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
<span translate="EAMDisposal" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;" id="input-invoice-period-picker" />
<span ng-click="downloadTB()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<!-- <div class="widget-container">
<div>查询条件:</div>
<div id="form" dx-form="formOptions"></div>
</div>-->
<div class="dt-init-wrapper">
<div id="gridContainer" dx-data-grid="assetsResultGridOptions"></div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="refreshConfigGrid()"></ack-pagination>
</div>
</div>
<!-- <div class="error-list-modal">
<div class="modal fade" id="errorListModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width: 720px; height: 200px;" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
{{'ImportErrorPopUpTitle' | translate}}
</div>
</div>
<div class="modal-body">
{{'ImportErrorPopUpErrorDetail' | translate}}:
<br/>
<table>
<thead>
<tr>
<th width="10%" style="text-align:center;">{{'ImportErrorPopUpNoCol' | translate}}</th>
<th width="20%">{{'ImportErrorPopUpErrorTypeCol' | translate}}</th>
<th width="10%" style="text-align:center;">{{'ImportErrorPopUpErrorCountCol' |
translate}}
</th>
<th width="60%">{{'ImportErrorPopUpErrorDescCol' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="error in errorMsgMap track by $index">
<td width="10%" style="text-align:center;">{{$index + 1}}</td>
<td width="20%">{{error.errorType}}</td>
<td width="10%" style="text-align:center;">{{error.errorCount}}</td>
<td width="60%" ng-bind-html="error.errorContent"></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" translate="Confirm" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
</div>-->
<!--资产分类设置界面-->
<!--<script type="text/ng-template" id="set-asset-group-modal.html">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
{{'SetAssetGroup' | translate}}
</div>
</div>
<div class="modal-body">
<div class="grid-container">
<div id="assetsGroupGrid" dx-data-grid="assetsGridOptions"
style="max-width: 760px; margin-top: -40px;">
</div>
</div>
</div>
<div class="modal-footer">
<button style="margin-left: 22px;" type="button" class="btn btn-primary" ng-click="saveAssetGroupInfo()"
ng-disabled="!hasEditPermission">{{'Confirm' | translate }}
</button>
<button type="button" class="btn btn-third" ng-click="cancelAsset()" ng-if="!isDisabled"
ng-disabled="isDisabled">{{'ButtonCancel' | translate }}
</button>
</div>
</div>
</script>-->
<vat-operate-log period="period" module-type="moduleid" is-show="isShowLog"></vat-operate-log>
</div>
\ No newline at end of file
citModule.directive('citPreviewEamDisposalList', ['$log', '$translate',
function ($log, $translate) {
'use strict';
$log.debug('citPreviewSalaryAdvanceList.load...');
return {
restrict: 'E',
templateUrl: '/app/cit/preview/cit-preview-eamDisposal-list/cit-preview-eamDisposal-list.html' + '?_=' + Math.random(),
scope: {},
controller: 'citPreviewEamDisposalController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
.cit-import-asset-list {
padding-left: 20px;
height: 96%;
.sweet-alert {
background-color: #eeeeee;
}
.nav-wrapper {
padding-bottom: 10px;
border-bottom: 1px solid #DBD8D3;
.nav-header {
height: 54px;
line-height: 54px;
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #333;
}
.nav-tab {
/*display: inline-block;*/
span {
display: inline-block;
height: 34px;
width: 80px;
text-align: center;
line-height: 34px;
padding: 0 10px;
background-color: #B90808;
color: #FFF;
font-family: "Microsoft YaHei";
font-weight: 400;
font-style: normal;
font-size: 14px;
cursor: pointer;
}
.active {
background-color: #F91000;
}
}
}
.alert-warning {
background-color: #FDE2DE;
cursor: pointer;
}
.alert {
color: #CF2D1B;
font-weight: bold;
display: inline-block;
padding: 5px;
float: left;
margin: -45px 0 0 350px;
i {
font-size: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
.dropdown-common() {
display: inline-block;
.select-button {
background-color: #F5F5F5;
padding: 6px 0;
width: 110px;
}
.caret {
margin-top: 8px;
}
.dropdown-menu {
min-width: 140px;
max-height: 400px;
overflow-y: scroll;
li {
text-align: left;
min-height: 0px;
height: 30px;
color: #000;
font-weight: normal;
&:hover {
background-color: #F91000;
color: #FFF;
cursor: pointer;
}
i {
float: right;
font-size: 15px;
}
}
}
}
#tab_total {
display: block;
height: calc(~'100% - 80px');
position: relative;
.operation-wrapper {
margin: -40px 15px 0 0;
span {
cursor: pointer;
}
}
.import-wrapper {
margin-top: 10px;
span {
margin-left: 10px;
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
font-size: 14px;
font-weight: bold;
}
.dropdown {
.dropdown-common();
}
input {
width: 50px;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
padding: 2px;
text-align: center;
}
> button:last-child {
float: right;
margin-right: 20px;
}
.btn-wrapper {
border-radius: 5px;
background-color: #e0301e;
color: #FFF;
display: inline-block;
float: right;
margin-right: 10px;
.btn-vat-primary {
min-width: 80px;
}
}
.import-info-wrapper {
display: inline-block;
}
}
.dt-init-wrapper {
margin: 10px 0;
max-width: 99%;
height: calc(~'100% - 80px');
position: relative;
z-index: 1;
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
}
.total-Wrapper {
width: 99%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-bottom: 5px;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
/*.balance-ouput-grid-wrapper {
height: calc(~'100% - -10px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 150px;
left: 0;
right: 0;
background-color: #FFF;
}*/
}
.dt-import-wrapper {
margin: 10px 0;
max-width: 99%;
overflow: auto;
height: calc(~"100% - 70px");
.dropdown {
.dropdown-common();
i {
color: #F85550;
}
button {
color: #333;
}
}
}
.error-info-wrapper {
position: absolute;
height: 150px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background-color: #FFF;
margin-left: -39px;
z-index: 2;
}
#content-resizer {
width: 110%;
position: absolute;
height: 4px;
bottom: 150px;
left: 0;
right: 0;
background-color: red;
cursor: n-resize;
margin-left: -39px;
#topIcon {
cursor: pointer;
margin-top: -19px;
width: 38px;
margin-left: 46%;
z-index: 999;
bottom: -200px;
text-align: center;
display: block !important;
}
}
}
#tab_Assets {
display: block;
height: calc(~'100% - 80px');
position: relative;
.total-Wrapper {
width: 72%;
margin-left: 0px;
font-size: 13px;
font-family: 'Microsoft YaHei';
padding-top: 5px;
position: absolute;
z-index: 9;
.total_span {
color: #B4122A !important;
background-color: #ddd !important;
font-size: 12px !important;
font-weight: bold !important;
border-radius: 10px !important;
padding-left: 8px !important;
padding-right: 8px !important;
}
}
.dt-asset-result {
margin: 0px 0;
max-width: 99%;
height: calc(~'100% - 20px');
position: relative;
margin-top: 10px;
.herder-center {
text-align: center !important;
vertical-align: middle !important;
/*font-size:13px !important;*/
}
}
}
.error-list-modal {
.modal-title {
color: #FF0000;
}
.modal-body {
max-height: 300px;
overflow-y: auto;
table {
border: 1px solid #CCC;
thead tr th {
height: 30px;
border: 1px solid #CCC;
}
tbody tr td {
height: 25px;
border: 1px solid #CCC;
}
}
}
.modal-footer {
text-align: center;
}
}
.page-form-group {
float: right;
margin-top: 10px;
.page-size {
margin: 0;
}
.pagination {
margin: 0;
}
}
#gridInitData {
border-radius: 3px;
border: 1px solid #d4d4d4;
}
}
.set-asset-list-modal .modal-dialog {
height: 500px;
width: 800px;
.modal-content {
height: 100%;
width: 100%;
}
.modal-title {
color: #333;
font-size: 16px;
font-weight: bold;
}
.modal-body {
height: 76%;
max-width: 760px !important;
margin-left: 22px;
overflow-y: auto;
.herder-center {
text-align: center !important;
}
.column-color {
color: red !important;
}
}
.modal-footer {
text-align:left;
}
}
<div class="popover">
<div class="arrow"></div>
<div class="popover-content">
<div>
<table class="table table-responsive">
<tr>
<td>
<span translate="period"></span>
<input class="form-control input-width-middle" type="text" id="segment3" ng-model="queryParams.period" />
</td>
</tr>
<tr>
<td>
<span translate="compensationSaleAmount"></span>
<input class="form-control input-width-middle" type="text" id="segment3Name" ng-model="queryParams.compensationSaleAmount" />
</td>
</tr>
<tr>
<td>
<span translate="assetLabelNumber"></span>
<input class="form-control input-width-middle" type="text" id="segment5" ng-model="queryParams.assetLabelNumber" />
</td>
</tr>
</table>
</div>
<div class="row">
<div style="float:right;margin-right:10px;">
<button class="btn btn-default btn-primary" ng-click="doSearch()">
<span class="fa fa-chevron-down" aria-hidden="true"> </span> <span translate="Confirm"></span>
</button>
<button class="btn btn-default margin-right10" ng-click="doDataReset()">
<span class="fa fa-times" aria-hidden="true"> </span> <span translate="Reset"></span>
</button>
</div>
</div>
</div>
</div>
......@@ -5,6 +5,12 @@ webservices.factory('citPreviewDataService', ['$http', 'apiConfig', function ($h
//获取 预提分类数据源列表数据
getCitPreviewSalaryAdvanceDataList : function(params){
return $http.post('/citPreviewDataController/getSalaryAdvaceListData', {pageInfo: params.pagingOptions, poSubjectName : params.poSubjectName }, apiConfig.createVat());
}
},
getCitPreviewEamDisposalDataList : function (params) {
return $http.post('/citPreviewDataController/getCitPreviewEamDisposalDataList', {pageInfo: params.pagingOptions}, apiConfig.createVat());
},
exportData: function (params) {
return $http.post('/citPreviewDataController/exportDataEAM', params, apiConfig.create({ responseType: 'arraybuffer' }));
}
};
}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment