Commit df8996da authored by kevin's avatar kevin

#数据穿透

parent 86a8faee
......@@ -5,9 +5,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dao.CitJournalEntryAdjustMapper;
import pwc.taxtech.atms.dao.CitTbamMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.CitJournalEntryAdjust;
import pwc.taxtech.atms.vat.dao.JournalEntryMapper;
import pwc.taxtech.atms.vat.entity.CellComment;
import pwc.taxtech.atms.vat.entity.PeriodCellComment;
import pwc.taxtech.atms.vat.service.impl.CellCommentServiceImpl;
......@@ -32,6 +35,8 @@ public class CellCommentController {
}
@Autowired
private CitTbamMapper citTbamMapper;
@Autowired
private CitJournalEntryAdjustMapper citJournalEntryAdjustMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
......@@ -40,8 +45,22 @@ public class CellCommentController {
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql){
OperationResultDto operationResultDto = new OperationResultDto();
operationResultDto.setResultMsg("success");
int from = sql.indexOf("from");
sql = sql.substring(from);
operationResultDto.setData(citTbamMapper.selectBySql(sql));
operationResultDto.setResultMsg("success");
return operationResultDto;
}
//加载分录表格数据
@RequestMapping("loadEntryListDataList")
public OperationResultDto loadEntryListDataList(String code){
OperationResultDto operationResultDto = new OperationResultDto();
CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
citJournalEntryAdjust.setSubjectCode(code);
List<CitJournalEntryAdjust> journalMerge = citJournalEntryAdjustMapper.getJournalMerge(citJournalEntryAdjust);
operationResultDto.setData(journalMerge);
operationResultDto.setResultMsg("success");
return operationResultDto;
}
}
......@@ -350,7 +350,7 @@
and org_code = #{orgCode,jdbcType=VARCHAR}
</if>
<if test="subjectCode != null">
and subject_code = #{record.subjectCode,jdbcType=VARCHAR}
and subject_code = #{subjectCode,jdbcType=VARCHAR}
</if>
<if test="orgName != null">
and org_name = #{orgName,jdbcType=VARCHAR}
......
......@@ -2,89 +2,102 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.CitTbamMapper">
<insert id="insertBatch" parameterType="java.util.List">
insert into cit_tbam
(<include refid="Base_Column_List"/>)
values
<foreach collection="list" item="item" index="index" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=BIGINT},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.organizationId != null">#{item.organizationId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.date != null">#{item.date,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.source != null">#{item.source,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountPeriod != null">#{item.accountPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.attribute != null">#{item.attribute,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountCode != null">#{item.accountCode,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountDescription != null">#{item.accountDescription,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.debitAmount != null">#{item.debitAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.creditAmount != null">#{item.creditAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.beginningBalance != null">#{item.beginningBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.endingBalance != null">#{item.endingBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
</trim>
</foreach>;
SELECT 1 FROM DUAL;
</insert>
<insert id="insertBatch" parameterType="java.util.List">
insert into cit_tbam
(<include refid="Base_Column_List"/>)
values
<foreach collection="list" item="item" index="index" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=BIGINT},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.organizationId != null">#{item.organizationId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.date != null">#{item.date,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.source != null">#{item.source,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountPeriod != null">#{item.accountPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.attribute != null">#{item.attribute,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountCode != null">#{item.accountCode,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountDescription != null">#{item.accountDescription,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.debitAmount != null">#{item.debitAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.creditAmount != null">#{item.creditAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.beginningBalance != null">#{item.beginningBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.endingBalance != null">#{item.endingBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
</trim>
</foreach>
;
SELECT 1 FROM DUAL;
</insert>
<select id ="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.dpo.CitTbamDto">
<if test ="sql != null and sql != '' ">
${sql}
</if>
</select>
<select id="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.dpo.CitTbamDto">
select
id as id,
attribute attribute,
account_code as accountCode,
account_description accountDescription,
debit_amount as debitAmount ,
credit_amount as creditAmount,
beginning_balance as beginningBalance,
ending_balance as endingBalance
<if test="sql != null and sql != '' ">
${sql}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -1178,10 +1178,11 @@
"remitTime" : "汇款时间",
"remitAmount" : "汇款金额",
"gatheringCompanyName" : "收款公司名称",
"gatheringCompanyAccount":"收款公司账号"
"gatheringCompanyAccount":"收款公司账号",
"checkBox": "勾选",
"QMYETotalFirst" : "期末余额合计(借-贷)",
"QMYETotalend" : "期末余额合计(贷-借)",
"Backfill any adjusted total value back to the adjusted amount" : "单选任意合计值回填至调整后金额",
"BackAdjustAmount" : "调整后金额"
}
\ No newline at end of file
......@@ -24,12 +24,13 @@
</cit-report-sheet>
</div>
<cell-detail-panel detail="cellDetail" id="cell-detail" source-type="isBSPLSpecial"></cell-detail-panel>
<tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" active-sheet = "activeSheet"
<cit-tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" active-sheet = "activeSheet"
<!--service-type="serviceType"
on-update-data-source="updateCellByManualChange(manualData)"
on-delete-data-source="updateCellByManualSourceDelete(dataSourceId, cellId)"
on-delete-data-source-detail="updateCellBySourceDetailDelete(dataSource, detailId, opType)"-->>
</tax-report-cell-detail-modal>
</cit-tax-report-cell-detail-modal>
<vat-operate-log period="period" module-type="moduleid" is-show="isShowLog"></vat-operate-log>
<div class='export-container hidden'></div>
<div id="export" class="hidden"></div>
......
citModule.controller('entryListModalController', ['$log', 'apiInterceptor', 'Upload', '$scope', '$q', '$translate', '$uibModal', '$document', '$rootScope', 'SweetAlert', 'enums',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService',
function ($log, apiInterceptor, Upload, $scope, $q, $translate, $uibModal, $document, $rootScope, SweetAlert, enums, vatReportService, loginContext,
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService) {
var entityInit = function () {
//初始化值
$scope.entry = {
JFFSETotal: "",
DFFSETotal: "",
QMYETotalFirst: "",
QMYETotalend: ""
}
}
entityInit();
$scope.dataGridOptions = {
bindingOptions: {
columns: 'entryListColumns',
dataSource: 'relObj.entryDataSource'
},
loadPanel: {
enabled: false
},
scrolling: {
mode: "standard"
},
selection: {
mode: "multiple"
},
sorting: {
mode: 'single'
},
filterRow: {
visible: true
},
searchPanel: {
visible: true,
width: 240,
placeholder: $translate.instant('SearchPlaceholder')
},
onSelectionChanged: function (selectedItems) {
/* $scope.selectedItems = $.map(selectedItems.selectedRowsData, function (data) {
$scope.selectedAddDatasourceItems = selectedItems.selectedRowsData;
return data.id;
});
$log.debug($scope.selectedItems);*/
$scope.doCalcute(selectedItems.selectedRowsData);
},
allowColumnResizing: true,
hoverStateEnabled: true,
showBorders: true,
showRowLines: true,
showColumnLines: true,
};
//设置数据源表格的列
var getEntryListColumns = function () {
var dataGridColumns;
dataGridColumns = [
{
dataField: 'index',
caption: $translate.instant('ImportErrorPopUpNoCol'),
alignment: 'center'
},
{
dataField: 'accountingDate',
caption: $translate.instant('JournalPZRQ'),
alignment: 'left',
dataType: 'date',
customizeText: function (cellInfo) {
if (cellInfo && cellInfo.value) {
return new Date(cellInfo.value).dateTimeToString('yyyyMMdd');
}
return "";
}
},
{
dataField: 'voucherNum',
caption: $translate.instant('AccountVoucher_DataGrid_ColVID'),
alignment: 'center'
},
{
dataField: 'description',
caption: $translate.instant('JournalZY'),
alignment: 'center'
},
{
dataField: 'accountedDr',//借方发生额
caption: $translate.instant('DebitAmount'),
alignment: 'right'
},
{
dataField: 'accountedCr',//贷方发生额
caption: $translate.instant('CreditAmount'),
alignment: 'right'
},
];
return dataGridColumns;
};
$scope.entryListColumns = getEntryListColumns();
//确定
$scope.makeSure = function () {
$scope.relObj.checkRadio = $scope.checkRadio;
$('#entryListModal').modal('hide');
}
$scope.cancel = function () {
$('#entryListModal').modal('hide');
entityInit();
}
$scope.hideCellAttachmentModel = function () {
$('#entryListModal').modal('hide');
}
//
//配置计算公式进行计算
$scope.doCalcute = function (data) {
debugger;
var v1 = 0;//借方发生额合计
var v2 = 0//贷方发生额合计
var _index = 0;
data.forEach(function (item) {
if (_index == 0) {
v1 = parseFloat(item.accountedDr);
v2 = parseFloat(item.accountedCr);
} else {
v1 += v1 + parseFloat(item.accountedDr);
v2 += v2 + parseFloat(item.accountedCr);
}
});
$scope.entry.JFFSETotal = v1;
$scope.entry.DFFSETotal = v2;
$scope.entry.QMYETotalFirst = v2 - v1;
$scope.entry.QMYETotalend = v1 - v2;
}
$scope.showLog = function () {
alert('查看日志');
}
}
]);
\ No newline at end of file
<div class="modal fade" id="entryListModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" style="width: 1200px;" >
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true"
ng-click="hideCellAttachmentModel()">×</span>
<h4 class="modal-title" translate="AccountVoucher_AccountVoucher"></h4>
</div>
<div class="row" style="margin-top: 10px;">
<div class="col-sm-8">
<span translate="EntempriseAccount"></span>
<input type="text" readonly ng-model="relObj.account"><!--会计科目-->
</div>
<div class="col-sm-4">
<div class="row">
<div class="menu-log" style="display: inline-block">
<a class="btn btn-not-important" href="javascript:void(0)" ng-click="showLog()"> <i class="material-icons" style = "margin-bottom: 9px;">description</i><span>日志</span></a>
</div>
<div class="button" style="display: inline-block">
<button type="button" class="btn btn-primary" ng-click="makeSure()">确定</button>
<button type="button" class="btn btn-third" ng-click="cancel()">取消</button>
</div>
</div>
</div>
</div>
<div class="dx-viewport">
<div id="dataSourceGrid" dx-data-grid="dataGridOptions"></div>
</div>
<div class="row backColor" style="margin-right: 0px;">
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "checkRadio" ng-value="entry.JFFSETotal" > <h4 translate="JFFSETotal"></h4>:{{entry.JFFSETotal}}
</div>
<div class="col-sm-3 ">
<span><input type="radio" name ="checkRadio" ng-model = "checkRadio" ng-value="entry.DFFSETotal" > <h4 translate="DFFSETotal"></h4>:{{entry.DFFSETotal}}</span>
</div>
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "checkRadio" ng-value="entry.QMYETotalFirst" > <h4 translate="QMYETotalFirst"></h4>:{{entry.QMYETotalFirst}}
</div>
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "checkRadio" ng-value="entry.QMYETotalend" > <h4 translate="QMYETotalend"></h4>:{{entry.QMYETotalend}}
</div>
</div>
<div class="row">
<div class="col-sm-6">
<span translate="Backfill any adjusted total value back to the adjusted amount"></span>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
citModule.directive('entryListModal', ['$log',
function ($log) {
return {
restrict: 'E',
templateUrl: '/app/cit/report/entryList-modal/entryList-modal.html' + '?_=' + Math.random(),
scope: {
relObj : '='
},
controller: 'entryListModalController',
link: function ($scope, $element, $attr) {
}
}
}]);
\ No newline at end of file
@small-panel-height: 40px;
@small-panel-margin: 10px;
@small-panel-border-color: #E4E4E4;
@tab-not-selected: #bababa;
@focus: #c00;
@btn-color: white;
@btn-not-focus: #777;
#entryListModal{
.backColor{
background-color: #a09595b3;
}
.backColor{
h4 {
display: inline-block;
}
}
}
\ No newline at end of file
<div class="add-voucher-range-propover">
<div class="propover-header">
<span class="left-title">{{'VoucherRange' | translate}}</span>
<span ng-click="closePropover();" class="right-close-btn">x</span>
</div>
<div class="propover-content">
<div class="filter-way-pan">
<input type="radio" name="filter-name" ng-model="voucherRange.filterWay" value="1" />科目
&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="filter-name" ng-model="voucherRange.filterWay" value="2" />摘要
</div>
<div class="add-account-content" ng-show="voucherRange.filterWay!=2">
<div class="add-voucher-range-btn" ng-click="showSelectAccountPop();">
<i class="material-icons add-icon">add_circle</i>{{'AddAccount' | translate}}
</div>
<div dx-data-grid="voucherRangeOptions"></div>
</div>
<div class="add-remark-content" ng-show="voucherRange.filterWay==2">
<input type="text" ng-model="voucherRange.voucherKeyword" placeholder="请输入摘要关键词" />
</div>
</div>
<div class="propover-footer">
<button ng-click="voucherRangeConfirm();" class="btn btn-default btn-focus">{{'Confirm' | translate}}</button>
<button ng-click="closePropover();" class="btn btn-default btn-second">{{'ButtonCancel' | translate}}</button>
</div>
</div>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<div class="tax-report-cell-detail" id="taxReportCellDetailModal" style="display: none;">
<!--<div class="cell-detial-show"></div> taxReportCellDetailContainer-->
<div class="header" ng-show="!contentStatus">
<span class="drag-icon">
<i class="fa fa-arrows" aria-hidden="true"></i>
</span>
<span class="close-icon" ng-click="hidePanel();">
<i class="fa fa-times" aria-hidden="true"></i>
</span>
<span class="expand-icon" ng-click="togglePanel();">
<i class="fa" ng-class="isExpand?'fa-chevron-up':'fa-chevron-down'" aria-hidden="true"></i>
</span>
</div>
<div class="content" id="cellDetailConent" ng-show="!contentStatus">
<div class="tab-type">
<span ng-model="tabType" uib-btn-radio="1">{{'CellInfo' | translate}}</span>
<!--<span ng-model="tabType" uib-btn-radio="2">-->
<!--<i ng-show="detail.hasModelError" class="fa fa-exclamation-circle red-color"></i>-->
<!--{{'ModelAnalysisResults' | translate}}</span>-->
<span ng-show="detail.validationErrorList && detail.validationErrorList.length > 0" ng-model="tabType"
uib-btn-radio="3"><i class="fa fa-exclamation-circle red-color"></i>{{'ReportCheckResult' | translate}}</span>
<span ng-model="tabType" uib-btn-radio="4">{{'cellComment'|translate}}</span>
<span ng-model="tabType" uib-btn-radio="5" ng-click = "loadAttach()">{{'RelatedAttach'|translate}}</span>
</div>
<div class="content-info" ng-show="tabType === 1">
<div class="cell-info-sammary">
<!-- <div class="tab tab-selected cell-info-title">{{'CellInfo' | translate}}</div> -->
<div class="cell-info-content">
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label>
{{numToExcelChar(detail.rowIndex, detail.columnIndex)}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'RowName' | translate}}:</label>
{{detail.cellInfo.project}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label>
{{detail.cellInfo.column}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList" include-optional="false"
account-data-source="accountDataSource" formula-exp="detail.config.formula"></formula-translator>
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'SourceOrFormula' | translate}}:</label>
{{detail.cellInfo.description}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'CellValue' | translate}}:</label>
<span title="{{detail.cellInfo.modifiedReportCell?detail.cellInfo.modifiedReportCell.comment:''}}">{{detail.cellInfo.money}}</span>
<!--<a href="javascript:void(0)" ng-click="openModifyCellDataDialog()">{{'Change' | translate}}</a>-->
<a href="javascript:void(0)" ng-if="detail.cellInfo.modifiedReportCell != null"
ng-click="resetReportCell()">{{'Reset' | translate}}</a>
</div>
</div>
</div>
<div class="data-source-info">
<div class="data-source-title">
<span class="data-source-title-left">{{'DataSourceInfo' | translate}}</span>
<span class="data-source-title-right">{{'DataSourceCountFirst' | translate}}{{detail.dataSourceCount}}{{'DataSourceCountSecond' | translate}}</span>
</div>
<div ng-if="detail.dataSourceCount > 0 || detail.hasKeyIn || detail.config.hasInvoice || detail.config.hasVoucher"
class="tab-container">
<div class="tab" data-type="{{item.type}}" data-type-id="{{item.id}}" data-type-name="{{item.name}}"
data-tab-index="1" ng-repeat="item in detail.items"
ng-class="{'tab-selected':checkIfSelectedTab(1, item)}"
ng-click="changeTabColor(item.type, item.id, item.name, item.operationType);changeVisibleDataSourceContainer(1);removeVoucherFilterTab($event);">
<!--设置tab的左侧标记信息-->
<div ng-if="(item.operationType==1 || !item.operationType) && !(item.type === InvoiceFilter || item.type === voucherFilter)"
style="float:left;color:#fff;width:40px;text-align:center;font-size:12px;">
<div class="fa fa-plus-circle"></div>
</div>
<div ng-if="item.operationType==2 && !(item.type === InvoiceFilter || item.type === voucherFilter)"
style="float:left;color:#fff;width:40px;text-align:center;font-size:12px;">
<div class="fa fa-minus-circle"></div>
</div>
<div ng-if="(item.operationType==1 || !item.operationType) && (item.type === InvoiceFilter || item.type === voucherFilter)"
style="float:left;color:#fff;width:40px;text-align:center;font-size:12px;line-height:16px;">
<div class="fa fa-plus-circle"></div>
<div style="border:1px solid #eee;border-radius:4px;background-color:#fff;color:#555;width:30px;margin-left:5px;">
{{'HandWork' | translate}}
</div>
</div>
<div ng-if="item.operationType==2 && (item.type === InvoiceFilter || item.type === voucherFilter)"
style="float:left;color:#fff;width:40px;text-align:center;font-size:12px;line-height:16px;">
<div class="fa fa-minus-circle"></div>
<div style="border:1px solid #eee;border-radius:4px;background-color:#fff;color:#555;width:30px;margin-left:5px;">
{{'HandWork' | translate}}
</div>
</div>
<div ng-class="{'tab-text':item.type === InvoiceFilter || item.type === voucherFilter}">
{{item.name | translate}}
</div>
<span class="removeTab"
ng-if="item.type === InvoiceFilter || item.type === voucherFilter || item.type === ModelDatasource">x</span>
</div><!-- Remove blank between two data source tabs
-->
<div class="tab" data-tab-index="2"
ng-class="{'tab-selected':checkIfSelectedTab(2), 'tab-second': detail.dataSourceCount > 1}"
ng-if="detail.hasKeyIn" ng-click="changeVisibleDataSourceContainer(2)">
<div style="float:left;color:#fff;width:40px;text-align:center;font-size:12px;">
<div class="fa fa-plus-circle"></div>
</div>
{{'ManualInput' | translate}}
</div>
<div ng-if="detail.config.hasInvoice || detail.config.hasVoucher" class="tab-add"
ng-click="addDataSource()">
<i class="material-icons add-icon">add_circle</i><a translate="AddDataSource"></a>
</div>
</div>
<div class="data-source-detail-container">
<!--数据源-->
<div class="income-data-source" ng-if="selectedDataSourceTabIndex === 1 && detail.cellType != 0">
<div ng-if="selectedTabIndex === voucherFilter" class="tab-add-voucher-container">
<div ng-click="addInvoiceAndVoucher(voucherFilter)" class="add-voucher">{{'AddCertificate' |
translate}}
</div>
<a ng-click="openAcctPropover();" atms-popover data-placement="bottom"
data-popover-auto-hide="false" data-popover-container=".income-data-source"
data-templateurl="/app/common/controls/tax-report-cell-detail-modal/add-voucher-range.html"
class="tab-add-voucher-area">
{{'VoucherRange' | translate}}
</a>
<div class="clear"></div>
</div>
<div class="add-invoice-top-line" ng-if="detail.cellType == InvoiceFilter">
<div ng-click="addInvoiceAndVoucher(InvoiceFilter)" class="add-invoice">{{'AddInvoice' |
translate}}
</div>
</div>
<div id="dataSourceGrid" ng-if="detail.cellType !== 19" dx-data-grid="dataSourceOptions"></div>
<div id="dataGridFooterSummary" ng-if="detail.cellType !== 19"
style="margin-top:-1px;border:1px #ccc solid;height: 30px;line-height:30px; vertical-align:middle;text-align:right;display:none;width:100%;"></div>
<div class="hand-input-container" ng-if="detail.cellType === 19">
<div class="hand-input-line">
<span>{{'HandInputValue' | translate}}:</span>
<span ng-if="!detail.keyinData">{{detail.dataGridSource[0].money}}</span>
<span ng-if="detail.keyinData">{{detail.dataGridSource[0].keyinData}}</span>
</div>
<div class="hand-input-line">
<span>{{'Memo' | translate}}:</span>
<span>{{detail.dataGridSource[0].description}}</span>
</div>
</div>
</div>
<!--手工输入-->
<div class="hand-input-container"
ng-show="selectedDataSourceTabIndex == 2 || (detail.dataSourceCount == 1 && detail.hasKeyIn)">
<div class="hand-input-line">
<span>{{'HandInputValue' | translate}}:</span>
<span><input id="hand-input-value" ng-if="!detail.keyinData" name="hand-input-value"
ng-model="detail.inputValue" type="text" class="hand-input-value"/></span>
<span><input id="hand-input-value" ng-if="detail.keyinData" name="hand-input-value"
ng-model="detail.keyinData" type="text" class="hand-input-value"/></span>
</div>
<div class="hand-input-line">
<span>{{'Memo' | translate}}:</span>
<span><textarea id="hand-input-memo" name="hand-input-memo" ng-model="detail.inputMemo"
maxlength="500" rows="3" class="hand-input-memo"/></span>
</div>
</div>
</div>
</div>
<div class="content-footer">
<button ng-click="confirmEventHandler()" class="btn btn-default btn-focus">{{'Confirm' | translate}}
</button>
<button ng-click="hidePanel()" class="btn btn-default btn-second">{{'ButtonCancel' | translate}}
</button>
</div>
</div>
<!--<div class="analy-report" ng-show="tabType===2">-->
<!--<tax-report-analyze-report-->
<!--model-id-list="detail.cellInfo.modelIdList"-->
<!--cell-data-id="detail.config.cellID"-->
<!--model-data-source-items="detail.items"-->
<!--project-year="projectYear"-->
<!--period="projectPeriod">-->
<!--</tax-report-analyze-report>-->
<!--</div>-->
<div class="report-check-result" ng-if="detail.validationErrorList && detail.validationErrorList.length > 0"
ng-show="tabType===3">
<div ng-repeat="item in detail.validationErrorList"
style="display: inline-block; margin: 25px; height: 535px;">
<span style="width: 50px;"><i class="fa fa-exclamation-circle red-color"></i></span>
<span style="font-weight: bold; margin-left: 10px;">{{'Exception' | translate}}</span>
<span style="margin-left: 15px;">{{item.validationDescription}}</span>
</div>
</div>
<div class="report-cell-remark content-info" ng-show="tabType===4">
<div class="cell-info-sammary">
<!-- <div class="tab tab-selected cell-info-title">{{'CellInfo' | translate}}</div> -->
<div class="cell-info-content">
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label>
{{numToExcelChar(detail.rowIndex, detail.columnIndex)}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'RowName' | translate}}:</label>
{{detail.cellInfo.project}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label>
{{detail.cellInfo.column}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList"
account-data-source="accountDataSource"
formula-exp="detail.config.formula"></formula-translator>
{{}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'SourceOrFormula' | translate}}:</label>
{{detail.cellInfo.description}}
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'CellValue' | translate}}:</label>
{{detail.cellInfo.money}}
</div>
</div>
</div>
<div class="remark-area">
<div class="add-remark-area">
<div class="remark-title">
{{'cellCommentDialogComment' | translate}}
</div>
<div>
<textarea id="remark-input-textarea" class="form-control" ng-model="addingRemark"></textarea>
</div>
<div style="height:60px;">
<button class="btn btn-primary add-remark-btn" ng-click="addCellComment()">{{'cellCommentCommit'
| translate}}
</button>
</div>
</div>
<div ng-if="remarks.length > 1" class="remark-summary">{{remarks.length}}条备注</div>
<div class="remark-list" style="height:200px;">
<perfect-scrollbar class="scroller" wheel-propagation="true" wheel-speed="1"
min-scrollbar-length="20">
<div class="remark-item" ng-repeat="remark in remarks">
<div>
<i class="material-icons">&#xE7FD;</i><span>{{remark.userName}}</span>
<span style="margin-left:5px;margin-right:5px;" ng-if="remark.replyToUserName">{{'cellCommentReply' | translate}}</span>
<span ng-if="remark.replyToUserName">{{remark.replyToUserName}}</span>
<span class="remark-date" style="float:right">{{remark.createTime | dateFormat:'YYYY-MM-DD'}}</span>
</div>
<div class="remark-content">
<span>{{remark.comment}}</span>
<a style="float:right" ng-if="remark.userName === currentUserName"
href="javascript:void(0)" ng-click="deleteComment(remark)">{{'cellCommentDelete' |
translate}}</a>
<a style="float:right;margin-right:10px;" href="#" ng-click="openReplyBox(remark)">{{'cellCommentReply'
| translate}}</a>
</div>
</div>
</perfect-scrollbar>
</div>
</div>
</div>
<div class="attach-upload" ng-show="tabType===5" style="">
<button style="margin-bottom:20px;margin-left: 24px;" class="btn btn-primary" ng-click="openAddCellAttachmentDialog();">上传文档
</button>
<div class="dt-init-wrapper">
<div id="cellAttachmentDataGrid" dx-data-grid="cellAttachmentDataGirdOptions"
class="dx-widget dx-visibility-change-handler" role="application" aria-label="Data grid"
style="height: 450px;">
</div>
<!-- <div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="loadAttach()"></ack-pagination>
</div>-->
</div>
</div>
</div>
<account-multi-selector is-show="isShowAccounts" account-data-source="accountDataSource"
selector-api="accountSelectorApi" data-title="accountTitle"
selected-account-codes="selectedAccountCodes"
selector-options="accountSelectorOptions"></account-multi-selector>
<!--分录弹框-->
<entry-list-modal id ="entryListId" rel-obj = "relObj" ></entry-list-modal>
</div>
<div class="tax-report-cell-detail" id="addSourceContainer"></div>
<div class="tax-report-cell-detail" id="modifyCellDataContainer"></div>
<script type="text/ng-template" class="content" id="addDataSourceModal.html">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideAddDataSourcePanel()">&times;</span>
<h4 class="modal-title">{{'AddDatasource' | translate}}</h4>
</div>
<div ng-if="config.contentStatus === 'dataSourceTitle'" class="modal-body addDataSource">
<div class="row">
<div class="col-md-4 title"><label>{{'DatasourceType' | translate}}</label></div>
<div class="col-md-8">
<div class="btn-group">
<button type="button" ng-show="config.hasInvoice"
ng-click="choiceGroupButton(config,'invoiceClass','voucherClass')"
ng-class="config.invoiceClass" class="btn btn-default">{{'InvoiceDataSource' | translate}}
</button>
<button type="button" ng-show="config.hasVoucher"
ng-click="choiceGroupButton(config,'voucherClass','invoiceClass')"
ng-class="config.voucherClass" class="btn btn-default">{{'VoucherDataSource' | translate}}
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 title"><label>{{'ComputeMode' | translate}}</label></div>
<div class="col-md-8">
<div class="btn-group">
<button type="button" ng-click="choiceGroupButton(config,'addClass','reduceClass')"
ng-class="config.addClass" class="btn btn-default">{{'ComputeModeAdd' | translate}}
</button>
<button type="button" ng-click="choiceGroupButton(config,'reduceClass','addClass')"
ng-class="config.reduceClass" class="btn btn-default">{{'ComputeModeReduce' | translate}}
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 title"><label>{{'DatasourceName' | translate}}</label></div>
<div class="col-md-6">
<input type="text" class="form-control" ng-model="config.dataSourceName"/>
</div>
</div>
</div>
<div ng-if="config.contentStatus === 'allItems'" class="modal-body selectItems">
<div id="_dataSourceGrid" dx-data-grid="allItemsDataSourceOptions"></div>
</div>
<div class="content-footer add-footer">
<button ng-click="confirmAddDataSource(config);" class="btn btn-default btn-focus">{{'Confirm' | translate}}
</button>
<button ng-click="hideAddDataSourcePanel()" class="btn btn-default btn-second">{{'ButtonCancel' | translate}}
</button>
</div>
</script>
<script type="text/ng-template" class="content" id="modifyCellData.html">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hide()">&times;</span>
<h4 class="modal-title">{{'modifyCellDataTitle' | translate}}</h4>
</div>
<div class="modal-body">
<div>
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2" for="orginalAmountField">{{'originalAmount' | translate}}</label>
<span class="col-sm-10">{{modifyReportCellModel.originalValue}}</span>
</div>
<div class="form-group">
<label for="value" class="col-sm-2 control-label">{{'modifiedAmount' | translate}}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="value" ng-model="modifyReportCellModel.value">
</div>
</div>
<div class="form-group">
<label for="modify-comment" class="col-sm-2 control-label">{{'modifyReason' | translate}}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="modify-comment"
ng-model="modifyReportCellModel.comment">
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="saveModification()">{{'Save' | translate}}</button>
<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="hide()">{{'Cancel' | translate}}
</button>
</div>
</script>
<div class="modal fade" id="addCellAttachmentContainer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" >
<div class="modal-content" uib-modal-transclude="">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideCellAttachmentModel()">×</span>
<h4 class="modal-title">附件</h4>
</div>
<div class="modal-body">
<div>
<form class="form-horizontal ng-pristine ng-valid ng-valid-maxlength" style="">
<div class="form-group">
<label class="col-sm-3 control-label">文件名:</label>
<div class="col-sm-6"><input type="text"
class="form-control ng-pristine ng-untouched ng-valid ng-empty"
ng-model="fileName" style=""></div>
<span class="col-sm-3">
<button type="button" ngf-select="" ng-model="fileNameWrapper" ngf-drag-over-class="'dragover'"
accept=".xls,.xlsx" ngf-multiple="false" ngf-allow-dir="false"
class="btn btn-vat-third ng-pristine ng-untouched ng-valid ng-empty"
style="margin-right: 10px;">
选择文件...
</button>
</span>
</div>
<div class="form-group">
<label for="addAttachment-comment" class="col-sm-3 control-label">备注:</label>
<div class="col-sm-6">
<input class="form-control ng-pristine ng-valid ng-empty ng-valid-maxlength ng-touched"
maxlength="500" type="text" id="addAttachment-comment"
ng-model="cellAttachmentComment" style="">
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="uploadCellAttachment()">保存</button>
<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="hideCellAttachmentModel()">取消
</button>
</div>
</div>
</div>
</div>
citModule.directive('citTaxReportCellDetailModal', ['$log',
function ($log) {
return {
restrict: 'E',
templateUrl: '/app/cit/report/tax-report-cell-detail-modal/tax-report-cell-detail-modal.html' + '?_=' + Math.random(),
scope: {
detail: '=',
onConfirm: '&',
activeSheet : '='
},
controller: 'citTaxReportCellDetailModalController',
link: function ($scope, $element, $attr) {
$("#taxReportCellDetailModal").resizable({
minHeight: 700,
maxHeight: 700,
minWidth: 650
});
$($element).draggable({
scroll: true,
cancel: '#dataSourceGrid,.hand-input-container,.add-voucher-range-propover,.add-invoice,.tab-type,.dx-texteditor-input,input,.btn,#remark-input-textarea,.tax-report-analyze-report'
});
}
}
}]);
\ No newline at end of file
@small-panel-height: 40px;
@small-panel-margin: 10px;
@small-panel-border-color: #E4E4E4;
@tab-not-selected: #bababa;
@focus: #c00;
@btn-color: white;
@btn-not-focus: #777;
.tax-report-cell-detial-show {
vertical-align: top;
/*width: 950px;*/
cursor: move;
}
.tax-report-cell-detail {
.tax-report-cell-detial-show;
position: relative;
#taxReportCellDetailModal {
display: none;
background-color: #fff;
opacity: 1;
border-radius: 4px;
}
.header {
padding: 0;
background-color: #555;
height: @small-panel-height;
line-height: @small-panel-height;
padding: 0;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
.icon-common {
color: #fff;
margin: 0 @small-panel-margin;
}
.drag-icon {
float: left;
.icon-common;
}
.close-icon {
float: right;
.icon-common;
cursor: pointer;
}
.expand-icon {
.icon-common;
float: right;
cursor: pointer;
}
}
.remark-title {
font-size:18px;
font-weight:bold;
margin: 10px;
}
.add-remark-btn {
margin-top:10px;
float:right;
}
.remark-date {
float:right;
color:#888;
}
.remark-reply-content,.remark-content {
color: #888888;
}
.remark-summary {
margin:10px 20px;
}
.reply-area {
margin:15px 0px 0px 45px;
}
.remark-item {
border-top: 1px dotted black;
padding-top: 10px;
padding-bottom: 10px;
margin:0px 20px;
}
.material-icons {
vertical-align:bottom;
}
.content {
border-radius: 4px;
.tab-type {
margin: 25px;
span {
background-color: #f2f2f2;
cursor: pointer;
padding: 10px 42px;
}
.active {
background-color: #e0301e;
color: white;
}
.red-color {
color: red;
}
}
.tab {
display: inline-block;
max-width: 600px;
min-width: 150px;
overflow-y: hidden;
text-align: center;
line-height: 35px;
height: 35px;
color: #fff;
background-color: @tab-not-selected;
position: relative;
.tab-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
width: 110px;
vertical-align: middle;
line-height: 35px;
}
}
.tab-selected {
background-color: @focus;
}
.tab-no-background {
color: @focus;
font-weight: bold;
width: 170px;
background-color: white;
text-align: left;
}
background-color: #fff;
border: 1px solid @small-panel-border-color;
width: 100%;
.analy-report {
margin: 25px;
font-size: 14px;
font-family: "微软雅黑";
height: 560px;
}
.content-info {
margin: 25px;
font-size: 14px;
font-family: "微软雅黑";
.cell-info-sammary {
min-height: 190px;
border-bottom: 1px solid @small-panel-border-color;
.cell-info-title {
margin: 0 10px;
}
.cell-info-content {
margin: 15px 25px;
.cell-info-subject {
width: 100%;
display: inline-block;
line-height: 30px;
.cell-info-subject-label {
font-weight: bold;
line-height: 20px;
}
.formula-translator-wrapper {
display: inline;
.label {
word-break: break-all;
white-space: initial;
width: 100%;
}
}
}
}
}
.data-source-info {
min-height: 310px;
margin: 0 10px;
.data-source-title {
height: 60px;
line-height: 60px;
font-weight: bold;
.data-source-title-left {
float: left;
}
.data-source-title-right {
float: right;
}
}
a:link {
text-decoration: none;
}
.tab-container {
color: white;
cursor: pointer;
.removeTab {
float: right;
width: 30px;
position: absolute;
right: 0;
top: 0;
}
.tab-add {
display: inline-block;
float: right;
margin-right: 20px;
padding: 5px;
color: black;
.add-icon {
font-size: 20px;
vertical-align: middle;
}
}
}
.data-source-detail-container {
.tab-add-voucher-container {
border: solid 1px #ccc;
margin-bottom: -1px;
width: 100%;
.add-voucher {
display: inline-block;
width: 77px;
margin-left: 3px;
line-height: 28px;
text-align: center;
border-radius: 4px;
background-color: #eee;
cursor: pointer;
margin-top: 1px;
}
}
.tab-add-voucher-area {
display: inline-block;
float: right;
margin-right: 20px;
padding: 5px;
color: #37c;
cursor: pointer;
}
.add-invoice-top-line {
display: inline-block;
width: 100%;
line-height: 35px;
text-align: left;
border: 1px solid #ddd;
margin-bottom: -1px;
.add-invoice {
display: inline-block;
width: 77px;
margin-left: 3px;
line-height: 28px;
text-align: center;
border-radius: 4px;
background-color: #eee;
cursor: pointer;
}
}
height: 200px;
margin: 15px 0;
.hand-input-container {
border: solid 1px #ddd;
width: 60%;
height: 180px;
.hand-input-line {
display: inline-block;
width: 100%;
margin: 15px 10px;
.hand-input-value {
width: 150px;
}
.hand-input-memo {
width: 80%;
resize: none;
}
}
}
}
}
}
}
.add-voucher-range-propover {
cursor: default;
height: 370px;
width: 500px;
font-family: "微软雅黑";
border: 2px solid #bbb;
border-radius: 5px;
background-color: #fff;
z-index: 10;
top: -300px !important;
.propover-header {
width: 100%;
height: 45px;
line-height: 45px;
display: inline-block;
border-bottom: 1px solid #bbb;
.left-title {
float: left;
color: black;
font-size: 15px;
padding-left: 20px;
}
.right-close-btn {
float: right;
text-align: center;
font-size: 20px;
color: #999;
width: 40px;
cursor: pointer;
}
}
.propover-content {
height: 260px;
margin: 0 15px;
.add-voucher-range-btn {
display: inline-block;
height: 45px;
line-height: 45px;
width: 100px;
text-align: center;
cursor: pointer;
.add-icon {
vertical-align: middle;
font-size: 20px;
}
}
.filter-way-pan {
margin-top: 15px;
}
.add-remark-content {
margin-top: 30px;
input {
border-radius: 3px;
height: 32px;
width: 150px;
}
}
}
.propover-footer {
height: 50px;
width: 100%;
padding-left: 4px;
.btn {
color: @btn-color;
margin-left: 10px;
}
.btn-focus {
background-color: @focus;
}
.btn-second {
background-color: @btn-not-focus;
}
}
}
.content-footer {
min-height: 40px;
.btn {
color: @btn-color;
margin-left: 10px;
font-family: "微软雅黑";
}
.btn-focus {
background-color: @focus;
}
.btn-second {
background-color: @btn-not-focus;
}
}
.add-footer {
padding: 20px;
}
.addDataSource {
.title {
line-height: 36px;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
}
.data-table {
.dx-datagrid-rowsview .dx-select-checkboxes-hidden > tbody > tr > td > .dx-select-checkbox {
display: inline-block;
}
.modal-dialog {
width: 900px;
}
}
.btn-default {
min-width: 50px;
}
.table-border tr td {
border-style: solid;
border-width: 1px;
padding: 5px;
}
.table-border, .table-border tr {
border-style: solid;
border-width: 1px;
}
.gray-circle {
padding: 2px;
background-color: #F0F0F0;
border: 1px solid #E8E8E8;
margin: 0px 4px;
border-radius: 5px;
font-size: 12px;
}
.modification-table .modal-dialog {
width:650px;
}
a {
color:#dc6900;
}
}
\ No newline at end of file
......@@ -884,6 +884,8 @@
onInitialized: function (e) {
dxDataGridService.registerRowDbClick(e.component);
},
onRowDbClick: function (e) {
$scope.vouchersAndEntriesModal.openModal(e, 2);
}
......
commonModule.controller('taxReportCellDetailModalController', ['$log', 'apiInterceptor', 'Upload', '$scope', '$q', '$translate', '$uibModal', '$document', '$rootScope', 'SweetAlert', 'enums',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', 'commonWebService', 'dxDataGridService',
function ($log, apiInterceptor, Upload, $scope, $q, $translate, $uibModal, $document, $rootScope, SweetAlert, enums, vatReportService, loginContext,
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService) {
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService, dxDataGridService) {
var activeClass = 'active';
$scope.currentUserName = loginContext.userName;
......@@ -10,6 +10,8 @@
$scope.projectYear = vatSessionService.year;
$scope.projectPeriod = vatSessionService.month;
$scope.relObj = {};
//关闭数据源弹出框
var hidePanel = function () {
$scope.selectedDataSourceTabIndex = 1;
......@@ -552,21 +554,6 @@
$timeout(function () {
$("#dataSourceGrid .dx-datagrid-total-footer").hide();
$scope.dataSourceOptions.width = '100%';
//if ($scope.selectedTabIndex == enums.formulaDataSourceType.Report ||
// $scope.selectedTabIndex == enums.formulaDataSourceType.Judgment ||
// $scope.selectedTabIndex == enums.formulaDataSourceType.ModelDatasource) {
// $("#dataGridFooterSummary").show();
// $scope.dataGridHeight = 165;
//} else if ($scope.selectedTabIndex == enums.formulaDataSourceType.VoucherFilter ||
// $scope.selectedTabIndex == enums.formulaDataSourceType.InvoiceFilter) {
// $("#dataGridFooterSummary").hide();
// $scope.dataGridHeight = 165;
//} else {
// $("#dataGridFooterSummary").hide();
// $scope.dataGridHeight = 195;
//}
if ($scope.selectedTabIndex != enums.formulaDataSourceType.KeyInSource &&
$scope.selectedTabIndex != enums.formulaDataSourceType.RuleSource &&
$scope.selectedTabIndex != enums.formulaDataSourceType.Special) {
......@@ -615,37 +602,10 @@
}
return $scope.detail.summaryExp;
}
}/*, {
column: 'cellConditionValue',
customizeText: function (data) {
var precition = 2;
//如果数值是份数类型,则精度为0,否则为2
if ($scope.detail.dataType === 5) {
precition = 0;
}
var evalVal = 0;
try {
evalVal = eval($scope.detail.summaryValue);
if (_.isNaN(evalVal)) {
evalVal = Number(evalVal);
}
else {
evalVal = 0;
}
}
catch (ex) {
}
var val = evalVal.formatAmount(precition);
$("#dataGridFooterSummary").html($scope.detail.summaryExp + '&nbsp;&nbsp;&nbsp;&nbsp;' + val);
setSummaryColumnAndHeight();
return val;
}
}*/]
}]
},
onInitialized: function (e) {
dxDataGridService.registerRowDbClick(e.component);
},
paging: {
enabled: false
......@@ -1495,57 +1455,12 @@
{dataField: 'money', caption: 'Amount', alignment: 'center', width: '100%'},
];
break;
case enums.formulaDataSourceType.CIT_TBAM:
dataGridColumns = [
{
dataField: 'accountCode',
caption: $translate.instant('AccountCode'),
alignment: 'center',
},
{
dataField: 'accountDescription',
caption: $translate.instant('AccountName'),
alignment: 'left',
},
{
dataField: 'customerCode',
caption: $translate.instant('CustomerCode'),
alignment: 'left'
},
{
dataField: 'beginningBalance',
caption: $translate.instant('BegBal'),
alignment: 'left'
},
{
dataField: 'debitAmount',
caption: $translate.instant('DebitBal'),
alignment: 'left'
}
,
{
dataField: 'creditAmount',
caption: $translate.instant('CreditAmount'),
alignment: 'left'
}
,
{
dataField: 'endingBalance',
caption: $translate.instant('EndingBalance'),
alignment: 'left'
}
,
{
dataField: 'attribute',
caption: $translate.instant('Attribute'),
alignment: 'left'
}
];
break;
}
return dataGridColumns;
};
//设置数据源表格的列
var getAllDataGridColumns = function () {
var dataGridColumns;
......@@ -2208,11 +2123,9 @@
break;
case enums.formulaDataSourceType.InputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;case enums.formulaDataSourceType.InputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
case enums.formulaDataSourceType.CIT_TBAM:
getBlowGridData($scope.detail.dataGridSource[0]);
break;
case enums.formulaDataSourceType.InputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
default :
$scope.detail.dataGridSourceBind = $scope.detail.dataGridSource;
......@@ -2233,18 +2146,6 @@
}, 500);
});
var getBlowGridData = function( data){
cellCommentService.getCellInformation(data).success(function (res) {
if(res.resultMsg){
$scope.detail.dataGridSourceBind = [res.data[0]];
}
}).error(function (error) {
});
}
//当数据源数量变化是,重新排序数据源
$scope.$watch('detail.items.length', function (newVal, oldValue) {
......@@ -2396,12 +2297,13 @@
});
$scope._gridData =[];
$scope._gridData = [];
$scope.cellAttachmentDataGirdOptions = {
columns: [{caption: '序号', dataField: "xh"},
{caption: '文件名', dataField: "fileName",cellTemplate: function (container, options) {
{
caption: '文件名', dataField: "fileName", cellTemplate: function (container, options) {
try {
$('<a href="'+options.data.fileUrl+'" target="_blank" style="cursor: pointer">"'+options.data.fileName+'"</a>&nbsp;&nbsp;')
$('<a href="' + options.data.fileUrl + '" target="_blank" style="cursor: pointer">"' + options.data.fileName + '"</a>&nbsp;&nbsp;')
.appendTo(container);
}
catch (e) {
......@@ -2413,15 +2315,17 @@
{caption: '备注信息', dataField: "remarks"},
{caption: '用户', dataField: "uploadUser"},
{caption: '操作时间', dataField: "createTime"},
{caption : '操作' ,cellTemplate: function (container, options) {
{
caption: '操作', cellTemplate: function (container, options) {
try {
$('<button type="button" class="btn btn-in-grid" onclick = "deleteAttach('+options.data.id + ')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>删除</button>&nbsp;&nbsp;')
$('<button type="button" class="btn btn-in-grid" onclick = "deleteAttach(' + options.data.id + ')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>删除</button>&nbsp;&nbsp;')
.appendTo(container);
}
catch (e) {
$log.error(e);
}
} }
}
}
],
showBorders: true/*,
editing: {
......@@ -2431,14 +2335,14 @@
allowDeleting: true,
}*/,
onInitialized : function(e){
onInitialized: function (e) {
$scope.dataGrid = e.component;
},
bindingOptions : {
bindingOptions: {
dataSource: '_gridData'
}
};
window.deleteAttach = function(id, data){
window.deleteAttach = function (id, data) {
swal({
title: "warning!",
text: "确定删除该附件?",
......@@ -2452,8 +2356,8 @@
},
function (tmpConfirm) {
if (tmpConfirm) {
vatReportService.deleteAttach(id).success(function(res){
if(res.resultMsg == "success"){
vatReportService.deleteAttach(id).success(function (res) {
if (res.resultMsg == "success") {
$scope.loadAttach();
}
});
......@@ -2461,7 +2365,7 @@
}
});
}
//加载附件信息列表
$scope.loadAttach = function () {
$scope._gridData = [];
......@@ -2470,33 +2374,33 @@
//获取附件信息
vatReportService.loadAttachList($scope.activeSheet).success(function (data) {
if (data) {
var _xh = 0;
for(var i = 0; i< data.length; i++){
/* var _data1 = {
xh : i+1,
fileName : data[i].fileName,
size : data[i].size,
remarks : data[i].remarks,
uploadUser : data[i].uploadUser,
createTime : data[i].createTime,
fileUrl : data[i].
}*/
data[i].xh = i+1;
var _xh = 0;
for (var i = 0; i < data.length; i++) {
/* var _data1 = {
xh : i+1,
fileName : data[i].fileName,
size : data[i].size,
remarks : data[i].remarks,
uploadUser : data[i].uploadUser,
createTime : data[i].createTime,
fileUrl : data[i].
}*/
data[i].xh = i + 1;
$scope._gridData.push(data[i]);
_xh = i+1;
_xh = i + 1;
}
$scope.xh = _xh;
//$scope._gridData = data;
//$scope.pagingOptions.totalItems = data.totalCount;
}else {
} else {
SweetAlert.error($translate.instant('SystemError'));
}
//刷新附件列表
// $scope.dataGrid.refresh();
// dataGrid.refresh();
}).error(function(error){
// $scope.dataGrid.refresh();
// dataGrid.refresh();
}).error(function (error) {
SweetAlert.error("附件列表数据加载失败")
});
}
......@@ -2533,24 +2437,24 @@
var refreshAttachData = function (dataSource) {
$('#addCellAttachmentContainer').modal('hide');
if($scope.xh){
$scope.xh =$scope.xh + 1;
}else{
dataSource.data.xh = 1;
if ($scope.xh) {
$scope.xh = $scope.xh + 1;
} else {
dataSource.data.xh = 1;
$scope.xh = 1;
}
var _data = {
xh : $scope.xh,
fileName : dataSource.data.fileName,
size : dataSource.data.size,
remarks : dataSource.data.remarks,
uploadUser : dataSource.data.uploadUser,
createTime : dataSource.data.createTime,
fileUrl : dataSource.data.fileUrl
xh: $scope.xh,
fileName: dataSource.data.fileName,
size: dataSource.data.size,
remarks: dataSource.data.remarks,
uploadUser: dataSource.data.uploadUser,
createTime: dataSource.data.createTime,
fileUrl: dataSource.data.fileUrl
}
$scope._gridData.push(_data);
// $scope.dataGrid.refresh();
// $scope.dataGrid.refresh();
}
//上传附件
var uploadfile = function (file) {
......@@ -2594,25 +2498,24 @@
$scope.$watch('fileNameWrapper', function (newValue, oldValue) {
if (newValue !== null && newValue !== oldValue) {
if(newValue.name){
if (newValue.name) {
initImportFile(newValue);
}
}
});
//点击分页
/* //刷新页面
$scope.refreshConfigGrid = function () {
$http.post('/revenueConf/queryPage',{pageInfo: $scope.pagingOptions}, apiConfig.createVat())
.success(function (res) {
if (res && res.list) {
$scope.pageConfDataSource = res.list;
$scope.pagingOptions.totalItems = res.pageInfo.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
})
};*/
/* //刷新页面
$scope.refreshConfigGrid = function () {
$http.post('/revenueConf/queryPage',{pageInfo: $scope.pagingOptions}, apiConfig.createVat())
.success(function (res) {
if (res && res.list) {
$scope.pageConfDataSource = res.list;
$scope.pagingOptions.totalItems = res.pageInfo.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
})
};*/
//保存按钮
......
......@@ -277,7 +277,7 @@
<div class="attach-upload" ng-show="tabType===5" style="">
<button style="margin-bottom:20px;" class="btn btn-primary" ng-click="openAddCellAttachmentDialog();">上传文档
<button style="margin-bottom:20px;margin-left: 24px;" class="btn btn-primary" ng-click="openAddCellAttachmentDialog();">上传文档
</button>
<div class="dt-init-wrapper">
<div id="cellAttachmentDataGrid" dx-data-grid="cellAttachmentDataGirdOptions"
......
......@@ -11,8 +11,11 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
deleteCellComment: function (commentId) {
return $http.post('/CellComment/Delete/' + commentId, {}, apiConfig.createVat());
},
getCellInformation: function(data){
getCellInformation: function (data) {
return $http.get('/CellComment/getCellInformation?sql=' + data.relSql, apiConfig.createVat());
},
loadEntryListDataList: function (code) {
return $http.get('/CellComment/loadEntryListDataList?code=' + code, apiConfig.createVat());
}
};
}]);
\ 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