暫無描述

ButtonGroup.cs 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace CallCenterApi.Interface.Models.Common
  6. {
  7. public class ButtonGroup
  8. {
  9. public static button query()
  10. {
  11. return new button(1, "查询");
  12. }
  13. public static button edit()
  14. {
  15. return new button(2, "编辑");
  16. }
  17. public static button delete()
  18. {
  19. return new button(3, "删除");
  20. }
  21. public static button submit()
  22. {
  23. return new button(4, "提交");
  24. }
  25. public static button assign()
  26. {
  27. return new button(5, "交办");
  28. }
  29. public static button approval()
  30. {
  31. return new button(6, "领导批示");
  32. }
  33. public static button instruct()
  34. {
  35. return new button(7, "市长指示");
  36. }
  37. public static button oversee()
  38. {
  39. return new button(8, "督办");
  40. }
  41. public static button supervision()
  42. {
  43. return new button(9, "监察");
  44. }
  45. public static button takeback()
  46. {
  47. return new button(10, "收回");
  48. }
  49. public static button receive()
  50. {
  51. return new button(11, "查收");
  52. }
  53. public static button reback()
  54. {
  55. return new button(12, "退回申请");
  56. }
  57. public static button feedback()
  58. {
  59. return new button(13, "办理");
  60. }
  61. public static button delay()
  62. {
  63. return new button(14, "延时申请");
  64. }
  65. public static button auditreback()
  66. {
  67. return new button(15, "退回审核");
  68. }
  69. public static button visit()
  70. {
  71. return new button(16, "回访");
  72. }
  73. public static button auditdelay()
  74. {
  75. return new button(17, "延时审核");
  76. }
  77. public static button reload()
  78. {
  79. return new button(18, "重办");
  80. }
  81. public static button end()
  82. {
  83. return new button(19, "结案");
  84. }
  85. public static button export()
  86. {
  87. return new button(20, "导出");
  88. }
  89. public static button back()
  90. {
  91. return new button(21, "回退");
  92. }
  93. public static button forceend()
  94. {
  95. return new button(22, "强制结案");
  96. }
  97. public static button split()
  98. {
  99. return new button(23, "派单");
  100. }
  101. public static button auditdeal()
  102. {
  103. return new button(24, "处理审核");
  104. }
  105. public static button sign()
  106. {
  107. return new button(25, "签收");
  108. }
  109. public static button refuse()
  110. {
  111. return new button(26, "拒收");
  112. }
  113. public static button withdraw()
  114. {
  115. return new button(27, "撤单");
  116. }
  117. public static button audit()
  118. {
  119. return new button(28, "审核");
  120. }
  121. public static button turnsee()
  122. {
  123. return new button(29, "转督办");
  124. }
  125. public static button turnnosee()
  126. {
  127. return new button(30, "不督办");
  128. }
  129. public static button subreload()
  130. {
  131. return new button(31, "提交重办");
  132. }
  133. public static button reject()
  134. {
  135. return new button(32, "驳回重办");
  136. }
  137. public static button perform()
  138. {
  139. return new button(33, "履职界定");
  140. }
  141. public static button performaudit()
  142. {
  143. return new button(34, "界定审核");
  144. }
  145. public static button turndown()
  146. {
  147. return new button(35, "拒绝");
  148. }
  149. public static button redo()
  150. {
  151. return new button(36, "退回");
  152. }
  153. public static button EJredo()
  154. {
  155. return new button(38, "退回");
  156. }
  157. public static button modify()
  158. {
  159. return new button(40, "修改");
  160. }
  161. public static button Check()
  162. {
  163. return new button(41, "查收");
  164. }
  165. public static button Approved()
  166. {
  167. return new button(42, "审核通过");
  168. }
  169. public static button Auditreject()
  170. {
  171. return new button(43, "审核拒绝");
  172. }
  173. public static button Signfor()
  174. {
  175. return new button(44, "签收");
  176. }
  177. public static button Sendback()
  178. {
  179. return new button(45, "退回");
  180. }
  181. public static button delayback()
  182. {
  183. return new button(46, "退回申请延时");
  184. }
  185. public static button visits()
  186. {
  187. return new button(47, "省平台结案");
  188. }
  189. public static button ejdelay()
  190. {
  191. return new button(48, "省平台申请延时");
  192. }
  193. public static button Report()
  194. {
  195. return new button(49, "上报");
  196. }
  197. public static button Unsuccessful()
  198. {
  199. return new button(50, "已办未果");
  200. }
  201. public static button VisitApproved()
  202. {
  203. return new button(51, "审核通过");
  204. }
  205. public static button Auditfailed()
  206. {
  207. return new button(52, "审核不通过");
  208. }
  209. public static button Audittransfer()
  210. {
  211. return new button(53, "审核通过转办");
  212. }
  213. public static button AuditDispatch()
  214. {
  215. return new button(54, "审核通过");
  216. }
  217. public static button Failed()
  218. {
  219. return new button(55, "审核不通过");
  220. }
  221. public static button Explain()
  222. {
  223. return new button(56, "解释");
  224. }
  225. public static button AuditReturn()
  226. {
  227. return new button(58, "退回审核");
  228. }
  229. public static button Append()
  230. {
  231. return new button(59, "追加回复");
  232. }
  233. public static button Note()
  234. {
  235. return new button(60, "注解");
  236. }
  237. public static button Urge()
  238. {
  239. return new button(61, "催办");
  240. }
  241. public static button SpotCheck()
  242. {
  243. return new button(62, "抽查");
  244. }
  245. /// <summary>
  246. /// 审核员退回
  247. /// </summary>
  248. /// <returns></returns>
  249. public static button subback()
  250. {
  251. return new button(39, "退回");
  252. }
  253. #region 知识库操作按钮
  254. public static button zsk_query()
  255. {
  256. return new button(1, "查询");
  257. }
  258. public static button zsk_edit()
  259. {
  260. return new button(2, "编辑");
  261. }
  262. public static button zsk_delete()
  263. {
  264. return new button(3, "删除");
  265. }
  266. public static button zsk_submit()
  267. {
  268. return new button(4, "提交");
  269. }
  270. public static button zsk_audit()
  271. {
  272. return new button(5, "审核");
  273. }
  274. public static button zsk_solved()
  275. {
  276. return new button(6, "解决");
  277. }
  278. public static button zsk_unsolved()
  279. {
  280. return new button(7, "未解决");
  281. }
  282. #endregion
  283. /// <summary>
  284. /// 按钮类
  285. /// </summary>
  286. public class button
  287. {
  288. public int key { get; set; }
  289. public string value { get; set; }
  290. public button(int _key, string _value)
  291. {
  292. key = _key;
  293. value = _value;
  294. }
  295. }
  296. /// <summary>
  297. /// 根据状态和角色代码获取操作按钮
  298. /// </summary>
  299. /// <param name="state"></param>
  300. /// <param name="code"></param>
  301. /// <param name="iszb"></param>
  302. /// <returns></returns>
  303. public static List<button> GetButtons(string state, string code, string iszb = "", string iszbdw = "", string ispd = ""
  304. , int isproresult = 0, string InfoSource = "", int issh = 0)
  305. {
  306. //中心话务员(ZXHWY) 二级网络单位(WLDW) 管理员(GLY) 坐席班长(ZXBZ) 调度专员(ZXLD)
  307. //中心领导管理员(ZXLDGLYGLY) 话务主管(ZXBZ) 中心领导(ZXLDGLY) 话务组长(ZXBZ)
  308. //导播话务员(DBHWY) 网易新闻(11) 三级网络单位(EJWLDW) 民生播报(MSBB)
  309. //督办专员(DBZY) 质检专员(ZJZY)
  310. //调度主管(DDZG)审核组SPZ 审核质检组SPZJZ
  311. List<button> buttons = new List<button>();
  312. buttons.Add(query());
  313. switch (state)
  314. {
  315. case "0":
  316. if (InfoSource == "2580")
  317. {
  318. if (code == "ZXBZ" || code == "SPZ" || code == "SPZJZ" || code == "GLY" || code == "DDZG" || code == "ZXHWY" || code == "ZXLD")
  319. {
  320. buttons.Add(Signfor());
  321. buttons.Add(Sendback());
  322. buttons.Add(delayback());
  323. }
  324. }
  325. else
  326. {
  327. //调度专员 质检专员可以进行编辑 zhengbingbing 20191017
  328. if (code == "ZXLD" || code == "ZJZY")
  329. buttons.Add(edit());
  330. if (code == "ZXLD")
  331. buttons.Add(delete());
  332. //中心话务员 坐席班长 管理员
  333. if (code == "ZXBZ" || code == "SPZ" || code == "SPZJZ" || code == "GLY" || code == "DDZG")
  334. {
  335. buttons.Add(delete());
  336. buttons.Add(turnsee());
  337. }
  338. if (code == "ZXHWY")
  339. {
  340. buttons.Add(submit());
  341. buttons.Add(edit());
  342. }
  343. }
  344. break;
  345. case "1":
  346. //质检专员可以进行编辑 zhengbingbing 20191017
  347. if (code == "ZJZY")
  348. buttons.Add(edit());
  349. //调度专员 中心领导管理员 管理员
  350. if (code == "ZXLD" || code == "GLY" || code == "ZXLDGLYGLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  351. {
  352. buttons.Add(edit());
  353. buttons.Add(back());
  354. }
  355. if (code == "ZXHWY")
  356. {//待审核交办时可撤单
  357. buttons.Add(withdraw());
  358. }
  359. break;
  360. case "2":
  361. //二级网络单位 管理员
  362. if (code == "GLY" || code == "WLDW")
  363. {
  364. buttons.Add(receive());
  365. }
  366. //调度专员 中心领导管理员 管理员
  367. if (code == "ZXLD" || code == "SPZ" || code == "SPZJZ" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG")
  368. {
  369. buttons.Add(takeback());
  370. buttons.Add(edit());
  371. }
  372. break;
  373. case "3":
  374. //调度专员 中心领导管理员 管理员
  375. if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  376. {
  377. buttons.Add(auditreback()); buttons.Add(turnsee());
  378. }
  379. break;
  380. case "4":
  381. //二级网络单位 管理员
  382. if (code == "WLDW" || code == "DDZG")
  383. {
  384. buttons.Add(feedback());// buttons.Add(reback());
  385. if (iszbdw == "1" || code == "GLY" || code == "DDZG")
  386. {
  387. if (InfoSource == "2580")
  388. buttons.Add(ejdelay());
  389. else
  390. buttons.Add(delay());
  391. if (ispd == "0" || ispd == "")
  392. {
  393. buttons.Add(split());
  394. }
  395. else
  396. {
  397. buttons.Add(withdraw());
  398. }
  399. if (ispd == "3")
  400. {
  401. buttons.Add(auditdeal());
  402. }
  403. }
  404. }
  405. //调度专员 中心领导管理员 管理员
  406. if (code == "ZXLD" || code == "SPZ" || code == "SPZJZ" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG")
  407. {
  408. buttons.Add(takeback());
  409. buttons.Add(edit());
  410. // buttons.Add(edit());
  411. // buttons.Add(turnsee()); //buttons.Add(oversee());
  412. // buttons.Add(supervision());
  413. }
  414. //质检专员
  415. // if (code == "ZJZY" )
  416. // buttons.Add(turnsee());
  417. //三级网络单位
  418. if (code == "EJWLDW")
  419. {
  420. if (ispd == "1")
  421. {
  422. buttons.Add(sign()); //buttons.Add(refuse());
  423. }
  424. if (ispd == "2")
  425. {
  426. // buttons.Add(EJredo());
  427. //三级单位签收后,加个退回按钮,可以退回工单到二级单位,退回时必须输入退回原因
  428. buttons.Add(feedback());
  429. //三级单位签收后,加个退回按钮,可以退回工单到二级单位,退回时必须输入退回原因
  430. }
  431. }
  432. break;
  433. case "5":
  434. //调度专员 中心领导管理员 管理员
  435. if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  436. {
  437. // buttons.Add(edit());
  438. buttons.Add(auditdelay());
  439. }
  440. //三级网络单位
  441. if (code == "EJWLDW")
  442. {
  443. if (ispd == "1")
  444. {
  445. buttons.Add(sign()); //buttons.Add(refuse());
  446. }
  447. if (ispd == "2")
  448. {
  449. buttons.Add(feedback());
  450. }
  451. }
  452. break;
  453. case "6":
  454. #region
  455. //中心话务员 坐席班长 管理员
  456. //if (code == "ZXHWY" || code == "ZXBZ" || code == "GLY")
  457. //{
  458. // buttons.Add(visit());
  459. //}
  460. //20190315提出需求,回访由质检人员操作 (20190327 zhengbingbing)
  461. #endregion
  462. //质检专员(ZJZY)
  463. if (isproresult != 0)
  464. {
  465. if (isproresult == 2)
  466. {
  467. if (code == "WLDW")
  468. {
  469. buttons.Add(feedback());
  470. }
  471. }
  472. //else if (isproresult == 3)
  473. //{
  474. // if (code == "ZJZY" || code == "GLY" || code == "ZXLD" || code == "YSZY" || code == "DDZG" || code == "MTDD")
  475. // {
  476. // if (user=="省平台")
  477. // buttons.Add(visits());
  478. // else
  479. // buttons.Add(visit());
  480. // // buttons.Add(modify());
  481. // }
  482. // if (code == "ZXHWY")
  483. // {
  484. // if (user == "省平台")
  485. // buttons.Add(visits());
  486. // else
  487. // buttons.Add(visit());
  488. // }
  489. //}
  490. //调度专员 中心领导管理员 管理员
  491. //三级网络单位
  492. if (code == "EJWLDW")
  493. {
  494. if (ispd == "2")
  495. {
  496. buttons.Add(feedback());
  497. }
  498. }
  499. }
  500. else
  501. {
  502. if (code == "ZJZY" || code == "GLY" || code == "ZXLD" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  503. {
  504. buttons.Add(VisitApproved());
  505. buttons.Add(Auditfailed());
  506. buttons.Add(Audittransfer());
  507. }
  508. if (code == "ZXHWY")
  509. {
  510. // buttons.Add(subback());
  511. // buttons.Add(visit());
  512. buttons.Add(VisitApproved());
  513. buttons.Add(Auditfailed());
  514. buttons.Add(Audittransfer());
  515. }
  516. }
  517. break;
  518. //case "6":
  519. // //调度专员 中心领导管理员 管理员
  520. // //if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY")
  521. // if (isproresult != 0)
  522. // {
  523. // if (isproresult == 2)
  524. // {
  525. // if (code == "WLDW" || code == "GLY" || code == "DDZG")
  526. // {
  527. // buttons.Add(feedback());
  528. // }
  529. // }
  530. // else if (isproresult == 3)
  531. // {
  532. // if (code == "ZJZY" || code == "GLY" || code == "ZXLD" || code == "YSZY" || code == "DDZG" || code == "MTDD")
  533. // {
  534. // if (user == "省平台")
  535. // buttons.Add(visits());
  536. // else
  537. // buttons.Add(visit());
  538. // // buttons.Add(modify());
  539. // }
  540. // if (code == "ZXHWY")
  541. // {
  542. // if (user == "省平台")
  543. // buttons.Add(visits());
  544. // else
  545. // buttons.Add(visit());
  546. // }
  547. // }
  548. // //调度专员 中心领导管理员 管理员
  549. // //三级网络单位
  550. // if (code == "EJWLDW")
  551. // {
  552. // if (ispd == "2")
  553. // {
  554. // buttons.Add(feedback());
  555. // }
  556. // }
  557. // }
  558. // else
  559. // {
  560. // if (code == "ZJZY" || code == "GNZY" || code == "GLY" || code == "ZXLD" || code == "YSZY" || code == "DDZG" || code == "MTDD")
  561. // {
  562. // buttons.Add(visit());
  563. // buttons.Add(subback());
  564. // buttons.Add(modify());
  565. // }
  566. // if (code == "ZXHWY")
  567. // {
  568. // buttons.Add(subback());
  569. // buttons.Add(visit());
  570. // }
  571. // }
  572. // break;
  573. case "7":
  574. //调度专员 中心领导管理员 管理员
  575. //if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY")
  576. if (isproresult != 0)
  577. {
  578. if (isproresult == 2)
  579. {
  580. if (code == "WLDW")
  581. {
  582. buttons.Add(feedback());
  583. }
  584. }
  585. else if (isproresult == 3)
  586. {
  587. if (code == "ZJZY" || code == "GLY" || code == "ZXLD" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  588. {
  589. if (InfoSource == "2580")
  590. buttons.Add(visits());
  591. else
  592. buttons.Add(visit());
  593. // buttons.Add(modify());
  594. buttons.Add(Note());
  595. }
  596. if (code == "ZXHWY")
  597. {
  598. if (InfoSource == "2580")
  599. buttons.Add(visits());
  600. else
  601. buttons.Add(visit());
  602. buttons.Add(Note());
  603. }
  604. }
  605. //调度专员 中心领导管理员 管理员
  606. //三级网络单位
  607. if (code == "EJWLDW")
  608. {
  609. if (ispd == "2")
  610. {
  611. buttons.Add(feedback());
  612. }
  613. }
  614. }
  615. else
  616. {
  617. if (code == "ZJZY" || code == "GLY" || code == "ZXLD" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  618. {
  619. if (InfoSource == "2580")
  620. buttons.Add(visits());
  621. else
  622. buttons.Add(visit());
  623. buttons.Add(subback());
  624. buttons.Add(modify());
  625. buttons.Add(Note());
  626. }
  627. if (code == "ZXHWY")
  628. {
  629. buttons.Add(subback());
  630. if (InfoSource == "2580")
  631. buttons.Add(visits());
  632. else
  633. buttons.Add(visit());
  634. buttons.Add(Note());
  635. }
  636. }
  637. break;
  638. case "8":
  639. //二级网络单位 管理员
  640. if (code == "WLDW" || code == "DDZG")
  641. {
  642. buttons.Add(feedback());
  643. if (InfoSource == "2580")
  644. buttons.Add(ejdelay());
  645. else
  646. buttons.Add(delay());
  647. buttons.Add(split());
  648. // buttons.Add(reback());
  649. }
  650. //调度专员 中心领导管理员 管理员
  651. if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  652. {
  653. buttons.Add(edit());
  654. buttons.Add(takeback());
  655. //buttons.Add(oversee());
  656. // buttons.Add(turnsee());
  657. // buttons.Add(supervision());
  658. }
  659. if (code == "EJWLDW")
  660. {
  661. if (ispd == "1")
  662. {
  663. buttons.Add(sign()); //buttons.Add(refuse());
  664. }
  665. if (ispd == "2")
  666. {
  667. // buttons.Add(EJredo());
  668. //三级单位签收后,加个退回按钮,可以退回工单到二级单位,退回时必须输入退回原因
  669. buttons.Add(feedback());
  670. //三级单位签收后,加个退回按钮,可以退回工单到二级单位,退回时必须输入退回原因
  671. }
  672. }
  673. //质检专员
  674. // if (code == "ZJZY" )
  675. // buttons.Add(turnsee());
  676. break;
  677. case "9":
  678. //调度专员 中心领导管理员 管理员
  679. if ((code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "ZXHWY" || code == "SPZ" || code == "SPZJZ") && iszb == "1")
  680. {
  681. // buttons.Add(back());
  682. }
  683. if (code == "ZXLD" || code == "YSZY" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "ZXHWY" || code == "SPZ" || code == "SPZJZ")
  684. {
  685. buttons.Add(modify());
  686. }
  687. break;
  688. case "10":
  689. //坐席班长 管理员
  690. #region
  691. //20190715 去掉审核环节 zhengbingbing
  692. if (code == "ZXBZ" || code == "GLY" || code == "DDZG")
  693. buttons.Add(audit());
  694. #endregion
  695. if (code == "ZXHWY" || code == "ZXBZ" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  696. buttons.Add(edit());
  697. break;
  698. case "11":
  699. //调度专员 中心领导管理员 管理员
  700. if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  701. {
  702. buttons.Add(reload()); buttons.Add(reject());
  703. }
  704. break;
  705. case "12":
  706. //督办专员(DBZY) 管理员
  707. if (code == "DBZY" || code == "GLY" || code == "DDZG")
  708. {
  709. buttons.Add(oversee()); buttons.Add(turnnosee());
  710. }
  711. break;
  712. case "13":
  713. if (code == "SPZ" || code == "ZXHWY" || code == "GLY" || code == "SPZJZ")
  714. {
  715. buttons.Add(subreload());
  716. //buttons.Add(end());
  717. buttons.Add(modify());
  718. }
  719. else if (code == "ZXLD" || code == "YSZY" || code == "MTDD")
  720. {
  721. buttons.Add(subreload());
  722. }
  723. break;
  724. case "14":
  725. if (code == "ZJZY" || code == "ZXLD" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  726. {
  727. buttons.Add(AuditReturn());
  728. }
  729. break;
  730. }
  731. //buttons.Add(export());
  732. //调度专员 中心领导管理员 管理员
  733. if (state != "0" && state != "9" && (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ"))
  734. {
  735. if (InfoSource != "2580")
  736. buttons.Add(forceend());
  737. }
  738. return buttons;
  739. }
  740. #region 知识库操作权限
  741. /// <summary>
  742. /// 根据状态和角色代码获取操作按钮
  743. /// </summary>
  744. /// <param name="state"></param>
  745. /// <param name="code"></param>
  746. /// <param name="iszb"></param>
  747. /// <returns></returns>
  748. public static List<button> GetZSKButtons(string state, string rolecode, string createby, string nowuser)
  749. {
  750. //中心话务员(ZXHWY) 二级网络单位(WLDW) 管理员(GLY) 坐席班长(ZXBZ) 调度专员(ZXLD)
  751. //中心领导管理员(ZXLDGLYGLY) 话务主管(ZXBZ) 中心领导(ZXLDGLY) 话务组长(ZXBZ)
  752. //导播话务员(DBHWY) 网易新闻(11) 三级网络单位(EJWLDW) 民生播报(MSBB)
  753. //督办专员(DBZY) 质检专员(ZJZY)
  754. List<button> buttons = new List<button>();
  755. buttons.Add(zsk_query());
  756. switch (state)
  757. {//状态:0草稿,1 待审核,2审核通过,3审核不通过,4无效
  758. case "0":
  759. if (createby == nowuser || rolecode == "GLY")
  760. {
  761. buttons.Add(zsk_submit());
  762. //buttons.Add(zsk_edit());
  763. //buttons.Add(zsk_delete());
  764. }
  765. break;
  766. case "1":
  767. if (rolecode == "ZXLD" || rolecode == "ZXLDGLY" || rolecode == "ZXLDGLYGLY" || rolecode == "GLY" || rolecode == "SPZ" || rolecode == "SPZJZ")
  768. buttons.Add(zsk_audit());
  769. break;
  770. case "2":
  771. case "5":
  772. if (rolecode == "ZXHWY" || rolecode == "ZXBZ" || rolecode == "ZXLD" || rolecode == "DBZY" || rolecode == "ZJZY" || rolecode == "GLY" || rolecode == "SPZ" || rolecode == "SPZJZ")
  773. {
  774. //解决 未解决
  775. buttons.Add(zsk_solved()); buttons.Add(zsk_unsolved());
  776. }
  777. //if (rolecode == "GLY")
  778. // buttons.Add(zsk_delete());
  779. break;
  780. case "3":
  781. case "4":
  782. if (createby == nowuser || rolecode == "GLY")
  783. {
  784. buttons.Add(zsk_submit());
  785. //buttons.Add(zsk_edit());
  786. //buttons.Add(zsk_delete());
  787. }
  788. break;
  789. }
  790. if (createby == nowuser || rolecode == "GLY")
  791. {
  792. buttons.Add(zsk_edit());
  793. buttons.Add(zsk_delete());
  794. }
  795. return buttons;
  796. }
  797. /// <summary>
  798. /// 根据状态和角色代码获取操作按钮
  799. /// </summary>
  800. /// <param name="state"></param>
  801. /// <param name="code"></param>
  802. /// <param name="iszb"></param>
  803. /// <returns></returns>
  804. public static List<button> GetAPPButtons(string state, string code, string isproresult = "0",string InfoSource="",string ispd="")
  805. {
  806. //审核组SPZ 审核质检组SPZJZ
  807. List<button> buttons = new List<button>();
  808. buttons.Add(query());
  809. switch (state)
  810. {
  811. case "1":
  812. //调度专员 中心领导管理员 管理员
  813. if (code == "GLY" || code == "SPZ" || code == "SPZJZ")
  814. {
  815. buttons.Add(assign());
  816. buttons.Add(back());
  817. buttons.Add(edit ());
  818. buttons.Add(turnsee());
  819. }
  820. break;
  821. case "2":
  822. //二级网络单位 管理员
  823. if (code == "GLY" || code == "WLDW")
  824. {
  825. buttons.Add(receive());
  826. }
  827. if (code == "SPZ" || code == "SPZJZ" || code == "GLY")
  828. {
  829. buttons.Add(takeback());
  830. }
  831. break;
  832. case "3":
  833. //调度专员 中心领导管理员 管理员
  834. if (code == "SPZ" || code == "SPZJZ")
  835. {
  836. buttons.Add(auditreback());
  837. }
  838. break;
  839. case "4":
  840. //二级网络单位 管理员
  841. if (code == "WLDW" || code == "DDZG")
  842. {
  843. buttons.Add(feedback());
  844. if (InfoSource == "2580")
  845. buttons.Add(ejdelay());
  846. else
  847. buttons.Add(delay());
  848. if (ispd == "0" || ispd == "")
  849. {
  850. buttons.Add(split());
  851. }
  852. else
  853. {
  854. buttons.Add(withdraw());
  855. }
  856. if (ispd == "3")
  857. {
  858. buttons.Add(auditdeal());
  859. }
  860. }
  861. //调度专员 中心领导管理员 管理员
  862. if (code == "ZXLD" || code == "SPZ" || code == "SPZJZ" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG")
  863. {
  864. buttons.Add(takeback());
  865. buttons.Add(Urge());
  866. //buttons.Add(edit());
  867. }
  868. break;
  869. case "5":
  870. //调度专员 中心领导管理员 管理员
  871. if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "SPZ" || code == "SPZJZ")
  872. {
  873. buttons.Add(auditdelay());
  874. }
  875. break;
  876. case "6":
  877. //质检专员(ZJZY)
  878. if (isproresult == "2")
  879. {
  880. if (code == "WLDW")
  881. {
  882. buttons.Add(Append());
  883. }
  884. }
  885. if (code == "SPZ" || code == "SPZJZ")
  886. {
  887. buttons.Add(VisitApproved());
  888. buttons.Add(Auditfailed());
  889. buttons.Add(Audittransfer());
  890. }
  891. break;
  892. case "7":
  893. //调度专员 中心领导管理员 管理员
  894. //if (code == "ZXLD" || code == "ZXLDGLYGLY" || code == "GLY")
  895. if (isproresult == "2")
  896. {
  897. if (code == "WLDW")
  898. {
  899. buttons.Add(Append());
  900. }
  901. }
  902. else if (isproresult == "3")
  903. {
  904. if (code == "SPZ" || code == "SPZJZ")
  905. {
  906. buttons.Add(visit());
  907. }
  908. }
  909. else
  910. {
  911. if (code == "SPZ" || code == "SPZJZ")
  912. {
  913. buttons.Add(visit());
  914. }
  915. }
  916. break;
  917. case "8":
  918. //二级网络单位 管理员
  919. if (code == "WLDW")
  920. {
  921. buttons.Add(feedback());
  922. buttons.Add(delay());
  923. if (ispd == "0" || ispd == "")
  924. {
  925. buttons.Add(split());
  926. }
  927. else
  928. {
  929. buttons.Add(withdraw());
  930. }
  931. if (ispd == "3")
  932. {
  933. buttons.Add(auditdeal());
  934. }
  935. }
  936. if (code == "SPZ" || code == "SPZJZ"|| code == "GLY")
  937. {
  938. buttons.Add(takeback());
  939. buttons.Add(Urge());
  940. }
  941. break;
  942. case "11":
  943. //调度专员 中心领导管理员 管理员
  944. if (code == "SPZ" || code == "SPZJZ")
  945. {
  946. buttons.Add(reload()); buttons.Add(reject());
  947. buttons.Add(edit());
  948. // buttons.Add(back());
  949. }
  950. break;
  951. case "14":
  952. if (code == "SPZ" || code == "SPZJZ")
  953. {
  954. buttons.Add(AuditReturn());
  955. }
  956. break;
  957. }
  958. //buttons.Add(export());
  959. //调度专员 中心领导管理员 管理员
  960. return buttons;
  961. }
  962. #endregion
  963. }
  964. }