AccountOrderCheckingRefundService.js 2.2 KB
"use strict";
var AccountOrderCheckingRefundService = angular.module('AccountOrderCheckingRefundService',[]);

AccountOrderCheckingRefundService.service("AccountOrderCheckingRefundService", [
    '$rootScope',
    'BaseService',
    function ($rootScope,BaseService) {
        var _service = {
            refundOrders:[],
            refundOrdersDetailBean:[],
            refundRecode:[],
            //获取退单列表
            orderPagerList:function(queryParam){
                BaseService.request({
                    url:BaseService.url.accountOrder_refund_url,
                    method:'post',
                    mark:true,
                    data:queryParam,
                    fn:function(response) {
                        if(response.code == 0) {
                            _service.refundOrders = response.data;
                            $rootScope.$broadcast('refundOrders.list');
                        }
                    }
                });
            },
            //获取退单详情
            refundOrderDetail:function(refundId){
                BaseService.request({
                    url:BaseService.url.accountOrder_refund_detail_url+refundId,
                    method:'GET',
                    mark:true,
                    fn:function(response) {
                        if(response.code == 0) {
                            _service.refundOrdersDetailBean = response.data;
                            $rootScope.$broadcast('refundOrders.detail');
                        }
                    }
                });
            },
            //获取订单基本信息
            orderDetail:function(orderCode){
                BaseService.request({
                    url:BaseService.url.accountOrder_detail_url+orderCode,
                    method:'POST',
                    mark:true,
                    fn:function(response) {
                        if(response.code == 0) {
                            _service.orderDetailBean = response.data;
                            $rootScope.$broadcast('orders.detail');
                        }
                    }
                });
            },
        };
        return _service;
    }]);