Browse Source

分期付款

ouxq 8 years ago
parent
commit
09894b97f7

+ 12 - 1
src/main/webapp/resources/css/pay.css

@@ -48,10 +48,21 @@
 .down-payment .order-list li{
     width: 25%;
     height: 42px;
-    background: #f9f9fa;
+    /*background: #f9f9fa;*/
     line-height: 42px;
     float: left;
 }
+.down-payment .payment-style ul li.no-count span{
+    margin-left: 28px;
+}
+.down-payment .payment-style ul li.no-count span i{
+    font-size: 16px;
+    color: #5078cb;
+    margin-right: 5px;
+}
+.down-payment .payment-style ul li.no-count span a{
+    color: #5078cb;
+}
 .down-payment .order-list li a{
     font-size: 14px;
 }

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

@@ -227,6 +227,11 @@ define([ 'ngResource' ], function() {
 			getPurchaseByOrder : {
 				url : 'trade/purchase/orderid/:orderid',
 				method : 'GET'
+			},
+			// 确认收款
+			confirmParmentInstallment : {
+				url : '/trade/purchase/:id/ensurePaid',
+				method : 'PUT'
 			}
 		});
 	}]);

+ 13 - 472
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_down_payment_ctrl.js

@@ -4,7 +4,7 @@ define([ 'app/app' ], function(app) {
         BaseService.scrollBackToTop();
 
         $scope.type = "PAIDTOPLATFORM";
-
+        $scope.orderList = '';
         if($stateParams.orderid) {
             Order.get({orderid : $stateParams.orderid}, function(data) {
                 console.log(data);
@@ -35,7 +35,6 @@ define([ 'app/app' ], function(app) {
         SessionService.unset("page");
         SessionService.unset("count");
         var hideBankFilter = $filter("hideBankFilter");
-
         $scope.isSelectAll = false;
         $scope.isSelect = false;
         $scope.orderArray = []; //存放订单链
@@ -56,36 +55,7 @@ define([ 'app/app' ], function(app) {
             return arr;
         };
 
-        $scope.pay = function(order) {
-            if(order.availabletime < new Date().getTime()) {
-                toaster.pop("error", '错误', '此订单已过期,已失效');
-                return;
-            }
-            angular.forEach($scope.tobePaidTableParams.data, function(obj) {
-                obj.isSelect = false;
-            });
-            order.isSelect = true;
-            $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", '错误', '请选择要付款的单');
-                return ;
-            }
-            $location.hash('anchorScroll');
-            $anchorScroll();
-            $scope.showMe = true;
-        };
-
+        //获取管理平台账户信息
         var getOriginalData = function(data) {
             var result = {};
             if(data&&data.length) {
@@ -95,352 +65,25 @@ define([ 'app/app' ], function(app) {
             }
             return result;
         };
-
-        $scope.selectAll = function() {
-            $scope.isSelectAll = !$scope.isSelectAll;
-            $scope.orderArray = [];
-            $scope.orderNum = "";
-            $scope.total = 0;
-            $scope.currencyName = $scope.tobePaidTableParams.data[0].currency;
-            var hasConflict = false;
-            angular.forEach($scope.tobePaidTableParams.data, function(order) {
-                if($scope.isSelectAll) {
-                    if((order.availabletime >= new Date().getTime()) && ($scope.currencyName == order.currency)) {
-                        $scope.orderArray.push(order.orderid);
-                        order.isSelect = true;
-                        $scope.total += Number(order.price);
-                    }else {
-                        hasConflict = true;
-                        order.isSelect = false;
-                    }
-
-                }else {
-                    order.isSelect = false;
-                    $scope.currencyName = '';
-                }
-            });
-            if(hasConflict) {
-                toaster.pop('info', '您当前操作的订单过期或与选中的币别  '+$scope.currencyName+' 不一致,不能统一付款');
-            }
-            $scope.orderNum = $scope.orderArray.join(',');
-        };
-
-        $scope.doSelect = function(order) {
-            var result = true;
-            if(order.isSelect) {
-                if($scope.orderArray.length == 0) {
-                    $scope.currencyName = order.currency;
-                }
-                if(order.availabletime < new Date().getTime()) {
-                    toaster.pop("info", '此订单已过付款期或');
-                    order.isSelect = false;
-                    result = false;//代表已经有没有选中的状态了
-                    return ;
-                }
-                if($scope.currencyName != order.currency) {
-                    toaster.pop("info", '与选中的币别 '+$scope.currencyName + ' 不一致,不能统一付款!');
-                    order.isSelect = false;
-                    result = false;//代表已经有没有选中的状态了
-                    return ;
-                }
-                $scope.orderArray.push(order.orderid);
-                $scope.total += Number(order.price);
-            }else {
-                var index = -1;
-                angular.forEach($scope.orderArray, function(item, key) {
-                    if(item == order.orderid) {
-                        index = key;
-                        $scope.total -= Number(order.price);
-                    }
-                });
-                $scope.orderArray.splice(index, 1);
-                result = false;//代表已经有没有选中的状态了
-            }
-            //检查是否选中了所有的单选框
-            //如果现在还为true,就检查所有行信息的是否都选中
-            if(result) {
-                angular.forEach($scope.tobePaidTableParams.data, function(order) {
-                    if(!order.isSelect) {
-                        result = false;
-                    }
-                });
-            }
-
-            $scope.isSelectAll = result;
-            $scope.orderNum = $scope.orderArray.join(',');
-        }
-
-        // //根据单选框的状态,提取不同的数据
-        // var getBuyAccount = function() {
-        // 	if(!$scope.purKind) {
-        // 		bankInfoService.getBuyEnterpriseBank('', function(data) {
-        // 			$scope.buyAccountInfos = resolveData(data);
-        // 			angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-        // 				buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-        // 			});
-        // 			$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-        // 		}, function(error) {
-        // 			toaster.pop('error', '错误', '提取企业账户信息失败');
-        // 		});
-        // 	}else {
-        // 		bankInfoService.getBuyPersonalBank('', function(data) {
-        // 			$scope.buyAccountInfos = resolveData(data);
-        // 			angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-        // 				buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-        // 			});
-        // 			$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-        // 		}, function(error) {
-        // 			toaster.pop('error', '错误', '提取个人账户信息失败');
-        // 		});
-        // 	}
-        // };
-        //
-        // //开始时,就获取账户信息
-        // getBuyAccount();
-
-        //获取管理平台账户信息
         var getSellerAccount = function() {
-            if(!$scope.saleKind) {
-                bankInfoService.getAdminEnterAccount('', function(data) {
-                    $scope.saleAccountInfos = resolveData(data);
-                    angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-                        saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-                    });
-                    $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-                }, function(res) {
-                    toaster.pop('error', '错误', '获取卖家企业账户信息失败');
-                });
-            }else {
-                bankInfoService.getAdminPersAccount('', function(data) {
-                    $scope.saleAccountInfos = resolveData(data);
-                    angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-                        saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-                    });
-                    $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-                }, function(res) {
-                    toaster.pop('error', '错误', '获取卖家个人账户信息失败');
-                });
-            }
-        }
-
-        getSellerAccount();
-
-        $scope.set = function(data, isBuy) {
-            if(isBuy) {
-                if(!angular.equals($scope.purKind, data)) {
-                    $scope.purKind = data;
-                    getBuyAccount();
-                }
-            }else {
-                if(!angular.equals($scope.saleKind, data)) {
-                    $scope.saleKind = data;
-                    getSellerAccount();
-                }
-            }
-
-        };
-
-        // 搜索框内容转换成大写
-        var t;
-        var setTime = function() {
-            if($scope.time > 0) {
-                t = setTimeout(function() {
-                    $scope.$apply(function() {
-                        $scope.time--;
-                        setTime();
-                    });
-                }, 1000);
-            }else {
-                $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,
-            sorting : {
-                creattime: 'DESC'
-            }
-        }, {
-            total : 0,
-            getData : function($defer, params) {
-                var param = BaseService.parseParams(params.url());
-                param.keyword = $scope.keyword;
-                param.status = '503';
-                Order.getIndividualOrder(param, function(page) {
-                    if (page) {
-                        params.total(page.totalElements);
-                        $defer.resolve(page.content);
-                    }
-                    //重新加载数据后,数据记录删除
-                    $scope.isSelectAll = false;
-                    $scope.orderNum = ""; //单号的链接字符串
-                    $scope.orderArray = []; //存放
-                    $scope.total = 0;
-
-                    if(ids) {
-                        var arr = ids.split('-');
-                        var result = true;
-                        for(var i = 0; i < arr.length; i++) {
-                            angular.forEach(page.content, function(order) {
-                                if(order.orderid == arr[i]) {
-                                    order.isSelect = true;
-                                    $scope.orderArray.push(order.orderid);
-                                    $scope.total += Number(order.price);
-                                }
-                            });
-                        }
-                        angular.forEach(page.content, function(order) {
-                            if(!order.isSelect) {
-                                result = false;
-                            }
-                        });
-                        $scope.isSelectAll = result;
-                        $scope.orderNum = $scope.orderArray.join(',');
-                        if($scope.orderNum) {
-                            $scope.showMe = true;
-                        }
-                    }
+            bankInfoService.getAdminEnterAccount('', function(data) {
+                $scope.saleAccountInfos = resolveData(data);
+                angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
+                    saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
                 });
-            }
-        });
-
-        //跳出模态框,data有数据代表编辑,data为空则代表新增。
-        $scope.bankInfo = function(data) {
-            var modalInstance = $modal.open({
-                templateUrl: 'static/common/bankInfoModal.html',
-                controller: 'BankInfoCtrl',
-                resolve: {
-                    data: function() {
-                        return angular.copy(data);
-                    }
-                }
+                $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
+            }, function(res) {
+                toaster.pop('error', '错误', '获取卖家企业账户信息失败');
             });
         };
-
-        //新增账户
-        $scope.newAccount = function(data) {
-            var modalInstance = $modal.open({
-                templateUrl : 'static/view/common/bankInfoModal.html',
-                controller : 'BankInfoCtrl',
-                resolve : {
-                    kind : function() {
-                        //深拷贝一份
-                        return angular.copy($scope.purKind);
-                    },
-                    account : function() {
-                        //深拷贝一份
-                        return angular.copy(data);
-                    }
-                }
-            });
-
-            modalInstance.result.then(function(account) {
-                if(account.kind) {
-                    bankInfoService.saveBuyPersonalBank({}, account, function(data) {
-                        toaster.pop('success', '成功','信息已添加');
-                        $scope.purKind = account.kind;
-                        getBuyAccount();  //这个方法不能提取到外面,因为存在异步。
-                    }, function(res) {
-                        toaster.pop('error', '错误', res.data);
-                    });
-                }else {
-                    //企业账户
-                    bankInfoService.saveBuyEnterpriseBank({}, account, function(data) {
-                        toaster.pop('success', '保存成功','信息已添加');
-                        $scope.purKind = account.kind;
-                        getBuyAccount();
-                    }, function(res) {
-                        toaster.pop('error', '错误', res.data);
-                    });
-                }
-            }, function() {
-
-            });
-        };
-
-        $scope.deleteAccount = function(buyAccount) {
-            var  isSure = confirm('确认删除本银行账户?删除后无法恢复,请谨慎操作');
-            if(isSure){
-                bankInfoService.deleteBank({id: buyAccount.id}, function(data) {
-                    toaster.pop('success', '删除成功');
-                    getBuyAccount();
-                }, function(response) {
-                    toaster.pop('error', '删除失败');
-                })
-            }
-        }
+        getSellerAccount();
 
         // 确认订单
+        //订单加密解析器
+        var enIdFilter = $filter('EncryptionFilter');
         $scope.confirmOrder = function () {
-            var saleAccount = angular.copy($scope.saleAccount);
-            delete saleAccount.filterAccount;
-            var jsonReceive = angular.toJson(saleAccount);
-            var transfer = {};
-            transfer.jsonReceive = jsonReceive;
-            bankTransferService.saveTransfer({order: $scope.orderNum.split(',').join('-')}, transfer, function(data) {
-                toaster.pop('success', '信息保存成功');
-                $state.go('buyer_order');
-            }, function(response) {
-                toaster.pop("error", '失败', '信息保存失败:' + response.data);
-            });
+            $state.go('order_transfer', {orderid : $stateParams.orderid});
         };
-        $scope.confirm = function() {
-            var imageArray = [];
-            for (var i = 0; i< $scope.imagesList.length; i++) {
-                imageArray.push($scope.imagesList[i].imageUrl)
-                console.log($scope.imagesList[i].imageUrl)
-            }
-            var str = imageArray.join(",");
-            if(angular.isUndefined($scope.orderNum) || angular.equals($scope.orderNum,'') || angular.equals($scope.$$bankTransfer.total, 0)) {
-                toaster.pop('info', '提示', '没有选择要付款的订单,或付款总额为0');
-                return ;
-            }
-            if(angular.isUndefined($scope.buyAccount)||angular.equals("{}", angular.toJson($scope.buyAccount))) {
-                toaster.pop('info', '提示', '请选择买家账户');
-                return ;
-            }
-            if(angular.isUndefined($scope.saleAccount)||angular.equals("{}", angular.toJson($scope.saleAccount))) {
-                toaster.pop('info', '提示', '请选择卖家账户');
-                return ;
-            }
-            if(!str){
-                toaster.pop('info', '提示', '请选择付款截图');
-                return ;
-            }
-            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 = $scope.imagesList;
-            console.log(transfer.imgUrl);
-            transfer.type = $scope.type;
-            // transfer.transferTime = $scope.transferTime.getTime();
-            transfer.total = $scope.$$bankTransfer.total;
-            bankTransferService.saveTransfer({order: $scope.orderNum.split(',').join('-')}, transfer, function(data) {
-                toaster.pop('success', '信息保存成功');
-                $state.go('buyer_order');
-            }, function(response) {
-                toaster.pop("error", '失败', '信息保存失败:' + response.data);
-            });
-        }
 
         $scope.buyExpose = false;
         $scope.salexpose = false;
@@ -453,25 +96,6 @@ define([ 'app/app' ], function(app) {
             }
         }
 
-        // /**
-        //  * 上传付款截图
-        //  */
-        // $scope.onUploadPayment = function ($data) {
-        //     if (!$data || !$data.path) {
-        //         toaster.pop('error', '付款截图上传失败');
-        //         return ;
-        //     }
-        //     $scope.imageUrl = $data.path;
-        // };
-
-        $scope.select = function(account, isBuy) {
-            if(isBuy) {
-                $scope.buyAccount = account;
-            }else {
-                $scope.saleAccount = account;
-            }
-        }
-
         //获取当前时间
         var getTodayDate = function(){
             var date = new Date();
@@ -479,87 +103,4 @@ define([ 'app/app' ], function(app) {
         };
         getTodayDate();
     }]);
-
-    app.register.controller('timeCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {
-        $scope.time = 5;
-        var setTime = function() {
-            if($scope.time > 0) {
-                setTimeout(function() {
-                    $scope.$apply(function() {
-                        $scope.time--;
-                        setTime();
-                    });
-                }, 1000);
-            }else {
-                $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) {
-            $scope.eidt = true;
-        } else {
-            delete $scope.eidt;
-        }
-        $scope.kind = kind;
-
-        if($scope.account) {
-            $scope.title = "修改账户";
-        }else {
-            $scope.title = "新增账户";
-            $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};
-        // 图片上传成功之后
-        $scope.onUploadSuccess = function(data){
-            var path = data.path;
-            path = path.substring(0, path.lastIndexOf('.')) + "_150x90" + path.substr(path.lastIndexOf('.'));
-            $scope.$apply(function(){
-                $scope.image.src = data.path;
-                $scope.image.thumb = path;
-            });
-        };
-
-        $scope.close = function() {
-            $modalInstance.dismiss();
-            SmoothScroll.scrollTo(null, 'O', -68);
-        };
-
-        $scope.confirm = function() {
-            $modalInstance.close($scope.image);
-            $scope.imageUrl = null;
-            SmoothScroll.scrollTo(null, 'O', -68);
-        };
-    }]);
 });

+ 110 - 33
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -4,19 +4,28 @@ define([ 'app/app' ], function(app) {
 		BaseService.scrollBackToTop();
 
 		$scope.type = "PAIDTOPLATFORM";
-
+		// $scope.type = "PAIDTOVENDOR";
+		$scope.selectPaymentType = function (type) {
+			$scope.type = type;
+			console.log($scope.type);
+		};
 		if($stateParams.orderid) {
 			Order.get({orderid : $stateParams.orderid}, function(data) {
-				console.log(data);
-				var arr = new Array();
-				$scope.$$bankTransfer = {};
-				$scope.$$bankTransfer.total = 0.0;
+				var arr = [];
+				$scope.$$bankTransfer = data[0];
+				// 分期信息
+				$scope.installmentData = data[0].installment;
+				if ($scope.$$bankTransfer.installmentId) {
+					$scope.type = "PAIDTOVENDOR";
+				}
+				$scope.$$bankTransfer.total = 0;
 				for(var i = 0; i < data.length; i++) {
-					arr.push(data[i].orderid);
-					$scope.$$bankTransfer.total = $scope.$$bankTransfer.total + data[i].ensurePrice;
+					var item = data[i];
+					arr.push(item.orderid);
+					$scope.$$bankTransfer.total += item.ensurePrice;
 				}
-				$scope.$$bankTransfer.currency =  data[0].currency;
 				$scope.orderNum = arr.join(',');
+				console.log($scope.$$bankTransfer);
 			}, function (response) {
 				toaster.pop('info', '获取订单的信息有误,请确定付款的订单');
 			})
@@ -65,8 +74,11 @@ define([ 'app/app' ], function(app) {
 		};
 		// 上传图片
 		$scope.imagesList = [{imageUrl: ''}];
+		// 循环水单价格
+		$scope.waterPriceList = [{price: ''}];
 		$scope.addUploadImg = function () {
-			$scope.imagesList.push({imageUrl: ''})
+			$scope.imagesList.push({imageUrl: ''});
+			$scope.waterPriceList.push({price: ''});
 		};
 		// 删除图片
 		$scope.deleteProofInfo = function (index) {
@@ -101,6 +113,63 @@ define([ 'app/app' ], function(app) {
 			});
 		}
 
+		// 分期明细
+		$scope.numArray = {
+			'1': '一',
+			'2': '二',
+			'3': '三',
+			'4': '四',
+			'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();
+
+		// 切换效果
+		$scope.changeImg = function (installmentImg, index) {
+			angular.forEach(installmentImg.installmentImages, function (data,a) {
+				if (index == a){
+					installmentImg.imgIndex = a;
+				}
+			});
+		};
+		$scope.changePrev = function (installmentImg) {
+			if (installmentImg.imgIndex == 0) {
+				installmentImg.imgIndex = 0
+			}else if(installmentImg.imgIndex > 0){
+				installmentImg.imgIndex -= 1;
+			}
+		};
+		$scope.changeNext = function (installmentImg, index) {
+			if (installmentImg.imgIndex == installmentImg.installmentImages.length-1) {
+				installmentImg.imgIndex = 0
+			}else {
+				installmentImg.imgIndex += 1;
+			}
+		};
+		//controller
 		// 分期付款结束
 		$scope.purKind = $rootScope.userInfo.enterprises ? false : true;//应付账户的类别, 默认是企业
 		$scope.saleKind = false;//应收账户的类别,默认是企业
@@ -277,28 +346,27 @@ define([ 'app/app' ], function(app) {
 		
 		//获取管理平台账户信息
 		var getSellerAccount = function() {
-			if(!$scope.saleKind) {
-				bankInfoService.getAdminEnterAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家企业账户信息失败');
+			// 平台账户
+			bankInfoService.getAdminEnterAccount('', function(data) {
+				$scope.saleAccountInfos = resolveData(data);
+				angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
+					saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
 				});
-			}else {
-				bankInfoService.getAdminPersAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家个人账户信息失败');
+				$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
+			}, function(res) {
+				toaster.pop('error', '错误', '获取卖家企业账户信息失败');
+			});
+			// 卖家私人账户
+			bankInfoService.getAdminPersAccount('', function(data) {
+				$scope.saleAccountInfos = resolveData(data);
+				angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
+					saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
 				});
-			}
-		}
+				$scope.salePerAccount = getOriginalData($scope.saleAccountInfos);
+			}, function(res) {
+				toaster.pop('error', '错误', '获取卖家个人账户信息失败');
+			});
+		};
 		
 		getSellerAccount();
 
@@ -463,8 +531,11 @@ define([ 'app/app' ], function(app) {
 		$scope.confirm = function() {
 			var imageArray = [];
 			for (var i = 0; i< $scope.imagesList.length; i++) {
-				imageArray.push($scope.imagesList[i].imageUrl)
-				console.log($scope.imagesList[i].imageUrl)
+				if ($scope.imagesList.length < 6) {
+					if ($scope.imagesList[i].imageUrl != '') {
+						imageArray.push($scope.imagesList[i].imageUrl);
+					}
+				}
 			}
 			var str = imageArray.join(",");
 			if(angular.isUndefined($scope.orderNum) || angular.equals($scope.orderNum,'') || angular.equals($scope.$$bankTransfer.total, 0)) {
@@ -483,6 +554,11 @@ define([ 'app/app' ], function(app) {
                 toaster.pop('info', '提示', '请选择付款截图');
                 return ;
             }
+            var installmentDetailId = '';
+            angular.forEach($scope.$$bankTransfer.installment.installmentDetails, function (installmentDetail) {
+				if (installmentDetail.detno == $scope.$$bankTransfer.installment.currentNo)
+					installmentDetailId = installmentDetail.id;
+			})
 			var buyAccount = angular.copy($scope.buyAccount);
 			var saleAccount = angular.copy($scope.saleAccount);
 			delete saleAccount.filterAccount;
@@ -492,9 +568,10 @@ define([ 'app/app' ], function(app) {
 			var transfer = {};
 			transfer.jsonPament = jsonPament;
 			transfer.jsonReceive = jsonReceive;
-			transfer.imgUrl = $scope.imagesList;
-			console.log(transfer.imgUrl);
+			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) {

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

@@ -148,6 +148,7 @@ define(['app/app'], function (app) {
             window.open(rootPath + '/report/print?reportName=' + type + '&whereCondition=' + "where trade$purchase.id=" + purchase.id);
         };
 
+
         $scope.setActive = function (status) {
             window.sessionStorage.removeItem("exceptionType");
             window.sessionStorage.setItem('purchaseState', status);
@@ -382,6 +383,17 @@ define(['app/app'], function (app) {
                             }
                         }
                         $scope.purchases = page.content;
+                        angular.forEach($scope.purchases, function (data) {
+                            if (data.installmentId && data.installment.status == 504) {
+                                angular.forEach(data.installment.installmentDetails, function (list) {
+                                    if (list.detno == data.installment.currentNo) {
+                                        if (list.status == 504) {
+                                            data.installmentDetailPaid = true;
+                                        }
+                                    }
+                                })
+                            }
+                        })
                         getExMsgState(); // 获取异常消息状态
                         getReturnByPurchaseIds(); // 获取退货单信息
 
@@ -430,7 +442,81 @@ define(['app/app'], function (app) {
             }
         });
         $scope.orderTableParams.reload();
+        // 确认收款
+        // 分期明细
+        $scope.numArray = {
+            '1': '一',
+            '2': '二',
+            '3': '三',
+            '4': '四',
+            '5': '五'
+        };
+        $scope.confirmPaymentBox = false;
+        $scope.confirmPayment = function (item,id) {
+            angular.forEach($scope.purchases, function (data) {
+                if(data.id != id) {
+                    data.confirmPaymentBox = false;
+                }
+            });
+            $scope.confirmPaymentBox = true;
+            // 获取分期付款进行到哪一步
+            // 存放分期详情列表
+            $scope.installmentDetails = item.installment.installmentDetails;
+            if (item.installmentId && item.installment.status == 504) {
+                $scope.currencyNAME = item.currency;
+                angular.forEach(item.installment.installmentDetails, function (list) {
+                    if (list.detno == item.installment.currentNo) {
+                        $scope.installmentDetailsList = list;
+                        $scope.changeList = '';
+                        $scope.installmentDetailsList.installmentImages = $scope.installmentDetailsList.imgs.split(",");
+                        $scope.changeList = $scope.installmentDetailsList.installmentImages;
+                    }
+                })
+            };
+        };
+        $scope.cancelPayment = function () {
+            $scope.confirmPaymentBox = false;
+        };
+        // 确认收款
+        $scope.confirmPaymentOk = function () {
 
+        };
+        // 切换效果
+        $scope.imgIndex = 0;
+        $scope.changeImg = function (installmentImg, index) {
+            $scope.imgIndex = index;
+        };
+        $scope.changePrev = function () {
+            if ($scope.imgIndex == 0) {
+                $scope.imgIndex = 0
+            }else if($scope.imgIndex > 0){
+                $scope.imgIndex -= 1;
+            }
+        };
+        $scope.changeNext = function (installmentImg) {
+            if ($scope.imgIndex == installmentImg.length-1) {
+                $scope.imgIndex = 0
+            }else {
+                $scope.imgIndex += 1;
+            }
+        };
+        /**
+         * 查看大图
+         *
+         * @param imgUrl		图片链接
+         */
+        $scope.showImg = showImg;
+        function showImg(imgUrl) {
+            var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+            box.show();
+            box.find('img').attr('src', src);
+            box.find('a').click(function(){
+                box.hide();
+            });
+            box.dblclick(function(){
+                box.hide();
+            });
+        }
         // 收退货
         $scope.receivingDialogShow = {};
         // 确认收退货:知道
@@ -647,7 +733,6 @@ define(['app/app'], function (app) {
                 $scope.canEnsureRec = idArray.length > 0;
             }
         };
-
         // TODO 弃用,【批量】确认收款
         $scope.ensureReceived = function (id) {
             var idArray = Object.getOwnPropertyNames($scope.checkedIds);

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_down_payment.html

@@ -15,7 +15,7 @@
             <div class="common-title">收款账户</div>
             <div class="payment-style">
                 <ul style="height: 80px">
-                    <li>
+                    <li style="margin-top: 5px;">
                         <label class="check-act">
                             <input type="radio" id="2" name="name" value="2" ng-checked="type == 'PAIDTOPLATFORM'"/>
                             <label for="2"></label>

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

@@ -660,6 +660,7 @@
 		color: #f00;
 		max-width: 105px;
 		text-align: left;
+		min-width: 60px;
 	}
 	.pay .content ul li div.status{
 		color: #5078cb;
@@ -837,7 +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" 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 && !order.installmentId" 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;">
                                   <em class="order-operation">立即付款</em>
 								  <!--分期付款-->
 								  <div class="ship-btn seller-ship-tip">
@@ -847,37 +851,20 @@
                                       <div class="arrow"></div>
                                       <div class="content">
 										  <div class="title">货款共计
-											  <em>¥9000</em>
+											  <em ng-bind="order.installment.price | currencySysmbol : detail.currencyName">¥9000</em>
 											  &nbsp;&nbsp;&nbsp;&nbsp;分
-											  <em style="color: #5078cb;">5</em> 期
+											  <em style="color: #5078cb;" ng-bind="order.installment.count">5</em> 期
 										  </div>
 										  <ul>
-											  <li>
-												  <em>1</em>
-												  <div class="color333 price">¥13131</div>
-												  <div class="color999 time">2017-15-12前</div>
-												  <div class="color333 status">已付</div>
-											  </li>
-											  <li>
-												  <em>2</em>
-												  <div class="color333 price">¥13131</div>
-												  <div class="color999 time">2017-15-12前</div>
-												  <div class="color333 status">已付</div>
-											  </li>
-											  <li>
-												  <em>3</em>
-												  <div class="price">¥13131</div>
-												  <div class="time">2017-15-12前</div>
-												  <div class="status">代付</div>
-											  </li>
-											  <li>
-												  <em>4</em>
-												  <div class="price">¥13131</div>
-												  <div class="time">2017-15-12前</div>
-												  <div class="status">代付</div>
+											  <li ng-repeat="item in order.installment.installmentDetails">
+												  <em ng-bind="$index+1">1</em>
+												  <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>
 											  </li>
 									  </ul>
-										<div class="tip-01"><em class="red">*</em> 若第一期款项逾期未付,卖家有权利取消订单</div>
+										<div class="tip-01"><em class="red" ng-if="order.installment.status != 505">*</em> 若第一期款项逾期未付,卖家有权利取消订单</div>
 									 </div>
                                   </div>
                               </a>
@@ -978,7 +965,7 @@
 	</div>
 </div>
 <!--同意取消订单-->
-<div class="com-out-box">
+<div class="com-out-box" style="display: none;">
 	<div class="title">
 		<a ng-click="">&times;</a>
 	</div>

+ 36 - 73
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -6,7 +6,7 @@
 			<div class="common-title margin-top-none">付款账户</div>
 			<div class="payment-style">
 				<ul>
-					<li>
+					<li ng-if="buyAccount">
 						<label class="check-act" style="margin-right: 64px;">
 							<input type="radio" id="1" name="1" checked/>
 							<label for="1"></label>
@@ -16,13 +16,16 @@
 						<div ng-bind="buyAccount.accountname">开户人名称</div>
 						<div><button class="change-count" ng-click="changebuyAccount(buyAccount.id)">更换账户</button></div>
 					</li>
+					<li class="no-count" ng-if="!buyAccount">
+						<span><i class="fa fa-exclamation-circle"></i>暂未设置付款账户,前往  <a href="user#/payCenter">设置付款账户</a></span>
+					</li>
 				</ul>
 			</div>
 			<div class="common-title margin-top-8">收款账户</div>
 			<div class="payment-style">
 				<ul class="payment-80">
-					<li>
-						<label class="check-act">
+					<li ng-if="!$$bankTransfer.installmentId">
+						<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>
 							<em>平台代收</em>
@@ -38,8 +41,8 @@
 						<div ng-bind="saleAccount.number">125963528469526354</div>
 						<div ng-bind="saleAccount.accountname">开户人名称</div>
 					</li>
-					<li ng-if="installmentId">
-						<label class="check-act">
+					<li ng-if="$$bankTransfer.installmentId">
+						<label class="check-act" ng-click="selectPaymentType('PAIDTOVENDOR')">
 							<input type="radio" id="3" name="name" value="3" ng-checked="type == 'PAIDTOVENDOR'"/>
 							<label for="3"></label>
 							<em>付款给卖家</em>
@@ -53,87 +56,47 @@
 								间接导致的损失,由用户自己承担。
 							</div>
 						</div>
-						<div>中国银行</div>
-						<div>125963528469526354</div>
-						<div>开户人名称</div>
+						<div ng-bind="salePerAccount.bankname">中国银行</div>
+						<div ng-bind="salePerAccount.number">125963528469526354</div>
+						<div ng-bind="salePerAccount.accountname">开户人名称</div>
 					</li>
 				</ul>
 			</div>
-			<div class="common-title margin-top-8" ng-if="installmentId">分期付款明细</div>
-			<div class="payment-detail" ng-if="installmentId">
+			<div class="common-title margin-top-8" ng-if="type == 'PAIDTOVENDOR'">分期付款明细</div>
+			<div class="payment-detail" ng-if="type == 'PAIDTOVENDOR'">
 				<ul>
-					<li>
-						<span>第一期</span>
-						<span>¥452965852</span>
-						<span>要求付款日期  2018-08-24</span>
-						<em><img src="static/img/icon/pay-ok-icon.png"/></em>
-					</li>
-					<li>
-						<span>第一期</span>
-						<span>¥452965852</span>
-						<span>要求付款日期  2018-08-24</span>
-						<em><img src="static/img/icon/pay-ok-icon.png"/></em>
-					</li>
-					<li>
-						<span>第一期</span>
-						<span>¥452965852</span>
-						<span>要求付款日期  2018-08-24</span>
+					<li ng-repeat="installmentDetail in installmentData.installmentDetails">
+						<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>
 					</li>
 				</ul>
 			</div>
 			<div class="common-title margin-top-8">水单扫描件</div>
-			<div class="payment-upload-list" ng-if="installmentId">
-				<div class="item">
-					<div class="img-list">
-						<div class="prev"><i class="fa fa-angle-left"></i></div>
-						<div class="img">
-							<div class="number"><em>第一期</em></div>
-							<div class="list">
-								<span><img src="static/img/icon/img.png" /></span>
-								<div class="hover-show">
-									<!-- 图片预览 -->
-									<a ng-click=""><i class="fa fa-search"></i>查看</a>
-								</div>
-							</div>
-						</div>
-						<div class="next"><i class="fa fa-angle-right"></i></div>
-					</div>
-					<div class="small-img">
-						<span class="active"><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-					</div>
-					<div class="price-input"><input type="text" class="form-control" value="¥ 426956"/></div>
-					<div class="time">2017-08-24 14:56:20</div>
-				</div>
-				<div class="item">
+			<div class="payment-upload-list" ng-if="type == 'PAIDTOVENDOR' && installmentDetails.installmentImages">
+				<div class="item" ng-repeat="installmentImg in installmentDetails">
 					<div class="img-list">
-						<div class="prev"><i class="fa fa-angle-left"></i></div>
+						<div class="prev" ng-click="changePrev(installmentImg)"><i class="fa fa-angle-left"></i></div>
 						<div class="img">
-							<div class="number"><em>第期</em></div>
-							<div class="list">
-								<span><img src="static/img/icon/img.png" /></span>
+							<div class="number"><em>第{{numArray[$index+1]}}期</em></div>
+							<div class="list" ng-repeat="img in installmentImg.installmentImages track by $index" ng-if="installmentImg.imgIndex == $index">
+								<span><img ng-src="{{img}}"/></span>
 								<div class="hover-show">
 									<!-- 图片预览 -->
-									<a ng-click=""><i class="fa fa-search"></i>查看</a>
+									<a ng-click="showImg(img)"><i class="fa fa-search"></i>查看</a>
 								</div>
 							</div>
 						</div>
-						<div class="next"><i class="fa fa-angle-right"></i></div>
+						<div class="next" ng-click="changeNext(installmentImg, $index)"><i class="fa fa-angle-right"></i></div>
 					</div>
 					<div class="small-img">
-						<span class="active"><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
-						<span><img src="static/img/icon/payment-upload.png" /></span>
+						<span ng-class="{'active': installmentImg.imgIndex == $index}" ng-repeat="img in installmentImg.installmentImages track by $index">
+							<img ng-src="{{img}}" ng-click="changeImg(installmentImg )"/>
+						</span>
 					</div>
-					<div class="price-input"><input type="text" class="form-control" value="¥ 426956"/></div>
-					<div class="time">2017-08-24 14:56:20</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>
 			</div>
 			<div class="payment-upload">
@@ -148,12 +111,12 @@
 								<a ng-click="showImg(images.imageUrl)"><i class="fa fa-search"></i>查看</a>
 							</div>
 						</div>
-						<div class="price" ng-if="installmentId">
+						<div class="price" ng-if="type == 'PAIDTOVENDOR'">
 							<em>$</em>
 							<input type="text" class="form-control"  placeholder="请输入金额"/>
 						</div>
 					</li>
-					<li ng-click="addUploadImg()" ng-if="imagesList.length < 6">
+					<li ng-click="addUploadImg()" ng-if="imagesList.length < 6 && $$bankTransfer.installmentId">
 						<div class="upload">
 							<div class="img">
 								<img src="static/img/icon/payment-add.png">
@@ -167,9 +130,9 @@
 		<div class="pay-price">
 			<div class="stage row">
 				<div class="content">
-					<p ng-if="installmentId"><span>已支付:</span><em>¥500</em></p>
-					<p ng-if="installmentId"><span>待支付:</span><em class="bule">¥513131.32</em></p>
-					<p class="total"><span>总价:</span><em class="red">{{$$bankTransfer.total | number : 2 | currencySysmbol : $$bankTransfer.currency}}</em></p>
+					<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 class="total"><span>总价:</span><em class="red">{{$$bankTransfer.total | formateNumber : 2 | currencySysmbol : $$bankTransfer.currency}}</em></p>
 				</div>
 			</div>
 			<div class="row" style="margin-top: 0;">

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/purchase_detail.html

@@ -673,7 +673,7 @@
 									   min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
 									   ng-click="openDatePicker($event, item, 'deadlineShow')"
 									   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-									   ng-change="changeEndDate()" ng-blur="changeBlurDeadline(item, $index+1)"
+									   ng-change="changeEndDate(item)" ng-blur="changeBlurDeadline(item, $index+1)"
 								/>
 								<button class="open" ng-click="openDatePicker($event, item, 'deadlineShow')"></button>
 							</span>

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

@@ -696,6 +696,7 @@
 		color: #f00;
 		max-width: 105px;
 		text-align: left;
+		min-width: 60px;
 	}
 	.pay .content ul li div.status{
 		color: #5078cb;
@@ -905,44 +906,26 @@
                                 <a class="operate-height">
 									<em ng-bind="purchase.status | VendorStatusFilter">待买家付款</em>
 									<!--分期付款-->
-								  <div class="ship-btn seller-ship-tip" style="position: absolute;right: -15px;top: -1px;">
+								  <div class="ship-btn seller-ship-tip" style="position: absolute;right: -15px;top: -1px;" ng-if="purchase.installment.status != 505 && purchase.installmentId">
                                      <img src="static/img/common/notice-tip.png"/>
                                   </div>
                                   <div class="pay ship-content ship-notify">
                                       <div class="arrow"></div>
                                       <div class="content">
 										  <div class="title">货款共计
-											  <em>¥9000</em>
+											  <em ng-bind="purchase.installment.price | currencySysmbol : detail.currencyName">¥9000</em>
 											  &nbsp;&nbsp;&nbsp;&nbsp;分
-											  <em style="color: #5078cb;">5</em> 期
+											  <em style="color: #5078cb;" ng-bind="purchase.installment.count">5</em> 期
 										  </div>
 										  <ul>
-											  <li>
-												  <em>1</em>
-												  <div class="color333 price">¥13131</div>
-												  <div class="color999 time">2017-15-12前</div>
-												  <div class="color333 status">已付</div>
-											  </li>
-											  <li>
-												  <em>2</em>
-												  <div class="color333 price">¥13131</div>
-												  <div class="color999 time">2017-15-12前</div>
-												  <div class="color333 status">已付</div>
-											  </li>
-											  <li>
-												  <em>3</em>
-												  <div class="price">¥13131</div>
-												  <div class="time">2017-15-12前</div>
-												  <div class="status">代付</div>
-											  </li>
-											  <li>
-												  <em>4</em>
-												  <div class="price">¥13131</div>
-												  <div class="time">2017-15-12前</div>
-												  <div class="status">代付</div>
+											  <li ng-repeat="item in purchase.installment.installmentDetails">
+												  <em ng-bind="$index+1">1</em>
+												  <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>
 											  </li>
 									  </ul>
-										<div class="tip-01"><em class="red">*</em> 若第一期款项逾期未付,卖家有权利取消订单</div>
 									 </div>
                                   </div><br/>
 								</a>
@@ -953,6 +936,8 @@
                         </span>
 						<span class="click_shop">
                             <div ng-if="$index == 0">
+								<!--确认收款-->
+								<a class="order-operation" href="javascript:void(0)" ng-if="purchase.installmentDetailPaid" ng-click="confirmPayment(purchase,purchase.purchaseid)">确认收款</a>
                                 <a class="order-operation" href="javascript:void(0)" ng-if="(purchase.status == 502 || purchase.status == 406)&&(purchase.uasPurcid == null)" ng-click="toBeShiped(purchase)">点击发货</a>
 								<a ng-if="purchase.uasPurcid" style="text-decoration: none;color: #323232;">来源UAS</a>
                                 <a class="order-operation" href="javascript:void(0)" ng-if="purchase.status == 404 && purchase.lgtId&&!purchase.uasPurcid" ng-click="toBeShiped(purchase)" style="position: relative;">修改物流</a>
@@ -1020,44 +1005,41 @@
 	</div>-->
 </div>
 <!--确认收款-->
-<div class="confirm-Payment-box">
-	<div class="head"><a ng-click="">&times;</a></div>
+<div class="confirm-Payment-box" ng-if="confirmPaymentBox">
+	<div class="head"><a ng-click="cancelPayment()">&times;</a></div>
 	<div class="content">
 		<div class="title">
 			<i class="fa fa-exclamation-circle"></i>
-			买家于2017-02-03 13:14:20上传新单据,<br/>
-			&nbsp;&nbsp;&nbsp;&nbsp;合计支付金额 <em>¥452658.12</em>
+			买家于{{installmentDetailsList.paidDate | date: 'yyyy-MM-dd HH:mm:ss'}}上传新单据,<br/>
+			&nbsp;&nbsp;&nbsp;&nbsp;合计支付金额 <em ng-bind="installmentDetailsList.price | formateNumber : 2 | currencySysmbol : currencyNAME">¥452658.12</em>
 		</div>
 		<div class="payment-upload-list">
 			<div class="item">
 				<div class="img-list">
-					<div class="prev"><i class="fa fa-angle-left"></i></div>
+					<div class="prev" ng-click="changePrev(changeList)"><i class="fa fa-angle-left"></i></div>
 					<div class="img">
-						<div class="number"><em>第期</em></div>
-						<div class="list">
-							<span><img src="static/img/icon/img.png" /></span>
+						<div class="number"><em>第{{numArray[$index+1]}}期</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">
 								<!-- 图片预览 -->
-								<a ng-click=""><i class="fa fa-search"></i>查看</a>
+								<a ng-click="showImg(img)"><i class="fa fa-search"></i>查看</a>
 							</div>
 						</div>
 					</div>
-					<div class="next"><i class="fa fa-angle-right"></i></div>
+					<div class="next" ng-click="changeNext(changeList, $index)"><i class="fa fa-angle-right"></i></div>
 				</div>
 				<div class="small-img">
-					<span class="active"><img src="static/img/icon/payment-upload.png" /></span>
-					<span><img src="static/img/icon/payment-upload.png" /></span>
-					<span><img src="static/img/icon/payment-upload.png" /></span>
-					<span><img src="static/img/icon/payment-upload.png" /></span>
-					<span><img src="static/img/icon/payment-upload.png" /></span>
-					<span><img src="static/img/icon/payment-upload.png" /></span>
+						<span ng-class="{'active':imgIndex == $index}" ng-repeat="img in changeList track by $index">
+							<img ng-src="{{img}}" ng-click="changeImg(changeList, $index)"/>
+						</span>
 				</div>
 			</div>
 		</div>
 		<div class="tip"><em>*</em> 若未收到货款,请勿点击【确认收款】</div>
 		<div class="deal-btn-box">
-			<button class="off">取消</button>
-			<button class="ok">确认收款</button>
+			<button class="off" ng-click="cancelPayment()">取消</button>
+			<button class="ok" ng-click="confirmPaymentOk()">确认收款</button>
 		</div>
 	</div>
 </div>