gaodd лет назад: 2
Родитель
Сommit
64c7ca813d

+ 59 - 0
src/main/resources/static/app/business/module.js

@@ -475,6 +475,65 @@ angular.module('app.business')
475 475
                 }
476 476
             }
477 477
         })
478
+        /*---------------------------------------财务管理---------------------------------------------*/
479
+        .state('app.business.zcfzb', {
480
+            url: '/business/zcfzb',
481
+            data: {
482
+                title: '资产负债表'
483
+            },
484
+            params:{
485
+                type : 'asset'
486
+            },
487
+            views: {
488
+                "content@app": {
489
+                    controller: 'sptCwglCtrl',
490
+                    templateUrl: 'app/supervise/views/cwgl-list.html'
491
+                }
492
+            }
493
+        })
494
+        
495
+        .state('app.business.zcfzbView', {
496
+            url: '/business/zcfzbView/:id/:type',
497
+            data: {
498
+                title: '资产负债表详情'
499
+            },
500
+            views: {
501
+                "content@app": {
502
+                    controller: 'sptCwglSaveCtrl as datatables',
503
+                    templateUrl: 'app/supervise/views/cwgl-edit.html'
504
+                }
505
+            }
506
+        })
507
+        .state('app.business.xjllb', {
508
+            url: '/business/xjllb',
509
+            data: {
510
+                title: '现金流量表'
511
+            },
512
+            params:{
513
+                type : 'cash'
514
+            },
515
+            views: {
516
+                "content@app": {
517
+                    controller: 'sptCwglCtrl',
518
+                    templateUrl: 'app/supervise/views/cwgl-list.html'
519
+                }
520
+            }
521
+        })
522
+        .state('app.business.lrb', {
523
+            url: '/business/lrb',
524
+            data: {
525
+                title: '利润表'
526
+            },
527
+            params:{
528
+                type : 'profit'
529
+            },
530
+            views: {
531
+                "content@app": {
532
+                    controller: 'sptCwglCtrl',
533
+                    templateUrl: 'app/supervise/views/cwgl-list.html'
534
+                }
535
+            }
536
+        })
478 537
         
479 538
         /*----------------------------------------------客户------------------------------------*/
480 539
         .state('app.business.customer', {

+ 17 - 0
src/main/resources/static/app/layout/partials/navigation.tpl.html

@@ -346,6 +346,23 @@
346 346
                     </li>
347 347
                     <li data-menu-collapse>
348 348
                         <a has-func="36" href="#">
349
+                            <i class="fa fa-fw fa-folder-open"></i>财务管理
350
+                        </a>
351
+                        <ul>
352
+                            <li has-func="37">
353
+                                <a data-ui-sref="app.business.zcfzb">资产负债表</a>
354
+                            </li>
355
+                            <li has-func="38">
356
+                                <a data-ui-sref="app.business.xjllb">现金流量表</a>
357
+                            </li>
358
+                            <li has-func="39">
359
+                                <a data-ui-sref="app.business.lrb">利润表</a>
360
+                            </li>
361
+                        </ul>
362
+                    </li>
363
+                    
364
+                    <li data-menu-collapse>
365
+                        <a has-func="36" href="#">
349 366
                             <i class="fa fa-fw fa-folder-open"></i>业务进度查询
350 367
                         </a>
351 368
                         <ul>

+ 55 - 0
src/main/resources/static/app/supervise/controller/sptCtrl.js

@@ -319,4 +319,59 @@ angular.module('app.supervise').controller("sptSxtgzsCtrl", function($scope, $ro
319 319
 		$scope.loadDataById($stateParams.id);
320 320
 	}
321 321
 })
322
+
323
+.controller("sptCwglCtrl", function($scope, $rootScope, $state, $stateParams, APP_CONFIG, sptService) {
324
+
325
+    // 获取列表数据
326
+    $scope.pageInfo = {pageNum : 1, pageSize : 10};
327
+
328
+    $scope.search = {kqdm:$rootScope.orgInfo.companyOrgCode,type:$stateParams.type};
329
+
330
+    
331
+    $scope.loadData = function() {
332
+    	
333
+    	$scope.search.bbsj = $("#bbsj").val();
334
+		sptService.getCwglListPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search.type,$scope.search.kqdm,$scope.search.bbsj).then(function (data) {
335
+			$scope.pageInfo = data.data;
336
+		}, function (data) {
337
+			console.log(data);
338
+		});
339
+    }
340
+    
341
+    $scope.loadData();
342
+
343
+    // 翻页
344
+    $scope.goPage = function(pageNum) {
345
+        $scope.pageInfo.pageNum = pageNum;
346
+        $scope.loadData();
347
+    };
348
+    
349
+    
350
+    //查看
351
+    $scope.showView = function(id,type){
352
+    	if(type == 'asset'){
353
+    		$state.go('app.business.zcfzbView',{id:id,type:type});
354
+    	}else if(type == 'cash'){
355
+    		
356
+    	}else if(type == 'profit'){
357
+    		
358
+    	}
359
+    	
360
+    }
361
+})
362
+
363
+.controller("sptCwglSaveCtrl", function($scope, $rootScope, $state, $stateParams, APP_CONFIG, sptService) {
364
+
365
+	$scope.loadDataById = function(id) {
366
+		sptService.loadCwbbDataById(id).then(function(data){
367
+            $scope.formInlineList = data.data;
368
+            
369
+        },function(data){
370
+        });
371
+    }
372
+	
373
+	if($stateParams.id != null){
374
+		$scope.loadDataById($stateParams.id);
375
+	}
376
+})
322 377
 ;

+ 41 - 0
src/main/resources/static/app/supervise/service/sptService.js

@@ -330,4 +330,45 @@ angular.module('app.supervise').service("sptService", function($http, $q, APP_CO
330 330
         });
331 331
         return d.promise;
332 332
     }
333
+    
334
+    
335
+    //
336
+    this.getCwglListPageInfo = function(pageNum, pageSize,type,kqdm,bbsj) {
337
+        var d = $q.defer();
338
+        $http({
339
+            method : 'GET',
340
+            url : APP_CONFIG.depotStorageUrl + '/spt/getZcfzList',
341
+            params : {
342
+                pageNum : pageNum,
343
+                pageSize : pageSize,
344
+                type : type,
345
+                dwdm : kqdm,
346
+                bbsj : bbsj
347
+                
348
+            }
349
+        }).then(function successCallback(response) {
350
+            // 请求成功执行代码
351
+            d.resolve(response.data);
352
+        }, function errorCallback(response) {
353
+            // 请求失败执行代码
354
+            d.reject("error");
355
+        });
356
+        return d.promise;
357
+    }
358
+    
359
+ // 根据id加载数据
360
+    this.loadCwbbDataById = function(id) {
361
+        var d = $q.defer();
362
+        $http({
363
+            method: 'GET',
364
+            url: APP_CONFIG.depotStorageUrl + '/spt/getZcfzById',
365
+            params: {
366
+                id : id
367
+            }
368
+        }).then(function successCallback(response) {
369
+            d.resolve(response.data);
370
+        }, function errorCallback(response) {
371
+        });
372
+        return d.promise;
373
+    }
333 374
 });

+ 121 - 0
src/main/resources/static/app/supervise/views/cwgl-edit.html

@@ -0,0 +1,121 @@
1
+  <div class="content-main">
2
+    <div class="title-name">
3
+      资产负债表
4
+    </div>
5
+    <form  ng-model="formInlineList"  class="demo-form-inline">
6
+    <div class="flexBox">
7
+      <div class="floatLeft">填报单位:{{formInline.dwmc}}</div>
8
+      <div class="floatRight">
9
+        <span style="color: #FF0000;">*</span>填报期数:{{formInline.bbsj}}
10
+              <span style="margin-left: 10px;">单位:元</span>
11
+      </div>
12
+
13
+    </div>
14
+
15
+      <div style="display: flex;width: 100%;" class="recordsDetailsTable">
16
+        <div style="flex: 4;">
17
+          <!-- <table>
18
+              <tbody>
19
+                  <tr ng-repeat="item in formInlineList.zcList">
20
+                     <td class="tdsize">{{item.zbmc}}</td>
21
+                     <td class="tdsize" ng-if="item.zbz1 == '期末余额'">{{item.zbz1}}</td>
22
+                     <td class="tdsize" ng-else>
23
+                       <span ng-if="type == 'ck'">{{item.zbz1}}</span>
24
+                       <el-form-item v-else-if="item.zbmc == ''"  :key="item.key"
25
+                          :prop="'zcList.' + index + '.zbz1'">
26
+                       <el-input class="border-none" readonly v-model="item.zbz1" placeholder="">
27
+                       </el-input>
28
+                       </el-form-item>
29
+
30
+                       <el-form-item v-else   :key="item.key"
31
+                          :prop="'zcList.' + index + '.zbz1'"
32
+                          :rules="[
33
+                            {
34
+                              pattern: /(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/,
35
+                              message: '请输入数字,最多保留两位小数',
36
+                              trigger: 'blur',
37
+                            },
38
+                          ]">
39
+                         <el-input clearable v-model="item.zbz1" placeholder="请输入"></el-input>
40
+                       </el-form-item>
41
+                     </td>
42
+                     <td class="tdsize" v-if="item.zbz2 == '年初余额'">{{item.zbz2}}</td>
43
+                     <td class="tdsize" v-else>
44
+                       <span v-if="type == 'ck'">{{item.zbz2}}</span>
45
+                       <el-form-item v-else-if="item.zbmc == ''"  :key="item.key"
46
+                          :prop="'zcList.' + index + '.zbz2'">
47
+                       <el-input class="border-none" readonly v-model="item.zbz2" placeholder="">
48
+                       </el-input>
49
+                       </el-form-item>
50
+
51
+                     <span v-if="type == 'ck' || item.zbmc == ''">{{item.zbz2}}</span>
52
+                     <el-form-item v-else   :key="item.key"
53
+                        :prop="'zcList.' + index + '.zbz2'"
54
+                        :rules="[
55
+                          {
56
+                            pattern: /(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/,
57
+                            message: '请输入数字,最多保留两位小数',
58
+                            trigger: 'blur',
59
+                          },
60
+                        ]">
61
+                     <el-input clearable v-model="item.zbz2" placeholder="请输入"></el-input>
62
+                      </el-form-item>
63
+                     </td>
64
+                   </tr>
65
+              </tbody>
66
+          </table> -->
67
+        </div>
68
+        <div style="float: right;flex: 5;" class="recordsDetailsTable">
69
+         <!--  <table>
70
+              <tbody>
71
+                  <tr v-for="(item,index) in formInlineList.fzList">
72
+                     <td class="tdsize">{{item.zbmc}}</td>
73
+                     <td class="tdsize" v-if="item.zbz1 == '期末余额'">{{item.zbz1}}</td>
74
+                     <td class="tdsize" v-else>
75
+                       <span v-if="type == 'ck' || item.zbmc == ''">
76
+                         {{item.zbz1}}
77
+                       </span>
78
+                     <el-form-item v-else   :key="item.key"
79
+                        :prop="'fzList.' + index + '.zbz1'"
80
+                        :rules="[
81
+                          {
82
+                            pattern:/(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/,
83
+                            message: '请输入数字,最多保留两位小数',
84
+                            trigger: 'blur',
85
+                          },
86
+                        ]">
87
+                     <el-input clearable v-model="item.zbz1" placeholder="请输入"></el-input>
88
+                     </el-form-item>
89
+                     </td>
90
+                     <td class="tdsize" v-if="item.zbz2 == '年初余额'">{{item.zbz2}}</td>
91
+                     <td class="tdsize" v-else>
92
+                     <span v-if="type == 'ck' || item.zbmc == ''">{{item.zbz2}}</span>
93
+                     <el-form-item v-else   :key="item.key"
94
+                        :prop="'fzList.' + index + '.zbz2'"
95
+                        :rules="[
96
+                          {
97
+                            pattern:/(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/,
98
+                            message: '请输入数字,最多保留两位小数',
99
+                            trigger: 'blur',
100
+                          },
101
+                        ]">
102
+                     <el-input clearable v-model="item.zbz2" placeholder="请输入"></el-input>
103
+                     </el-form-item>
104
+                     </td>
105
+                   </tr>
106
+              </tbody>
107
+          </table> -->
108
+        </div>
109
+      </div>
110
+      <!-- <div style="text-align: center; margin-top: 20px">
111
+        <el-button  v-if="type != 'ck'" type="primary"
112
+          icon="iconfont iconbaocun" @click="saveZc('0','formInlineList')">保存</el-button>
113
+        <el-button v-if="type != 'ck'" type="primary"
114
+          icon="iconfont icontijiao" @click="saveZc('1','formInlineList')">提交</el-button>
115
+        <el-button @click="cancelClick" type="primary"
116
+          icon="iconfont iconfanhui">返回</el-button>
117
+      </div> -->
118
+
119
+    </form>
120
+  </div>
121
+

+ 74 - 0
src/main/resources/static/app/supervise/views/cwgl-list.html

@@ -0,0 +1,74 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content">
3
+    <!-- widget grid -->
4
+    <section widget-grid id="widget-grid">
5
+        <div class="row">
6
+            <article class="col-sm-12">
7
+
8
+                <div jarvis-widget id="standard-datatable-widget" data-widget-color="darken"
9
+                     data-widget-editbutton="true">
10
+                    <header>
11
+                        <span class="widget-icon"> <i class="fa fa-table"></i></span>
12
+                        <h2 ng-if="search.type == 'asset'">资产负债表</h2>
13
+                        <h2 ng-if="search.type == 'cash'">现金流量表</h2>
14
+                        <h2 ng-if="search.type == 'profit'">利润表</h2>
15
+                    </header>
16
+                    <div>
17
+                        <div class="widget-body no-padding">
18
+                            <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
19
+                                <div class="dt-toolbar">
20
+                                    <div class="col-xs-12 col-sm-10">
21
+                                        <label> 填报期数:
22
+												<input type="text" ng-model="search.bbsj" id="bbsj" class="form-control Wdate" 
23
+												onClick="WdatePicker({dateFmt:'yyyyMM'})" >
24
+										</label>
25
+                                        <a class="btn btn-default btn-sm" ng-click="loadData()">
26
+                                            <i class="fa fa-search"></i>&nbsp;查&nbsp;询
27
+                                        </a>
28
+                                    </div>
29
+                                    <div class="col-sm-2 col-xs-2 hidden-xs">
30
+                                        <div class="dataTables_length">
31
+                                            <label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()"
32
+                                                                ng-options="num as num for num in [10,25,50,100]"
33
+                                                                class="form-control input-sm">
34
+
35
+                                            </select> 条
36
+                                            </label>
37
+                                        </div>
38
+                                    </div>
39
+                                </div>
40
+                                <div>
41
+                                    <table class="table table-striped table-bordered table-hover" width="100%"
42
+                                           border="1" style="border-collapse:collapse;border:none;">
43
+                                        <thead>
44
+                                        <tr>
45
+                                            <th data-class="expand" style="text-align:center;">序号</th>
46
+                                            <th data-class="expand" style="text-align:center;">申报单位</th>
47
+                                            <th data-class="expand" style="text-align:center;">填报期数</th>
48
+                                            <th data-class="expand" style="text-align:center;">填报时间</th>
49
+                                            <th data-class="expand" style="text-align:center;">操作</th>
50
+                                        </tr>
51
+                                        </thead>
52
+
53
+                                        <tbody>
54
+                                        <tr ng-repeat="cwgl in pageInfo.list">
55
+                                            <td style="text-align:center;">{{ $index + 1 }}</td>
56
+                                            <td style="text-align:center;">{{ cwgl.kqmc }}</td>
57
+                                            <td style="text-align:center;">{{ cwgl.bbsj }}</td>
58
+                                            <td style="text-align:center;">{{ cwgl.createDate }}</td>
59
+                                            <td style="text-align:center;">
60
+                                            	<a href-void ng-click="showView(cwgl.id,search.type)"><i class="fa fa-info-circle"></i>查看</a>
61
+                                            </td>
62
+                                        </tr>
63
+                                        </tbody>
64
+                                    </table>
65
+                                </div>
66
+                                <div smart-include="app/layout/partials/page.tpl.html"></div>
67
+                            </div>
68
+                        </div>
69
+                    </div>
70
+                </div>
71
+            </article>
72
+        </div>
73
+    </section>
74
+</div>