Преглед на файлове

Merge branch 'master' of http://101.36.160.140:21044/depot-tianjin/depot-web-tianjin

maopixin преди 2 години
родител
ревизия
a82b023ca5

+ 10 - 13
src/main/resources/static/app/storage/controller/keepAccount/houseKeepAccountCtrl.js

@@ -227,13 +227,8 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
227 227
 		if (butType != 3) { //记账、审核、查看
228 228
 			keepAccountService.accountingRecord($scope.fcbgz.ch, $scope.fcbgz.hwh, $scope.fcbgz.pz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.zy, 0).then(function(data){
229 229
 				$scope.account = data.obj;
230
-				if (butType == 0) { //记账
231
-					if (data.obj.id != null || data.obj.id != undefined) {
232
-						alert("当前记录已记账!");
233
-						return;
234
-					}
235
-				} else if (butType == 1) { //审核
236
-					if (data.obj.id == null || data.obj.id == undefined) {
230
+				if (butType == 1) { //审核
231
+					if (!data.obj.id) {
237 232
 						alert("当前记录还尚未记账,请先记账!");
238 233
 						return;
239 234
 					} else {
@@ -248,6 +243,7 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
248 243
 						return;
249 244
 					}
250 245
 				}
246
+				account.id === data.obj.id;
251 247
 				$state.go('app.storage.account.houseKeepAccount.houseKeepAccountEdit',{account:angular.toJson(account), butType:butType});
252 248
 			},function(data){
253 249
 		        console.log(data);
@@ -304,15 +300,17 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
304 300
 	}
305 301
 	$scope.loadWare();
306 302
 
307
-	// 获取列表日数据
303
+
304
+	// $scope.butType = $stateParams.butType;
308 305
 	$scope.edit = function() {
309 306
 		$scope.fcbgz = angular.fromJson($stateParams.account);
310
-		$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
311 307
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
312 308
 		$scope.fcbgz.rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
313 309
 		keepAccountService.accountingRecord($scope.fcbgz.ch, $scope.fcbgz.hwh, $scope.fcbgz.pz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.zy, 0).then(function(data){
314 310
 			$scope.account = data.obj;
315
-
311
+			//初始分仓保管账表对象数据
312
+			$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
313
+			$scope.fcbgz.rq = rq;
316 314
 			if ($stateParams.butType == 0) { //记账
317 315
 				//初始化数据记账表对象数据
318 316
 				$scope.account.houseId = $scope.fcbgz.ch; //仓房
@@ -327,6 +325,8 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
327 325
 				$scope.account.srsl = $scope.fcbgz.srsl; //入库数量
328 326
 				$scope.account.zcsl = $scope.fcbgz.zcsl; //出库数量
329 327
 				$scope.account.kcsl = $scope.fcbgz.kcsl; //库存数量
328
+				$scope.account.sssh = $scope.fcbgz.sssh; //损失损耗
329
+				$scope.account.zbszsl = $scope.fcbgz.zbszsl; //折标水杂数量
330 330
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
331 331
 				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
332 332
 				//设置状态为记账
@@ -357,15 +357,12 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
357 357
 				//提交按钮影藏
358 358
 				$scope.isNotEdit = true;
359 359
 			}
360
-			//初始分仓保管账表对象数据
361 360
 			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
362 361
 			$scope.fcbgz.pz = $rootScope.dicData[$scope.fcbgz.pz];
363 362
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
364
-			$scope.fcbgz.rq = rq;
365 363
 		},function(data){
366 364
 	        console.log(data);
367 365
 	    });
368
-
369 366
 	}
370 367
 	$scope.edit();
371 368
 	

+ 13 - 11
src/main/resources/static/app/storage/controller/keepAccount/keepTotalAccountCtrl.js

@@ -80,6 +80,8 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
80 80
 		$scope.loadData();
81 81
 	}
82 82
 
83
+	$scope.butType = $stateParams.butType;
84
+
83 85
     //页面跳转
84 86
     $scope.edit = function(account, butType) {
85 87
 		var obj_str = angular.toJson(account);
@@ -88,12 +90,7 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
88 90
 		if (butType != 3) { //记账、审核、查看
89 91
 			keepAccountService.accountingRecord(null, null, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
90 92
 				$scope.account = data.obj;
91
-				if (butType == 0) { //记账
92
-					if (data.obj.id != null || data.obj.id != undefined) {
93
-						alert("当前记录已记账!");
94
-						return;
95
-					}
96
-				} else if (butType == 1) { //审核
93
+				if (butType == 1) { //审核
97 94
 					if (data.obj.id == null || data.obj.id == undefined) {
98 95
 						alert("当前记录还尚未记账,请先记账!");
99 96
 						return;
@@ -109,6 +106,9 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
109 106
 						return;
110 107
 					}
111 108
 				}
109
+
110
+				account.id === data.obj.id;
111
+
112 112
 				$state.go('app.storage.account.keepTotalAccount.keepTotalAccountEdit',{account:angular.toJson(account), butType:butType});
113 113
 			},function(data){
114 114
 		        console.log(data);
@@ -129,11 +129,13 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
129 129
 	// 获取列表日数据
130 130
 	$scope.edit = function() {
131 131
 		$scope.fcbgz = angular.fromJson($stateParams.account);
132
-		$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
133 132
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM");
134 133
 		keepAccountService.accountingRecord($scope.fcbgz.ch, $scope.fcbgz.hwh, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
135 134
 			$scope.account = data.obj;
136
-
135
+			//初始分仓保管账表对象数据
136
+			$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
137
+			$scope.fcbgz.rq = rq;
138
+			
137 139
 			if ($stateParams.butType == 0) { //记账
138 140
 				//初始化数据记账表对象数据
139 141
 				$scope.account.lspz = $scope.fcbgz.lspz;
@@ -142,6 +144,8 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
142 144
 				$scope.account.srsl = $scope.fcbgz.srsl;
143 145
 				$scope.account.zcsl = $scope.fcbgz.zcsl;
144 146
 				$scope.account.kcsl = $scope.fcbgz.kcsl;
147
+				$scope.account.sssh = $scope.fcbgz.sssh; //损失损耗
148
+				$scope.account.zbszsl = $scope.fcbgz.zbszsl; //折标水杂数量
145 149
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
146 150
 				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
147 151
 				$scope.account.remark = $scope.fcbgz.remark; //摘要
@@ -172,11 +176,9 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
172 176
 				//提交按钮影藏
173 177
 				$scope.isNotEdit = true;
174 178
 			}
175
-			//初始分仓保管账表对象数据
176 179
 			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
177
-			$scope.fcbgz.lspz = $rootScope.dicData[$scope.fcbgz.lspz];
180
+			$scope.fcbgz.pz = $rootScope.dicData[$scope.fcbgz.pz];
178 181
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
179
-			$scope.fcbgz.rq = rq;
180 182
 		},function(data){
181 183
 	        console.log(data);
182 184
 	    });

+ 19 - 9
src/main/resources/static/app/storage/views/keepAccount/houseKeepAccount-edit.html

@@ -188,15 +188,25 @@
188 188
 												</label>
189 189
 											</th>
190 190
 										</tr>
191
-<!-- 										<tr ng-hide="auditor_th"> -->
192
-											
193
-<!-- 											<th> -->
194
-<!-- 												<label class="label" style="margin-top: 9px;text-align: center;"></label> -->
195
-<!-- 											</th> -->
196
-<!-- 											<th> -->
197
-<!-- 												<label class="select"></label> -->
198
-<!-- 											</th> -->
199
-<!-- 										</tr> -->
191
+										<tr>
192
+											<th>
193
+												<label class="label" style="margin-top: 9px;text-align: center;">损失损耗(Kg)</label>
194
+											</th>
195
+											<th>
196
+												<label class="input">
197
+													<input type="text" ng-model="account.sssh" ng-readonly="butType != 0" class="form-control" />
198
+												</label>
199
+											</th>
200
+											<th>
201
+												<label class="label" style="margin-top: 9px;text-align: center;">折标水杂数量(Kg)</label>
202
+											</th>
203
+											<th>
204
+												<label class="input">
205
+													<input type="text" ng-model="account.zbszsl" ng-readonly="butType != 0" class="form-control" />
206
+												</label>
207
+											</th>
208
+											<th colspan="2"></th>
209
+										</tr>	
200 210
 										<tr ng-hide="auditor_th">
201 211
 											<th>
202 212
 												<label class="label" style="margin-top: 9px;text-align: center;">审核意见</label>

+ 4 - 0
src/main/resources/static/app/storage/views/keepAccount/houseKeepAccount-list.html

@@ -100,6 +100,8 @@
100 100
 				                            <th>收入数量(公斤)</th>
101 101
 				                            <th>支出数量(公斤)</th>
102 102
 				                            <th>库存数量(公斤)</th>
103
+				                            <th>损失损耗</th>
104
+				                            <th>折标水杂数量</th>
103 105
 				                            <th>记账人</th>
104 106
 				                            <th>审核人</th>
105 107
 				                            <th>操作</th>
@@ -119,6 +121,8 @@
119 121
 			                        		<td>{{account.srsl}}</td>
120 122
 			                        		<td>{{account.zcsl}}</td>
121 123
 			                        		<td>{{account.kcsl}}</td>
124
+			                        		<td>{{account.sssh}}</td>
125
+			                        		<td>{{account.zbszsl}}</td>
122 126
 			                        		<td>{{account.accountingPerson}}</td>
123 127
 			                        		<td>{{account.auditor}}</td>
124 128
 			                        		<td>

+ 19 - 0
src/main/resources/static/app/storage/views/keepAccount/keepTotalAccount-edit.html

@@ -135,6 +135,25 @@
135 135
 												</label>
136 136
 											</th>
137 137
 										</tr>
138
+										<tr>
139
+											<th>
140
+												<label class="label" style="margin-top: 9px;text-align: center;">损失损耗(Kg)</label>
141
+											</th>
142
+											<th>
143
+												<label class="input">
144
+													<input type="text" ng-model="account.sssh" ng-readonly="butType != 0" class="form-control" />
145
+												</label>
146
+											</th>
147
+											<th>
148
+												<label class="label" style="margin-top: 9px;text-align: center;">折标水杂数量(Kg)</label>
149
+											</th>
150
+											<th>
151
+												<label class="input">
152
+													<input type="text" ng-model="account.zbszsl" ng-readonly="butType != 0" class="form-control" />
153
+												</label>
154
+											</th>
155
+											<th colspan="2"></th>
156
+										</tr>
138 157
 										<tr ng-hide="auditor_th">
139 158
 											<th>
140 159
 												<label class="label" style="margin-top: 9px;text-align: center;">审核时间</label>

+ 4 - 0
src/main/resources/static/app/storage/views/keepAccount/keepTotalAccount-list.html

@@ -69,6 +69,8 @@
69 69
 				                            <th>收入数量(公斤)</th>
70 70
 				                            <th>支出数量(公斤)</th>
71 71
 				                            <th>库存数量(公斤)</th>
72
+											<th>损失损耗</th>
73
+				                            <th>折标水杂数量</th>
72 74
 				                            <th>记账人</th>
73 75
 				                            <th>审核人</th>
74 76
 				                            <th>操作</th>
@@ -86,6 +88,8 @@
86 88
 			                        		<td>{{account.srsl}}</td>
87 89
 			                        		<td>{{account.zcsl}}</td>
88 90
 			                        		<td>{{account.kcsl}}</td>
91
+											<td>{{account.sssh}}</td>
92
+			                        		<td>{{account.zbszsl}}</td>
89 93
 			                        		<td>{{account.accountingPerson}}</td>
90 94
 			                        		<td>{{account.auditor}}</td>
91 95
 			                        		<td>