ouxq 8 lat temu
rodzic
commit
2b45679ac6

+ 5 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java

@@ -1562,7 +1562,11 @@ public class PurchaseServiceImpl implements PurchaseService {
 		}
 
 		if (CollectionUtils.isNotEmpty(list)) {
-			installmentService.updateAfterModifyPurchasePrice(list.get(0).getDetailid());
+			PurchaseModifyingHistory purchaseModifyingHistory = list.get(0);
+			PurchaseDetail purchaseDetail = purchaseDetailDao.findByDetailid(purchaseModifyingHistory.getDetailid());
+			Purchase purchase = purchaseDetail.getPurchase();
+			if (purchase.getInstallmentId() != null)
+				installmentService.updateAfterModifyPurchasePrice(list.get(0).getDetailid());
 		}
 		return "success";
 	}

+ 2 - 2
src/main/webapp/resources/js/common/query/purchase.js

@@ -229,8 +229,8 @@ define([ 'ngResource' ], function() {
 				method : 'GET'
 			},
 			// 确认收款
-			confirmParmentInstallment : {
-				url : '/trade/purchase/:id/ensurePaid',
+			confirmPaymentInstallment : {
+				url : rootPath +'/trade/purchase/:id/ensurePaid',
 				method : 'PUT'
 			}
 		});

+ 2 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js

@@ -73,9 +73,9 @@ define(['app/app'], function (app) {
 			var state = null;
 			switch($scope.status) {
 				case 'all' : // 全部
-					state = '503-504-505-406-407-403-408-404-405-520-602-603-315-604-605-606'; break;
+					state = '503-504-524-505-406-407-403-408-404-405-520-602-603-315-604-605-606'; break;
 				case 'tobepaid' : // 待付款
-					state = '503-504'; break; // 504-已付款, 放在待付款下面,商城确认收款后再放到待发货
+					state = '503-504-524'; break; // 504-已付款, 放在待付款下面,商城确认收款后再放到待发货
 				case 'tobedeliver' : // 待发货
 					state = '505-406-407-403-408'; break;
 				case 'tobereceive' : // 待收货

+ 127 - 87
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -1,5 +1,5 @@
 define([ 'app/app' ], function(app) {
-	
+
 	app.register.controller('buyerTransferCtrl', ['$scope', '$rootScope', '$anchorScroll', '$location','SessionService', 'bankInfoService','$modal', 'toaster', 'bankTransferService', '$filter', 'ngTableParams', 'BaseService', 'OrderSimpleInfo', '$state', '$stateParams', 'Order', 'SmoothScroll', 'EncryptionService', function($scope, $rootScope, $anchorScroll, $location,SessionService, bankInfoService, $modal, toaster, bankTransferService, $filter, ngTableParams, BaseService, OrderSimpleInfo, $state, $stateParams, Order, SmoothScroll, EncryptionService) {
 		BaseService.scrollBackToTop();
 
@@ -14,7 +14,37 @@ define([ 'app/app' ], function(app) {
 				var arr = [];
 				$scope.$$bankTransfer = data[0];
 				// 分期信息
-				$scope.installmentData = data[0].installment;
+				if ($scope.$$bankTransfer.installmentId){
+					$scope.installmentData = data[0].installment;
+					// 获取没有付款的期数
+					$scope.yesPayinstallmentDetails = [];
+					$scope.noPayinstallmentDetails = [];
+					if ($scope.installmentData.status == 504){
+						angular.forEach($scope.installmentData.installmentDetails, function (item) {
+							if (item.status == 505) {
+								$scope.yesPayinstallmentDetails.push(item);
+								item.installmentImages = item.imgs.split(",");
+								item.imgIndex = 0;
+								// 已付款价格
+								$scope.yesPayinstallmentDetails.payTatalPrice = 0;
+								angular.forEach($scope.yesPayinstallmentDetails, function (item) {
+									$scope.yesPayinstallmentDetails.payTatalPrice += item.price;
+								});
+							}else if(item.status == 504){
+								$scope.noPayinstallmentDetails.push(item);
+								item.installmentImages = item.imgs.split(",");
+
+								// 存放当前未付款图片
+								$scope.arrList = item.installmentImages;
+								$scope.installmentNoPayImg = [];
+								angular.forEach($scope.arrList, function (data) {
+									$scope.installmentNoPayImg.push({imageUrl: data})
+								});
+
+							}
+						})
+					}
+				}
 				if ($scope.$$bankTransfer.installmentId) {
 					$scope.type = "PAIDTOVENDOR";
 				}
@@ -25,7 +55,7 @@ define([ 'app/app' ], function(app) {
 					$scope.$$bankTransfer.total += item.ensurePrice;
 				}
 				$scope.orderNum = arr.join(',');
-				console.log($scope.$$bankTransfer);
+
 			}, function (response) {
 				toaster.pop('info', '获取订单的信息有误,请确定付款的订单');
 			})
@@ -84,12 +114,18 @@ define([ 'app/app' ], function(app) {
 		$scope.deleteProofInfo = function (index) {
 			$scope.imagesList[index] = {};
 		};
+		$scope.deleteimg = function (index) {
+			$scope.installmentNoPayImg[index] = {};
+		};
+		$scope.addUploadImgNopay = function () {
+			$scope.installmentNoPayImg.push({imageUrl: ''});
+		};
 		/**
 		 * 上传付款截图
 		 */
 		$scope.onUploadPayment = function ($data, index) {
 			if (!$data || !$data.path) {
-				toaster.pop('error', '付款截图上传失败');
+				toaster.pop('error', '您还没有上传新的单据');
 				return ;
 			}
 			$scope.imageUrl = $data.path;
@@ -122,30 +158,30 @@ define([ 'app/app' ], function(app) {
 			'5': '五'
 		};
 		// 临时数据
-		var loadInstallment = function () {
-			$scope.installmentDetails = [
-				{
-					price : 120,
-					status : 503,
-					deadline : '2017-09-20 12:20:30',
-					imgs : 'http://localhost:8080/platform-b2c/static/img/icon/img.png,http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg'
-				},
-				{
-					price : 180,
-					status : 504,
-					deadline : '2017-09-25 11:20:50',
-					imgs : 'http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg,http://localhost:8080/platform-b2c/static/img/icon/img.png,http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg'
-				}
-			];
-			$scope.changeList = '';
-			angular.forEach($scope.installmentDetails, function (item) {
-				item.installmentImages = item.imgs.split(",");
-				item.imgIndex = 0;
-				$scope.changeList = item.installmentImages;
-
-			});
-		};
-		loadInstallment();
+		// var loadInstallment = function () {
+		// 	$scope.installmentDetails = [
+		// 		{
+		// 			price : 120,
+		// 			status : 503,
+		// 			deadline : '2017-09-20 12:20:30',
+		// 			imgs : 'http://localhost:8080/platform-b2c/static/img/icon/img.png,http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg'
+		// 		},
+		// 		{
+		// 			price : 180,
+		// 			status : 504,
+		// 			deadline : '2017-09-25 11:20:50',
+		// 			imgs : 'http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg,http://localhost:8080/platform-b2c/static/img/icon/img.png,http://113.105.74.140/images/d83b1794fad111e5ac8300269e610dbf.jpg'
+		// 		}
+		// 	];
+		// 	$scope.changeList = '';
+		// 	angular.forEach($scope.installmentDetails, function (item) {
+		// 		item.installmentImages = item.imgs.split(",");
+		// 		item.imgIndex = 0;
+		// 		$scope.changeList = item.installmentImages;
+		//
+		// 	});
+		// };
+		// loadInstallment();
 
 		// 切换效果
 		$scope.changeImg = function (installmentImg, index) {
@@ -174,22 +210,22 @@ define([ 'app/app' ], function(app) {
 		$scope.purKind = $rootScope.userInfo.enterprises ? false : true;//应付账户的类别, 默认是企业
 		$scope.saleKind = false;//应收账户的类别,默认是企业
 		var ids=SessionService.get("ids");
-		
+
 		var page = Number(SessionService.get("page")) || 1;
 		var count = Number(SessionService.get("count")) || 20;
 		SessionService.unset("ids");
 		SessionService.unset("page");
 		SessionService.unset("count");
 		var hideBankFilter = $filter("hideBankFilter");
-		
+
 		$scope.isSelectAll = false;
 		$scope.isSelect = false;
 		$scope.orderArray = []; //存放订单链
 		$scope.total = 0;
 		$scope.currencyName = ''; //存放当前币别
-		
+
 		$scope.nowTime = new Date().getTime();
-		
+
 		//解析数据,从返回的数据中找到要解析的数据
 		var resolveData = function(data) {
 			var arr = new Array();
@@ -201,7 +237,7 @@ define([ 'app/app' ], function(app) {
 			}
 			return arr;
 		};
-		
+
 		$scope.pay = function(order) {
 			if(order.availabletime < new Date().getTime()) {
 				toaster.pop("error", '错误', '此订单已过期,已失效');
@@ -214,14 +250,14 @@ define([ 'app/app' ], function(app) {
 			$scope.showMe = true;
 			SmoothScroll.scrollTo(null, 'O', -68);
 		};
-		
+
 		//返回修改
 		$scope.alterPay = function() {
 			$location.hash('toptip');
 			$anchorScroll();
 			$scope.showMe = false;
 		}
-		
+
 		$scope.batchPay = function() {
 			if(!$scope.orderNum) {
 				toaster.pop("error", '错误', '请选择要付款的单');
@@ -231,7 +267,7 @@ define([ 'app/app' ], function(app) {
 			$anchorScroll();
 			$scope.showMe = true;
 		};
-		
+
 		var getOriginalData = function(data) {
 			var result = {};
 			if(data&&data.length) {
@@ -241,7 +277,7 @@ define([ 'app/app' ], function(app) {
 			}
 			return result;
 		};
-		
+
 		$scope.selectAll = function() {
 			$scope.isSelectAll = !$scope.isSelectAll;
 			$scope.orderArray = [];
@@ -270,7 +306,7 @@ define([ 'app/app' ], function(app) {
 			}
 			$scope.orderNum = $scope.orderArray.join(',');
 		};
-		
+
 		$scope.doSelect = function(order) {
 			var result = true;
 			if(order.isSelect) {
@@ -315,7 +351,7 @@ define([ 'app/app' ], function(app) {
 			$scope.isSelectAll = result;
 			$scope.orderNum = $scope.orderArray.join(',');
 		}
-		
+
 		// //根据单选框的状态,提取不同的数据
 		// var getBuyAccount = function() {
 		// 	if(!$scope.purKind) {
@@ -343,7 +379,7 @@ define([ 'app/app' ], function(app) {
 		//
 		// //开始时,就获取账户信息
 		// getBuyAccount();
-		
+
 		//获取管理平台账户信息
 		var getSellerAccount = function() {
 			// 平台账户
@@ -367,7 +403,7 @@ define([ 'app/app' ], function(app) {
 				toaster.pop('error', '错误', '获取卖家个人账户信息失败');
 			});
 		};
-		
+
 		getSellerAccount();
 
 		$scope.set = function(data, isBuy) {
@@ -384,7 +420,7 @@ define([ 'app/app' ], function(app) {
 			}
 
 		};
-		
+
 		// 搜索框内容转换成大写
 		var t;
 		var setTime = function() {
@@ -399,19 +435,19 @@ define([ 'app/app' ], function(app) {
 				$scope.keyword = angular.uppercase($scope.keyword);
 			}
 		};
-		
+
 		$scope.upper = function() {
 			$scope.time = 1;
 			clearTimeout(t);
 			setTime();
 		}
-		
+
 		// 根据搜索框输入信息搜索对应订单
 		$scope.searchFor = function() {
 			$scope.keyword = angular.uppercase($scope.keyword);
 			$scope.tobePaidTableParams.reload();
 		}
-		
+
 		$scope.tobePaidTableParams = new ngTableParams({
 			page : page,
 			count : count,
@@ -434,7 +470,7 @@ define([ 'app/app' ], function(app) {
 					$scope.orderNum = ""; //单号的链接字符串
 					$scope.orderArray = []; //存放
 					$scope.total = 0;
-					
+
 					if(ids) {
 						var arr = ids.split('-');
 						var result = true;
@@ -451,7 +487,7 @@ define([ 'app/app' ], function(app) {
 							if(!order.isSelect) {
 								result = false;
 							}
-						});				
+						});
 						$scope.isSelectAll = result;
 						$scope.orderNum = $scope.orderArray.join(',');
 						if($scope.orderNum) {
@@ -461,7 +497,7 @@ define([ 'app/app' ], function(app) {
 				});
 			}
 		});
-		
+
 		//跳出模态框,data有数据代表编辑,data为空则代表新增。
 		$scope.bankInfo = function(data) {
 			var modalInstance = $modal.open({
@@ -474,7 +510,7 @@ define([ 'app/app' ], function(app) {
 				}
 			});
 		};
-		
+
 		//新增账户
 		$scope.newAccount = function(data) {
 			var modalInstance = $modal.open({
@@ -491,7 +527,7 @@ define([ 'app/app' ], function(app) {
 					}
 				}
 			});
-			
+
 			modalInstance.result.then(function(account) {
 				if(account.kind) {
 					bankInfoService.saveBuyPersonalBank({}, account, function(data) {
@@ -512,10 +548,10 @@ define([ 'app/app' ], function(app) {
 					});
 				}
 			}, function() {
-				
+
 			});
 		};
-		
+
 		$scope.deleteAccount = function(buyAccount) {
 			var  isSure = confirm('确认删除本银行账户?删除后无法恢复,请谨慎操作');
 			if(isSure){
@@ -527,9 +563,12 @@ define([ 'app/app' ], function(app) {
 				})
 			}
 		}
-		
+
 		$scope.confirm = function() {
 			var imageArray = [];
+			if ($scope.noPayinstallmentDetails.length > 0) {
+				$scope.imagesList = $scope.installmentNoPayImg;
+			}
 			for (var i = 0; i< $scope.imagesList.length; i++) {
 				if ($scope.imagesList.length < 6) {
 					if ($scope.imagesList[i].imageUrl != '') {
@@ -551,27 +590,28 @@ define([ 'app/app' ], function(app) {
 				return ;
 			}
 			if(!str){
-                toaster.pop('info', '提示', '请选择付款截图');
-                return ;
-            }
-            var installmentDetailId = '';
-            angular.forEach($scope.$$bankTransfer.installment.installmentDetails, function (installmentDetail) {
-				if (installmentDetail.detno == $scope.$$bankTransfer.installment.currentNo)
-					installmentDetailId = installmentDetail.id;
-			})
+				toaster.pop('info', '提示', '请选择付款截图');
+				return ;
+			}
+			var transfer = {};
+			if ($scope.$$bankTransfer.installment){
+				var installmentDetailId = '';
+				angular.forEach($scope.$$bankTransfer.installment.installmentDetails, function (installmentDetail) {
+					if (installmentDetail.detno == $scope.$$bankTransfer.installment.currentNo)
+						installmentDetailId = installmentDetail.id;
+				})
+				transfer.installmentDetailId = installmentDetailId;
+			};
 			var buyAccount = angular.copy($scope.buyAccount);
 			var saleAccount = angular.copy($scope.saleAccount);
 			delete saleAccount.filterAccount;
 			delete buyAccount.filterAccount;
 			var jsonPament = angular.toJson(buyAccount);
 			var jsonReceive = angular.toJson(saleAccount);
-			var transfer = {};
 			transfer.jsonPament = jsonPament;
 			transfer.jsonReceive = jsonReceive;
 			transfer.imgUrl = str;
 			transfer.type = $scope.type;
-			transfer.installmentDetailId = installmentDetailId;
-			console.log(transfer.type)
 			// transfer.transferTime = $scope.transferTime.getTime();
 			transfer.total = $scope.$$bankTransfer.total;
 			bankTransferService.saveTransfer({order: $scope.orderNum.split(',').join('-')}, transfer, function(data) {
@@ -593,16 +633,16 @@ define([ 'app/app' ], function(app) {
 			}
 		}
 
-        // /**
-        //  * 上传付款截图
-        //  */
-        // $scope.onUploadPayment = function ($data) {
-        //     if (!$data || !$data.path) {
-        //         toaster.pop('error', '付款截图上传失败');
-        //         return ;
-        //     }
-        //     $scope.imageUrl = $data.path;
-        // };
+		// /**
+		//  * 上传付款截图
+		//  */
+		// $scope.onUploadPayment = function ($data) {
+		//     if (!$data || !$data.path) {
+		//         toaster.pop('error', '付款截图上传失败');
+		//         return ;
+		//     }
+		//     $scope.imageUrl = $data.path;
+		// };
 
 		$scope.select = function(account, isBuy) {
 			if(isBuy) {
@@ -611,7 +651,7 @@ define([ 'app/app' ], function(app) {
 				$scope.saleAccount = account;
 			}
 		}
-		
+
 		//获取当前时间
 		var getTodayDate = function(){
 			var date = new Date();
@@ -619,7 +659,7 @@ define([ 'app/app' ], function(app) {
 		};
 		getTodayDate();
 	}]);
-	
+
 	app.register.controller('timeCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {
 		$scope.time = 5;
 		var setTime = function() {
@@ -634,19 +674,19 @@ define([ 'app/app' ], function(app) {
 				$scope.closeNow();
 			}
 		};
-		
+
 		setTime();
-		
+
 		$scope.closeNow = function() {
 			$modalInstance.close($scope.time);
 		};
-		
+
 		$scope.dismiss = function() {
 			$modalInstance.dismiss();
 		};
 	}]);
-	
-	
+
+
 	app.register.controller('BankInfoCtrl', ['$scope', '$modalInstance', 'account', 'kind', function($scope, $modalInstance, account, kind){
 		$scope.account = account;
 		if($scope.account) {
@@ -663,22 +703,22 @@ define([ 'app/app' ], function(app) {
 			$scope.account = {};
 			$scope.account.currency = 'RMB'; // 默认银行卡币别是人民币
 		}
-		
+
 		$scope.set = function(kind) {
 			$scope.kind = kind;
 		}
-		
+
 		$scope.confirm = function() {
 			$scope.account.kind = $scope.kind;
 			$modalInstance.close($scope.account);
 		}
-		
+
 		$scope.cancel = function() {
 			$modalInstance.dismiss();
 		}
 
 	}]);
-	
+
 	app.register.controller('ImageInsertCtrl', ['$scope', '$modalInstance', 'SmoothScroll', function($scope, $modalInstance, SmoothScroll) {
 		$scope.image = {src: null};
 		// 图片上传成功之后
@@ -690,12 +730,12 @@ define([ 'app/app' ], function(app) {
 				$scope.image.thumb = path;
 			});
 		};
-		
+
 		$scope.close = function() {
 			$modalInstance.dismiss();
 			SmoothScroll.scrollTo(null, 'O', -68);
 		};
-		
+
 		$scope.confirm = function() {
 			$modalInstance.close($scope.image);
 			$scope.imageUrl = null;

+ 1 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js

@@ -119,7 +119,7 @@ define(['app/app'], function(app) {
 					return ;
 				}
 			});
-			if ($scope.totalPrice != $scope.purchase.currentTotal) {
+			if ($scope.totalPrice != $scope.purchase.price) {
 				toaster.pop('warning', '提示', '输入金额须等于总支付金额');
 				return ;
 			}

+ 15 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -458,6 +458,8 @@ define(['app/app'], function (app) {
                     data.confirmPaymentBox = false;
                 }
             });
+            $scope.purchaseInstallment = item;
+            $scope.purchasesId = item.id;
             $scope.confirmPaymentBox = true;
             // 获取分期付款进行到哪一步
             // 存放分期详情列表
@@ -478,8 +480,19 @@ define(['app/app'], function (app) {
             $scope.confirmPaymentBox = false;
         };
         // 确认收款
-        $scope.confirmPaymentOk = function () {
-
+        $scope.confirmPaymentOk = function (installmentDetails) {
+            var installmentDetailId = '';
+            angular.forEach(installmentDetails, function (installmentDetail) {
+                if (installmentDetail.detno == $scope.purchaseInstallment.installment.currentNo)
+                    installmentDetailId = installmentDetail.id;
+            });
+            Purchase.confirmPaymentInstallment({id: $scope.purchasesId,installmentDetailId: installmentDetailId}, null, function () {
+                toaster.pop('success', '收款成功');
+                $scope.confirmPaymentBox = false;
+                $scope.orderTableParams.reload();
+            }, function (response) {
+                toaster.pop('error', response.data);
+            });
         };
         // 切换效果
         $scope.imgIndex = 0;

+ 3 - 3
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -838,10 +838,10 @@
 						</span>
 						<span class="oder_deal" ng-class="{'order-border-bottom-solid' : $index == order.orderDetails.length -1 || $index==2}">
                             <div ng-if="$index == 0">
-								<a class="operate-height" href="user#/order/pay/{{order.orderid | EncryptionFilter}}" ng-if="(order.status == 503 || order.status == 501) && order.auditPayFailReason == null && !order.installmentId" style="display: block;">
+								<a class="operate-height" href="user#/order/pay/{{order.orderid | EncryptionFilter}}" ng-if="(order.status == 503 || order.status == 501) && order.auditPayFailReason == null" style="display: block;">
                                   <em class="order-operation">立即付款</em>
 								</a>
-                              <a class="operate-height" href="user#/order/pay/{{order.orderid | EncryptionFilter}}" ng-if="order.installment.status != 505 && order.installmentId" style="display: block;">
+                              <a class="operate-height" href="user#/transfer/{{order.orderid | EncryptionFilter}}" ng-if="order.installment.status == 504" style="display: block;">
                                   <em class="order-operation">立即付款</em>
 								  <!--分期付款-->
 								  <div class="ship-btn seller-ship-tip">
@@ -861,7 +861,7 @@
 												  <div class="price" ng-class="{'color333': item.status == 505}" ng-bind="item.price | currencySysmbol : detail.currencyName">¥13131</div>
 												  <div class="time" ng-class="{'color999': item.status == 505}">{{item.deadline | date : 'yyyy-MM-dd'}}前</div>
 												  <div class="color999 status" ng-if="item.status == 505">已付</div>
-												  <div class="status" ng-if="item.status != 505">付</div>
+												  <div class="status" ng-if="item.status != 505">付</div>
 											  </li>
 									  </ul>
 										<div class="tip-01"><em class="red" ng-if="order.installment.status != 505">*</em> 若第一期款项逾期未付,卖家有权利取消订单</div>

+ 37 - 9
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -24,7 +24,7 @@
 			<div class="common-title margin-top-8">收款账户</div>
 			<div class="payment-style">
 				<ul class="payment-80">
-					<li ng-if="!$$bankTransfer.installmentId">
+					<li ng-if="!($$bankTransfer.installmentId && $$bankTransfer.installment.status != 503)">
 						<label class="check-act" ng-click="selectPaymentType('PAIDTOPLATFORM')">
 							<input type="radio" id="2" name="name" value="2" ng-checked="type == 'PAIDTOPLATFORM'"/>
 							<label for="2"></label>
@@ -69,13 +69,13 @@
 						<span>第{{numArray[$index+1]}}期</span>
 						<span ng-bind="installmentDetail.price | currencySysmbol : $$bankTransfer.currency" style="width: 120px; display: inline-block; margin-right: 20px;">¥452965852</span>
 						<span>要求付款日期  {{installmentDetail.deadline | date : 'yyyy-MM-dd'}}</span>
-						<em ng-if="!installmentDetail.status == 503"><img src="static/img/icon/pay-ok-icon.png"/></em>
+						<em ng-if="installmentDetail.status == 505"><img src="static/img/icon/pay-ok-icon.png"/></em>
 					</li>
 				</ul>
 			</div>
 			<div class="common-title margin-top-8">水单扫描件</div>
-			<div class="payment-upload-list" ng-if="type == 'PAIDTOVENDOR' && installmentDetails.installmentImages">
-				<div class="item" ng-repeat="installmentImg in installmentDetails">
+			<div class="payment-upload-list" ng-if="type == 'PAIDTOVENDOR'">
+				<div class="item" ng-repeat="installmentImg in yesPayinstallmentDetails">
 					<div class="img-list">
 						<div class="prev" ng-click="changePrev(installmentImg)"><i class="fa fa-angle-left"></i></div>
 						<div class="img">
@@ -92,19 +92,20 @@
 					</div>
 					<div class="small-img">
 						<span ng-class="{'active': installmentImg.imgIndex == $index}" ng-repeat="img in installmentImg.installmentImages track by $index">
-							<img ng-src="{{img}}" ng-click="changeImg(installmentImg )"/>
+							<img ng-src="{{img}}" ng-click="changeImg(installmentImg, $index)"/>
 						</span>
 					</div>
 					<div class="price-input"><input type="text" class="form-control" value="{{installmentImg.price | currencySysmbol : $$bankTransfer.currency}}" readonly/></div>
-					<div class="time" ng-bind="installmentImg.deadline">2017-08-24 14:56:20</div>
+					<div class="time" ng-bind="installmentImg.deadline | date: 'yyyy-MM-dd HH:mm:ss'">2017-08-24 14:56:20</div>
 				</div>
 			</div>
 			<div class="payment-upload">
-				<ul>
+				<ul ng-if="noPayinstallmentDetails.length == 0 || !noPayinstallmentDetails">
 					<li ng-repeat="images in imagesList">
 						<div class="upload">
 							<div class="img" image-upload data-src="static/img/icon/payment-upload.png" on-success="onUploadPayment($data, $index)">
 							</div>
+							<div class="img"></div>
 							<div class="hover-show" ng-if="images.imageUrl">
 								<span class="delete" title="删除" ng-click="deleteProofInfo($index)"><i class="fa fa-trash"></i></span>
 								<!-- 图片预览 -->
@@ -124,14 +125,41 @@
 						</div>
 					</li>
 				</ul>
+				<ul ng-if="noPayinstallmentDetails">
+					<li ng-repeat="images in installmentNoPayImg">
+						<div class="upload">
+							<div class="img" ng-if="!images.imageUrl || images.imageUrl == ''" image-upload data-src="static/img/icon/payment-upload.png" on-success="onUploadPayment($data, $index)">
+							</div>
+							<div class="img" ng-if="images.imageUrl || images.imageUrl != ''">
+								<img ng-src="{{images.imageUrl}}"/>
+							</div>
+							<div class="hover-show" ng-if="images.imageUrl">
+								<span class="delete" title="删除" ng-click="deleteimg($index)"><i class="fa fa-trash"></i></span>
+								<!-- 图片预览 -->
+								<a ng-click="showImg(images.imageUrl)"><i class="fa fa-search"></i>查看</a>
+							</div>
+						</div>
+						<div class="price" ng-if="type == 'PAIDTOVENDOR'">
+							<em>$</em>
+							<input type="text" class="form-control"  placeholder="请输入金额"/>
+						</div>
+					</li>
+					<li ng-click="addUploadImgNopay()" ng-if="installmentNoPayImg.length < 6 && $$bankTransfer.installmentId">
+						<div class="upload">
+							<div class="img">
+								<img src="static/img/icon/payment-add.png">
+							</div>
+						</div>
+					</li>
+				</ul>
 				<div class="img-specifications">仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M,每期最多可上传6张图片</div>
 			</div>
 		</div>
 		<div class="pay-price">
 			<div class="stage row">
 				<div class="content">
-					<p ng-if="$$bankTransfer.installmentId"><span>已支付:</span><em>¥500</em></p>
-					<p ng-if="$$bankTransfer.installmentId"><span>待支付:</span><em class="bule">¥513131.32</em></p>
+					<p ng-if="yesPayinstallmentDetails"><span>已支付:</span><em ng-bind="yesPayinstallmentDetails.payTatalPrice | formateNumber : 2 | currencySysmbol : $$bankTransfer.currency">¥500</em></p>
+					<p ng-if="yesPayinstallmentDetails"><span>待支付:</span><em class="bule" ng-bind="$$bankTransfer.total - yesPayinstallmentDetails.payTatalPrice | formateNumber : 2 | currencySysmbol : $$bankTransfer.currency">¥513131.32</em></p>
 					<p class="total"><span>总价:</span><em class="red">{{$$bankTransfer.total | formateNumber : 2 | currencySysmbol : $$bankTransfer.currency}}</em></p>
 				</div>
 			</div>

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -923,7 +923,7 @@
 												  <div class="price" ng-class="{'color333': item.status == 505}" ng-bind="item.price | currencySysmbol : detail.currencyName">¥13131</div>
 												  <div class="time" ng-class="{'color999': item.status == 505}">{{item.deadline | date : 'yyyy-MM-dd'}}前</div>
 												  <div class="color999 status" ng-if="item.status == 505">已付</div>
-												  <div class="status" ng-if="item.status != 505">付</div>
+												  <div class="status" ng-if="item.status != 505">付</div>
 											  </li>
 									  </ul>
 									 </div>
@@ -1018,7 +1018,7 @@
 				<div class="img-list">
 					<div class="prev" ng-click="changePrev(changeList)"><i class="fa fa-angle-left"></i></div>
 					<div class="img">
-						<div class="number"><em>第{{numArray[$index+1]}}期</em></div>
+						<div class="number"><em>第{{numArray[installmentDetailsList.detno]}}期</em></div>
 						<div class="list" ng-repeat="img in changeList track by $index" ng-if="imgIndex == $index">
 							<span><img ng-src="{{img}}"/></span>
 							<div class="hover-show">
@@ -1039,7 +1039,7 @@
 		<div class="tip"><em>*</em> 若未收到货款,请勿点击【确认收款】</div>
 		<div class="deal-btn-box">
 			<button class="off" ng-click="cancelPayment()">取消</button>
-			<button class="ok" ng-click="confirmPaymentOk()">确认收款</button>
+			<button class="ok" ng-click="confirmPaymentOk(installmentDetails)">确认收款</button>
 		</div>
 	</div>
 </div>