Browse Source

新增采购单更换供应商时给出提示

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7683 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
5586c2b19a

+ 10 - 2
src/main/webapp/resources/js/index/app.js

@@ -8374,9 +8374,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
     		$modalInstance.dismiss();
   		};
   		
-  		$scope.check = function(vendor){
-  			$modalInstance.close(vendor);
+  		$scope.ensure = false;
+  		$scope.check = function(vendor) { // 需要进行判断的选择
+  			$scope.vendorInfo = vendor;
+  			$scope.ensure = true;
+
   		};
+  		
+  		$scope.checkVendor = function(vendor) { // 直接选择
+  			$modalInstance.close(vendor);
+  		}
+  		
 	}]);
 	
 	/**

+ 10 - 4
src/main/webapp/resources/tpl/index/purc/modal/purc_order_vendor.html

@@ -38,12 +38,18 @@
 				<td class="text-center" ng-bind="::vendor.vendorEnterprise.uu"></td>
 				<td class="text-center" ng-bind="::vendor.vendorEnterprise.enName"></td>
 				<td class="text-center" ng-bind="::vendor.vendorEnterprise.enAddress"></td>
-				<td class="text-center" ng-if="vendor.vendorEnterprise.uu!=venduu"><a title="选择" href="javascript:void(0)" ng-click="check(vendor)" style="text-decoration: none;">选择</a></td>
-				<td class="text-center" ng-if="vendor.vendorEnterprise.uu==venduu"><a style="text-decoration: none;">已选择</a></td>
+				<td class="text-center" ng-if="venduu != null && vendor.vendorEnterprise.uu!=venduu"><a title="选择" href="javascript:void(0)" ng-click="check(vendor)" style="text-decoration: none;">选择</a></td>
+				<td class="text-center" ng-if="vendor.vendorEnterprise.uu==venduu"><a style="text-decoration: none;">已选择</a></td>
+				<td class="text-center" ng-if="venduu == null"><a title="选择" href="javascript:void(0)" ng-click="checkVendor(vendor)" style="text-decoration: none;">选择</a></td>
 			</tr>
 		</tbody>
 	</table>
 </div>
-<div class="modal-footer">
-	<button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
+<div class="modal-footer">
+	<div class="pull-left" ng-if="ensure && venduu!=null">
+		<span style="color: red; font-size: 14px;">已选择供应商,确定更换?</span>
+		<br>
+	</div>
+	<button class="btn btn-success" ng-if="ensure && venduu!=null" ng-click="checkVendor(vendorInfo)">确定</button>
+	<button class="btn btn-danger" ng-click="cancel()" type="button">取消</button>
 </div>