AccountOrderCheckingRefundController.js
3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"use strict";
var AccountOrderCheckingRefundController = angular.module('AccountOrderCheckingRefundController',[]);
//退单列表
AccountOrderCheckingRefundController.controller('AccountOrderCheckingRefundController', [
'$rootScope',
'$scope',
'AccountOrderCheckingRefundService',
function($rootScope, $scope, AccountOrderCheckingRefundService) {
var orderCheckingId=$rootScope.$stateParams.orderCheckingId;
$scope.currentPage = 1;
$scope.refundOrders=[];
$scope.refundOrderQuery={
pageNow:$scope.currentPage,
pageSize:20,
refundStatus:'',
refundType:'',
startCreateDt:'',
endCreateDt:'',
refundCode:'',
orderCode:'',
orderCheckingId:orderCheckingId
};
//获取退款订单列表
AccountOrderCheckingRefundService.orderPagerList($scope.refundOrderQuery);
$scope.$on('refundOrders.list', function(){
$scope.refundOrders = AccountOrderCheckingRefundService.refundOrders.datas;
$scope.numPages = AccountOrderCheckingRefundService.refundOrders.totalPage;
$scope.totalRecord = AccountOrderCheckingRefundService.refundOrders.totalRecord;
});
//选当前页
$scope.onSelectPage = function(page) {
$scope.refundOrderQuery.pageNow=page;
$scope.currentPage=page;
AccountOrderCheckingRefundService.orderPagerList($scope.refundOrderQuery);
};
//搜索退款订单
$scope.searchOrder=function(){
$scope.refundOrderQuery.pageNow=1;
$scope.refundOrderQuery.startCreateDt = $('#receiveStartDate').val();
$scope.refundOrderQuery.endCreateDt = $('#receiveEndDate').val();
AccountOrderCheckingRefundService.orderPagerList($scope.refundOrderQuery);
};
//导出退款订单
$scope.exportOrderRefundExcel=function() {
window.open("../template/exportOrderCheckingRefundExcel?refundStatus="+$scope.refundOrderQuery.refundStatus+
"&refundType="+$scope.refundOrderQuery.refundType+
"&orderCheckingId="+orderCheckingId+
"&refundCode="+$scope.refundOrderQuery.refundCode+"&orderCode="+$scope.refundOrderQuery.orderCode+
"&startCreateDt="+$scope.refundOrderQuery.startCreateDt+"&endCreateDt="+$scope.refundOrderQuery.endCreateDt);
};
}
]);
//退单详情
AccountOrderCheckingRefundController.controller("AccountOrderCheckingRefundDetailController",[
'$state',
'$rootScope',
'$scope',
'OrderService',
'RefundOrderService',
'AccountOrderCheckingRefundService',
function($state,$rootScope, $scope, OrderService,RefundOrderService,AccountOrderCheckingRefundService) {
var orderCode=$rootScope.$stateParams.orderCode;
var refundId=$rootScope.$stateParams.refundId;
$scope.refundOrderImageGoods=[];
$scope.refundOrderItems=[];
$scope.type=$rootScope.$stateParams.type;
//退款单详情&&退货商品
AccountOrderCheckingRefundService.refundOrderDetail(refundId);
$scope.$on('refundOrders.detail', function(){
$scope.refundOrderDetail = AccountOrderCheckingRefundService.refundOrdersDetailBean;
$scope.refundOrderItems=$scope.refundOrderDetail.accountOrderCheckingRefundDetailList;
});
//订单基本信息
OrderService.orderDetail(orderCode);
$scope.$on('orders.detail', function(){
$scope.orderDetailBean = OrderService.orderDetailBean;
});
//获取退款退货凭证
RefundOrderService.listRefundOrderImageByGoods(refundId,0);
$scope.$on('refundOrderImageGoods.list', function(){
$scope.refundOrderImageGoods = RefundOrderService.refundOrderImageGoods;
});
}
]);