Browse Source

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

maopixin 2 years ago
parent
commit
a82b023ca5

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

@@ -227,13 +227,8 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
227
 		if (butType != 3) { //记账、审核、查看
227
 		if (butType != 3) { //记账、审核、查看
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){
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
 				$scope.account = data.obj;
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
 						alert("当前记录还尚未记账,请先记账!");
232
 						alert("当前记录还尚未记账,请先记账!");
238
 						return;
233
 						return;
239
 					} else {
234
 					} else {
@@ -248,6 +243,7 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
248
 						return;
243
 						return;
249
 					}
244
 					}
250
 				}
245
 				}
246
+				account.id === data.obj.id;
251
 				$state.go('app.storage.account.houseKeepAccount.houseKeepAccountEdit',{account:angular.toJson(account), butType:butType});
247
 				$state.go('app.storage.account.houseKeepAccount.houseKeepAccountEdit',{account:angular.toJson(account), butType:butType});
252
 			},function(data){
248
 			},function(data){
253
 		        console.log(data);
249
 		        console.log(data);
@@ -304,15 +300,17 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
304
 	}
300
 	}
305
 	$scope.loadWare();
301
 	$scope.loadWare();
306
 
302
 
307
-	// 获取列表日数据
303
+
304
+	// $scope.butType = $stateParams.butType;
308
 	$scope.edit = function() {
305
 	$scope.edit = function() {
309
 		$scope.fcbgz = angular.fromJson($stateParams.account);
306
 		$scope.fcbgz = angular.fromJson($stateParams.account);
310
-		$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
311
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
307
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
312
 		$scope.fcbgz.rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
308
 		$scope.fcbgz.rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");
313
 		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){
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
 			$scope.account = data.obj;
310
 			$scope.account = data.obj;
315
-
311
+			//初始分仓保管账表对象数据
312
+			$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
313
+			$scope.fcbgz.rq = rq;
316
 			if ($stateParams.butType == 0) { //记账
314
 			if ($stateParams.butType == 0) { //记账
317
 				//初始化数据记账表对象数据
315
 				//初始化数据记账表对象数据
318
 				$scope.account.houseId = $scope.fcbgz.ch; //仓房
316
 				$scope.account.houseId = $scope.fcbgz.ch; //仓房
@@ -327,6 +325,8 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
327
 				$scope.account.srsl = $scope.fcbgz.srsl; //入库数量
325
 				$scope.account.srsl = $scope.fcbgz.srsl; //入库数量
328
 				$scope.account.zcsl = $scope.fcbgz.zcsl; //出库数量
326
 				$scope.account.zcsl = $scope.fcbgz.zcsl; //出库数量
329
 				$scope.account.kcsl = $scope.fcbgz.kcsl; //库存数量
327
 				$scope.account.kcsl = $scope.fcbgz.kcsl; //库存数量
328
+				$scope.account.sssh = $scope.fcbgz.sssh; //损失损耗
329
+				$scope.account.zbszsl = $scope.fcbgz.zbszsl; //折标水杂数量
330
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
330
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
331
 				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
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
 				$scope.isNotEdit = true;
358
 				$scope.isNotEdit = true;
359
 			}
359
 			}
360
-			//初始分仓保管账表对象数据
361
 			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
360
 			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
362
 			$scope.fcbgz.pz = $rootScope.dicData[$scope.fcbgz.pz];
361
 			$scope.fcbgz.pz = $rootScope.dicData[$scope.fcbgz.pz];
363
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
362
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
364
-			$scope.fcbgz.rq = rq;
365
 		},function(data){
363
 		},function(data){
366
 	        console.log(data);
364
 	        console.log(data);
367
 	    });
365
 	    });
368
-
369
 	}
366
 	}
370
 	$scope.edit();
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
 		$scope.loadData();
80
 		$scope.loadData();
81
 	}
81
 	}
82
 
82
 
83
+	$scope.butType = $stateParams.butType;
84
+
83
     //页面跳转
85
     //页面跳转
84
     $scope.edit = function(account, butType) {
86
     $scope.edit = function(account, butType) {
85
 		var obj_str = angular.toJson(account);
87
 		var obj_str = angular.toJson(account);
@@ -88,12 +90,7 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
88
 		if (butType != 3) { //记账、审核、查看
90
 		if (butType != 3) { //记账、审核、查看
89
 			keepAccountService.accountingRecord(null, null, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
91
 			keepAccountService.accountingRecord(null, null, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
90
 				$scope.account = data.obj;
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
 					if (data.obj.id == null || data.obj.id == undefined) {
94
 					if (data.obj.id == null || data.obj.id == undefined) {
98
 						alert("当前记录还尚未记账,请先记账!");
95
 						alert("当前记录还尚未记账,请先记账!");
99
 						return;
96
 						return;
@@ -109,6 +106,9 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
109
 						return;
106
 						return;
110
 					}
107
 					}
111
 				}
108
 				}
109
+
110
+				account.id === data.obj.id;
111
+
112
 				$state.go('app.storage.account.keepTotalAccount.keepTotalAccountEdit',{account:angular.toJson(account), butType:butType});
112
 				$state.go('app.storage.account.keepTotalAccount.keepTotalAccountEdit',{account:angular.toJson(account), butType:butType});
113
 			},function(data){
113
 			},function(data){
114
 		        console.log(data);
114
 		        console.log(data);
@@ -129,11 +129,13 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
129
 	// 获取列表日数据
129
 	// 获取列表日数据
130
 	$scope.edit = function() {
130
 	$scope.edit = function() {
131
 		$scope.fcbgz = angular.fromJson($stateParams.account);
131
 		$scope.fcbgz = angular.fromJson($stateParams.account);
132
-		$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
133
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM");
132
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM");
134
 		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){
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
 			$scope.account = data.obj;
134
 			$scope.account = data.obj;
136
-
135
+			//初始分仓保管账表对象数据
136
+			$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
137
+			$scope.fcbgz.rq = rq;
138
+			
137
 			if ($stateParams.butType == 0) { //记账
139
 			if ($stateParams.butType == 0) { //记账
138
 				//初始化数据记账表对象数据
140
 				//初始化数据记账表对象数据
139
 				$scope.account.lspz = $scope.fcbgz.lspz;
141
 				$scope.account.lspz = $scope.fcbgz.lspz;
@@ -142,6 +144,8 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
142
 				$scope.account.srsl = $scope.fcbgz.srsl;
144
 				$scope.account.srsl = $scope.fcbgz.srsl;
143
 				$scope.account.zcsl = $scope.fcbgz.zcsl;
145
 				$scope.account.zcsl = $scope.fcbgz.zcsl;
144
 				$scope.account.kcsl = $scope.fcbgz.kcsl;
146
 				$scope.account.kcsl = $scope.fcbgz.kcsl;
147
+				$scope.account.sssh = $scope.fcbgz.sssh; //损失损耗
148
+				$scope.account.zbszsl = $scope.fcbgz.zbszsl; //折标水杂数量
145
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
149
 				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
146
 				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
150
 				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
147
 				$scope.account.remark = $scope.fcbgz.remark; //摘要
151
 				$scope.account.remark = $scope.fcbgz.remark; //摘要
@@ -172,11 +176,9 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
172
 				//提交按钮影藏
176
 				//提交按钮影藏
173
 				$scope.isNotEdit = true;
177
 				$scope.isNotEdit = true;
174
 			}
178
 			}
175
-			//初始分仓保管账表对象数据
176
 			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
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
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
181
 			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
179
-			$scope.fcbgz.rq = rq;
180
 		},function(data){
182
 		},function(data){
181
 	        console.log(data);
183
 	        console.log(data);
182
 	    });
184
 	    });

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

@@ -188,15 +188,25 @@
188
 												</label>
188
 												</label>
189
 											</th>
189
 											</th>
190
 										</tr>
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
 										<tr ng-hide="auditor_th">
210
 										<tr ng-hide="auditor_th">
201
 											<th>
211
 											<th>
202
 												<label class="label" style="margin-top: 9px;text-align: center;">审核意见</label>
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
 				                            <th>收入数量(公斤)</th>
100
 				                            <th>收入数量(公斤)</th>
101
 				                            <th>支出数量(公斤)</th>
101
 				                            <th>支出数量(公斤)</th>
102
 				                            <th>库存数量(公斤)</th>
102
 				                            <th>库存数量(公斤)</th>
103
+				                            <th>损失损耗</th>
104
+				                            <th>折标水杂数量</th>
103
 				                            <th>记账人</th>
105
 				                            <th>记账人</th>
104
 				                            <th>审核人</th>
106
 				                            <th>审核人</th>
105
 				                            <th>操作</th>
107
 				                            <th>操作</th>
@@ -119,6 +121,8 @@
119
 			                        		<td>{{account.srsl}}</td>
121
 			                        		<td>{{account.srsl}}</td>
120
 			                        		<td>{{account.zcsl}}</td>
122
 			                        		<td>{{account.zcsl}}</td>
121
 			                        		<td>{{account.kcsl}}</td>
123
 			                        		<td>{{account.kcsl}}</td>
124
+			                        		<td>{{account.sssh}}</td>
125
+			                        		<td>{{account.zbszsl}}</td>
122
 			                        		<td>{{account.accountingPerson}}</td>
126
 			                        		<td>{{account.accountingPerson}}</td>
123
 			                        		<td>{{account.auditor}}</td>
127
 			                        		<td>{{account.auditor}}</td>
124
 			                        		<td>
128
 			                        		<td>

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

@@ -135,6 +135,25 @@
135
 												</label>
135
 												</label>
136
 											</th>
136
 											</th>
137
 										</tr>
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
 										<tr ng-hide="auditor_th">
157
 										<tr ng-hide="auditor_th">
139
 											<th>
158
 											<th>
140
 												<label class="label" style="margin-top: 9px;text-align: center;">审核时间</label>
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
 				                            <th>收入数量(公斤)</th>
69
 				                            <th>收入数量(公斤)</th>
70
 				                            <th>支出数量(公斤)</th>
70
 				                            <th>支出数量(公斤)</th>
71
 				                            <th>库存数量(公斤)</th>
71
 				                            <th>库存数量(公斤)</th>
72
+											<th>损失损耗</th>
73
+				                            <th>折标水杂数量</th>
72
 				                            <th>记账人</th>
74
 				                            <th>记账人</th>
73
 				                            <th>审核人</th>
75
 				                            <th>审核人</th>
74
 				                            <th>操作</th>
76
 				                            <th>操作</th>
@@ -86,6 +88,8 @@
86
 			                        		<td>{{account.srsl}}</td>
88
 			                        		<td>{{account.srsl}}</td>
87
 			                        		<td>{{account.zcsl}}</td>
89
 			                        		<td>{{account.zcsl}}</td>
88
 			                        		<td>{{account.kcsl}}</td>
90
 			                        		<td>{{account.kcsl}}</td>
91
+											<td>{{account.sssh}}</td>
92
+			                        		<td>{{account.zbszsl}}</td>
89
 			                        		<td>{{account.accountingPerson}}</td>
93
 			                        		<td>{{account.accountingPerson}}</td>
90
 			                        		<td>{{account.auditor}}</td>
94
 			                        		<td>{{account.auditor}}</td>
91
 			                        		<td>
95
 			                        		<td>