Ver código fonte

封仓确认单-前端

hanqingsong 1 ano atrás
pai
commit
79e0c1049a

+ 85 - 0
src/main/resources/static/app/act/util/sealedConfirmation-audit.html

@@ -0,0 +1,85 @@
1
+<!-- MAIN CONTENT -->
2
+<div style="position:relative; padding: 0 14px;">
3
+    <!-- widget grid -->
4
+    <section id="widget-grid" widget-grid>
5
+        <!-- START ROW -->
6
+        <div class="row" style="margin: 0;">
7
+            <!-- NEW COL START -->
8
+            <article class="col-sm-12 col-md-12 col-lg-12">
9
+                <!-- Widget ID (each widget will need unique ID)-->
10
+                <div jarvis-widget id="form-grid-widget"
11
+                     data-widget-colorbutton="false" data-widget-editbutton="false"
12
+                     data-widget-custombutton="false">
13
+                    <!-- widget div-->
14
+                    <div style="border-top-width:1px; border-width:1px;position:relative;padding: 0; box-sizing: border-box;">
15
+                        <!-- widget content -->
16
+                        <div class="widget-body no-padding" style="margin: 0;">
17
+                            <form id="auditAdivce-form" class="smart-form ng-pristine ng-valid" data-validator-option="validateOptions" novalidate="novalidate" >
18
+                                <header ng-show="isNotEdit"><h3><strong>审批信息</strong></h3></header>
19
+                                <fieldset ng-show="isNotEdit">
20
+                                    <div ng-show="isNotEdit" class="form-group has-feedback"  >
21
+                                        <table class="table table-striped table-bordered table-hover" ng-repeat="audit in auditList" >
22
+                                            <tr>
23
+                                                <td  rowspan="3" width='10%'  >
24
+                                                    <label class="label"  style="margin-top: 45%;text-align: center;">{{audit.taskName}}</label>
25
+                                                </td>
26
+                                                <td>
27
+                                                    <label class="label" style="margin-top: 9px;text-align: center;">处理人</label>
28
+                                                </td>
29
+                                                <td width='30%'>
30
+                                                    <section>
31
+                                                        <label class="input">
32
+                                                            <input class="form-control" type="text" ng-readonly="true"
33
+                                                                   placeholder="{{userInfoAllData[audit.applyNameId] }}"
34
+                                                                   required>
35
+                                                        </label>
36
+                                                    </section>
37
+                                                </td>
38
+                                                <td >
39
+                                                    <label class="label" style="margin-top: 9px;text-align: center;">审批时间</label>
40
+                                                </td>
41
+                                                <td colspan="2" width='30%' style="margin-top: 9px;text-align: center;">
42
+                                                    <label class="label" style="margin-top: 9px;text-align: center;">{{audit.applyTime | date:'yyyy-MM-dd HH:mm:ss'}}</label>
43
+                                                </td>
44
+                                            </tr>
45
+                                            <tr>
46
+                                                <td rowspan="2">
47
+                                                    <label class="label" style="margin-top: 20px;text-align: center;">审批意见</label>
48
+                                                </td>
49
+                                                <td colspan="4" style="margin-top: 9px;text-align: center;">
50
+                                                    <label class="label" style="margin-top: 9px;text-align: center;">{{audit.applyContent}}</label>
51
+                                                </td>
52
+                                            </tr>
53
+                                            <!--<tr>
54
+                                                <td colspan="3" style="border-top: 0px;border-right: 0px;">
55
+                                                    &lt;!&ndash; 签字前面 &ndash;&gt;
56
+                                                </td>
57
+                                                <td width='30%' style="border-top: 0px;border-left: 0px;">
58
+                                                    电子签名
59
+                                                </td>
60
+                                            </tr>-->
61
+                                        </table>
62
+                                    </div>
63
+
64
+                                </fieldset>
65
+                                <div  ng-show="showNotCommit" style=" border-width:1px; position:relative; padding: 12px 14px 12px 12px;">
66
+                                    <label class="control-label pull-left" style="font-size:150%">审批意见</label>
67
+                                    <textarea  class="form-control" placeholder="同意" ng-init="audit.applyContent='同意'" ng-model="audit.applyContent"  rows="2" data-bv-field="review"></textarea>
68
+                                </div>
69
+                                <footer class="text-align-center" >
70
+                                    <button type="button" class="btn btn-default" ng-click="retList()">取消</button>
71
+                                    <button type="button" class="btn btn-primary" ng-show="showNotCommit" ng-click="editData(audit, '3')">驳回</button>
72
+                                    <button type="button" class="btn btn-primary" ng-show="showNotCommit" ng-click="editData(audit, '4')">通过</button>
73
+                                    <button type="button" class="btn btn-primary" ng-show="showCommit" ng-click="editData(audit, '1')">保存</button>
74
+                                    <button type="button" class="btn btn-primary" ng-show="showCommit" ng-click="editData(audit, '2')">提交</button>
75
+                                </footer>
76
+
77
+                            </form>
78
+                        </div>
79
+                    </div>
80
+                </div>
81
+            </article>
82
+        </div>
83
+    </section>
84
+</div>
85
+

Diferenças do arquivo suprimidas por serem muito extensas
+ 425 - 353
src/main/resources/static/app/business/module.js


+ 176 - 0
src/main/resources/static/app/business/storageSealedConfirmation/controller/pageEditCtrl.js

@@ -0,0 +1,176 @@
1
+angular.module('app.business').controller("pageEditCtrl", function ($scope, $http, $stateParams, $state, $rootScope, APP_CONFIG, $uibModal, pageListService, warehouseService) {
2
+    $scope.title = $stateParams.title;
3
+    $scope.sealedStorage = {};
4
+
5
+    // console.log("userInfoAllData", $rootScope.userInfoAllData)
6
+
7
+    // 根据id查询数据
8
+    $scope.getDataById = function (id) {
9
+        pageListService.getDataById(id).then(function (data) {
10
+            $scope.sealedStorage = data.data;
11
+            $scope.auditList = data.data.processList;
12
+
13
+            if ($scope.sealedStorage.auditState === 1 || $scope.sealedStorage.auditState === 3) {
14
+                $scope.isNotEdit = false; // 审批状态
15
+            } else {
16
+                $scope.isNotEdit = true; // 审批状态
17
+            }
18
+            $scope.loadWare();
19
+        }, function (data) {
20
+            console.log(data);
21
+        });
22
+    };
23
+
24
+    if ($stateParams.editType === 'add' && $stateParams.auditState === '1') {
25
+        // 下拉编辑
26
+        $scope.isNotEdit = false;
27
+        $scope.showNotCommit = false; // 通过,驳回
28
+        $scope.showCommit = true; // 保存,提交
29
+        $scope.isNotEdit = false; // 审批信息
30
+    } else if ($stateParams.editType === 'update') {
31
+        console.log("$stateParams.editType-->", $stateParams.editType)
32
+        // 下拉编辑
33
+        $scope.isNotEdit = false;
34
+        $scope.showNotCommit = false; // 通过,驳回
35
+        $scope.showCommit = true; // 保存,提交
36
+        $scope.isNotEdit = false; // 审批信息
37
+
38
+        $scope.getDataById($stateParams.id);
39
+    } else if ($stateParams.editType === 'audit') {
40
+        // 下拉编辑
41
+        $scope.isNotEdit = true;
42
+        $scope.showNotCommit = true; // 通过,驳回
43
+        $scope.showCommit = false; // 保存,提交
44
+        $scope.isNotEdit = true; // 审批信息
45
+
46
+        $scope.getDataById($stateParams.id);
47
+    } else {
48
+        // 下拉编辑
49
+        $scope.isNotEdit = true;
50
+        // 显示提交按钮
51
+        $scope.showCommit = true;
52
+        $scope.showNotCommit = false; // 通过,驳回
53
+        $scope.showCommit = false; // 保存,提交
54
+        $scope.isNotEdit = true; // 审批信息
55
+
56
+        $scope.getDataById($stateParams.id);
57
+    }
58
+
59
+    // 新增,修改按钮判断
60
+    $scope.editData = function (audit, auditType) {
61
+        $scope.sealedStorage.saveProcess = {};
62
+        $scope.sealedStorage.saveProcess.auditState = auditType;
63
+        $scope.sealedStorage.saveProcess.taskType = 'storage_sealed_confirmation';
64
+        $scope.sealedStorage.saveProcess.applyNameId = $rootScope.userInfo.userId;
65
+        $scope.sealedStorage.saveProcess.applyName = $rootScope.userInfo.realName;
66
+
67
+        if(auditType === '2' && $scope.sealedStorage.auditState === 1) {
68
+            $scope.sealedStorage.saveProcess.taskName = '员工提交';
69
+            $scope.sealedStorage.saveProcess.applyResult = '待审批';
70
+            $scope.sealedStorage.saveProcess.applyContent = $rootScope.userInfo.realName +  '提交';
71
+            $scope.sealedStorage.auditState = auditType;
72
+        } else if (auditType === '3') {
73
+            $scope.sealedStorage.saveProcess.taskName = '驳回';
74
+            $scope.sealedStorage.saveProcess.applyResult = '审批结束';
75
+            $scope.sealedStorage.saveProcess.applyContent = audit.applyContent;
76
+            $scope.sealedStorage.auditState = 3;
77
+        } else if (auditType === '4' && $scope.sealedStorage.auditState === 2) {
78
+            $scope.sealedStorage.saveProcess.taskName = '部门审核';
79
+            $scope.sealedStorage.saveProcess.applyResult = '已审批';
80
+            $scope.sealedStorage.auditState = auditType;
81
+        } else if (auditType === '4' && $scope.sealedStorage.auditState === 4) {
82
+            $scope.sealedStorage.saveProcess.taskName = '单位领导审核';
83
+            $scope.sealedStorage.saveProcess.applyResult = '审批结束';
84
+            $scope.sealedStorage.saveProcess.applyContent = audit.applyContent;
85
+            $scope.sealedStorage.auditState = 5;
86
+        } else {
87
+            $scope.sealedStorage.auditState = auditType;
88
+        }
89
+        if ($stateParams.id === '0') {
90
+            // 新增
91
+            $scope.save(audit);
92
+        } else {
93
+            $scope.update(audit);
94
+        }
95
+    };
96
+
97
+    // 获取入库中的仓房油罐
98
+    $scope.selectNotSealedStorageList = function () {
99
+        pageListService.selectNotSealedStorage($rootScope.userInfo.orgId).then(function (data) {
100
+            $scope.sealedStorageList = data.data;
101
+        }, function (data) {
102
+            console.log(data);
103
+        });
104
+    };
105
+    $scope.selectNotSealedStorageList();
106
+
107
+    // 货位列表
108
+    $scope.loadWare = function() {
109
+        warehouseService.getStorehouse($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId).then(function(data){
110
+            $scope.warelist = data.wareList;
111
+        },function(data){
112
+            console.log(data);
113
+        });
114
+    };
115
+
116
+    // 获取封仓数据
117
+    $scope.checkGrainAttribute = function() {
118
+        pageListService.checkGrainAttribute($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId, $scope.sealedStorage.warehouseId).then(function(data){
119
+            $scope.sealedStorage = data.data;
120
+        },function(data){
121
+            console.log(data);
122
+        });
123
+    };
124
+
125
+    // 表单效验
126
+    var validator = $("#storageSealed-form").validate();
127
+
128
+    // 保存
129
+    $scope.save = function() {
130
+        if(validator.form()) {
131
+            pageListService.saveData($scope.sealedStorage).then(function (data) {
132
+                if (data.retCode === '200') {
133
+                    alert('保存成功');
134
+                    $state.go('app.business.grainReservesManage.storageSealedConfirmation.getPageList');
135
+                } else {
136
+                    alert(data.message);
137
+                }
138
+            }, function (data) {
139
+                console.log(data);
140
+            });
141
+        }
142
+    };
143
+
144
+    // 修改
145
+    $scope.update = function() {
146
+        if(validator.form()) {
147
+            pageListService.updateData($scope.sealedStorage).then(function (data) {
148
+                if (data.retCode === '200') {
149
+                    alert('修改成功');
150
+                    if ($stateParams.auditState === '1') {
151
+                        $state.go('app.business.grainReservesManage.storageSealedConfirmation.getPageList');
152
+                    }
153
+                    if ($stateParams.auditState === '2') {
154
+                        $state.go('app.business.grainReservesManage.storageSealedConfirmation.getPageList-audit');
155
+                    }
156
+                    if ($stateParams.auditState === '3') {
157
+                        $state.go('app.business.grainReservesManage.storageSealedConfirmation.getPageList-auditEnd');
158
+                    }
159
+                } else {
160
+                    alert(data.message);
161
+                }
162
+            }, function (data) {
163
+                console.log(data);
164
+            });
165
+        }
166
+    };
167
+
168
+    // 返回
169
+    $scope.retList = function () {
170
+        if ($rootScope.previousState_name !== '') {
171
+            $rootScope.back();
172
+        } else {
173
+            $state.go('app.business.grainReservesManage.storageSealedConfirmation.getPageList');
174
+        }
175
+    }
176
+});

+ 95 - 0
src/main/resources/static/app/business/storageSealedConfirmation/controller/pageListCtrl.js

@@ -0,0 +1,95 @@
1
+angular.module('app.business').controller("pageListCtrl", function ($scope, $http, $stateParams, $state, $rootScope, APP_CONFIG, $uibModal, pageListService, warehouseService) {
2
+
3
+    // 分页初始化
4
+    $scope.pageInfo = {pageNum: 1, pageSize: 10};
5
+    $scope.auditState = $stateParams.auditState;
6
+    $scope.search = {auditState: $stateParams.auditState, houseId: '', warehouseId: ''};
7
+    $scope.title = $stateParams.title;
8
+
9
+    // 是否显示新增按钮
10
+    $scope.isNotEdit = false;
11
+    if ($stateParams.auditState === '1') {
12
+        $scope.isNotEdit = true;
13
+    }
14
+
15
+    // 获取列表数据
16
+    $scope.loadData = function () {
17
+        pageListService.getPageList($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
18
+            $scope.pageInfo = data.data;
19
+        }, function (data) {
20
+            console.log(data);
21
+        });
22
+    };
23
+    $scope.loadData();
24
+
25
+    // 新增,查看,修改
26
+    $scope.editData = function (id, editType) {
27
+        if (editType === 'add') {
28
+            $state.go('app.business.grainReservesManage.storageSealedConfirmation.edit', {
29
+                id: id,
30
+                editType: editType,
31
+                auditState: $stateParams.auditState
32
+            });
33
+        } else if (editType === 'update') {
34
+            $state.go('app.business.grainReservesManage.storageSealedConfirmation.edit', {
35
+                id: id,
36
+                editType: editType,
37
+                auditState: $stateParams.auditState
38
+            });
39
+        } else if (editType === 'audit') {
40
+            $state.go('app.business.grainReservesManage.storageSealedConfirmation.edit', {
41
+                id: id,
42
+                editType: editType,
43
+                auditState: $stateParams.auditState
44
+            });
45
+        } else {
46
+            $state.go('app.business.grainReservesManage.storageSealedConfirmation.edit', {
47
+                id: id,
48
+                editType: editType,
49
+                auditState: $stateParams.auditState
50
+            });
51
+        }
52
+    };
53
+
54
+    // 删除
55
+    $scope.deleteById = function (id) {
56
+        if (!confirm("确定要删除吗?")) {
57
+            return;
58
+        }
59
+        pageListService.deleteDataById(id).then(function (data) {
60
+            if (data.retCode === '200') {
61
+                alert("删除成功!");
62
+                // 重新加载数据
63
+                $scope.loadData();
64
+            } else {
65
+                alert(data.message);
66
+            }
67
+        }, function (data) {
68
+            console.log(data);
69
+        });
70
+    };
71
+
72
+    // 货位列表
73
+    $scope.loadWare = function () {
74
+        warehouseService.getStorehouse($rootScope.orgInfo.orgId, $scope.search.houseId).then(function (data) {
75
+            $scope.warelist = data.wareList;
76
+        }, function (data) {
77
+            console.log(data);
78
+        });
79
+    };
80
+
81
+    // 接收广播,切换仓房
82
+    $scope.$on("storeChangeed", function (event, storehouseId) {
83
+        $scope.search.storehouseId = storehouseId;
84
+        $scope.loadData();
85
+        $scope.loadWare();
86
+    })
87
+
88
+    // 翻页
89
+    $scope.goPage = function (pageNum) {
90
+        if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
91
+            $scope.pageInfo.pageNum = pageNum;
92
+            $scope.loadData();
93
+        }
94
+    };
95
+});

+ 123 - 0
src/main/resources/static/app/business/storageSealedConfirmation/service/pageListService.js

@@ -0,0 +1,123 @@
1
+"use strict";
2
+angular.module('app.business').service("pageListService", function ($http, $rootScope, $q, APP_CONFIG) {
3
+    this.getPageList = function(pageNum, pageSize, search) {
4
+        var d = $q.defer();
5
+        $http({
6
+            method : 'GET',
7
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/getPageList',
8
+            params : {
9
+                pageNum : pageNum,
10
+                pageSize : pageSize,
11
+                auditState  : search.auditState, // 1:待提交,2:待审批,3:驳回,4:已审批,5:审批结束
12
+                orgId : $rootScope.userInfo.orgId,
13
+                houseId : search.houseId,
14
+                warehouseId : search.warehouseId
15
+            }
16
+        }).then(function successCallback(response) {
17
+            // 请求成功执行代码
18
+            d.resolve(response.data);
19
+        }, function errorCallback(response) {
20
+            // 请求失败执行代码
21
+            d.reject("error");
22
+        });
23
+        return d.promise;
24
+    };
25
+
26
+    this.selectNotSealedStorage = function(orgId) {
27
+        var d = $q.defer();
28
+        $http({
29
+            method : 'GET',
30
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/selectNotSealedStorage/' + orgId
31
+        }).then(function successCallback(response) {
32
+            // 请求成功执行代码
33
+            d.resolve(response.data);
34
+        }, function errorCallback(response) {
35
+            // 请求失败执行代码
36
+            d.reject("error");
37
+        });
38
+        return d.promise;
39
+    };
40
+
41
+    this.checkGrainAttribute = function(orgId, houseId, warehouseId) {
42
+        var d = $q.defer();
43
+        $http({
44
+            method : 'GET',
45
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/checkGrainAttribute/' + orgId + '/' + houseId + '/' + warehouseId
46
+        }).then(function successCallback(response) {
47
+            // 请求成功执行代码
48
+            d.resolve(response.data);
49
+        }, function errorCallback(response) {
50
+            // 请求失败执行代码
51
+            d.reject("error");
52
+        });
53
+        return d.promise;
54
+    };
55
+
56
+    // 保存
57
+    this.saveData = function(data) {
58
+        var d = $q.defer();
59
+        $http({
60
+            method : 'POST',
61
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/saveData',
62
+            data: angular.toJson(data),
63
+            headers: {'Content-Type': 'application/json'}
64
+        }).then(function successCallback(response) {
65
+            // 请求成功执行代码
66
+            d.resolve(response.data);
67
+        }, function errorCallback(response) {
68
+            // 请求失败执行代码
69
+            d.reject("error");
70
+        });
71
+        return d.promise;
72
+    };
73
+
74
+    // 修改
75
+    this.updateData = function(data) {
76
+        var d = $q.defer();
77
+        $http({
78
+            method : 'POST',
79
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/updateData',
80
+            data: angular.toJson(data),
81
+            headers: {'Content-Type': 'application/json'}
82
+        }).then(function successCallback(response) {
83
+            // 请求成功执行代码
84
+            d.resolve(response.data);
85
+        }, function errorCallback(response) {
86
+            // 请求失败执行代码
87
+            d.reject("error");
88
+        });
89
+        return d.promise;
90
+    };
91
+
92
+    // id查询
93
+    this.getDataById = function(id) {
94
+        var d = $q.defer();
95
+        $http({
96
+            method : 'GET',
97
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/getDataById/' + id
98
+        }).then(function successCallback(response) {
99
+            // 请求成功执行代码
100
+            d.resolve(response.data);
101
+        }, function errorCallback(response) {
102
+            // 请求失败执行代码
103
+            d.reject("error");
104
+        });
105
+        return d.promise;
106
+    };
107
+
108
+    // id删除
109
+    this.deleteDataById = function(id) {
110
+        var d = $q.defer();
111
+        $http({
112
+            method : 'GET',
113
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/deleteDataById/' + id
114
+        }).then(function successCallback(response) {
115
+            // 请求成功执行代码
116
+            d.resolve(response.data);
117
+        }, function errorCallback(response) {
118
+            // 请求失败执行代码
119
+            d.reject("error");
120
+        });
121
+        return d.promise;
122
+    };
123
+});

+ 110 - 0
src/main/resources/static/app/business/storageSealedConfirmation/views/pageEdit.html

@@ -0,0 +1,110 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content" style=" border-width:5px; margin-left:2%;position:relative;margin-right:2%;">
3
+    <!-- widget grid -->
4
+    <section id="widget-grid" widget-grid>
5
+        <!-- START ROW -->
6
+        <div class="row">
7
+            <!-- NEW COL START -->
8
+            <article class="col-sm-12 col-md-12 col-lg-12">
9
+                <!-- Widget ID (each widget will need unique ID)-->
10
+                <div jarvis-widget id="form-grid-widget" data-widget-colorbutton="false" data-widget-editbutton="false"
11
+                     data-widget-custombutton="false">
12
+                    <!-- widget div-->
13
+                    <div>
14
+                        <!-- widget content -->
15
+                        <div class="widget-body no-padding">
16
+                            <form id="storageSealed-form" class="smart-form ng-pristine ng-valid"
17
+                                  data-validator-option="validateOptions" novalidate="novalidate"
18
+                                  style=" border-width:5px; margin-left:2%;position:relative;margin-right:2%;">
19
+                                <header>
20
+                                    <a href-void class="btn btn-default btn-xs" ng-click="retList()">
21
+                                        <i class="fa fa-angle-left"></i>&nbsp;返回&nbsp;
22
+                                    </a>
23
+                                    &nbsp;<strong>{{title}}</strong>
24
+                                    <span class="pull-right font-xs">带<span style="color: red;">*</span>的部分必须填写</span>
25
+                                </header>
26
+                                <fieldset>
27
+                                    <div class="row">
28
+                                        <section class="col col-3">
29
+                                            <label class="label">仓房名称:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
30
+                                            <label class="select">
31
+                                                <select ng-model="sealedStorage.houseId" ng-disabled="isNotEdit" ng-change="loadWare()"
32
+                                                        ng-options="store.houseId as store.houseName for store in sealedStorageList"
33
+                                                        class="form-control" required>
34
+                                                    <option value="">--请选择--</option>
35
+                                                </select>
36
+                                            </label>
37
+                                        </section>
38
+                                        <section class="col col-3">
39
+                                            <label class="label">货位名称:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
40
+                                            <label class="select">
41
+                                                <select ng-model="sealedStorage.warehouseId" ng-disabled="isNotEdit" ng-change="checkGrainAttribute()"
42
+                                                        ng-options="ware.warehouseId as ware.warehouseName for ware in warelist"
43
+                                                        class="form-control" required>
44
+                                                    <option value="">--请选择--</option>
45
+                                                </select>
46
+                                            </label>
47
+                                        </section>
48
+                                        <section class="col col-3">
49
+                                            <label class="label">粮食品种:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
50
+                                            <label class="input">
51
+                                                <input type="text" ng-model="dicData[sealedStorage.grainKind]" name="idCard"
52
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
53
+                                            </label>
54
+                                        </section>
55
+                                        <section class="col col-3">
56
+                                            <label class="label">粮食品性质:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
57
+                                            <label class="input">
58
+                                                <input type="text" ng-model="dicData[sealedStorage.grainAttribute]" name="idCard"
59
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
60
+                                            </label>
61
+                                        </section>
62
+                                    </div>
63
+                                    <div class="row">
64
+                                        <section class="col col-3">
65
+                                            <label class="label">封仓数量(公斤):<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
66
+                                            <label class="input">
67
+                                                <input type="text" ng-model="sealedStorage.sealedNumber" name="idCard"
68
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
69
+                                            </label>
70
+                                        </section>
71
+                                        <section class="col col-3">
72
+                                            <label class="label">等级:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
73
+                                            <label class="input">
74
+                                                <input type="text" ng-model="dicData[sealedStorage.grainGrade]" name="idCard"
75
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
76
+                                            </label>
77
+                                        </section>
78
+                                        <section class="col col-3">
79
+                                            <label class="label">产地:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
80
+                                            <label class="input">
81
+                                                <input type="text" ng-model="dicData[sealedStorage.placeOfOrigin]" name="idCard"
82
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
83
+                                            </label>
84
+                                        </section>
85
+                                        <section class="col col-3">
86
+                                            <label class="label">收获年度:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
87
+                                            <label class="input">
88
+                                                <input type="text" ng-model="dicData[sealedStorage.harvestYear]" name="idCard"
89
+                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
90
+                                            </label>
91
+                                        </section>
92
+                                    </div>
93
+                                    <div class="row">
94
+                                        <section class="col col-9">
95
+                                            <label class="label">备注:</label>
96
+                                            <label class="textarea">
97
+                                                <textarea type="textarea" ng-model="sealedStorage.remarks" ng-disabled="isNotEdit"></textarea>
98
+                                            </label>
99
+                                        </section>
100
+                                    </div>
101
+                                </fieldset>
102
+                                <div ng-include="'app/act/util/sealedConfirmation-audit.html'"></div>
103
+                            </form>
104
+                        </div>
105
+                    </div>
106
+                </div>
107
+            </article>
108
+        </div>
109
+    </section>
110
+</div>

+ 114 - 0
src/main/resources/static/app/business/storageSealedConfirmation/views/pageList.html

@@ -0,0 +1,114 @@
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
+                <div jarvis-widget id="standard-datatable-widget"
8
+                     data-widget-color="darken" data-widget-editbutton="false">
9
+                    <header>
10
+						<span class="widget-icon"> <i class="fa fa-table"></i></span>
11
+                        <h2>{{title}}</h2>
12
+                    </header>
13
+                    <div>
14
+                        <div class="widget-body no-padding">
15
+                            <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
16
+                                <div class="dt-toolbar">
17
+                                    <div class="col-xs-12 col-sm-9">
18
+                                        <div ng-show="isNotEdit" class="form-group">
19
+                                            <a has-permission="752" href-void class="btn btn-primary btn-sm" ng-click="editData('0', 'add')"><i class="fa fa-plus"></i>&nbsp;新&nbsp;增</a>&emsp;
20
+                                        </div>
21
+                                        <div class="form-group">
22
+                                            <label> 仓房/油罐名称:&emsp;
23
+                                                <select ng-model="search.houseId" class="form-control input-sm"
24
+                                                        ng-options="store.storehouseId as store.storehouseName for store in store_tank_list"
25
+                                                        ng-change="loadWare()">
26
+                                                    <option value="">请选择</option>
27
+                                                </select>&emsp;
28
+                                            </label>
29
+                                            <label> 货位名称:&emsp;
30
+                                                <select ng-model="search.warehouseId" class="form-control input-sm"
31
+                                                        ng-options="ware.warehouseId as ware.warehouseName for ware in warelist">
32
+                                                    <option value="">请选择</option>
33
+                                                </select>&emsp;
34
+                                            </label>
35
+                                            <a class="btn btn-default btn-sm" ng-click="loadData()">
36
+                                                <i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
37
+                                        </div>
38
+                                    </div>
39
+
40
+                                    <div class="col-sm-3 col-xs-6 hidden-xs">
41
+                                        <div class="dataTables_length">
42
+                                            <label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()"
43
+                                                                ng-options="num as num for num in [10,25,50,100]"
44
+                                                                class="form-control input-sm"></select> 条
45
+                                            </label>
46
+                                        </div>
47
+                                    </div>
48
+                                </div>
49
+
50
+                                <table class="table table-striped table-bordered table-hover"
51
+                                       width="100%">
52
+                                    <thead>
53
+                                    <tr>
54
+                                        <th data-class="expand" style="text-align:center;">序号</th>
55
+                                        <th data-class="expand" style="text-align:center;">仓房名称</th>
56
+                                        <th data-class="expand" style="text-align:center;">货位名称</th>
57
+                                        <th data-class="expand" style="text-align:center;">粮食品种</th>
58
+                                        <th data-class="expand" style="text-align:center;">粮食性质</th>
59
+                                        <th data-class="expand" style="text-align:center;">封仓数量(公斤)</th>
60
+                                        <th data-class="expand" style="text-align:center;">申请时间</th>
61
+                                        <th data-class="expand" style="text-align:center;">审批状态</th>
62
+                                        <th data-class="expand" style="text-align:center;">操作</th>
63
+                                    </tr>
64
+                                    </thead>
65
+
66
+                                    <tbody>
67
+                                    <tr ng-repeat="sealed in pageInfo.list">
68
+                                        <td style="text-align:center;">{{ $index + 1 }}</td>
69
+                                        <td style="text-align:center;">{{storehouseObj[sealed.houseId].storehouseName}}</td>
70
+                                        <td style="text-align:center;">{{wares[sealed.warehouseId].warehouseName}}</td>
71
+                                        <td style="text-align:center;">{{dicData[sealed.grainKind]}}</td>
72
+                                        <td style="text-align:center;">{{dicData[sealed.grainAttribute]}}</td>
73
+                                        <td style="text-align:center;">{{sealed.sealedNumber}}</td>
74
+                                        <td style="text-align:center;">{{sealed.applyTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
75
+                                        <td style="text-align:center;">
76
+                                            <!--1:待提交,2:待审批,3:驳回,4:已审批,5:审批结束-->
77
+                                            <div ng-switch="{{sealed.auditState}}">
78
+                                                <div ng-switch-when="1">待提交</div>
79
+                                                <div ng-switch-when="2">待审批</div>
80
+                                                <div ng-switch-when="3">驳回</div>
81
+                                                <div ng-switch-when="4">已审批</div>
82
+                                                <div ng-switch-when="5">审批结束</div>
83
+                                                <div ng-switch-default>{{sealed.auditState}}</div>
84
+                                            </div>
85
+                                        </td>
86
+                                        <td style="text-align:center;">
87
+                                            <span>
88
+                                                <a href-void ng-click="editData(sealed.id, 'select')"><i class="fa fa-info-circle"></i>查看&nbsp;</a>
89
+                                            </span>
90
+                                            <span ng-if="sealed.auditState==1 || sealed.auditState==3">
91
+                                                <a has-permission="753" href-void ng-click="editData(sealed.id, 'update')"><i class="fa fa-edit"></i>编辑&nbsp;</a>
92
+                                            </span>
93
+                                            <span ng-if="sealed.auditState==1">
94
+                                                <a has-permission="754" href-void ng-click="deleteById(sealed.id)"><i class="fa fa-edit"></i>删除&nbsp;</a>
95
+                                            </span>
96
+                                            <span ng-if="sealed.auditState==2 || sealed.auditState==4">
97
+                                                <a has-permission="755" href-void ng-click="editData(sealed.id, 'audit')"><i class="fa fa-edit"></i>审批</a>
98
+                                            </span>
99
+                                        </td>
100
+                                    </tr>
101
+                                    </tbody>
102
+
103
+                                </table>
104
+                                <div smart-include="app/layout/partials/page.tpl.html"></div>
105
+                            </div>
106
+                        </div>
107
+                    </div>
108
+                </div>
109
+            </article>
110
+        </div>
111
+
112
+    </section>
113
+
114
+</div>

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

@@ -203,6 +203,22 @@
203 203
                                     </li>
204 204
                                 </ul>
205 205
                             </li>
206
+                            <li has-func="511" data-menu-collapse>
207
+                                <a href="#">
208
+                                    <i class="fa fa-lg fa-fw fa-folder-open"></i>封仓确认单管理
209
+                                </a>
210
+                                <ul>
211
+                                    <li has-func="512" data-ui-sref-active="active">
212
+                                        <a data-ui-sref="app.business.grainReservesManage.storageSealedConfirmation.getPageList">封仓确认单申请</a>
213
+                                    </li>
214
+                                    <li has-func="513" data-ui-sref-active="active">
215
+                                        <a data-ui-sref="app.business.grainReservesManage.storageSealedConfirmation.getPageList-audit">封仓确认单审核</a>
216
+                                    </li>
217
+                                    <li has-func="515" data-ui-sref-active="active">
218
+                                        <a data-ui-sref="app.business.grainReservesManage.storageSealedConfirmation.getPageList-auditEnd">已审核封仓确认单</a>
219
+                                    </li>
220
+                                </ul>
221
+                            </li>
206 222
                         </ul>
207 223
                     </li>
208 224
                     <li data-menu-collapse>