Commit a3ba953d authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 5f5521a2 6433e6a3
package pwc.taxtech.atms.constant;
import java.io.File;
import java.text.DecimalFormat;
import java.util.Locale;
import java.util.UUID;
public final class Constant {
......@@ -50,6 +48,7 @@ public final class Constant {
public static final String IMAGE_FORMART_ = "png";
public static final String EMPTY = "";
public static final String DateTimeFormate = "%d年%d月";
public static final String DateTimeFormate1 = "%d-%d";
public static final String INPUT_RZJG_SUCCESS="1";
public static final String INPUT_RZJG_FAILED="2";
......
......@@ -14,6 +14,15 @@ public class ManualDataSourceDto {
Integer period;
Long reportId;
Long id;
String penValue;//穿透修改值
public String getPenValue() {
return penValue;
}
public void setPenValue(String penValue) {
this.penValue = penValue;
}
public Long getCellId() {
return this.cellId;
......
......@@ -159,7 +159,7 @@ public class TaxDocumentServiceImpl {
}
//创建人 creator
if (StringUtils.isNotBlank(taxDocumentDto.getCreator())) {
criteria.andCreatorEqualTo(taxDocumentDto.getCreator());
criteria.andCreatorLike("%" + taxDocumentDto.getCreator() + "%");
}
return example;
}
......
......@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.MissingArgEval;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
......@@ -31,12 +32,18 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return null;
}
String code = getStringParam(args[0], ec);
String code = getStringParam(args[0], ec);//科目代码
int year = getIntParam(args[1], ec);
int period = getIntParam(args[2], ec);
int sourceDataType = getIntParam(args[3], ec);//科目代码
String segment5 = getStringParam(args[4], ec);//利润中心代码
String segment6 = getStringParam(args[5], ec);//产品代码
int sourceDataType = getIntParam(args[3], ec);//取值数据源
String segment5 = null;
if(!(args[4] instanceof MissingArgEval)){
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")";
logger.debug(formulaExpression);
......
......@@ -2,6 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import com.alibaba.fastjson.JSON;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator;
import org.apache.poi.ss.formula.eval.*;
......@@ -10,7 +11,6 @@ import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
......@@ -222,20 +222,42 @@ public class FunctionBase {
if (!dss.isEmpty()) return dss.get(0).getAmount();
} else {
String evalStr = OperandResolver.coerceValueToString(eval);
if(StringUtils.isBlank(evalStr)){
evalStr = "0";
}
LOGGER.debug("[Formula_debug] eval other cell value {}", evalStr);
try {
BigDecimal bigDecimal = new BigDecimal(evalStr);
if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
if(evalStr.endsWith("%")){
evalStr = evalStr.replace("%","");
try {
BigDecimal bigDecimal = new BigDecimal(evalStr);
bigDecimal.divide(new BigDecimal(100));
if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
}
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
}
}else{
try {
BigDecimal bigDecimal = new BigDecimal(evalStr);
if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
}
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
}
} catch (Exception e) {
if (!dss.isEmpty())
return dss.get(0).getAmount();
e.printStackTrace();
}
}
return new BigDecimal(0);
......
......@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.MissingArgEval;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
......@@ -31,12 +32,19 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
return null;
}
String code = getStringParam(args[0], ec);
String code = getStringParam(args[0], ec);//科目代码
int year = getIntParam(args[1], ec);
int period = getIntParam(args[2], ec);
int sourceDataType = getIntParam(args[3], ec);//科目代码
String segment5 = getStringParam(args[4], ec);//利润中心代码
String segment6 = getStringParam(args[5], ec);//产品代码
int sourceDataType = getIntParam(args[3], ec);//取值数据源
String segment5 = null;
if(!(args[4] instanceof MissingArgEval)){
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
String formulaExpression = "JFFS(\"" + code + "\"," + year + "," + period + "," + sourceDataType + ",\"" + segment5 + "\",\"" + segment6 + "\")";
logger.debug(formulaExpression);
......
......@@ -7,7 +7,6 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import java.util.Calendar;
import java.util.Date;
......@@ -40,6 +39,9 @@ public class PC extends FunctionBase implements FreeRefFunction {
return new StringEval(String.format(Constant.DateTimeFormate, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
case "FilterDate":
return new StringEval(String.format(Constant.DateTimeFormate, formulaContext.getYear(), formulaContext.getPeriod()));
case "FilterDate1":
// String month = formulaContext.getPeriod()<10?"0"+formulaContext.getPeriod():formulaContext.getPeriod()+"";
return new StringEval(String.format(Constant.DateTimeFormate1, formulaContext.getYear(), formulaContext.getPeriod()));
case "TimeInterval":
Date beginOfPeriod = new Date(formulaContext.getYear(), formulaContext.getIsYear() ? 1 : formulaContext.getPeriod(), 1);
calendar.setTime(beginOfPeriod);
......
......@@ -59,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), "VAT020".equals(bo.getReportCode())?bo.getColumnIndex():(bo.getColumnIndex() - 1),
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex(),
Long.parseLong(cellTemplateData.getCellTemplateId()));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
nullCellDto.setAmount(cellValue);
......
......@@ -36,7 +36,7 @@ public class CitTbam extends BaseEntity implements Serializable {
private String organizationId;
private Long adjustAccount;
private List<OperationLogEntryLog> operationLogEntryLogList;
private OperationLogEntryLog[] operationLogEntryLogList;
public Long getAdjustAccount() {
return adjustAccount;
......@@ -46,11 +46,11 @@ public class CitTbam extends BaseEntity implements Serializable {
this.adjustAccount = adjustAccount;
}
public List<OperationLogEntryLog> getOperationLogEntryLogList() {
public OperationLogEntryLog[] getOperationLogEntryLogList() {
return operationLogEntryLogList;
}
public void setOperationLogEntryLogList(List<OperationLogEntryLog> operationLogEntryLogList) {
public void setOperationLogEntryLogList(OperationLogEntryLog[] operationLogEntryLogList) {
this.operationLogEntryLogList = operationLogEntryLogList;
}
......
......@@ -93,6 +93,7 @@
"ProjectYearCol": "年份",
"AssignRoleCol": "分配角色",
"SequenceNoCol": "序号",
"SequenceNumber":"序号",
"DocumentID": "档案ID",
"TaxGroup":"税种",
"DocumentAttr": "档案属性",
......
......@@ -82,7 +82,7 @@
columns: [
{
dataField: "id",
caption: $translate.instant('DocumentID'),
caption: $translate.instant('SequenceNumber'),
allowHeaderFiltering: true,
cellTemplate: function (container, options) {
try {
......@@ -241,6 +241,9 @@
};
};
$scope.exportEventTrigger = function(){
$(".dx-datagrid-export-button").click();
};
//弹出框
var openEditPop = function (rowId) {
if (rowId) {
......
......@@ -7,6 +7,11 @@
line-height: 34px;
float: none;
}
div.dx-datagrid-export-button{
display: none;
}
</style>
<div class="menu-header">
<div class="menu-title" translate="DocumentTypeSets"></div>
......@@ -17,13 +22,14 @@
</div>
<div class="content-container">
<div class="row" style="margin-top:15px; text-align:right;padding:1rem;background: #fff">
<button style="width: 150px;" class="btn btn-in-panel-big" ng-click="exportEventTrigger()">
<i class="fa fa-file-excel-o"></i>
{{'ExportTable' | translate}}
</button>
<button style="width: 150px;" class="btn btn-in-panel-big" ng-click="openEditPop()">
<i class="material-icons button-icons">add_circle_outline</i>
{{'addFileType' | translate}}
</button><!----><!--ng-disabled="!hasAddPermission"-->
<!--<button class="btn btn-export">
导出档案类型
</button>-->
</button>
</div>
<div style="padding:0 1rem;background:#fff">
<div class="dx-viewport demo-container">
......@@ -42,14 +48,15 @@
<div class="modal-dialog" style="width:550px;height:200px;" role="document">
<div class="modal-content">
<form class="form-horizontal" name="newDocFileTypeForm" ng-submit="confirmDocFileType()">
<div class="modal-header">
<div class="modal-title"><span translate="createDocFileType"></span></div>
<div class="modal-title"><span translate="CreateDocFileType"></span></div>
</div>
<div class="modal-body">
<!--序号-->
<div class="form-group" hidden>
<label for="SequenceNoCol" class="col-sm-3 control-label" translate="SequenceNoCol"></label>
<label for="SequenceNoCol" class="col-sm-3 control-label" translate="SequenceNumber"></label>
<div class="col-sm-11" style="width:61.67%">
<input class="form-control"
id="SequenceNoCol"
......@@ -93,17 +100,16 @@
<!--<span style="color:red"> * <span translate="Require"></span> </span>-->
<!--</div>-->
</div>
<!--说明-->
<!--描述-->
<div class="form-group">
<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"
placeholder="请输入..."
required style="width:320px;" maxlength="50" />
style="width:320px;" maxlength="50" />
</div>
</div>
<!--必填字段-->
......@@ -131,7 +137,7 @@
<input class="form-control" id="Remarks"
ng-model="editModel.remarks"
placeholder="请输入..."
required style="width:320px;" maxlength="50" />
style="width:320px;" maxlength="50" />
</div>
</div>
<!--状态-->
......@@ -145,8 +151,8 @@
<label class="col-sm-5 DM-state-label">
<input type="radio" name="editModelState"
value=1
ng-checked="editModel.status == 1"
ng-model="editModel.status" required />
ng-checked="editModel.status == 1 || editModel.status == null || editModel.status == undefined"
ng-model="editModel.status"/>
<span translate="Enable"></span>
</label>
<label class="col-sm-5 DM-state-label">
......
......@@ -1212,6 +1212,7 @@
// 更新spreadjs计算所需datasource信息
$scope.updateCellByManualChange = function (manualData) {
debugger;
var cellData = _.find($scope.reportData, function (x) {
return x.cellTemplateID == manualData.cellTemplateId
|| x.cellID === manualData.cellId;
......@@ -1551,36 +1552,48 @@
//单元格详细信息点击确定时执行
$scope.confirm = function () {
if (vatSessionService.month)
vatSessionService.project.period = vatSessionService.month;
vatApproveService.approvalStatus(vatSessionService.project.id, vatSessionService.project.period).success(function (result) {
$scope.handInputModel.name = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.description = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.projectID = vatSessionService.project.id;
$scope.handInputModel.serviceTypeID = vatSessionService.project.serviceTypeID;
$scope.handInputModel.period = vatSessionService.month;
//日志对象
logDto.ID = PWC.newGuid();
logDto.CreateTime = new Date();
logDto.UpdateTime = new Date();
logDto.OperationContent = "Amount: " + $scope.handInputModel.amount
+ "; Description: " + $scope.handInputModel.description + "keyinData:" + $scope.handInputModel.keyinData;
logDto.OperationName = $translate.instant('ManualInputDataSource');
logDto.Comment = comment + "(Cell ID:" + $scope.handInputModel.cellID
+ ", Cell Template ID:" + $scope.handInputModel.cellTemplateID + ")";
logDto.OperationType = enums.vatLogOperationTypeEnum.RV_ManualInput;
if (result && result == 'committed') {
SweetAlert.error('报表提审中!');
} else {
$scope.handInputModel.name = $scope.taxCellDetail.inputMemo;
var r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;
}/*else if(($scope.taxCellDetail.penValue != undefined && $scope.taxCellDetail.penValue != null) && $scope.taxCellDetail.keyinData){//手工输入和穿透合并值都存在
$scope.handInputModel.penValue = $scope.taxCellDetail.penValue;//
$scope.handInputModel.keyinData = $scope.taxCellDetail.keyinData;
return vatReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
var obj = manualData.data.data;
obj.dataSourceType = manualData.dataSourceType;
$scope.updateCellByManualChange(obj);
return $q.when();
});
return $q.reject();
}*/ else {
/* var r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;*/
if ($scope.taxCellDetail.keyinData) {
$scope.handInputModel.keyinData = $scope.taxCellDetail.keyinData;
} else {
$scope.handInputModel.amount = $scope.taxCellDetail.inputValue;
}
$scope.handInputModel.description = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.projectID = vatSessionService.project.id;
$scope.handInputModel.serviceTypeID = vatSessionService.project.serviceTypeID;
$scope.handInputModel.period = vatSessionService.month;
if ($scope.handInputModel.amount || $scope.handInputModel.name || $scope.handInputModel.keyinData) {
//日志对象
logDto.ID = PWC.newGuid();
logDto.CreateTime = new Date();
logDto.UpdateTime = new Date();
logDto.OperationContent = "Amount: " + $scope.handInputModel.amount
+ "; Description: " + $scope.handInputModel.description + "keyinData:" + $scope.handInputModel.keyinData;
logDto.OperationName = $translate.instant('ManualInputDataSource');
logDto.Comment = comment + "(Cell ID:" + $scope.handInputModel.cellID
+ ", Cell Template ID:" + $scope.handInputModel.cellTemplateID + ")";
logDto.OperationType = enums.vatLogOperationTypeEnum.RV_ManualInput;
if($scope.taxCellDetail.penValue != undefined && $scope.taxCellDetail.penValue != null){
$scope.handInputModel.penValue = $scope.taxCellDetail.penValue;
}
if ($scope.handInputModel.amount || $scope.handInputModel.name || $scope.handInputModel.keyinData || $scope.handInputModel.penValue ) {
// 前端保存数据
return vatReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
var obj = manualData.data.data;
......@@ -2072,7 +2085,6 @@
$scope.closeModal = function () {
$scope.modalInstance.dismiss('cancel');
};
setApproveValue(operationTypeId);
}
......@@ -2294,6 +2306,7 @@
}
var modelFillBackFunc = $scope.$on("ModelWriteBackHasChanged", function (event, data) {
var dataSource = {
id: data.dataSourceId,
name: 'ModelBackFill',
......
......@@ -13,6 +13,7 @@
QMYETotalend: ""
}
}
var _logIndex =0;
if($scope.relObj.logs == undefined || $scope.relObj.logs.length == 0){
$scope.relObj.logs = [];
}
......@@ -51,14 +52,17 @@
$log.debug($scope.selectedItems);*/
$scope.doCalcute(selectedItems.selectedRowsData);
var _in = {};
if(selectedItems.currentDeselectedRowKeys.length == 0){
selectedItems.currentSelectedRowKeys[0].operate = '增'
$scope.relObj.logs.push(selectedItems.currentSelectedRowKeys[0]);
_in.operate = "增";
_in.accountingDate = selectedItems.currentSelectedRowKeys[0];
_in.voucherNum = selectedItems.currentSelectedRowKeys[0];
}else{
selectedItems.currentDeselectedRowKeys[0].operate = '减';
$scope.relObj.logs.push(selectedItems.currentDeselectedRowKeys[0]);
_in.operate = "减";
_in.accountingDate = selectedItems.currentDeselectedRowKeys[0];
_in.voucherNum = selectedItems.currentDeselectedRowKeys[0];
}
$scope.relObj.logs.push(_in);
},
allowColumnResizing: true,
hoverStateEnabled: true,
......
<div>
<div class="modal fade" id="entryLogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 1100">
<div class="modal fade" id="entryLogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 1100">
<div class="modal-dialog modal-lg" style="width: 1200px;">
<div class="modal-content">
<div class="modal-header">
......
citModule.controller('citTaxReportCellDetailModalController', ['$log', 'apiInterceptor', 'Upload', '$scope', '$q', '$translate', '$uibModal', '$document', '$rootScope', 'SweetAlert', 'enums',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', 'commonWebService', 'dxDataGridService',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', 'commonWebService', 'dxDataGridService', 'commonWebService',
function ($log, apiInterceptor, Upload, $scope, $q, $translate, $uibModal, $document, $rootScope, SweetAlert, enums, vatReportService, loginContext,
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService, dxDataGridService) {
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService, dxDataGridService, commonWebService) {
var activeClass = 'active';
$scope.currentUserName = loginContext.userName;
......@@ -578,7 +578,6 @@
$scope.selectedTabIndex != enums.formulaDataSourceType.Special) {
$("#dataGridFooterSummary").show();
$scope.dataGridHeight = 165;
} else {
$("#dataGridFooterSummary").hide();
$scope.dataGridHeight = 195;
......@@ -1549,28 +1548,28 @@
//重新计算合计值
var calculateSum = function (n) {
var precition = 2;
var evalVal = _.reduce($scope.detail.dataGridSourceBind, function (memo, x) {
if (x.accountCode == $scope.relObj.account) {
if ((x.accountCode == $scope.relObj.account) && x.accountCode != undefined && $scope.relObj.account != undefined) {
memo + n;
} else {
return memo + x.endBalance;
return memo + x.endingBalance;
}
}, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(evalVal, true));
$scope.detail.penValue = evalVal.formatAmount(evalVal, true);
}
$scope.showLog = function () {//显示日志
alert('调用了');
//在点击日志前 科目代码下是否有日志
cellCommentService.selectEntryLog(entryLogIdByCode).success(function(res){
if(res.data){
$scope.relObj.logs = res.data;
cellCommentService.selectEntryLog($scope.detail.entryLogIdByCode).success(function (res) {
if (res.data) {
$scope.relObj.logs = commonWebService._index(res.data.concat($scope.relObj.logs));
$('#entryLogModal').modal('show');
}
}).error();
$('#entryLogModal').modal('show');
}).error(function (error) {
alert("日志信息获取失败");
});
}
//显示分录信息 同时加载数据
......@@ -1580,14 +1579,18 @@
cellCommentService.loadEntryListDataList(e.data.accountCode).success(function (res) {
$scope.relObj.account = e.data.accountCode;
if (res.resultMsg == "success") {
$scope.relObj.entryDataSource = commonWebService._index(res.data)
$scope.relObj.entryDataSource = commonWebService._index(res.data);
}
$('#entryListModal').modal('show')
$('#entryListModal').modal('show');
}).error(function (error) {
alert(error);
});
}
//-------------------------------------------------------------------- end --------------------------------------------------------------
//设置数据源表格的列
var getAllDataGridColumns = function () {
var dataGridColumns;
......@@ -1742,9 +1745,6 @@
}
return dataGridColumns;
};
//-------------------------------------------------------------------- end --------------------------------------------------------------
//添加数据源(发票|凭证)数据过滤
var allDataFilter = function (config, data) {
var dataGridColumns;
......@@ -2228,6 +2228,7 @@
}
$scope.$watch('detail.dataGridSource', function (newVal, oldValue) {
$timeout(function () {
$scope.selectedTabIndex = $scope.detail.cellType;
$scope.selectedTabId = $scope.detail.cellTypeId;
......@@ -2278,8 +2279,10 @@
});
var getBlowGridData = function (data) {
cellCommentService.getCellInformation(data).success(function (res) {
debugger;
if (res.resultMsg) {
$scope.detail.dataGridSourceBind = [res.data[0]];
$scope.detail.dataGridSourceBind = res.data;
calculateSum(null);
}
}).error(function (error) {
});
......
......@@ -302,9 +302,8 @@
<!--分录弹框-->
<entry-list-modal id ="entryListId" rel-obj = "relObj" ></entry-list-modal>
<entry-log id ="entryLogId" rel-obj = "relObj" show-log = "showLog" ></entry-log>
<entry-list-modal id ="entryListId" rel-obj = "relObj" show-log = "showLog()" ></entry-list-modal>
<entry-log id ="entryLogId" rel-obj = "relObj" ></entry-log>
</div>
<div class="tax-report-cell-detail" id="addSourceContainer"></div>
......
......@@ -50,7 +50,10 @@
}
if (!Number.prototype.formatAmount) {
Number.prototype.formatAmount = function (decPlaces) {
Number.prototype.formatAmount = function (decPlaces, type) {
if(type){
return Number(decPlaces.toString().match(/^\d+(?:\.\d{0,2})?/));
}
decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces;
var n = this.toFixed(decPlaces);
if (decPlaces) {
......
......@@ -111,7 +111,8 @@
title="{{selected}}"
readonly
ng-model="selected">
<button type="button" class="input-arrow-drop-button">
<button type="button" class="input-arrow-drop-button"
ng-click="showMenu()">
</button>
<button type="button" class="input-reset-button"
ng-click="clearInput()"
......
......@@ -92,17 +92,10 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField: "id",
caption: "",
cellTemplate: function (container, options) {
// var targetString = '<input name="dataGridCheckBox" ng-click="sniffCheckbox()"' +
// 'data-id="'+options.data.id+'" ' +
// 'data-url="'+options.data.filePositionUrl+'" ' +
// 'type="checkbox">';
// var eventTarget = $(targetString);
// $compile(eventTarget)($scope);
// container.append(eventTarget);
var target = $('<input name="dataGridCheckBox" type="checkbox" '+
'data-id="'+options.data.id+'" '+
'data-url="'+options.data.filePositionUrl+'"/>');
target.off('click').on('click',function(){
var target = $('<input name="dataGridCheckBox" type="checkbox" ' +
'data-id="' + options.data.id + '" ' +
'data-url="' + options.data.filePositionUrl + '"/>');
target.off('click').on('click', function () {
$scope.sniffCheckbox();
});
container.append(target);
......@@ -1127,6 +1120,16 @@ taxDocumentManageModule.directive('helpPop', function () {
$("#helpPopDialog").modal("show");
})
};
$scope.sniffHelpPopRadio = function(){
$("input[name='helpPopRadio']").each(function (index,item) {
if(item.checked){
$scope.editFieldModel.fileAttr = item.getAttribute("data-fileAttr");
$scope.editFieldModel.fileType = item.getAttribute("data-fileType");
$scope.syncRequiredFields($scope.editFieldModel);
}
});
};
$scope.help_dataGridUpdate = function (_data) {
$scope.help_cacheData = _data.items;
$scope.help_dataGridOptions = {
......@@ -1151,6 +1154,21 @@ taxDocumentManageModule.directive('helpPop', function () {
columnAutoWidth: true,
allowColumnReordering: true,
columns: [
{
dataField: "",
caption: "",
cellTemplate: function (container, options) {
var target = $('<input name="helpPopRadio" type="radio" ' +
'data-id="helpPop_' + options.data.id + '" ' +
'data-fileAttr="' + options.data.fileAttr + '" ' +
'data-fileType="' + options.data.fileType +
'" />');
container.append(target);
// target.parents("tr").off('click').on('click', function () {
// $scope.sniffHelpPopRadio(options.data.id);
// });
}
},
{
dataField: "fileAttr",
caption: $translate.instant('DocumentAttr'),
......
......@@ -922,10 +922,10 @@
</select>
</div>
<div class="DTL-special-external-btn" title="查看类型列表">
<!--<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>
</div>
</div>-->
</div>
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label">
......@@ -1151,6 +1151,11 @@
<div class="dx-viewport demo-container" id="helpPopContainer">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" translate="Confirm" ng-click="sniffHelpPopRadio()"></button>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()"
translate="Cancel"></button>
</div>
</div>
</div>
</div>
......
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