DefaultFunctionsCreator.cs 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. using System;
  2. using System.IO;
  3. using System.Linq;
  4. using System.Text;
  5. using Abp.Extensions;
  6. using ShwasherSys.BaseSysInfo;
  7. using ShwasherSys.EntityFramework;
  8. namespace ShwasherSys.Migrations.SeedData
  9. {
  10. public class DefaultFunctionsCreator
  11. {
  12. private readonly ShwasherDbContext _context;
  13. private string PermissionStr { get; set; }
  14. public DefaultFunctionsCreator(ShwasherDbContext context)
  15. {
  16. _context = context;
  17. }
  18. public void Create()
  19. {
  20. CreateFunctions("HTSystem", "后台管理系统", "0", 0, "Index", "Home", "icon-home", 0, 0, null, "", "", "Pages");
  21. OrderMenu1();
  22. FaHuo2();
  23. FaPiao3();
  24. ProductionOrder10();
  25. SemiProductStoreMenu11();
  26. JianYan12();
  27. Baozhuang13();
  28. Store14();
  29. InventoryCheck15();
  30. RawMaterialStore16();
  31. ScrapStore17();
  32. Company30();
  33. CustomerInfoMenu31();
  34. NotificationInfo32();
  35. ProductMenu33();
  36. Statistic40();
  37. B100();
  38. Sys101();
  39. Help102();
  40. WritePermission();
  41. }
  42. #region 订单,发货,发票
  43. public void OrderMenu1()
  44. {
  45. CreateFunctions("OrderInfo", "订单管理", "HTSystem", 0, "", "", "icon-system", 1, 1, "");
  46. CreateFunctions("OrderStatusMg", "订单状态", "OrderInfo", 1, "OrderStatusMg", "OrderInfo", "icon-menu", 1, 2);
  47. CreateFunctions("QueryPage", "查看页面", "OrderStatusMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  48. CreateFunctions("Print", "打印订单", "OrderStatusMg", 2, "", "", "icon-folder", 1, 3, "", "btn btn-default", "btnPrint");
  49. CreateFunctions("Query", "查看订单", "OrderStatusMg", 2, "", "", "icon-search", 2, 3, "", "btn btn-default", "btnQuery");
  50. CreateFunctions("Audit", "审核", "OrderStatusMg", 2, "", "", "icon-edit", 3, 3, "/api/services/app/OrderHeaders/Audit", "btn btn-default", "btnAudit");
  51. CreateFunctions("AuditItem", "审核订单明细", "OrderStatusMg", 2, "", "", "icon-edit", 4, 3, "/api/services/app/OrderItems/Audit", "btn btn-default", "N_btnAudit");
  52. CreateFunctions("EndItem", "结束订单明细", "OrderStatusMg", 2, "", "", "icon-edit", 5, 3, "/api/services/app/OrderItems/End", "btn btn-default", "N_btnEnd");
  53. CreateFunctions("SendItem", "发货", "OrderStatusMg", 2, "", "", "icon-edit",6, 3, "/api/services/app/OrderItems/SendOrderAction", "btn btn-default", "N_btnSend");
  54. CreateFunctions("ChangeStatus", "订单明细状态变更", "OrderStatusMg", 2, "", "", "icon-edit", 7, 3, "/api/services/app/OrderItems/ChangeOrderItemStatus", "btn btn-default", "N_btnChangeStatus");
  55. CreateFunctions("QueryOrderPrice", "查看订单价格", "OrderStatusMg", 2, "", "", "", 8, 3, "", "btn btn-default", "None");
  56. CreateFunctions("ReplaceSendItem", "替代发货", "OrderStatusMg", 2, "", "", "icon-edit", 9, 3, "/api/services/app/OrderItems/SendOrderAction", "btn btn-default", "N_btnSend");
  57. CreateFunctions("OrderMg", "订单维护", "OrderInfo", 1, "OrderMg", "OrderInfo", "icon-menu", 2, 2);
  58. CreateFunctions("Query", "查看页面", "OrderMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  59. CreateFunctions("Create", "创建订单", "OrderMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/OrderHeaders/Create", "btn btn-default", "_btnCreate");
  60. CreateFunctions("Update", "修改订单", "OrderMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/OrderHeaders/Update", "btn btn-default", "N_btnUpdate");
  61. CreateFunctions("Delete", "删除订单", "OrderMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/OrderHeaders/Delete", "btn btn-default", "btnDelete");
  62. CreateFunctions("ShowDetail", "查看订单", "OrderMg", 2, "", "", "icon-search", 4, 3, "", "btn btn-default", "btnShow");
  63. CreateFunctions("CreateOrderItem", "创建订单明细", "OrderMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/OrderItems/Create", "btn btn-default", "N_btnCreate");
  64. CreateFunctions("UpdateOrderItem", "修改订单明细", "OrderMg", 2, "", "", "icon-edit", 5, 3, "/api/services/app/OrderItems/Update", "btn btn-default", "N_btnUpdate");
  65. CreateFunctions("DeleteOrderItem", "删除订单明细", "OrderMg", 2, "", "", "icon-delete", 6, 3, "/api/services/app/OrderItems/Delete", "btn btn-default", "N_btnDelete");
  66. CreateFunctions("QueryOrderPrice", "查看订单价格", "OrderMg", 2, "", "", "", 7, 3, "", "btn btn-default", "None");
  67. CreateFunctions("OrderQueryMg", "订单查询", "OrderInfo", 1, "OrderQueryMg", "OrderInfo", "icon-menu", 3, 2);
  68. CreateFunctions("Query", "查看页面", "OrderQueryMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  69. CreateFunctions("ExportExcel", "导出Excel", "OrderQueryMg", 2, "", "", "icon-download", 1, 3, "/api/services/app/OrderItems/ExportExcel", "btn btn-default", "_btnExportExcel");
  70. CreateFunctions("QueryOrderPrice", "查看订单价格", "OrderQueryMg", 2, "", "", "", 2, 3, "", "btn btn-default", "None");
  71. CreateFunctions("NotCompleteOrderItem", "未完成订单明细", "OrderInfo", 1, "NotCompleteOrderItem", "OrderInfo", "icon-menu", 4, 2);
  72. CreateFunctions("Query", "查看页面", "NotCompleteOrderItem", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  73. CreateFunctions("ExportExcel", "导出Excel", "NotCompleteOrderItem", 2, "", "", "icon-download", 1, 3, "/api/services/app/OrderItems/ExportExcel", "btn btn-default", "_btnExportExcel");
  74. CreateFunctions("QueryOrderPrice", "查看订单价格", "NotCompleteOrderItem", 2, "", "", "", 2, 3, "", "btn btn-default", "None");
  75. CreateFunctions("OrderItemStatistics", "订单明细统计", "OrderInfo", 1, "OrderItemStatistics", "OrderInfo", "icon-menu", 5, 2);
  76. CreateFunctions("Query", "查看页面", "OrderItemStatistics", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  77. CreateFunctions("OrderSendWarn", "订单分批发货提醒", "OrderInfo", 1, "OrderSendWarn", "OrderInfo", "icon-menu", 6, 2);
  78. CreateFunctions("Query", "查看页面", "OrderSendWarn", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  79. CreateFunctions("ChangeStatus", "取消提醒(已发货)", "OrderSendWarn", 2, "", "", "icon-delete", 1, 3, "/api/services/app/OrderItems/ChangeOrderItemStatus", "btn btn-default", "btnChangeStatus");
  80. }
  81. public void FaHuo2()
  82. {
  83. CreateFunctions("SendGoods", "发货管理", "HTSystem", 0, "", "", "icon-system", 2, 1, "");
  84. CreateFunctions("OrderSendBillCreate", "发货单生成", "SendGoods", 1, "OrderSendBillCreate", "SendGoods", "icon-menu", 1, 2);
  85. CreateFunctions("QueryPage", "查看页面", "OrderSendBillCreate", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  86. CreateFunctions("Create", "生成发货单", "OrderSendBillCreate", 2, "", "", "icon-add", 1, 3, "", "btn btn-default", "btnCreate");
  87. CreateFunctions("Delete", "撤销发货", "OrderSendBillCreate", 2, "", "", "icon-delete", 2, 3, "", "btn btn-default", "btnDelete");
  88. CreateFunctions("OrderSendBillMg", "发货单维护", "SendGoods", 1, "OrderSendBillMg", "SendGoods", "icon-menu", 2, 2);
  89. CreateFunctions("QueryPage", "查看页面", "OrderSendBillMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  90. CreateFunctions("ShowSendBill", "查看发货单", "OrderSendBillMg", 2, "", "", "icon-search", 1, 3, "", "btn btn-default", "btnShow");
  91. CreateFunctions("Delete", "撤销发货单", "OrderSendBillMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/OrderSendBill/Delete", "btn btn-default", "btnDelete");
  92. CreateFunctions("OrderSendQueryMg", "客户发货统计", "SendGoods", 1, "OrderSendQueryMg", "SendGoods", "icon-menu", 3, 2);
  93. CreateFunctions("QueryPage", "查看页面", "OrderSendQueryMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  94. CreateFunctions("ExportExcel", "导出Excel", "OrderSendQueryMg", 2, "", "", "icon-download", 1, 3, "/api/services/app/OrderSend/ExportExcel", "btn btn-default", "_btnExportExcel");
  95. CreateFunctions("QueryPrice", "查看金额", "OrderSendQueryMg", 2, "", "", "icon-search", 1, 4, "", "btn btn-default", "N_btnQueryPrice");
  96. CreateFunctions("ReturnGoodMg", "退货退款信息", "SendGoods", 1, "ReturnGood", "SendGoods", "icon-menu", 4, 2);
  97. CreateFunctions("Query", "查看页面", "ReturnGoodMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  98. CreateFunctions("Create", "创建退货记录", "ReturnGoodMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/ReturnGoodOrder/Create", "btn btn-default", "_btnCreate");
  99. CreateFunctions("Update", "修改记录", "ReturnGoodMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ReturnGoodOrder/Update", "btn btn-default", "btnUpdate");
  100. CreateFunctions("Delete", "删除记录", "ReturnGoodMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ReturnGoodOrder/Delete", "btn btn-default", "btnDelete");
  101. CreateFunctions("ChangeState", "申请检验", "ReturnGoodMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/ReturnGoodOrder/ChangeState", "btn btn-default", "btnChangeState");
  102. CreateFunctions("ExportReturn", "导出退货单", "ReturnGoodMg", 2, "", "", "icon-delete", 5, 3, "/api/services/app/ReturnGoodOrder/ExportReturn", "btn btn-default", "btnExportReturn");
  103. CreateFunctions("RefundApply", "申请退款", "ReturnGoodMg", 2, "", "", "icon-edit", 6, 3, "/api/services/app/ReturnGoodOrder/RefundApply", "btn btn-default", "btnRefundApply");
  104. CreateFunctions("RefundConfirm", "确认退款", "ReturnGoodMg", 2, "", "", "icon-add", 7, 3, "/api/services/app/ReturnGoodOrder/RefundConfirm", "btn btn-default", "btnRefundConfirm");
  105. }
  106. public void FaPiao3()
  107. {
  108. CreateFunctions("InvoiceInfo", "发票管理", "HTSystem", 0, "", "", "icon-system", 3, 1, "");
  109. CreateFunctions("InvoiceCreate", "客户发票生成", "InvoiceInfo", 1, "InvoiceCreate", "InvoiceInfo", "icon-menu", 1, 2);
  110. CreateFunctions("QueryPage", "查看页面", "InvoiceCreate", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  111. CreateFunctions("Create", "生成发票", "InvoiceCreate", 2, "", "", "icon-add", 1, 3, "/api/services/app/OrderStickBill/Create", "btn btn-default", "btnCreate");
  112. CreateFunctions("InvoiceMg", "客户发票维护", "InvoiceInfo", 1, "InvoiceMg", "InvoiceInfo", "icon-menu", 2, 2);
  113. CreateFunctions("QueryPage", "查看页面", "InvoiceMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  114. CreateFunctions("ShowStickBill", "查看发票", "InvoiceMg", 2, "", "", "icon-search", 1, 3, "", "btn btn-default", "btnShow");
  115. CreateFunctions("Delete", "作废发票", "InvoiceMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/OrderStickBill/Delete", "btn btn-default", "btnDelete");
  116. CreateFunctions("CreateRed", "添加红冲发票", "InvoiceMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/OrderStickBill/CreateRed", "btn btn-default", "_btnCreateRed");
  117. CreateFunctions("Update", "发票号修改", "InvoiceMg", 2, "", "", "icon-edit", 5, 3, "/api/services/app/OrderStickBill/UpdateStickNum", "btn btn-default", "btnUpdate");
  118. CreateFunctions("UpdateState", "确认收(退)款", "InvoiceMg", 2, "", "", "icon-edit", 6, 3, "/api/services/app/OrderStickBill/UpdateState", "btn btn-default", "btnUpdateState");
  119. CreateFunctions("ExportInvoices", "导出发票", "InvoiceMg", 2, "", "", "icon-edit", 7, 3, "/api/services/app/OrderStickBill/ExportInvoices", "btn btn-default", "_btnExportInvoices");
  120. //CreateFunctions("UpdateInvoiceDesc", "修改备注", "InvoiceMg", 2, "", "", "icon-edit", 8, 3, "/api/services/app/OrderStickBill/UpdateInvoiceDesc", "btn btn-default", "btnUpdateInvoiceDesc");
  121. CreateFunctions("StatementBill", "客户对账单维护", "InvoiceInfo", 1, "StatementBill", "InvoiceInfo", "icon-menu", 1, 2);
  122. CreateFunctions("QueryPage", "查看页面", "StatementBill", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  123. CreateFunctions("Create", "生成对账单", "StatementBill", 2, "", "", "icon-add", 1, 3, "/api/services/app/StatementBill/Create", "btn btn-default", "N_btnCreate");
  124. CreateFunctions("ShowStickBill", "查看对账单", "StatementBill", 2, "", "", "icon-search", 1, 3, "", "btn btn-default", "btnShow");
  125. CreateFunctions("Delete", "撤销对账单", "StatementBill", 2, "", "", "icon-delete", 2, 3, "/api/services/app/StatementBill/Delete", "btn btn-default", "btnDelete");
  126. CreateFunctions("UpdateDesc", "修改备注", "StatementBill", 2, "", "", "icon-edit", 3, 3, "/api/services/app/StatementBill/UpdateDesc", "btn btn-default", "btnUpdateDesc");
  127. }
  128. #endregion
  129. #region 生产,仓库,检验
  130. public void ProductionOrder10()
  131. {
  132. CreateFunctions("ProductionInfo", "生产管理", "HTSystem", 0, "", "", "icon-system", 10, 1, "");
  133. CreateFunctions("ProductionOrderMg", "排产信息维护", "ProductionInfo", 1, "ProductionOrderMg", "ProductionInfo", "icon-menu", 1, 2);
  134. CreateFunctions("Query", "查看页面", "ProductionOrderMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  135. CreateFunctions("Create", "创建排产单", "ProductionOrderMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/ProductionOrders/Create", "btn btn-default", "_btnCreate");
  136. CreateFunctions("Update", "修改排产单", "ProductionOrderMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductionOrders/Update", "btn btn-default", "btnUpdate");
  137. CreateFunctions("Delete", "删除排产单", "ProductionOrderMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/Delete", "btn btn-default", "btnDelete");
  138. CreateFunctions("Export", "导出流转单", "ProductionOrderMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/ProductionOrders/ExcelExport", "btn btn-default", "btnExport");
  139. CreateFunctions("OutProductionOrderMg", "外协信息维护", "ProductionInfo", 1, "OutProductionOrderMg", "ProductionInfo", "icon-menu", 2, 2);
  140. CreateFunctions("Query", "查看页面", "OutProductionOrderMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  141. CreateFunctions("Create", "创建外协单", "OutProductionOrderMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/ProductionOrders/CreateOutProductionOrder", "btn btn-default", "N_btnCreate");
  142. CreateFunctions("Update", "修改外协单", "OutProductionOrderMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductionOrders/UpdateOutProductionOrder", "btn btn-default", "btnUpdate");
  143. CreateFunctions("Delete", "删除外协单", "OutProductionOrderMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/DeleteOutProductionOrder", "btn btn-default", "btnDelete");
  144. CreateFunctions("ExportOut", "导出外协单", "OutProductionOrderMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/ProductionOrders/ExcelExportOut", "btn btn-default", "_btnExportOut");
  145. CreateFunctions("ProductionEnterStoreApplyMg", "生产入库申请", "ProductionInfo", 1, "ProductionEnterStoreApplyMg", "ProductionInfo", "icon-menu", 3, 2);
  146. CreateFunctions("Query", "查看页面", "ProductionEnterStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  147. CreateFunctions("Update", "修改入库申请", "ProductionEnterStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductionOrders/UpdateEnterStoreApply", "btn btn-default", "btnUpdate");
  148. CreateFunctions("Cancel", "取消入库申请", "ProductionEnterStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CancelEnterStoreApply", "btn btn-default", "N_btnCancel");
  149. CreateFunctions("Recovery", "恢复入库申请", "ProductionEnterStoreApplyMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/ProductionOrders/RecoveryEnterStoreApply", "btn btn-default", "N_btnRecovery");
  150. CreateFunctions("Confirm", "确认入库申请", "ProductionEnterStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/ConfirmEnterStoreApply", "btn btn-default", "N_btnConfirm");
  151. CreateFunctions("Close", "取消入库申请", "ProductionEnterStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CloseEnterStoreApply", "btn btn-default", "N_btnClose");
  152. CreateFunctions("ProductionOutStoreApplyMg", "外协出库申请", "ProductionInfo", 1, "ProductionOutStoreApplyMg", "ProductionInfo", "icon-menu", 4, 2);
  153. CreateFunctions("Query", "查看页面", "ProductionOutStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  154. CreateFunctions("Create", "创建出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/ProductionOrders/CreateOutStoreApply", "btn btn-default", "_btnCreate");
  155. CreateFunctions("Update", "修改出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductionOrders/UpdateOutStoreApply", "btn btn-default", "N_btnUpdate");
  156. CreateFunctions("QueryStroe", "实时库存", "ProductionOutStoreApplyMg", 2, "", "", "icon-list", 3, 3, "", "btn btn-default", "_btnQueryStore");
  157. CreateFunctions("Cancel", "取消出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CancelOutStoreApply", "btn btn-default", "N_btnCancel");
  158. CreateFunctions("Recovery", "恢复出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/ProductionOrders/RecoveryOutStoreApply", "btn btn-default", "N_btnRecovery");
  159. CreateFunctions("Confirm", "确认出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/ConfirmOutStoreApply", "btn btn-default", "N_btnConfirm");
  160. CreateFunctions("Close", "关闭出库申请", "ProductionOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CloseOutStoreApply", "btn btn-default", "N_btnClose");
  161. CreateFunctions("RePlatingOutStoreApplyMg", "改镀出库申请", "ProductionInfo", 1, "RePlatingOutStoreApplyMg", "ProductionInfo", "icon-menu", 5, 2);
  162. //add
  163. CreateFunctions("Query", "查看页面", "RePlatingOutStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  164. CreateFunctions("Confirm", "确认出库申请", "RePlatingOutStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductionOrders/UpdateFinishOutStoreApply", "btn btn-default", "N_btnConfirm");
  165. CreateFunctions("Cancel", "取消出库申请", "RePlatingOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CancelFinishOutStoreApply", "btn btn-default", "N_btnCancel");
  166. CreateFunctions("Export", "导出改镀申请单", "RePlatingOutStoreApplyMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/ProductionOrders/RePlatingExportApply", "btn btn-default", "N_btnExport");
  167. //CreateFunctions("Create", "创建外协单", "RePlatingOutStoreApplyMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/ProductionOrders/CreateOutProductionOrder", "btn btn-default", "N_btnCreate");
  168. CreateFunctions("OutSourcingMissStoreMg", "生产入库缺失记录", "ProductionInfo", 1, "OutSourcingMissStoreMg", "ProductionInfo", "icon-menu", 6, 2);
  169. CreateFunctions("Query", "查看", "OutSourcingMissStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  170. }
  171. public void SemiProductStoreMenu11()
  172. {
  173. CreateFunctions("SemiProductStoreInfo", "半成品仓库管理", "HTSystem", 0, "", "", "icon-system", 11, 1, "");
  174. CreateFunctions("SemiEnterStoreApplyMg", "半成品入库申请审核", "SemiProductStoreInfo", 1, "SemiEnterStoreApplyMg", "SemiProductStoreInfo", "icon-menu", 1, 2);
  175. CreateFunctions("Query", "查看页面", "SemiEnterStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  176. CreateFunctions("Update", "审核通过", "SemiEnterStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/SemiEnterStores/Audit", "btn btn-default", "btnUpdate");
  177. CreateFunctions("Refuse", "拒绝申请", "SemiEnterStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/SemiEnterStores/Refuse", "btn btn-default", "btnDelete");
  178. //CreateFunctions("QueryStore", "实时库存", "SemiEnterStoreApplyMg", 2, "", "", "icon-task", 4, 3, "", "btn btn-default", "_btnQueryStore");
  179. CreateFunctions("SemiEnterStoreMg", "半成品入库信息", "SemiProductStoreInfo", 1, "SemiEnterStoreMg", "SemiProductStoreInfo", "icon-menu", 2, 2);
  180. CreateFunctions("Query", "查看页面", "SemiEnterStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  181. CreateFunctions("SemiOutStoreApplyMg", "半成品出库申请审核", "SemiProductStoreInfo", 1, "SemiOutStoreApplyMg", "SemiProductStoreInfo", "icon-menu", 3, 2);
  182. CreateFunctions("Query", "查看页面", "SemiOutStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  183. CreateFunctions("Update", "审核通过", "SemiOutStoreApplyMg", 2, "", "", "icon-edit", 1, 3, "/api/services/app/SemiOutStore/Audit", "btn btn-default", "btnUpdate");
  184. CreateFunctions("Refuse", "拒绝申请", "SemiOutStoreApplyMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/SemiOutStore/Refuse", "btn btn-default", "btnDelete");
  185. //CreateFunctions("QueryStore", "实时库存", "SemiOutStoreApplyMg", 2, "", "", "icon-task", 4, 3, "", "btn btn-default", "_btnQueryStore");
  186. CreateFunctions("SemiOutStoreMg", "半成品出库信息", "SemiProductStoreInfo", 1, "SemiOutStoreMg", "SemiProductStoreInfo", "icon-menu", 4, 2);
  187. CreateFunctions("Query", "查看页面", "SemiOutStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  188. CreateFunctions("CurrentSemiStoreHouseMg", "半成品库存信息", "SemiProductStoreInfo", 1, "CurrentSemiStoreHouseMg", "SemiProductStoreInfo", "icon-menu", 5, 2);
  189. CreateFunctions("Query", "查看页面", "CurrentSemiStoreHouseMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  190. CreateFunctions("PackageApply", "申请包装", "CurrentSemiStoreHouseMg", 2, "", "", "",1, 3, "/api/services/app/SemiOutStore/PackageApply", "btn btn-default", "btnPackage");
  191. CreateFunctions("UpdateKgWeight", "修改千斤重", "CurrentSemiStoreHouseMg", 2, "", "", "",2, 3, "/api/services/app/CurrentSemiStoreHouses/UpdateKgWeight", "btn btn-default", "N_btnUpdateKgWeight");
  192. CreateFunctions("AddEnter", "入库平衡", "CurrentSemiStoreHouseMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/CurrentSemiStoreHouses/AddEnter", "btn btn-default", "_btnAddEnter");
  193. CreateFunctions("AddOut", "出库平衡", "CurrentSemiStoreHouseMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/CurrentSemiStoreHouses/AddOut", "btn btn-default", "N_btnAddOut");
  194. CreateFunctions("ChangeStoreHouse", "仓库移库", "CurrentSemiStoreHouseMg", 2, "", "", "icon-edit", 5, 3, "/api/services/app/CurrentSemiStoreHouses/ChangeStoreHouse", "btn btn-default", "btnChangeStoreHouse");
  195. CreateFunctions("CurrentSemiStoreQueryMg", "半成品库存数量查询", "SemiProductStoreInfo", 1, "CurrentSemiStoreHouseQueryMg", "SemiProductStoreInfo", "icon-menu", 6, 2);
  196. CreateFunctions("Query", "查看页面", "CurrentSemiStoreQueryMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  197. CreateFunctions("Print", "库存报表打印", "CurrentSemiStoreQueryMg", 2, "", "", "icon-search", 2, 3, "", "btn btn-default", "_btnPrint");
  198. CreateFunctions("QueryEnterOut", "查看进出货明细信息", "CurrentSemiStoreQueryMg", 2, "", "", "icon-search", 3, 3, "", "btn btn-default", "N_btnPrint");
  199. }
  200. public void JianYan12()
  201. {
  202. CreateFunctions("ProductInspect", "技术检验管理", "HTSystem", 0, "", "", "icon-system", 12, 1, "");
  203. CreateFunctions("ProductItemInspectMg", "半成品入库检验", "ProductInspect", 1, "ProductItem", "ProductInspect", "icon-menu", 1, 2);
  204. CreateFunctions("Query", "查看页面", "ProductItemInspectMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  205. CreateFunctions("Check", "检验合格", "ProductItemInspectMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/ProductInspect/Check", "btn btn-default", "btnCheck");
  206. CreateFunctions("UnCheck", "检验不合格", "ProductItemInspectMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/ProductInspect/UnCheck", "btn btn-default", "btnUnCheck");
  207. CreateFunctions("ShowUnqualified", "不合格查看", "ProductItemInspectMg", 2, "", "", "icon-search", 2, 3, "/api/services/app/ProductInspect/UnCheck", "btn btn-default", "btnUnCheck");
  208. CreateFunctions("DisqualifiedProductMg", "退货产品处理", "ProductInspect", 1, "DisqualifiedProduct", "ProductInspect", "icon-menu", 2, 2);
  209. CreateFunctions("Query", "查看页面", "DisqualifiedProductMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  210. CreateFunctions("CheckDowngrade", "检验选项", "DisqualifiedProductMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/DisqualifiedProduct/CheckDowngrade", "btn btn-default", "btnCheckDowngrade");
  211. CreateFunctions("UseDowngrade", "降级使用", "DisqualifiedProductMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/DisqualifiedProduct/UseDowngrade", "btn btn-default", "btnUseDowngrade");
  212. //CreateFunctions("Scrapped", "报废处理", "DisqualifiedProductMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/DisqualifiedProduct/Scrapped", "btn btn-default", "btnScrap");
  213. CreateFunctions("ConfirmScrapped", "确认报废", "DisqualifiedProductMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/DisqualifiedProduct/ConfirmScrapped", "btn btn-default", "btnConfirmScrapped");
  214. CreateFunctions("UnScrapped", "拒绝报废", "DisqualifiedProductMg", 2, "", "", "icon-delete", 5, 3, "/api/services/app/DisqualifiedProduct/UnScrapped", "btn btn-default", "btnUnScrapped");
  215. CreateFunctions("DisqualifiedSemiProductMg", "不合格半成品处理", "ProductInspect", 1, "DisqualifiedSemiProduct", "ProductInspect", "icon-menu", 3, 2);
  216. CreateFunctions("Query", "查看页面", "DisqualifiedSemiProductMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  217. CreateFunctions("CheckDowngrade", "检验选项", "DisqualifiedSemiProductMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/DisqualifiedProduct/CheckDowngrade", "btn btn-default", "btnCheckDowngrade");
  218. CreateFunctions("UseDowngrade", "降级使用", "DisqualifiedSemiProductMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/DisqualifiedProduct/UseDowngrade", "btn btn-default", "btnUseDowngrade");
  219. //CreateFunctions("Scrapped", "报废处理", "DisqualifiedProductMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/DisqualifiedProduct/Scrapped", "btn btn-default", "btnScrap");
  220. CreateFunctions("ConfirmScrapped", "确认报废", "DisqualifiedSemiProductMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/DisqualifiedProduct/ConfirmScrapped", "btn btn-default", "btnConfirmScrapped");
  221. CreateFunctions("UnScrapped", "拒绝报废", "DisqualifiedSemiProductMg", 2, "", "", "icon-delete", 5, 3, "/api/services/app/DisqualifiedProduct/UnScrapped", "btn btn-default", "btnUnScrapped");
  222. //CreateFunctions("AntiPlating", "确认反镀", "DisqualifiedProductMg", 2, "", "", "icon-delete", 6, 3, "/api/services/app/DisqualifiedProduct/AntiPlating", "btn btn-default", "btnAntiPlating");
  223. CreateFunctions("ProductInspectMg", "检验报告生成", "ProductInspect", 1, "Index", "ProductInspect", "icon-menu", 3, 2);
  224. CreateFunctions("Query", "查看页面", "ProductInspectMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  225. CreateFunctions("Template", "报告模板", "ProductInspectMg", 2, "", "", "icon-task", 1, 3, "/api/services/app/ProductInspect/Template", "btn btn-default", "_btnTemplate");
  226. CreateFunctions("Create", "添加报告", "ProductInspectMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/ProductInspect/CreateInspect", "btn btn-default", "btnCreate");
  227. CreateFunctions("Export", "导出信息", "ProductInspectMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/ProductInspect/ExportInspect", "btn btn-default", "_btnExport");
  228. CreateFunctions("InspectReport", "检验报告确认", "ProductInspect", 1, "Report", "ProductInspect", "icon-menu", 4, 2);
  229. CreateFunctions("Query", "查看页面", "InspectReport", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  230. CreateFunctions("Update", "修改报告", "InspectReport", 2, "", "", "icon-edit", 1, 3, "/api/services/app/ProductInspect/UpdateInspect", "btn btn-default", "N_btnUpdate");
  231. CreateFunctions("ConfirmReport", "确认最终报告", "InspectReport", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductInspect/ConfirmReport", "btn btn-default", "btnConfirmReport");
  232. CreateFunctions("QueryReport", "查看报告", "InspectReport", 2, "", "", "icon-task", 3, 3, "/api/services/app/ProductInspect/QueryReport", "btn btn-default", "btnQueryReport");
  233. }
  234. public void Baozhuang13()
  235. {
  236. CreateFunctions("PackInfo", "包装管理", "HTSystem", 0, "", "", "icon-system", 13, 1, "");
  237. //CreateFunctions("PackInfoApply", "包装申请", "PackInfo", 1, "PackInfoApply", "PackInfo", "icon-menu", 1, 2);
  238. //CreateFunctions("Query", "查看页面", "PackInfoApply", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  239. //CreateFunctions("Create", "发起出库申请", "PackInfoApply", 2, "", "", "icon-edit", 1, 3, "/api/services/app/PackInfoApply/CreatePackInfoApply", "btn btn-default", "_btnCreate");
  240. //CreateFunctions("Update", "修改出库申请", "PackInfoApply", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/UpdatePackInfoApply", "btn btn-default", "btnUpdate");
  241. //CreateFunctions("Delete", "取消出库申请", "PackInfoApply", 2, "", "", "icon-delete", 3, 3, "/api/services/app/PackInfoApply/DeletePackInfoApply", "btn btn-default", "btnDelete");
  242. CreateFunctions("PackageApplyInfo", "包装申请信息查询", "PackInfo", 1, "PackageApplyInfo", "PackInfo", "icon-menu", 1, 2);
  243. CreateFunctions("Query", "查看页面", "PackageApplyInfo", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  244. CreateFunctions("PackInfoMg", "包装信息维护", "PackInfo", 1, "Index", "PackInfo", "icon-menu", 2, 2);
  245. CreateFunctions("Query", "查看页面", "PackInfoMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  246. CreateFunctions("Create", "确认包装", "PackInfoMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/PackInfoApply/CreatePackInfo", "btn btn-default", "btnCreate");
  247. CreateFunctions("Refuse", "拒绝包装", "PackInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/RefusePackInfoApply", "btn btn-default", "btnRefuse");
  248. CreateFunctions("Close", "关闭申请", "PackInfoMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/PackInfoApply/ClosePackInfoApply", "btn btn-default", "btnClose");
  249. CreateFunctions("PackageInfoMg", "产品包装维护", "PackInfoMg", 4, "", "", "icon-edit", 3, 3, "", "btn btn-default", "NotShow");
  250. CreateFunctions("Query", "查看页面", "PackageInfoMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  251. CreateFunctions("EnterBatch", "一键入库", "PackageInfoMg", 2, "", "", "icon-edit", 1, 3, "/api/services/app/PackInfoApply/CreateProductApplyBatch", "btn btn-default", "_btnEnterBatch");
  252. CreateFunctions("Add", "增加包装规格", "PackageInfoMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/PackInfoApply/AddPackInfo", "btn btn-default", "_btnAdd");
  253. CreateFunctions("Update", "修改包装规格", "PackageInfoMg", 2, "", "", "icon-edit", 3, 3, "/api/services/app/PackInfoApply/UpdatePackInfo", "btn btn-default", "btnUpdate");
  254. CreateFunctions("Delete", "删除包装规格", "PackageInfoMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/PackInfoApply/DeletePackInfo", "btn btn-default", "btnDelete");
  255. CreateFunctions("Enter", "包装入库申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/CreateProductApply", "btn btn-default", "N_btnEnter");
  256. //CreateFunctions("Delete", "删除入库申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/DeleteProductApply", "btn btn-default", "N_btnDelete");
  257. CreateFunctions("Cancel", "取消入库申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/CancelProductApply", "btn btn-default", "N_btnCancel");
  258. CreateFunctions("Recovery", "恢复申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/RecoveryProductApply", "btn btn-default", "N_btnRecovery");
  259. CreateFunctions("Confirm", "确认入库申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/ConfirmProductApply", "btn btn-default", "N_btnConfirm");
  260. CreateFunctions("Close", "关闭入库申请", "PackageInfoMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/PackInfoApply/CloseProductApply", "btn btn-default", "N_btnClose");
  261. CreateFunctions("ToBePackageInfoMg", "待包装信息查询", "PackInfo", 1, "ToBePackageInfo", "PackInfo", "icon-menu", 4, 2);
  262. CreateFunctions("Query", "查看页面", "ToBePackageInfoMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  263. }
  264. public void Store14()
  265. {
  266. CreateFunctions("FinshedStoreInfo", "成品仓库管理", "HTSystem", 0, "", "", "icon-system", 14, 1, "");
  267. CreateFunctions("FinshedEnterStoreApplyMg", "成品入库申请审核", "FinshedStoreInfo", 1, "FinshedEnterStoreApplyMg", "FinshedStoreInfo", "icon-menu", 1, 2);
  268. CreateFunctions("Query", "查看页面", "FinshedEnterStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  269. CreateFunctions("Update", "审核通过", "FinshedEnterStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/FinshedEnterStore/Audit", "btn btn-default", "btnUpdate");
  270. CreateFunctions("Refuse", "拒绝申请", "FinshedEnterStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/FinshedEnterStore/Refuse", "btn btn-default", "btnDelete");
  271. //CreateFunctions("QueryStore", "实时库存", "FinshedEnterStoreApplyMg", 2, "", "", "icon-task", 4, 3, "", "btn btn-default", "_btnQueryStore");
  272. CreateFunctions("FinshedEnterStoreMg", "成品入库信息", "FinshedStoreInfo", 1, "FinshedEnterStoreMg", "FinshedStoreInfo", "icon-menu", 2, 2);
  273. CreateFunctions("Query", "查看页面", "FinshedEnterStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  274. CreateFunctions("FinshedOutStoreApplyMg", "成品出库申请审核", "FinshedStoreInfo", 1, "FinshedOutStoreApplyMg", "FinshedStoreInfo", "icon-menu", 3, 2);
  275. CreateFunctions("Query", "查看页面", "FinshedOutStoreApplyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  276. CreateFunctions("Update", "审核通过", "FinshedOutStoreApplyMg", 2, "", "", "icon-edit", 1, 3, "/api/services/app/FinshedOutStore/Audit", "btn btn-default", "btnUpdate");
  277. CreateFunctions("BatchAudit", "批量审核", "FinshedOutStoreApplyMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/FinshedOutStore/AuditBatch", "btn btn-default", "a_btnAuditBatch");
  278. CreateFunctions("Refuse", "拒绝申请", "FinshedOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/FinshedOutStore/Refuse", "btn btn-default", "btnRefuse");
  279. CreateFunctions("Recovery", "恢复申请", "FinshedOutStoreApplyMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/FinshedOutStore/Recovery", "btn btn-default", "btnRecovery");
  280. //CreateFunctions("QueryStore", "实时库存", "FinshedOutStoreApplyMg", 2, "", "", "icon-task", 4, 3, "", "btn btn-default", "_btnQueryStore");
  281. CreateFunctions("FinshedOutStoreMg", "成品出库信息", "FinshedStoreInfo", 1, "FinshedOutStoreMg", "FinshedStoreInfo", "icon-menu", 4, 2);
  282. CreateFunctions("Query", "查看页面", "FinshedOutStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  283. CreateFunctions("CurrentFinshedStoreHouseMg", "成品库存信息", "FinshedStoreInfo", 1, "CurrentFinshedStoreHouseMg", "FinshedStoreInfo", "icon-menu", 5, 2);
  284. CreateFunctions("Query", "查看页面", "CurrentFinshedStoreHouseMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  285. CreateFunctions("PackageApply", "申请包装", "CurrentFinshedStoreHouseMg", 2, "", "", "", 1, 3, "/api/services/app/FinshedOutStore/PackageApply", "btn btn-default", "btnPackage");
  286. //CreateFunctions("AddVirtualStore", "添加临时库存", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-add", 2, 3, "/api/services/app/CurrentFinshedStoreHouse/AddVirtualStore", "btn btn-default", "_btnAddVirtualStore");
  287. CreateFunctions("ExportExcel", "导出Excel", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-download", 3, 3, "/api/services/app/CurrentFinshedStoreHouse/ExportExcel", "btn btn-default", "_btnExportExcel");
  288. CreateFunctions("AddEnter", "入库平衡", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/CurrentFinshedStoreHouse/AddEnter", "btn btn-default", "_btnAddEnter");
  289. CreateFunctions("AddOut", "出库平衡", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-delete", 5, 3, "/api/services/app/CurrentFinshedStoreHouse/AddOut", "btn btn-default", "N_btnAddOut");
  290. CreateFunctions("UpdateStoreLocation", "仓库移库", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-edit", 6, 3, "/api/services/app/CurrentFinshedStoreHouse/UpdateStoreLocation", "btn btn-default", "btnUpdateStoreLocation");
  291. //add
  292. CreateFunctions("RePlating", "改镀", "CurrentFinshedStoreHouseMg", 2, "", "", "icon-add", 7, 3, "/api/services/app/FinshedOutStore/RePlating", "btn btn-default", "btnRePlating");
  293. CreateFunctions("CurrentStoreHouseQueryMg", "库存数量查询", "FinshedStoreInfo", 1, "CurrentStoreHouseQueryMg", "FinshedStoreInfo", "icon-menu", 6, 2);
  294. CreateFunctions("Query", "查看页面", "CurrentStoreHouseQueryMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  295. CreateFunctions("Print", "库存报表打印", "CurrentStoreHouseQueryMg", 2, "", "", "icon-search", 2, 3, "/api/services/app/CurrentStoreHouseQueryMg/Print", "btn btn-default", "_btnPrint");
  296. CreateFunctions("QueryEnterOut", "查看进出货明细信息", "CurrentStoreHouseQueryMg", 2, "", "", "icon-search", 3, 3, "/api/services/app/CurrentStoreHouseQueryMg/Print", "btn btn-default", "N_btnPrint");
  297. CreateFunctions("EnterOutStoreHouseQueryMg", "进出库数量查询", "FinshedStoreInfo", 1, "EnterOutStoreHouseQueryMg", "FinshedStoreInfo", "icon-menu", 7, 2);
  298. CreateFunctions("Query", "查看页面", "EnterOutStoreHouseQueryMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  299. CreateFunctions("ExportExcel", "导出Excel", "EnterOutStoreHouseQueryMg", 2, "", "", "icon-download", 1, 3, "/api/services/app/CurrentFinshedStoreHouse/ExportExcel", "btn btn-default", "_btnExportExcel");
  300. }
  301. public void InventoryCheck15()
  302. {
  303. CreateFunctions("InventoryCheckInfo", "仓库盘点管理", "HTSystem", 0, "", "", "icon-system", 15, 1, "");
  304. CreateFunctions("InventoryCheckCreate", "库存创建盘点", "InventoryCheckInfo", 1, "InventoryCheckCreate", "FinshedStoreInfo", "icon-menu", 8, 2);
  305. CreateFunctions("Query", "查看页面", "InventoryCheckCreate", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  306. CreateFunctions("Create", "盘点任务创建", "InventoryCheckCreate", 2, "", "", "icon-add", 2, 3, "/api/services/app/InventoryCheck/Create", "btn btn-default", "N_btnCreate");
  307. CreateFunctions("Update", "修改盘点任务", "InventoryCheckCreate", 2, "", "", "icon-edit", 3, 3, "/api/services/app/InventoryCheck/Update", "btn btn-default", "btnUpdate");
  308. CreateFunctions("ChangeState", "修改盘点任务状态", "InventoryCheckCreate", 2, "", "", "icon-edit", 3, 3, "/api/services/app/InventoryCheck/ChangeState", "btn btn-default", "N_btnChangeState");
  309. CreateFunctions("CheckData", "盘点库存", "InventoryCheckCreate", 2, "", "", "icon-edit", 3, 3, "/api/services/app/InventoryCheck/CheckData", "btn btn-default", "N_btnCheckData");
  310. CreateFunctions("InventoryCheck", "库存盘点", "InventoryCheckInfo", 1, "InventoryCheck", "FinshedStoreInfo", "icon-menu", 9, 2);
  311. CreateFunctions("Query", "查看页面", "InventoryCheck", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  312. CreateFunctions("ChangeState", "修改盘点任务状态", "InventoryCheck", 2, "", "", "icon-edit", 3, 3, "/api/services/app/InventoryCheck/UpdateState", "btn btn-default", "N_btnChangeState");
  313. CreateFunctions("CheckData", "盘点库存", "InventoryCheck", 2, "", "", "icon-edit", 3, 3, "/api/services/app/InventoryCheck/CheckData", "btn btn-default", "N_btnCheckData");
  314. }
  315. public void RawMaterialStore16()
  316. {
  317. CreateFunctions("RawMaterialStore", "原材料仓库管理", "HTSystem", 0, "", "", "icon-system", 16, 1, "");
  318. CreateFunctions("RmStoreEnterMg", "原材料入库信息维护", "RawMaterialStore", 1, "RmStoreEnterMg", "RmStoreInfo", "icon-menu", 1, 2);
  319. CreateFunctions("Query", "查看页面", "RmStoreEnterMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  320. CreateFunctions("Create", "申请入库", "RmStoreEnterMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/RmEnterStore/Create", "btn btn-default", "_btnCreate");
  321. CreateFunctions("Update", "审核入库", "RmStoreEnterMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/RmEnterStore/UpdateState", "btn btn-default", "btnUpdate");
  322. CreateFunctions("Delete", "取消入库", "RmStoreEnterMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/RmEnterStore/UpdateState", "btn btn-default", "btnDelete");
  323. CreateFunctions("RmStoreOutMg", "原材料出库信息维护", "RawMaterialStore", 1, "RmStoreOutMg", "RmStoreInfo", "icon-menu", 1, 2);
  324. CreateFunctions("Query", "查看页面", "RmStoreOutMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  325. //CreateFunctions("Create", "申请入库", "RmStoreEnterMg", 2, "", "", "icon-add", 1, 3, "/api/services/app/RawMaterialStore/CreateEnter", "btn btn-default", "_btnCreate");
  326. CreateFunctions("Update", "审核出库", "RmStoreOutMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/RmOutStore/UpdateState", "btn btn-default", "btnUpdate");
  327. CreateFunctions("Delete", "取消出库", "RmStoreOutMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/RmOutStore/UpdateState", "btn btn-default", "btnDelete");
  328. CreateFunctions("RmCurrentStoreMg", "原材料库存信息维护", "RawMaterialStore", 1, "RmCurrentStoreMg", "RmStoreInfo", "icon-menu", 1, 2);
  329. CreateFunctions("Query", "查看页面", "RmCurrentStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  330. CreateFunctions("AddEnter", "入库平衡", "RmCurrentStoreMg", 2, "", "", "icon-add", 3, 3, "/api/services/app/CurrentRmStoreHouse/AddEnter", "btn btn-default", "N_btnAddEnter");
  331. CreateFunctions("AddOut", "出库平衡", "RmCurrentStoreMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/CurrentRmStoreHouse/AddOut", "btn btn-default", "N_btnAddOut");
  332. }
  333. public void ScrapStore17()
  334. {
  335. CreateFunctions("ScrapStore", "废品仓库管理", "HTSystem", 0, "", "", "icon-system", 17, 1, "");
  336. CreateFunctions("ScrapStoreEnterMg", "废品入库信息维护", "ScrapStore", 1, "ScrapStoreEnterMg", "ScrapStoreInfo", "icon-menu", 1, 2);
  337. CreateFunctions("Query", "查看页面", "ScrapStoreEnterMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  338. CreateFunctions("Update", "审核入库", "ScrapStoreEnterMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/RmEnterStore/UpdateState", "btn btn-default", "N_btnUpdate");
  339. CreateFunctions("Delete", "取消入库", "ScrapStoreEnterMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/RmEnterStore/UpdateState", "btn btn-default", "N_btnDelete");
  340. }
  341. #endregion
  342. #region 公司基础信息
  343. private void Company30()
  344. {
  345. CreateFunctions("Company", "公司信息管理", "HTSystem", 0, "", "", "icon-system", 30, 1, "");
  346. CreateFunctions("Employee", "人员管理", "Company", 1, "Employee", "Company", "icon-menu", 2, 2);
  347. CreateFunctions("Query", "查看页面", "Employee", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  348. CreateFunctions("Create", "创建人员", "Employee", 2, "", "", "icon-add", 1, 3, "/api/services/app/Employee/Create", "btn btn-default", "_btnCreate");
  349. CreateFunctions("Update", "修改人员", "Employee", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Employee/Update", "btn btn-default", "btnUpdate");
  350. CreateFunctions("Delete", "删除人员", "Employee", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Employee/Delete", "btn btn-default", "btnDelete");
  351. CreateFunctions("Bind", "绑定账号", "Employee", 2, "", "", "icon-add", 4, 3, "/api/services/app/Employee/Bind", "btn btn-default", "btnBind");
  352. CreateFunctions("UnBind", "解绑账号", "Employee", 2, "", "", "icon-delete", 5, 3, "/api/services/app/Employee/UnBind", "btn btn-default", "btnUnBind");
  353. CreateFunctions("EmployeePerformance", "绩效查询", "Company", 1, "Performance", "Company", "icon-menu", 3, 2);
  354. CreateFunctions("Query", "查看页面", "EmployeePerformance", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  355. CreateFunctions("LicenseDocument", "证照信息维护", "Company", 1, "LicenseDocument", "Company", "icon-menu", 4, 2);
  356. CreateFunctions("Query", "查看页面", "LicenseDocument", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  357. CreateFunctions("Create", "创建证照", "LicenseDocument", 2, "", "", "icon-add", 1, 3, "/api/services/app/LicenseDocument/Create", "btn btn-default", "_btnCreate");
  358. CreateFunctions("Update", "修改证照", "LicenseDocument", 2, "", "", "icon-edit", 2, 3, "/api/services/app/LicenseDocument/Update", "btn btn-default", "btnUpdate");
  359. CreateFunctions("Delete", "删除证照", "LicenseDocument", 2, "", "", "icon-delete", 3, 3, "/api/services/app/LicenseDocument/Delete", "btn btn-default", "btnDelete");
  360. CreateFunctions("DownLoad", "下载证照", "LicenseDocument", 2, "", "", "icon-delete", 3, 3, "/api/services/app/LicenseDocument/DownLoad", "btn btn-default", "btnDownLoad");
  361. CreateFunctions("DieMaintenance", "机模设备维护管理", "Company", 0, "", "", "icon-system", 5, 3, "");
  362. CreateFunctions("FixedAsset", "设备固定资产维护", "DieMaintenance", 1, "FixedAsset", "Company", "icon-menu", 1, 4);
  363. CreateFunctions("Query", "查看页面", "FixedAsset", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  364. CreateFunctions("Create", "创建资产", "FixedAsset", 2, "", "", "icon-add", 1, 3, "/api/services/app/FixedAsset/Create", "btn btn-default", "_btnCreate");
  365. CreateFunctions("Update", "修改资产", "FixedAsset", 2, "", "", "icon-edit", 2, 3, "/api/services/app/FixedAsset/Update", "btn btn-default", "btnUpdate");
  366. CreateFunctions("Delete", "删除资产", "FixedAsset", 2, "", "", "icon-delete", 3, 3, "/api/services/app/FixedAsset/Delete", "btn btn-default", "btnDelete");
  367. CreateFunctions("Mold", "模具信息维护", "DieMaintenance", 1, "Mold", "Company", "icon-menu", 2, 4);
  368. CreateFunctions("Query", "查看页面", "Mold", 2, "", "", "", 0, 5, "", "btn btn-default", "None");
  369. CreateFunctions("Create", "创建模具", "Mold", 2, "", "", "icon-add", 1, 5, "/api/services/app/Mold/Create", "btn btn-default", "_btnCreate");
  370. CreateFunctions("Update", "修改模具", "Mold", 2, "", "", "icon-edit", 2, 5, "/api/services/app/Mold/Update", "btn btn-default", "btnUpdate");
  371. CreateFunctions("Delete", "删除模具", "Mold", 2, "", "", "icon-delete", 3, 5, "/api/services/app/Mold/Delete", "btn btn-default", "btnDelete");
  372. //CreateFunctions("MoldMg", "模具维护计划", "DieMaintenance", 1, "MoldMg", "Company", "icon-menu", 1, 4);
  373. //CreateFunctions("Query", "查看页面", "MoldMg", 2, "", "", "", 0, 5, "", "btn btn-default", "None");
  374. //CreateFunctions("Create", "创建模具", "MoldMg", 2, "", "", "icon-add", 1, 5, "/api/services/app/Mold/Create", "btn btn-default", "_btnCreate");
  375. //CreateFunctions("Update", "修改模具", "MoldMg", 2, "", "", "icon-edit", 2, 5, "/api/services/app/Mold/Update", "btn btn-default", "btnUpdate");
  376. //CreateFunctions("Delete", "删除模具", "MoldMg", 2, "", "", "icon-delete", 3, 5, "/api/services/app/Mold/Delete", "btn btn-default", "btnDelete");
  377. //CreateFunctions("Maintain", "添加维护记录", "MoldMg", 2, "", "", "icon-add", 4, 5, "/api/services/app/Mold/Maintain", "btn btn-default", "btnMaintain");
  378. CreateFunctions("DeviceMgPlan", "机模维护计划", "DieMaintenance", 1, "DeviceMgPlan", "Company", "icon-menu", 3, 4);
  379. CreateFunctions("Query", "查看页面", "DeviceMgPlan", 2, "", "", "", 0, 5, "", "btn btn-default", "None");
  380. CreateFunctions("Create", "创建计划", "DeviceMgPlan", 2, "", "", "icon-add", 1, 5, "/api/services/app/DeviceMgPlan/Create", "btn btn-default", "_btnCreate");
  381. CreateFunctions("Update", "修改计划", "DeviceMgPlan", 2, "", "", "icon-edit", 2, 5, "/api/services/app/DeviceMgPlan/Update", "btn btn-default", "btnUpdate");
  382. CreateFunctions("Delete", "删除计划", "DeviceMgPlan", 2, "", "", "icon-delete", 3, 5, "/api/services/app/DeviceMgPlan/Delete", "btn btn-default", "btnDelete");
  383. CreateFunctions("Maintain", "添加维护记录", "DeviceMgPlan", 2, "", "", "icon-add", 5, 5, "/api/services/app/DeviceMgPlan/Maintain", "btn btn-default", "btnMaintain");
  384. CreateFunctions("MaintainRecord", "机模维护记录", "DieMaintenance", 1, "MaintainRecord", "Company", "icon-menu", 4, 4);
  385. CreateFunctions("Query", "查看页面", "MaintainRecord", 2, "", "", "", 0, 5, "", "btn btn-default", "None");
  386. CreateFunctions("Create", "创建维护记录", "MaintainRecord", 2, "", "", "icon-add", 1, 5, "/api/services/app/MaintainRecord/Create", "btn btn-default", "_btnCreate");
  387. CreateFunctions("Update", "修改维护记录", "MaintainRecord", 2, "", "", "icon-edit", 2, 5, "/api/services/app/MaintainRecord/Update", "btn btn-default", "btnUpdate");
  388. CreateFunctions("Delete", "删除维护记录", "MaintainRecord", 2, "", "", "icon-delete", 3, 5, "/api/services/app/MaintainRecord/Delete", "btn btn-default", "btnDelete");
  389. CreateFunctions("AddMember", "添加维护人员", "MaintainRecord", 2, "", "", "icon-delete", 3, 5, "/api/services/app/MaintainRecord/AddMember", "btn btn-default", "btnAddMember");
  390. CreateFunctions("Complete", "完成维护", "MaintainRecord", 2, "", "", "icon-delete", 3, 5, "/api/services/app/MaintainRecord/Complete", "btn btn-default", "btnComplete");
  391. CreateFunctions("MaintainMember", "维护人员", "DieMaintenance", 3, "MaintainRecord", "Company", "icon-menu", 5, 4);
  392. CreateFunctions("Update", "修改信息", "MaintainMember", 2, "", "", "icon-edit", 1, 5, "/api/services/app/MaintainRecord/UpdateMember", "btn btn-default", "btnUpdateMember");
  393. CreateFunctions("Delete", "删除信息", "MaintainMember", 2, "", "", "icon-delete", 1, 5, "/api/services/app/MaintainRecord/DeleteMember", "btn btn-default", "btnDeleteMember");
  394. }
  395. public void CustomerInfoMenu31()
  396. {
  397. CreateFunctions("CustomerInfo", "客户管理", "HTSystem", 0, "", "", "icon-system", 31, 1, "");
  398. CreateFunctions("Customers", "客户基础信息维护", "CustomerInfo", 1, "Customers", "CustomerInfo", "icon-menu", 1, 2);
  399. CreateFunctions("Query", "查看页面", "Customers", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  400. CreateFunctions("Create", "创建客户", "Customers", 2, "", "", "icon-add", 1, 3, "/api/services/app/Customers/Create", "btn btn-default", "_btnCreate");
  401. CreateFunctions("Update", "修改客户", "Customers", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Customers/Update", "btn btn-default", "btnUpdate");
  402. CreateFunctions("Delete", "删除客户", "Customers", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Customers/Delete", "btn btn-default", "btnDelete");
  403. /*CreateFunctions("CustomerSends", "客户送货地址维护", "CustomerInfo", 1, "CustomerSends", "CustomerInfo", "icon-menu", 2, 2);
  404. CreateFunctions("Create", "添加", "CustomerSends", 2, "", "", "icon-add", 4, 3, "/api/services/app/CustomerSends/Create", "btn btn-default", "_btnCreate");
  405. CreateFunctions("Update", "修改", "CustomerSends", 2, "", "", "icon-edit", 5, 3, "/api/services/app/CustomerSends/Update", "btn btn-default", "btnUpdate");
  406. CreateFunctions("Delete", "删除", "CustomerSends", 2, "", "", "icon-delete", 6, 3, "/api/services/app/CustomerSends/Delete", "btn btn-default", "btnDelete");*/
  407. CreateFunctions("CreateSend", "添加客户发货地址", "Customers", 2, "", "", "icon-add", 4, 3, "/api/services/app/CustomerSends/Create", "btn btn-default", "N_btnCreate");
  408. CreateFunctions("UpdateSend", "修改客户发货地址", "Customers", 2, "", "", "icon-edit", 5, 3, "/api/services/app/CustomerSends/Update", "btn btn-default", "N_btnUpdate");
  409. CreateFunctions("DeleteSend", "删除客户发货地址", "Customers", 2, "", "", "icon-delete", 6, 3, "/api/services/app/CustomerSends/Delete", "btn btn-default", "N_btnDelete");
  410. CreateFunctions("CreateDefaultProduct", "添加客户默认产品", "Customers", 2, "", "", "icon-add", 7, 3, "/api/services/app/CustomerDefaultProduct/Create", "btn btn-default", "N_btnCreate");
  411. CreateFunctions("UpdateDefaultProduct", "修改客户默认产品", "Customers", 2, "", "", "icon-edit", 8, 3, "/api/services/app/CustomerDefaultProduct/Update", "btn btn-default", "N_btnUpdate");
  412. CreateFunctions("DeleteDefaultProduct", "删除客户默认产品", "Customers", 2, "", "", "icon-delete", 9, 3, "/api/services/app/CustomerDefaultProduct/Delete", "btn btn-default", "N_btnDelete");
  413. /*CreateFunctions("QueryCustomerDefaultProduct", "查询客户默认产品", "Customers", 2, "", "", "icon-add", 10, 3, "/api/services/app/Products/GetQueryCustomerDefaultProduct", "btn btn-default", "N_btnQuery");*/
  414. CreateFunctions("CustomerInvoices", "客户发票地址维护", "CustomerInfo", 3, "", "", "icon-menu", 2, 2);
  415. CreateFunctions("Create", "添加发票地址", "CustomerInvoices", 2, "", "", "icon-add", 4, 3, "/api/services/app/CustomerInvoiceAddress/Create", "btn btn-default", "_btnCreate");
  416. CreateFunctions("Update", "修改发票地址", "CustomerInvoices", 2, "", "", "icon-edit", 5, 3, "/api/services/app/CustomerInvoiceAddress/Update", "btn btn-default", "btnUpdate");
  417. CreateFunctions("Delete", "删除发票地址", "CustomerInvoices", 2, "", "", "icon-delete", 6, 3, "/api/services/app/CustomerInvoiceAddress/Delete", "btn btn-default", "btnDelete");
  418. }
  419. public void NotificationInfo32()
  420. {
  421. CreateFunctions("NotificationInfo", "消息管理", "HTSystem", 0, "", "", "icon-system", 32, 1, "");
  422. CreateFunctions("BulletinInfos", "通告管理", "NotificationInfo", 1, "BulletinInfos", "NotificationInfo", "icon-menu", 1, 2);
  423. CreateFunctions("Query", "查看页面", "BulletinInfos", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  424. CreateFunctions("Create", "创建通知", "BulletinInfos", 2, "", "", "icon-add", 1, 3, "/api/services/app/BulletinInfos/Create", "btn btn-default", "_btnCreate");
  425. CreateFunctions("Update", "修改通知", "BulletinInfos", 2, "", "", "icon-edit", 2, 3, "/api/services/app/BulletinInfos/Update", "btn btn-default", "btnUpdate");
  426. CreateFunctions("Delete", "删除通知", "BulletinInfos", 2, "", "", "icon-delete", 3, 3, "/api/services/app/BulletinInfos/Delete", "btn btn-default", "btnDelete");
  427. CreateFunctions("ShortMsgMg", "短消息管理", "NotificationInfo", 1, "ShortMsgMg", "NotificationInfo", "icon-menu", 2, 2);
  428. CreateFunctions("Query", "查看页面", "ShortMsgMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  429. /*CreateFunctions("Create", "创建通知", "BulletinInfos", 2, "", "", "icon-add", 1, 3, "/api/services/app/BulletinInfos/Create", "btn btn-default", "_btnCreate");*/
  430. CreateFunctions("SetRead", "已读", "ShortMsgMg", 2, "", "", "icon-edit", 1, 3, "/api/services/app/ShortMsgDetail/SetRead", "btn btn-default", "a_btnSetRead");
  431. CreateFunctions("Delete", "删除消息", "ShortMsgMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/ShortMsgDetail/BatchDelete", "btn btn-default", "a_btnDelete");
  432. }
  433. public void ProductMenu33()
  434. {
  435. CreateFunctions("ProductInfo", "产品管理", "HTSystem", 0, "", "", "icon-system", 33, 1, "");
  436. CreateFunctions("Products", "成品维护", "ProductInfo", 1, "Products", "ProductInfo", "icon-menu", 1, 2);
  437. CreateFunctions("Query", "查看页面", "Products", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  438. CreateFunctions("Create", "创建成品", "Products", 2, "", "", "icon-add", 1, 3, "/api/services/app/Products/Create", "btn btn-default", "_btnCreate");
  439. CreateFunctions("Update", "修改成品", "Products", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Products/Update", "btn btn-default", "btnUpdate");
  440. CreateFunctions("Delete", "删除成品", "Products", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Products/Delete", "btn btn-default", "btnDelete");
  441. CreateFunctions("ExportExcel", "Excel导出", "Products", 2, "", "", "icon-add", 4, 3, "/api/services/app/Products/ExportExcel", "btn btn-default", "_btnExport");
  442. CreateFunctions("SemiProducts", "半成品维护", "ProductInfo", 1, "SemiProducts", "ProductInfo", "icon-menu", 2, 2);
  443. CreateFunctions("Query", "查看页面", "SemiProducts", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  444. CreateFunctions("Create", "创建半成品", "SemiProducts", 2, "", "", "icon-add", 1, 3, "/api/services/app/SemiProducts/Create", "btn btn-default", "_btnCreate");
  445. CreateFunctions("Update", "修改半成品", "SemiProducts", 2, "", "", "icon-edit", 2, 3, "/api/services/app/SemiProducts/Update", "btn btn-default", "btnUpdate");
  446. CreateFunctions("Delete", "删除半成品", "SemiProducts", 2, "", "", "icon-delete", 3, 3, "/api/services/app/SemiProducts/Delete", "btn btn-default", "btnDelete");
  447. CreateFunctions("ImportExcel", "Excel导入", "SemiProducts", 2, "", "", "icon-add", 4, 3, "/api/services/app/SemiProducts/ImportExcel", "btn btn-default", "_btnImport");
  448. CreateFunctions("Standards", "标准维护", "ProductInfo", 1, "Standards", "ProductInfo", "icon-menu", 3, 2);
  449. CreateFunctions("Query", "查看页面", "Standards", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  450. CreateFunctions("Create", "创建标准", "Standards", 2, "", "", "icon-add", 1, 3, "/api/services/app/Standards/Create", "btn btn-default", "_btnCreate");
  451. CreateFunctions("Update", "修改标准", "Standards", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Standards/Update", "btn btn-default", "btnUpdate");
  452. CreateFunctions("Delete", "删除标准", "Standards", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Standards/Delete", "btn btn-default", "btnDelete");
  453. CreateFunctions("RmProduct", "原材料维护", "ProductInfo", 1, "RmProduct", "ProductInfo", "icon-menu", 4, 2);
  454. CreateFunctions("Query", "查看页面", "RmProduct", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  455. CreateFunctions("Create", "创建原材料", "RmProduct", 2, "", "", "icon-add", 1, 3, "/api/services/app/RmProduct/Create", "btn btn-default", "_btnCreate");
  456. CreateFunctions("Update", "修改原材料", "RmProduct", 2, "", "", "icon-edit", 2, 3, "/api/services/app/RmProduct/Update", "btn btn-default", "btnUpdate");
  457. CreateFunctions("Delete", "删除原材料", "RmProduct", 2, "", "", "icon-delete", 3, 3, "/api/services/app/RmProduct/Delete", "btn btn-default", "btnDelete");
  458. CreateFunctions("ImportExcel", "Excel导入", "RmProduct", 2, "", "", "icon-add", 4, 3, "/api/services/app/RmProduct/ImportExcel", "btn btn-default", "_btnImport");
  459. CreateFunctions("ProductProperty", "产品属性维护", "ProductInfo", 1, "ProductProperty", "ProductInfo", "icon-menu", 4, 2);
  460. CreateFunctions("Query", "查看页面", "ProductProperty", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  461. CreateFunctions("Create", "创建产品属性", "ProductProperty", 2, "", "", "icon-add", 1, 3, "/api/services/app/ProductProperty/Create", "btn btn-default", "_btnCreate");
  462. CreateFunctions("Update", "修改产品属性", "ProductProperty", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ProductProperty/Update", "btn btn-default", "btnUpdate");
  463. CreateFunctions("Delete", "删除产品属性", "ProductProperty", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductProperty/Delete", "btn btn-default", "btnDelete");
  464. CreateFunctions("ImportExcel", "Excel导入", "ProductProperty", 2, "", "", "icon-add", 4, 3, "/api/services/app/ProductProperty/ImportExcel", "btn btn-default", "_btnImport");
  465. CreateFunctions("ProductMapper", "新旧产品编码替换", "ProductInfo", 1, "ProductMapper", "ProductInfo", "icon-menu", 4, 2);
  466. CreateFunctions("Query", "查看页面", "ProductMapper", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  467. }
  468. #endregion
  469. #region 数据统计
  470. public void Statistic40()
  471. {
  472. CreateFunctions("StatisticMg", "数据统计报表", "HTSystem", 0, "", "", "icon-system", 40, 1, "");
  473. CreateFunctions("OutsourcingReportMg", "采购数据统计", "StatisticMg", 1, "OutsourcingReport", "Statistic","icon-menu", 1, 2);
  474. CreateFunctions("Query", "查看页面", "OutsourcingReportMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  475. CreateFunctions("Export", "导出Excel", "OutsourcingReportMg", 2, "", "", "", 1, 3, "", "btn btn-default", "None");
  476. CreateFunctions("ProductionReportMg", "车间生产数据统计", "StatisticMg", 1, "ProductionReport", "Statistic","icon-menu", 2, 2);
  477. CreateFunctions("Query", "查看页面", "ProductionReportMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  478. CreateFunctions("PackageDailyMg", "车间包装数据统计", "StatisticMg", 1, "PackageDaily","Statistic", "icon-menu", 3, 2);
  479. CreateFunctions("Query", "查看页面", "PackageDailyMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  480. CreateFunctions("InventoryCheckReportMg", "盘点数据统计", "StatisticMg", 1, "InventoryCheckReport", "Statistic", "icon-menu", 4, 2);
  481. CreateFunctions("Query", "查看页面", "InventoryCheckReportMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  482. CreateFunctions("StatementBillReportMg", "对账单数据统计", "StatisticMg", 1, "StatementBillReport", "Statistic", "icon-menu", 4, 2);
  483. CreateFunctions("Query", "查看页面", "StatementBillReportMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  484. }
  485. #endregion
  486. #region 基础信息
  487. private void B100()
  488. {
  489. CreateFunctions("BasicInfo", "基础信息", "HTSystem", 0, "", "", "icon-system", 100, 1, "");
  490. CreateFunctions("Departments", "部门信息管理", "BasicInfo", 1, "Departments", "BasicInfo", "icon-menu", 1, 2);
  491. CreateFunctions("Create", "创建部门", "Departments", 2, "", "", "icon-add", 1, 3, "/api/services/app/Departments/Create", "btn btn-default", "_btnCreate");
  492. CreateFunctions("Update", "修改部门", "Departments", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Departments/Update", "btn btn-default", "btnUpdate");
  493. CreateFunctions("Delete", "删除部门", "Departments", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Departments/Delete", "btn btn-default", "btnDelete");
  494. CreateFunctions("Dutys", "职务信息管理", "BasicInfo", 1, "Dutys", "BasicInfo", "icon-menu", 2, 2);
  495. CreateFunctions("Create", "创建职务", "Dutys", 2, "", "", "icon-add", 1, 3, "/api/services/app/Dutys/Create", "btn btn-default", "_btnCreate");
  496. CreateFunctions("Update", "修改职务", "Dutys", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Dutys/Update", "btn btn-default", "btnUpdate");
  497. CreateFunctions("Delete", "删除职务", "Dutys", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Dutys/Delete", "btn btn-default", "btnDelete");
  498. CreateFunctions("StoreHouses", "仓库信息管理", "BasicInfo", 1, "StoreHouses", "BasicInfo", "icon-menu", 3, 2);
  499. CreateFunctions("Create", "创建仓库", "StoreHouses", 2, "", "", "icon-add", 1, 3, "/api/services/app/StoreHouses/Create", "btn btn-default", "_btnCreate");
  500. CreateFunctions("Update", "修改仓库", "StoreHouses", 2, "", "", "icon-edit", 2, 3, "/api/services/app/StoreHouses/Update", "btn btn-default", "btnUpdate");
  501. CreateFunctions("Delete", "删除仓库", "StoreHouses", 2, "", "", "icon-delete", 3, 3, "/api/services/app/StoreHouses/Delete", "btn btn-default", "btnDelete");
  502. CreateFunctions("StoreHouseLocations", "仓库位置管理", "BasicInfo", 1, "StoreHouseLocations", "BasicInfo", "icon-menu", 4, 2);
  503. CreateFunctions("Create", "创建库位", "StoreHouseLocations", 2, "", "", "icon-add", 1, 3, "/api/services/app/StoreHouseLocations/Create", "btn btn-default", "_btnCreate");
  504. CreateFunctions("Update", "修改库位", "StoreHouseLocations", 2, "", "", "icon-edit", 2, 3, "/api/services/app/StoreHouseLocations/Update", "btn btn-default", "btnUpdate");
  505. CreateFunctions("Delete", "删除库位", "StoreHouseLocations", 2, "", "", "icon-delete", 3, 3, "/api/services/app/StoreHouseLocations/Delete", "btn btn-default", "btnDelete");
  506. CreateFunctions("Regions", "区域管理", "BasicInfo", 1, "Regions", "BasicInfo", "icon-menu", 5, 2);
  507. CreateFunctions("Create", "创建区域", "Regions", 2, "", "", "icon-add", 1, 3, "/api/services/app/Regions/Create", "btn btn-default", "_btnCreate");
  508. CreateFunctions("Update", "修改区域", "Regions", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Regions/Update", "btn btn-default", "btnUpdate");
  509. CreateFunctions("Delete", "删除区域", "Regions", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Regions/Delete", "btn btn-default", "btnDelete");
  510. CreateFunctions("Factories", "办公场所信息管理", "BasicInfo", 1, "Factories", "BasicInfo", "icon-menu", 6, 2);
  511. CreateFunctions("Create", "创建场所", "Factories", 2, "", "", "icon-add", 1, 3, "/api/services/app/Factories/Create", "btn btn-default", "_btnCreate");
  512. CreateFunctions("Update", "修改场所", "Factories", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Factories/Update", "btn btn-default", "btnUpdate");
  513. CreateFunctions("Delete", "删除场所场所", "Factories", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Factories/Delete", "btn btn-default", "btnDelete");
  514. CreateFunctions("OutFactory", "外协加工厂商管理", "BasicInfo", 1, "OutFactory", "BasicInfo", "icon-menu", 7, 2);
  515. CreateFunctions("Create", "创建外协厂商", "OutFactory", 2, "", "", "icon-add", 1, 3, "/api/services/app/OutFactory/Create", "btn btn-default", "_btnCreate");
  516. CreateFunctions("Update", "修改外协厂商", "OutFactory", 2, "", "", "icon-edit", 2, 3, "/api/services/app/OutFactory/Update", "btn btn-default", "btnUpdate");
  517. CreateFunctions("Delete", "删除外协厂商", "OutFactory", 2, "", "", "icon-delete", 3, 3, "/api/services/app/OutFactory/Delete", "btn btn-default", "btnDelete");
  518. CreateFunctions("Currency", "货币汇率管理", "BasicInfo", 1, "Currency", "BasicInfo", "icon-menu", 8, 2);
  519. CreateFunctions("Create", "创建货币", "Currency", 2, "", "", "icon-add", 1, 3, "/api/services/app/Currency/Create", "btn btn-default", "_btnCreate");
  520. CreateFunctions("Update", "修改货币", "Currency", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Currency/Update", "btn btn-default", "btnUpdate");
  521. CreateFunctions("Delete", "删除货币", "Currency", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Currency/Delete", "btn btn-default", "btnDelete");
  522. //CreateFunctions("", "编辑汇率", "Currency", 2, "", "", "icon-delete", 3, 3, "/api/services/app/OutFactory/Delete", "btn btn-default", "btnDelete");
  523. CreateFunctions("Express", "快递公司管理", "BasicInfo", 1, "Express", "BasicInfo", "icon-menu", 8, 2);
  524. CreateFunctions("Create", "创建快递公司", "Express", 2, "", "", "icon-add", 1, 3, "/api/services/app/Express/Create", "btn btn-default", "_btnCreate");
  525. CreateFunctions("Update", "修改快递公司", "Express", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Express/Update", "btn btn-default", "btnUpdate");
  526. CreateFunctions("Delete", "删除快递公司", "Express", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Express/Delete", "btn btn-default", "btnDelete");
  527. CreateFunctions("LicenseType", "证照类型管理", "BasicInfo", 1, "LicenseType", "BasicInfo", "icon-menu", 9, 2);
  528. CreateFunctions("Query", "查看页面", "LicenseType", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  529. CreateFunctions("Create", "创建证照类型", "LicenseType", 2, "", "", "icon-add", 1, 3, "/api/services/app/LicenseType/Create", "btn btn-default", "_btnCreate");
  530. CreateFunctions("Update", "修改证照类型", "LicenseType", 2, "", "", "icon-edit", 2, 3, "/api/services/app/LicenseType/Update", "btn btn-default", "btnUpdate");
  531. CreateFunctions("Delete", "删除证照类型", "LicenseType", 2, "", "", "icon-delete", 3, 3, "/api/services/app/LicenseType/Delete", "btn btn-default", "btnDelete");
  532. CreateFunctions("QualityIssueLabel", "质量问题标签管理", "BasicInfo", 1, "QualityIssueLabel", "BasicInfo", "icon-menu", 10, 2);
  533. CreateFunctions("Query", "查看页面", "QualityIssueLabel", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  534. CreateFunctions("Create", "创建标签", "QualityIssueLabel", 2, "", "", "icon-add", 1, 3, "/api/services/app/QualityIssueLabel/Create", "btn btn-default", "_btnCreate");
  535. CreateFunctions("Update", "修改标签", "QualityIssueLabel", 2, "", "", "icon-edit", 2, 3, "/api/services/app/QualityIssueLabel/Update", "btn btn-default", "btnUpdate");
  536. CreateFunctions("Delete", "删除标签", "QualityIssueLabel", 2, "", "", "icon-delete", 3, 3, "/api/services/app/QualityIssueLabel/Delete", "btn btn-default", "btnDelete");
  537. CreateFunctions("ScrapType", "报废类型管理", "BasicInfo", 1, "ScrapType", "BasicInfo", "icon-menu", 11, 2);
  538. CreateFunctions("Query", "查看页面", "ScrapType", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  539. CreateFunctions("Create", "创建报废类型", "ScrapType", 2, "", "", "icon-add", 1, 3, "/api/services/app/ScrapType/Create", "btn btn-default", "_btnCreate");
  540. CreateFunctions("Update", "修改报废类型", "ScrapType", 2, "", "", "icon-edit", 2, 3, "/api/services/app/ScrapType/Update", "btn btn-default", "btnUpdate");
  541. CreateFunctions("Delete", "删除报废类型", "ScrapType", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ScrapType/Delete", "btn btn-default", "btnDelete");
  542. CreateFunctions("FixedAssetType", "固定资产类型管理", "BasicInfo", 1, "FixedAssetType", "BasicInfo", "icon-menu", 12, 2);
  543. CreateFunctions("Query", "查看页面", "FixedAssetType", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  544. CreateFunctions("Create", "创建资产类型", "FixedAssetType", 2, "", "", "icon-add", 1, 3, "/api/services/app/FixedAssetType/Create", "btn btn-default", "_btnCreate");
  545. CreateFunctions("Update", "修改资产类型", "FixedAssetType", 2, "", "", "icon-edit", 2, 3, "/api/services/app/FixedAssetType/Update", "btn btn-default", "btnUpdate");
  546. CreateFunctions("Delete", "删除资产类型", "FixedAssetType", 2, "", "", "icon-delete", 3, 3, "/api/services/app/FixedAssetType/Delete", "btn btn-default", "btnDelete");
  547. }
  548. private void Sys101()
  549. {
  550. CreateFunctions("System", "系统信息管理", "HTSystem", 0, "", "", "icon-system", 101, 1, "");
  551. CreateFunctions("Roles", "角色管理", "System", 1, "SysRoles", "System", "icon-menu", 1, 2);
  552. CreateFunctions("Query", "查看页面", "Roles", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  553. CreateFunctions("Create", "创建角色", "Roles", 2, "", "", "icon-add", 1, 3, "/api/services/app/Roles/Create", "btn btn-default", "_btnCreate");
  554. CreateFunctions("Update", "修改角色", "Roles", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Roles/Update", "btn btn-default", "btnUpdate");
  555. CreateFunctions("Delete", "删除角色", "Roles", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Roles/Delete", "btn btn-default", "btnDelete");
  556. CreateFunctions("Auth", "角色权限", "Roles", 2, "", "", "icon-perm-list", 4, 3, "/api/services/app/Roles/Auth", "btn btn-default", "btnAuth");
  557. CreateFunctions("Users", "用户管理", "System", 1, "SysUsers", "System", "icon-menu", 2, 2);
  558. CreateFunctions("Query", "查看页面", "Users", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  559. CreateFunctions("Create", "创建用户", "Users", 2, "", "", "icon-add", 1, 3, "/api/services/app/Users/Create", "btn btn-default", "_btnCreate");
  560. CreateFunctions("Update", "修改用户", "Users", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Users/Update", "btn btn-default", "btnUpdate");
  561. CreateFunctions("Delete", "删除用户", "Users", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Users/Delete", "btn btn-default", "btnDelete");
  562. CreateFunctions("ResetPassword", "重置密码", "Users", 2, "", "", "icon-perm-list", 5, 3, "/api/services/app/Users/ResetPassword", "btn btn-default", "btnResetPwd");
  563. CreateFunctions("Auth", "用户权限", "Users", 2, "", "", "icon-perm-list", 6, 3, "/api/services/app/Users/Auth", "btn btn-default", "btnAuth");
  564. CreateFunctions("SysState", "系统字典管理", "System", 1, "SysStates", "System", "icon-menu", 3, 2);
  565. CreateFunctions("Query", "查看页面", "SysState", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  566. CreateFunctions("Create", "创建字典", "SysState", 2, "", "", "icon-add", 1, 3, "/api/services/app/States/Create", "btn btn-default", "_btnCreate");
  567. CreateFunctions("Update", "修改字典", "SysState", 2, "", "", "icon-edit", 2, 3, "/api/services/app/States/Update", "btn btn-default", "btnUpdate");
  568. CreateFunctions("Delete", "删除字典", "SysState", 2, "", "", "icon-delete", 3, 3, "/api/services/app/States/Delete", "btn btn-default", "btnDelete");
  569. CreateFunctions("SysSetting", "系统配置管理", "System", 1, "SysSettings", "System", "icon-menu", 4, 2);
  570. CreateFunctions("Query", "查看页面", "SysSetting", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  571. CreateFunctions("Create", "创建配置", "SysSetting", 2, "", "", "icon-add", 1, 3, "/api/services/app/Settings/Create", "btn btn-default", "_btnCreate");
  572. CreateFunctions("Update", "修改配置", "SysSetting", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Settings/Update", "btn btn-default", "btnUpdate");
  573. CreateFunctions("Delete", "删除配置", "SysSetting", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Settings/Delete", "btn btn-default", "btnDelete");
  574. CreateFunctions("Refresh", "强制刷新", "SysSetting", 2, "", "", "icon-refresh", 4, 3, "/api/services/app/Settings/Refresh", "btn btn-default", "_btnRefresh");
  575. /*CreateFunctions("LoginSetting", "登陆页面图片配置", "SysSetting", 2, "", "", "icon-detail", 5, 3, "/Settings/LoginImage", "btn btn-default", "_btnLoginSetting");*/
  576. CreateFunctions("SysFunction", "功能菜单管理", "System", 1, "SysFunctions", "System", "icon-menu", 5, 2);
  577. CreateFunctions("Query", "查看页面", "SysFunction", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  578. CreateFunctions("Create", "创建菜单", "SysFunction", 2, "", "", "icon-add", 1, 3, "/api/services/app/Functions/Create", "btn btn-default", "_btnCreate");
  579. CreateFunctions("Update", "修改菜单", "SysFunction", 2, "", "", "icon-edit", 2, 3, "/api/services/app/Functions/Update", "btn btn-default", "btnUpdate");
  580. CreateFunctions("Delete", "删除菜单", "SysFunction", 2, "", "", "icon-delete", 3, 3, "/api/services/app/Functions/Delete", "btn btn-default", "btnDelete");
  581. CreateFunctions("MoveUp", "上移菜单", "SysFunction", 2, "", "", "icon-moveup", 4, 3, "/api/services/app/Functions/MoveUp", "btn btn-default", "btnMoveUp");
  582. CreateFunctions("MoveDown", "下移菜单", "SysFunction", 2, "", "", "icon-movedown", 5, 3, "/api/services/app/Functions/MoveDown", "btn btn-default", "btnMoveDown");
  583. CreateFunctions("Refresh", "强制刷新", "SysFunction", 2, "", "", "icon-refresh", 6, 3, "/api/services/app/Functions/Refresh", "btn btn-default", "_btnRefresh");
  584. CreateFunctions("SysLog", "系统日志管理", "System", 1, "SysLogs", "System", "icon-menu", 6, 2);
  585. CreateFunctions("SysHelp", "系统帮助管理", "System", 1, "SysHelps", "System", "icon-menu", 7, 2);
  586. CreateFunctions("Query", "查看页面", "SysHelp", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
  587. CreateFunctions("Create", "创建帮助", "SysHelp", 2, "", "", "icon-add", 1, 3, "/api/services/app/SysHelps/Create", "btn btn-default", "_btnCreate");
  588. CreateFunctions("Update", "修改帮助", "SysHelp", 2, "", "", "icon-edit", 2, 3, "/api/services/app/SysHelps/Update", "btn btn-default", "btnUpdate");
  589. CreateFunctions("Delete", "删除帮助", "SysHelp", 2, "", "", "icon-delete", 3, 3, "/api/services/app/SysHelps/Delete", "btn btn-default", "btnDelete");
  590. }
  591. private void Help102()
  592. {
  593. CreateFunctions("SysHelpPreview", "系统帮助", "HTSystem", 1, "SysHelpPreview", "System", "icon-menu", 102, 2);
  594. }
  595. #endregion
  596. private void CreateFunctions(string funNo, string funName, string parentNo, int funType,
  597. string action, string controller, string icon, int sort, int depth, string url = null, string c = "", string s = "", string path = "")
  598. {
  599. var fun = _context.Functions.FirstOrDefault(e => e.FunctionNo == funNo && e.ParentNo == parentNo);
  600. if (fun == null)
  601. {
  602. string permissionName = path;
  603. if (path.IsNullOrEmpty())
  604. {
  605. var parentFun = _context.Functions.FirstOrDefault(f => f.FunctionNo == parentNo);
  606. if (parentFun != null)
  607. {
  608. path = parentFun.FunctionPath + "," + funNo;
  609. permissionName = parentFun.PermissionName + "." + funNo;
  610. }
  611. }
  612. url = url ?? controller + "/" + action;
  613. fun = new SysFunction
  614. {
  615. FunctionNo = funNo,
  616. ParentNo = parentNo,
  617. FunctionName = funName,
  618. PermissionName = permissionName,
  619. FunctionPath = path,
  620. FunctionType = funType + 1,
  621. Controller = controller,
  622. Action = action,
  623. Icon = icon,
  624. Sort = sort,
  625. Depth = depth,
  626. Class = c,
  627. Script = s,
  628. Url = url
  629. };
  630. _context.Functions.Add(fun);
  631. _context.SaveChanges();
  632. }
  633. PermissionStr += $" public const string {fun.FunctionPath.Replace(",", "")} = \"{fun.PermissionName}\";\r\n";
  634. }
  635. private void WritePermission()
  636. {
  637. if (string.IsNullOrEmpty(PermissionStr))
  638. {
  639. return;
  640. }
  641. try
  642. {
  643. string content = "namespace ShwasherSys.Authorization.Permissions\r\n";
  644. content += "{\r\n";
  645. content += " public static class PermissionNames\r\n";
  646. content += " {\r\n";
  647. content += PermissionStr;
  648. content += " }\r\n";
  649. content += "}\r\n";
  650. var path = AppDomain.CurrentDomain.BaseDirectory;
  651. var basePath = AppDomain.CurrentDomain.BaseDirectory.Substring(0, path.IndexOf("\\ShwasherSys.EntityFramework", StringComparison.Ordinal));
  652. var filePath = Path.Combine(basePath, "ShwasherSys.Core\\Authorization\\Permissions\\PermissionNames.cs");
  653. var fs = new FileStream(filePath, FileMode.Truncate, FileAccess.ReadWrite);//清空文件内容
  654. fs.Close();
  655. using (FileStream fr = new FileStream(filePath, FileMode.Append, FileAccess.Write))
  656. {
  657. fr.Seek(0, SeekOrigin.Begin);
  658. byte[] bytes = Encoding.UTF8.GetBytes(content);
  659. fr.Write(bytes, 0, bytes.Length);
  660. fr.Flush();
  661. }
  662. }
  663. catch (Exception e)
  664. {
  665. throw (new Exception("Permission:" + e.Message));
  666. }
  667. }
  668. }
  669. }