app.js 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100
  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/commodity', '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','common/query/seekQualityBuyer','common/query/loanApply', 'common/query/supplier', 'common/query/seekSalesman', 'common/query/b2bManage', 'common/query/adminNews', 'common/query/seekPurchase'], 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', 'commodityServices', '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','seekQualityBuyerServices', 'loanApplyService', 'supplierServices', 'seekSalesmanServices', 'b2bManageService','adminNewsService', 'seekPurchaseServices']);
  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', angularAMD.route({
  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('manage', angularAMD.route({
  269. // 产品管理
  270. url: '/manage',
  271. templateUrl : 'static/view/admin/product/productManage.html',
  272. controller : 'productManageCtrl',
  273. controllerUrl : 'app/controllers/product/productManageCtrl'
  274. })).state('manage_detail', angularAMD.route({
  275. // 产品详情列表
  276. url: '/manage/:id',
  277. templateUrl : 'static/view/admin/product/productManageDetail.html',
  278. controller : 'productManageDetailCtrl',
  279. controllerUrl : 'app/controllers/product/productManageDetailCtrl'
  280. })).state('store_company_list', angularAMD.route({
  281. // 寄售管理
  282. url: '/store/company',
  283. templateUrl : 'static/view/admin/store/store_company_list.html',
  284. controller : 'StoreCompanyListCtrl',
  285. controllerUrl : 'app/controllers/store/StoreCompanyListCtrl'
  286. })).state('store_company_detail', angularAMD.route({
  287. // 寄售管理-详情
  288. url: '/store/company/:enUU/detail',
  289. templateUrl : 'static/view/admin/store/store_company_detail.html',
  290. controller : 'StoreCompanyDetailCtrl',
  291. controllerUrl : 'app/controllers/store/StoreCompanyDetailCtrl'
  292. })).state('store_application_maintenance', angularAMD.route({
  293. // 店铺申请
  294. url: '/store/application',
  295. templateUrl : 'static/view/admin/store_application_maintenance.html',
  296. controller : 'StoreApplicationCtrl',
  297. controllerUrl : 'app/controllers/StoreApplicationCtrl'
  298. })).state('store_qualification_auth', angularAMD.route({
  299. // 资质审核
  300. url: '/store/qualification/:applyUuid',
  301. templateUrl : 'static/view/admin/store_qualification_maintenance.html',
  302. controller : 'StoreQualificationCtrl',
  303. controllerUrl : 'app/controllers/StoreQualificationCtrl'
  304. })).state('store_info_list', angularAMD.route({
  305. // 店铺列表
  306. url: '/store/list',
  307. templateUrl : 'static/view/admin/store_info_list.html',
  308. controller : 'StoreInfoListCtrl',
  309. controllerUrl : 'app/controllers/StoreInfoListCtrl'
  310. })).state('store_info_detail', angularAMD.route({
  311. // 店铺详情,违规处理页面
  312. url: '/store/:uuid/detail/:type',
  313. templateUrl : 'static/view/admin/store/store_info_detail.html',
  314. controller : 'StoreInfoDetailCtrl',
  315. controllerUrl : 'app/controllers/store/StoreInfoDetailCtrl'
  316. })).state('brand_maintenance_detail', angularAMD.route({
  317. // 品牌维护详情、更新
  318. url: '/brandmaintenance/:uuid',
  319. templateUrl : 'static/view/admin/brand_maintenance_detail.html',
  320. controller : 'BrandMaintenanceDetailCtrl',
  321. controllerUrl : 'app/controllers/BrandMaintenanceDetailCtrl'
  322. })).state('suppliermaintenance', angularAMD.route({
  323. // 供应商维护
  324. url: '/suppliermaintenance/:uuid',
  325. templateUrl : 'static/view/admin/supplier_maintenance.html',
  326. controller : 'supplierMaintenanceCtrl',
  327. controllerUrl : 'app/controllers/supplierMaintenanceCtrl'
  328. })).state('supplierSubmitList', angularAMD.route({
  329. // 供应商申请列表
  330. url: '/supplierSubmitList',
  331. templateUrl : 'static/view/admin/supplier_submit_list.html',
  332. controller : 'SupplierSubmitListCtrl',
  333. controllerUrl : 'app/controllers/SupplierSubmitListCtrl'
  334. })).state('supplierSubmitDetail', angularAMD.route({
  335. // 供应商申请详情
  336. url: '/supplierSubmit/:id',
  337. templateUrl : 'static/view/admin/supplier_submit_detail.html',
  338. controller : 'SupplierSubmitDetailCtrl',
  339. controllerUrl : 'app/controllers/SupplierSubmitDetailCtrl'
  340. })).state('mgr', angularAMD.route({
  341. // 类目审批
  342. url: '/audit/kind',
  343. templateUrl : 'static/view/admin/',
  344. controller : '',
  345. controllerUrl : ''
  346. })).state('audit_component', angularAMD.route({
  347. // 标准器件审批
  348. url: '/audit/component',
  349. templateUrl : 'static/view/admin/audit_component.html',
  350. controller : 'AuditComponentCtrl',
  351. controllerUrl : 'app/controllers/AuditComponentCtrl'
  352. })).state('audit_regulplist', angularAMD.route({
  353. // 规格书审核
  354. url: '/audit/RegulpicList',
  355. templateUrl : 'static/view/admin/RegulpicList.html',
  356. controller : 'AuditRegulpicListCtrl',
  357. controllerUrl : 'app/controllers/AuditRegulpicListCtrl'
  358. })).state('audit_component_detail', angularAMD.route({
  359. // 品牌审批详细页面
  360. url: '/audit/component/:id',
  361. templateUrl : 'static/view/admin/audit_component_detail.html',
  362. controller : 'AuditComponentDetailCtrl',
  363. controllerUrl : 'app/controllers/AuditComponentDetailCtrl'
  364. })).state('audit_componentMaintenance', angularAMD.route({
  365. // 标准器件维护
  366. url: '/audit/componentMaintenance',
  367. templateUrl : 'static/view/admin/audit_componentMaintenance.html',
  368. controller : 'AuditComponentMaintenanceCtrl',
  369. controllerUrl : 'app/controllers/AuditComponentMaintenanceCtrl'
  370. })).state('audit_componentBatchMaintenance', angularAMD.route({
  371. // 审核标准器件批量建档申请
  372. url: '/audit/componentBatchMaintenance',
  373. templateUrl : 'static/view/admin/audit_componentBatchMaintenance.html',
  374. controller : 'AuditComponentBatchMaintenanceCtrl',
  375. controllerUrl : 'app/controllers/AuditComponentBatchMaintenanceCtrl'
  376. })).state('audit_componentBatchMaintenance_detail', angularAMD.route({
  377. // 审核标准器件批量建档申请详情
  378. url: '/audit/componentBatchMaintenance/detail/:submitId',
  379. templateUrl : 'static/view/admin/audit_componentSubmitBatch_detail.html',
  380. controller : 'AuditComponentSubmitBatchDtCtrl',
  381. controllerUrl : 'app/controllers/AuditComponentSubmitBatchDtCtrl'
  382. })).state('audit_componentSubmitBatch_detail_list', angularAMD.route({
  383. // 标准器件批量建档申请详情列表
  384. url: '/audit/componentSubmitBatch/detail/list',
  385. templateUrl : 'static/view/admin/componentSubmitBatch_detail_list.html',
  386. controller : 'ComponentSubmitBatchDetailListCtrl',
  387. controllerUrl : 'app/controllers/ComponentSubmitBatchDetailListCtrl'
  388. })).state('audit_kindCompare', angularAMD.route({
  389. // 属性对应关系维护
  390. url: '/audit/kindContrast',
  391. templateUrl : 'static/view/admin/product/kindContrast.html',
  392. controller : 'KindContrastCtrl',
  393. controllerUrl : 'app/controllers/product/KindContrastCtrl'
  394. })).state('audit_kindCompare_detail', angularAMD.route({
  395. // 属性对应关系维护详情页
  396. url: '/audit/kindContrast/:id',
  397. templateUrl : 'static/view/admin/product/kindContrast_detail.html',
  398. controller : 'KindContrastDetailCtrl',
  399. controllerUrl : 'app/controllers/product/KindContrastDetailCtrl'
  400. })).state('crawl_task', angularAMD.route({
  401. // 数据爬取任务
  402. url: '/audit/crawlTask',
  403. templateUrl : 'static/view/admin/product/crawl_task.html',
  404. controller : 'CrawlTaskCtrl',
  405. controllerUrl : 'app/controllers/product/CrawlTaskCtrl'
  406. })).state('crawl_task_detail', angularAMD.route({
  407. // 数据爬取任务详情页
  408. url: '/audit/crawlTask/:id',
  409. templateUrl : 'static/view/admin/product/crawl_task_detail.html',
  410. controller : 'CrawlTaskDetailCtrl',
  411. controllerUrl : 'app/controllers/product/CrawlTaskDetailCtrl'
  412. })).state('crawl_task_component_list', angularAMD.route({
  413. // 数据爬取任务成功的器件展示页
  414. url: '/audit/crawlTask/:taskId/componentList',
  415. templateUrl : 'static/view/admin/product/crawl_task_component_list.html',
  416. controller : 'CrawlTaskCMPListCtrl',
  417. controllerUrl : 'app/controllers/product/CrawlTaskCMPListCtrl'
  418. })).state('crawl_task_component_detail', angularAMD.route({
  419. // 数据爬取任务成功的器件详情页
  420. url: '/audit/crawlTask/:taskId/component/:uuid',
  421. templateUrl: 'static/view/admin/product/crawl_task_component_detail.html',
  422. controller: 'CrawlTaskCMPDetailCtrl',
  423. controllerUrl: 'app/controllers/product/CrawlTaskCMPDetailCtrl'
  424. })).state('audit_bankinfo', angularAMD.route({
  425. // 银行账户信息管理
  426. url: '/audit/bankinfo',
  427. templateUrl: 'static/view/admin/bankInfo/auditBankInfo.html',
  428. controller: 'AuditBankInfoCtrl',
  429. controllerUrl: 'app/controllers/bankInfo/AuditBankInfoCtrl'
  430. })).state('audit_realAuth', angularAMD.route({
  431. // 实名认证审核
  432. url: '/audit/realAuth',
  433. templateUrl: 'static/view/admin/audit_realAuth.html',
  434. controller: 'AuditRealAuthCtrl',
  435. controllerUrl: 'app/controllers/AuditRealAuthCtrl'
  436. })).state('uploadComponentCrawl', angularAMD.route({
  437. // 上传爬取数据页面
  438. url: '/product/componentCrawl/upload',
  439. templateUrl : 'static/view/admin/product/uploadComponentCrawl.html',
  440. controller : 'UploadComponentCrawlCtrl',
  441. controllerUrl : 'app/controllers/product/UploadComponentCrawlCtrl'
  442. })).state('disable_brand', angularAMD.route({
  443. // 禁用品牌界面
  444. url: '/disable/brand',
  445. templateUrl : 'static/view/admin/disable_brand.html',
  446. controller : 'DisableBrandCtrl',
  447. controllerUrl : 'app/controllers/DisableBrandCtrl'
  448. })).state('disable_component', angularAMD.route({
  449. // 禁用标准器件界面
  450. url: '/disable/component',
  451. templateUrl : 'static/view/admin/disable_component.html',
  452. controller : 'DisableComponentCtrl',
  453. controllerUrl : 'app/controllers/DisableComponentCtrl'
  454. })).state('test', angularAMD.route({
  455. // 数据初始化界面
  456. url: '/test',
  457. templateUrl : 'static/view/admin/test.html',
  458. controller : 'TestCtrl',
  459. controllerUrl : 'app/controllers/TestCtrl'
  460. })).state('logistics_pickUpAddress', angularAMD.route({
  461. // 上门自取地址管理界面
  462. url: '/logistics/pickUpAddress',
  463. templateUrl : 'static/view/admin/logistics/logistics_pickUpAddress.html',
  464. controller : 'LogisticsPickUpAddressCtrl',
  465. controllerUrl : 'app/controllers/logistics/LogisticsPickUpAddressCtrl'
  466. })).state('logistics_pickUpAddressNew', angularAMD.route({
  467. // 新增上门自取地址
  468. url: '/logistics/pickUpAddress/new',
  469. templateUrl : 'static/view/admin/logistics/pickUpAddress_add.html',
  470. controller : 'PickUpAddressAddCtrl',
  471. controllerUrl : 'app/controllers/logistics/PickUpAddressAddCtrl'
  472. })).state('logistics_pickUpAddress_add', angularAMD.route({
  473. // 修改上门自取地址
  474. url: '/logistics/pickUpAddress/:id',
  475. templateUrl : 'static/view/admin/logistics/pickUpAddress_add.html',
  476. controller : 'PickUpAddressAddCtrl',
  477. controllerUrl : 'app/controllers/logistics/PickUpAddressAddCtrl'
  478. })).state('tool_test', angularAMD.route({
  479. // 测试类的
  480. url: '/tool/test',
  481. templateUrl : 'static/view/admin/tool/test.html',
  482. controller : 'ToolTestCtrl',
  483. controllerUrl : 'app/controllers/logistics/ToolTestCtrl'
  484. })).state('platform_repository', angularAMD.route({
  485. // 平台仓储管理
  486. url: '/platform/repository',
  487. templateUrl : 'static/view/admin/platform_repository.html',
  488. controller : 'PlatformRepository',
  489. controllerUrl : 'app/controllers/PlatformRepository',
  490. title : '管理平台收发货地址'
  491. })).state('credit_card', angularAMD.route({
  492. url : '/check/credit',
  493. templateUrl : 'static/view/admin/checkMoney/creditCardAdmin.html',
  494. controller : 'creditCardAdminCtrl',
  495. controllerUrl : 'app/controllers/checkMoney/creditCardAdminCtrl'
  496. })).state('orderBillAdmin', angularAMD.route({
  497. url : '/order/bill/admin',
  498. templateUrl : 'static/view/admin/checkMoney/orderBillAdmin.html',
  499. controller : 'orderBillAdminCtrl',
  500. controllerUrl : 'app/controllers/checkMoney/orderBillAdminCtrl'
  501. })).state('purchaseBillAdmin', angularAMD.route({
  502. url : '/purchase/bill/admin',
  503. templateUrl : 'static/view/admin/checkMoney/purchaseBillAdmin.html',
  504. controller : 'purchaseBillAdminCtrl',
  505. controllerUrl : 'app/controllers/checkMoney/purchaseBillAdminCtrl'
  506. })).state('billInfoAdmin', angularAMD.route({
  507. url : '/billInfo/admin',
  508. templateUrl : 'static/view/admin/checkMoney/billInfoAdmin.html',
  509. controller : 'billInfoAdminCtrl',
  510. controllerUrl : 'app/controllers/checkMoney/billInfoAdminCtrl'
  511. })).state('bill_input', angularAMD.route({
  512. url : '/billInput/revise/:id',
  513. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  514. controller : 'BillInputCtrl',
  515. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  516. resolve: {
  517. isNormal: function() {return 1207;}
  518. }
  519. })).state('bill_input_normal', angularAMD.route({
  520. url : '/billInput/normal',
  521. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  522. controller : 'BillInputCtrl',
  523. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  524. resolve: {
  525. isNormal: function() {return 1206;}
  526. }
  527. })).state('bill_input_special', angularAMD.route({
  528. url : '/billInput/special',
  529. templateUrl : 'static/view/admin/checkMoney/billInput.html',
  530. controller : 'BillInputCtrl',
  531. controllerUrl : 'app/controllers/checkMoney/BillInputCtrl',
  532. resolve: {
  533. isNormal: function() {return 1205;}
  534. }
  535. })).state('bill_notice', angularAMD.route({
  536. url : '/bill/notice',
  537. templateUrl : 'static/view/admin/checkMoney/billNotice.html'
  538. })).state('makeDemand', angularAMD.route({
  539. url : '/makeDemand/admin',
  540. templateUrl : 'static/view/admin/customService/makeDemandList.html',
  541. controller : 'makeDemandListCtrl',
  542. controllerUrl : 'app/controllers/customService/makeDemandList'
  543. })).state('maDemandInput', angularAMD.route({
  544. url : '/makeDemand/:id/input/:input',
  545. templateUrl : 'static/view/admin/customService/makeDemandInput.html',
  546. controller : 'makeDemandInputCtrl',
  547. controllerUrl : 'app/controllers/customService/makeDemandInput'
  548. })).state('ReviewerEmailInfo', angularAMD.route({
  549. //审核人邮箱设置
  550. url : '/ReviewerEmailInfo/admin',
  551. templateUrl : 'static/view/admin/customService/ReviewerEmailInfo.html',
  552. controller : 'ReviewerEmailInfoCtrl',
  553. controllerUrl : 'app/controllers/customService/ReviewerEmailInfo'
  554. })).state('goodsStatistics', angularAMD.route({
  555. // 在售商品信息统计
  556. url : '/trade/goodsStatistics',
  557. templateUrl : 'static/view/admin/trade/trade_goods_statistics.html',
  558. controller : 'goodsStatisticsCtrl',
  559. controllerUrl : 'app/controllers/trade/goodsStatisticsCtrl'
  560. })).state('overtimeBatch', angularAMD.route({
  561. // 即将失效批次列表
  562. url : '/product/overtimeBatch',
  563. templateUrl : 'static/view/admin/product/overtimeBatch.html',
  564. controller : 'overtimeBatchCtrl',
  565. controllerUrl : 'app/controllers/product/overtimeBatchCtrl'
  566. })).state('validtime', angularAMD.route({
  567. // 批次有效期维护
  568. url : '/product/validtime',
  569. templateUrl : 'static/view/admin/product/validtime.html',
  570. controller : 'validtimeCtrl',
  571. controllerUrl : 'app/controllers/product/validtimeCtrl'
  572. })).state('sailingGoods', angularAMD.route({
  573. // 销售中的产品
  574. url : '/product/sailingGoods',
  575. templateUrl : 'static/view/admin/product/salingGoods.html',
  576. controller : 'sailingGoodsCtrl',
  577. controllerUrl : 'app/controllers/product/sailingGoodsCtrl'
  578. })).state('downedGoods', angularAMD.route({
  579. url : '/product/downedGoods',
  580. templateUrl : 'static/view/admin/product/downedGoods.html',
  581. controller : 'downedGoodsCtrl',
  582. controllerUrl : 'app/controllers/product/downedGoodsCtrl'
  583. })).state('proeprty', angularAMD.route({
  584. // 维护属性
  585. url: '/properties',
  586. templateUrl : 'static/view/admin/product/product_properties.html',
  587. controller : 'PropertiesCtrl',
  588. controllerUrl : 'app/controllers/product/PropertiesCtrl',
  589. title: '属性维护'
  590. })).state('kind', angularAMD.route({
  591. // 维护产品类目
  592. url: '/kinds',
  593. templateUrl : 'static/view/admin/product/product_kind.html',
  594. controller : 'KindCtrl',
  595. controllerUrl : 'app/controllers/product/KindCtrl',
  596. title: '类目维护'
  597. })).state('kindProperty', angularAMD.route({
  598. // 维护器件类目的属性
  599. url: '/kindProperty',
  600. templateUrl: 'static/view/admin/product/product_kindProperty.html',
  601. controller: 'KindPropertyCtrl',
  602. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  603. title: '类目属性维护'
  604. })).state('moveCmp', angularAMD.route({
  605. // 批量修改器件类目
  606. url: '/moveCmp',
  607. templateUrl: 'static/view/admin/product/moveCmp.html',
  608. controller: 'MoveCmpCtrl',
  609. controllerUrl: 'app/controllers/product/MoveCmpCtrl',
  610. title: '批量修改器件类目'
  611. })).state('kindProperty.step1', angularAMD.route({
  612. // 维护器件类目的属性,第一步选择类目
  613. url: '/1',
  614. templateUrl: 'static/view/admin/product/product_kindProperty_1.html',
  615. controller: 'KindProperty_1Ctrl',
  616. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  617. title: '选择要维护的类目'
  618. })).state('kindProperty.step2', angularAMD.route({
  619. // 维护器件类目的属性,第二步维护描述属性
  620. url: '/2/:kindId',
  621. templateUrl: 'static/view/admin/product/product_kindProperty_2.html',
  622. controller: 'KindProperty_2Ctrl',
  623. controllerUrl: 'app/controllers/product/KindPropertyCtrl',
  624. title: '维护类目的属性'
  625. })).state('kindAdvice', angularAMD.route({
  626. // 首页展示(轮播图片管理)
  627. url: '/kindAdvice',
  628. templateUrl: 'static/view/admin/product/kindAdvice.html',
  629. controller: 'KindAdviceCtrl',
  630. controllerUrl: 'app/controllers/product/KindAdviceCtrl',
  631. title: '轮播图片管理'
  632. })).state('logUsage', angularAMD.route({
  633. //用户操作日志
  634. url: '/logUsage',
  635. templateUrl: 'static/view/admin/logUsage.html',
  636. controller: 'LogUsageCtrl',
  637. controllerUrl: 'app/controllers/LogUsageCtrl',
  638. title: '用户操作日志'
  639. })).state('seekQualityBuyer', angularAMD.route({
  640. // 求购优质采购商
  641. url: '/seekQualityBuyer',
  642. templateUrl: 'static/view/admin/seekQualityBuyer.html',
  643. controller: 'SeekQualityBuyerCtrl',
  644. controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
  645. title: '求购优质采购商'
  646. })).state('seekSalesman', angularAMD.route({
  647. // 求购业务员分配
  648. url: '/seekSalesman',
  649. templateUrl: 'static/view/admin/seek_salesman.html',
  650. controller: 'SeekSalesmanCtrl',
  651. controllerUrl: 'app/controllers/SeekSalesmanCtrl',
  652. title: '求购业务员分配'
  653. })).state('seekSalesmanDetail', angularAMD.route({
  654. // 求购业务员分配详情
  655. url: '/seekSalesman/{uuid}/{name}',
  656. templateUrl: 'static/view/admin/seek_salesman_detail.html',
  657. controller: 'SeekSalesmanDetailCtrl',
  658. controllerUrl: 'app/controllers/SeekSalesmanDetailCtrl',
  659. title: '求购业务员分配详情'
  660. })).state('seekManage', angularAMD.route({
  661. // 求购信息管理
  662. url: '/seekManage',
  663. templateUrl: 'static/view/admin/seek_manage.html',
  664. controller: 'SeekManageCtrl',
  665. controllerUrl: 'app/controllers/SeekManageCtrl',
  666. title: '求购业务员分配'
  667. })).state('keyWord', angularAMD.route({
  668. url: '/keyWord',
  669. templateUrl: 'static/view/admin/keyword.html',
  670. controller: 'KeyWordCtrl',
  671. controllerUrl: 'app/controllers/KeyWordCtrl',
  672. title: '非法关键词维护'
  673. })).state('slideImage', angularAMD.route({
  674. // 首页展示(轮播图片管理)
  675. url: '/operation/slideImage',
  676. templateUrl: 'static/view/admin/operation/slideImage.html',
  677. controller: 'SlideImageCtrl',
  678. controllerUrl: 'app/controllers/operation/SlideImageCtrl',
  679. title: '轮播图片管理'
  680. })).state('secQuestion', angularAMD.route({
  681. // 密保问题维护
  682. url: '/secQuestion',
  683. templateUrl: 'static/view/admin/sec_question.html',
  684. controller: 'SecQuestionCtrl',
  685. controllerUrl: 'app/controllers/SecQuestionCtrl',
  686. title: '密保问题维护'
  687. })).state('logisticsCompany', angularAMD.route({
  688. // 首页展示(快递公司管理)
  689. url: '/logistics/company',
  690. templateUrl: 'static/view/admin/logistics/logistics_company.html',
  691. controller: 'LogisticsCompanyCtrl',
  692. controllerUrl: 'app/controllers/logistics/LogisticsCompanyCtrl',
  693. title: '快递公司管理'
  694. })).state('payavailable', angularAMD.route({
  695. //买家付款有效时间
  696. url: '/pay/available',
  697. templateUrl: 'static/view/admin/checkMoney/payAvailable.html',
  698. controller: 'payAvailableCtrl',
  699. controllerUrl: 'app/controllers/checkMoney/payAvailable',
  700. title: '买家付款有效时间'
  701. })).state('exchangerate', angularAMD.route({
  702. //汇率
  703. url: '/pay/exchangerate',
  704. templateUrl: 'static/view/admin/checkMoney/exchangerate.html',
  705. controller: 'exchangeRateCtrl',
  706. controllerUrl: 'app/controllers/checkMoney/exchangeRate',
  707. title: '汇率'
  708. })).state('delaytime', angularAMD.route({
  709. //汇率
  710. url: '/logistics/delaytime',
  711. templateUrl: 'static/view/admin/logistics/delayTime.html',
  712. controller: 'DelayTimeCtrl',
  713. controllerUrl: 'app/controllers/logistics/DelayTime',
  714. title: '汇率'
  715. })).state('exceptionApply', angularAMD.route({
  716. //异常申请
  717. url : '/trade/purchase/exceptionApply/:purchaseid',
  718. templateUrl: 'static/view/admin/trade/trade_exceptionProcessing.html',
  719. controller: 'exceptionApplyCtrl',
  720. controllerUrl: 'app/controllers/trade/exceptionApply',
  721. title: '异常申请'
  722. })).state('openBill', angularAMD.route({
  723. url : 'trade/open/bill/:id',
  724. templateUrl : 'static/view/admin/openBill.html',
  725. controller: 'openBillCtrl',
  726. controllerUrl: 'app/controllers/openBillCtrl',
  727. title: '开发票'
  728. })).state('messageBoard', angularAMD.route({
  729. // 留言板
  730. url : '/operation/messageBoard',
  731. templateUrl: 'static/view/admin/operation/messageBoard.html',
  732. controller: 'MessageBoardCtrl',
  733. controllerUrl: 'app/controllers/operation/MessageBoardCtrl',
  734. title: '留言板'
  735. })).state('messageBoardDetail', angularAMD.route({
  736. // 留言板详情
  737. url : '/operation/messageBoard/:id',
  738. templateUrl: 'static/view/admin/operation/messageBoard_dt.html',
  739. controller: 'MessageBoardDetailCtrl',
  740. controllerUrl: 'app/controllers/operation/MessageBoardDetailCtrl',
  741. title: '留言板'
  742. })).state('helpMaintenance', angularAMD.route({
  743. // 帮助中心导航维护
  744. url : '/help/maintenance',
  745. templateUrl: 'static/view/admin/help/maintenance.html',
  746. controller: 'HelpMaintenanceCtrl',
  747. controllerUrl: 'app/controllers/help/HelpMaintenanceCtrl',
  748. title: '帮助中心导航维护'
  749. })).state('helpPublish', angularAMD.route({
  750. // 帮助中心发布
  751. url : '/help/publish',
  752. templateUrl: 'static/view/admin/help/publish.html',
  753. controller: 'HelpPublishCtrl',
  754. controllerUrl: 'app/controllers/help/HelpPublishCtrl',
  755. title: '帮助中心发布'
  756. })).state('helpEdit', angularAMD.route({
  757. // 帮助中心文章编辑
  758. url : '/help/edit',
  759. templateUrl: 'static/view/admin/help/edit.html',
  760. controller: 'HelpEditCtrl',
  761. controllerUrl: 'app/controllers/help/HelpEditCtrl',
  762. title: '帮助中心文章编辑'
  763. })).state('helpDetail', angularAMD.route({
  764. // 帮助中心文章详情
  765. url : '/help/issue/:id',
  766. templateUrl: 'static/view/admin/help/detail.html',
  767. controller: 'HelpDetailCtrl',
  768. controllerUrl: 'app/controllers/help/HelpDetailCtrl',
  769. title: '帮助中心文章详情'
  770. })).state('notifyShipTime', angularAMD.route({
  771. // 买家提醒发货时间条件
  772. url : '/buyer/notifyShip',
  773. templateUrl: 'static/view/admin/notifyShipTime.html',
  774. controller: 'HotifyShipTimeCtrl',
  775. controllerUrl: 'app/controllers/HotifyShipTime',
  776. title: '买家提醒发货时间条件'
  777. })).state('automaticReceiving', angularAMD.route({
  778. // 买家提醒发货时间条件
  779. url : '/buyer/automaticReceiving',
  780. templateUrl: 'static/view/admin/automaticReceiving.html',
  781. controller: 'AutomaticReceivingCtrl',
  782. controllerUrl: 'app/controllers/AutomaticReceiving',
  783. title: '买家提醒发货时间条件'
  784. })).state('downAllGoodsByEnterprise', angularAMD.route({
  785. //下架该公司所有的商品
  786. url : '/product/downAllGoodsByEnterprise',
  787. templateUrl: 'static/view/admin/product/downGoodsByEnterprise.html',
  788. controller: 'downGoodsByEnterpriseCtrl',
  789. controllerUrl: 'app/controllers/product/downGoodsByEnterprise',
  790. title: '下架公司产品'
  791. })).state('adsBrand', angularAMD.route({
  792. //品牌推广
  793. url : '/ads/brand',
  794. templateUrl: 'static/view/admin/ads/ads_brand.html',
  795. controller: 'adsBrandCtrl',
  796. controllerUrl: 'app/controllers/ads/ads_brand',
  797. title: '品牌推广'
  798. })).state('adsComponent', angularAMD.route({
  799. //品牌推广
  800. url : '/ads/component',
  801. templateUrl: 'static/view/admin/ads/ads_component.html',
  802. controller: 'adsComponentCtrl',
  803. controllerUrl: 'app/controllers/ads/ads_component',
  804. title: '器件推广'
  805. })).state('searchSee', angularAMD.route({
  806. //搜索预览
  807. url : '/search/see',
  808. templateUrl: 'static/view/admin/search/search_See.html',
  809. controller: 'SearchSeeBrandCtrl',
  810. controllerUrl: 'app/controllers/search/search_See',
  811. title: '搜索预览'
  812. })).state('internalMessage', angularAMD.route({
  813. // 消息列表
  814. url: '/internalMessages',
  815. templateUrl: 'static/view/admin/common/message/internalMessageList.html',
  816. controller: 'internalMessageListCtrl',
  817. controllerUrl: 'app/controllers/common/message/internalMessageListCtrl',
  818. title: '消息列表'
  819. })).state('loanApplyList', angularAMD.route({
  820. // 消息列表
  821. url: '/fa/loanApply',
  822. templateUrl: 'static/view/admin/fa/loanApplyList.html',
  823. controller: 'LoanApplyListCtrl',
  824. controllerUrl: 'app/controllers/fa/LoanApplyListCtrl',
  825. title: '贷款申请列表'
  826. })).state('b2bManage', angularAMD.route({
  827. // b2b后台管理
  828. url: '/b2b/manage',
  829. templateUrl: 'static/view/admin/b2b/manage.html',
  830. controller: 'b2bManageCtrl',
  831. controllerUrl: 'app/controllers/b2b/b2bManageCtrl',
  832. title: '贷款申请列表'
  833. })).state('statsData', angularAMD.route({
  834. // b2b后台管理
  835. url: '/statsData',
  836. templateUrl: 'static/view/admin/stats_data.html',
  837. controller: 'statsDataCtrl',
  838. controllerUrl: 'app/controllers/statsDataCtrl',
  839. title: '数据统计数据'
  840. }));
  841. $httpProvider.interceptors.push(['Loading', '$q', function(Loading, $q) {
  842. return {
  843. request: function(cfg){
  844. Loading.show();
  845. return cfg;
  846. },
  847. requestError: function(rejection) {
  848. Loading.hide();
  849. return $q.reject(rejection);
  850. },
  851. response: function(res) {
  852. Loading.hide();
  853. return res;
  854. },
  855. responseError: function(rejection) {
  856. Loading.hide();
  857. return $q.reject(rejection);
  858. }
  859. }
  860. }]);
  861. }]);
  862. app.run(['$rootScope', 'BaseService', '$location', function($rootScope, BaseService, $location) {
  863. $rootScope.rootPath = BaseService.getRootPath();
  864. $rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
  865. $rootScope.$on('$stateChangeSuccess', function(evt, current, previous) {
  866. var _url = $location.absUrl().toString()
  867. if (_url.indexOf('/admin#/index') > -1) {
  868. $rootScope.newShow = true
  869. } else {
  870. $rootScope.newShow = false
  871. }
  872. // window.onmouseup = function() {
  873. // var _url = $location.absUrl().toString()
  874. // if (_url.indexOf('/admin#/index') > -1) {
  875. // $rootScope.newShow = true
  876. // } else {
  877. // $rootScope.newShow = false
  878. // }
  879. // }
  880. });
  881. }]);
  882. // 状态码 -> 描述
  883. app.filter('status', function(){
  884. var statusConfig = {
  885. '100': '录入中',
  886. '101': '已提交',
  887. '102': '已审核',
  888. '103': '未通过',
  889. '104': '已通过',
  890. '313': '已激活',
  891. '316': '已过账',
  892. '310': '未启用',
  893. '311': '待审核',
  894. '312': '未激活',
  895. '350': '未开通',
  896. '351': '已开通',
  897. '317': '已创建'
  898. };
  899. return function(data) {
  900. return statusConfig[data];
  901. }
  902. });
  903. /**
  904. * 店铺类型过滤器
  905. */
  906. app.filter('storeType', function () {
  907. return function (data) {
  908. if (data == 'AGENCY') return '代理商';
  909. if (data == 'DISTRIBUTION') return '经销商';
  910. if (data == 'ORIGINAL_FACTORY') return '原厂';
  911. if (data == 'CONSIGNMENT') return '寄售';
  912. return '暂无类型信息'
  913. };
  914. });
  915. /**
  916. * 店铺状态过滤器
  917. *
  918. * TODO huxz 店铺状态
  919. */
  920. app.filter('storeStatus', function () {
  921. return function (data) {
  922. if (data === 'OPENED') return '已开店';
  923. return '已开店';
  924. };
  925. });
  926. /**
  927. * 店铺编号处理过滤器
  928. */
  929. app.filter('storeId', function () {
  930. return function (data) {
  931. if (data) {
  932. var len = data.toString().length;
  933. while(len < 8) {
  934. data = "0" + data;
  935. len++;
  936. }
  937. return data;
  938. }
  939. return '暂无信息'
  940. };
  941. });
  942. /**
  943. * 列表编号处理过滤器
  944. */
  945. app.filter('indexId', function () {
  946. return function (data) {
  947. if (data) {
  948. var len = data.toString().length;
  949. while(len < 3) {
  950. data = "0" + data;
  951. len++;
  952. }
  953. return data;
  954. }
  955. return '暂无信息'
  956. };
  957. });
  958. app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', function($scope, $window, AuthenticationService) {
  959. $scope.logout = function() {
  960. AuthenticationService.logout().success(function() {
  961. SessionService.removeCookie($rootScope.userInfo.userUU);
  962. });
  963. };
  964. //$scope.isAuthed = AuthenticationService.isLoggedIn();
  965. $scope.userInfo = {};
  966. AuthenticationService.getAuthentication().success(function(data){
  967. $scope.userInfo = data;
  968. if(data == null || !data.uu)
  969. $scope.isAuthed = false;
  970. });
  971. }]);
  972. // 消息
  973. app.controller('adminNewsCtrl', ['$rootScope', '$location', '$scope', 'ngTableParams', 'adminNews', 'toaster', 'BaseService', '$filter', function ($rootScope, $location, $scope, ngTableParams, adminNews, toaster, BaseService, $filter) {
  974. /**
  975. * 分页获取消息
  976. */
  977. var _url = $location.absUrl().toString()
  978. if (_url.indexOf('/admin#/index') > -1) {
  979. $rootScope.newShow = true
  980. }
  981. $scope.newsTableParams = new ngTableParams({
  982. page : 1,
  983. count : 5
  984. }, {
  985. total : 0,
  986. getData : function ($defer, params) {
  987. var param = BaseService.parseParams(params.url());
  988. param.filter = $scope.filter;
  989. adminNews.getNewsList(param, function (data) {
  990. params.total(data.totalElements);
  991. $defer.resolve(data.content);
  992. $scope.totalElements = data.totalElements
  993. data.content.forEach(function (item) {
  994. // if (item.type == "APPLY_PAID_TYPE" || item.type == "CONFIRM_PAID_TYPE" || item.type == "FINANCIAL_SETTLEMENT_TYPE"){
  995. // var _arr = item.content.split(' ')[1];
  996. // item.OrderNumber = _arr
  997. // }
  998. if (item.type == "APPLY_PAID_TYPE") {
  999. item.newsType = '付款申请'
  1000. }
  1001. if (item.type == "CONFIRM_PAID_TYPE") {
  1002. item.newsType = '确认收款'
  1003. }
  1004. if (item.type == "FINANCIAL_SETTLEMENT_TYPE") {
  1005. item.newsType = '财务结算'
  1006. }
  1007. })
  1008. }, function (response) {
  1009. toaster.pop('error', '获取消息列表失败');
  1010. });
  1011. }
  1012. });
  1013. /**
  1014. * 跳转消息详情页
  1015. */
  1016. var enIdFilter = $filter('EncryptionFilter');
  1017. $scope.jumpNewsDetail = function(data) {
  1018. if (data.type == "APPLY_PAID_TYPE") {
  1019. window.location.href = 'admin#/check/request_pay/' + data.sellerenuu
  1020. }
  1021. if (data.type == "CONFIRM_PAID_TYPE") {
  1022. window.location.href = '/admin#/trade/order/' + enIdFilter(data.orderid)
  1023. }
  1024. if (data.type == "FINANCIAL_SETTLEMENT_TYPE") {
  1025. window.location.href = 'admin#/check/settlement'
  1026. }
  1027. // adminNews.read({messageId: data.id, type: data.type}, null, function () {
  1028. // // adminNews.unreadCount({}, function(data){
  1029. // // $scope.unreadCount = data.count;
  1030. // // }, function(res){
  1031. // // toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
  1032. // // });
  1033. // }, function(res){
  1034. // toaster.pop('error' + res.data);
  1035. // });
  1036. }
  1037. /**
  1038. * 点击
  1039. */
  1040. // $scope.newShow = false
  1041. $rootScope.lookNews = function() {
  1042. $rootScope.newShow = !$rootScope.newShow
  1043. }
  1044. /**
  1045. * 选择消息类型
  1046. */
  1047. $scope.showType = false;
  1048. $scope.openType = function () {
  1049. $scope.showType = !$scope.showType;
  1050. }
  1051. $scope.chooseType = function (type) {
  1052. $scope.showType = false;
  1053. $scope.filter = {'type': type};
  1054. $scope.newsTableParams.page(1);
  1055. $scope.newsTableParams.reload();
  1056. }
  1057. }]);
  1058. //币别的过滤器
  1059. app.filter('currencySysmbol', function() {
  1060. return function(moneyParam, currency, add) {
  1061. if(typeof(moneyParam) == 'undefined') {
  1062. moneyParam = 0;
  1063. }
  1064. if(currency == 'RMB') {
  1065. return "¥" + moneyParam + (typeof(add) == "undefined" ? '' : add);
  1066. }else if(currency == "USD"){
  1067. return "$" + moneyParam;
  1068. }else {
  1069. return moneyParam;
  1070. }
  1071. }
  1072. });
  1073. // 币别filter
  1074. app.filter('currencyStr', function () {
  1075. return function (str) {
  1076. return typeof str == 'string' && str != 'RMB' && str != 'USD' ? str.startsWith('RMB') ? '¥' + str.substring(3, str.length) : '$' + str.substring(3, str.length) : '-';
  1077. }
  1078. });
  1079. return app;
  1080. });