浏览代码

企业设置付款企业功能调整

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8215 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 年之前
父节点
当前提交
23eca5e128

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

@@ -6910,7 +6910,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	}]);
 	
 	// 编辑收货地址
-	app.controller('ShipAddressCtrl', ['$scope', 'DeputyOrder', 'pay', '$modalInstance', 'toaster', '$http', function($scope, DeputyOrder, pay, $modalInstance, toaster, $http) {
+	app.controller('ShipAddressCtrl', ['$scope', 'ShipAddress', 'ship', '$modalInstance', 'toaster', '$http', function($scope, ShipAddress, ship, $modalInstance, toaster, $http) {
 		$scope.ship = ship;
 		
 		// 获取地址信息
@@ -6920,7 +6920,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		});
 		
 		// 新增收货地址保存
-		$scope.savePayCompany = function(pay) {
+		$scope.saveShipAddress = function(ship) {
 			ship.address = ship.province + ship.city + ship.district;
 			ShipAddress.saveAddress( {}, ship, function(data) {
 				if(data.success) {
@@ -6939,8 +6939,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	}]);
 	
 	// 编辑付款企业信息
-	app.controller('PayCompanyCtrl', ['$scope', 'ShipAddress', 'ship', '$modalInstance', 'toaster', '$http', function($scope, ShipAddress, ship, $modalInstance, toaster, $http) {
-		$scope.ship = ship;
+	app.controller('PayCompanyCtrl', ['$scope', 'DeputyOrder', 'pay', '$modalInstance', 'toaster', '$http', function($scope, DeputyOrder, pay, $modalInstance, toaster, $http) {
+		$scope.pay = pay;
 		
 		// 获取地址信息
 		$http.get('resources/citydata/city.json',  {"Accept": "application/json;charset=utf-8", "Accept-Charset": "charset=utf-8"
@@ -6949,15 +6949,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		});
 		
 		// 新增收货地址保存
-		$scope.saveShipAddress = function(ship) {
+		$scope.savePayCompany = function(pay) {
 			pay.address = pay.province + pay.city + pay.district + pay.addressdet;
 			DeputyOrder.savePaycompany( {}, pay, function(data) {
-				DeputyOrder.paycompanies({enuu: $scope.enterprise.uu}, {}, function(data) {
-					$scope.pays = data;
-				}, function(response) {
-					toaster.pop('error', '提示', response.data);
-				});
 				toaster.pop('success', '提示', '保存成功');
+				$modalInstance.dismiss();
 			}, function(response) {
 				toaster.pop('error', '提示', response.data);
 			});

+ 7 - 7
src/main/webapp/resources/tpl/index/approvalFlow/paycompany_modal.html

@@ -10,9 +10,9 @@
     box-shadow: 0 0 3px #888;
 }
 </style>
-<div class="bomb-box" style="display: none" id="paycompany">
+<div class="bomb-box" id="paycompany">
     <form class="box04 box" name="payCompany" id="payCompany">
-        <i class="off"><img src="resources/img/purc/close.png" alt="" /></i>
+        <i class="off"><img src="resources/img/purc/close.png" alt="" ng-click="cancel()"/></i>
         <p>付款企业资料</p>
         <ul>
             <li class="line01">
@@ -35,14 +35,14 @@
                 <div class="fl">所在地址<em>*</em>:</div>
 				 <div class="select fr">
                     <select required="" class="area-select" ng-model="pay.province" ng-options="key as key for (key,value) in provinces"
-                            ng-change="ship.city='';ship.district='';" required="true">  
+                            ng-change="pay.city='';pay.district='';" required="true">  
                         <option value="">省</option>  
                     </select>
-                    <select class="area-select" ng-model="pay.city" ng-options="key as key for (key,value) in provinces[ship.province]"
-                            ng-change="ship.district='';" required="true">  
+                    <select class="area-select" ng-model="pay.city" ng-options="key as key for (key,value) in provinces[pay.province]"
+                            ng-change="pay.district'';" required="true">  
                         <option value="">市</option>  
                     </select>
-                    <select class="area-select" ng-model="pay.district" ng-options="value as value for value in provinces[ship.province][ship.city]" required="true">
+                    <select class="area-select" ng-model="pay.district" ng-options="value as value for value in provinces[pay.province][pay.city]" required="true">
                         <option value="">区</option>  
                     </select>  
 				</div>
@@ -53,7 +53,7 @@
             </li>
         </ul>
         <div class="many-file-btn">
-            <button class="btn01" ng-click="savePayCompany(pay)" ng-disabled="payCompany.$invalid">保存</button><a class="btn02" ng-click="">取消</a>
+            <button class="btn01" ng-click="savePayCompany(pay)" ng-disabled="payCompany.$invalid">保存</button><a class="btn02" ng-click="cancel()">取消</a>
         </div>
     </form>
 </div>