app.js 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage'], function(angularAMD) {
  2. 'use strict';
  3. /**
  4. * 获取数组的最后一个元素
  5. */
  6. Array.prototype.last = function() {
  7. return this.length > 0 ? this[this.length - 1] : null;
  8. };
  9. var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices']);
  10. app.init = function() {
  11. angularAMD.bootstrap(app);
  12. };
  13. // ui-router 路由配置
  14. app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function($stateProvider, $urlRouterProvider, $httpProvider){
  15. $urlRouterProvider.otherwise("/index");
  16. $stateProvider.state('index', {
  17. // 管理首页
  18. url: '/index',
  19. templateUrl : 'static/view/admin/index.html',
  20. controller : '',
  21. controllerUrl : ''
  22. }).state('trade_purchase', angularAMD.route({
  23. // 采购单管理
  24. url: '/trade/purchase',
  25. templateUrl : 'static/view/admin/trade/trade_purchase.html',
  26. controller : 'TradePurchaseCtrl',
  27. controllerUrl : 'app/controllers/trade/TradePurchaseCtrl'
  28. })).state('trade_buyerOrder', angularAMD.route({
  29. // 卖家销售单跟踪
  30. url: '/trade/buyerOrder',
  31. templateUrl : 'static/view/admin/trade/trade_buyer_order.html',
  32. controller : 'BuyerOrderCtrl',
  33. controllerUrl : 'app/controllers/trade/BuyerOrderCtrl'
  34. })).state('trade_purchase_detail', angularAMD.route({
  35. // 采购单详情
  36. url: '/trade/purchase/:purchaseid',
  37. templateUrl : 'static/view/admin/trade/trade_purchase_detail.html',
  38. controller : 'TradePurchaseDetailCtrl',
  39. controllerUrl : 'app/controllers/trade/TradePurchaseDetailCtrl'
  40. })).state('trade_payment_detail', angularAMD.route({
  41. //付款申请单详情
  42. url: '/trade/payment/:requestId',
  43. templateUrl : 'static/view/admin/trade/trade_payment_detail.html',
  44. controller : 'TradePaymentDetailCtrl',
  45. controllerUrl : 'app/controllers/trade/TradePaymentDetailCtrl'
  46. })).state('trade_order', angularAMD.route({
  47. // 订单管理
  48. url: '/trade/order',
  49. templateUrl : 'static/view/admin/trade/trade_order.html',
  50. controller : 'TradeOrderCtrl',
  51. controllerUrl : 'app/controllers/trade/TradeOrderCtrl'
  52. })).state('trade_ordersearch', angularAMD.route({
  53. // 订单查询接口
  54. url: '/trade/ordersearch',
  55. templateUrl : 'static/view/admin/trade/trade_ordersearch.html',
  56. controller : 'TradeOrderSearchCtrl',
  57. controllerUrl : 'app/controllers/trade/TradeOrderSearchCtrl'
  58. })).state('trade_invoicefrompurc', angularAMD.route({
  59. // 卖家出货单管理
  60. url: '/trade/invoicefrompurc',
  61. templateUrl : 'static/view/admin/trade/trade_invoicefrompurc.html',
  62. controller : 'InvoicefromPurcCtrl',
  63. controllerUrl : 'app/controllers/trade/InvoicefromPurcCtrl'
  64. })).state('trade_invoicefrompurc_detail', angularAMD.route({
  65. // 卖家出货单详情页
  66. url: '/trade/invoicefrompurc/:invoiceid',
  67. templateUrl : 'static/view/admin/trade/trade_invoicefrompurc_detail.html',
  68. controller : 'InvoicefromPurcDetailCtrl',
  69. controllerUrl : 'app/controllers/trade/InvoicefromPurcDetailCtrl'
  70. })).state('trade_record_chart', angularAMD.route({
  71. // 交易记录表
  72. url: '/trade/record_chart',
  73. templateUrl : 'static/view/admin/trade/trade_record_chart.html',
  74. controller : 'TradeRecordChartCtrl',
  75. controllerUrl : 'app/controllers/trade/TradeRecordChartCtrl'
  76. })).state('buyerExProcess', angularAMD.route({
  77. // 买家异常处理
  78. url: '/trade/buyerExProcess',
  79. templateUrl : 'static/view/admin/trade/trade-afSaleApplyProcessing.html',
  80. controller : 'AfSaleApplyProcessingCtrl',
  81. controllerUrl : 'app/controllers/trade/AfSaleApplyProcessingCtrl'
  82. })).state('tradeAfSaleApplyDetails', angularAMD.route({
  83. // 售后申请详情
  84. url: '/trade/afSaleApplyDetails/:applyId',
  85. templateUrl : 'static/view/admin/trade/trade-afSaleApplyDetails.html',
  86. controller : 'AfSaleApplyDetailsCtrl',
  87. controllerUrl : 'app/controllers/trade/AfSaleApplyDetailsCtrl'
  88. })).state('supExProcess', angularAMD.route({
  89. // 卖家异常处理
  90. url: '/trade/supExProcess',
  91. templateUrl : 'static/view/admin/trade/trade-supExProcess.html',
  92. controller : 'supExProcessCtrl',
  93. controllerUrl : 'app/controllers/trade/supExProcessCtrl'
  94. })).state('supExProcessDetails', angularAMD.route({
  95. // 卖家异常处理
  96. url: '/trade/supExProcessDetails/:applyId',
  97. templateUrl : 'static/view/admin/trade/trade-supExProcessDetails.html',
  98. controller : 'supExProcessDetailsCtrl',
  99. controllerUrl : 'app/controllers/trade/supExProcessDetailsCtrl'
  100. })).state('trade_returnfromb2c', angularAMD.route({
  101. // 平台退货单管理
  102. url: '/trade/returnfromb2c',
  103. templateUrl : 'static/view/admin/trade/trade_returnfromb2c.html',
  104. controller : 'Returnfromb2cCtrl',
  105. controllerUrl : 'app/controllers/trade/Returnfromb2cCtrl'
  106. })).state('trade_returnfromb2c_detail', angularAMD.route({
  107. // 平台退货单详情
  108. url: '/trade/returnfromb2c/:returnid',
  109. templateUrl : 'static/view/admin/trade/trade_returnfromb2c_detail.html',
  110. controller : 'ReturnFromB2CDetailCtrl',
  111. controllerUrl : 'app/controllers/trade/ReturnFromB2CDetailCtrl'
  112. })).state('trade_returnfromcust', angularAMD.route({
  113. // 客户退货单管理
  114. url: '/trade/returnfromcust',
  115. templateUrl : 'static/view/admin/trade/trade_returnfromcust.html',
  116. controller : 'ReturnfromcustCtrl',
  117. controllerUrl : 'app/controllers/trade/ReturnfromcustCtrl'
  118. })).state('trade_returnfromcust_detail', angularAMD.route({
  119. // 客户退货单详情
  120. url: '/trade/returnfromcust/:returnid',
  121. templateUrl : 'static/view/admin/trade/trade_returnfromcust_detail.html',
  122. controller : 'ReturnFromCustDetailCtrl',
  123. controllerUrl : 'app/controllers/trade/ReturnFromCustDetailCtrl'
  124. })).state('trade_changefromb2c', angularAMD.route({
  125. // 平台换货单管理
  126. url: '/trade/changefromb2c',
  127. templateUrl : 'static/view/admin/trade/trade_changefromb2c.html',
  128. controller : 'Changefromb2cCtrl',
  129. controllerUrl : 'app/controllers/trade/Changefromb2cCtrl'
  130. })).state('trade_changefromb2c_detail', angularAMD.route({
  131. // 平台换货单详情
  132. url: '/trade/changefromb2c/:changeid',
  133. templateUrl : 'static/view/admin/trade/trade_changefromb2c_detail.html',
  134. controller : 'ChangeFromB2CDetailCtrl',
  135. controllerUrl : 'app/controllers/trade/ChangeFromB2CDetailCtrl'
  136. })).state('trade_changefromcust', angularAMD.route({
  137. // 客户换货单管理
  138. url: '/trade/changefromcust',
  139. templateUrl : 'static/view/admin/trade/trade_changefromcust.html',
  140. controller : 'ChangefromcustCtrl',
  141. controllerUrl : 'app/controllers/trade/ChangefromcustCtrl'
  142. })).state('trade_changefromcust_detail', angularAMD.route({
  143. // 客户换货单详情
  144. url: '/trade/changefromcust/:changeid',
  145. templateUrl : 'static/view/admin/trade/trade_changefromcust_detail.html',
  146. controller : 'ChangeFromCustDetailCtrl',
  147. controllerUrl : 'app/controllers/trade/ChangeFromCustDetailCtrl'
  148. })).state('trade_invoicevenderchange', angularAMD.route({
  149. // 供应商换货出货单管理
  150. url: '/trade/invoicevenderchange',
  151. templateUrl : 'static/view/admin/trade/trade_invoicevenderchange.html',
  152. controller : 'InvoicevenderchangeCtrl',
  153. controllerUrl : 'app/controllers/trade/InvoicevenderchangeCtrl'
  154. })).state('trade_invoicevenderchange_detail', angularAMD.route({
  155. // 供应商换货出货单详情
  156. url: '/trade/invoicevenderchange/:invoiceid',
  157. templateUrl : 'static/view/admin/trade/trade_invoicevenderchange_detail.html',
  158. controller : 'InvoicevenderchangeDetailCtrl',
  159. controllerUrl : 'app/controllers/trade/InvoicevenderchangeDetailCtrl'
  160. })).state('trade_invoiceb2cchange', angularAMD.route({
  161. // 平台换货出货单管理
  162. url: '/trade/invoiceb2cchange',
  163. templateUrl : 'static/view/admin/trade/trade_invoiceb2cchange.html',
  164. controller : 'Invoiceb2cchangeCtrl',
  165. controllerUrl : 'app/controllers/trade/Invoiceb2cchangeCtrl'
  166. })).state('trade_invoiceb2cchange_detail', angularAMD.route({
  167. // 平台换货出货单详情
  168. url: '/trade/invoiceb2cchange/:invoiceid',
  169. templateUrl : 'static/view/admin/trade/trade_invoiceb2cchange_detail.html',
  170. controller : 'Invoiceb2cchangeCtrlDetail',
  171. controllerUrl : 'app/controllers/trade/Invoiceb2cchangeCtrlDetail'
  172. })).state('trade_invoicefromorder', angularAMD.route({
  173. // 平台出货单管理
  174. url: '/trade/invoicefromorder',
  175. templateUrl : 'static/view/admin/trade/trade_invoicefromorder.html',
  176. controller : 'InvoicefromOrderCtrl',
  177. controllerUrl : 'app/controllers/trade/InvoicefromOrderCtrl'
  178. })).state('trade_invoicefromorder_detail', angularAMD.route({
  179. // 平台出货单详情
  180. url: '/trade/invoicefromorder/:invoiceid',
  181. templateUrl : 'static/view/admin/trade/trade_invoicefromorder_detail.html',
  182. controller : 'InvoicefromOrderDetailCtrl',
  183. controllerUrl : 'app/controllers/trade/InvoicefromOrderDetailCtrl'
  184. })).state('trade_order_detail', angularAMD.route({
  185. // 订单详情界面
  186. url: '/trade/order/:orderid',
  187. templateUrl : 'static/view/admin/trade/trade_order_detail.html',
  188. controller : 'TradeOrderDetailCtrl',
  189. controllerUrl : 'app/controllers/trade/TradeOrderDetailCtrl'
  190. })).state('trade_receipt', angularAMD.route({
  191. // 平台入库单管理
  192. url: '/trade/receipt',
  193. templateUrl : 'static/view/admin/trade/trade_receipt.html',
  194. controller : 'ReceiptCtrl',
  195. controllerUrl : 'app/controllers/trade/ReceiptCtrl'
  196. })).state('trade_receipt_detail', angularAMD.route({
  197. // 平台入库单详情
  198. url: '/trade/receipt/:receiptid',
  199. templateUrl : 'static/view/admin/trade/trade_receipt_detail.html',
  200. controller : 'ReceiptDetailCtrl',
  201. controllerUrl : 'app/controllers/trade/ReceiptDetailCtrl'
  202. })).state('check_vender', angularAMD.route({
  203. // 结算中心管理
  204. url: '/check/check_vender',
  205. templateUrl : 'static/view/admin/checkMoney/check_money.html',
  206. controller : 'CheckVenderCtrl',
  207. controllerUrl : 'app/controllers/CheckVenderCtrl'
  208. })).state('ensure_checkmoney', angularAMD.route({
  209. // 结算中心 结算出入库单
  210. url: '/check/check_vender/:uu',
  211. templateUrl : 'static/view/admin/checkMoney/ensure_checkmoney.html',
  212. controller : 'EnsureCheckMoneyCtrl',
  213. controllerUrl : 'app/controllers/EnsureCheckMoneyCtrl'
  214. })).state('request_payment', angularAMD.route({
  215. // 结算中心 付款申请
  216. url: '/check/request_pay/:uu',
  217. templateUrl : 'static/view/admin/checkMoney/request_pay.html',
  218. controller : 'RequestPayCtrl',
  219. controllerUrl : 'app/controllers/RequestPayCtrl'
  220. })).state('fiance_settle', angularAMD.route({
  221. // 结算中心 财务结算
  222. url: '/check/settlement',
  223. templateUrl : 'static/view/admin/checkMoney/Settlement.html',
  224. controller : 'SettlementCtrl',
  225. controllerUrl : 'app/controllers/checkMoney/SettlementCtrl'
  226. })).state('histTransfer', angularAMD.route({
  227. // 结算中心 查询历史转账
  228. url: '/check/histTransfer',
  229. templateUrl : 'static/view/admin/checkMoney/histTransfer.html',
  230. controller : 'HistTransferCtrl',
  231. controllerUrl : 'app/controllers/HistTransferCtrl'
  232. })).state('accountQuery', angularAMD.route({
  233. // 结算中心 账户查询
  234. url: '/check/accountQuery',
  235. templateUrl : 'static/view/admin/checkMoney/accountQuery.html',
  236. controller : 'accountQueryCtrl',
  237. controllerUrl : 'app/controllers/checkMoney/accountQueryCtrl'
  238. })).state('refund', angularAMD.route({
  239. // 退款单管理
  240. url: '/check/refund',
  241. templateUrl : 'static/view/admin/checkMoney/refund.html',
  242. controller : 'refundCtrl',
  243. controllerUrl : 'app/controllers/checkMoney/refund'
  244. })).state('audit_brand', angularAMD.route({
  245. // 品牌审批
  246. url: '/audit/brand',
  247. templateUrl : 'static/view/admin/audit_brand.html',
  248. controller : 'AuditBrandCtrl',
  249. controllerUrl : 'app/controllers/AuditBrandCtrl'
  250. })).state('audit_brand_detail', angularAMD.route({
  251. // 品牌审批详细页面
  252. url: '/audit/brand/:id',
  253. templateUrl : 'static/view/admin/audit_brand_detail.html',
  254. controller : 'AuditBrandDetailCtrl',
  255. controllerUrl : 'app/controllers/AuditBrandDetailCtrl'
  256. })).state('brand_maintenance', angularAMD.route({
  257. // 品牌维护
  258. url: '/brandmaintenance',
  259. templateUrl : 'static/view/admin/brand_maintenance.html',
  260. controller : 'BrandMaintenanceCtrl',
  261. controllerUrl : 'app/controllers/BrandMaintenanceCtrl'
  262. })).state('brand_map', angularAMD.route({
  263. // 品牌映射维护
  264. url: '/brand/map',
  265. templateUrl : 'static/view/admin/product/brand_map.html',
  266. controller : 'BrandMapCtrl',
  267. controllerUrl : 'app/controllers/product/brandMapCtrl'
  268. })).state('store_company_list', angularAMD.route({
  269. // 寄售管理
  270. url: '/store/company',
  271. templateUrl : 'static/view/admin/store/store_company_list.html',
  272. controller : 'StoreCompanyListCtrl',
  273. controllerUrl : 'app/controllers/store/StoreCompanyListCtrl'
  274. })).state('store_company_detail', angularAMD.route({
  275. // 寄售管理-详情
  276. url: '/store/company/:enUU/detail',
  277. templateUrl : 'static/view/admin/store/store_company_detail.html',
  278. controller : 'StoreCompanyDetailCtrl',
  279. controllerUrl : 'app/controllers/store/StoreCompanyDetailCtrl'
  280. })).state('store_application_maintenance', angularAMD.route({
  281. // 店铺申请
  282. url: '/store/application',
  283. templateUrl : 'static/view/admin/store_application_maintenance.html',
  284. controller : 'StoreApplicationCtrl',
  285. controllerUrl : 'app/controllers/StoreApplicationCtrl'
  286. })).state('store_qualification_auth', angularAMD.route({
  287. // 资质审核
  288. url: '/store/qualification/:applyUuid',
  289. templateUrl : 'static/view/admin/store_qualification_maintenance.html',
  290. controller : 'StoreQualificationCtrl',
  291. controllerUrl : 'app/controllers/StoreQualificationCtrl'
  292. })).state('store_info_list', angularAMD.route({
  293. // 店铺列表
  294. url: '/store/list',
  295. templateUrl : 'static/view/admin/store_info_list.html',
  296. controller : 'StoreInfoListCtrl',
  297. controllerUrl : 'app/controllers/StoreInfoListCtrl'
  298. })).state('store_info_detail', angularAMD.route({
  299. // 店铺详情,违规处理页面
  300. url: '/store/:uuid/detail/:type',
  301. templateUrl : 'static/view/admin/store/store_info_detail.html',
  302. controller : 'StoreInfoDetailCtrl',
  303. controllerUrl : 'app/controllers/store/StoreInfoDetailCtrl'
  304. })).state('brand_maintenance_detail', angularAMD.route({
  305. // 品牌维护详情、更新
  306. url: '/brandmaintenance/:uuid',
  307. templateUrl : 'static/view/admin/brand_maintenance_detail.html',
  308. controller : 'BrandMaintenanceDetailCtrl',
  309. controllerUrl : 'app/controllers/BrandMaintenanceDetailCtrl'
  310. })).state('mgr', angularAMD.route({
  311. // 类目审批
  312. url: '/audit/kind',
  313. templateUrl : 'static/view/admin/',
  314. controller : '',
  315. controllerUrl : ''
  316. })).state('audit_component', angularAMD.route({
  317. // 标准器件审批
  318. url: '/audit/component',
  319. templateUrl : 'static/view/admin/audit_component.html',
  320. controller : 'AuditComponentCtrl',
  321. controllerUrl : 'app/controllers/AuditComponentCtrl'
  322. })).state('audit_component_detail', angularAMD.route({
  323. // 品牌审批详细页面
  324. url: '/audit/component/:id',
  325. templateUrl : 'static/view/admin/audit_component_detail.html',
  326. controller : 'AuditComponentDetailCtrl',
  327. controllerUrl : 'app/controllers/AuditComponentDetailCtrl'
  328. })).state('audit_componentMaintenance', angularAMD.route({
  329. // 标准器件维护
  330. url: '/audit/componentMaintenance',
  331. templateUrl : 'static/view/admin/audit_componentMaintenance.html',
  332. controller : 'AuditComponentMaintenanceCtrl',
  333. controllerUrl : 'app/controllers/AuditComponentMaintenanceCtrl'
  334. })).state('audit_componentBatchMaintenance', angularAMD.route({
  335. // 审核标准器件批量建档申请
  336. url: '/audit/componentBatchMaintenance',
  337. templateUrl : 'static/view/admin/audit_componentBatchMaintenance.html',
  338. controller : 'AuditComponentBatchMaintenanceCtrl',
  339. controllerUrl : 'app/controllers/AuditComponentBatchMaintenanceCtrl'
  340. })).state('audit_componentBatchMaintenance_detail', angularAMD.route({
  341. // 审核标准器件批量建档申请详情
  342. url: '/audit/componentBatchMaintenance/detail/:submitId',
  343. templateUrl : 'static/view/admin/audit_componentSubmitBatch_detail.html',
  344. controller : 'AuditComponentSubmitBatchDtCtrl',
  345. controllerUrl : 'app/controllers/AuditComponentSubmitBatchDtCtrl'
  346. })).state('audit_componentSubmitBatch_detail_list', angularAMD.route({
  347. // 标准器件批量建档申请详情列表
  348. url: '/audit/componentSubmitBatch/detail/list',
  349. templateUrl : 'static/view/admin/componentSubmitBatch_detail_list.html',
  350. controller : 'ComponentSubmitBatchDetailListCtrl',
  351. controllerUrl : 'app/controllers/ComponentSubmitBatchDetailListCtrl'
  352. })).state('audit_kindCompare', angularAMD.route({
  353. // 属性对应关系维护
  354. url: '/audit/kindContrast',
  355. templateUrl : 'static/view/admin/product/kindContrast.html',
  356. controller : 'KindContrastCtrl',
  357. controllerUrl : 'app/controllers/product/KindContrastCtrl'
  358. })).state('audit_kindCompare_detail', angularAMD.route({
  359. // 属性对应关系维护详情页
  360. url: '/audit/kindContrast/:id',
  361. templateUrl : 'static/view/admin/product/kindContrast_detail.html',
  362. controller : 'KindContrastDetailCtrl',
  363. controllerUrl : 'app/controllers/product/KindContrastDetailCtrl'
  364. })).state('crawl_task', angularAMD.route({
  365. // 数据爬取任务
  366. url: '/audit/crawlTask',
  367. templateUrl : 'static/view/admin/product/crawl_task.html',
  368. controller : 'CrawlTaskCtrl',
  369. controllerUrl : 'app/controllers/product/CrawlTaskCtrl'
  370. })).state('crawl_task_detail', angularAMD.route({
  371. // 数据爬取任务详情页
  372. url: '/audit/crawlTask/:id',
  373. templateUrl : 'static/view/admin/product/crawl_task_detail.html',
  374. controller : 'CrawlTaskDetailCtrl',
  375. controllerUrl : 'app/controllers/product/CrawlTaskDetailCtrl'
  376. })).state('crawl_task_component_list', angularAMD.route({
  377. // 数据爬取任务成功的器件展示页
  378. url: '/audit/crawlTask/:taskId/componentList',
  379. templateUrl : 'static/view/admin/product/crawl_task_component_list.html',
  380. controller : 'CrawlTaskCMPListCtrl',
  381. controllerUrl : 'app/controllers/product/CrawlTaskCMPListCtrl'
  382. })).state('crawl_task_component_detail', angularAMD.route({
  383. // 数据爬取任务成功的器件详情页
  384. url: '/audit/crawlTask/:taskId/component/:uuid',
  385. templateUrl: 'static/view/admin/product/crawl_task_component_detail.html',
  386. controller: 'CrawlTaskCMPDetailCtrl',
  387. controllerUrl: 'app/controllers/product/CrawlTaskCMPDetailCtrl'
  388. })).state('audit_bankinfo', angularAMD.route({
  389. // 银行账户信息管理
  390. url: '/audit/bankinfo',
  391. templateUrl: 'static/view/admin/bankInfo/auditBankInfo.html',
  392. controller: 'AuditBankInfoCtrl',
  393. controllerUrl: 'app/controllers/bankInfo/AuditBankInfoCtrl'
  394. })).state('audit_realAuth', angularAMD.route({
  395. // 实名认证审核
  396. url: '/audit/realAuth',
  397. templateUrl: 'static/view/admin/audit_realAuth.html',
  398. controller: 'AuditRealAuthCtrl',
  399. controllerUrl: 'app/controllers/AuditRealAuthCtrl'
  400. })).state('uploadComponentCrawl', angularAMD.route({
  401. // 上传爬取数据页面
  402. url: '/product/componentCrawl/upload',
  403. templateUrl : 'static/view/admin/product/uploadComponentCrawl.html',
  404. controller : 'UploadComponentCrawlCtrl',
  405. controllerUrl : 'app/controllers/product/UploadComponentCrawlCtrl'
  406. })).state('disable_brand', angularAMD.route({
  407. // 禁用品牌界面
  408. url: '/disable/brand',
  409. templateUrl : 'static/view/admin/disable_brand.html',
  410. controller : 'DisableBrandCtrl',
  411. controllerUrl : 'app/controllers/DisableBrandCtrl'
  412. })).state('disable_component', angularAMD.route({
  413. // 禁用标准器件界面
  414. url: '/disable/component',
  415. templateUrl : 'static/view/admin/disable_component.html',
  416. controller : 'DisableComponentCtrl',
  417. controllerUrl : 'app/controllers/DisableComponentCtrl'
  418. })).state('test', angularAMD.route({
  419. // 数据初始化界面
  420. url: '/test',
  421. templateUrl : 'static/view/admin/test.html',
  422. controller : 'TestCtrl',
  423. controllerUrl : 'app/controllers/TestCtrl'
  424. })).state('logistics_pickUpAddress', angularAMD.route({
  425. // 上门自取地址管理界面
  426. url: '/logistics/pickUpAddress',
  427. templateUrl : 'static/view/admin/logistics/logistics_pickUpAddress.html',
  428. controller : 'LogisticsPickUpAddressCtrl',
  429. controllerUrl : 'app/controllers/logistics/LogisticsPickUpAddressCtrl'
  430. })).state('logistics_pickUpAddressNew', angularAMD.route({
  431. // 新增上门自取地址
  432. url: '/logistics/pickUpAddress/new',
  433. templateUrl : 'static/view/admin/logistics/pickUpAddress_add.html',
  434. controller : 'PickUpAddressAddCtrl',
  435. controllerUrl : 'app/controllers/logistics/PickUpAddressAddCtrl'
  436. })).state('logistics_pickUpAddress_add', angularAMD.route({
  437. // 修改上门自取地址
  438. url: '/logistics/pickUpAddress/:id',
  439. templateUrl : 'static/view/admin/logistics/pickUpAddress_add.html',
  440. controller : 'PickUpAddressAddCtrl',
  441. controllerUrl : 'app/controllers/logistics/PickUpAddressAddCtrl'
  442. })).state('tool_test', angularAMD.route({
  443. // 测试类的
  444. url: '/tool/test',
  445. templateUrl : 'static/view/admin/tool/test.html',
  446. controller : 'ToolTestCtrl',
  447. controllerUrl : 'app/controllers/logistics/ToolTestCtrl'
  448. })).state('platform_repository', angularAMD.route({
  449. // 平台仓储管理
  450. url: '/platform/repository',
  451. templateUrl : 'static/view/admin/platform_repository.html',
  452. controller : 'PlatformRepository',
  453. controllerUrl : 'app/controllers/PlatformRepository',
  454. title : '管理平台收发货地址'
  455. })).state('credit_card', angularAMD.route({
  456. url : '/check/credit',
  457. templateUrl : 'static/view/admin/checkMoney/creditCardAdmin.html',
  458. controller : 'creditCardAdminCtrl',
  459. controllerUrl : 'app/controllers/checkMoney/creditCardAdminCtrl'
  460. })).state('orderBillAdmin', angularAMD.route({
  461. url : '/order/bill/admin',
  462. templateUrl : 'static/view/admin/checkMoney/orderBillAdmin.html',
  463. controller : 'orderBillAdminCtrl',
  464. controllerUrl : 'app/controllers/checkMoney/orderBillAdminCtrl'
  465. })).state('purchaseBillAdmin', angularAMD.route({
  466. url : '/purchase/bill/admin',
  467. templateUrl : 'static/view/admin/checkMoney/purchaseBillAdmin.html',
  468. controller : 'purchaseBillAdminCtrl',
  469. controllerUrl : 'app/controllers/checkMoney/purchaseBillAdminCtrl'
  470. })).state('billInfoAdmin', angularAMD.route({
  471. url : '/billInfo/admin',
  472. templateUrl : 'static/view/admin/checkMoney/billInfoAdmin.html',
  473. controller : 'billInfoAdminCtrl',
  474. controllerUrl : 'app/controllers/checkMoney/billInfoAdminCtrl'
  475. })).state('bill_input', angularAMD.route({
  476. url : '/billInput/revise/:id',
  477. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  478. controller : 'BillInputCtrl',
  479. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  480. resolve: {
  481. isNormal: function() {return 1207;}
  482. }
  483. })).state('bill_input_normal', angularAMD.route({
  484. url : '/billInput/normal',
  485. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  486. controller : 'BillInputCtrl',
  487. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  488. resolve: {
  489. isNormal: function() {return 1206;}
  490. }
  491. })).state('bill_input_special', angularAMD.route({
  492. url : '/billInput/special',
  493. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  494. controller : 'BillInputCtrl',
  495. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  496. resolve: {
  497. isNormal: function() {return 1205;}
  498. }
  499. })).state('bill_notice', angularAMD.route({
  500. url : '/bill/notice',
  501. templateUrl : 'static/view/admin/checkMoney/billNotice.html'
  502. })).state('makeDemand', angularAMD.route({
  503. url : '/makeDemand/admin',
  504. templateUrl : 'static/view/admin/customService/makeDemandList.html',
  505. controller : 'makeDemandListCtrl',
  506. controllerUrl : 'app/controllers/customService/makeDemandList'
  507. })).state('maDemandInput', angularAMD.route({
  508. url : '/makeDemand/:id/input/:input',
  509. templateUrl : 'static/view/admin/customService/makeDemandInput.html',
  510. controller : 'makeDemandInputCtrl',
  511. controllerUrl : 'app/controllers/customService/makeDemandInput'
  512. })).state('ReviewerEmailInfo', angularAMD.route({
  513. //审核人邮箱设置
  514. url : '/ReviewerEmailInfo/admin',
  515. templateUrl : 'static/view/admin/customService/ReviewerEmailInfo.html',
  516. controller : 'ReviewerEmailInfoCtrl',
  517. controllerUrl : 'app/controllers/customService/ReviewerEmailInfo'
  518. })).state('goodsStatistics', angularAMD.route({
  519. // 在售商品信息统计
  520. url : '/trade/goodsStatistics',
  521. templateUrl : 'static/view/admin/trade/trade_goods_statistics.html',
  522. controller : 'goodsStatisticsCtrl',
  523. controllerUrl : 'app/controllers/trade/goodsStatisticsCtrl'
  524. })).state('overtimeBatch', angularAMD.route({
  525. // 即将失效批次列表
  526. url : '/product/overtimeBatch',
  527. templateUrl : 'static/view/admin/product/overtimeBatch.html',
  528. controller : 'overtimeBatchCtrl',
  529. controllerUrl : 'app/controllers/product/overtimeBatchCtrl'
  530. })).state('validtime', angularAMD.route({
  531. // 批次有效期维护
  532. url : '/product/validtime',
  533. templateUrl : 'static/view/admin/product/validtime.html',
  534. controller : 'validtimeCtrl',
  535. controllerUrl : 'app/controllers/product/validtimeCtrl'
  536. })).state('sailingGoods', angularAMD.route({
  537. // 销售中的产品
  538. url : '/product/sailingGoods',
  539. templateUrl : 'static/view/admin/product/salingGoods.html',
  540. controller : 'sailingGoodsCtrl',
  541. controllerUrl : 'app/controllers/product/sailingGoodsCtrl'
  542. })).state('downedGoods', angularAMD.route({
  543. url : '/product/downedGoods',
  544. templateUrl : 'static/view/admin/product/downedGoods.html',
  545. controller : 'downedGoodsCtrl',
  546. controllerUrl : 'app/controllers/product/downedGoodsCtrl'
  547. })).state('proeprty', angularAMD.route({
  548. // 维护属性
  549. url: '/properties',
  550. templateUrl : 'static/view/admin/product/product_properties.html',
  551. controller : 'PropertiesCtrl',
  552. controllerUrl : 'app/controllers/product/PropertiesCtrl',
  553. title: '属性维护'
  554. })).state('kind', angularAMD.route({
  555. // 维护产品类目
  556. url: '/kinds',
  557. templateUrl : 'static/view/admin/product/product_kind.html',
  558. controller : 'KindCtrl',
  559. controllerUrl : 'app/controllers/product/KindCtrl',
  560. title: '类目维护'
  561. })).state('kindProperty', angularAMD.route({
  562. // 维护器件类目的属性
  563. url: '/kindProperty',
  564. templateUrl: 'static/view/admin/product/product_kindProperty.html',
  565. controller: 'KindPropertyCtrl',
  566. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  567. title: '类目属性维护'
  568. })).state('moveCmp', angularAMD.route({
  569. // 批量修改器件类目
  570. url: '/moveCmp',
  571. templateUrl: 'static/view/admin/product/moveCmp.html',
  572. controller: 'MoveCmpCtrl',
  573. controllerUrl: 'app/controllers/product/MoveCmpCtrl',
  574. title: '批量修改器件类目'
  575. })).state('kindProperty.step1', angularAMD.route({
  576. // 维护器件类目的属性,第一步选择类目
  577. url: '/1',
  578. templateUrl: 'static/view/admin/product/product_kindProperty_1.html',
  579. controller: 'KindProperty_1Ctrl',
  580. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  581. title: '选择要维护的类目'
  582. })).state('kindProperty.step2', angularAMD.route({
  583. // 维护器件类目的属性,第二步维护描述属性
  584. url: '/2/:kindId',
  585. templateUrl: 'static/view/admin/product/product_kindProperty_2.html',
  586. controller: 'KindProperty_2Ctrl',
  587. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  588. title: '维护类目的属性'
  589. })).state('kindAdvice', angularAMD.route({
  590. // 首页展示(轮播图片管理)
  591. url: '/kindAdvice',
  592. templateUrl: 'static/view/admin/product/kindAdvice.html',
  593. controller: 'KindAdviceCtrl',
  594. controllerUrl: 'app/controllers/product/KindAdviceCtrl',
  595. title: '轮播图片管理'
  596. })).state('logUsage', angularAMD.route({
  597. //用户操作日志
  598. url: '/logUsage',
  599. templateUrl: 'static/view/admin/logUsage.html',
  600. controller: 'LogUsageCtrl',
  601. controllerUrl: 'app/controllers/LogUsageCtrl',
  602. title: '用户操作日志'
  603. })).state('keyWord', angularAMD.route({
  604. url: '/keyWord',
  605. templateUrl: 'static/view/admin/keyword.html',
  606. controller: 'KeyWordCtrl',
  607. controllerUrl: 'app/controllers/KeyWordCtrl',
  608. title: '非法关键词维护'
  609. })).state('slideImage', angularAMD.route({
  610. // 首页展示(轮播图片管理)
  611. url: '/operation/slideImage',
  612. templateUrl: 'static/view/admin/operation/slideImage.html',
  613. controller: 'SlideImageCtrl',
  614. controllerUrl: 'app/controllers/operation/SlideImageCtrl',
  615. title: '轮播图片管理'
  616. })).state('secQuestion', angularAMD.route({
  617. // 密保问题维护
  618. url: '/secQuestion',
  619. templateUrl: 'static/view/admin/sec_question.html',
  620. controller: 'SecQuestionCtrl',
  621. controllerUrl: 'app/controllers/SecQuestionCtrl',
  622. title: '密保问题维护'
  623. })).state('logisticsCompany', angularAMD.route({
  624. // 首页展示(快递公司管理)
  625. url: '/logistics/company',
  626. templateUrl: 'static/view/admin/logistics/logistics_company.html',
  627. controller: 'LogisticsCompanyCtrl',
  628. controllerUrl: 'app/controllers/logistics/LogisticsCompanyCtrl',
  629. title: '快递公司管理'
  630. })).state('payavailable', angularAMD.route({
  631. //买家付款有效时间
  632. url: '/pay/available',
  633. templateUrl: 'static/view/admin/checkMoney/payAvailable.html',
  634. controller: 'payAvailableCtrl',
  635. controllerUrl: 'app/controllers/checkMoney/payAvailable',
  636. title: '买家付款有效时间'
  637. })).state('exchangerate', angularAMD.route({
  638. //汇率
  639. url: '/pay/exchangerate',
  640. templateUrl: 'static/view/admin/checkMoney/exchangerate.html',
  641. controller: 'exchangeRateCtrl',
  642. controllerUrl: 'app/controllers/checkMoney/exchangeRate',
  643. title: '汇率'
  644. })).state('delaytime', angularAMD.route({
  645. //汇率
  646. url: '/logistics/delaytime',
  647. templateUrl: 'static/view/admin/logistics/delayTime.html',
  648. controller: 'DelayTimeCtrl',
  649. controllerUrl: 'app/controllers/logistics/DelayTime',
  650. title: '汇率'
  651. })).state('exceptionApply', angularAMD.route({
  652. //异常申请
  653. url : '/trade/purchase/exceptionApply/:purchaseid',
  654. templateUrl: 'static/view/admin/trade/trade_exceptionProcessing.html',
  655. controller: 'exceptionApplyCtrl',
  656. controllerUrl: 'app/controllers/trade/exceptionApply',
  657. title: '异常申请'
  658. })).state('openBill', angularAMD.route({
  659. url : 'trade/open/bill/:id',
  660. templateUrl : 'static/view/admin/openBill.html',
  661. controller: 'openBillCtrl',
  662. controllerUrl: 'app/controllers/openBillCtrl',
  663. title: '开发票'
  664. })).state('messageBoard', angularAMD.route({
  665. // 留言板
  666. url : '/operation/messageBoard',
  667. templateUrl: 'static/view/admin/operation/messageBoard.html',
  668. controller: 'MessageBoardCtrl',
  669. controllerUrl: 'app/controllers/operation/MessageBoardCtrl',
  670. title: '留言板'
  671. })).state('messageBoardDetail', angularAMD.route({
  672. // 留言板详情
  673. url : '/operation/messageBoard/:id',
  674. templateUrl: 'static/view/admin/operation/messageBoard_dt.html',
  675. controller: 'MessageBoardDetailCtrl',
  676. controllerUrl: 'app/controllers/operation/MessageBoardDetailCtrl',
  677. title: '留言板'
  678. })).state('helpMaintenance', angularAMD.route({
  679. // 帮助中心导航维护
  680. url : '/help/maintenance',
  681. templateUrl: 'static/view/admin/help/maintenance.html',
  682. controller: 'HelpMaintenanceCtrl',
  683. controllerUrl: 'app/controllers/help/HelpMaintenanceCtrl',
  684. title: '帮助中心导航维护'
  685. })).state('helpPublish', angularAMD.route({
  686. // 帮助中心发布
  687. url : '/help/publish',
  688. templateUrl: 'static/view/admin/help/publish.html',
  689. controller: 'HelpPublishCtrl',
  690. controllerUrl: 'app/controllers/help/HelpPublishCtrl',
  691. title: '帮助中心发布'
  692. })).state('helpEdit', angularAMD.route({
  693. // 帮助中心文章编辑
  694. url : '/help/edit',
  695. templateUrl: 'static/view/admin/help/edit.html',
  696. controller: 'HelpEditCtrl',
  697. controllerUrl: 'app/controllers/help/HelpEditCtrl',
  698. title: '帮助中心文章编辑'
  699. })).state('helpDetail', angularAMD.route({
  700. // 帮助中心文章详情
  701. url : '/help/issue/:id',
  702. templateUrl: 'static/view/admin/help/detail.html',
  703. controller: 'HelpDetailCtrl',
  704. controllerUrl: 'app/controllers/help/HelpDetailCtrl',
  705. title: '帮助中心文章详情'
  706. })).state('notifyShipTime', angularAMD.route({
  707. // 买家提醒发货时间条件
  708. url : '/buyer/notifyShip',
  709. templateUrl: 'static/view/admin/notifyShipTime.html',
  710. controller: 'HotifyShipTimeCtrl',
  711. controllerUrl: 'app/controllers/HotifyShipTime',
  712. title: '买家提醒发货时间条件'
  713. })).state('automaticReceiving', angularAMD.route({
  714. // 买家提醒发货时间条件
  715. url : '/buyer/automaticReceiving',
  716. templateUrl: 'static/view/admin/automaticReceiving.html',
  717. controller: 'AutomaticReceivingCtrl',
  718. controllerUrl: 'app/controllers/AutomaticReceiving',
  719. title: '买家提醒发货时间条件'
  720. })).state('downAllGoodsByEnterprise', angularAMD.route({
  721. //下架该公司所有的商品
  722. url : '/product/downAllGoodsByEnterprise',
  723. templateUrl: 'static/view/admin/product/downGoodsByEnterprise.html',
  724. controller: 'downGoodsByEnterpriseCtrl',
  725. controllerUrl: 'app/controllers/product/downGoodsByEnterprise',
  726. title: '下架公司产品'
  727. })).state('adsBrand', angularAMD.route({
  728. //品牌推广
  729. url : '/ads/brand',
  730. templateUrl: 'static/view/admin/ads/ads_brand.html',
  731. controller: 'adsBrandCtrl',
  732. controllerUrl: 'app/controllers/ads/ads_brand',
  733. title: '品牌推广'
  734. })).state('adsComponent', angularAMD.route({
  735. //品牌推广
  736. url : '/ads/component',
  737. templateUrl: 'static/view/admin/ads/ads_component.html',
  738. controller: 'adsComponentCtrl',
  739. controllerUrl: 'app/controllers/ads/ads_component',
  740. title: '器件推广'
  741. })).state('searchSee', angularAMD.route({
  742. //搜索预览
  743. url : '/search/see',
  744. templateUrl: 'static/view/admin/search/search_See.html',
  745. controller: 'SearchSeeBrandCtrl',
  746. controllerUrl: 'app/controllers/search/search_See',
  747. title: '搜索预览'
  748. })).state('internalMessage', angularAMD.route({
  749. // 消息列表
  750. url: '/internalMessages',
  751. templateUrl: 'static/view/admin/common/message/internalMessageList.html',
  752. controller: 'internalMessageListCtrl',
  753. controllerUrl: 'app/controllers/common/message/internalMessageListCtrl',
  754. title: '消息列表'
  755. }));
  756. $httpProvider.interceptors.push(['Loading', '$q', function(Loading, $q) {
  757. return {
  758. request: function(cfg){
  759. Loading.show();
  760. return cfg;
  761. },
  762. requestError: function(rejection) {
  763. Loading.hide();
  764. return $q.reject(rejection);
  765. },
  766. response: function(res) {
  767. Loading.hide();
  768. return res;
  769. },
  770. responseError: function(rejection) {
  771. Loading.hide();
  772. return $q.reject(rejection);
  773. }
  774. }
  775. }]);
  776. }]);
  777. app.run(['$rootScope', 'BaseService', function($rootScope, BaseService) {
  778. $rootScope.rootPath = BaseService.getRootPath();
  779. $rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
  780. }]);
  781. // 状态码 -> 描述
  782. app.filter('status', function(){
  783. var statusConfig = {
  784. '100': '录入中',
  785. '101': '已提交',
  786. '102': '已审核',
  787. '103': '未通过',
  788. '104': '已通过',
  789. '313': '已激活',
  790. '316': '已过账',
  791. '310': '未启用',
  792. '311': '待审核',
  793. '312': '未激活',
  794. '350': '未开通',
  795. '351': '已开通',
  796. '317': '已创建'
  797. };
  798. return function(data) {
  799. return statusConfig[data];
  800. }
  801. });
  802. /**
  803. * 店铺类型过滤器
  804. */
  805. app.filter('storeType', function () {
  806. return function (data) {
  807. if (data == 'AGENCY') return '代理商';
  808. if (data == 'DISTRIBUTION') return '经销商';
  809. if (data == 'ORIGINAL_FACTORY') return '原厂';
  810. if (data == 'CONSIGNMENT') return '寄售';
  811. return '暂无类型信息'
  812. };
  813. });
  814. /**
  815. * 店铺状态过滤器
  816. *
  817. * TODO huxz 店铺状态
  818. */
  819. app.filter('storeStatus', function () {
  820. return function (data) {
  821. if (data === 'OPENED') return '已开店';
  822. return '已开店';
  823. };
  824. });
  825. /**
  826. * 店铺编号处理过滤器
  827. */
  828. app.filter('storeId', function () {
  829. return function (data) {
  830. if (data) {
  831. var len = data.toString().length;
  832. while(len < 8) {
  833. data = "0" + data;
  834. len++;
  835. }
  836. return data;
  837. }
  838. return '暂无信息'
  839. };
  840. });
  841. /**
  842. * 列表编号处理过滤器
  843. */
  844. app.filter('indexId', function () {
  845. return function (data) {
  846. if (data) {
  847. var len = data.toString().length;
  848. while(len < 3) {
  849. data = "0" + data;
  850. len++;
  851. }
  852. return data;
  853. }
  854. return '暂无信息'
  855. };
  856. });
  857. app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', function($scope, $window, AuthenticationService) {
  858. $scope.logout = function() {
  859. AuthenticationService.logout().success(function() {
  860. SessionService.removeCookie($rootScope.userInfo.userUU);
  861. });
  862. };
  863. //$scope.isAuthed = AuthenticationService.isLoggedIn();
  864. $scope.userInfo = {};
  865. AuthenticationService.getAuthentication().success(function(data){
  866. $scope.userInfo = data;
  867. if(data == null || !data.uu)
  868. $scope.isAuthed = false;
  869. });
  870. }]);
  871. //币别的过滤器
  872. app.filter('currencySysmbol', function() {
  873. return function(moneyParam, currency, add) {
  874. if(typeof(moneyParam) == 'undefined') {
  875. moneyParam = 0;
  876. }
  877. if(currency == 'RMB') {
  878. return "¥" + moneyParam + (typeof(add) == "undefined" ? '' : add);
  879. }else if(currency == "USD"){
  880. return "$" + moneyParam;
  881. }else {
  882. return moneyParam;
  883. }
  884. }
  885. });
  886. return app;
  887. });