Commit 01764c35 authored by chase's avatar chase

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

parents 59821877 76041b65
......@@ -157,14 +157,14 @@ public class DateUtils {
* @return
*/
public static Integer strToPeriodYM(String dateStr) {
dateStr = dateStr.replace("-","");
dateStr = dateStr.replace("-","").replace(" ","").replace("年","").replace("月","");
Integer period = Integer.valueOf(dateStr);
return period;
}
/**
* 将yyyymm 字符串转换为区间格式 yyyyMM
* 将yyyymm 字\转换为区间格式 yyyyMM
*
* @param dateStr
* @return
......
......@@ -336,25 +336,22 @@ public class ReportController {
}
@RequestMapping(value = "saveAndRefresh", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto saveAndRefresh(/*@RequestParam(value = "orgId") String orgId,
/* @RequestMapping(value = "saveAndRefresh", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto saveAndRefresh(*//*@RequestParam(value = "orgId") String orgId,
@RequestParam(value = "period") Integer period,
@RequestParam(value = "specialConsiderations", defaultValue = "0") Integer specialConsiderations,
@RequestParam(value = "ebitRate", defaultValue = "1") String ebitRate,
@RequestParam(value = "reportId") Long reportId,*/ @RequestBody RequestParameterDto requestParameterDto) {
@RequestParam(value = "reportId") Long reportId,*//* @RequestBody RequestParameterDto requestParameterDto) {
OperationResultDto operationResultDto = new OperationResultDto();
String projId = getProjId(requestParameterDto.getOrgId(), requestParameterDto.getPeriod());
try {
operationResultDto.setData(reportService.loadEbitData(requestParameterDto.getOrgId(), requestParameterDto.getPeriod(), requestParameterDto.getSpecialConsiderations(), requestParameterDto.getEbitRate()));
/* new Thread(()->{
reportService.saveDatasource(orgId, period, specialConsiderations, ebitRate, operationResultDto, reportService.getCellData(Long.parseLong(requestParameterDto.getReportId()),projId ).getData().getCellData());
}).start();*/
} catch (Exception e) {
return operationResultDto.error();
}
operationResultDto.setResultMsg("success");
return operationResultDto;
}
}*/
@RequestMapping("getlxbId")
public OperationResultDto getlxbId() {
......
......@@ -335,7 +335,17 @@ public class AssetListServiceImpl extends BaseService {
citAsset.setResidualRate(residualRate);
//获取本年折旧额
citAsset.setYearDepreciationAmount(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(24)).toString()));
value = CitCommonUtil.getValue(rowData.getCell(24));
if("".equals(value)){
citAsset.setYearDepreciationAmount(new BigDecimal("0"));
//获取财务本年折旧额
citAsset.setAccountYearDepreciationAmount(new BigDecimal("0"));
}else{
citAsset.setYearDepreciationAmount(new BigDecimal(value.toString()));
//获取财务本年折旧额
citAsset.setAccountYearDepreciationAmount(new BigDecimal(value.toString()));
}
// 获取本年调整额----列数待定 滴滴无本年调整额
// citAsset.setYearAdjustmentAmount(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString()));
......@@ -343,10 +353,13 @@ public class AssetListServiceImpl extends BaseService {
citAsset.setAccountAcquisitionValue(acquisitionValue);
//获取财务每月折旧额----(原值-残值额)/折旧期限
citAsset.setAccountMonthDepreciationAmount(acquisitionValue.subtract(residualRate).divide(new BigDecimal(depreciationPeriod), 2));
//获取财务本年折旧额
citAsset.setAccountYearDepreciationAmount(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(24)).toString()));
//获取财务累计折旧额,接下来计算需要用到,所以赋给一个对象
BigDecimal accountTotalDepreciationAmount = new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString());
value = CitCommonUtil.getValue(rowData.getCell(25));
if("".equals(value)){
value = "0";
}
BigDecimal accountTotalDepreciationAmount = new BigDecimal(value.toString());
citAsset.setAccountTotalDepreciationAmount(accountTotalDepreciationAmount);
//年终剩余价值,原值-累计折旧
citAsset.setYearEndValue(acquisitionValue.subtract(accountTotalDepreciationAmount));
......
......@@ -10,7 +10,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:10000
web.url=http://dts.erp.didichuxing.com
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......@@ -28,7 +28,7 @@ max_file_length=104857600
distributed_id_datacenter=10
distributed_id_machine=10
api.url=http://dts.erp.didichuxing.com:20000
api.url=http://dts.erp.didichuxing.com
# Longi config
longi_api_basic_user=
......
......@@ -40,7 +40,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="pwc.taxtech.atms.vat.dao" targetProject="../../src/main/java">
<property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" />
</javaClientGenerator>
<table tableName="ebit_spread_data" domainObjectName="EbitSpreadData">
<table tableName="profit_loss_statement_ebit" domainObjectName="ProfitLossStatementEbit">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......
package pwc.taxtech.atms.vat.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.MyVatMapper;
import pwc.taxtech.atms.vat.entity.ProfitLossStatementEbit;
import pwc.taxtech.atms.vat.entity.ProfitLossStatementEbitExample;
@Mapper
public interface ProfitLossStatementEbitMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
long countByExample(ProfitLossStatementEbitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int deleteByExample(ProfitLossStatementEbitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int insert(ProfitLossStatementEbit record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int insertSelective(ProfitLossStatementEbit record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
List<ProfitLossStatementEbit> selectByExampleWithRowbounds(ProfitLossStatementEbitExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
List<ProfitLossStatementEbit> selectByExample(ProfitLossStatementEbitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
ProfitLossStatementEbit selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") ProfitLossStatementEbit record, @Param("example") ProfitLossStatementEbitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int updateByExample(@Param("record") ProfitLossStatementEbit record, @Param("example") ProfitLossStatementEbitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(ProfitLossStatementEbit record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table profit_loss_statement_ebit
*
* @mbg.generated
*/
int updateByPrimaryKey(ProfitLossStatementEbit record);
}
\ No newline at end of file
VUE_APP_TABLEAU_API=http://dts.erp.didichuxing.com:10000/OrangeHeap/
\ No newline at end of file
VUE_APP_TABLEAU_API=http://dts.erp.didichuxing.com:10000/OrangeHeap/
\ No newline at end of file
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
......@@ -19,3 +19,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
!/.gitignore
!/.env.development
!/.env.production
!/.eslintrc.js
.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><link href=js/about.173a42f4.js rel=prefetch><link href=css/app.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.1d7fe95e.css rel=preload as=style><link href=js/app.e06965e0.js rel=preload as=script><link href=js/chunk-vendors.cc3f6466.js rel=preload as=script><link href=css/chunk-vendors.1d7fe95e.css rel=stylesheet><link href=css/app.cf16809e.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.cc3f6466.js></script><script src=js/app.e06965e0.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{f820:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},s=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("h1",[t._v("This is an about page")])])}],u=n("2877"),c={},i=Object(u["a"])(c,a,s,!1,null,null,null);e["default"]=i.exports}}]);
//# sourceMappingURL=about.173a42f4.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/views/About.vue?cd20","webpack:///./src/views/About.vue"],"names":["render","_vm","this","_h","$createElement","_self","_c","_m","staticRenderFns","staticClass","_v","script","component","Object","componentNormalizer","__webpack_exports__"],"mappings":"8GAAA,IAAAA,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BH,EAAAI,MAAAC,GAAwB,OAAAL,EAAAM,GAAA,IACzFC,EAAA,YAAoC,IAAAP,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BE,EAAAL,EAAAI,MAAAC,IAAAH,EAAwB,OAAAG,EAAA,OAAiBG,YAAA,SAAoB,CAAAH,EAAA,MAAAL,EAAAS,GAAA,2CCAxIC,EAAA,GAKAC,EAAgBC,OAAAC,EAAA,KAAAD,CAChBF,EACEX,EACAQ,GACF,EACA,KACA,KACA,MAIeO,EAAA,WAAAH","file":"js/about.173a42f4.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"about\"},[_c('h1',[_vm._v(\"This is an about page\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./About.vue?vue&type=template&id=1ae8a7be&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><link href=js/about.173a42f4.js rel=prefetch><link href=css/app.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.1d7fe95e.css rel=preload as=style><link href=js/app.007ff91c.js rel=preload as=script><link href=js/chunk-vendors.cc3f6466.js rel=preload as=script><link href=css/chunk-vendors.1d7fe95e.css rel=stylesheet><link href=css/app.cf16809e.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.cc3f6466.js></script><script src=js/app.007ff91c.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{f820:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},s=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("h1",[t._v("This is an about page")])])}],u=n("2877"),c={},i=Object(u["a"])(c,a,s,!1,null,null,null);e["default"]=i.exports}}]);
//# sourceMappingURL=about.173a42f4.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/views/About.vue?cd20","webpack:///./src/views/About.vue"],"names":["render","_vm","this","_h","$createElement","_self","_c","_m","staticRenderFns","staticClass","_v","script","component","Object","componentNormalizer","__webpack_exports__"],"mappings":"8GAAA,IAAAA,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BH,EAAAI,MAAAC,GAAwB,OAAAL,EAAAM,GAAA,IACzFC,EAAA,YAAoC,IAAAP,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BE,EAAAL,EAAAI,MAAAC,IAAAH,EAAwB,OAAAG,EAAA,OAAiBG,YAAA,SAAoB,CAAAH,EAAA,MAAAL,EAAAS,GAAA,2CCAxIC,EAAA,GAKAC,EAAgBC,OAAAC,EAAA,KAAAD,CAChBF,EACEX,EACAQ,GACF,EACA,KACA,KACA,MAIeO,EAAA,WAAAH","file":"js/about.173a42f4.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"about\"},[_c('h1',[_vm._v(\"This is an about page\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./About.vue?vue&type=template&id=1ae8a7be&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -86,9 +86,7 @@
export default {
data: () => ({
chartUrl: process.env.VUE_APP_TABLEAU_API + 'unreturnedTax',
tableauApiUrl: require('../assets/tableaujs.js'),
// tableauApiUrl: 'https://public.tableau.com/javascripts/api/tableau-2.2.2.min.js',
drawer: null,
......@@ -188,20 +186,21 @@
created() {
this.selectTable(this.items[0])
this.$axios({
method: 'get',
url: 'https://api.coindesk.com/v1/bpi/currentprice.json',
}).then((response) => { //这里使用了ES6的语法
console.log(response) //请求成功返回的数据
}).catch((error) => {
console.log(error) //请求失败返回的数据
})
// Axios使用示例
// this.$axios({
// method: 'get',
// url: 'https://api.coindesk.com/v1/bpi/currentprice.json',
// }).then((response) => { //这里使用了ES6的语法
// console.log(response) //请求成功返回的数据
// }).catch((error) => {
// console.log(error) //请求失败返回的数据
// })
},
mounted() {
console.log(process.env.VUE_APP_TABLEAU_API)
// console.log(process.env.VUE_APP_TABLEAU_API)
},
......
......@@ -8,7 +8,7 @@ module.exports = {
// 基本路径
publicPath: './',
// 输出文件目录
outputDir: './atms-web/src/main/webapp/orangeweb',
outputDir: '../atms-web/src/main/webapp/orangeweb',
// eslint-loader 是否在保存的时候检查
// lintOnSave: true,
// use the full build with in-browser compiler?
......
api.url=http://dts.erp.didichuxing.com:20000/
api.url=http://dts.erp.didichuxing.com
cookie.maxAgeSeconds=86400
......
......@@ -99,7 +99,7 @@
//var prokjectId = vatSessionService.project.id;
//var period = vatSessionService.month;
/* if (!init) {
addEbitRow();
scope.relation.addEbitRow();
setData(init)
return;
}*/
......@@ -193,9 +193,10 @@
sheet.clearSelection();
}
scope.spread = spread;
scope.relation.sheet = spread.getActiveSheet();
setColWidth(sheet);
if(sheet.getRowCount() <= 38)
addEbitRow(sheet)
scope.relation.addEbitRow(sheet)
if (scope.templateId && scope.reportSource) {
setData();
}
......@@ -204,10 +205,9 @@
return $q.when(spread);
};
var addEbitRow = function (sheet) {
scope.relation.addEbitRow = function (sheet) {
if (sheet == undefined || sheet == null)
sheet = scope.spread.getActiveSheet();
//添加单元格
if (sheet.getRowCount() > 43)
return;
......@@ -218,10 +218,10 @@
sheet.addRows(sheet.getRowCount(scope.relation.sheetArea.viewport), 1);
sheet.setValue(i + 37, 0, profileList[i]);
}
lockCell(scope.spread);
scope.relation.lockCell(scope.spread);
}
var lockCell = function (spread) {
scope.relation.lockCell = function (spread) {
//todo:注册之后这里去掉注释
var sheet;
if (constant.regesterInformation.active) {
......@@ -321,9 +321,9 @@
return;
}*/
if(upload){ //上传上来的文件也要动态添加行
addEbitRow(sheet);
scope.relation.addEbitRow(sheet);
scope.relation.loadEbitCell(sheet);
lockCell(scope.spread);
scope.relation.lockCell(scope.spread);
setColWidth(sheet);
scope.spread.resumePaint();
return
......@@ -335,13 +335,13 @@
//spreadJsTipService.initialize(sheet);
/*if (!scope.isReadOnly) {
lockCell(scope.spread, false, true);
scope.relation.lockCell(scope.spread, false, true);
}*/
scope.spread.suspendPaint();
/* if (scope.reportSource.length == 0 && scope.relation.emptyData && scope.relation.emptyData == true) {
_init(scope.templateId, true);///如果没有数据,需要重新加载
lockCell(scope.spread);
scope.relation.lockCell(scope.spread);
return;
}
*/
......@@ -367,7 +367,7 @@
}
}
}
lockCell(scope.spread);
scope.relation.lockCell(scope.spread);
scope.spread.resumePaint();
scope.relation.saveToDbFlag = Math.random();
......
......@@ -1100,7 +1100,7 @@
};
var getReportData = function (period) {
if($scope.relation.orgId == null || $scope.relation.orgId == undefined ){
if ($scope.relation.orgId == null || $scope.relation.orgId == undefined) {
$scope.relation.loadSheet($scope.templateId);
return;
}
......@@ -2931,16 +2931,23 @@
SweetAlert.error("请输入正确的EBIT Rate");
}
vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, specialConsiderations, ebitRate).success(function (res) {
/* vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, specialConsiderations, ebitRate).success(function (res) {
if (res.resultMsg == "success") {
if (res.data) $scope.relation.data = res.data;
$scope.relation.setData(true);
spreadTODb();
}
}).error(function (error) {
});
});*/
calculateEbitAndInsert($scope.relation.sheet, true);
spreadTODb();
}
var spreadTODb = function () {
if ($scope.relation.period == undefined || $scope.relation.period == null) {
SweetAlert.error("请选择机构");
return;
}
var json = $scope.spread.toJSON({includeBindingSource: true});
var excelIo = new GC.Spread.Excel.IO();
var url = apiInterceptor.webApiHostUrl + '/Report/spreadToDb?orgId=' + $scope.relation.orgId + "&period=" + $scope.relation.period;
......@@ -2963,6 +2970,7 @@
success: function (data) {
//alert("上传成功!");
if (data.result) {
SweetAlert.success("成功")
} else {
SweetAlert.error(data.resultMsg);
}
......@@ -2979,8 +2987,13 @@
});
//上传模板
$scope.upload = function (file) {
if (file == undefined || file == null || file.length == 0)
return
if ($scope.relation.orgId == null || $scope.relation.orgId == undefined) {
SweetAlert.error("请选择机构");
return;
}
file = file[0];
frontImport(file);//前端导入
/*if(file.length == 0)
......@@ -3061,16 +3074,21 @@
excelIo.open(file, function (json) {
var workbookObj = json;
$scope.spread.fromJSON(workbookObj);
vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, 0, "1").success(function (res) {
var sheet = $scope.spread.sheets[0];
$scope.relation.sheet = $scope.spread.sheets[0];
/*vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, 0, "1").success(function (res) {
if (res.resultMsg == "success") {
if (res.data) $scope.relation.data = res.data;
$scope.relation.setData(true);
}
}).error(function (error) {
});
});*/
//进行ebit计算,这里是前端计算
$scope.relation.addEbitRow(sheet);
calculateEbitAndInsert(sheet, true);
$scope.relation.lockCell($scope.spread);
spreadTODb();
}, function (e) {
// process error
alert(e.errorMessage);
if (e.errorCode === 2/*noPassword*/ || e.errorCode === 3 /*invalidPassword*/) {
......@@ -3078,6 +3096,46 @@
});
}
}
$scope._ebitResult = {};
//给String 对象添加replaceAll方法
String.prototype.replaceAll = function (s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2);
}
var calculateEbitAndInsert = function (sheet, insert) {
var yysr = Number(sheet.getValue(11, 2).toString().replaceAll(",", ""));//营业收入
var yycb = Number(sheet.getValue(12, 2).toString().replaceAll(",", ""));//营业成本
var yysjfj = Number(sheet.getValue(13, 2).toString().replaceAll(",", ""));//营业税金附加
var xsfy = Number(sheet.getValue(14, 2).toString().replaceAll(",", ""));//销售费用
var glfy = Number(sheet.getValue(15, 2).toString().replaceAll(",", ""));//管理费用
var yffy = Number(sheet.getValue(16, 2).toString().replaceAll(",", ""));//研发费用
var zcjzss = Number(sheet.getValue(18, 2).toString().replaceAll(",", ""));//资产减值损失
var ts = (sheet.getValue(38, 2) == "" || sheet.getValue(38, 2) == null) == true ? 0 : sheet.getValue(40, 2);
var rate = (sheet.getValue(40, 2) == "" || sheet.getValue(40, 2) == null) == true ? "1%" : sheet.getValue(40, 2);
$scope._ebitResult.klzcjsz = Number((yysr - yycb - yysjfj - xsfy - glfy - yffy - zcjzss).toFixed(4));
$scope._ebitResult.tsyskl = Number((Number(ts)).toFixed(4));
$scope._ebitResult.kltsys = ($scope._ebitResult.klzcjsz + $scope._ebitResult.tsyskl).toFixed(4);
$scope._ebitResult.rate = rate;
if($scope._ebitResult.rate.indexOf("%") != -1){
$scope._ebitResult.gljyye = Number((Number($scope._ebitResult.rate.replaceAll("%", "")) * $scope._ebitResult.kltsys).toFixed(4));
}else{
$scope._ebitResult.gljyye = Number(($scope._ebitResult.rate * $scope._ebitResult.kltsys).toFixed(4));
}
$scope._ebitResult.sixAddtax = Number((0.06 * $scope._ebitResult.gljyye).toFixed(4));
$scope._ebitResult.tsklys = Number(($scope._ebitResult.gljyye * 0.106).toFixed(4));
if (insert) {
sheet.setValue(37, 2, $scope._ebitResult.klzcjsz);
sheet.setValue(38, 2, $scope._ebitResult.tsklys);
sheet.setValue(39, 2, $scope._ebitResult.kltsys);
sheet.setValue(40, 2, $scope._ebitResult.rate);
sheet.setValue(41, 2, $scope._ebitResult.gljyye);
sheet.setValue(42, 2, $scope._ebitResult.sixAddtax);
sheet.setValue(43, 2, $scope._ebitResult.klzcjsz);
}
}
$scope.singleExport = function () {
if ($scope.spread != undefined && $scope.spread) {
......
......@@ -271,18 +271,18 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
permission: constant.citPermission.dataPreview.bsMappingVer.queryCode,
url: '#/cit/previewData/bsMappingVer'
});
} else if (data[constant.citPermission.dataPreview.assetsList.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.assetsList',
state: 'previewData.assetsList',
num: 2,
permission: constant.citPermission.dataPreview.assetsList.queryCode,
url: '#/cit/previewData/assetsList'
});
// } else if (data[constant.citPermission.dataPreview.assetsList.queryCode]) {
// $scope.menus.push({
// name: 'previewData', state: 'previewData', num: 2,
// permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
// });
// subMenus.push({
// name: 'previewData.assetsList',
// state: 'previewData.assetsList',
// num: 2,
// permission: constant.citPermission.dataPreview.assetsList.queryCode,
// url: '#/cit/previewData/assetsList'
// });
} else if (data[constant.citPermission.dataPreview.salaryAdvance.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
......
......@@ -35,6 +35,14 @@
Period: '',
};
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 1, //总数据
pageSize: 100, //每页多少条数据
pageSizeString: "100"
};
//导入方式
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 };
$scope.sheetData = { sheetNameList: [], dataList: [], selectedSheetIndex: 0 };
......@@ -297,6 +305,7 @@
}
$scope.TotalCount = assetListData.data.total;
$scope.pagingOptions.totalItems = assetListData.data.total;
$scope.pageOptions.totalItems = assetListData.data.total;
});
}
......@@ -1013,13 +1022,7 @@
//开始
(function initialize() {
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 1, //总数据
pageSize: 100, //每页多少条数据
pageSizeString: "100"
};
/**************************************** function start*************************************************/
$scope.displayType = 2;
$scope.saveGroupType = 1;
......
......@@ -35,10 +35,10 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi
name: 'bsMappingVer', permission: constant.citPermission.dataPreview.bsMappingVer.queryCode,
text: $translate.instant('bsMappingVer'), icon: 'fa fa-bank'
},
{
name: 'assetsList', permission: constant.citPermission.dataPreview.assetsList.queryCode,
text: $translate.instant('AssetList'), icon: 'fa fa-bank'
},
// {
// name: 'assetsList', permission: constant.citPermission.dataPreview.assetsList.queryCode,
// text: $translate.instant('AssetList'), icon: 'fa fa-bank'
// },
{
name: 'salaryAdvance', permission: constant.citPermission.dataPreview.salaryAdvance.queryCode,
text: $translate.instant('salaryAdvance'), icon: 'fa fa-bank'
......
<div class="cit-import-asset-list">
<div class="top-area-wrapper" style="margin-top: 10px">
<div style="height: 58px">
<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
......@@ -8,8 +9,11 @@
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: 210px; width: 200px;" id="input-invoice-period-picker" />
<span translate="EAMDisposal" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;
<span class="text-bold" translate="InvoiceQJ" style="display: none"></span>
</div>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 210px;width: 200px;display: none" 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 class="dt-init-wrapper" style=" position: relative; top: -41px;">
......
......@@ -372,7 +372,7 @@
initPeriods();
initJournalEntryPagination();
//初始化查询条件-期间范围
$scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.periodStart = vatSessionService.year * 100 + 1;
$scope.queryParams.periodEnd = vatSessionService.year * 100 + 12;
$scope.queryParams.organizationId = vatSessionService.project.organizationID;
// if($rootScope.currentLanguage === 'en-us'){
......
<div class="cit-import-asset-list">
<div class="top-area-wrapper" style="margin-top: 10px">
<div style="height: 58px">
<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
......@@ -8,8 +9,10 @@
data-templateurl="app/cit/preview/cit-preview-salaryAdvance-list/vat-preview-salaryAdvance-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: 210px; width: 200px;" id="input-invoice-period-picker" />
<span translate="EAMDisposal" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;
<span class="text-bold" translate="InvoiceQJ" style="display: none"></span>
</div>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 210px;width: 200px;display: none" id="input-invoice-period-picker" />
<span ng-click="downloadTB()" style=" position: absolute; z-index: 99999999; top: 14px; right: 2%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
<div class="dt-init-wrapper" style=" position: relative; top: -20px;">
<div id="gridContainer" dx-data-grid="assetsResultGridOptions"></div>
......
......@@ -939,7 +939,7 @@ constant.citMenuList = [
constant.citPermission.dataPreview.journalMerge.queryCode,
constant.citPermission.dataPreview.bsGenerateVer.queryCode,
constant.citPermission.dataPreview.bsMappingVer.queryCode,
constant.citPermission.dataPreview.assetsList.queryCode,
// constant.citPermission.dataPreview.assetsList.queryCode,
constant.citPermission.dataPreview.salaryAdvance.queryCode,
constant.citPermission.dataPreview.eamDisposal.queryCode,
......
......@@ -196,7 +196,7 @@
width: '10%',
caption: $translate.instant('LogOperationTime'),
calculateCellValue: function(data) {
return new Date(data).formatDateTime('yyyy-MM-dd hh:mm:ss');
return new Date(data.operateTime).formatDateTime('yyyy-MM-dd hh:mm:ss');
}
}
],
......
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.1d7fe95e.css rel=preload as=style><link href=js/app.4bce033e.js rel=preload as=script><link href=js/chunk-vendors.cc3f6466.js rel=preload as=script><link href=css/chunk-vendors.1d7fe95e.css rel=stylesheet><link href=css/app.cf16809e.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.cc3f6466.js></script><script src=js/app.4bce033e.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.2f35f377.css rel=preload as=style><link href=js/app.b7d8d35c.js rel=preload as=script><link href=js/chunk-vendors.39b13767.js rel=preload as=script><link href=css/chunk-vendors.2f35f377.css rel=stylesheet><link href=css/app.cf16809e.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.39b13767.js></script><script src=js/app.b7d8d35c.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
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