Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

hejq 8 years ago
parent
commit
839fef81cc

+ 28 - 7
src/main/webapp/resources/js/index/app.js

@@ -3156,7 +3156,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         });
         });
         var loadData = function () {
         var loadData = function () {
             $scope.loading = true;
             $scope.loading = true;
-            PurcOrdersInfo.getAll({id: $stateParams.id}, function (data) {
+            PurcOrdersInfo.getAll({id: $stateParams.id},{}, function (data) {
                 $scope.order = data;
                 $scope.order = data;
                 var sum = 0;
                 var sum = 0;
                 angular.forEach($scope.order.orderItems, function (item) {
                 angular.forEach($scope.order.orderItems, function (item) {
@@ -3166,7 +3166,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 // if($scope.order.display == 1) {//未查看的设为已查看
                 // if($scope.order.display == 1) {//未查看的设为已查看
                 // 	$scope.setDisplay('setRead', $scope.order.id);
                 // 	$scope.setDisplay('setRead', $scope.order.id);
                 // }
                 // }
-                $scope.loading = false;
+                //$scope.loading = false;
+            }, function (response) {
+                toaster.pop('error', '提示', response.data);
             });
             });
         };
         };
         loadData();
         loadData();
@@ -4171,8 +4173,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
 
         $scope.getHistory = function (item) {
         $scope.getHistory = function (item) {
             if (!item.history) {
             if (!item.history) {
-                PurcInquiry.getHistory({itemId: item.id}, function (data) {
+                PurcInquiry.getHistory({itemId: item.id},function (data) {
+                    $scope.historyShow = true;
                     item.history = data;
                     item.history = data;
+                }, function (response) {
+                    $scope.historyShow = false;
+                    toaster.pop('error', '数据加载失败', response.data);
                 });
                 });
             }
             }
         };
         };
@@ -6111,8 +6117,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.isUser = data.isUser;
             $scope.isUser = data.isUser;
         });
         });
         var loadData = function () {
         var loadData = function () {
-            PurchaseInquiry.detail({id: $stateParams.id}, function (data) {
+            PurchaseInquiry.detail({id: $stateParams.id}, {},function (data) {
                 $scope.inquiry = data;
                 $scope.inquiry = data;
+            },function (response) {
+                toaster.pop('error', '提示', response.data);
             });
             });
         };
         };
         loadData();
         loadData();
@@ -6421,8 +6429,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // 获取历史报价
         // 获取历史报价
         $scope.getHistory = function (mould) {
         $scope.getHistory = function (mould) {
             if (!mould.history) {
             if (!mould.history) {
-                PurcInquiryMould.getHistory({id: mould.id}, function (data) {
+                PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
+                    $scope.historyShow = true;
                     mould.history = data;
                     mould.history = data;
+                },function (response) {
+                    $scope.historyShow = false;
+                    toaster.pop('error', '提示', response.data);
+                    //$Scope.PurcInquiryMouldpermission = true;
                 });
                 });
             }
             }
         };
         };
@@ -6627,8 +6640,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // 获取历史报价
         // 获取历史报价
         $scope.getHistory = function (mould) {
         $scope.getHistory = function (mould) {
             if (!mould.history) {
             if (!mould.history) {
-                PurcInquiryMould.getHistory({id: mould.id}, function (data) {
+                PurcInquiryMould.getHistory({id: mould.id},{}, function (data) {
+                    $scope.historyShow = true;
                     mould.history = data;
                     mould.history = data;
+                },function (response) {
+                    $scope.historyShow = false;
+                    toaster.pop('error', '提示', response.data);
                 });
                 });
             }
             }
         };
         };
@@ -8745,7 +8762,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $modalInstance.close('success');
                 $modalInstance.close('success');
             }).error(function (data) {
             }).error(function (data) {
                 $scope.loading = false;
                 $scope.loading = false;
-                toaster.pop('danger', '错误', data);
+                toaster.pop('error', '错误', data);
             });
             });
         };
         };
 
 
@@ -15406,6 +15423,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 Vendor.contacts({venduu: $scope.vendor.uu}, {}, function (data) {
                 Vendor.contacts({venduu: $scope.vendor.uu}, {}, function (data) {
                     $scope.vendorContacts = data;
                     $scope.vendorContacts = data;
                 });
                 });
+            }, function (response) {
+                toaster.pop('error', '提示', response.data);
             });
             });
         };
         };
         loadData();
         loadData();
@@ -17801,6 +17820,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             DeputyOrder.getOrderDetail({id: $stateParams.id}, {}, function (data) {
             DeputyOrder.getOrderDetail({id: $stateParams.id}, {}, function (data) {
                 $scope.deOrder = data;
                 $scope.deOrder = data;
                 $scope.deOrder.$editing = true;
                 $scope.deOrder.$editing = true;
+            }, function (response) {
+                toaster.pop('error', '提示', response.data);
             });
             });
         };
         };
         loadData();
         loadData();

+ 2 - 2
src/main/webapp/resources/tpl/index/purc/order_detail.html

@@ -25,9 +25,9 @@
 		overflow: hidden;
 		overflow: hidden;
 	}
 	}
 </style>
 </style>
-<div class="loading" ng-class="{'in': loading}">
+<!--<div class="loading" ng-class="{'in': loading}">
 	<i></i>
 	<i></i>
-</div>
+</div>-->
 <div class="pane base-info" id="order-detail-list">
 <div class="pane base-info" id="order-detail-list">
 	<div class="pub-com_head">
 	<div class="pub-com_head">
 		<span>采购单</span>
 		<span>采购单</span>

+ 2 - 15
src/main/webapp/resources/tpl/index/sale/inquiry_mould.html

@@ -225,20 +225,6 @@ tbody td div.text-mould {
 					</div>
 					</div>
 				</div>
 				</div>
 			</div>
 			</div>
-			<!--<div class="col-xs-5">
-				<div class="search">
-					<div class="form-group form-group-sm has-feedback">
-						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入商品、客户名称或单据流水号搜索" /><span
-							class="form-control-feedback text-simple"><i
-							class="fa fa-search"></i></span>
-					</div>
-				</div>
-			</div>
-			<div class="col-xs-1">
-				<div class="text-default f14 total">
-					共 <span ng-bind="tableParams.total()" class="text-num"></span>
-				</div>
-			</div>-->
 		</div>
 		</div>
 	</div>
 	</div>
 	<!--<div class="height10">&nbsp;</div>-->
 	<!--<div class="height10">&nbsp;</div>-->
@@ -501,8 +487,9 @@ tbody td div.text-mould {
 									</li>
 									</li>
 
 
 								</ul>
 								</ul>
+								<div ng-if="historyShow">
 								<div ng-show="!inquiryMould.replyDate"
 								<div ng-show="!inquiryMould.replyDate"
-									class="text-center text-muted">暂无历史报价</div>
+									 class="text-center text-muted">暂无历史报价</div></div>
 							</div>
 							</div>
 						</div>
 						</div>
 					</div>
 					</div>

+ 3 - 13
src/main/webapp/resources/tpl/index/sale/inquiry_mould_detail.html

@@ -180,23 +180,13 @@ a:hover{
 										</li>
 										</li>
 
 
 									</ul>
 									</ul>
-									<div ng-show="!inquiryMould.replyDate"
-										 class="text-center text-muted">暂无历史报价</div>
+									<div ng-if="historyShow">
+										<div ng-show="!inquiryMould.replyDate" class="text-center text-muted">暂无历史报价</div></div>
+
 								</div>
 								</div>
 							</div>
 							</div>
 						</div>
 						</div>
 					</td>
 					</td>
-					<!--<td width="150" style="vertical-align: top" class="text-center">
-						<div class="input-group form-group" style="width: 300px; position: relative;">
-							<a style="color: #327ebe">上传附件</a>
-							<input type="file" ng-model="myFiles" ng-file-select multiple="multiple"
-								   ng-multiple="false" class="form-control input-sm input-group uploadFile" name="file"
-								   ng-change="pushFile()">
-							<div ng-repeat="file in inquiryMould.attachs">
-								<p class="text-left"><a style="color: #0000cc">{{file.name}}</a></p>
-							</div>
-						</div>
-					</td>-->
 					<td class="text-center" width="100">
 					<td class="text-center" width="100">
 						<div ng-if="inquiryMould.status == 200 && inquiryMould.overdue == 0 && inquiryMould.valid != 0 && inquiryMould.adoptStatus == null" class="block">
 						<div ng-if="inquiryMould.status == 200 && inquiryMould.overdue == 0 && inquiryMould.valid != 0 && inquiryMould.adoptStatus == null" class="block">
 							<span class="text-waiting">待报价</span>
 							<span class="text-waiting">待报价</span>