content.jsx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. import React, { Component } from 'react';
  2. import '../content.less';
  3. import './content.less';
  4. import LeftTab from '../leftTab';
  5. import { getMenu } from '../publicMenu.js'
  6. // debugger
  7. class Content extends Component {
  8. constructor() {
  9. super();
  10. this.state = {
  11. loading: false,
  12. component: <div></div>,
  13. };
  14. }
  15. componentWillMount() {
  16. var ids = window.location.href.indexOf('rid=');
  17. var idk = window.location.href.substr(ids + 4);
  18. var rid = idk.split('#');
  19. let menu = getMenu(rid);
  20. let curry;
  21. if (menu[0].subMenus.length > 0) {
  22. curry = menu[0].subMenus[0].url.split('#');
  23. } else {
  24. curry = menu[0].url.split('#');
  25. };
  26. if (window.location.hash) {
  27. this.getKey(window.location.hash.substr(1));
  28. } else {
  29. this.getKey(curry[1]);
  30. };
  31. }
  32. getKey(key) {
  33. switch (key) {
  34. //项目暂停&重启审核
  35. case "suspendexamine":
  36. require.ensure([], () => {
  37. const SuspendExamine = require("./orderNew/suspendexamine").default;
  38. this.setState({
  39. component: <SuspendExamine />,
  40. });
  41. });
  42. break;
  43. //我的暂停项目
  44. case "mysuspend":
  45. require.ensure([], () => {
  46. const MySuspend = require("./orderNew/mysuspend").default;
  47. this.setState({
  48. component: <MySuspend />,
  49. });
  50. });
  51. break;
  52. //我的会员项目
  53. case "myprojectvip":
  54. require.ensure([], () => {
  55. const MyProjectVip = require("./orderNew/myprojectvip").default;
  56. this.setState({
  57. component: <MyProjectVip />,
  58. });
  59. });
  60. break;
  61. //科技服务订单
  62. case "myService":
  63. require.ensure([], () => {
  64. const MyService = require("./myOrder/servicesOrder/myService")
  65. .default;
  66. this.setState({
  67. component: <MyService />,
  68. });
  69. });
  70. break;
  71. //催款列表
  72. case "pressList":
  73. require.ensure([], () => {
  74. const PressList = require("./orderNew/pressList").default;
  75. this.setState({
  76. component: <PressList />,
  77. });
  78. });
  79. break;
  80. //开单与签单
  81. case "billing":
  82. require.ensure([], () => {
  83. const Billing = require("./orderNew/billing").default;
  84. this.setState({
  85. component: <Billing />,
  86. });
  87. });
  88. break;
  89. //催款记录
  90. case "pressMoney":
  91. require.ensure([], () => {
  92. const PressMoney = require("./pressMoney").default;
  93. this.setState({
  94. component: <PressMoney />,
  95. });
  96. });
  97. break;
  98. // 统计销售来源
  99. case "census":
  100. require.ensure([], () => {
  101. const PressMoney = require("./source").default;
  102. this.setState({
  103. component: <PressMoney />,
  104. });
  105. });
  106. break;
  107. //订单审核-营销管理员
  108. case "examine":
  109. require.ensure([], () => {
  110. const Examine = require("./orderNew/examine").default;
  111. this.setState({
  112. component: <Examine />,
  113. });
  114. });
  115. break;
  116. //订单审核-营销经理
  117. case "examinejl":
  118. require.ensure([], () => {
  119. const ExamineJL = require("./orderNew/examinejl").default;
  120. this.setState({
  121. component: <ExamineJL />,
  122. });
  123. });
  124. break;
  125. //订单审核-运营保障
  126. case "examineyybz":
  127. require.ensure([], () => {
  128. const ExamineYybz = require("./orderNew/examineyybz").default;
  129. this.setState({
  130. component: <ExamineYybz />,
  131. });
  132. });
  133. break;
  134. //外包审核列表
  135. case "outsourcingList":
  136. require.ensure([], () => {
  137. const OutsourcingList = require("./orderNew/outsourcingList").default;
  138. this.setState({
  139. component: <OutsourcingList />,
  140. });
  141. });
  142. break;
  143. //外包项目审核列表
  144. case "outsourcingPro":
  145. require.ensure([], () => {
  146. const OutsourcingPro = require("./orderNew/OutsourcingPro").default;
  147. this.setState({
  148. component: <OutsourcingPro />,
  149. });
  150. });
  151. break;
  152. //外包审核列表
  153. case "checkOutsourcing":
  154. require.ensure([], () => {
  155. const CheckOutsourcing = require("./orderNew/checkOutsourcing")
  156. .default;
  157. this.setState({
  158. component: <CheckOutsourcing />,
  159. });
  160. });
  161. break;
  162. //驳回管理新
  163. case "reject":
  164. require.ensure([], () => {
  165. const Reject = require("./orderNew/reject").default;
  166. this.setState({
  167. component: <Reject />,
  168. });
  169. });
  170. break;
  171. //退单管理新
  172. case "chargeback":
  173. require.ensure([], () => {
  174. const Chargeback = require("./orderNew/chargeback").default;
  175. this.setState({
  176. component: <Chargeback />,
  177. });
  178. });
  179. break;
  180. //退单管理新
  181. case "approveds":
  182. require.ensure([], () => {
  183. const Approveds = require("./orderNew/approveds").default;
  184. this.setState({
  185. component: <Approveds />,
  186. });
  187. });
  188. break;
  189. // 特批会员项目
  190. case "approvedvipproject":
  191. require.ensure([], () => {
  192. const Approveds = require("./orderNew/approvedvipproject").default;
  193. this.setState({
  194. component: <Approveds />,
  195. });
  196. });
  197. break;
  198. //合同变更审核
  199. case "contractChangeYxy":
  200. require.ensure([], () => {
  201. const ContractChangeYxy = require("./orderNew/contractChangeYxy")
  202. .default;
  203. this.setState({
  204. component: <ContractChangeYxy />,
  205. });
  206. });
  207. break;
  208. //合同变更审核
  209. case "contractChangeYxgly":
  210. require.ensure([], () => {
  211. const ContractChangeYxgly = require("./orderNew/contractChangeYxgly")
  212. .default;
  213. this.setState({
  214. component: <ContractChangeYxgly />,
  215. });
  216. });
  217. break;
  218. //合同变更审核(运营保障)
  219. case "contractChangeYybz":
  220. require.ensure([], () => {
  221. const ContractChangeYybz = require("./orderNew/contractChangeYybz")
  222. .default;
  223. this.setState({
  224. component: <ContractChangeYybz />,
  225. });
  226. });
  227. break;
  228. //合同变更审核
  229. case "contractChangeYxjl":
  230. require.ensure([], () => {
  231. const ContractChangeYxjl = require("./orderNew/contractChangeYxjl")
  232. .default;
  233. this.setState({
  234. component: <ContractChangeYxjl />,
  235. });
  236. });
  237. break;
  238. //合同变更审核
  239. case "contractChangeFzc":
  240. require.ensure([], () => {
  241. const ContractChangeZc = require("./orderNew/contractChangeFzc")
  242. .default;
  243. this.setState({
  244. component: <ContractChangeZc />,
  245. });
  246. });
  247. break;
  248. //合同变更审核
  249. case "contractChangeZc":
  250. require.ensure([], () => {
  251. const ContractChangeZc = require("./orderNew/contractChangeZc")
  252. .default;
  253. this.setState({
  254. component: <ContractChangeZc />,
  255. });
  256. });
  257. break;
  258. //合同变更审核
  259. case "contractChangeDsz":
  260. require.ensure([], () => {
  261. const ContractChangeDsz = require("./orderNew/contractChangeDsz")
  262. .default;
  263. this.setState({
  264. component: <ContractChangeDsz />,
  265. });
  266. });
  267. break;
  268. //订单查询新
  269. case "inquiry":
  270. require.ensure([], () => {
  271. const Inquiry = require("./orderNew/inquiry").default;
  272. this.setState({
  273. component: <Inquiry />,
  274. });
  275. });
  276. break;
  277. //催款统计新
  278. case "press":
  279. require.ensure([], () => {
  280. const Press = require("./orderNew/press").default;
  281. this.setState({
  282. component: <Press />,
  283. });
  284. });
  285. break;
  286. case "arrearsList":
  287. require.ensure([], () => {
  288. const ArrearsList = require("./orderNew/arrearsList").default;
  289. this.setState({
  290. component: <ArrearsList />,
  291. });
  292. });
  293. break;
  294. case "orderStatistics":
  295. require.ensure([], () => {
  296. const OrderStatistics = require("./orderStatistics/orderStatistics")
  297. .default;
  298. this.setState({
  299. component: <OrderStatistics />,
  300. });
  301. });
  302. break;
  303. case "serviceManage":
  304. require.ensure([], () => {
  305. const ServiceManage = require("./departmentOrder/servicesOrder/serviceManage")
  306. .default;
  307. this.setState({
  308. component: <ServiceManage />,
  309. });
  310. });
  311. break;
  312. case "public":
  313. require.ensure([], () => {
  314. const PublicOrder = require("./orderManagement/publicOrder/publicOrder")
  315. .default;
  316. this.setState({
  317. component: <PublicOrder />,
  318. });
  319. });
  320. break;
  321. case "approved":
  322. require.ensure([], () => {
  323. const ApproveOrder = require("./orderManagement/approveOrder/approveOrder")
  324. .default;
  325. this.setState({
  326. component: <ApproveOrder />,
  327. });
  328. });
  329. break;
  330. case "mySettlement":
  331. require.ensure([], () => {
  332. const MySettlement = require("./settlementOrder/mySettlement/mySettlement")
  333. .default;
  334. this.setState({
  335. component: <MySettlement />,
  336. });
  337. });
  338. break;
  339. case "settlementManage":
  340. require.ensure([], () => {
  341. const SettlementManage = require("./settlementOrder/settlementManage/settlementManagement").default;
  342. this.setState({
  343. component: <SettlementManage />,
  344. });
  345. });
  346. break;
  347. case "myBill":
  348. require.ensure([], () => {
  349. const MyBill = require("./flowSettlement/myBill/myBill.jsx").default;
  350. this.setState({
  351. component: <MyBill />,
  352. });
  353. });
  354. break;
  355. case "billManage":
  356. require.ensure([], () => {
  357. const MyBill = require("./flowSettlement/billManage/myBill.jsx")
  358. .default;
  359. this.setState({
  360. component: <MyBill />,
  361. });
  362. });
  363. break;
  364. case "billQuery":
  365. require.ensure([], () => {
  366. const MyBill = require("./flowSettlement/billQuery/myBill.jsx")
  367. .default;
  368. this.setState({
  369. component: <MyBill />,
  370. });
  371. });
  372. break;
  373. case "billManagement":
  374. require.ensure([], () => {
  375. const MyBill = require("./flowSettlement/billManagement/myBill.jsx")
  376. .default;
  377. this.setState({
  378. component: <MyBill />,
  379. });
  380. });
  381. break;
  382. //奖金
  383. case "yxBouns":
  384. require.ensure([], () => {
  385. const MyBill = require("./bonus/yxBonus.jsx").default;
  386. this.setState({
  387. component: <MyBill />,
  388. });
  389. });
  390. break;
  391. //订单新增空白
  392. default:
  393. require.ensure([], () => {
  394. const Module = require("../module").default;
  395. this.setState({
  396. component: <Module />,
  397. });
  398. });
  399. };
  400. window.location.hash = key;
  401. }
  402. render() {
  403. return (
  404. <div className="manage-content">
  405. <LeftTab handlekey={this.getKey.bind(this)} />
  406. <div className="content-right">
  407. {this.state.component}
  408. </div>
  409. </div>
  410. )
  411. }
  412. }
  413. export default Content;