gaodd %!s(int64=2) %!d(string=hai) anos
pai
achega
404eded907

+ 1 - 0
src/main/resources/static/app/storage/drug/drugCheck/controller/drugCheckSaveCtrl.js

@@ -78,6 +78,7 @@ angular.module('app.storage').controller("drugCheckSaveCtrl", function($scope, $
78 78
     				detail.drugPacking = shelfStandingBook.drugPacking;
79 79
     				detail.manufacturer = shelfStandingBook.manufacturer;
80 80
     				detail.drugSpecification = shelfStandingBook.drugSpecification;
81
+    				detail.drugSpecificationUnit = shelfStandingBook.drugSpecificationUnit;
81 82
     				detail.shelfId = shelfStandingBook.shelfId;
82 83
     				detail.shelfAmount = shelfStandingBook.shelfAmount;
83 84
     				

+ 11 - 6
src/main/resources/static/app/storage/drug/drugCheck/views/drugCheck-edit.html

@@ -62,12 +62,14 @@
62 62
 					                        	<!-- <th class="col-sm-2"> 药剂编号</th> -->
63 63
 					                        	<th class="col-sm-1"> 药剂形态</th>
64 64
 					                        	<th class="col-sm-1"> 药剂包装</th>
65
-					                            <th class="col-sm-2"> 规格</th>
66
-					                            <th class="col-sm-2"> 生产厂家</th>
65
+					                            <th class="col-sm-1"> 规格</th>
66
+					                            <th class="col-sm-1"> 生产厂家</th>
67 67
 					                            <th class="col-sm-1"> 货位号</th>
68
-					                            <th class="col-sm-1"> 剩余数量</th>
69
-					                            <th class="col-sm-1"> 盘点数量</th>
70
-					                            <th class="col-sm-3"> 描述</th>
68
+					                            <th class="col-sm-1"> 剩余数量(袋或瓶)</th>
69
+					                            <th class="col-sm-1"> 剩余总量(L或kg)</th>
70
+					                            <th class="col-sm-1"> 盘点数量(袋或瓶)</th>
71
+					                            <th class="col-sm-1"> 盘点总量(L或kg)</th>
72
+					                            <th class="col-sm-2"> 描述</th>
71 73
 					                        </tr>
72 74
 				                        </thead>
73 75
 				                        
@@ -76,14 +78,17 @@
76 78
 				                                <!-- <td>{{ detailInfo.drugNumber }}</td> -->
77 79
 				                                <td>{{ dicData[detailInfo.drugType] }}</td>
78 80
 				                                <td>{{ dicData[detailInfo.drugPacking] }}</td>
79
-				                                <td>{{ detailInfo.drugSpecification }}</td>
81
+				                                <td>{{ detailInfo.drugSpecification }} {{ dicData[detailInfo.drugSpecificationUnit]}}</td>
80 82
 				                                <td>{{ detailInfo.manufacturer }}</td>
81 83
 				                                <td>{{ shelfMap[detailInfo.shelfId].shelfName }}</td>
82 84
 				                                <td>{{ detailInfo.shelfAmount }}</td>
85
+				                                <td>{{ detailInfo.shelfAmount * detailInfo.drugSpecification}}</td>
83 86
 				                                <td>
84 87
 				                                	<input class="form-control" type="text" ng-model="detailInfo.checkCount" ng-readonly="isNotEdit" name="checkCount{{$index}}" 
85 88
 				                                	ng-change="sumUseCount()" validNumber="true">
86 89
                                             	</td>
90
+                                            	<td ng-if="detailInfo.checkCount != null">{{ detailInfo.checkCount * detailInfo.drugSpecification}}</td>
91
+                                            	<td ng-if="detailInfo.checkCount == null"></td>
87 92
                                             	<td>
88 93
 				                                	<input class="form-control" type="text" ng-model="detailInfo.checkDescribe" ng-readonly="isNotEdit" name="describe{{$index}}" 
89 94
 				                                	ng-change="sumUseCount()">

+ 73 - 23
src/main/resources/static/app/storage/drug/drugDestroy/controller/drugDestroySaveCtrl.js

@@ -21,30 +21,80 @@ angular.module('app.storage').controller("drugDestroySaveCtrl", function ($scope
21 21
     } else {
22 22
         $scope.drugDestroy.destroyDate = $filter('date')(new Date(), "yyyy-MM-dd HH:mm:ss");
23 23
     }
24
+    
25
+    $scope.pageInfo = {pageNum: 1, pageSize: 10};
26
+    $scope.searchCondition = {drugKind: "", drugName: "",destroyType:""};//搜索条件
27
+    
28
+    $scope.getDrugInfoList = function(){
29
+    	
30
+    	var params = [];
31
+        params.destroyType = $scope.drugDestroy.destroyType;
32
+    	
33
+    	
34
+    	var modalInstance = $uibModal.open({
35
+            size: 'lg',
36
+            templateUrl: 'app/business/util/views/drugStandingBook-list-modal.html',
37
+            controller: 'drugStandingBookListModalCtrl',
38
+            resolve: {
39
+            	// items是一个回调函数
40
+                items: function () {
41
+                    // 这个值会被模态框的控制器获取到
42
+                    return params; 
43
+                }
44
+            	
45
+            }
46
+        });
47
+
48
+        modalInstance.result.then(function (result) {
49
+            if (result != undefined && result != null) {
50
+                $scope.drugDestroy.drugNumber = result.drugNumber;
51
+                $scope.drugDestroy.drugKind = result.drugKind;
52
+                $scope.drugDestroy.drugName = result.drugName;
53
+                $scope.drugDestroy.drugType = result.drugType;
54
+                $scope.drugDestroy.drugPacking = result.drugPacking;
55
+                $scope.drugDestroy.drugSpecification = result.drugSpecification; 
56
+                $scope.drugDestroy.drugUnit = result.drugSpecificationUnit; 
57
+                $scope.drugDestroy.drugInfoId = result.depotId; // depotId 借用为药剂信息id
58
+                //$scope.drugDestroy.controlMan = $rootScope.userInfo.realName;
59
+                $scope.drugDestroy.destroyAmount = result.amount; // 库存数量
60
+                $scope.drugDestroy.manufacturer = result.manufacturer;
61
+
62
+                if($scope.drugDestroy.destroyType == "1"){
63
+                	$scope.drugDestroy.destroyTotalNumber = commonUtilService.accMul($scope.drugDestroy.destroyAmount, $scope.drugDestroy.drugSpecification);
64
+
65
+                }else if($scope.drugDestroy.destroyType == "2"){
66
+                	$scope.drugDestroy.destroyTotalNumber = 0;
67
+                }
68
+                
69
+
70
+                // 用于数量效验
71
+                $scope.storageCount_v = result.applyAmount; // 库存数量
72
+            }
73
+        }, function (reason) {
74
+            console.log(reason);
75
+        });
76
+        
77
+    };
24 78
 
25 79
     // 销毁数量效验
26 80
     $scope.checkNumber = function (destroyAmount) {
27
-        // 只能在其他数据录入之后在匹配效验销毁数量,并且为: 药剂销毁
28
-        if ('药剂销毁' === $scope.drugDestroy.destroyType) {
29
-            if ($scope.isNotNll($scope.drugDestroy.drugKind)) // 药剂种类
30
-                alert('药剂种类为空,无法效验库存.');
31
-            else if ($scope.isNotNll($scope.drugDestroy.drugName)) // 药剂名称
32
-                alert('药剂名称为空,无法效验库存.');
33
-            else if ($scope.isNotNll($scope.drugDestroy.drugType)) // 药剂形态
34
-                alert('药剂形态为空,无法效验库存.');
35
-            else if ($scope.isNotNll($scope.drugDestroy.manufacturer)) // 生产厂家
36
-                alert('生产厂家为空,无法效验库存.');
37
-            else {
38
-                drugStandingBookService.getRemainingQuantity($scope.drugDestroy).then(function (data) {
39
-                    if (data < destroyAmount) {
40
-                        alert('销毁数量不能大于库存数量.');
41
-                        $scope.drugDestroy.destroyAmount = null;
42
-                    }
43
-                }, function (data) {
44
-                });
81
+        //: 药剂销毁
82
+    	if($scope.drugDestroy.destroyType == "1"){
83
+    		drugStandingBookService.getRemainingQuantity($scope.drugDestroy).then(function (data) {
84
+                if (data < destroyAmount) {
85
+                    alert('销毁数量不能大于库存数量.');
86
+                    $scope.drugDestroy.destroyAmount = null;
87
+                    $scope.drugDestroy.destroyTotalNumber = null;
88
+                }else{
89
+                  $scope.drugDestroy.destroyTotalNumber = commonUtilService.accMul($scope.drugDestroy.destroyAmount, $scope.drugDestroy.drugSpecification);
90
+                }
91
+            }, function (data) {
92
+            });
93
+    	}else if($scope.drugDestroy.destroyType == "2"){
94
+        	$scope.drugDestroy.destroyTotalNumber = 0;
45 95
 
46
-            }
47
-        }
96
+    	}
97
+    	
48 98
     };
49 99
 
50 100
     // 非空判断通用方法
@@ -64,7 +114,7 @@ angular.module('app.storage').controller("drugDestroySaveCtrl", function ($scope
64 114
     }, "请输入正确的不为0的数字整数!");
65 115
 
66 116
     $.validator.addMethod("validNumberD",function(value,element, params) {
67
-        var checkNumber = /^\d*\.{0,1}\d{1,2}$/g;
117
+        var checkNumber = /^([1-9]\d*|0)(\.\d{1,2})?$/g;
68 118
         return this.optional(element)||(checkNumber.test(value));
69 119
     },"请输入正确的数字类型,最多两位小数!");
70 120
 
@@ -101,12 +151,12 @@ angular.module('app.storage').controller("drugDestroySaveCtrl", function ($scope
101 151
     };
102 152
 
103 153
     // 获取药剂生产厂家
104
-    $scope.getManufacturerData = function () {
154
+   /* $scope.getManufacturerData = function () {
105 155
         drugStorageService.getManufacturer().then(function (data) {
106 156
             $scope.drugManufacturerList = data;
107 157
         }, function (data) {
108 158
         });
109 159
     };
110
-    $scope.getManufacturerData();
160
+    $scope.getManufacturerData();*/
111 161
 
112 162
 });

+ 56 - 23
src/main/resources/static/app/storage/drug/drugDestroy/views/drugDestroy-edit.html

@@ -30,72 +30,105 @@
30 30
                                                 <select ng-model="drugDestroy.destroyType" name="destroyType"
31 31
                                                         ng-disabled="isNotEdit" required>
32 32
                                                     <option value="">--请选择--</option>
33
-                                                    <option value="药剂销毁">药剂销毁</option>
34
-                                                    <option value="空瓶/袋销毁">空瓶/袋销毁</option>
33
+                                                    <option value="1">药剂销毁</option>
34
+                                                    <option value="2">空瓶/袋销毁</option>
35 35
                                                 </select>
36 36
                                             </label>
37 37
                                         </section>
38 38
                                         <section class="col col-4">
39
+                                            <label class="label txt-bg-red">药剂编号<span style="color: red;">*</span></label> 
40
+                                            <label class="input"> 
41
+                                                <input class="form-control" type="text" ng-model="drugDestroy.drugNumber" name="drugNumber"
42
+                                                 ng-disabled="isNotEdit"
43
+                                                ng-click="getDrugInfoList()" placeholder="请选择" required>
44
+                                            </label>
45
+                                        </section>
46
+                                        <section class="col col-4">
39 47
                                             <label class="label">药剂种类<span style="color: red;">*</span></label>
40 48
                                             <label class="select">
41
-                                                <select ng-model="drugDestroy.drugKind" ng-disabled="isNotEdit" name="drugKind"
49
+                                                <select ng-model="drugDestroy.drugKind" ng-disabled="true" name="drugKind"
42 50
                                                         ng-options="enum.enumid as enum.enumname for enum in dicDataList[5498]" required>
43 51
                                                     <option value="">--请选择--</option>
44 52
                                                 </select><i></i>
45 53
                                             </label>
46 54
                                         </section>
47
-                                        <section class="col col-4">
55
+                                        
56
+                                    </div>
57
+
58
+                                    <div class="row">
59
+                                    <section class="col col-4">
48 60
                                             <label class="label">药剂名称<span style="color: red;">*</span></label>
49 61
                                             <label class="select">
50
-                                                <select ng-model="drugDestroy.drugName" ng-disabled="isNotEdit" name="drugName"
62
+                                                <select ng-model="drugDestroy.drugName" ng-disabled="true" name="drugName"
51 63
                                                         ng-options="enum.enumid as enum.enumname for enum in dicDataList[drugDestroy.drugKind]" required>
52 64
                                                     <option value="">--请选择--</option><i></i>
53 65
                                                 </select><i></i>
54 66
                                             </label>
55 67
                                         </section>
56
-                                    </div>
57
-
58
-                                    <div class="row">
59 68
                                         <section class="col col-4">
60 69
                                             <label class="label">药剂形态<span style="color: red;">*</span></label>
61 70
                                             <label class="select">
62
-                                                <select ng-model="drugDestroy.drugType" ng-disabled="isNotEdit" name="drugType"
71
+                                                <select ng-model="drugDestroy.drugType" ng-disabled="true" name="drugType"
63 72
                                                         ng-options="enum.enumid as enum.enumname for enum in dicDataList[5499]" required>
64 73
                                                     <option value="">--请选择--</option><i></i>
65 74
                                                 </select><i></i>
66 75
                                             </label>
67 76
                                         </section>
68 77
                                         <section class="col col-4">
69
-                                            <label class="label">药剂单位<span style="color: red;">*</span></label>
78
+                                            <label class="label">药剂包装<span style="color: red;">*</span></label>
79
+                                            <label class="select"> 
80
+                                            	<select ng-model="drugDestroy.drugPacking" ng-disabled="true" name="drugPacking" 
81
+                                             	ng-options="enum.enumid as enum.enumname for enum in dicDataList[5508]" required >
82
+                                             		<option value="">--请选择--</option><i></i>
83
+                                             	</select><i></i>
84
+                                         	</label>
85
+                                        </section>
86
+                                    </div>
87
+
88
+                                    <div class="row">
89
+                                    <section class="col col-2">
90
+                                            <label class="label">规格型号<span style="color: red;">*</span></label>
91
+                                            <label class="input">
92
+                                                <input class="form-control" type="text" ng-model="drugDestroy.drugSpecification" name="drugSpecification"
93
+                                                       ng-readonly="true" required 
94
+                                                       onkeyup="this.value=this.value.match(/\d+(\.\d{0,3})?/) ? this.value.match(/\d+(\.\d{0,3})?/)[0] : '' ">
95
+                                            </label>
96
+                                        </section>
97
+                                        <section class="col col-2">
98
+                                            <label class="label">&nbsp;</label>
70 99
                                             <label class="select">
71
-                                                <select ng-model="drugDestroy.drugUnit" ng-disabled="isNotEdit" name="drugUnit"
100
+                                                <select ng-model="drugDestroy.drugUnit" ng-disabled="true" name="drugUnit"
72 101
                                                         ng-options="enum.enumid as enum.enumname for enum in dicDataList[5500]" required >
73 102
                                                     <option value="">--请选择--</option><i></i>
74 103
                                                 </select><i></i>
75 104
                                             </label>
76 105
                                         </section>
77
-                                        <section class="col col-4">
106
+                                    <section class="col col-4">
78 107
                                             <label class="label">生产厂家<span style="color: red;">*</span></label>
79
-                                            <label class="select">
80
-                                                <select ng-model="drugDestroy.manufacturer" name="manufacturer"
81
-                                                        ng-options="storage.manufacturer as storage.manufacturer for storage in drugManufacturerList"
82
-                                                        ng-disabled="isNotEdit" class="form-control"
83
-                                                        required>
84
-                                                    <option value="">--请选择--</option>
85
-                                                </select>
108
+                                            <label class="input">
109
+                                                <input class="form-control" type="text" ng-model="drugDestroy.manufacturer" ng-readonly="true" name="manufacturer"
110
+                                                         required>
86 111
                                             </label>
112
+                                            
87 113
                                         </section>
88
-                                    </div>
89
-
90
-                                    <div class="row">
91 114
                                         <section class="col col-4">
92
-                                            <label class="label">销毁数量<span style="color: red;">*</span></label>
115
+                                            <label class="label" ng-if="drugDestroy.destroyType == 1 || drugDestroy.destroyType == null" >销毁数量(袋或瓶)<span style="color: red;">*</span></label>
116
+                                            <label class="label" ng-if="drugDestroy.destroyType == 2">销毁数量(个)<span style="color: red;">*</span></label>
93 117
                                             <label class="input">
94 118
                                                 <input class="form-control" type="text" ng-model="drugDestroy.destroyAmount" ng-readonly="isNotEdit" name="destroyAmount"
95 119
                                                        validNumberD="true" ng-blur="checkNumber(drugDestroy.destroyAmount)" required>
96 120
                                             </label>
97 121
                                         </section>
98 122
                                     </div>
123
+                                    <div class="row">
124
+                                    	<section class="col col-4">
125
+                                            <label class="label">销毁总量(L或kg)<span style="color: red;">*</span></label>
126
+                                            <label class="input">
127
+                                                <input class="form-control" type="text" ng-model="drugDestroy.destroyTotalNumber" ng-readonly="isNotEdit" name="destroyTotalNumber"
128
+                                                       required>
129
+                                            </label>
130
+                                        </section>
131
+                                    </div>
99 132
                                     
100 133
                                     <div class="row">
101 134
                                         <fieldset>

+ 7 - 4
src/main/resources/static/app/storage/drug/drugDestroy/views/drugDestroy-list.html

@@ -20,8 +20,8 @@
20 20
                                         <label>销毁类型:&emsp;
21 21
                                             <select class="form-control input-sm" ng-model="searchCondition.destroyType" name="destroyType">
22 22
                                                 <option value="">--请选择--</option>
23
-                                                <option value="药剂销毁">药剂销毁</option>
24
-                                                <option value="空瓶/袋销毁">空瓶/袋销毁</option>
23
+                                                <option value="1">药剂销毁</option>
24
+                                                <option value="2">空瓶/袋销毁</option>
25 25
                                             </select>
26 26
                                         </label>&emsp;
27 27
                                         <label>
@@ -64,7 +64,8 @@
64 64
 		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>药剂名称</th>
65 65
 		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>药剂形态</th>
66 66
 		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁类型</th>
67
-		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁数量</th>
67
+		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁数量(袋或瓶)</th>
68
+		                            <th data-hide="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁总量(L或kg)</th>
68 69
 		                            <th data-class="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁原因</th>
69 70
 		                            <th data-class="expand"><i class="fa fa-fw  text-muted hidden-md hidden-sm hidden-xs"></i>销毁人</th>
70 71
 		                            <th data-hide="expand"> 操作</th>
@@ -78,8 +79,10 @@
78 79
 	                                <td>{{dicData[drugDestroy.drugKind]}}</td>
79 80
 	                                <td>{{dicData[drugDestroy.drugName]}}</td>
80 81
 	                                <td>{{dicData[drugDestroy.drugType]}}</td>
81
-	                                <td>{{drugDestroy.destroyType}}</td>
82
+	                                <td ng-if="drugDestroy.destroyType == 1">药剂销毁</td>
83
+	                                <td ng-if="drugDestroy.destroyType == 2">空瓶/袋销毁</td>
82 84
 	                                <td>{{drugDestroy.destroyAmount}}</td>
85
+	                                <td>{{drugDestroy.destroyTotalNumber }}</td>
83 86
 	                                <td>{{drugDestroy.destroyReason}}</td>
84 87
 	                                <td>{{drugDestroy.destroyPerson }}</td>
85 88
 	                                <td>

+ 2 - 2
src/main/resources/static/app/storage/drug/drugInfo/controller/drugInfoSaveCtrl.js

@@ -66,12 +66,12 @@ angular.module('app.storage').controller("drugInfoSaveCtrl", function($scope, $r
66 66
 			}
67 67
     	}
68 68
 
69
-		if ($scope.drugInfo.drugName == "3031" || $scope.drugInfo.drugName == "3038" || $scope.drugInfo.drugName == "3044") {
69
+		/*if ($scope.drugInfo.drugName == "3031" || $scope.drugInfo.drugName == "3038" || $scope.drugInfo.drugName == "3044") {
70 70
 			if ($scope.drugInfo.remark == null || $scope.drugInfo.remark == "") {
71 71
 				alert("请在备注输入框中录入药剂的具体名称");
72 72
 				return false;
73 73
 			}
74
-		}
74
+		}*/
75 75
     	
76 76
     	if (!$scope.saveFlag) {
77 77
     		if (validator.form()) {