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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910
"use strict";
var AngularApp = angular.module('OrangeApp',[
	'ui.router',
	// 'ngKeditor',
	'ServiceModule',
	'DirectiveModule',
	'ControllerModule'
]);
AngularApp.run([
   	'$rootScope',
   	'$state',
   	'$stateParams',
   	function($rootScope,$state,$stateParams, $scope) {
   		$rootScope.$state = $state;
   		$rootScope.$stateParams = $stateParams;
   		$rootScope.goback=function(){
   			window.history.go(-1);
   		}
   	}
]);
AngularApp.config([
  	'$stateProvider',
  	'$urlRouterProvider',
  	'$httpProvider',
  	function($stateProvider,$urlRouterProvider,$httpProvider){
  	    $stateProvider
  		    .state('main', {
  		        url: '/main',	
  		    	  cache:false,			
  		        templateUrl: 'html/main.html'
  		    })
  		    .state('directCoupon', {
  		    	url: '/directCoupon',
  		    	cache:false,			
		        templateUrl: 'html/coupon/indexDirect.html',
		        controller:'directCouponController'
  		    })
            .state('addDirectCoupon', {
                url: '/addDirectCoupon/{couponId}',
                cache:false,
                templateUrl: 'html/coupon/addDirectCoupon.html',
                controller:'addDirectCouponController'
            })

            .state('fullCutCoupon', {
                url: '/fullCutCoupon',
                cache:false,
                templateUrl: 'html/coupon/indexFullCut.html',
                controller:'fullCutCouponController'
            })
            .state('addFullCutCoupon', {
                url: '/addFullCutCoupon/{couponId}',
                cache:false,
                templateUrl: 'html/coupon/addFullCutCoupon.html',
                controller:'addFullCutCouponController'
            })
            .state('fullCutLimitCoupon', {
                url: '/fullCutLimitCoupon/{couponId}/{fullMoney}/{cutMoney}',
                cache:false,
                templateUrl: 'html/coupon/fullCutLimit.html',
                controller:'fullCutLimitCouponController'
            })
            .state('addFullCutLimitCoupon', {
                url: '/addFullCutLimitCoupon/{couponId}',
                cache:false,
                templateUrl: 'html/coupon/addFullCutCouponLimit.html',
                controller:'addFullCutLimitCouponController'
            })
            .state('userCoupon', {
                url: '/userCoupon',
                cache:false,
                templateUrl: 'html/coupon/userCoupon.html',
                controller:'userCouponController'
            })
            .state('supplierCoupon', {
                url: '/supplierCoupon',
                cache:false,
                templateUrl: 'html/coupon/supplierCoupon.html',
                controller:'supplierUserCouponController'
            })
            .state('supplierCouponDetail', {
                url: '/supplierCouponDetail/{supplierId}',
                cache:false,
                templateUrl: 'html/coupon/supplierCouponDetail.html',
                controller:'supplierUserCouponDetailController'
            })
          	.state('advert', {
  		    	url: '/advert',	
  		    	cache:false,			
		        templateUrl: 'html/advert/index.html',
		        controller:'advertController'
  		    })
  		    .state('addAdvert', {
  		    	url: '/addAdvert/{advertId}',	
  		    	cache:false,			
		        templateUrl: 'html/advert/addAdvert.html',
		        controller:'addAdvertController'
  		    })
  		    .state('category', {
  		    	url: '/category',	
  		    	cache:false,			
		        templateUrl: 'html/category/index.html',
		        controller:'categoryControllerList'
  		    })
  		    .state('addCategory', {
  		    	url: '/addCategory/{categoryId}',	
  		    	cache:false,			
		        templateUrl: 'html/category/addCategory.html',
		        controller:'addCategoryController'
  		    })
  		    .state('editCategory', {
  		    	url: '/editCategory/{categoryId}/{parentId}',	
  		    	cache:false,			
		        templateUrl: 'html/category/editCategory.html',
		        controller:'editCategoryController'
  		    })
			.state('deleteCategory', {
				url: '/deleteCategory/{categoryId}/{categoryType}',
				cache:false,
				templateUrl: 'html/category/deleteCategoryByProduct.html',
				controller:'deleteCategoryController'
			})
  		    .state('campgaignCategory', {
  		    	url: '/campgaignCategory',	
  		    	cache:false,			
		        templateUrl: 'html/category/campaignCategoryIndex.html',
		        controller:'campaginCategoryController'
  		    })
  		    .state('addCampgaignCategory', {
  		    	url: '/addCampgaignCategory/{categoryId}',	
  		    	cache:false,			
		        templateUrl: 'html/category/addCampaignCategory.html',
		        controller:'addCampaginCategoryController'
  		    })
            .state('addCampgaignProduct', {
                url: '/addCampgaignProduct/{campaginId}',
                cache:false,
                templateUrl: 'html/category/products.html',
                controller:'addCampaginProductController'
            })
            .state('listCampgaignProduct', {
                url: '/listCampgaignProduct/{campaginId}/{campaginType}',
                cache:false,
                templateUrl: 'html/category/listCampaginProduct.html',
                controller:'listCampaginProductController'
            })
  		    .state('product', {
  		    	url: '/product/{isGroup}',	
  		    	cache:false,			
		        templateUrl: 'html/product/index.html?v=0.0.1',
		        controller:'productController'
  		    })
			.state('productByMoney', {
				url: '/productByMoney/{isGroup}',
				cache:false,
				templateUrl: 'html/product/indexByMoney.html?v=0.0.1',
				controller:'productController'
			})
  		    .state('addProduct', {
  		    	url: '/addProduct/{productId}/{type}',	
  		    	cache:true,			
		        templateUrl: 'html/product/addProduct.html?v=0.0.1',
		        controller:'addProductController'
  		    })
			.state('addProductByMoney', {
				url: '/addProductByMoney/{productId}/{type}',
				cache:true,
				templateUrl: 'html/product/addProductByMoney.html?v=0.0.1',
				controller:'addProductController'
			})
  		    .state('groupProduct', {
  		    	url: '/groupProduct/{productId}/{type}',	
  		    	cache:true,			
		        templateUrl: 'html/product/groupProduct.html?v=0.0.1',
		        controller:'addProductController'
  		    })
  		    .state('addJointProduct', {
  		    	url: '/addJointProduct/{productId}/{productType}/{oneCategoryId}',
  		    	cache:true,			
		        templateUrl: 'html/product/addJointProduct.html?v=0.0.1',
		        controller:'addJointProductController'
  		    })
  		    .state('productStock', {
  		    	url: '/productStock',	
  		    	cache:true,			
		        templateUrl: 'html/product/productStock.html',
		        controller:'productStockController'
  		    })
  		    .state('productEntry', {
  		    	url: '/productEntry',	
  		    	cache:true,			
		        templateUrl: 'html/product/productEntry.html',
		        controller:'productEntryController'
  		    })
  		    .state('productConfigure', {
  		    	url: '/productConfigure',	
  		    	cache:true,			
		        templateUrl: 'html/product/productConfigure.html',
		        controller:'productConfigureController'
  		    })
  		    .state('groupProductIndex', {
  		    	url: '/groupProductIndex/{isGroup}',	
  		    	cache:true,			
		        templateUrl: 'html/product/groupProductIndex.html',
		        controller:'productController'
  		    })
  		    .state('orderPager', {
  		    	url: '/orderPager/{orderFrom}/{orderStatus}',	
  		    	cache:false,			
		        templateUrl: 'html/order/index.html',
		        controller:'orderControllerPage'
  		    })
  		    .state('orderErrorPager', {
  		    	url: '/orderErrorPager/{orderFrom}/{orderStatus}',	
  		    	cache:false,			
		        templateUrl: 'html/order/errorOrders.html',
		        controller:'orderErrorControllerPage'
  		    })
  		   .state('verifyOrder', {
  		    	url: '/verifyOrder/{orderFrom}/{orderStatus}',	
  		    	cache:false,			
		        templateUrl: 'html/order/verifyOrder.html',
		        controller:'orderControllerPage'
  		    })
  		     .state('deliverOrder', {
  		    	url: '/deliverOrder/{orderFrom}/{orderStatus}/{erpImport}',	
  		    	cache:false,			
		        templateUrl: 'html/order/orderExpress.html',
		        controller:'orderControllerPage'
  		    })
            .state('excelExpress', {
                url: '/excelExpress',
                cache:false,
                templateUrl: 'html/order/excelExpress.html',
                controller:'excelExpressController'
            })
  		     .state('orderDetail', {
  		    	url: '/orderDetail/{orderCode}/{orderFrom}',	
  		    	cache:false,			
		        templateUrl: 'html/order/orderDetail.html',
		        controller:'orderDetailController'
  		    })
            .state('orderDetailById', {
                url: '/orderDetailById/{memberId}/{orderId}',
                cache:false,
                templateUrl: 'html/order/orderDetail.html',
                controller:'orderDetailByIdController'
            })
			.state('statisticsProduct', {
  		    	url: '/statisticsProduct',	
  		    	cache:false,			
		        templateUrl: 'html/stat/product.html',
		        controller:'statisticsController'
  		    })
            .state('statisticsStoreProductChart', {
                url: '/statisticsStoreProductChart',
                cache:false,
                templateUrl: 'html/stat/storeProductChart.html',
                controller:'StatisticsStoreProductController'
            })
  		     .state('productComments', {
  		    	url: '/productComments',
  		    	cache:false,
		        templateUrl: 'html/stat/productComment.html',
		        controller:'prodcutCommentController'
  		    })
            .state('productCommentsStat', {
                url: '/productCommentsStat',
                cache:false,
                templateUrl: 'html/stat/productCommentStat.html',
                controller:'prodcutCommentStatController'
            })
            .state('productStoreComments', {
                url: '/productStoreComments',
                cache:false,
                templateUrl: 'html/stat/productStoreComment.html',
                controller:'ProductStoreCommentController'
            })
  		     .state('statisticsProductList', {
  		    	url: '/statisticsProductList',	
  		    	cache:false,			
		        templateUrl: 'html/stat/productList.html',
		        controller:'statisticsListController'
  		    })
            .state('statisticsStoreProductList', {
                url: '/statisticsStoreProductList',
                cache:false,
                templateUrl: 'html/stat/storeProductList.html',
                controller:'StatisticsStoreProductListController'
            })
  		    .state('refundGoods', {   //退款/退货列表
  		    	url: '/refundGoods/{type}/{refundOrderStatus}',
  		    	cache:false,			
		        templateUrl: 'html/order/refundOrder.html',
		        controller:'refundOrderController'
  		    })
  		    .state('refundOrderDetail', {
  		    	url: '/refundOrderDetail/{orderCode}/{refundId}/{type}',	
  		    	cache:false,			
		        templateUrl: 'html/order/refundOrderDetail.html',
		        controller:'refundOrderDetailController'
  		    })
  		    .state('orderStatistics', {
  		    	url: '/orderStatistics',	
  		    	cache:false,			
		        templateUrl: 'html/stat/orderStatictis.html',
		        controller:'orderStatisticsController'
  		    })
  		    .state('financeReport', {
  		    	url: '/financeReport/{orderFrom}',	
  		    	cache:false,			
		        templateUrl: 'html/order/financeReport.html',
		        controller:'financeReportControllerPage'
  		    })
  		    .state('hotelList', {
  		    	url: '/hotelList',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/list.html',
		        controller:'hotelController'
  		    })
  		    .state('hotelDetail', {
  		    	url: '/hotelDetail/{id}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/hotel.html',
		        controller:'hotelDetailController'
  		    })
  		    .state('addHotel', {
  		    	url: '/addHotel',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/hotel.html',
		        controller:'hotelDetailController'
  		    })
  		    .state('roomList', {
  		    	url: '/roomList/{hotelId}/{hotelName}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/roomList.html',
		        controller:'roomListController'
  		    })
  		    .state('roomDetail', {
  		    	url: '/roomDetail/{roomId}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/room.html',
		        controller:'roomDetailController'
  		    })
  		    .state('addRoom', {
  		    	url: '/addRoom/{hotelId}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/room.html',
		        controller:'roomDetailController'
  		    })
  		    .state('roomStock', {
  		    	url: '/roomStock/{roomId}/{roomName}',
  		    	cache:false,			
		        templateUrl: 'html/hotel/roomStock.html',
		        controller:'roomStockController'
  		    })
  		    .state('hotelorderList', {
  		    	url: '/hotelOrderList/{orderType}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/orderList.html',
		        controller:'hotelOrderController'
  		    })
  		    .state('hotelRefundOrderList', {
  		    	url: '/hotelRefundOrderList',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/refundOrderList.html',
		        controller:'hotelRefundOrderController'
  		    })
  		    .state('hotelorderDetail', {
  		    	url: '/hotelorderDetail/{orderId}',	
  		    	cache:false,			
		        templateUrl: 'html/hotel/orderDetail.html',
		        controller:'hotelOrderDetailController'
  		    })
  		    .state('verifyHotelOrder', {
  		    	url: '/verifyHotelOrder/{orderType}/{orderStatus}',
  		    	cache:false,
		        templateUrl: 'html/hotel/verifyOrder.html',
		        controller:'hotelOrderController'
  		    })
  		    .state('refundGoodsHandle', {    //  退款/退货处理
  		    	url: '/refundGoodsHandle',
  		    	cache:false,			
		        templateUrl: 'html/order/orderHandleDetail.html',
		        controller:'orderHandleControllerPage'
  		    })
  		     .state('attrList', {
  		    	url: '/attrList/{categoryId}/{categoryName}',	
  		    	cache:false,			
		        templateUrl: 'html/category/attrList.html',
		        controller:'categoryAttrController'
  		    })
  		    .state('attrDetail', {
  		    	url: '/attrDetail/{attrId}',	
  		    	cache:false,			
		        templateUrl: 'html/category/attr.html',
		        controller:'attrDetailController'
  		    })
  		    .state('addAttr', {
  		    	url: '/addAttr/{categoryId}',	
  		    	cache:false,			
		        templateUrl: 'html/category/attr.html',
		        controller:'attrDetailController'
  		    })
  		    .state('productSpec', {
  		    	url: '/productSpec/{categoryId}/{productId}',
  		    	cache:false,			
		        templateUrl: 'html/product/addProductSpec.html',
		        controller:'productSpecController'
  		    })
			.state('commodityReviewSpec', {
				url: '/commodityReviewSpec/{categoryId}/{productId}',
				cache:false,
				templateUrl: 'html/product/commodityReviewSpec.html',
				controller:'commodityReviewSpecController'
			})
  		    .state('hotelIndex', {
  		    	url: '/hotelIndex',	
  		    	cache:false,			
		        templateUrl: 'html/hoteladmin/index.html',
		        controller:'hotelController'
  		    })
  		     .state('roomListAdmin', {
  		    	url: '/roomListAdmin/{hotelId}/{hotelName}',	
  		    	cache:false,			
		        templateUrl: 'html/hoteladmin/roomList.html',
		        controller:'roomListController'
  		    })
  		     .state('roomStockAdmin', {
  		    	url: '/roomStockAdmin/{roomId}/{roomName}',
  		    	cache:false,			
		        templateUrl: 'html/hoteladmin/roomStock.html',
		        controller:'roomStockController'
  		    })
  		     .state('hotelorderDetailAdmin', {
  		    	url: '/hotelorderDetailAdmin/{orderId}',	
  		    	cache:false,			
		        templateUrl: 'html/hoteladmin/orderDetail.html',
		        controller:'hotelOrderDetailController'
  		    })
  		    .state('hotelorderListAdmin', {
  		    	url: '/hotelOrderListAdmin/{orderType}',	
  		    	cache:false,			
		        templateUrl: 'html/hoteladmin/orderList.html',
		        controller:'hotelOrderController'
  		    })
  		    .state('promotionRule', {
  		    	url: '/promotionRule',
  		    	cache:false,
		        templateUrl: 'html/promotion/promotionRule.html',
		        controller:'promotionController'
  		    })
  		    .state('addPromotion', {
  		    	url: '/addPromotion/{promotionId}/{type}',
  		    	cache:false,
		        templateUrl: 'html/promotion/addPromotionRule.html',
		        controller:'addPromotionRuleController'
  		    })
  		    .state('productGift', {
  		    	url: '/productGift/{promotionId}/{type}',
  		    	cache:false,
		        templateUrl: 'html/promotion/promotionProductGift.html',
		        controller:'promotionProductGiftController'
  		    })
  		    .state('moneyGift', {
  		    	url: '/moneyGift/{promotionId}/{type}',
  		    	cache:false,
		        templateUrl: 'html/promotion/promotionMoneyGift.html',
		        controller:'promotionMoneyGiftController'
  		    })
  		    .state('addProductGift', {
  		    	url: '/addProductGift/{promotionId}',
  		    	cache:false,
		        templateUrl: 'html/promotion/addProductGift.html',
		        controller:'addProductGiftController'
  		    })
  		    .state('addMoneyGift', {
  		    	url: '/addMoneyGift/{promotionId}',
  		    	cache:false,
		        templateUrl: 'html/promotion/addMoneyGift.html',
		        controller:'addMoneyGiftController'
  		    })
  		    .state('menuList', {
  		    	url: '/menuList',
  		    	cache:false,
		        templateUrl: 'html/sys/sys_resource.html',
		        controller:'sysResourceController'
  		    })
  		    .state('roleManager', {
  		    	url: '/roleManager',
  		    	cache:false,
		        templateUrl: 'html/sys/sys_role.html',
		        controller:'sysRoleController'
  		    })
  		    .state('addSysRole', {
  		    	url: '/addSysRole/{id}',
  		    	cache:false,
		        templateUrl: 'html/sys/add_sys_role.html',
		        controller:'sysRoleController'
  		    })
  		    .state('allocationSysRole', {
  		    	url: '/allocationSysRole/{id}',
  		    	cache:false,
		        templateUrl: 'html/sys/allocation_sys_role.html',
		        controller:'allocationSysRoleController'
  		    })
  		    .state('userManager', {
  		    	url: '/userManager',
  		    	cache:false,
		        templateUrl: 'html/sys/sys_user.html',
		        controller:'sysUserController'
  		    })
  		    .state('addSysUser', {
  		    	url: '/addSysUser/{id}',
  		    	cache:false,
		        templateUrl: 'html/sys/add_sys_user.html',
		        controller:'addSysUserController'
  		    })
  		    .state('resetUserPassword', {
  		    	url: '/resetUserPassword/{id}',
  		    	cache:false,
		        templateUrl: 'html/sys/reset_user_password.html',
		        controller:'resetUserPasswordController'
  		    })
            .state('resetUserPasswordBySupplierController', {
                url: '/resetUserPasswordBySupplierController',
                cache:false,
                templateUrl: 'html/sys/reset_user_password.html',
                controller:'resetUserPasswordBySupplierController'
            })
  		    .state('logRecord', {
  		    	url: '/logRecord/{logType}',
  		    	cache:false,
		        templateUrl: 'html/log/logs.html',
		        controller:'logRecordController'
  		    })
			.state('productSearch', {
				url: '/productSearch',
				cache:false,
				templateUrl: 'html/stat/productSearch.html',
				controller:'productSearchController'
			})
			.state('memberShopcart', {
				url: '/memberShopcart',
				cache:false,
				templateUrl: 'html/stat/memberShopcart.html',
				controller:'memberShopcartController'
			})
			.state('refundAndReturnApplicationOrdinary', {
				url: '/refundAndReturnApplicationOrdinary/{operatorRole}/{refundStatus}/{refundType}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplicationOrdinary.html',
				controller:'refundAndReturnApplicationController'
			})
			.state('refundAndReturnApplicationDetailOrdinary', {
				url: '/refundAndReturnApplicationDetailOrdinary/{orderCode}/{refundId}/{operatorRole}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplicationDetailOrdinary.html',
				controller:'refundAndReturnApplicationDetailController'
			})
			.state('refundAndReturn', {
				url: '/refundAndReturn/{operatorRole}/{refundStatus}/{refundType}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplication.html',
				controller:'refundAndReturnController'
			})

			.state('refundAndReturnApplication', {
				url: '/refundAndReturnApplication/{operatorRole}/{refundStatus}/{refundType}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplication.html',
				controller:'refundAndReturnApplicationController'
			})
			.state('refundAndReturnApplicationDetail', {
				url: '/refundAndReturnApplicationDetail/{orderCode}/{refundId}/{operatorRole}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplicationDetail.html',
				controller:'refundAndReturnApplicationDetailController'
			})
			.state('listRefundProcedureRecordByRefundId', {
				url: '/listRefundProcedureRecordByRefundId/{refundId}',
				cache:true,
				templateUrl: 'html/order/refundScheduleQuery.html',
				controller:'listRefundProcedureRecordController'
			})
			.state('refundGoodsDetail', {
				url: '/refundGoodsDetail/{orderCode}/{orderFrom}',
				cache:false,
				templateUrl: 'html/order/refundGoodsDetail.html',
				controller:'refundGoodsDetailController'
			})
			/*.state('changeGoods', {
				url: '/changeGoods/{operatorRole}/{refundStatus}/{refundType}',
				cache:false,
				templateUrl: 'html/order/refundAndReturnApplication.html',
				controller:'refundAndReturnApplicationController'
			})*/
			.state('sendMessages', {
				url: '/sendMessages/{operationType}',
				cache:false,
				templateUrl: 'html/message/sendMessages.html',
				controller:'sendMessagesController'
			})
            .state('shareCoupon', {
                url: '/shareCoupon',
                cache:false,
                templateUrl: 'html/coupon/shareCoupon.html',
                controller:'shareCouponController'
            })
            .state('withdraw', {
                url: '/withdraw',
                cache:false,
                templateUrl: 'html/share/withdrawList.html',
                controller:'withdrawListController'
            })
			.state('listMember', {
				url: '/listMember',
				cache:false,
				templateUrl: 'html/member/listMember.html',
				controller:'memberController'
			})
			.state('memberDetail',{
				url: '/memberDetail/{id}',
				cache:false,
				templateUrl: 'html/member/editMember.html',
				controller:'memberDetailController'
			})
            .state('memberAudit',{
                url: '/memberAudit/{id}',
                cache:false,
                templateUrl: 'html/member/memberAudit.html',
                controller:'memberAuditController'
            })
            .state('withdrawDetail', {
                url: '/withdrawDetail/{memberId}',
                cache:false,
                templateUrl: 'html/share/withdrawDetailList.html',
                controller:'withdrawDetailListController'
            })
			.state('refundHistroy',{
				url: '/refundHistroy',
				cache:false,
				templateUrl: 'html/order/listRefundHistroy.html',
				controller:'refundHistroyController'
			})
			.state('shareRewardOrder',{
				url: '/shareRewardOrder',
				cache:false,
				templateUrl: 'html/sharingrewards/shareRewardOrder.html',
				controller:'shareRewardOrderController'
			})
			.state('presentRecord', {
				url: '/presentRecord',
				cache:false,
				templateUrl: 'html/sharingrewards/presentRecordList.html',
				controller:'presentRecordListController'
			})
			.state('sharingRewardStatementStatistics', {
				url: '/sharingRewardStatementStatistics',
				cache:false,
				templateUrl: 'html/sharingrewards/sharingRewardStatementStatistics.html',
				controller:'sharingRewardStatementStatisticsController'
			})
			.state('sharingRewardRankings', {
				url: '/sharingRewardRankings',
				cache:false,
				templateUrl: 'html/sharingrewards/sharingRewardRankings.html',
				controller:'sharingRewardRankingsController'
			})
			.state('listSupplier',{
				url: '/listSupplier',
				cache:false,
				templateUrl: 'html/supplier/listSupplier.html',
				controller:'supplierController'
			})
			.state('addSupplier',{
				url: '/addSupplier/{id}',
				cache:false,
				templateUrl: 'html/supplier/editSupplier.html',
				controller:'editSupplierController'
			})
			.state('listSupplierRefundAddress',{
				url: '/listSupplierRefundAddress/{supplierId}',
				cache:false,
				templateUrl: 'html/supplier/listSupplierRefundAddress.html',
				controller:'supplierRefundAddressController'
			})
			.state('addSupplierRefundAddress',{
				url: '/addSupplierRefundAddress/{supplierId}/{addressId}',
				cache:false,
				templateUrl: 'html/supplier/editSupplierRefundAddress.html',
				controller:'editSupplierRefundAddressController'
			})
			.state('supplierRelatedProducts',{
				url: '/supplierRelatedProducts/{supplierId}',
				cache:false,
				templateUrl: 'html/supplier/supplierRelatedProducts.html',
				controller:'supplierRelatedProductsController'
			})
			.state('addSupplierRelatedProduct',{
				url:'/addSupplierRelatedProduct/{supplierId}',
				cache:false,
				templateUrl: 'html/supplier/products.html',
				controller:'editSupplierRelatedProductsController'
			})
			.state('listSupplierRelatedProducts',{
				url:'/listSupplierRelatedProducts',
				cache:false,
				templateUrl: 'html/supplier/listSupplierRelatedProducts.html',
				controller:'listSupplierRelatedProductsController'
			})
			.state('listOfHotSellingProducts',{
				url:'/listOfHotSellingProducts',
				cache:false,
				templateUrl: 'html/hot/listOfHotSellingProducts.html',
				controller:'hotSellingProductsController'
			})
			.state('addHotProduct',{
				url:'/addHotProduct',
				cache:false,
				templateUrl: 'html/hot/addHotProduct.html',
				controller:'editHotSellingProductsController'
			})
			.state('listProductByCategory',{
				url:'/listProductByCategory/{categoryId}/{categoryType}',
				cache:false,
				templateUrl: 'html/category/listProductByCategory.html',
				controller:'deleteCategoryController'
			})
            .state('listStore',{
                url: '/listStore',
                cache:false,
                templateUrl: 'html/store/listStore.html',
                controller:'storeController'
            })
            .state('editStore',{
                url: '/editStore/{id}',
                cache:false,
                templateUrl: 'html/store/editStore.html',
                controller:'editStoreController'
            })
            .state('listStoreRefundAddress',{
                url: '/listStoreRefundAddress',
                cache:false,
                templateUrl: 'html/store/listStoreRefundAddress.html',
                controller:'storeRefundAddressController'
            })
            .state('addStoreRefundAddress',{
                url: '/addStoreRefundAddress/{addressId}',
                cache:false,
                templateUrl: 'html/store/editStoreRefundAddress.html',
                controller:'editStoreRefundAddressController'
            })
            .state('listStoreSaleStatistics',{
                url: '/listStoreSaleStatistics',
                cache:false,
                templateUrl: 'html/stat/storeSaleStatistics.html',
                controller:'StoreSaleStatisticsController'
            })
            .state('listSaleStatistics',{
                url: '/listSaleStatistics',
                cache:false,
                templateUrl: 'html/stat/saleStatistics.html',
                controller:'SaleStatisticsController'
            })
			.state('commodityReview', {
				url: '/commodityReview',
				cache:false,
				templateUrl: 'html/product/commodityReview.html?v=0.0.1',
				controller:'commodityReviewController'
			})
			.state('productDetail', {
				url: '/productDetail/{productId}/{type}',
				cache:true,
				templateUrl: 'html/product/productDetail.html?v=0.0.1',
				controller:'commodityReviewDetailController'
			})
            .state('accountOrderChecking', {
                url: '/accountOrderChecking',
                cache:false,
                templateUrl: 'html/account/accountOrderChecking.html',
                controller:'AccountOrderCheckingController'
            })
            .state('accountOrderCheckingDetail', {
                url: '/accountOrderCheckingDetail/{orderCheckingId}',
                cache:false,
                templateUrl: 'html/account/accountOrderCheckingDetail.html',
                controller:'AccountOrderCheckingDetailController'
            })
            .state('accountOrderCheckingContent', {
                url: '/accountOrderCheckingContent/{orderCode}/{orderFrom}',
                cache:false,
                templateUrl: 'html/account/accountOrderCheckingContent.html',
                controller:'AccountOrderCheckingContentController'
            })
            .state('accountOrderCheckingRefund', {
                url: '/accountOrderCheckingRefund/{orderCheckingId}',
                cache:false,
                templateUrl: 'html/account/accountOrderCheckingRefund.html',
                controller:'AccountOrderCheckingRefundController'
            })
            .state('accountOrderCheckingRefundDetail', {
                url: '/accountOrderCheckingRefundDetail/{refundId}/{orderCode}',
                cache:false,
                templateUrl: 'html/account/accountOrderCheckingRefundDetail.html',
                controller:'AccountOrderCheckingRefundDetailController'
            })
            .state('storeAccountOrderChecking', {
                url: '/storeAccountOrderChecking',
                cache:false,
                templateUrl: 'html/account/storeAccountOrderChecking.html',
                controller:'StoreAccountOrderCheckingController'
            })
            .state('importActualPaymentOrder', {
                url: '/importActualPaymentOrder',
                cache:false,
                templateUrl: 'html/account/importActualPaymentOrder.html',
                controller:'ImportActualPaymentOrderController'
            })
			.state('supplierProductCategoryProportion', {
				url: '/supplierProductCategoryProportion',
				cache:false,
				templateUrl: 'html/supplier/supplierProductCategoryProportion.html',
				controller:'supplierProductCategoryProportionController'
			})
			.state('editSupplierProductCategoryProportion', {
				url: '/editSupplierProductCategoryProportion/{id}',
				cache:false,
				templateUrl: 'html/supplier/editSupplierProductCategoryProportion.html',
				controller:'editSupplierProductCategoryProportionController'
			})
			.state('discountsProportionDetails', {
				url: '/discountsProportionDetails',
				cache:false,
				templateUrl: 'html/account/discountsProportionDetailList.html',
				controller:'discountsProportionController'
			})
			/*.state('editDiscountsProportion', {
				url: '/editDiscountsProportion/{id}',
				cache:false,
				templateUrl: 'html/account/editDiscountsProportion.html',
				controller:'editDiscountsProportionController'
			})*/
            .state('createAccountOrderChecking', {
                url: '/createAccountOrderChecking',
                cache:false,
                templateUrl: 'html/account/createAccountOrderChecking.html',
                controller:'createAccountOrderCheckingController'
            })
			.state('categoryBySeller', {
				url: '/categoryBySeller',
				cache:false,
				templateUrl: 'html/category/sellerIndex.html',
				controller:'sellerCategoryController'
			})
			.state('editSellerCategory', {
				url: '/editSellerCategory/{categoryId}/{parentId}',
				cache:false,
				templateUrl: 'html/category/editSellerCategory.html',
				controller:'editCategoryController'
			})
			.state('stockCacheRefresh', {
				url: '/stockCacheRefresh',
				cache:false,
				templateUrl: 'html/sys/sys_cache_refresh.html',
				controller:'CacheRefreshController'
			})
            .state('sellerAttrList', {
                url: '/sellerAttrList/{categoryId}/{categoryName}',
                cache:false,
                templateUrl: 'html/category/sellerAttrList.html',
                controller:'categoryAttrController'
            })
			;
  	    $urlRouterProvider.otherwise('/main');
  	    $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
	  	$httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
	  	var param = function(obj) {
			var query = '',
				name, value, fullSubName, subName, subValue, innerObj, i;

			for (name in obj) {
				value = obj[name];

				if (value instanceof Array) {
					for (i = 0; i < value.length; ++i) {
		 				subValue = value[i];
		 				fullSubName = name + '[' + i + ']';
		 				innerObj = {};
		 				innerObj[fullSubName] = subValue;
		 				query += param(innerObj) + '&';
		 			}
				} else if (value instanceof Object) {
					for (subName in value) {
						subValue = value[subName];
						fullSubName = name + '[' + subName + ']';
						innerObj = {};
						innerObj[fullSubName] = subValue;
						query += param(innerObj) + '&';
					}
				} else if (value !== undefined && value !== null){query += encodeURIComponent(name) + '=' + encodeURIComponent(value) + '&';}
			}

			return query.length ? query.substr(0, query.length - 1) : query;
		};
		$httpProvider.defaults.transformRequest = [function(data) {
			return angular.isObject(data) && String(data) !== '[object File]' ? param(data) : data;
		}];
  	}
]);